Pet_Buff_Duration snippet
Posted: Mon Aug 15, 2005 3:00 am
This snippet of code is equivelent to ${Me.PetBuffDuration}. After the call you can get the result from the variable ${Macro.Return}
Hope it helps some.
Jon100
Hope it helps some.
Jon100
Code: Select all
Sub Pet_Buff_Duration(string buffname)
/if (${Me.PetBuff[${buffname}]}==0) /return 0
/declare buffslot int local 0
/declare tooltip string local
/declare buff_ticks int local 0
/varset buffslot ${Math.Calc[${Me.PetBuff[${buffname}]}-1]}
/varset tooltip ${Window[PetInfoWindow].Child[PIW_PetBuff${buffslot}_Button].Tooltip}
/varset tooltip ${tooltip.Right[6].Left[5]}
/varset buff_ticks ${Math.Calc[((${tooltip.Left[2]}*60)+${tooltip.Right[2]})/6]}
/return ${buff_ticks}