[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]  hmm just wondering
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

hmm just wondering

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


Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Tue 18 May 2004 09:55 PM (UTC)
Message
is it possible to get two triggers one to store a variable and one to check a variable in the trigger match like

so and so says targert 190 (190 gets saved as a variable)

and then

ship 190 (9, 9, 9, 9) (190 is the thing i want to get and the numbers in the () i want to get set as another variable with or without the "," but with the spaces

Everything turns around in the end
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #1 on Tue 18 May 2004 11:50 PM (UTC)
Message
Yes, make the second trigger match on "ship @number (*, *, *, *)"

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #2 on Wed 19 May 2004 11:37 PM (UTC)
Message
Ok this might sound stupid but how would i set the trigger to set the variables heh, this is only one variable i might add

Everything turns around in the end
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #3 on Thu 20 May 2004 07:23 AM (UTC)
Message
make it match on "* says ship *" and select Send to: Scripting and write in the send to field:
SetVariable "number", "%2"

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Nick Gammon   Australia  (21,609 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Thu 20 May 2004 10:29 PM (UTC)
Message
Or, just have:

Match: * says ship *
Send: %2
Send to: variable
Variable: number

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Metsuro   USA  (389 posts)  [Biography] bio
Date Reply #5 on Fri 21 May 2004 01:37 AM (UTC)
Message
i get an error

ship @Ship (s) at (*)
------------------^

nothing to repeat

Everything turns around in the end
[Go to top] top

Posted by Nick Gammon   Australia  (21,609 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Fri 21 May 2004 03:57 AM (UTC)
Message
That means you have "regular expression" checked, however that is not a valid regular expression.

Either don't use regular expressions, eg.

ship @Ship (*, *, *, *)

or, use regular expressions properly, say:

^ship \@Ship \((\d+), (\d+), (\d+), (\d+)\)$

The \d says "digit" followed by "+" means "one or more of the previous thing" (ie. the digit). This would match on:

ship 190 (1, 2, 3, 4)

... assuming that @ship had "190" in it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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,631 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]