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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Tue Jan 22, 2008 7:50 am   

Prompt Starts with Different Characters
 
On the MUD I play my prompt can potentially start with any of a number of different characters, so the auto prompt detection fails to load variables because it only looks for one.

I have a few questions:
1) Can I use a regex in the "prompt starts with this character" box to indicate that it can start with [ or ( or *?

2) Is there any performance difference between using the auto prompt detection and just using my own:
#TRIG {blah blah blah} #var maxhp %1; etc.?
Reply with quote
TiberSeptim
Beginner


Joined: 20 Jun 2006
Posts: 24

PostPosted: Tue Jan 22, 2008 8:11 am   
 
Follow up question. I wrote my own prompt detection trigger:

~[(%d)/(%d)hp~]~[(%d)/(%d)mv~]
#var hp %1;#var maxhp %2;#var mv %3;#var maxmv %4


It seems to work but suffers from a major shortcoming: it only seems to trigger when I receive new output from the MUD not including moving rooms. It must be some additional message like "You are getting hungry." or something. I'm not sure what might cause this - every time I move from room to room the prompt updates with new data (mvs etc.) but the trigger only fires if some other output is generated as well. Can anyone explain this?

Here's some sample output as you can see the trigger only fires when additional input appears on the same line as the prompt. What gives?



(S)[1155/1155hp][338/365mv][178/FE][36.6]>n
You attempt to sneak north.
A Pathside Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][337/365mv][178/FE][36.6]>s
You attempt to sneak south.
A Pathside Field [Field]
[Exits: north east south west ]
A bumblebee is buzzing around here, being a nuisance.

(S)[1155/1155hp][336/365mv][178/FE][36.6]>s
You attempt to sneak south.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][335/365mv][178/FE][36.6]>s
You attempt to sneak south.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][334/365mv][178/FE][36.6]>s
You attempt to sneak south.
Phlox Run [Road]
[Exits: north east south west ]
An elf stands before you, wandering the homelands aimlessly.

(S)[1155/1155hp][338/365mv][178/FE][36.6]>s
You attempt to sneak south.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][336/365mv][178/FE][36.6]>s
You attempt to sneak south.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][335/365mv][178/FE][36.6]>s
You attempt to sneak south.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][333/365mv][178/FE][36.6]>n
You attempt to sneak north.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][331/365mv][178/FE][36.6]>n
You attempt to sneak north.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][330/365mv][178/FE][36.6]>n
You attempt to sneak north.
Phlox Run [Road]
[Exits: north east south west ]
An elf stands before you, wandering the homelands aimlessly.

(S)[1155/1155hp][329/365mv][178/FE][36.6]>n
You attempt to sneak north.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][328/365mv][178/FE][36.6]>n
You attempt to sneak north.
An Overgrown Field [Field]
[Exits: north east south west ]

(S)[1155/1155hp][327/365mv][178/FE][36.6]>n
You attempt to sneak north.
A Pathside Field [Field]
[Exits: north east south west ]
A bumblebee is buzzing around here, being a nuisance.

(S)[1155/1155hp][325/365mv][178/FE][36.6]>n

The great deeds of Namvet and Jardek will provide 153 more hours of bonus experience.

(S)[1155/1155hp][325/365mv][178/FE][36.6]>You attempt to sneak north.
------------ 325 -------------
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Tue Jan 22, 2008 8:20 am   
 
Uncheck the trigger on newline box and check the trigger on prompt box.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jan 22, 2008 10:20 pm   
 
Quote:

1) Can I use a regex in the "prompt starts with this character" box to indicate that it can start with [ or ( or *?


Yes. Or, rather, at least you could with ZMud but I don't see why Zugg would have taken that out.

Quote:

2) Is there any performance difference between using the auto prompt detection and just using my own:
#TRIG {blah blah blah} #var maxhp %1; etc.?


Provided you do it right, no. If you use the mapper, though, make doubly sure you have both the mapper prompt and the autoprompt stuff synced up. The mapper completely breaks down if it can't find the prompt, and it won't find the prompt if you change it to something different than what it expects.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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