-
1 Attachment(s)
Flash Client HP/Mana Bar
Hello!
I'm so excited for posting my first script, i'm newbie in lua, so if you find bugs, please report for fix it!
preview:
http://i.imgur.com/gQkW8dW.png[
Code:
--resize as you wish
local size = 300
-- don't change nothing below this if u don't know what u're doing
locationx = ($screenwin.width - 180) / 2 - size / 2
locationy = ($screenwin.height / 2) - (size/2) - 100
locationx2 = locationx + size - ((size + (size * 0.85)) / 2)
locationy2 = locationy + size - ((size + (size * 0.85)) / 2)
auto(100)
hp = 90 / (100 / $hppc)* - 1
mp = 90 / (100 / $mppc)
--both border
setbordercolor(1)
setfillstyle('color', -1)
drawpie(locationx, locationy, size, size, 45, -90)
drawpie(locationx, locationy, size, size, 135, 90)
--manabar
setfillstyle('color', 0x000099, 0)
drawpie(locationx, locationy, size, size, -45, mp)
--hpbar
setfillstyle('color', 0x499900, 0)
drawpie(locationx, locationy, size, size, 225, hp)
--transparency
setbordercolor(-1)
setfillstyle('color', -1)
drawcircle(locationx2, locationy2, size * 0.85, size * 0.85)
setfillstyle('color', 0)
setbordercolor(1)
drawarc(locationx2, locationy2, (size * 0.85) - 1, size * 0.85, 135, 90)
drawarc(locationx2, locationy2, size * 0.85, size * 0.85, 45, - 90)
--drawtext(locationx, 423, resh / 2 - 60)
Att,
-
Cool! I'll use it. Is it possible to the HUD not be in front of tibia messages like in the flash client? It's like if i hit any hotkey the some characters of the message "using..." get's behind the HUD. Same for player messages. On the flash client it has some transparency.
-
i must to learn more about that, i'll see what i can do,
thanks!
-
It's a neat thing, that's for sure.
Transparacy doesn't work, at all. And once you pull size up over 300 the healthbar (the green part of it) is one pixel offset from the borderbar, meaning that it doesn't fit 100%.
Also, once you update the size the elements aren't aligned properly, they slightly more to the right of the screen center. or rather it looks like that because the character grows up-left (it's a optical illusion really, but it needs to be countered, I think)
But, great job and I really approve of the idea :D
See how it appears to be farther to the right of my character?
http://i.imgur.com/gQkW8dW.png
-
i saw, i'll fix this now
@edit
@Hultin
i fixed this, but i didnt tested with another dimensions.
changed from
Code:
drawarc(locationx2, locationy2, size * 0.85, size * 0.85, 135, 90)
to
Code:
drawarc(locationx2, locationy2, (size * 0.85) - 1, size * 0.85, 135, 90)
and how you do post img without attach? ;p
-
@darklighty you can do it by uploading your image to imgur, it'll generate a BBCODE link for you that you simply paste here :)
-
@Hultin
yep, i saw...
i put your img on preiew, ok? :D
-
That's fine, although I would've appreciated if you had waited for my permission, but since it's ok I don't care tbh ^^
But use it as you wish :]
-
very nice, i wanted to write something similiar to this cuz this feature is awsum!
-
-
How to make it transparent not a solid hud? :)
-
-
1 Attachment(s)
it's nice but on windows xp its have a black screen
http://i.imgur.com/SCTCV6J.jpg
for fxing this bug just put after auto(100)
Code:
if $windowsxp then
setmaskcolorxp(0)
end
-
im getting a black square all over the HUD... =(
-- EDIT
now i saw the solutions... tks and sorry about the spam
-
@leovaka are u using win xp?
-
That script is nor "working" at 100% whit the transparency as u can see i take it and edit the script so u can find whit the transparency working here
@leovaka - @zimba - @gavri
-
it wont work with the new patch =( can u fix it?