All right, I KNOW I'm going to have to switch to Lua eventually. The syntax is more or less the issue I'm going to have, being so used to VBscript.
The first thing I should switch over is my infobar script.
Quote: <triggers>
<trigger
custom_colour="17"
enabled="y"
group="InfoBarScript"
keep_evaluating="y"
match="^\<(.*)\%XTL\>$"
omit_from_output="y"
regexp="y"
repeat="y"
send_to="12"
other_text_colour="darkcyan"
>
<send>world.setvariable "EXPTOLEVEL", "%1"
world.setvariable "XPNEW", "%1"
dim EXPTICK, TICK, TICKERNEW, TICKERBLANK, EXPTOLEVEL, EXPFROMLEVEL, count
dim XPOLD, XPNEW, XPDIFF
XPOLD = CInt(world.getvariable ("XPOLD"))
XPNEW = CInt(world.getvariable ("XPNEW"))
XPDIFF = (XPOLD - XPNEW)
if XPDIFF < 0 then
XPDIFF = (XPDIFF + 100)
world.setvariable "XPOLD", XPNEW
world.setvariable "XPDIFF", XPDIFF
elseif XPDIFF > 0 then
world.setvariable "XPOLD", XPNEW
world.setvariable "XPDIFF", XPDIFF
end if
EXPTOLEVEL = CInt(world.getvariable ("EXPTOLEVEL"))
EXPFROMLEVEL = (100 - EXPTOLEVEL)
world.setvariable "EXPFROMLEVEL", EXPFROMLEVEL
TICKERNEW = "|"
TICKERBLANK = ""
TICK = "|"
EXPTICK = ""
for count = 1 to CInt(world.getvariable ("EXPFROMLEVEL"))
TICKERBLANK = (TICKERBLANK + TICKERNEW)
next
for count = 1 to CInt(world.getvariable ("EXPTOLEVEL"))
EXPTICK = (EXPTICK + TICK)
next
dim space
space = " "
world.infoclear
world.InfoBackground "black"
world.InfoFont "Arial", 12, 1
world.infocolour "white"
world.info "("
if CInt(world.getvariable ("aaHP")) < 100 then
world.info space
world.infocolour "white"
world.info world.getvariable ("aaHP") & "%"
else
world.infocolour "white"
world.info world.getvariable ("aaHP") & "%"
end if
world.infocolour "red"
world.info "HP"
world.infocolour "white"
world.info "|"
if CInt(world.getvariable("aaMana")) < 100 then
world.info space
world.info world.getvariable ("aaMana")
else
world.info world.getvariable ("aaMana")
end if
world.info "%"
world.infocolour "olive"
world.info "Mana"
world.infocolour "white"
world.info "|"
if CInt(world.getvariable ("aaMove")) < 100 then
world.info space
world.info world.getvariable ("aaMove")
else
world.info world.getvariable ("aaMove")
end if
world.info "%"
world.infocolour "darkcyan"
world.info "Move"
world.infocolour "white"
world.info ") ("
world.infocolour "lightgreen"
world.info world.getvariable ("aaHunger")
world.infocolour "white"
world.info ") "
world.info "XTL: ["
if CInt(world.getvariable ("EXPTOLEVEL")) < 5 then
world.InfoColour "red"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 10 then
world.InfoColour "lawngreen"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 20 then
world.InfoColour "green"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 30 then
world.InfoColour "darkorange"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 40 then
world.InfoColour "orange"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 50 then
world.InfoColour "goldenrod"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 60 then
world.InfoColour "gold"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 70 then
world.InfoColour "yellow"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 80 then
world.InfoColour "blue"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
elseif CInt(world.getvariable ("EXPTOLEVEL")) < 90 then
world.InfoColour "mediumblue"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
else
world.infocolour "darkblue"
world.InfoFont "Arial", 12, 0
world.info EXPTICK
end if
world.infocolour "dimgray"
world.info TICKERBLANK
world.InfoColour "white"
world.InfoFont "Arial", 12, 1
world.info "] ("
world.infocolour "yellow"
if CInt(world.getvariable ("EXPTOLEVEL")) < 100 then
world.info space
world.info world.getvariable ("EXPTOLEVEL")
else
world.info world.getvariable ("EXPTOLEVEL")
end if
world.infocolour "white"
world.info "%) Last ("
world.infocolour "yellow"
world.info world.getvariable ("XPDIFF")
world.infocolour "white"
world.info "%) Level: "
world.infocolour "yellow"
if world.getvariable ("level2") = "subhero" then
world.info world.getvariable ("Level")
else
world.infocolour "red"
world.info world.getvariable ("level2") & world.getvariable ("level")
end if
world.EnableGroup "SHighlight", 0</send>
</trigger>
<trigger
group="InfoBarScript"
ignore_case="y"
keep_evaluating="y"
match="^\<(.*)\%HP\|(.*)\%Mana\|(.*)\%Move\> \<(.*)\>$"
omit_from_output="y"
regexp="y"
repeat="y"
send_to="12"
sequence="1"
>
<send>world.setvariable "aaHP", "%1"
world.setvariable "aaMana", "%2"
world.setvariable "aaMove", "%3"
world.setvariable "aaHunger", "%4"
dim count, hunger
hunger= world.getvariable ("aaHunger")
if (hunger = "H") or (hunger = "T") or (hunger = "HT") then
for count = 1 to 2
world.sendimmediate "drink soup"
next
else
end if</send>
</trigger>
</triggers> |