Passing constant parameters from triggers

Posted by Renquist on Sat 19 Aug 2006 10:10 PM — 4 posts, 17,808 views.

#0
Hello,

How do I pass constant params to a script from a trigger?

I have a static trigger that does not contain any variables. When it fires it calls a python script named EnemyStatus. ie:
<trigger match="^static text with no variation here\.$">

When calling EnemyStatus I want to pass static parameters to it. The parameters are not part of the triggered text. ie:
In the script EnemyStatus( sName, sLine, wildcards )
wildcards[0] is "EnemyName"
wildcards[1] is 200
etc.

How do I go about this?

- Renquist
Australia Forum Administrator #1
That's what MUSHclient variables are for. They are static in the sense that they don't change until you want them to.


So, you might do something like:

enemyname = GetVariable ("enemyname")
#2
Thanks, that worked like a charm. I did not realize a trigger would execute the send field and also an associated script function.
Australia Forum Administrator #3
The exact process (which is rather complicated) is described here:

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=6554