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
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Thu Jan 08, 2009 4:57 am   

Gauges within Status window
 
Is this possible?
If so, how?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Jan 08, 2009 5:27 am   
 
No, but you could either put a toolbar at the bottom and put gauges on it, or you could use an ASCII bar like:

HP: |||||||--- SP: |||-------
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Jan 08, 2009 6:55 am   
 
Well you can actually do what Fang said. I actually have all my health, mana, endurance, and willpower gauges displayed on my status bar.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Jan 08, 2009 5:06 pm   
 
Here is function I use to build a text based gauge for the status window... I updated some based code I saw somewhere on the forums a while ago. It returns a string and takes the current value, the max value and the length of the bar as inputs.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <func name="TextBar" copy="yes">
    <value><![CDATA[#if ($len<1) {#return "Illegal Length "$len}
$perc=($val*100)/$max
$remaining=(($len*100)-($len*$perc))/100
$length=$len-$remaining
#local $col
#switch ($perc < 26) {$col="red red"}
  ($perc <76) {$col="yellow yellow"}
  {$col="limegreen limegreen"}
#return {%concat("[","<color ",$col,">",%repeat(" ",$length),"</color><color black black>",%repeat("#",$remaining),"</color>","]")}]]></value>
    <arglist>$val,$max,$len</arglist>
  </func>
</cmud>


I've got to get back to build my packages. :)
_________________
Asati di tempari!
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