Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ trigger

trigger

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


Posted by Austen   (5 posts)  Bio
Date Wed 25 Apr 2001 12:06 AM (UTC)
Message
Alright, reading some of that other stuff, this should be a wiz. One thing, I need to get it so when
A huge hairy beast DISARMS you...
i'll get all
wield all
but i need it so that the Huge hariy beast is anything..
as in pk
*Baron bob* DISARMS you and sends your weapon flying!
*Baron bob* could be one of many people..

for the second part, a gnoll disarms Sirilius!
I need it so i will get all after that, a gnoll and sirilius have to be wildcards, but just don't know how to set that up.

a gnoll disarms Sirilius!
a huge hairy beast DISARMS you and sends your weapon flying!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 25 Apr 2001 01:46 AM (UTC)
Message
In these examples, basically you use an asterisk as a wildcard, like this:


Trigger: * DISARMS you and sends your weapon flying!
Send:

get all
wield all

(2 lines)



As for the second example, it would be something like this:


* disarms *


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Austen   (5 posts)  Bio
Date Reply #2 on Wed 25 Apr 2001 10:17 PM (UTC)
Message
Alright, tried that, figured thats what it was, but this keeps poping up

little box that says
Failed: nothing to repeat at offset 0
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 25 Apr 2001 10:19 PM (UTC)
Message
My examples were not regular expressions. Uncheck the regular expression box.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Austen   (5 posts)  Bio
Date Reply #4 on Thu 26 Apr 2001 01:21 AM (UTC)
Message
Alright, worked like a charm, thanks
Second think i can't figure out, a skill for that game is hunt..well here is an example
You see tracks of Ani leading north from here.


<818hp/818 368m/368 262mv/320 (1495) *N* You see tracks of *Duke Bodie* leading north from here.

well anyway, i need it so it will grouptell who and where the tracks are.
if posiable, only people with an * by their name.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 26 Apr 2001 01:30 AM (UTC)
Message
Ah yes, I thought that might come up next! :)

In this case, you will need to use regular expressions, because the one thing you can't match on in regular wildcards is an asterisk.

I would match on:


Trigger: You see tracks of \*(.*)\* leading (.*)
Regular Expression: checked


The "\*" "escapes" an asterisk so it just matches an asterisk, and the "(.*)" means "any number of any character". The parentheses mean "save this as a wildcard", so you could send, for instance:


gtell %1 has gone %2



- 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.


21,530 views.

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

Go to topic:           Search the forum


[Go to top] top

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