So basically, I'm trying to make a trigger to navigate rooms, casting a spell once per room. The rooms are not linear, so I thought I would use a variable "Location", then specify the "gonext" variable, in line with "Location" via a planned route. The trigger I am matching, is the message I get after casting the spell in the room. Basically I want to go south, south, south, southeast. The "gonext" variable does not seem to be getting changed to southeast? What am I doing wrong? OR is there a better way for me to do this?
<triggers>
<trigger
enabled="y"
expand_variables="y"
match="*You can't isolate any more viable spores in this mess.*"
send_to="12"
sequence="100"
>
<send>SetVariable ( "Location", @Location + 1 )
if Location == 2 then
SetVariable ( "gonext", "south" )
Send ( "@gonext" )
Send ( "c myco" )
elseif Location == 3 then
SetVariable ( "gonext", "south" )
Send ( "@gonext" )
Send ( "c myco" )
elseif Location == 4 then
SetVariable ( "gonext", "south" )
Send ( "@gonext" )
Send ( "c myco" )
elseif Location == 5 then
SetVariable ( "gonext", "southeast" )
Send ( "@gonext" )
Send ( "c myco" )
end</send>
</trigger>
</triggers>