Jump to content
  • 0
Sign in to follow this  
ThyroDree

[ Request ] @dealer command

Question

@dealer Info :

@dealer opens a shop that sells Poison Bottles , YGGG,etc., Zeny is needed to buy in this shop

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

just use bindatcmd

simple

-	script	slslfkdsscxvxc	-1,{OnInit:	bindatcmd "dealer", strnpcinfo(0)+"::Onaaa";	end;Onaaa:	callshop "blahblah", 1;	end;}-	shop	blahblah	-1,678:-1,608:-1
btw, if callshop with type 2, it ask you to sell items instead of want to buy it =/ Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0

Edit your atcommand.c and add:

 

ACMD_FUNC(dealer){    nullpo_retr(-1,sd);        if( sd->npc_id || sd->vender_id || sd->buyer_id || sd->state.trading || sd->state.storage_flag )        return -1;            npc_event(sd,"DEALER_NPC::OnWantToSell",0);    return 0;    }

 

NPC:

 

-<tab>script<tab>DEALER_NPC<tab>-1,{OnWantToSell:callshop "SellShop",2;end; -    shop    SellShop    139,678:-1,608:-1}

 

Share this post


Link to post
Share on other sites
  • 0

what line on atcommand.c?

 

 

edit;::

 

i already tried compile ( success ) run the server and type @dealer

 

Chat Box Said :

[ @dealer is Unknown Command. ]

Edited by ThyroDree

Share this post


Link to post
Share on other sites
  • 0

i will try this now 

 

 

just use bindatcmd
simple

-	script	slslfkdsscxvxc	-1,{OnInit:	bindatcmd "dealer", strnpcinfo(0)+"::Onaaa";	end;Onaaa:	callshop "blahblah", 1;	end;}-	shop	blahblah	-1,678:-1,608:-1
btw, if callshop with type 2, it ask you to sell items instead of want to buy it =/

okay thanks annieruru ill try this now

 

THANNKS IT WORKS!

Edited by ThyroDree

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.