It was posted in the macro depot a long time ago but unfortunately i have no idea how to convert it.
Its quite a short macro so hopefully someone here should find it quite simple to update, thanks for any help :)
Code: Select all
| Buffs.mac
| Only list the buffs you have and the time left on them
| this is a edit of a non working Buff counter I found on the formus
| i have tested it and it even works with Sommon horse
#Define CTimeTick v12
#Define CTimeTotSec v13
#Define CTimeHour v15
#Define CTimeMin v14
#Define CTimeSec v16
#Define Temp v17
#Turbo
sub MAIN
/for p1 1 to 15
/varset CTimeHour 0
/varset CTimeMin 0
/varset CTimeTotSec 0
/varset CTimeSec 0
/varset Temp 0
/varset CTimeTick $char(buff,$p1,duration)
/varcalc CTimeTotSec $int($CTimeTick*6)
/varcalc CTimeHour $int($CTimeTotSec/3600)
/varcalc Temp $CTimeHour*3600
/varsub CTimeTotSec $Temp
/varcalc CTimeMin $int($CTimeTotSec/60)
/varcalc Temp $CTimeMin*60
/varsub CTimeTotSec $Temp
/varcalc CTimeSec $CTimeTotSec
/if n $CTimeTick>=1 /echo Buff $p1 has $CTimeHour h $CTimeMin m $CTimeSec s remaining.
/next p1
/return