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
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Sun Jul 31, 2005 1:08 pm   

Prompt Question
 
Bit of a complicated one, but here goes..

I have an alias "add" which will add whatever follows it to a list of afflictions if it's not on there already. For example, "add deaf" would add "deaf" to my current afflictions, and so on. Conversely, "rem" will remove whatever follows it from the list.

Okay, so far so good -- however, the MUD I'm on includes some basic affliction idicators at the end of its prompt, as in the following example...

H:231 M:339 E:1056 W:1596 <eb d>

The "d" at the end of the prompt would indicate deafness, so naturally I'd want this triggered with the value "add deaf" as mentioned above.

And this is where the problems start.
My prompt trigger is as follows...

H:&currenthealth M:&currentmana E:&currentendurance W:&currentwillpower ~<(?)(?)?(?)(?)(?)(?)~>

... and amongst its value is the line...

#IF (%7=d) {add deaf} {rem deaf}

And it doesn't work. As far as I can see it -should- work, but doesn't.
Bit stuck on this one so I'd really appreciate any suggestions.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun Jul 31, 2005 3:27 pm   
 
There have been Many posted examples of how to do this, a quick search would help!

as a quick breakdown

#TR {~<(*)>} {
#IF %pos("d","%1") {add deaf} {rem deaf}
}
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Sun Jul 31, 2005 6:59 pm   
 
Ah, thank you. You're right, I should have searched for that before posting - I guess hours of wrestling with the script had left me a little frazzled. Thanks again.
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