I'd like the following trigger:
Trigger:You remove * gold from a sailor's kitbag.
Response: put %1 gold in pack
However, this is very bad for when i'm shopping. Instead of disabling in manually, is there a way for me to type something like "Shopping", or, if necessary "Shopping on" and "shopping off" to avoid this?
Name your trigger "shopping" (put that word in the "label" field). Then this alias will do it, if you have Lua as the script language.
<aliases>
<alias
match="shopping"
enabled="y"
send_to="12"
sequence="100"
>
<send>
if GetTriggerInfo ("shopping", 8) then
EnableTrigger ("shopping", false)
ColourNote ("black", "yellow", "Shopping trigger turned off")
else
EnableTrigger ("shopping", true)
ColourNote ("white", "blue", "Shopping trigger turned on")
end -- if
</send>
</alias>
</aliases>
Basically it sees if the trigger is enabled, and if so, turns it off (disables) it, otherwise it enables it. Type "shopping" to make the alias do its stuff.
For one, I've never used the script thing of mushclient before, so i'm not sure how to do it - I imagine the copy the code into notepad and save it as whatever.lua, though. Then you go to script, select lua, and select the script there. However, this doesn't work. (Some error about a >)
Second, what room does this leave me to declare the parameters of the trigger I want? Namely, the one where "You remove * gold from a sailor's kitbag" should result in "put %1 gold in kitbag." If I name the trigger shopping, I clearly can't name it "You remove * gold from a sailor's kitbag."