In VBscript I can do this fairly easy, but I can't figure out the conversion to do it in PerlScript.
Quote:
<triggers>
<trigger
enabled="y"
expand_variables="y"
group="Cure"
match="^(.*?)h\, (.*?)m\, (.*?)e\, (.*?)p\, (.*?)en\, (.*?)w (.*?)\-$"
name="prompt"
regexp="y"
send_to="12"
sequence="100"
>
<send>if instr("%7", "@") then
world.setvariable "dreamweaving", "1"
else
world.setvariable "dreamweaving", "0"
end if
if instr("%7", "p") then
world.setvariable "prone", "1"
else
world.setvariable "prone", "0"
end if
if instr("%7", "b") then
world.setvariable "blind", "1"
else
world.setvariable "blind", "0"
end if
if instr("%7", "d") then
world.setvariable "deaf", "1"
else
world.setvariable "deaf", "0"
end if
if instr("%7", "k") then
world.setvariable "kafe_defense", "1"
else
world.setvariable "kafe_defense", "0"
end if
if instr("%7", "r") then
world.setvariable "right_arm_balance", "1"
else
world.setvariable "right_arm_balance", "0"
end if</send>
</trigger>
I can't figure out how to do the InStr in perl though, so any help would be appreciated. |