I'm trying to write a script that changes my title after every mob I kill. I've got 2 triggers set up to retrieve my experience to the next level. The first trigger fires when i kill a mob and sends the word group. This displays the members of my party in a format that looks like:
[ 99 Arc] Synamyn 2459/2459 hp 3400/3796 mana 1940/1940 mv 1685 xp2go
The next trigger fires on seeing that. It sends the Level variable (99 in this case)the xp2go variable (1685 in this) to a script:
sub OnLevel (a, b, c)
cInt exp
SetVariable "level", "%1"
SetVariable "tnl", "%8"
if level = 99
exp = tnl + 5000
end if
if level = 100
exp = tnl + 2500
end if
if leve = 101
exp = tnl
end if
send "title has |i|y" exp "|b exp to |mhero!|n"
End Sub
I get an error bugging about the line if level = 99:
Error number: -2146827271
Event: Execution of line 1158 column 14
Description: Expected 'Then'
Line in error:
if level = 99
Called by: Immediate execution
I'm sure it's some newb error. but as this is really my first script, i'm not surprised
[ 99 Arc] Synamyn 2459/2459 hp 3400/3796 mana 1940/1940 mv 1685 xp2go
The next trigger fires on seeing that. It sends the Level variable (99 in this case)the xp2go variable (1685 in this) to a script:
sub OnLevel (a, b, c)
cInt exp
SetVariable "level", "%1"
SetVariable "tnl", "%8"
if level = 99
exp = tnl + 5000
end if
if level = 100
exp = tnl + 2500
end if
if leve = 101
exp = tnl
end if
send "title has |i|y" exp "|b exp to |mhero!|n"
End Sub
I get an error bugging about the line if level = 99:
Error number: -2146827271
Event: Execution of line 1158 column 14
Description: Expected 'Then'
Line in error:
if level = 99
Called by: Immediate execution
I'm sure it's some newb error. but as this is really my first script, i'm not surprised