Trigger to set a variable

Posted by Unregistered user on Thu 25 Jan 2001 12:00 AM — 2 posts, 14,167 views.

#0
I am trying to make a trigger that sets the value of a variable. When I send /world.setvariable "FleeDir", "north" from the command window it works, but when I try to send it from within a trigger it just sends the text to the mud. I was hoping to avoid having to write a script for this, as I have NO scripting or programming experience (I've played with Pascal a little, but thats about it :P) Can anyone tell me how I would go about making this work? What I'm actually trying to do is:
Trigger: You go (north|east|south|west).
Send: /world.setvariable "Fleedir", %1
or however it's supposed to be done...
So can someone help me? :)

- Epirus
Australia Forum Administrator #1
MUSHclient does not interpret trigger responses as commands, and thus you cannot use:



 
/world.setvariable




... in the way you have attempted. However you can easily do it with a very simple script. Just three lines, see below, put them into a file with the built-in notepad, and then use the "scripts" configuration tab to make that your script file. The language is VBscript.



 
sub OnDirection (strTriggerName, trig_line, arrWildCards)
  world.setvariable "Fleedir", arrWildCards (1)
End Sub