Jump to content
  • 0
ToiletMaster

Autoloot Disabled after 3 minutes

Question

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 ToiletMaster

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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?

Share this post


Link to post
Share on other sites
  • 0

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

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

 

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

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.