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
Smeff
Newbie


Joined: 17 Mar 2006
Posts: 9

PostPosted: Mon May 01, 2006 7:16 pm   

#SETPROMPT question
 
I play Imperian, and I'm trying to figure out a way to get the prompt in that game to work using #setprompt... Whole problem is, it's not like what is explained in the help files.

H:123 M:123 E:1234 W:1234

There is the prompt for the game.. Right now, I'm trying to also code something similar (H:&hp M:&mana E:&endur W:* ~<%5~>) to do something of the same thing. Not sure if that'll work, either. I still need to test it once it's done.

If anyone has any ideas, they would be greatly appreciated. Thanks!
Reply with quote
Strakc
Apprentice


Joined: 31 Jan 2006
Posts: 106
Location: Virginia Beach, Virginia

PostPosted: Mon May 01, 2006 9:19 pm   
 
this is the prompt I use.

H:(\d+) M:(\d+) <([a-z- -]+)>

I use it to do....

#if (%pos( e, %3)) {#var Equilibrium 1} {#var Equilibrium 0}
#if (%pos( b, %3)) {#var Balance 1} {#var Balance 0}
#if (%pos( p, %3)) {} {}
#if (%1<=150 and @VialBal) {
drink health
VialBal = 0
} {
#if (%2<=150 and @VialBal) {
drink mana
VialBal = 0
}
}
#if (%numitems( @Queue) and @Balance and @Equilibrium) {%pop( Queue)}

THought that might help
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon May 01, 2006 9:21 pm   
 
#SETPROMPT should work for you. The syntax is:

#SETPROMPT "prompt text" var1 var2 varN

"prompt text" needs only be the first non-number character or set of non-numeric characters that starts out your prompt. In your example, "prompt text" could be either "H" or "H:" (I'd go with the latter, since you aren't likely to see any other line start out with that combination.)

var1...varN correspond to each number contained in your prompt text. These are the names of the variables and can be named anything you want, so your version would look like this:

#SETPROMPT "H:" hp mana endurance wp
_________________
EDIT: I didn't like my old signature
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