ToiletMaster 3 Posted August 9, 2013 (edited) Hi there, I would like to request for a script that disabled autoloot in specific maps after 3 minutes of idling. Would it be possible to have this? Thanks! Edited August 9, 2013 by ToiletMaster Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted September 1, 2013 LoL it's true, sorry for not realizing that! But the user will be notified anyways. Maybe if you don't want it to be notified you can perform a minor src edit to @autoloot so that if some parameter is given (for example notifyoff) the message of the autoloot change isn't sent to the client. Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted August 9, 2013 Isn't the idle_no_share config in conf/battle/party.conf enough? But that works on all maps... Quote Share this post Link to post Share on other sites
0 ToiletMaster 3 Posted August 10, 2013 Isn't the idle_no_share config in conf/battle/party.conf enough? But that works on all maps... I would prefer it having on all maps except cities lol, if that's possible of course ._. but idle_no_share works with @autoloot? Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted August 11, 2013 idle_no_share works both with party shared exp and drops (autolooted or not). I think this won't work on AFKchemists but a source mod could do wonders about this last point. Usually, if you're AFK you can't manage to kill monsters lol Quote Share this post Link to post Share on other sites
0 ToiletMaster 3 Posted August 11, 2013 idle_no_share works both with party shared exp and drops (autolooted or not). I think this won't work on AFKchemists but a source mod could do wonders about this last point. Usually, if you're AFK you can't manage to kill monsters lol Thanks for the reply, but trust me, the player's will work wonders on this lol, example loli ruri card, orc lord card, and many other cards that are able to deflect damage. they just pump max int and leave their character there. That's why I'm kind of looking for a solution to solve that lol. Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted August 11, 2013 Hmmm... Then, if idle_no_share doesn't work (I can't test it ATM since I'm on my cellphone) I can only think about trying to make a script that, when inactive (use checkidle() script command) gives them an unlimited time negative (or 0, IDK) bubble gum effect (SC_CASH_RECEIVEITEM) for negating any item drops that gets removed when the user is no longer idle or logs out. What I don't know is if autocasted skills remove the idle time check (in that case you could just see if player's position changes). In any case I'd recommend a source mod rather than a script but here's a sample script with the assumption autocasted skills don't remove your idle status if you want to keep with this anyways (put this inside a NPC and add the tabs since Mobile UI ignores tabs): - script noafk -1,{OnInit:set .afktime, 3*60; // 3 minutes in SECONDSset .sampletime, 5*1000; // 5 seconds in milliseconds, make it higher if this causes your server freezeend;OnPCLoginEvent:sleep2 (.afktime * 1000) - .sampletime + 10; // Delaying the first check until player can actually be AFK plus a little threshold, you could safely remove this line but saves you some processingaddtimer .sampletime,strnpcinfo(3)+"::OnCheckAFK";end;OnCheckAFK:deltimer strnpcinfo(3)+"::OnCheckAFK";if (checkidle() >= .afktime && ! @idle) {set @idle, 1;sc_start SC_CASH_RECEIVEITEM, -1, 0; // Rates x0 for this guy}else if (checkidle() <= .afktime && @idle) {set @idle, 0; // Removing idle penalty for this guysc_end SC_CASH_RECEIVEITEM;}addtimer .sampletime,strnpcinfo(3)+"::OnCheckAFK";end;} Can't test it for obvious reasons so try it yourself (after adding proper tabs) and give me the feedback. 1 ToiletMaster reacted to this Quote Share this post Link to post Share on other sites
0 ToiletMaster 3 Posted August 24, 2013 Hmmm... Then, if idle_no_share doesn't work (I can't test it ATM since I'm on my cellphone) I can only think about trying to make a script that, when inactive (use checkidle() script command) gives them an unlimited time negative (or 0, IDK) bubble gum effect (SC_CASH_RECEIVEITEM) for negating any item drops that gets removed when the user is no longer idle or logs out. What I don't know is if autocasted skills remove the idle time check (in that case you could just see if player's position changes). In any case I'd recommend a source mod rather than a script but here's a sample script with the assumption autocasted skills don't remove your idle status if you want to keep with this anyways (put this inside a NPC and add the tabs since Mobile UI ignores tabs): - script noafk -1,{OnInit:set .afktime, 3*60; // 3 minutes in SECONDSset .sampletime, 5*1000; // 5 seconds in milliseconds, make it higher if this causes your server freezeend;OnPCLoginEvent:sleep2 (.afktime * 1000) - .sampletime + 10; // Delaying the first check until player can actually be AFK plus a little threshold, you could safely remove this line but saves you some processingaddtimer .sampletime,strnpcinfo(3)+"::OnCheckAFK";end;OnCheckAFK:deltimer strnpcinfo(3)+"::OnCheckAFK";if (checkidle() >= .afktime && ! @idle) {set @idle, 1;sc_start SC_CASH_RECEIVEITEM, -1, 0; // Rates x0 for this guy}else if (checkidle() <= .afktime && @idle) {set @idle, 0; // Removing idle penalty for this guysc_end SC_CASH_RECEIVEITEM;}addtimer .sampletime,strnpcinfo(3)+"::OnCheckAFK";end;} Can't test it for obvious reasons so try it yourself (after adding proper tabs) and give me the feedback. extremely sorry for the late reply =_= I thought I've replied already but apparently my internet got cut off i guess which din't make the reply go through. Anyway, I've tested it, but upon afking, I see the sc_start sc_cash_receiveitem? Meaning upon afking i get more drop rate? Should be disabling the autoloot instead of providing the bonus haha Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted August 25, 2013 It's supposed that SC_CASH_RECEIVEITEM gives a "bonus" that multiplies drop rate by the number you entered divided by 100 (it is, if you give an SC_CASH_RECEIVEITEM with 200 you get twice as much item drops; if you give 150 you get one and a half as much), so I just followed the simple idea that if you give that status with a parameter 0 it'll multiply all drops by zero, thus negating all drops. As I said I (still have) no means of testing that script (so I don't even know if it works) but I highly reccommend a source mod for that since you can modify wherever you want. Quote Share this post Link to post Share on other sites
0 ToiletMaster 3 Posted September 1, 2013 It's supposed that SC_CASH_RECEIVEITEM gives a "bonus" that multiplies drop rate by the number you entered divided by 100 (it is, if you give an SC_CASH_RECEIVEITEM with 200 you get twice as much item drops; if you give 150 you get one and a half as much), so I just followed the simple idea that if you give that status with a parameter 0 it'll multiply all drops by zero, thus negating all drops. As I said I (still have) no means of testing that script (so I don't even know if it works) but I highly reccommend a source mod for that since you can modify wherever you want. You did give me an idea on this part though, I changed the configuration to provide @autoloot 0 that disables the autoloot regardless so it works in the end as well xD Thanks again! Quote Share this post Link to post Share on other sites
0 ToiletMaster 3 Posted September 2, 2013 Nope it's fine hahahaha Thanks again for every jabote! Couldn't have done this without ya xD But i definitely want the user to be notified haha so this is marked as solved xD Thanks! Quote Share this post Link to post Share on other sites
Hi there, I would like to request for a script that disabled autoloot in specific maps after 3 minutes of idling.
Would it be possible to have this?
Thanks!
Edited by ToiletMasterShare this post
Link to post
Share on other sites