I'm having trouble with an if statement firing when comparing variables. Here's what I have:
<triggers>
<trigger
enabled="y"
match="Look in the general vicinity of * for *!"
send_to="12"
sequence="100"
>
<send>SetVariable ("location", "%1")
SetVariable ("room", "%2")
ColourNote ("black", "white", "Location: %1 Room: %2")
-- Location Jovar
if "%1" == "Jovar" then
ColourNote("black", "white", "Location Recognized: @location")
Execute("#4s 3e 3n 3w 3n e (up)")
Execute("enter icewall")
Execute("c fly")
Execute("#2(nw) 2w (nw) n (nw) e n 2(u) w 2(up)")
if "%2" == "Smithy" then
ColourNote("black", "white", "Room confirmed: @room")
Execute("#5n 2e n")
if "@quest_item" == "the crown jewels" then
Execute("get crown$recall$north$north$pq complete")
elseif "@quest_item" == "blue diamond shard" then
Execute("get shard$recall$north$north$pq complete")
elseif "@quest_item" == "bright green emerald" then
Execute("get emerald$recall$north$north$pq complete")
elseif "@quest_item" == "lost puppy" then
Execute("get puppy$recall$north$north$pq complete")
end -- quest_item if
end -- room if
if "%2" == "The Planning Room" then
ColourNote("black", "white", "Room confirmed: @room")
Execute("#5n 2e n")
Execute("open west")
Execute("west")
if "@quest_item" == "the crown jewels" then
Execute("get crown$recall$north$north$pq complete")
elseif "@quest_item" == "blue diamond shard" then
Execute("get shard$recall$north$north$pq complete")
elseif "@quest_item" == "bright green emerald" then
Execute("get emerald$recall$north$north$pq complete")
elseif "@quest_item" == "lost puppy" then
Execute("get puppy$recall$north$north$pq complete")
end -- quest_item if
end -- room if
end -- location if</send>
</trigger>
</triggers>
This solution works because it's working directly with the wildcards that are being sent in. What I want to work is this:
ColourNote ("black", "white", "Location: %1 Room: %2")
-- Location Jovar
if "@location" == "Jovar" then
As I understand it, it's supposed to compare the variable location to the word Jovar however the statement doesn't fire. I've considered using getVariable but I'm not sure how things are stored in a variable.
Could someone clear this up for me as to why this isn't matching?
Thank you in advance.
<triggers>
<trigger
enabled="y"
match="Look in the general vicinity of * for *!"
send_to="12"
sequence="100"
>
<send>SetVariable ("location", "%1")
SetVariable ("room", "%2")
ColourNote ("black", "white", "Location: %1 Room: %2")
-- Location Jovar
if "%1" == "Jovar" then
ColourNote("black", "white", "Location Recognized: @location")
Execute("#4s 3e 3n 3w 3n e (up)")
Execute("enter icewall")
Execute("c fly")
Execute("#2(nw) 2w (nw) n (nw) e n 2(u) w 2(up)")
if "%2" == "Smithy" then
ColourNote("black", "white", "Room confirmed: @room")
Execute("#5n 2e n")
if "@quest_item" == "the crown jewels" then
Execute("get crown$recall$north$north$pq complete")
elseif "@quest_item" == "blue diamond shard" then
Execute("get shard$recall$north$north$pq complete")
elseif "@quest_item" == "bright green emerald" then
Execute("get emerald$recall$north$north$pq complete")
elseif "@quest_item" == "lost puppy" then
Execute("get puppy$recall$north$north$pq complete")
end -- quest_item if
end -- room if
if "%2" == "The Planning Room" then
ColourNote("black", "white", "Room confirmed: @room")
Execute("#5n 2e n")
Execute("open west")
Execute("west")
if "@quest_item" == "the crown jewels" then
Execute("get crown$recall$north$north$pq complete")
elseif "@quest_item" == "blue diamond shard" then
Execute("get shard$recall$north$north$pq complete")
elseif "@quest_item" == "bright green emerald" then
Execute("get emerald$recall$north$north$pq complete")
elseif "@quest_item" == "lost puppy" then
Execute("get puppy$recall$north$north$pq complete")
end -- quest_item if
end -- room if
end -- location if</send>
</trigger>
</triggers>
This solution works because it's working directly with the wildcards that are being sent in. What I want to work is this:
ColourNote ("black", "white", "Location: %1 Room: %2")
-- Location Jovar
if "@location" == "Jovar" then
As I understand it, it's supposed to compare the variable location to the word Jovar however the statement doesn't fire. I've considered using getVariable but I'm not sure how things are stored in a variable.
Could someone clear this up for me as to why this isn't matching?
Thank you in advance.