Alright stupid me didn't save a copy before I started trying to fix things, so i think I broke a whole lot more...
<!-- Triggers -->
<triggers>
<trigger
group="Herbs"
match="^Hmm\, that wasn\'t the herb you thought after all\. It was some rare spices\!$"
regexp="y"
send_to="12"
sequence="100"
>
<send>spices = true</send>
</trigger>
<trigger
group="Herbs"
match="^Today is the (.*?) of (.*?)\,(.*)"
match_inverse="y"
regexp="y"
send_to="12"
sequence="100"
>
<send>month = "%2"</send>
</trigger>
<trigger
custom_colour="2"
group="Herbs"
match="You have recovered balance on all limbs."
regexp="y"
sequence="99"
>
<send>plants</send>
</trigger>
<trigger
group="Herbs"
keep_evaluating="y"
match="^(.*) \((.*?)\) (.*) (.*?) left\.$"
omit_from_output="y"
regexp="y"
sequence="99"
>
</trigger>
<trigger
group="Herbs"
match="The following plants are growing in this room:"
omit_from_output="y"
sequence="100"
>
</trigger>
<trigger
group="Herbs"
match="^(.*) \((.*)\) (.*) (.*?) left\.$"
regexp="y"
script="do_pick"
sequence="100"
>
</trigger>
<trigger
enabled="y"
expand_variables="y"
group="Alerts"
match="Your last login was from domain:"
regexp="y"
send_to="12"
sequence="100"
>
<send>send "date"</send>
</trigger>
</triggers>
<!-- Aliases -->
<aliases>
<alias
match="pick *"
enabled="y"
send_to="12"
sequence="100"
>
<send>herb = "%1"
EnableTriggerGroup ("Herbs", true)
Send "plants"</send>
</alias>
</aliases>
<!-- Script -->
<script>
<![CDATA[
herbs = {
arnica = { month = 'Klangiary', price = 5 },
calamus = { month = 'Dioni', price = 10 },
chervil = { month = 'Roarkian', price = 5 },
colewort = { month = 'Kiani', price = 5 },
coltsfoot = { month = 'Juliary', price = 5 },
faeleaf = { month = 'Juliary', price = 5 },
flax = { month = 'Estar', price = 5 },
galingale = { month = 'Shanthin', price = 8 },
horehound = { month = 'Vestia', price = 7 },
juniper = { month = 'Dioni', price = 7 },
kafe = { month = 'Urlachmar', price = 7 },
kombu = { month = 'Dioni', price = 8 },
marjoram = { month = 'Shanthin', price = 7 },
merbloom = { month = 'Estar', price = 5 },
mistletoe = { month = 'Avechary', price = 5 },
myrtle = { month = 'Estar', price = 7 },
pennyroyal = { month = 'Klangiary', price = 7 },
reishi = { month = 'Tzarin', price = 8 },
rosehips = { month = 'Shanthin', price = 5 },
sage = { month = 'Dioni', price = 6 },
sargassum = { month = 'Tzarin', price = 6 },
sparkleberry = { month = 'Dvarsh', price = 5 },
weed = { month = 'Estar', price = 5 },
wormwood = { month = 'Vestia', price = 7 },
yarrow = { month = 'Roarkian', price = 6 },
}
spices = nil
function do_pick (name, output, wildcs)
--TraceOut "in do_pick"
-- table.foreach (wildcs,
-- function (k, v) TraceOut ("wildcard ", k, " = ", v) end )
--TraceOut ("month = ", month)
--TraceOut ("herb = ", herb)
hibernate_month = (herbs.herb.month)
if wildcs[2] == herb then
if month == hibernate_month then
Note("Hibernating")
else
--TraceOut ("we have ", wildcs[4], " of ", wildcs[2])
if tonumber (wildcs[4]) > 10 then
Send("pick ", herb)
Note("There are ", ((wildcs[4])-10), " left to pick.")
else
Note("No more for you to pick.")
Send("inr all ", herb)
if spices == true then
Send("inr all spices")
spices = nil
end
DoAfterSpecial (2, 'EnableTriggerGroup ("Herbs", false)', 12)
end
end
end
end
]]>
</script>
rather upset cause before I went up to the new verison it worked fine, I am just not understanding what happened and what I messed up.
|