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 ➜ Name Trigger

Name Trigger

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


Pages: 1 2  

Posted by Jdiddleymspot   (11 posts)  Bio
Date Fri 13 Aug 2010 03:52 PM (UTC)
Message
Hi, I don't have a clue about triggers or anything to do with how to code on MUSHclient.

Basically, what I want is for when a PC or NPC description is displayed on screen, it will put his/her/its name in brackets after the description. How do I do this?

Thanks for the help!

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Mm1mark   (24 posts)  Bio
Date Reply #1 on Fri 13 Aug 2010 05:00 PM (UTC)
Message
could you give us an example of what your seeing. would be easier to help.
do you see something like?

name
A tall human, with blue eyes and red hair.

or something more complex?
Top

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #2 on Fri 13 Aug 2010 05:22 PM (UTC)
Message
Hi, basically the mud sends ^me something like...

A blue eyed, tall man is here.

I want it to say....

A blue eyed, tall man is here (Barry)

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #3 on Sat 14 Aug 2010 08:12 AM (UTC)
Message
Please help :)

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #4 on Sat 14 Aug 2010 09:20 AM (UTC)
Message
Jdiddleymspot said:

Hi, basically the mud sends ^me something like...

A blue eyed, tall man is here.

I want it to say....

A blue eyed, tall man is here (Barry)


How do we know, from what you posted, to put the name Barry there?

- Nick Gammon

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

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #5 on Sat 14 Aug 2010 11:01 AM (UTC)
Message
Can't it trigger on the description of the PC?

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #6 on Sat 14 Aug 2010 12:24 PM (UTC)

Amended on Sat 14 Aug 2010 12:31 PM (UTC) by Jdiddleymspot

Message
If you need more information about what the MUD sends, then this is it:-

MUD said:

A Room is Here
Exits: North, East, South, West

Room description goes here. Roughly a paragraph in length.

A table is here.
An arrow is here (x3).
A blue eyed man with short hair is here.

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #7 on Sat 14 Aug 2010 07:11 PM (UTC)
Message
Can't it trigger on the description of the PC?

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #8 on Sat 14 Aug 2010 09:14 PM (UTC)

Amended on Sat 14 Aug 2010 10:14 PM (UTC) by Nick Gammon

Message
Jdiddleymspot said:


Posted at Saturday, 02:52 AM Australian time

Basically, what I want is for when a PC or NPC description is displayed on screen, it will put his/her/its name in brackets after the description. How do I do this?


...

Jdiddleymspot said:

Please help :)


...

Jdiddleymspot said:


Posted at Saturday, 10:01 PM Australian time

Can't it trigger on the description of the PC?


...

Jdiddleymspot said:


Posted at Sunday, 06:11 AM Australian time

Can't it trigger on the description of the PC?


Making multiple posts won't get your questions answered faster. You asked a question at 10 PM my time, and then tried to hurry us up at 6 AM my time. Personally I was asleep.

When you made your initial post you were asked to supply, amongst other things, the scripting language you use, and the version of MUSHclient. You haven't done so.

I asked this:

Nick Gammon said:

How do we know, from what you posted, to put the name Barry there?


You haven't answered that.

Are you saying that every time you see this line:


A blue eyed man with short hair is here.


You want to replace it with:


A blue eyed man with short hair is here. (Barry)


Is that just because you happen to know that this person is Barry?

Is that description part of a longer description (like some MUDs do, with many people listed in one paragraph)?

It would help to know which MUD you are talking about.

If you are talking about a longer paragraph then an actual example would help too.

Are you planning to replace many descriptions with names, or just a single one (Barry)?

