Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Free User darklighty's Avatar
    Join Date
    Mar 2014
    Location
    Mogi das Cruzes - SP
    Posts
    28
    Reputation
    10
    Rep Power
    0

    Talking 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:
    [

    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,
    Attached Images Attached Images
    Last edited by darklighty; 03-20-2014 at 06:17 PM. Reason: fixed draw fit, thanks Hultin

  2. #2
    Free User
    Join Date
    Jan 2014
    Posts
    59
    Reputation
    10
    Rep Power
    21
    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.

  3. #3
    Free User darklighty's Avatar
    Join Date
    Mar 2014
    Location
    Mogi das Cruzes - SP
    Posts
    28
    Reputation
    10
    Rep Power
    0
    i must to learn more about that, i'll see what i can do,
    thanks!

  4. #4
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    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

    See how it appears to be farther to the right of my character?
    Last edited by Hultin; 03-20-2014 at 05:33 PM.

  5. #5
    Free User darklighty's Avatar
    Join Date
    Mar 2014
    Location
    Mogi das Cruzes - SP
    Posts
    28
    Reputation
    10
    Rep Power
    0
    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
    Last edited by darklighty; 03-20-2014 at 06:14 PM.

  6. #6
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    @darklighty you can do it by uploading your image to imgur, it'll generate a BBCODE link for you that you simply paste here

  7. #7
    Free User darklighty's Avatar
    Join Date
    Mar 2014
    Location
    Mogi das Cruzes - SP
    Posts
    28
    Reputation
    10
    Rep Power
    0
    @Hultin
    yep, i saw...
    i put your img on preiew, ok?

  8. #8
    Banned
    Join Date
    Feb 2014
    Location
    Leetstreet
    Posts
    324
    Reputation
    38
    Rep Power
    0
    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 :]

  9. #9
    Free User xyyyyllo's Avatar
    Join Date
    Dec 2013
    Posts
    95
    Reputation
    27
    Rep Power
    21
    very nice, i wanted to write something similiar to this cuz this feature is awsum!
    Sig removed

    said the mod

  10. #10
    Banned
    Join Date
    Dec 2013
    Posts
    44
    Reputation
    11
    Rep Power
    0
    good job man,

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •