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.
Entire forum
➜ MUSHclient
➜ General
➜ Trigger/alias help needed
Trigger/alias help needed
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Victory
USA (16 posts) Bio
|
Date
| Wed 12 Jun 2002 05:34 AM (UTC) |
Message
| i've tried, i can't script, thats final! anyone willing to help me make this work?
the farsight trigger i need..
need it to turn on when i type fs
cast "farsight"
need it to match
You can momentarily see in all directions..
trigger on
*Baron Dude* <some place>
send
gtell *Baron Dude <place>
and then turn itself off.
any help is appriciated..
-Vic | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 12 Jun 2002 05:56 AM (UTC) |
Message
| The first part is easy, the alias:
<aliases>
<alias
match="fs"
enabled="y"
>
<send>cast "farsight"</send>
</alias>
</aliases>
Quote:
need it to match
You can momentarily see in all directions
What do you want to do when that matches? Turn on detection of Baron Dude?
Now for the triggers:
<triggers>
<trigger
custom_colour="1"
match="^\*Baron Dude\* (.*?)$"
name="BaronDudeTrigger"
regexp="y"
script="OnBaronDudeTrigger"
sequence="100"
>
<send>gtell *Baron Dude* %1</send>
</trigger>
<trigger
custom_colour="2"
enabled="y"
match="You can momentarily see in all directions"
name="FarSiteTrigger"
regexp="y"
script="OnFarSiteTrigger"
sequence="100"
>
</trigger>
</triggers>
And a bit of scripting to make it work ...
sub OnBaronDudeTrigger (sName, sLine, wildcards)
world.enabletrigger "BaronDudeTrigger", vbFalse
end sub
sub OnFarSiteTrigger (sName, sLine, wildcards)
world.enabletrigger "BaronDudeTrigger", vbTrue
end sub
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #2 on Wed 12 Jun 2002 06:29 AM (UTC) |
Message
| And just to give you an idea of how that will look when plugins work, here is the same thing as a plugin ...
<muclient>
<plugin
name="Baron_Dude"
author="Nick Gammon"
language="vbscript"
purpose = "Find that Baron Dude"
id = "5ba4633a105829f800796d53"
>
</plugin>
<aliases>
<alias
match="fs"
enabled="y"
>
<send>cast "farsight"</send>
</alias>
</aliases>
<triggers>
<trigger
custom_colour="1"
match="^\*Baron Dude\* (.*?)$"
name="BaronDudeTrigger"
regexp="y"
script="OnBaronDudeTrigger"
sequence="100"
>
<send>gtell *Baron Dude* %1</send>
</trigger>
<trigger
custom_colour="2"
enabled="y"
match="You can momentarily see in all directions"
name="FarSiteTrigger"
regexp="y"
script="OnFarSiteTrigger"
sequence="100"
>
</trigger>
</triggers>
<script>
sub OnBaronDudeTrigger (sName, sLine, wildcards)
world.enabletrigger "BaronDudeTrigger", vbFalse
end sub
sub OnFarSiteTrigger (sName, sLine, wildcards)
world.enabletrigger "BaronDudeTrigger", vbTrue
end sub
</script>
</muclient>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Victory
USA (16 posts) Bio
|
Date
| Reply #3 on Wed 12 Jun 2002 03:42 PM (UTC) |
Message
| thanks, but something is wrong..
You can momentarily see in all directions..
*Baron Beaver* Entrance to the Training Tower
gtell {RNAME:{Y *Baron Beaver* Tower Entrance to the Training* Tower
*Lord Michelangelo* Main Street of Cairn
*Duke Yang* Entrance to the Training Tower
*Duke Booyah* Entrance to the Training Tower
doesn't do them all, any ideas? | Top |
|
Posted by
| Victory
USA (16 posts) Bio
|
Date
| Reply #4 on Wed 12 Jun 2002 03:47 PM (UTC) |
Message
| it'll do the other names also, but it only does the first on in the output, such as that one was *Baron Beaver*, next time around it does *Duke Yang* and so on, but it will not send all the names.. | Top |
|
Posted by
| Nick Gammon
Australia (23,120 posts) Bio
Forum Administrator |
Date
| Reply #5 on Thu 13 Jun 2002 09:38 PM (UTC) |
Message
| When you said:
trigger on
*Baron Dude* <some place>
I thought you only wanted that guy. Maybe if you said:
*<some person>* <some place>
Anyway, change the name to a wildcard, and to stop it only doing the first, remove the script reference (which was turning off the trigger), like this:
<triggers>
<trigger
custom_colour="1"
match="^\*(.*?)\* (.*?)$"
regexp="y"
sequence="100"
>
<send>gtell *%1* %2</send>
</trigger>
</triggers>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Slickricksc777
(5 posts) Bio
|
Date
| Reply #6 on Mon 03 Feb 2003 01:37 AM (UTC) |
Message
| i have a hunt comand that hunts multiple enemies and creatures
ex: You see tracks of *Baron Whoever* leading west from here.
to
gtell tracks of *Baron Whoever* > west (or whatever direction)
but i dont want to pick up creatures that dont have astricks around them
| Top |
|
Posted by
| Hobson
USA (6 posts) Bio
|
Date
| Reply #7 on Mon 03 Feb 2003 02:45 AM (UTC) |
Message
| Yo Victory do you play AoW cause that looks really fimalliar | 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.
19,367 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top