|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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.? |
|
|
|
TiberSeptim Beginner
Joined: 20 Jun 2006 Posts: 24
|
Posted: 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 ------------- |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Jan 22, 2008 8:20 am |
Uncheck the trigger on newline box and check the trigger on prompt box.
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: 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 |
|
|
|
|
|