Converted bufftime macro..
Posted: Sun May 02, 2004 4:48 pm
Edit: Cant pass it a parameter yet, but /mac bufftime works fine.
Code: Select all
| Buffs.mac
| List the buffs you have and the time left on them
#Turbo
Sub Main
/declare time_sec local
/declare time_min local
/declare time_hou local
/declare i int local
/for i 1 to 15
/if (${Me.Buff[${i}].ID}) {
/if (${Defined[Param0]}) /if (!${Me.Buff[${i}].Name.Equal[${Param0}]}) /next i
/varset time_sec ${Math.Calc[${Me.Buff[${i}].Duration}*6]}
/varset time_hou ${Math.Calc[${time_sec}\3600]}
/varset time_min ${Math.Calc[${time_sec}%3600\60]}
/varset time_sec ${Math.Calc[${time_sec}%60]}
/echo ${Me.Buff[${i}].Name} (Level ${Me.Buff[${i}].Level} ${time_hou} hrs ${time_min} mins ${time_sec} secs remaining
}
/next i
/return