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
mgoho
Beginner


Joined: 22 Jun 2004
Posts: 17

PostPosted: Sat Aug 14, 2004 10:20 pm   

Channel Logger...and Triggers
 
I'm not sure what I'm doing wrong:

#TRIGGER {^%w tells you '*'$} {#CAPTURE CaluLog}

This obviously captures tells and puts them in a window called CaluLog. An odd problem that I'm having, however, is when someone sends me a tell that I have set to trigger something else (i.e. I run a spellbot), it only captures the last of the commands. This is how it looks.

TRIGGER {(%w) tells you*'{bless| bless}} {stand;cast bless %1;sit bar} would be a trigger that'd make me stand up, and cast bless on the person....so...

Relic tells you 'bless'
stand
cast bless Relic
sit bar

The trigger fires, but all that gets logged to the Channel window is "sit bar". That's all, not the tell (which is the only one that should be logged). I'm very confused, but I'm sure that someone with more experience is going to say, "Oh, just uncheck this option." So I hope the solution is easy.
Reply with quote
fred@kuzel.ca
Beginner


Joined: 25 Nov 2003
Posts: 15
Location: United Kingdom

PostPosted: Sat Aug 14, 2004 10:26 pm   
 
Get rid of the Capture Trigger and put everything in the spell trigger:

Use the #WINDOW command instead, it sends the output directly to the window, creating it if it doesn't exist.

#WINDOW "CaluLog" %trigger

This sends the trigger line (%trigger) to the window "CaluLog"

#TRIGGER {(%w) tells you*'{bless| bless}} {#WINDOW "CaluLog" %trigger;stand;cast bless %1;sit bar}


Cheers,


Uziel
Reply with quote
Drystin
Beginner


Joined: 24 Jul 2002
Posts: 18
Location: Denmark

PostPosted: Sat Aug 14, 2004 10:37 pm   
 
i have somehow the same problem though it logs what it should and more.

here is a little info.
i want a multiline capture, i have one working a little.
the capture from
tells you
then it captures everything until my prompt is shown, but sometimes, like in combat
the text from the combat can come between the tell and prompt.
a tell could look like this

Dwaylor tells you 'hello'

I don't know how i would be able to only log that, i have been trying with a few options in zmud
the normal cap work only single line. c- and c+ wont work.
I though maybe you could have zmud look for ' but this will also be a problem because we also use words as "don't", but can zmud be set to look for ' and nothing after
so if '
and nothing efter '
#T- tell
_________________
Drystin
Reply with quote
mgoho
Beginner


Joined: 22 Jun 2004
Posts: 17

PostPosted: Sat Aug 14, 2004 11:48 pm   
 
Thanks for your help Uziel! However, the solution you posted doesn't actually get me anywhere. I have a Channel Logger that logs all channels into the separate Channel Log window. For some reason, when a channel activates a trigger, the last line of the trigger appears in the window and nothing else. The solution wouldn't work, because I have about 80 patterns that I check for and CAPTURE into the Channel window. Also, the channel logger has nothing to do with the SpellBot, and I shouldn't have used it as the example. I'm not looking to change how my spellbot works, just the way Channels are logged.

Drystin, I'm not sure if there's any "etiquette" per se, but would you kindly start a new thread for a new idea/question?
Reply with quote
fred@kuzel.ca
Beginner


Joined: 25 Nov 2003
Posts: 15
Location: United Kingdom

PostPosted: Sun Aug 15, 2004 12:43 am   
 
I'm not 100% on how the #CAPTURE command works however I just duplicated your situation (and observations) and fixed it using the #WINDOW command.

The key to everything is that you are sending the variable %trigger. You are telling zmud you want the line that caused the trigger (%trigger) to go to the window CaluLog. This leaves very little room for zmud to get the variable wrong.

replace

#TRIGGER {^%w tells you '*'$} {#CAPTURE CaluLog}

with

#TRIGGER {^%w tells you '*'$} {#WINDOW CaluLog %trigger}

Now you have me wondering if I should change all my #capture to #window... <mutter>

Surprised

Uziel
_________________
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Aug 15, 2004 1:45 am   
 
Simply open the Settings Editor. Click on the triggers button so only triggers are displayed. Then click the 'show all' button so you that you can review all your triggers. Now select your capture triggers and use the 'move up' button to place them before the other triggers that activate and do things on the same text. This will cause the #CAPTURE to occur before other commands are sent to the mud and throw it off.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
mgoho
Beginner


Joined: 22 Jun 2004
Posts: 17

PostPosted: Sun Aug 15, 2004 2:52 am   
 
Vijilante, thanks for the quick reply! I love your suggestion...it makes perfect sense, but I can't quite figure out how to do it. I'm able to get to my settings editor, click on the Triggers button so only triggers are displayed, but then I have questions. By Show All...do you mean show all classes? If the answer is yes (as I assume) then I've done that, so that I have listed all my triggers. But then I see no "Move Up" button (or move down for that matter) and no place to change the "order" that triggers are used.

I know you'll have the answer, you're the best!
Reply with quote
fred@kuzel.ca
Beginner


Joined: 25 Nov 2003
Posts: 15
Location: United Kingdom

PostPosted: Sun Aug 15, 2004 8:42 am   
 
I still think forcing zmud to send the %trigger is a better way. I've moved triggers up and the problem is when you create another trigger after the move.

If you add another trigger such as:
Code:

#TRIGGER {(%w) tells you*'{heal| heal}} {#WINDOW "CaluLog" %trigger;stand;cast heal %1;sit bar}


You'll have to go back and move the primary trigger up again... and if you add another, move it up AGAIN, and another? you got it... move it up AGAIN. Real headache. Better off just setting:

#TRIGGER {^%w tells you '*'$} {#CAPTURE CaluLog}

to

#TRIGGER {^%w tells you '*'$} {#WINDOW CaluLog %trigger}

and never thinking about it again.

my 2 cents.

Uziel
_________________
Reply with quote
SCORNME
Novice


Joined: 25 Jul 2004
Posts: 48
Location: aka Falan

PostPosted: Sun Aug 15, 2004 9:25 am   
 
When capturing the tell, can you check it for the bless command and then do your thing if needed? Like:
Code:

#TRIGGER {^%w tells you '(*)'$} {#CAPTURE CaluLog;
#IF (%1="bless") {stand;cast bless %1;sit bar}}
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Aug 17, 2004 2:24 am   
 
mgoho wrote:
But then I see no "Move Up" button (or move down for that matter) and no place to change the "order" that triggers are used.

The UP/DOWN buttons only appear when you sort your settings by None. Check the View menu/Sort By setting.

fred@kuzel.ca wrote:
I still think forcing zmud to send the %trigger is a better way. I've moved triggers up and the problem is when you create another trigger after the move.

Some people prefer #WINDOW, others prefer #CAPTURE. They give different results.

fred@kuzel.ca wrote:
If you add another trigger...(y)ou'll have to go back and move the primary trigger up again

No, triggers are added to the bottom of the list not the top. Once the #CAPTURE trigger comes first it will always come first.
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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