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
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Tue Mar 26, 2002 11:26 pm   

small trigger problem
 
Hi, thanks for reading. The mud: Realms of Despair.

This is a very small problem, but an annoyance nonetheless. Consider the following trigger:

actual mud prompt:
<766/766 665/665 590/590>(869)(2871856)

the numer 869 in the example could at some time have a negative sign in front of it, thats why i chose the wildcard i did for it below. Just for simplicity since i dont know any better.

Pattern: ^~<%n~/%n %n~/%n %n~/%n~>~(*~)~(%n~)me (&1)

Value: emote is trancing %1 times.
#repeat %1 {trance)
emote is finished trancing

It works fine, except, after "emote is finished trancing", the mud returns "Huh?". I know this is because "me" isn't a recognized command.

And the reason i use "me" instead of tr or something is because tr is short for the traffic command.


Basically, all i want is to be able to enter me (some number from 1-9) and have myself trance that number of times. Like i said, the only trouble, is the "huh?" when its finished. Otherwise, i do trance and emote just fine.

Thanks
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Wed Mar 27, 2002 12:26 am   
 
Rather than make a trigger to do this, it appears to me that you should make an alias. Aliases allow you to assign several commands to a shortcut abbreviation.

Select New Alias in the Settings editor.

Name: me
Value: emote is trancing %1 times.
#repeat %1 {trance)
emote is finished trancing

Anything you type after me will be assigned as a parameter. There is no need to tie this to your prompt pattern.

Troubadour
Reply with quote
bgunther
Novice


Joined: 20 Dec 2001
Posts: 39
Location: USA

PostPosted: Wed Mar 27, 2002 9:58 am   
 
quote:
Pattern: ^~<%n~/%n %n~/%n %n~/%n~>~(*~)~(%n~)me (&1)

Value: emote is trancing %1 times.
#repeat %1 {trance)
emote is finished trancing



Umm... you got a syntax error there, perhaps thats why you are getting the huh... you have a ) rather than a } in your #repeat command. Perhaps you meant to have:
#repeat %1 {trance}
?



Bob, aka Kayd on SWMud and a few others.
Reply with quote
bruntilda
Novice


Joined: 10 Oct 2000
Posts: 39

PostPosted: Wed Mar 27, 2002 5:41 pm   
 
quote:

actual mud prompt:
<766/766 665/665 590/590>(869)(2871856)

the numer 869 in the example could at some time have a negative sign in front of it, thats why i chose the wildcard i did for it below. Just for simplicity since i dont know any better.



You can use %n to match both positive and negative numbers. 869, -869, and 869 with a plus sign before it would all be matched. (Couldnt figure out how to put a plus sign into the fourm)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Mar 28, 2002 8:57 am   
 
Just use a plus sign. +869. It will show up in the forum even though it doesn't show in the preview.

LightBulb
All scripts untested unless otherwise noted
Reply with quote
doomfyre
Apprentice


Joined: 03 Jan 2002
Posts: 152
Location: USA

PostPosted: Thu Mar 28, 2002 4:12 pm   
 
thanks for all the replies, problem solved..wrinkles removed :)
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