Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
raks
Beginner


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Sat Apr 20, 2002 5:11 pm   

Plugin Mudreader help
 
okay i've been useing mudread to read the tells, says, and town channels, and it worked fine but when i try to use the Class channels it just does should good..i am useing
#TRIGGER {Warrior (%w)} {#speak %trigger} 


for reading this
[Warrior Prevail] hello raks
but when it reads it it sounds like this
squar bracket warrior prevail squar bracket hello raks
any help on getting it to not read the Brackets out be nice
Thx
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Apr 21, 2002 12:29 am   
 
quote:

okay i've been useing mudread to read the tells, says, and town channels, and it worked fine but when i try to use the Class channels it just does should good..i am useing
#TRIGGER {Warrior (%w)} {#speak %trigger} 


for reading this
[Warrior Prevail] hello raks
but when it reads it it sounds like this
squar bracket warrior prevail squar bracket hello raks
any help on getting it to not read the Brackets out be nice
Thx



Do it this way:

#trigger {~[Warrior %w~] (*)} {#speak %1}

li'l shmoe of Dragon's Gate MUD
Reply with quote
raks
Beginner


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Sun Apr 28, 2002 9:22 pm   
 
works somewhat

it does not read the
Warrior Prevail
and only reads the first word
hello
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Apr 29, 2002 12:35 am   
 
Try changing Matt's trigger to look somewhat like your original one:
#trigger {~[Warrior %w~] (*)} {#speak %trigger}

Kjata
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Apr 29, 2002 2:41 am   
 
quote:

Try changing Matt's trigger to look somewhat like your original one:
#trigger {~[Warrior %w~] (*)} {#speak %trigger}

Kjata



Whoops. That should've been a quoted %1 ("%1") instead of unquoted--the quotes will allow ZMud to understand it needs to send the entire string assigned to %1 to whichever command routine called for it.

Dunno if %trigger would be a great idea, though. Doesn't it contain ONLY the trigger pattern that matched the last-fired trigger (which may or may not be this #SPEAK trigger)?

Now, if the entire line is wanting to be read (ie, channel name followed by channel message), perhaps modify the trigger like this (note, I don't use MUDreader so I don't know if #SPEAK can take multiple arguments like I have it set up):

#trigger {~[(Warrior %w)~] (*)} {#NOOP watch the %concat(), since I don't have ZMud in front of me to test it.;#VARIABLE speech %concat("%1"," ","%2");#speak @speech}

li'l shmoe of Dragon's Gate MUD
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Apr 29, 2002 12:28 pm   
 
It contains the line that cuased the last trigger match, but I think it is highly unlikely that another trigger will fire before the #SPEAK command is executed unless the second trigger that fires, fires off from the same line as the first, and then this represents no problem.

Kjata
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Apr 29, 2002 4:42 pm   
 
As raks pointed out in his original question, using %trigger for these lines sounds like:
square bracket warrior prevail square bracket hello raks
and it's the square bracket he doesn't want to hear.

Try this, raks
#trigger {~[Warrior (%w)~] (*)} {#speak Warrior %1 %2}

LightBulb
Vague questions get vague answers
Reply with quote
raks
Beginner


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Mon Apr 29, 2002 6:26 pm   
 
quote:
As raks pointed out in his original question, using %trigger for these lines sounds like:
square bracket warrior prevail square bracket hello raks
and it's the square bracket he doesn't want to hear.

Try this, raks
#trigger {~[Warrior (%w)~] (*)} {#speak Warrior %1 %2}

LightBulb
Vague questions get vague answers



Lightbulb, you get want i'm trying to do but your set up only reads "Warrior" that's all it reads.

MattLofton your first try only does as i said before

quote:
works somewhat

it does not read the
Warrior Prevail
and only reads the first word
hello



now on your other post
quote:
Whoops. That should've been a quoted %1 ("%1") instead of unquoted--the quotes will allow ZMud to understand it needs to send the entire string assigned to %1 to whichever command routine called for it.

works a bet better

#trigger {~[Warrior %w~] (*)} {#speak "%1"}

but that only reads the part that is sayed therefor i don't know who said it if

now on your last part i'm still trying to it figure out since i am not that experenced with zmud

quote:
#trigger {~[(Warrior %w)~] (*)} {#NOOP watch the %concat(), since I don't have ZMud in front of me to test it.;#VARIABLE speech %concat("%1"," ","%2");#speak @speech}


...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Apr 29, 2002 6:49 pm   
 
Try enclosing the phrase in {} then.
#trigger {~[Warrior (%w)~] (*)} {#speak {Warrior %1 %2}}
Since I don't use the Mudreader plugin I don't have the helpfile for #SPEAK and I'm just guessing at the syntax based on other commands. Looking it up would probably be a good idea. You may need to use "" around the phrase instead.
#trigger {~[Warrior (%w)~] (*)} {#speak "Warrior %1 %2"}
With a little experimentation, I'm sure you can find the right answer.

LightBulb
Vague questions get vague answers
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Apr 29, 2002 6:52 pm   
 
Oops, thanks LightBulb, I didn't catch that one.

raks, you should use LightBulb's second trigger then. If that fails, try joining all the parts together using %concat.

Kjata
Reply with quote
Pega
Magician


Joined: 08 Jan 2001
Posts: 341
Location: Singapore

PostPosted: Mon Apr 29, 2002 6:54 pm   
 
I thought you got it already...

Try this:

#trigger {~[(Warrior %w)~] (*)} {#speak {%1: %2}}

or this:

#trigger {~[Warrior (%w)~] (*)} {#speak {%1 the warrior says: %{2}.}}

Cheers
Reply with quote
raks
Beginner


Joined: 30 Jan 2002
Posts: 24
Location: USA

PostPosted: Mon Apr 29, 2002 9:36 pm   
 
OKay... that worked light and i liked how pega did the _______ the warrior says..
now i am going set it up for the other classes
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net