WhiteEagle Posted May 20, 2020 Posted May 20, 2020 Can someone please set this up so that autoloot only works on items from 100% to 1% and everything below 1% is dropped? Many thanks in advance Quote
0 Start_ Posted May 21, 2020 Posted May 21, 2020 Quote @autoloot {<%>} Enables or disables autolooting items from killed mobs. If a percentage is given, only items dropped at that rate and below will be autolooted. If you want to force players to cap % > Use bindatcommand to trigger autoloot again and don't allow player to use normal autoloot. Quote
0 WhiteEagle Posted May 21, 2020 Author Posted May 21, 2020 No that's not what I want. Autoloot works atm like: @autoloot 1% and all items are automatically lootet with a drop chance 1% or below. I want a change that @autoloot 1% loot all items with a drop chance 1% and ABOVE. All items less then 1% drop change are droped. Quote
0 Haruka Mayumi Posted May 21, 2020 Posted May 21, 2020 i think you are asking for a reverse autoloot. Quote
0 Patskie Posted May 27, 2020 Posted May 27, 2020 Change this From && (drop_rate <= sd->state.autoloot || pc_isautolooting(sd, ditem->item_data.nameid)) To && (drop_rate >= sd->state.autoloot || pc_isautolooting(sd, ditem->item_data.nameid)) Quote
0 WhiteEagle Posted May 27, 2020 Author Posted May 27, 2020 @Patskie Thanks I now have the problem that you can make @autoloot 0.5 etc. and have less than 1% drop chance, how can I change this? I tried to set rate = 0 to 100, but then I don't get autoloot turned off because I can't set autoloot 0 or off. ACMD_FUNC(autoloot) { int rate; nullpo_retr(-1, sd); // autoloot command without value if(!message || !*message) { if (sd->state.autoloot) rate = 0; else rate = 10000; } else { double drate; drate = atof(message); rate = (int)(drate*100); } if (rate < 0) rate = 0; if (rate > 10000) rate = 10000; sd->state.autoloot = rate; if (sd->state.autoloot) { snprintf(atcmd_output, sizeof atcmd_output, msg_txt(sd,1187),((double)sd->state.autoloot)/100.); // Autolooting items with drop rates of %0.02f%% and below. clif_displaymessage(fd, atcmd_output); }else clif_displaymessage(fd, msg_txt(sd,1188)); // Autoloot is now off. return 0; } Quote
Question
WhiteEagle
Can someone please set this up so that autoloot only works on items from 100% to 1% and everything below 1% is dropped?
Many thanks in advance
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.