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


Joined: 10 Dec 2001
Posts: 5
Location: Andorra

PostPosted: Sun Dec 23, 2001 9:26 pm   

Adding and removing text from the Status window
 
What I want to do is as follows:

When I get the line:
"The bees sting you into paralysis"

I want it to add the line
"F1 - cure paralysis"
to my status window.

and when i get the line
"you cured the paralysis"
to remove the line f1 - etc. etc.


and,, i want to be able to do this with multiple lines,, so that the lines on the status window would all be listed.

I hope someone can help me figure this out.
I like zmud,, but i'm not a great scripter


D.

lalala, jippie di doo
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Dec 23, 2001 11:31 pm   
 
#STW {@StatusMessages}
#TR {The bees sting you into paralysis} {
StatusMessages=%replace(@StatusMessages,%cr,"|")
#ADDITEM StatusMessages "F1 - cure paralysis"
StatusMessages=%replace(@StatusMessages,"|",%cr)
}
#TR {you cured the paralysis} {
StatusMessages=%replace(@StatusMessages,%cr,"|")
#DELITEM StatusMessages "F1 - cure paralysis"
StatusMessages=%replace(@StatusMessages,"|",%cr)
}

The point of turning it into a list and back again is to allow the wonderful #additem command to make sure no duplicates are created. If that isn't an issue then you can use %concat to add lines to the window and use %remove or %replace to take them out.
Reply with quote
demogorgon
Newbie


Joined: 10 Dec 2001
Posts: 5
Location: Andorra

PostPosted: Mon Dec 24, 2001 9:48 pm   
 
Works!
Thanks a bunch~!

lalala, jippie di doo
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