Gammon Forum
Entire forum
MUSHclient
Jscript
matching multiple words
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Zotiel
(14 posts) bio
|
Date
| Thu 16 Oct 2003 09:56 AM (UTC) Amended on Thu 16 Oct 2003 09:57 AM (UTC) by Zotiel
|
Message
| Is it possible to match mutiple wrds under one *?
As in, I wanna set up triggers & scripts based on spell names. But spells like CURE BLINDNESS and CURE LIGHT get confused.
So is there something like a "*" or [*] that will 'quote' any varidable within the quotes or brackets?
Example:
Match: Loki, please cast "spell name" on <name>
Send : cast %1 %2
Further more, is it possible to "keep" the spell name and victim name for future referance (in case the resist, or ir I lose concentration).
Example
(See above example, %1 == Cure light" %2 == Bob)
You lost your concentration.
Say It would seem my mental abilities are lacking today. Lemme try again.
Cast @SpellUpSpell @SpellUpVictim
I've tried a few different things, mainly based on the 'open doors' post in tips & tricks...I can get it to call %1 & %2 in a later function, but it is not using them correctly.
| top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #1 on Sat 18 Oct 2003 10:36 PM (UTC) |
Message
| What is your trigger exactly?
Match: Loki, please cast "*" on *
That should work as it is. However you might put the send text to be:
cast "%1" %2 |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Zotiel
(14 posts) bio
|
Date
| Reply #2 on Sun 19 Oct 2003 04:36 PM (UTC) |
Message
| I got it...I missed the cast <spell> ON <victim>
So %1 was falling on CURE and %2 was falling one LIGHT and <victim> was getting ignored.
I got it to work in a script as well...
I'll have other questions most likely on how to tie one script into another...but as fer now, I gotta get.
Sorry fer being sooooo annoying & THANK YOU ALL for your help & patience thus far.
-Zots
| 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.
11,099 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
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.