Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
pelonza
Beginner


Joined: 19 Dec 2007
Posts: 18

PostPosted: Wed Jun 15, 2011 7:41 pm   

Complicated Status Capture
 
So, to start, I should say I'm still working with CMUD 2.7 (yeah, I should upgrade...didn't know new was one was until I recently start playing again)...

I've got a status capture set up for our MUDs HP bar. Now, the HP bar is somewhat configurable. I currently have it set to the following:

HP: #hp/#mhp SP: #sp/#msp Conc: #c hh Force: #f mm Mode: #lm Charge: #%c DReset:#dr rr Diss:#dn/#dm dd Nrg: #ng GXP: #gxp Dflags: #df kk
Enemlol: Enemy: #es

Where each of the "#" 's are variables that the MUD supplies values for.

I've got the funny mm,hh, etc in because I was having trouble getting the variable triggers to extract values.

Currently my status trigger looks like:

HP: &Hp/&Hpmax SP: &Sp/&SPmax Conc: &Conc% hh Force: &Forc% mm Mode: &Bmode Charge: &BCharge1 DReset: &Dreset rr Diss:&Dleft/&Dmax dd Nrg: &nrg GXP: &egxp Dflags: &dflags kk

with a separate line/trigger for the enemy status.

Here's the problem: both the "Conc" and "Force" are reported IN percentages. I.e. the MUD inserts for #c : 100.0% ... but I want to capture JUST the value. Or at least extract it in some way from the variable &Conc, because I'd like to set up a gauge or other triggers on the numerical value. Right now what gets saved to "Conc" is : 100.0% EVEN THOUGH I have the '%' in the capture trigger. Similar problem for the Forc variable.

Basically, I want to be able to set a trigger/gauge that warns me when the value in Conc gets below 15%, or Forc >80% (it counts up). Right now gauges and triggers would have to be written for every single percentage point I think. Or maybe I just don't understand the scripting enough...

~Pelonza
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jun 15, 2011 8:56 pm   
 
% is a special character in trigger patterns. Quote it.
_________________
EDIT: I didn't like my old signature
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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