<alias
match="^harv$"
enabled="y"
group="General"
regexp="y"
ignore_case="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if harvestterrain == forest then
Execute ("harvest ginseng;harvest myrrh;harvest lobelia;harvest elm;harvest echinacea;harvest ginger")
elseif harvestterrain == hills then
Execute ("harvest hawthorn;harvest bayberry")
end</send>
This is what I have. Simple and ugly. The problem is that it pays no attention to what the variable actually says and tries to harvest all of it. I deduce that the == is just checking to see whether the variable has a value or is nil, so its going down the list. I'm not sure how to make it stop. I tried putting quotations around forest and hills, but the result of that is that the script doesn't fire at all.
For the sake of completeness, the rest of what I have is posted below.
<triggers>
<trigger
custom_colour="15"
enabled="y"
match="^A ginseng plant \(ginseng\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A myrrh bush \(myrrh\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A lobelia wildflower \(lobelia\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A red elm tree \(elm\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A purple coneflower \(echinacea\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A wild ginger plant \(ginger\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^Clusters of nuts \(nuts\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="11"
enabled="y"
match="^A hawthorn plant \(hawthorn\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "hills")</send>
</trigger>
<trigger
custom_colour="11"
enabled="y"
match="^A bayberry tree \(bayberry\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "hills")</send>
</trigger>
</triggers>
<!-- End Triggers -->
<!-- Variables -->
<variables>
<variable name="harvestterrain">Default</variable>
</variables>
<!-- End Variables -->
<!-- Aliases -->
<aliases>
<alias
match="^checkterrain$"
enabled="y"
group="General"
regexp="y"
ignore_case="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>ColourNote ("white", "green", "Current terrain is @harvestterrain")</send>
</alias>
<alias
match="^harv$"
enabled="y"
group="General"
regexp="y"
ignore_case="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if harvestterrain == "forest" then
Execute ("harvest ginseng;harvest myrrh;harvest lobelia;harvest elm;harvest echinacea;harvest ginger")
elseif harvestterrain == "hills" then
Execute ("harvest hawthorn;harvest bayberry")
end</send>
</alias>
</aliases>
<!-- End Aliases-->
Sorry for the hideous formatting.
match="^harv$"
enabled="y"
group="General"
regexp="y"
ignore_case="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if harvestterrain == forest then
Execute ("harvest ginseng;harvest myrrh;harvest lobelia;harvest elm;harvest echinacea;harvest ginger")
elseif harvestterrain == hills then
Execute ("harvest hawthorn;harvest bayberry")
end</send>
This is what I have. Simple and ugly. The problem is that it pays no attention to what the variable actually says and tries to harvest all of it. I deduce that the == is just checking to see whether the variable has a value or is nil, so its going down the list. I'm not sure how to make it stop. I tried putting quotations around forest and hills, but the result of that is that the script doesn't fire at all.
For the sake of completeness, the rest of what I have is posted below.
<triggers>
<trigger
custom_colour="15"
enabled="y"
match="^A ginseng plant \(ginseng\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A myrrh bush \(myrrh\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A lobelia wildflower \(lobelia\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A red elm tree \(elm\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A purple coneflower \(echinacea\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^A wild ginger plant \(ginger\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="15"
enabled="y"
match="^Clusters of nuts \(nuts\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "forest")</send>
</trigger>
<trigger
custom_colour="11"
enabled="y"
match="^A hawthorn plant \(hawthorn\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "hills")</send>
</trigger>
<trigger
custom_colour="11"
enabled="y"
match="^A bayberry tree \(bayberry\)"
regexp="y"
send_to="12"
sequence="100"
><send>SetVariable ("harvestterrain", "hills")</send>
</trigger>
</triggers>
<!-- End Triggers -->
<!-- Variables -->
<variables>
<variable name="harvestterrain">Default</variable>
</variables>
<!-- End Variables -->
<!-- Aliases -->
<aliases>
<alias
match="^checkterrain$"
enabled="y"
group="General"
regexp="y"
ignore_case="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>ColourNote ("white", "green", "Current terrain is @harvestterrain")</send>
</alias>
<alias
match="^harv$"
enabled="y"
group="General"
regexp="y"
ignore_case="y"
expand_variables="y"
send_to="12"
sequence="100"
>
<send>if harvestterrain == "forest" then
Execute ("harvest ginseng;harvest myrrh;harvest lobelia;harvest elm;harvest echinacea;harvest ginger")
elseif harvestterrain == "hills" then
Execute ("harvest hawthorn;harvest bayberry")
end</send>
</alias>
</aliases>
<!-- End Aliases-->
Sorry for the hideous formatting.