Page 1 of 1
Question about Buff durations
Posted: Tue Jul 16, 2013 12:29 pm
by AngelDrago
Hello, Everyone
I have a question about buff/debuffs durations in a WP let say i would use MAGE_ELECTROSTATIC_CHARGE and has a duration of 1 minute and i want it to cast again... but i have a few seconds to go is their a check and a wait command that i need to add in my WP. thx for the help
Re: Question about Buff durations
Posted: Tue Jul 16, 2013 12:51 pm
by rock5
I'm not sure what you are talking about with waypoints but you can set the buff to be reapplied early by adding
to the skill in your profile. That example would cast it even if there are still 10s left.
Re: Question about Buff durations
Posted: Tue Jul 16, 2013 1:48 pm
by AngelDrago
thx... for the input... here is what i'm trying to do...
Code: Select all
<!-- WAYPOINT USE PREMIDITATION BEFORE BOSS -->
<!-- # 8 --> <waypoint x="-192" z="-1041" y="1254"> player:cast("MAGE_ELECTROSTATIC_CHARGE") RoMScript("SetTitleRequest(530724)"); Countround() Acountround() yrest(300) </waypoint>
<!-- WAYPOINT AFTER BOSS -->
once i'm near the boss i wanted to recast MAGE_ELECTROSTATIC_CHARGE but if it already cast it will fail so i was wondering if that was a check if it still active or in a cooldown.
Re: Question about Buff durations
Posted: Tue Jul 16, 2013 2:56 pm
by rock5
Ah, so you want to wait for the cooldown?
To see if it's active you can just check the buff
Code: Select all
if player:hasBuff("Electrostatic Charge") then
If you want to know how much time is left on the buff you would need to do a "player:getBuff(buffname)" instead.
Code: Select all
local buff = player:getBuff("Electrostatic Charge")
if buff and 15 > buff.TimeLeft then
There is a function for returning the remaining cooldown but you have to find the skill first.
Code: Select all
for k,v in pairs(settings.profile.skills) do
if v.Name=="MAGE_ELECTROSTATIC_CHARGE" then
local timeleft = v:getRemainingCooldown()
if timeleft > 0 then yrest(timeleft*1000) -- wait for the cooldown to end
break
end
end
I don't know exactly how you want it to run but hopefully that will give you enough information to work it out.
Re: Question about Buff durations
Posted: Tue Jul 16, 2013 3:14 pm
by AngelDrago
great thank you... will try to figured out. thx again for the help