Inspired by 9fires' MPGM, this is another subroutine for sending a bar graph meter via the text channel to your players. I was intending to merely shorten up his coding but ended up starting over from scratch using a different approach.
A small demo mod is available.
Variables are:
// - iValue: The length of the "foreground" color
// - oPC: The player the message is being sent to
// - sLabel: The label that appears to the left of the meter
// - iBackground: Optional; The background color of the meter; default is black
// - iForeground: Optional; The foreground color of the meter; default is green
// - iShowNumber: Optional; Whether to show the iValue number at the end of the
// graph default is off
// - iMax: Optional; The highest value iValue can be; default is 100 used for
// percentages
oops, thanks for catching that. Dark blue is wrong too. I'll update both shortly.
Posted by CAP 9fires at 2010-01-02 22:49:09 Voted 10.00 on 12/29/09
case 11 of the iBackground switch is wrong. Should read
case 11: sBackColor = STRING_COLOR_PURPLE; break;
And yeh, I dig the math, but I still prefer to calculate the percentage outside of the function.
Modified my MPGM to reflect your math, but essentially they're the same thing.
Well Gryphyn's coding is quite a bit different than mine but it certainly helped. To say it's "where Civious got his stuff from" makes it sound like I ripped it off.
Link (that's where I haunt)
Civ took the HCR stuff (HTF) I did for TheFold and extended it a bit.
It's only a fancy 'Display' proc, which I used to replace the default HCR one(s)
Posted by Fleshmelter at 2009-12-19 02:48:44 Voted 10.00 on 12/19/09
I'm sure I'll have something come from this =) how useful it is well....anyways thanks for this clever little add. _________________________ PW Action Server:
| Chaosgate |
Thanks for the votes. I got permission from Gryphyn to release his colored meter for the HCR2 hunger/thirst/fatigue systems. I'll be releasing it soon.
Posted by Primeval Atom at 2009-11-30 03:19:30 Voted 10.00 on 11/30/09
It is very neat...
I plan to use it for a HTF & Bonus XP
an increasing meter...
Very nice indeed
Thanks _________________________ (\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
Nice little piece of coding. I'm going to use it as an inspiration for my own scripting (since I'll be able to write my own with any options I want). _________________________ World of Aenea (Hall of Fame PW and the origin of all my works)
Vault Entries: The Complete List (50+ entries, including 17 Hall of Fame awards)
Self-Promotional Honesty: If you have opinions on stuff I've made, or if you use any of it (as a player or builder), I like comments/votes/feedback...so do other content makers and builders. Keep us motivated. :)
jdeavila: Actually one of the guys in our "group" made one for the HCR2 ruleset that is slightly different. I studied some of his code to make this and forgot to thank him...so a big thanks to Gryphyn ;) I'll ask him if he can release it, in any case we'll be using it in our PW
Can you do something like a "Hunger, Thirst, Fatigue" script system with this?..if so can you upload one for us non-scripter types - thanks! _________________________ Imtherealthing