TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Strip color from a variable?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
zorlac



Joined: 14 Jan 2005
Posts: 19
Location: South America

PostPosted: Fri Feb 24, 2017 4:16 pm    Post subject: Strip color from a variable? Reply with quote

Hello,

I have a color trigger on my mud prompt that among other things captures into a variable my opponent name..

once i want to use that var over a conversation it displays the color codes:
ie:

You say: '?[1;32mRoyal guard?[37m?[0m'

is it possible to strip color codes from a variable? Right now i cant switch my color trigger to a plain one..cuz besides the opponent i do other stuff with colors that r working right.

help!
Thanks,Z
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Fri Feb 24, 2017 8:25 pm    Post subject: Reply with quote

you could use something like this
Code:

#line substitute variables #line strip #var {yourvar} {$yourvar}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group