Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Plugins
➜ Health Bar
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Adam Petersen
(17 posts) Bio
|
Date
| Fri 25 Apr 2003 09:40 PM (UTC) |
Message
| Can someone please make a Health and mana bar for like the side of the screen in a plugin? | Top |
|
Posted by
| Vaejor
(120 posts) Bio
|
Date
| Reply #1 on Fri 25 Apr 2003 10:04 PM (UTC) |
Message
| The info bar can only be mounted in the top or bottom of MushClient I believe. From what I understand, this is a limitation of code that Nick doesn't have any direct access to changing, only using what he's given.
| Top |
|
Posted by
| Adam Petersen
(17 posts) Bio
|
Date
| Reply #2 on Sun 27 Apr 2003 05:33 AM (UTC) |
Message
| I dont care were it is, as long as it is there! | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 28 Apr 2003 12:11 AM (UTC) |
Message
| See Plugins - Health Bar entry. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Matthias
(28 posts) Bio
|
Date
| Reply #4 on Mon 11 Aug 2003 04:12 PM (UTC) |
Message
| Is there a way to make the Health bar more accurate? (ie, changing when I've lost 1/50 of my health instead of every 10th?) |
Give a man a fire and you warm him for a day.
Set a man on fire and you warm him for the rest of his life. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #5 on Mon 11 Aug 2003 07:59 PM (UTC) |
Message
| I think the 3 places you would change in the plugin are (in bold here) ...
pc = CInt ((CInt (iCurrent) / CInt (iMax)) * 50)
'
' Below 20% warn by using different colour
'
if pc < 10 then
InfoColour sBadColour
else
InfoColour sGoodColour
end if
'
' Draw active part of gauge
'
for count = 0 to pc
Info "g"
next
'
' Draw rest of gauge in grey (ie. unfilled bit)
'
InfoColour "dimgray"
while count <= 50
count = count + 1
Info "g"
wend
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Shadowfyr
USA (1,791 posts) Bio
|
Date
| Reply #6 on Mon 11 Aug 2003 08:11 PM (UTC) |
Message
| If you nose a round you may find a script called HSLtoRGB. This can be used to make something more visually accurate by letting you recalc the color, brightness and purity (amount of grey) in the color you use to show your current health on the bar. However, I made one attempt to create a font that was only one pixel wide to use for producing such a bar with far better accuracy. Either the code for the bar won't support .FON fonts, or I messed something up in the font. Unfortunately I don't know of any super-thin .TTF fonts, which is what you would need to use in place of the existing one to make it more accurate. In theory, 0-100 could be any multiple of 100 dots, so a computer using 640x480 could show close to a 0-600 range, 'if' you could find a font thin enough to only display one pixel wide and not have any spaces around it.
The reason you can't manage this is that most fonts are 10x8 or 12x10, etc. So with 10 positions you are looking at 100-120 lines. With 50 it is 500-600 lines or the entire bar on a 640x480 display. For something like 1024x768 you can do much better, but only by having the client maximized, which I think looks silly, since half your output window is unused. So yes, you could change it in the DoGauge script itself to use 50 steps, but the result isn't very useful unless you can also shrink the width of the lines. But since changing the width also makes them shorter, you would have, say with an 8x6 font, a line that was 6 dots all and 400 long. It would take up nearly the entire infobar and end up being hard to see besides. :( | Top |
|
Posted by
| Matthias
(28 posts) Bio
|
Date
| Reply #7 on Thu 14 Aug 2003 08:37 PM (UTC) |
Message
| What would I do if I wanted to change the bar from using the webdings box to that line above the enter key? |
Give a man a fire and you warm him for a day.
Set a man on fire and you warm him for the rest of his life. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #8 on Thu 14 Aug 2003 08:42 PM (UTC) |
Message
| Remove the line where it switches to WebDings font, and change:
Info "g"
to
Info "|"
in 2 places. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Matthias
(28 posts) Bio
|
Date
| Reply #9 on Thu 14 Aug 2003 09:06 PM (UTC) |
Message
| Is there a way to get rid of those spaces in between the lines when I change it to the line? |
Give a man a fire and you warm him for a day.
Set a man on fire and you warm him for the rest of his life. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #10 on Thu 14 Aug 2003 11:01 PM (UTC) |
Message
| That was why I chose the Webdings font - that font is designed to be used as graphics, and the letters run into each other. If you choose a normal font, then it is designed to keep letters apart so you can read them.
All I can suggest is experiment with different fonts, like Webdings or Symbol (or similar) until you find a suitable character that draws a short line. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Matthias
(28 posts) Bio
|
Date
| Reply #11 on Fri 15 Aug 2003 03:27 AM (UTC) |
Message
| Ah, Arial Narrow's line works... |
Give a man a fire and you warm him for a day.
Set a man on fire and you warm him for the rest of his life. | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #12 on Sat 16 Aug 2003 04:13 AM (UTC) |
Message
| See Super Health Bar for my attempt to do a better job. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
36,798 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top