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
burgoin
Newbie


Joined: 23 Sep 2008
Posts: 2

PostPosted: Tue Nov 04, 2008 12:04 am   

Parsing a variable flag string
 
The mud that I play on has a set of variable flags that can be shown in the prompt. The flags only appear if the condition exists so the lenght and data in the flag string changes based on what conditions you are in. I have copied a sample prompt string that includes all the appropriate flags as follows:

[F_chipApStxBMXYZ |153/163hp|143/150en|123/137mv|243/258mmv|NEWS]

The flags are designated by chipApStxBMWYZ.

I have created the following trigger to trap the data from my prompt.

^~[F_&{flags} ~|&{hp}/&{hpmax}hp~|&{en}/&{enmax}en~|&{pmv}/&{pmvmax}mv~|&{mmv}/&{mmvmax}mmv~|*~]

Therefore the value that would be in the @flags variable would be chiPApStxBMWYZ.

I want to be able to search this string to determine if each character is present and if it is update variables for each so that I can control my status bar, buttons and other script control variables?

What is the best way to search this string for each individual character and how can I distinguish between the upper and lower case characters?

Thanks for any suggestions you might have.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Nov 04, 2008 3:30 am   
 
You are looking for the %pos function. It is case sensitive.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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