|
demogorgon Newbie
Joined: 10 Dec 2001 Posts: 5 Location: Andorra
|
Posted: 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 |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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. |
|
|
|
demogorgon Newbie
Joined: 10 Dec 2001 Posts: 5 Location: Andorra
|
Posted: Mon Dec 24, 2001 9:48 pm |
Works!
Thanks a bunch~!
lalala, jippie di doo |
|
|
|
|
|
|
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
|
|