No question, Well not with what I have. Right now I am trying to get the IsHungry to fire only once now.
I am monkeying with your wait.time function. Hoping that will fix it. Didn't expect such a quick response. So no question yet want to mess with it some more, before I ask. Thought the above was working perfectly until I got hungry.
Ok yes i do have question.
I think problem is that even thought I have trigger set to switch IsHungry from Yes to No. My script seems to me firing 3 or more times .
Here are all my Triggers
Mud tells me I am Hungry. So I made trigger Set Variable IsHungry to Yes.
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="FoodandWater"
match="*You are hungry.*"
send_to="12"
sequence="100"
>
<send>SetVariable("IsHungry","Yes")
IsHungry = "Yes"</send>
</trigger>
</triggers>
Prompt Sees IsHungry is Yes
So it
casts create food spell
gets food
and i eat food.
I added wait 21 seconds in hopes that it would give propmpt time to see that ISHungry is Now No. That will come from trigger after prompt trigger.
This is current Prompt trigger.
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="Prompt"
match="<*/*Hp */*Ma */*Mv AC:* Continent:* Weather:*>"
send_to="12"
sequence="100"
>
<send>
SetVariable("CHp","%1")
SetVariable("MHp","%2")
SetVariable("CMa","%3")
SetVariable("MMa","%4")
SetVariable("CMv","%5")
SetVariable("MMv","%6")
SetVariable("AC","%7")
SetVariable("Continent","%8")
SetVariable("IndoorsOutdoors","%9")
CHp=GetVariable("CHp")
MHp=GetVariable("MHp")
CMa=GetVariable("CMa")
MMa=GetVariable("MMa")
CMv=GetVariable("CMv")
MMv=GetVariable("MMv")
AC=GetVariable("AC")
Continent=GetVariable("Continent")
IndoorsOutdoors=GetVariable("IndoorsOutdoors")
IndoorsOutdoors=GetVariable("IndoorsOutdoors")
IsFighting=GetVariable("IsFighting")
IsHungry=GetVariable("IsHungry")
IsRelaxing=GetVariable("IsRelaxing")
IsSleep=GetVariable("IsSleep")
IsStanding=GetVariable("IsStanding")
IsThirsty=GetVariable("IsThirsty")
Location=GetVariable("Location")
StoneSkin=GetVariable("StoneSkin")
Target=GetVariable("Target")
Trackie=GetVariable("Trackie")
if IndoorsOutdoors == "indoors" then
SetVariable("IndoorsOutdoors","Indoors")
IndoorsOutdoors ="Indoors"
else
SetVariable("IndoorsOutdoors","Outdoors")
IndoorsOutdoors ="Outdoors"
end--if
if IsHungry == "Yes" then
require "wait"
wait.make (function ()
wait.time (21)
Send("|")
Send("cast 'create food'")
Send("get food")
Send("eat food")
end)
end--if
if StoneSkin == "Off" and CMa>25 then
Send("|")
Send("cast 'stone skin'")
end--if
if IsThirsty == "Yes" then
require "wait"
wait.make (function ()
wait.time (21)
Send("|")
Send("get barrel mass")
Send("drink barrel")
Send("cast 'create water' barrel")
end)
end--if
</send>
</trigger>
</triggers>
After I eat Mud tell me I am no longer hungry.
So I want to make IsHungry equal to No.
Here is No longer hungry trigger.
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="FoodandWater"
match="*You are no longer hungry.*"
send_to="12"
sequence="100"
>
<send>SetVariable("IsHungry","No")
IsHungry=GetVariable("IsHungry")
IsHungry = "No"
</send>
</trigger>
</triggers>
I have compare string to number error in prompt trigger but I will fix that later.
|