Timed triggers

Posted by NinjaKick on Fri 11 Apr 2003 12:59 AM — 9 posts, 27,793 views.

USA #0
I think in the trigger creation screen, there should be a thing where we can set it to go off after a certain amount of seconds. So like I see:

You are hungry.
(triggers goes off, but it waits 5 seconds before doing anything)
(trigger - cast 'create food';get food;eat food)

Instead of making a trigger call on a script. Then the script making a one time used timer.
Australia Forum Administrator #1
You can do exactly that with version 3.35 or 3.36. You use the trigger to send a "DoAfterSpecial" to the script engine (this creates the timer), then the timer fires and sends the command to the command parser, which does the command stacking, evaluates aliases etc. I tested this, and it works fine ...


<triggers>
  <trigger
   custom_colour="3"
   enabled="y"
   match="You are hungry."
   send_to="12"
   sequence="100"
  >
  <send>DoAfterSpecial 5, &quot;create food;get food;eat food&quot;, 10</send>
  </trigger>
</triggers>


USA #2
I just got 3.36 and I don't see where I can do a timed trigger. I don't know how to use any of the scripting stuff. I know how to use the windows.
Australia Forum Administrator #3
Copy from this page from (and including) <triggers> to </triggers> lines, go into your trigger configuration window in MUSHclient and click the "paste" button.

That will put it there. Then take a look - it isn't hugely complicated.
USA #4
I tried it, and it doesnt seem to send anything to the world.
Australia Forum Administrator #5
Do you literally get "You are hungry." on a line on its own? Not with a prompt in front of it, or anything?
USA #6
Yes
USA #7
It even made it turn green on the screen. So I know it is seeing it. Just not doing anything.
Australia Forum Administrator #8
Ah, OK. Go into the "scripts" configuration screen and check the "enable script" checkbox. You don't need a script filename. The language is VBscript.