[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]  VBscript
. . -> [Subject]  Multi-line trigger sending to script
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Multi-line trigger sending to script

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


Posted by Madrox   (40 posts)  [Biography] bio
Date Tue 17 Oct 2006 05:21 AM (UTC)
Message
What i'm trying to capture is this

Taking a step back, you lunge forward with a hooking cut across * left leg.
* parries the attack with a deft maneuver.

which will then make a variable plleg true and i won't add an int to the var lleg.

I also need the same with rleg. I've tried with regexperessions, but I think I need to start smaller with them. So any advice would be great!
[Go to top] top

Posted by Madrox   (40 posts)  [Biography] bio
Date Reply #1 on Tue 17 Oct 2006 05:24 AM (UTC)
Message
Oh, the script will look something like this

dim plleg
dim lleg

world.getvariable ("plleg")

if plleg = ("y") then
world.note ("Feint QUICK!")
else
setvariable "lleg", CInt(getvariable("lleg"))+1
world.note ("Fired LLEG")
end if

But I just need to get that to match first
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #2 on Tue 17 Oct 2006 10:17 AM (UTC)
Message
This should work:


^Taking a step back, you lunge forward with a hooking cut across [A-Z][a-z]+\'s (left|right) (leg|arm)\.\n[A-Z][a-z]+ parries the attack with a deft maneuver\.\Z


This is for a multiline trigger, matching on two lines. It gives the side in wildcard 1 and the limb in wildcard 2, so you can set four different variables from one trigger.
[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.


4,382 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]