Shattered Kingdoms
https://shatteredkingdoms.org/forums/

Pulling the trigger
https://shatteredkingdoms.org/forums/viewtopic.php?f=21&t=17574
Page 1 of 2

Author:  LSDAnonymous [ Thu Jul 31, 2008 11:29 pm ]
Post subject:  Pulling the trigger

I was wondering if any of those that use zMUD, and triggers, could enlighten me.

I am trying to get my triggers to use wild cards.

Example:
Benji the Brave bashes Navel the Newb and sends him sprawling!

Instead of my current trigger: "BASHED!!!"
I would like: "Benji the Brave BASHED Navel the Newb"

I know I could look at the line RIGHT above BASHED and see what happened, but I would rather see it in that nice pretty ECHO blue instead of some of the darker colors my old eyes have trouble reading.

I tried using some of the wild card code I found in zMUD help files, but my different combination do not seem to be working.

PS: This example above was based solely on fictional characters and has no connection to any characters in game, or any opinions I might have on such characters if they existed.

Author:  aya [ Thu Jul 31, 2008 11:54 pm ]
Post subject: 

this should work....
Trigger-
%1 bashes %2 and sends him sprawling!

Value-
#echo %1 BASHES %2
------
I only had your example to work with.. but when tested it out looked like

Benji the Brave BASHES Navel the Newb

so i think that's what you're looking for, if the trigger string is different however, you should fix that before putting it in.

Author:  LSDAnonymous [ Fri Aug 01, 2008 12:12 am ]
Post subject: 

Ah. The wild cards are saved at the respected values then you can repeat them in the echos. I think I understand now.

Thanks! I will play around with that.

Author:  Demon [ Fri Aug 01, 2008 10:47 am ]
Post subject: 

Ah nice post I've been trying to figure out this myself.

Author:  LSDAnonymous [ Fri Aug 01, 2008 4:41 pm ]
Post subject: 

Just wanted to confirm got it to work with the above advice. Thank again!

Author:  JeanValjean [ Fri Aug 01, 2008 11:00 pm ]
Post subject: 

Actually, if you want to be more specific with your input, I would use some of the custom variables (e.g. %w for a word * for anything) and encase them in () for the valuable to be captured, and then when you have to output, you simply use %1, %2 and they get spat out in the same order they got captured.

Author:  LSDAnonymous [ Fri Aug 01, 2008 11:59 pm ]
Post subject: 

JeanValjean wrote:
Actually, if you want to be more specific with your input, I would use some of the custom variables (e.g. %w for a word * for anything) and encase them in () for the valuable to be captured, and then when you have to output, you simply use %1, %2 and they get spat out in the same order they got captured.


I think I am confused again :(

Author:  aya [ Sat Aug 02, 2008 12:29 pm ]
Post subject: 

LSDAnonymous wrote:
JeanValjean wrote:
Actually, if you want to be more specific with your input, I would use some of the custom variables (e.g. %w for a word * for anything) and encase them in () for the valuable to be captured, and then when you have to output, you simply use %1, %2 and they get spat out in the same order they got captured.


I think I am confused again :(


What he's saying, is that instead of using

Quote:
Trigger - %1 bashes %2 and sends him sprawling!

you could use
Quote:
%w bashes %w and sends him sprawling!

OR you could have used
Quote:
%* bashes %* and sends him sprawling!

There are actually TONS of things you could use so long as your output is the same
Quote:
#echo %1 BASHES %2


I just like using the ones that are easier to understand at first glance:)

Author:  STFU_KTHX [ Wed Aug 06, 2008 9:12 pm ]
Post subject: 

I use MUSHclient, are the commands the same that are for his triggers, that are for mine?

Author:  Jardek [ Wed Aug 06, 2008 9:18 pm ]
Post subject: 

I am almost positive that Peso is behind the now widespread knowledge about triggers.

Peso, for shame.

Page 1 of 2 All times are UTC - 8 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/