Random Timer [Request Fulfilled]

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Gengis
a ghoul
a ghoul
Posts: 116
Joined: Wed Aug 14, 2002 7:46 pm

Random Timer [Request Fulfilled]

Post by Gengis » Tue Sep 17, 2002 1:01 am

I would like to add a random timer into one of my macro's to cast a spell at random times.

I guess it would be like /varset t0 random 10m 15m

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Re: Random Timer

Post by DeathSpiral » Tue Sep 17, 2002 2:40 am

Gengis wrote:I would like to add a random timer into one of my macro's to cast a spell at random times.

I guess it would be like /varset t0 random 10m 15m
Actually, I think what you'd really want is something more along these lines...

Code: Select all

|Defined values are in minutes
#define MaxRange 5
#define MinTime 10

/varcalc t0 MinTime*60+$rand($calc(MaxRange*60))
That will pick a time thats at least 10 minutes and no more than 15. I don't use timers at the moment (delays seem to muck up timers something awful...) so I don't know if timer-time is in seconds or 10ths of seconds. If its in 10ths of seconds, just change the 60's to 600's. =)
I am orc pawn, hear me yell for centurians...