 |
DgateTam Newbie
Joined: 27 Nov 2002 Posts: 5 Location: USA
|
Posted: Wed Nov 27, 2002 1:22 pm
Variable Manipulation Q. |
I am a GM for an MMORPG that uses a script for running a special set of gladitorial games. I am running into an issue with variable manipulation when it comes to restoring the life of a character with punctuation in their names.. such as ' or - The pattern catches the name correctly and stores it as a variable like this:
Pattern: (^~*->((%x) just died.)
Command:
#CW bright,green
#ECHO ~[System] Player %1 added to death list.
#VARIABLE @{%1} 1
However when the following is received,
Pattern: ~[GM] (%x) ~[(%w)] reports: Aeron dead
Command:
#CW bright,blue
#IF (@{%1} = 1) {
fix %1
#VARIABLE @{%1} 0
} {
#ECHO ~[System] *** %1 is requesting a heal when not dead.
#PLAY c:zmudwrong.wav
}
the system returns a false every time and truncates the first part of the name variable.. Is there something I'm missing?
Thanks in advance for any advice. |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Nov 27, 2002 5:28 pm |
It took awhile, but I finally realized that your problem is indirect variable names. The quickest solution is to use a different method.
Pattern: (^~*->~((%x) just died.~)
Command:
#CW bright,green
#ECHO ~[System] Player %1 added to death list.
#ADDITEM dead {%1}
Pattern: ~[GM] (%x) ~[(%w)] reports: Aeron dead
Command:
#CW bright,blue
#IF (%ismember({%1}, @dead)) {
fix %1
#DELITEM dead {%1}
} {
#ECHO ~[System] *** %1 is requesting a heal when not dead.
#PLAY c:zmudwrong.wav
}
LightBulb
Senior Member |
|
|
|
 |
DgateTam Newbie
Joined: 27 Nov 2002 Posts: 5 Location: USA
|
Posted: Wed Nov 27, 2002 5:37 pm |
Thanks for the info! I'll drop that into the script and try it out. :)
|
|
|
|
 |
|
|
|