Samuel 83 Posted October 31, 2013 File Name: @autobuyammo File Submitter: Samuel File Submitted: 31 Oct 2013 File Category: Plugins Hi guys! Just converted Goddameit's @autobuyammo This files includes the plugin + script for the bind command (will try to make it a real command soon) How does it works? Just activate the command and when your ammo is depleted it will be replenished with the same ammo by 10s as long as you have zeny Have fun and God bless! Click here to download this file Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted November 8, 2013 (edited) Im successful recompile and the plugins works. Then I go to buy some arrow. I load the @autobuyammo command and then I go buy some arrow. 10 arrows. I going to hit some poring and kewl its auto buy my 10 arrow. After that i disable @autobuyammo command, and then relog, after that I load the @autobuyammo command and then go buy some arrow. this times I purchase 20 arrow. I going to kill poring but its auto buy 10 arrows. Its like the previous one. Is that a bugs ? Edited November 8, 2013 by mrlongshen Quote Share this post Link to post Share on other sites
orange 4 Posted November 13, 2013 How does it works? Just activate the command and when your ammo is depleted it will be replenished with the same ammo by 10s as long as you have zeny Have fun and God bless its not bug. its been made that way. Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted November 13, 2013 i dont understand T_T Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted November 13, 2013 i dont understand T_T why? Please note How does it works? Just activate the command and when your ammo is depleted it will be replenished with the same ammo by 10s as long as you have zeny Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted November 13, 2013 but i have change to buy 1000 the item ! Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted November 14, 2013 change where? you must change it in autobuyammo.c Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted November 14, 2013 its not when buying the item ? i puchase 1000 arrow and then the plugin will also buy 1000 arrow too ? Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted November 14, 2013 I think in source, the default item to buy is 10pcs, meaning you need to edit the source change 10 to 1000 then recompile.. Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted November 14, 2013 I think in source, the default item to buy is 10pcs, meaning you need to edit the source change 10 to 1000 then recompile.. can it be done on the plugin ? Quote Share this post Link to post Share on other sites
Mhalicot 392 Posted November 14, 2013 yes edit autobuyammo.c Quote Share this post Link to post Share on other sites
mrlongshen 22 Posted December 4, 2013 please update it Quote Share this post Link to post Share on other sites
KohakuSan 1 Posted December 14, 2014 Not working. Everything went fine with compiling and command says it's ON but it doesn't buy the arrows when empty. Yes I added the npc script. Quote Share this post Link to post Share on other sites
sever 0 Posted December 15, 2014 Not working. Everything went fine with compiling and command says it's ON but it doesn't buy the arrows when empty. Yes I added the npc script. it should be working. you must have an ammunition equipped and player session variable set (non-zero) should be @SP_AUTOBUYAMMO_GODD: if((sd->equip_index[EQI_AMMO]>=0) && ( pc->readreg(sd,script->add_str("@SP_AUTOBUYAMMO_GODD")) )) and it triggers when your ammunition amount is going to be zero(last arrow left during shooting) or ??!zero??(sd->equip_index[EQI_AMMO]>=0): if( amount <= 1 ) you must have (arrow/bullet/ammo cost + 5) * 10 pcs zenny: unsigned int nzeny = ( i_data->value_buy + 5 )*10; if( !pc->payzeny(sd, nzeny, LOG_TYPE_NONE, NULL) ) it would only buy 9 ((ammo price + 5) * 10 pcs > 9pcs): flag = pc->additem(sd, &it, 9, LOG_TYPE_NONE); after you've shot your last ammo, the plugin would autobuy you 9 arrows and also if its included in conf/plugins.conf (with compiled .so file, product of gcc or included in src/plugin/Makefile.in) Quote Share this post Link to post Share on other sites
KohakuSan 1 Posted December 16, 2014 Yes it's added on plugins.conf and the .so file was created in the plugin folder. Again, no errors whatsoever, it just simply doesn't do anything when I'm out of arrows. Tried remaking the plugin, same results, still no errors. Quote Share this post Link to post Share on other sites