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

Matching list in regexp

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



Joined: 04 Dec 2012
Posts: 3

PostPosted: Wed Dec 05, 2012 2:56 pm    Post subject: Matching list in regexp Reply with quote

hi guys,

Is there a way I can use #list as a pattern in a #action?

My favorite mood is a rather hard fantasy mood where everything is 'in climate' and there are no numeric values etc. This is often annoying fo r aplayer especially when there is a lot of PK going on during guild wars etc

Say the idea is

Given a condition/health I want to display a numeric value next to it. I want to use lists so I can have a centralised function and just a set of variables to use with it.

I want

You are in great health to be changed to You are in great health [5/5]
You are in good health to be changed to You are in good health [4/5]

But I also want to use the same trick to achieve some special coloring for party members.

So what I'm trying to achieve in a code fashion is

#list {whatever} {create} {a} {b} {c}

#act {$whatever} {#echo {FOUND}}

#showme {a}

Expected result:

FOUND

Actual result

{nothing}
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Dec 06, 2012 8:14 am    Post subject: Reply with quote

You could try something like:
Code:

#act {%1 is in great health} {#var health[%1] [5/5];#var color[%1] <afa>}

#sub {%1 is in %2 health} {$color[%1]%1<ddd> is in %2 health $health[%1].}
Back to top
View user's profile Send private message Send e-mail
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