The script>
sub OnPluginInstall
dim Icnm, Ico, Tms, FTms, Colors, IcDrops,Adj,Ada
Icnm = "WofW_Up,HB_Up,MB_Up,Clock_Up,Godspeed_Up,Godshield_Up,AoR_Up,Inpiration_Up,SG_Up"
Icnm = Icnm + ",Soulight_Up"
Ico = "Ww,Hb,Mb,Bc,Sp,Sh,Ar,In,Sg,Sl"
Tms = "-21,-21,-21,-21,-21,-21,-21,-21,-21,-21" 'Start Disabled.
FTms = "1450,1750,1790,580,680,1140,900,1,1,620"
Adj = FTms
Ada = "0,3,3,0,0,0,0,0,0,0"
Colors = "#007ffe,#00b2fe,#00e9fe,#00fee0,#00feae" ' Colors by 5% (Blues)
Colors = Colors & ",#00fe77,#00fe44,#00fe11,#26fe00,#59fe00" '(Greens)
Colors = Colors & ",#90fe00,#c3fe00,#fafe00,#fecf00,#fe9d00" '(Yellow-Orange)
Colors = Colors & ",#fe6600,#fe3300,#fe0000,#be4545,#881818" '(Red)
IcDrops = "Word_of_Wisdom,Health_Bless,Mind_Bless,Body_Clock,Godspeed"
IcDrops = IcDrops & ",Godshield,AoR,Inspiration,Guardian,Soullight"
world.setvariable "Icnm",Icnm
world.setvariable "Ico",Ico
dim Test,Test2
Test = split(world.getvariable("Tms"),",")
Test2 = split(Tms,",")
if world.getvariable("Tms") = "" or ubound(Test2) <> ubound(Test) then
world.setvariable "Tms",Tms
end if
world.setvariable "FTms",Ftms
world.setvariable "Colors",Colors
world.setvariable "IcDrops",IcDrops
world.setvariable "Adj",Adj
world.setvariable "Ada",Ada
end sub
function OnPluginCommand (sText)
world.setvariable "LCTime", Now
OnPluginCommand = vbTrue
end function
sub IconToggle (name, output, wildcards)
dim Flag
Flag = ucase(wildcards(1))
if Flag = "RESET" then
dim Tms
Tms = split(world.getvariable("Tms"),",")
dim count
for count = 0 to ubound(Tms)
Tms(count) = -21
next
world.setvariable "Tms", join(Tms,",")
world.note "Icon counters reset!"
end if
if Flag = "ON" then
world.enabletimer "ShowThem",1
world.note "Icons will now display!"
end if
if Flag = "OFF" then
world.enabletimer "ShowThem",0
world.note "Icons Off!"
end if
end sub
sub IconDec (name)
dim Adj 'Adjusted times.
Adj = split(world.getvariable("Adj"),",")
dim Ico ' List of icons to display.
dim Tms ' Current times.
dim Colors
Colors = split(world.getvariable("Colors"),",")
Ico = split(world.getvariable("Ico"),",")
Tms = split(world.getvariable("Tms"),",")
dim count
for count = 0 to ubound(Ico)
Tms(count) = int(Tms(count)) + 2
if int(Tms(count)) >= Adj(count) then
Tms(count) = Adj(count)
end if
if Tms(count) < 0 then 'Make sure it stays gray.
Tms(count) = -21
end if
next
world.setvariable "Tms", join(Tms,",")
end sub
sub ShowThem (name)
if abs(DateDiff("n",world.getvariable("LCTime"),Now)) < 5 then
call DisplayIt
end if
end sub
sub ResetTmr (name, output, wildcards)
dim Icnm ' Names.
dim Tms ' Current times.
dim Ada
Ada = split(world.getvariable("Ada"),",")
Icnm = split(world.getvariable("Icnm"),",")
Tms = split(world.getvariable("Tms"),",")
dim count,test
test = 0
for count = 0 to ubound(Icnm)
if Icnm(count) = name then
Tms(count) = 0
if ada(count) > 0 then
test = 1
end if
end if
next
world.setvariable "Tms", join(Tms,",")
if test then
world.enabletrigger "CatchStat", 1
world.send "stats"
end if
end sub
sub IcoDrops (name, output, wildcards)
dim IcDrops
dim Tms ' Current times.
IcDrops = split(world.getvariable("IcDrops"),",")
Tms = split(world.getvariable("Tms"),",")
dim count
for count = 0 to ubound(IcDrops)
if IcDrops(count) = name then
Tms(count) = -21
end if
next
world.setvariable "Tms", join(Tms,",")
call DisplayIt
end sub
sub DisplayIt ()
dim Adj
dim Tms ' Current times.
dim Ico ' List of icons to display.
dim Colors
Adj = split(world.getvariable("Adj"),",")
Colors = split(world.getvariable("Colors"),",")
Tms = split(world.getvariable("Tms"),",")
Ico = split(world.getvariable("Ico"),",")
world.colourtell "#FFFFFF","#00","["
dim count
for count = 0 to ubound(Ico)
if Tms(count) < 0 then
world.colourtell "#808080","#00",Ico(count)
else
dim cl,Ft
Ft = Adj(count)
cl = Tms(count) / Ft
cl = int(cl * 19)
if cl > 19 then
cl = 19
end if
world.colourtell Colors(cl),"#00",Ico(count)
end if
if count < ubound(Ico) then
world.colourtell "#FFFFFF","#00","-"
end if
next
world.colournote "#FFFFFF","#00","]"
end sub
sub MakeAdj (name, output, wildcards)
dim Adj
dim FTms
dim Ada
Adj = split(world.getvariable("Adj"),",")
Ftms = split(world.getvariable("FTms"),",")
Ada = split(world.getvariable("Ada"),",")
world.enabletrigger "CatchStat", 0
dim ABase, Temp
ABase = 133
Temp = int(wildcards(1))
Temp = Temp - ABase
dim count,ttime,tad
for count = 0 to ubound(Adj)
ttime = Ftms(count)
tad = Ada(count)
Adj(count) = ttime + (Temp * tad)
next
world.setvariable "Adj", join(Adj,",")
call DisplayIt
end sub
|