I was trying to get my trigger to fire with the updating of my prompt. Right now it has many problems, but the problem I want to focus on now is that it is not Sending the command 'create food' on prompt update. Variable Hungry is Yes so the and mana is maxed. So there is no reason i see why, I am not sending 'create food'
This is my trigger
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="Prompt"
match="^\<(\d+)\/(\d+)Hp (\d+)\/(\d+)Ma (\d+)\/(\d+)Mv AC\:\-(\d+) Continent\:(.*?) Weather\:(.*?)\>$"
regexp="y"
send_to="12"
sequence="100"
>
<send>SetVariable("CurHp","%1")
SetVariable("MaxHp","%2")
SetVariable("CurMana","%3")
SetVariable("MaxMana","%4")
SetVariable("CurMove","%5")
SetVariable("MaxMove","%6")
SetVariable("AC","%7")
SetVariable("Continent","%8")
SetVariable("InsideOutside","%9")
if "InsideOutside"~="indoors" then
SetVariable("InsideOutside","Outdoors")
end--if
HpNeeded = %2-%1
if "Hungry" ~="Yes" then
SetVariable("Hungry","No")
end--if
if "Thirsty" ~="Yes" then
SetVariable("Thirsty","No")
end--if
if "HpNeeded" > 5 and "CurrentMana" >16 then
Send("Cast 'cure light'")
end--if
-- create water - Lvl: 2, Mana: 5, Learned
-- create food - Lvl: 3, Mana: 6, Learned
if "Hungry"=="Yes" and "CurMana">12 then
Send("Cast 'create food'")
Send("Look")
end--if
-- cure minor - Lvl: 4, Mana: 8, Learned
-- bless - Lvl: 5, Mana: 8, Learned
-- shield of faith - Lvl: 6, Mana: 35, Learned
-- freshwater - Lvl: 4, Mana: 10, Learned
-- goodberry - Lvl: 6, Mana: 7, Learned
-- bone armor - Lvl: 11, Mana: 16, Learned
</send>
</trigger>
</triggers>
I am getting no errors since I converted to digits from wildcards. But trigger is not firing. I check that list of variables icon and it assures me Hungry Variable = "Yes". Though it is not updating for me being outside, but that's a problem for a later time.
QUESTION:
1. Why is trigger not firing?
2. How do I fix it?
|