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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
killergate
Novice


Joined: 16 Feb 2009
Posts: 38

PostPosted: Sat Jan 09, 2010 9:16 am   

[3.12] Trigger weirdness
 
Hi,

I used to do this in Zmud, but cant seem to find a way in CMUD:

When I logon to a mud, I trigger on the logon-line + my char-name, so I can set the character Im playing:

In Zmud I would do:

Code:
#TRIGGER {What is your name: blah} {setchar Blah}


MUD outputs: What is your name:
I input: blah

The line looks like this:

Code:
What is your name: blah


and the trigger fires.

I cant do this in CMUD - the trigger wont fire. How can I accomplish this?

/kg
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jan 09, 2010 9:29 am   
 
uncheck the Trigger on Newline option of the trigger
check the Trigger on Prompt option of the trigger
_________________
EDIT: I didn't like my old signature
Reply with quote
killergate
Novice


Joined: 16 Feb 2009
Posts: 38

PostPosted: Sat Jan 09, 2010 9:42 am   
 
Hi,

That doesnt work as well, even tho I would assume it should :(

The trigger doesnt fire at all.

/kg
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sat Jan 09, 2010 3:29 pm   
 
Might be because of the colon? Try using ~: in the trigger to quote it, as the colon is a special character in CMUD.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Jan 09, 2010 6:43 pm   
 
You must have more than one space between the colon and blah, then. Change " " to "%s".
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sun Jan 10, 2010 1:10 am   
 
Just wondering, don't you have your character name defined in your session? If you do, then %char will be your character name.
Reply with quote
killergate
Novice


Joined: 16 Feb 2009
Posts: 38

PostPosted: Sun Jan 10, 2010 5:40 pm   
 
Hi,

I've tried with all sorts of different ways to do this, but nevertheless, no triggers fire at all - seems like the session is not kickstarted yet? If that makes any sense, ie. no triggers etc. firing yet. After I login, I can see triggers firing - but before I login to the mud, nothing is happening?

/kg
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sun Jan 10, 2010 7:05 pm   
 
Nah, if that were the case the auto logger would never work. It basically does the same thing you are doing.

1. Hmm, you say you do "setchar blah". Is setchar an alias that was created?
2. Do any other triggers fire?

If this doesn't work, open the session offline, open the Script Debugger, make sure you have option i checked under the messages submenu, then connect to the mud. Copy and paste the result in a code or quote box here.
Reply with quote
killergate
Novice


Joined: 16 Feb 2009
Posts: 38

PostPosted: Sun Jan 10, 2010 10:44 pm   
 
Hi,

setchar is an alias, I have - yes. No triggers at all fires.

Heres the output:

Code:
0.0025 | i  3Kingdom <<Entering 3Kingdoms.  Enter your character name or press enter to continue><IAC><WILL><1>
0.0007 | i  3Kingdom ><IAC><DO><1>
0.0003 | a  3Kingdom #Telnet 1:
0.0005 | a  3Kingdom ]
4.9720 | a  3Kingdom |<Entering 3Kingdoms.  Enter your character name or press enter to continue>
0.0013 | i  3Kingdom ><CR><LF>
0.1620 | i  3Kingdom <<CR><LF>
0.0000 | LDMud Version: 3.2.15<CR><LF>
0.0000 | Currently 78 players on.<CR><LF>
0.0000 | What is your name: <IAC><WONT><1>
0.0015 | a  3Kingdom ]What is your name:
2.4818 | ---
0.0014 | c  3Kingdom |[1] 3Kingdoms.mud Comline : start :
0.0022 | a  3Kingdom |What is your name: blah
0.0018 | i  3Kingdom ><CR><LF>
0.0014 | d  3Kingdom |[1] 3Kingdoms.mud Comline : stopped
0.1505 | i  3Kingdom <Password: <IAC><WILL><1>
0.0018 | i  3Kingdom ><IAC><DO><1>


Whats the <IAC><WONT><1> stuff?

/kg
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Sun Jan 10, 2010 11:19 pm   
 
killergate wrote:
No triggers at all fires.


So, not a single one of your triggers is firing. And I mean by that EVERY trigger. Not just the logon one you posted? Make sure there isn't a red X over the gun icon near the bottom right corner.
Reply with quote
killergate
Novice


Joined: 16 Feb 2009
Posts: 38

PostPosted: Mon Jan 11, 2010 7:03 am   
 
Hi,

Nope - no triggers fire at before but after I've completed the logon-process manually. I've disabled the autologin stuff - so maybe its suppressing my homemade trigger somehow? And no, triggers are on, hehe.

/kg
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Mon Jan 11, 2010 12:58 pm   
 
Odd, got it to work like this

#REGEX {What is your name\:\s+blah\n+} {setchar Blah} "" "reparse"

For my test, I used #SHOW BLAH instead of setchar Blah

Code:
0.0008 | c  3Kingdom |  [1] 3Kingdoms Comline : start :
0.0013 | a  3Kingdom |What is your name: blah
0.0006 | h  3Kingdom |What is your name: <ESC>[2Sblah<ESC>[0m
0.0027 | i  3Kingdom >blah<CR><LF>
0.0004 | d  3Kingdom |  [1] 3Kingdoms Comline : stopped
0.0296 | i  3Kingdom <No record found for blah on this mud.<CR><LF>
0.0000 | blah is a reserved name, please try another.<CR><LF>
0.0000 | What is your name:
0.0008 | a  3Kingdom |No record found for blah on this mud.
0.0007 | f  3Kingdom |  ReParse: What is your name\:\s+blah\n+
0.0014 | c  3Kingdom |  exec : ReParse "What is your name\:\s+blah\n+" : #SHOW BLAH
0.0006 | n  3Kingdom |  Exec Trigger "What is your name\:\s+blah\n+"
0.0007 | a  3Kingdom |BLAH
0.0008 | a  3Kingdom |blah is a reserved name, please try another.
0.0006 | a  3Kingdom ]What is your name:
Reply with quote
killergate
Novice


Joined: 16 Feb 2009
Posts: 38

PostPosted: Mon Jan 11, 2010 4:31 pm   
 
Hi,

Well - that "reparse" thing did the trick. Thanks a bunch!

Edit: Okay, weird things are happening. Now this trigger starts an endless look doing reparse all the time - I have to process-kill CMUD to close it. If I enable "Show trigger debug messages" in Prefs - I can login without it doing an endless loop!

Edit2: Changing reparse-type to pattern-type seemed to do the trick. I hope.

/kg
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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