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
Deneir
Beginner


Joined: 14 Feb 2003
Posts: 19
Location: USA

PostPosted: 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 :)
Reply with quote
Deneir
Beginner


Joined: 14 Feb 2003
Posts: 19
Location: USA

PostPosted: 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 :(

Reply with quote
Daagar
Magician


Joined: 25 Oct 2000
Posts: 461
Location: USA

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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))}}
Reply with quote
Deneir
Beginner


Joined: 14 Feb 2003
Posts: 19
Location: USA

PostPosted: 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 :)
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