Jump to content
  • 0

Trade will appear when click the NPC


Reborn

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

How to do this? Im willing to pay for someone who can do this one..

If the party leader click the npc trade will open and the party leader need to put the red potion and the whole party will be warp in geffen. This is only an example

But if the party leader put the wfong item and he click ok the trade will be cancelled automatically

 

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

hello.. Does anyone have an idea to make this one?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

if( !.@party_id ){
	mes "You need a Party.";
}else if( getpartyleader( .@party_id,2 ) != getcharid(0) ){
	mes "You're not Party Leader.";
}else{
	mes "Give me the item .";
	npcshopattach "partywarp_shop",1;
	callshop "partywarp_shop",2;
	end;
}
close;

OnSellItem:
		mes "Trade Successfully.";
		delitem @sold_nameid,1;
		warpparty .prontera,0,0;

this is not work as trade, but will work as npcshop, try it out ( untested )

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@Cyro

it should take red potion only to get warp not all the items

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

Add this 

Set @sold_nameid itemid;

 

Edited by Cyro
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@Cyro

Hello how can i make it to require this script for a specific item?

Example:

1.) Red potion 10x and Orange potion 5x

If the player met the item requirement then they will be warp to prontera.

2.) Blue potion 5x and white potion 10x

If the player met the item for this one they will be warp to geffen.

----------------------------

However if they are not able to meet any item required above the trade will be cancelled.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

switch(select("prontera:geffen:")){
case 1:
if(countitem(512)<10 || countitem(513)<5);
    warp "prontera" ,1,1;
    break;
case 2;    
if(countitem(514)<10 || countitem(516)<5);
    warp "geffen" ,1,1;
    break;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

@Cyro

is it possible not to put the swicth option? by just putting the item the npc will automatically recognize it

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

its just an example, so u can use it as ur need in your script

u can set 

Set @sold_nameid1 itemid1;

Set @sold_nameid2 itemid2;

countitem(@sold_nameid)<10  || countitem(@sold_nameid);

 

delitem @sold_nameid1,10;

delitem @sold_nameid2,10;

 

Edited by Cyro
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...