Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial COOLDOWNS explanation and examples.
05-02-2017, 08:00 PM (This post was last modified: 05-03-2017 12:39 AM by Catar.)
Post: #1
COOLDOWNS explanation and examples.
Cooldowns is a new feature/command for macros.

It allows doing very time specific and more advanced macros with it.

Here they are
Code:
Cooldown.Create(CooldownName, Delay)
Cooldown.Clear(CooldownName)
Cooldown.Rest(CooldownName)
Cooldown.Blocked(CooldownName)
Cooldown.UnBlocked(CooldownName)

Lets start with explanation.

Cooldown.Create(CooldownName, Delay)
this command creates cooldown with specified name, starts COUNTING down to ZERO from the time we specified in milliseconds.
f.e.
Cooldown.Create(ADVERTISE, 600000)
Creates Cooldown named ADVERTISE that counts down from 1 minute to 0.

Cooldown.Clear(CooldownName)
This command RESETS cooldown to 0 with given name.

Cooldown.Rest(CooldownName)
This command will return value of remaining miliseconds of given cooldown (or 0 if inactive)

Cooldown.Blocked(CooldownName)
Cooldown.UnBlocked(CooldownName)


These two commands basically do the same thing but in contrary.
Lets say we activated our cooldown ADVERTISE with first command and its counting down.
Therefore
Cooldown.Blocked(ADVERTISE) will return result 1
Cooldown.UnBlocked(ADVERTISE) will return result 0
But when our cooldown ADVERTISE is inactive results would be swapped.


So here is easiest example of use i can think of.

We make macro to YELL a message once every minute.


Code:
1000 {advert}
Cooldown.Blocked(ADVERTISE)==0
Self.Yell(SELL XXXXX for 123456, pm me)
Cooldown.Create(ADVERTISE, 600000)


But there is much more use for cooldowns than simple message spamming.
I took it to the next level, as u can see on my latest LURE MACRO

But what is also very interesting, that as a NAME of cooldown we can use a VARIABLE,
for example ID of our Target.

Here is example of manual macro for advanced attack that you can use 'utori kor'
bleeding spell on anything you target once every time cooldown is finished.
Very useful on OTS where Inflict Wound short, or no exhaust
to use against INVISIBLE targets like warlocks or Warzone monsters.

Utori KOR (manual)
0 {Utori KOR} Cooldown.Blocked(KOR:TargetID)==0 Self.Say(utori kor) Cooldown.Create(KOR:TargetID, 59000) exit()


[Image: bOarP6j.png][Image: KQqaWR2.png]


Post your ideas for cooldown use in here
Give Reputation to this user

Before you PM me, READ THIS [Image: KHCf9l2.png]

[Image: naLmyGH.png]

My Scripts, Macros and Tutorials
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)