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 ➜ Multiline Alias

Multiline Alias

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


Posted by Malek   USA  (27 posts)  Bio
Date Wed 29 Nov 2006 09:20 PM (UTC)
Message
I am having a slight problem getting this alias to work properly. I have part of it working and I keep removing the other part because it is not working properly
This is what works so far:

<aliases>
<alias
match="tar *"
group="pk"
send_to="12"
ignore_case="y"
keep_evaluating="y"
sequence="100"
>
<send>world.SetVariable("target", "%1")
world.Note("Target set to: %1" )</send>
</alias>
</aliases>

That works great, but here's my issue. I also have a variable set called (target).I have the target set to this variable after I type (tar blah). I am trying to make a multiline alias that will automaticlly set a mud level trigger from the variable. despite all my attempts so far I have had no such luck. Any suggestions?

Tod ist gweiss, Lebens est nicht.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 29 Nov 2006 09:31 PM (UTC)
Message
Do you mean a multiline trigger? Can you post what you have tried so far?

- Nick Gammon

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

Posted by Malek   USA  (27 posts)  Bio
Date Reply #2 on Wed 29 Nov 2006 09:52 PM (UTC)
Message
Thats all I have that is still in there. I take the rest out when it doesn't work and I start all over again. I may be talking about a trigger but I have also not figured out how to trigger off a output. As the Target set to: (blah) above is sent to script and I have tried to trigger off it and can not get it to work either.. I am dumb...

Tod ist gweiss, Lebens est nicht.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 30 Nov 2006 04:43 AM (UTC)

Amended on Thu 30 Nov 2006 04:44 AM (UTC) by Nick Gammon

Message
An alias responds to what you type. For example:


Match: ef
Send: eat food


That would send "eat food" when you type "ef" and hit <enter>.

A trigger responds to what is received from the MUD. For example:


Match: You are hungry.
Send: eat food


This would send "eat food" whenever "You are hungry." arrives from the MUD.

It still isn't clear to me what is the multi-line part of whatever you are trying to do. Maybe an example would help.

- Nick Gammon

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

Posted by Malek   USA  (27 posts)  Bio
Date Reply #4 on Sat 02 Dec 2006 12:58 AM (UTC)
Message
the alias that follows is what I am trying to get my client to set a mud based trigger to hunt the name typed.

Alias:
<aliases>
<alias
match="tar *"
group="pk"
send_to="12"
ignore_case="y"
keep_evaluating="y"
sequence="100"
>
<send>world.SetVariable("target", "%1")
world.Note("Target set to: %1" )</send>
</alias>
</aliases>

I have a variable setup name target. which follows now
<variables>
<variable name="target">Annie</variable>
</variables>

What I am trying to do is make a trigger off the name from the variable mentioned, to set a mud lvl trigger in this syntax ( trigger Annie todo hunt annie ). So far I have had no luck in getting this to work.
could anyone help out?

Tod ist gweiss, Lebens est nicht.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #5 on Sat 02 Dec 2006 05:19 AM (UTC)
Message
With "expand variables" checked, triggers can match on variables. eg.

Match: @target leaves the room

- Nick Gammon

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

Posted by Malek   USA  (27 posts)  Bio
Date Reply #6 on Sat 02 Dec 2006 01:39 PM (UTC)
Message
Yes this I am aware of but I want the client to pull the name out of the @target variable and make a mud level trigger with the @target name in it.

Tod ist gweiss, Lebens est nicht.
Top

Posted by Fletchling   Australia  (54 posts)  Bio
Date Reply #7 on Sat 02 Dec 2006 11:53 PM (UTC)
Message
You might something in what I use to hunt mobs in my mud;

1. To turn the auto hunt off if you get stuck or change your mind;

<aliases>
<alias
name="huntoff"
match="huntoff"
enabled="y"
group="hunt"
send_to="12"
sequence="100"
>
<send>EnableTrigger("hunttrigger",false)
Note ("Hunt is now OFF!")</send>

2. To turn it back on if you want to resume autohunt for the last mob hunted;

</alias>
<alias
match="hunton"
enabled="y"
send_to="12"
sequence="100"
>
<send>EnableTrigger ("hunttrigger", true)
Note ("hunt is now ON!")</send>

3. To set the target mob name, and start the hunt command;

</alias>
<alias
match="huntt *"
enabled="y"
group="hunt"
send_to="12"
sequence="100"
>
<send>EnableTrigger ("hunttrigger", true)
SetVariable ("target","%1")
Note ("Target is now %1")
Send ("hunt %1")</send>
</alias>
</aliases>

4. To read the mud reply from the hunt command and then go that direction (Note: you'd have to change the trigger to match your mud);

<triggers>
<trigger
expand_variables="y"
group="hunt"
match="The trail of * is confusing, but you're reasonable sure she headed *."
name="hunttrigger"
send_to="12"
sequence="90"
>
<send>Send ("%2")
Send ("hunt @target")</send>
</trigger>
</triggers>

5. To turn of autohunt when the mob is found;

<triggers>
<trigger
enabled="y"
match="A * is here!"
send_to="12"
sequence="100"
>
<send>EnableTrigger ("hunttrigger", false)</send>
</trigger>
</triggers>
<triggers>
<trigger
enabled="y"
match="The * is here!"
send_to="12"
sequence="100"
>
<send>EnableTrigger ("hunttrigger", false)</send>
</trigger>
</triggers>

(Note: these last two could be combined of course, but depends on how your mud refers to the mob name as an it,he,she,the etc, issues with grammar for personal pronouns, and definite/indefinite articles etc)

Hope this helps with ideas, these work well for me. I should tidy them up into a group and think about a plugin :)

Fletchling aka Cuddlepie
Top

Posted by Malek   USA  (27 posts)  Bio
Date Reply #8 on Sun 03 Dec 2006 07:13 PM (UTC)
Message
Fletchling,
Thats pretty much what I was trying to accomplish.. Thanks for the input..

Tod ist gweiss, Lebens est nicht.
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,576 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.