Vainglorious Posted March 29, 2013 Share Posted March 29, 2013 Hello there, I searched the Forums and didn't find it yet - or was I to dumb? I don't know. Since I managed to implement a @buy command I wanted to make one for @sell buuuut... Currently I really don't have a clew how to do that....Would anyone be willing to help me? If you like i'll share the @buy command. haha Thank you very much! Regards, Vainglorious Quote Link to comment Share on other sites More sharing options...
Oxxy Posted March 30, 2013 Share Posted March 30, 2013 (edited) Use this command. He will call npc event OnWantToSell from SELL_NPC. ACMD_FUNC(sell) { 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,"SELL_NPC::OnWantToSell",0); return 0; } NPC script: -<tab>script<tab>SELL_NPC<tab>-1,{ OnWantToSell: callshop "SellShop",2; end; - shop SellShop 139,2117:-1,7521:-1,7522:-1,7523:-1,7524:-1,13250:-1,13251:-1,13252:-1,13253:-1,13254:-1 } Edited March 30, 2013 by Oxxy Quote Link to comment Share on other sites More sharing options...
Emistry Posted March 30, 2013 Share Posted March 30, 2013 you can do like this too - shop Sample_Shop -1,909:-1 - script Sample -1,{ OnInit: bindatcmd "sell",strnpcinfo(3)+"::OnAtCommand"; end; OnAtCommand: callshop "Sample_Shop",2; end; } Quote Link to comment Share on other sites More sharing options...
0 macmac88 Posted May 23, 2021 Share Posted May 23, 2021 On 3/30/2013 at 6:43 PM, Emistry said: you can do like this too - shop Sample_Shop -1,909:-1 - script Sample -1,{ OnInit: bindatcmd "sell",strnpcinfo(3)+"::OnAtCommand"; end; OnAtCommand: callshop "Sample_Shop",2; end; } where do i need to put this script? Quote Link to comment Share on other sites More sharing options...
Oxxy Posted March 29, 2013 Share Posted March 29, 2013 What does @sell do? Quote Link to comment Share on other sites More sharing options...
Vainglorious Posted March 29, 2013 Author Share Posted March 29, 2013 Oh forgot to mention... I wanted to let it open a vendor sell window, so if you would go to a vendor and use the "sell" option. For short, that you can sell items on the run! Thank you it worked out well! Quote Link to comment Share on other sites More sharing options...
Hello there, I searched the Forums and didn't find it yet - or was I to dumb? I don't know.
Since I managed to implement a @buy command I wanted to make one for @sell buuuut...
Currently I really don't have a clew how to do that....
Would anyone be willing to help me?
If you like i'll share the @buy command. haha
Thank you very much!
Regards, Vainglorious
Link to comment
Share on other sites