[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  Sending something immediately after a trigger match
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Sending something immediately after a trigger match

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Faedara   (104 posts)  [Biography] bio
Date Mon 06 Dec 2010 04:44 PM (UTC)
Message
I have a script that fires off the prompt:



<triggers>
  <trigger
   enabled="y"
   group="AutoSipperAlpha"
   keep_evaluating="y"
   match="^(\d*?)h\, (\d*?)m\, (\d*?)e\, (\d*?)w (.*?)\-$"
   name="get_cur_hp"
   regexp="y"
   script="curing"
   send_to="12"
   sequence="100"
  >
  <send>cur_hp = %1</send>
  </trigger>
</triggers>


However, this script needs to send certain things immediately after receiving the prompt. With SendImmediate and Send, MUSH still waits until the next line of text is entered or received to the output before sending anything.

In normal triggers this is no problem only because the prompt is the next text and is sent immediately, however with the prompt as the match this doesn't work.

The eternally clueless <3
Currently looking for a mentor/tutor to help me learn everything about Lua from the ground up. I can't understand 28*41 until I learn what causes 2+2.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #1 on Mon 06 Dec 2010 04:49 PM (UTC)
Message
Template:faq=11 Please read the MUSHclient FAQ - point 11.
[Go to top] top

Posted by Faedara   (104 posts)  [Biography] bio
Date Reply #2 on Mon 06 Dec 2010 05:43 PM (UTC)
Message
I jumped a little when that worked, thank you!
*happy bunny dance*

The eternally clueless <3
Currently looking for a mentor/tutor to help me learn everything about Lua from the ground up. I can't understand 28*41 until I learn what causes 2+2.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,219 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]