Sure, it can be done by triggering on the description, assuming you happen to know which name matches which description (which you didn't say).

But if you have hundreds of them there might be a better way. And if the descriptions are inside a big paragraph then the paragraph would have to be broken down into individual descriptions.

Have you read the FAQ?

The people who visit these forums are generally very helpful, and will be happy to help you tidy up an attempt that you have made. But they need information to work on, and generally like you to show you have tried to solve the problem yourself.

- Nick Gammon

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

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #9 on Mon 16 Aug 2010 05:00 PM (UTC)

Amended on Mon 16 Aug 2010 06:44 PM (UTC) by Jdiddleymspot

Message
Firstly, I'm sorry if I came across pushy. I really didn't mean to sound that way. I just thought that maybe my post would get lost amongst the others. I apologize.

Here is what I posted after I asked if a trigger can just trigger on a PC description:-

Jdiddleymspot said:

If you need more information about what the MUD sends, then this is it:-

MUD said:

A Room is Here
Exits: North, East, South, West

Room description goes here. Roughly a paragraph in length.

A table is here.
An arrow is here (x3).
A blue eyed man with short hair is here.



I'm sorry, but I don't know what scripting language I use. I AM really a total newbie at this sort of thing. If it helps, I'm trying to use the GAME>CONFIGURE>TRIGGERS box.

You are indeed correct that upon seeing this:-

A blue eyed man with short hair is here.

I want to see this:-

A blue eyed man with short hair is here (Barry).

The brackets part (Barry) I will input myself. There is no way for MUSHCLIENT to know his name is Barry, but I would like his name to show after I tell the program his name is barry.

I've tried using the FAQ, but it's not so easy. This is what I've figure out so far with the FAQ and just by messing around....

---------------------------------
Trigger: A blue eyed man with short hair *

Tick Ignore case & Omit from output

Send box:
A blue eyed man with short hair %1 (Barry)

Send to: Output
-------------------

It seems to work, but the output is always blue. The normal color for mobiles on the MUD is always purple.

I'm playing Shadows of Isildur (www.middle-earth.us) A Diku mud as far as I'm aware, though I don't actually know what that means :(

This is about as far as I've got. Once again, sorry for coming across pushy. I really didn't mean to.

John

Ps. I'm using MushClient v.4.43



Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #10 on Mon 16 Aug 2010 09:35 PM (UTC)
Message
Jdiddleymspot said:

I've tried using the FAQ, but it's not so easy. This is what I've figure out so far with the FAQ and just by messing around....

---------------------------------
Trigger: A blue eyed man with short hair *

Tick Ignore case & Omit from output

Send box:
A blue eyed man with short hair %1 (Barry)

Send to: Output
-------------------

It seems to work, but the output is always blue.


It helps to use the Copy button:

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.



However you are on the right track. It is in blue because sending to output defaults to the world "note" colour.

To control the colour, you can script a short ColourNote instead, like this:


<triggers>
  <trigger
   enabled="y"
   ignore_case="y"
   match="A blue eyed man with short hair *"
   omit_from_output="y"
   send_to="14"
   sequence="110"
  >
  <send>ColourNote ("purple", "", "%0 (Barry)")</send>
  </trigger>
</triggers>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


I used %0 which will echo the entire original line, and then added (Barry) to the end.

- Nick Gammon

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

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #11 on Tue 17 Aug 2010 05:12 AM (UTC)
Message
Thanks Nick, I'll try that later today! :)

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Jdiddleymspot   (11 posts)  Bio
Date Reply #12 on Tue 17 Aug 2010 06:55 PM (UTC)

Amended on Wed 18 Aug 2010 07:15 AM (UTC) by Jdiddleymspot

Message
Hmm..I tried to find out myself, but I failed :(

What do I need to insert so that it would look like this...

[color=purple]A blue eyed man with short hair[/color] looks about shadily.

Hmm..I don't know the codes for this forum. But I would like the man's description in purple and the rest of the text in the normal format for the mud. Is that possible?

Jdidds
www.middle-earth.us
Roleplaying in Middle-Earth
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #13 on Tue 17 Aug 2010 09:12 PM (UTC)

Amended on Tue 17 Aug 2010 09:13 PM (UTC) by Nick Gammon

Message
Jdiddleymspot said:

Hmm..I don't know the codes for this forum. But I would like the man's description in purple and the rest of the text in the normal format for the mud. Is that possible?


There are no colour codes on the forum. :)

Anything is possible. You can use any colour you want in displays (there is an inbuilt colour-picker to help choose one). You could display %0 in one colour and "Barry" in another, like this:


<triggers>
  <trigger
   enabled="y"
   ignore_case="y"
   match="A blue eyed man with short hair *"
   omit_from_output="y"
   send_to="14"
   sequence="110"
  >
  <send>

ColourTell ("purple", "", "%0 ")
ColourNote ("white", "", "(Barry)")

</send>
  </trigger>
</triggers>


Template:pasting For advice on how to copy the above, and paste it into MUSHclient, please see Pasting XML.


The ColourTell leaves the text on the same line.

If you are still having problems please paste what you have:

Template:copying For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.

- Nick Gammon

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

Posted by Skasi   (3 posts)  Bio
Date Reply #14 on Wed 02 Feb 2011 03:10 PM (UTC)

Amended on Wed 02 Feb 2011 03:24 PM (UTC) by Skasi

Message
Is there a way to retain wildcard coloring?
<triggers>
  <trigger
   enabled="y"
   ignore_case="y"
   match="*funny looking clown*"
   send_to="14"
   sequence="110"
  >
  <send>
    Tell ("", "", "%1")
    ColourTell ("magenta", "", "funny looking clown")
    ColourTell ("white", "", "(Tom)")
    Tell ("", "", "%2")
  </send>
  </trigger>
</triggers>

eg. <white>All of a sudden, </white><magenta>a funny looking clown</magenta><white>(Tom) hurls </white><green>a red-nose</green><white> at you!</white>


Also is there a way to access the string between the asterisks?
For something like this.
ColourTell ("magenta", "", "<string between *s>")
ColourTell ("white", "", "(Tom)")
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.


66,912 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

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.