|
Deneir Beginner
Joined: 14 Feb 2003 Posts: 19 Location: USA
|
Posted: Tue Feb 18, 2003 5:05 pm
StatusWindow Problem |
Okies first off someone will probably ask me why i dont use #Cap for this well the reason is my #cap screens are up top and there isnt enough room for this special project i want to do so im putting it on my prompt bar wich i keep to the left of my screen:
The project is i want to put the mudmap of Necromium on the prompt wich so far ive been able to do with only one real problem :( it wont show Zmud special characters on the prompt so the map looks all distorted i need to know how to replace the special chars *mainly the # char* in the variable i use. Heres what the map looks like.
| @m++s++b@ |
| @+++++++@ |
|@@@@+++++++@ |
|#++++++*++t@ |*This Part wont show up*
|@^@@--+++++@ |
| @@@|++++@ |
| @@@|+++d@ |
| @@@@+@@@@ |
`---------------'
As far as i know everything else shows up they might not.
Heres the triggers im using to put the map on my STW:
This one keeps the map from stacking over and over:
#trigger {,---------------.} {#var Test {};#class Test 1}
And this one sets the variable:
#trigger {~|(*)~|} {#VAR Test %addItem( "%cr %ansi(white)X~%1X", @Test)}
I added the X thing so that it would still show up the border of the map any help would be appreciated thanks :) |
|
|
|
Deneir Beginner
Joined: 14 Feb 2003 Posts: 19 Location: USA
|
Posted: Tue Feb 18, 2003 5:15 pm |
I tested it and neither will the @ signs im guessing now actual command type chars will transfer to the STW :(
|
|
|
|
Daagar Magician
Joined: 25 Oct 2000 Posts: 461 Location: USA
|
Posted: Tue Feb 18, 2003 11:11 pm |
Does changing '*' to '%*' in your trigger fix the problem? This is typically considered a security risk as someone could trick your trigger to do something nasty, but for triggering on special characters, %* is necessary. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Feb 18, 2003 11:12 pm |
quote:
I tested it and neither will the @ signs im guessing now actual command type chars will transfer to the STW :(
check out the %quote() function. You might have to build an extender or something for a few characters, but this should be exactly what you're looking for. Apply this function to every instance where you use @Test and you should be good to go.
li'l shmoe of Dragon's Gate MUD |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Feb 19, 2003 12:59 am |
Use this trigger in your Test class. Three things of note, naming a class and a variable the same is considered a bad idea. This trigger makes use of the hazardous %* wildcard. This trigger does not use %1 in it script body to reduce the hazards associate with %*, but the hazard still exists, hence more braces and things.
#trigger {~|(%*)~|} {#VAR Test {%addItem( %concat(%cr,%ansi(white),%replace(%trigger,"|","X")), %expand(@Test,1))}} |
|
|
|
Deneir Beginner
Joined: 14 Feb 2003 Posts: 19 Location: USA
|
Posted: Wed Feb 19, 2003 9:11 am |
quote:
Use this trigger in your Test class. Three things of note, naming a class and a variable the same is considered a bad idea. This trigger makes use of the hazardous %* wildcard. This trigger does not use %1 in it script body to reduce the hazards associate with %*, but the hazard still exists, hence more braces and things.
#trigger {~|(%*)~|} {#VAR Test {%addItem( %concat(%cr,%ansi(white),%replace(%trigger,"|","X")), %expand(@Test,1))}}
Worked just about Perfectly thanks alot :) |
|
|
|
|
|