mIRC Homepage

random expire set %var

Posted By: Stephen

random expire set %var - 03/01/20 05:18 AM

Is there a way to do a random /set -u expire?

I have tried doing

set %doortimer $rand(120,240)
{ set -u $+ %doortimer %door. bla bla bla }
and
{ set -u $+ $rand(120,240) %door. bla bla bla }

Both error out /set: invalid parameters

Is this even possible? or am I barking up the wrong tree.

This is part of a revolving door in and out of channel script I am working on where if they leave before %door (which is set to $wildsite) has expired it will ban them. But I am seeing that people are learning that right now its a 2 minute time limit, so I want to throw a random generated -u to make it harder to detect a pattern.
Posted By: maroon

Re: random expire set %var - 03/01/20 06:37 AM

The 's' switch is for demo only. You can do like so:

//set $+(-su,$rand(5,9)) %testu foo

Or, if it's helpful to have the variable contain the time remaining in the cooldown:

//set -sz %testz $rand(5,9)
© 2020 mIRC Discussion Forums