Lord Ganja 5 Posted April 14, 2015 Is it possible for players to automatically use @autotrade command right after clicking the 'OK' button when vending? Check this image for further explanation. Thanks in advance! Quote Share this post Link to post Share on other sites
0 malufett 247 Posted April 14, 2015 @vending.c safestrncpy(sd->message, message, MESSAGE_SIZE);clif->openvending(sd,sd->bl.id,sd->vending);clif->showvendingboard(&sd->bl,message,0);+atcommand->exec(sd->fd, sd, "@autotrade", true);idb_put(vending->db, sd->status.char_id, sd);} 1 Lord Ganja reacted to this Quote Share this post Link to post Share on other sites
0 karazu 33 Posted April 14, 2015 Is it possible for players to automatically use @autotrade command right after clicking the 'OK' button when vending? Check this image for further explanation. img1.png img2.png Thanks in advance! Its a good IDEA, just make it sure that u will not make a mistake in pricing after clicking the OK button or else u dont have time anymore in re checking it.. Quote Share this post Link to post Share on other sites
0 Lord Ganja 5 Posted April 15, 2015 @vending.c safestrncpy(sd->message, message, MESSAGE_SIZE);clif->openvending(sd,sd->bl.id,sd->vending);clif->showvendingboard(&sd->bl,message,0);+atcommand->exec(sd->fd, sd, "@autotrade", true);idb_put(vending->db, sd->status.char_id, sd);} Thank you @@malufett. it's working! btw as @@karazu mentioned, Its a good IDEA, just make it sure that u will not make a mistake in pricing after clicking the OK button or else u dont have time anymore in re checking it.. can you make it like trigger a script so we could add a timer before it use @autotrade? clif->showvendingboard(&sd->bl,message,0);+atcommand->exec(sd->fd, sd, "@autotrade", true); // CHANGE THIS ONE TO A CODE THAT WILL TRIGGER A SCRIPTidb_put(vending->db, sd->status.char_id, sd); the script is like: - script auto_autotrade -1,{attachnpctimer ""+strcharinfo(0)+"";initnpctimer;// Added this so the vendor will have 10 seconds to recheck the vended items before it goes to autotrade modeOnTimer10000; atcommand "@autotrade"; end; } Quote Share this post Link to post Share on other sites
0 malufett 247 Posted April 15, 2015 nah..you don't need that you can set it at 'conf/battle/misc.conf' // Set this to the amount of minutes autotrade chars will be kicked from the server.at_timeout: 0 Quote Share this post Link to post Share on other sites
0 Lord Ganja 5 Posted April 15, 2015 nah..you don't need that you can set it at 'conf/battle/misc.conf' // Set this to the amount of minutes autotrade chars will be kicked from the server.at_timeout: 0 Oh, I mean, like the script will be triggered before it enters autotrade mode.. at_timeout works like, vendors which are already in autotrade mode will be kicked from server. Quote Share this post Link to post Share on other sites
0 malufett 247 Posted April 15, 2015 you can use 'bindatcmd' Quote Share this post Link to post Share on other sites
0 Lord Ganja 5 Posted April 15, 2015 you can use 'bindatcmd' Damn. Yeah. Haven't think of that anyway last question, what do I have to change with atcommand->exec to trigger the bindatcmd? I use this: OnInit: bindatcmd("vendcheck","vend_check::OnVendCheck",100,100); but when atcommand->exec(sd->fd, sd, "@vendcheck", true); is triggered, it says "@vendcheck is Unknown Command." Quote Share this post Link to post Share on other sites
0 mrlongshen 22 Posted April 15, 2015 @@karazu I agree with you. Quote Share this post Link to post Share on other sites
Is it possible for players to automatically use @autotrade command right after clicking the 'OK' button when vending?
Check this image for further explanation.
Thanks in advance!
Share this post
Link to post
Share on other sites