Hi there,
Got a bit of a problem. I'm trying to make a trigger to show experience gain/loss in RetroMUD. the status bar ingame, which shows after each time you enter a command or simply hit enter, shows in the format:
Hp: 584/584 Sp: 1223/1223 Ep: 280/280 Gold: 212 Exp: 1166950 >
/world.debug "triggers" shows:
{{Hp: * Sp: * Ep: * Gold: * Exp: * >}}={{%5}} label=iworldexp script=expgained colour=1 send_to:variable seq:100
and the expgained script is:
sub expgained (thename, theoutput, thewildcards)
dim iNewexp
dim iOldexp
dim iDiff
iOldExp=world.GetVariable("ioldexp")
iNewExp=world.GetVariable("iworldexp")
if iNewexp > iOldexp then
iDiff=iNewexp-iOldexp
world.note "Exp gained : " & cstr (iDiff)
end if
if iNewexp < iOldexp then
iDiff=iOldexp-iNewexp
world.note "Exp lost : " & cstr (iDiff)
end if
if iNewexp=iOldexp then
world.note "No exp change"
end if
World.SetVariable "ioldexp", iNewexp
end sub
/world.debug "variables" :
iworldexp = 1166950
ioldexp = 1166950
Can anyone see what I'm missing? It just doesn't want to work :(
Thanks!
Got a bit of a problem. I'm trying to make a trigger to show experience gain/loss in RetroMUD. the status bar ingame, which shows after each time you enter a command or simply hit enter, shows in the format:
Hp: 584/584 Sp: 1223/1223 Ep: 280/280 Gold: 212 Exp: 1166950 >
/world.debug "triggers" shows:
{{Hp: * Sp: * Ep: * Gold: * Exp: * >}}={{%5}} label=iworldexp script=expgained colour=1 send_to:variable seq:100
and the expgained script is:
sub expgained (thename, theoutput, thewildcards)
dim iNewexp
dim iOldexp
dim iDiff
iOldExp=world.GetVariable("ioldexp")
iNewExp=world.GetVariable("iworldexp")
if iNewexp > iOldexp then
iDiff=iNewexp-iOldexp
world.note "Exp gained : " & cstr (iDiff)
end if
if iNewexp < iOldexp then
iDiff=iOldexp-iNewexp
world.note "Exp lost : " & cstr (iDiff)
end if
if iNewexp=iOldexp then
world.note "No exp change"
end if
World.SetVariable "ioldexp", iNewexp
end sub
/world.debug "variables" :
iworldexp = 1166950
ioldexp = 1166950
Can anyone see what I'm missing? It just doesn't want to work :(
Thanks!