I've been searching around but haven't been able to find anything in reference to an idea I would like to try in my waypoint file.
Right now, in my KS farming waypoint, I have it waiting for a random amount of time (player:restrnd) before entering combat with a boss so that my Arrow of Essence (5 minute cooldown) is ready before I continue. The time varies greatly due to how quickly the previous boss was killed and how long it takes to get to the next boss. Is there a command I can use that will make my character wait at a specific waypoint until a cooldown has ended?
Such as
if skill_cooldown == 0 then
player:findTarget("Goddess of Art's Disciple");
thanks in advance
Wait for cooldown
Re: Wait for cooldown
Probably the easiest way would be to use the ingame function GetSkillCooldown.
And then rest the remaining time.
Code: Select all
local cooldown, remaining = RoMScript("GetSkillCooldown(4,1)")- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Wait for cooldown
Wow, ok, didn't expect such a quick reply. I'll have to try this tomorrow, getting ready to sleep for work tomorrow. Thanks Rock 
Scout/Knight/Rogue 70/66/66
Re: Wait for cooldown
Well, I couldn't figure out how to make it rest the remaining time so this is what I did:
**EDIT**
changed code to:
**EDIT #2**
Scratch that last code change.... It doesn't come out of the loop.
Code: Select all
<!-- #125 --><waypoint x="2365" z="4909" y="340">
local cooldown, remaining = RoMScript("GetSkillCooldown(4,1);")
if remaining > 1 then
__WPL:setWaypointIndex(125);
else
__WPL:setWaypointIndex(126);
end;
</waypoint>
changed code to:
Code: Select all
local cooldown, remaining = RoMScript("GetSkillCooldown(4,1);")
while remaining > 1 do
player:restrnd(101, 5, 10);
end;
Scratch that last code change.... It doesn't come out of the loop.
Scout/Knight/Rogue 70/66/66
Re: Wait for cooldown
I would have just done
Code: Select all
player:rest(remaining)- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Re: Wait for cooldown
Once again, you have my gratitude Rock.
See, I didn't know that was even possible. I'm completely new to this scripting. All I know is the information I can find floating around and much of what can be done is not documented, or at least not easily searchable. The examples given for most commands are pretty vague and rely on people knowing how to script in the first place. I rely mainly on scripts I can find and reverse engineer. But since most people do not share any scripts of worth, even that avenue of learning is severely lacking.
See, I didn't know that was even possible. I'm completely new to this scripting. All I know is the information I can find floating around and much of what can be done is not documented, or at least not easily searchable. The examples given for most commands are pretty vague and rely on people knowing how to script in the first place. I rely mainly on scripts I can find and reverse engineer. But since most people do not share any scripts of worth, even that avenue of learning is severely lacking.
Scout/Knight/Rogue 70/66/66