Code: Select all
#event casting "You begin casting"
Sub Main
/declare bufflist array
/declare targlist array
/declare timelist array
/declare lastspel global
/declare x global
/declare y global
/declare z global
:loop
/for x 0 to 20
/if @timelist(@x)!="UNDEFINED-ARRAY-ELEMENT" /if n @timelist(@x)<$calc($time(h)*3600+$time(m)*60+$time(s)) {
/echo .x( @bufflist(@x) is fading on @targlist(@x) )x.
/varset timelist(@x) UNDEFINED-ARRAY-ELEMENT
}
/doevents
/next x
/goto :loop
/return
Sub Event_casting
/varset y "$mid(18,$int($calc($strlen("@Param0")-19)),"@Param0")"
/varset lastspel "@y"
/if n $spell("@y",duration)<30 {
/return
}
/if $target(type)=="player" {
/echo tracking @y on $target(name)
/for z 0 to 20
/if @timelist(@z)=="UNDEFINED-ARRAY-ELEMENT" {
/varset bufflist(@z) "@y"
/varset targlist(@z) $target(name)
/varset timelist(@z) $calc($spell("@y",duration)+$calc($time(h)*3600+$time(m)*60+$time(s)-10))
/return
}
/next z
/echo BUFFLIST IS FULL
}
/return
