Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ VBscript
➜ hmm just wondering
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Metsuro
USA (389 posts) 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 | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) 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! | Top |
|
Posted by
| Metsuro
USA (389 posts) 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 | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) 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! | Top |
|
Posted by
| Nick Gammon
Australia (23,061 posts) 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 | Top |
|
Posted by
| Metsuro
USA (389 posts) 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 | Top |
|
Posted by
| Nick Gammon
Australia (23,061 posts) 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 | 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.
16,353 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top