Results 1 to 10 of 10

Thread: Huds on the right?

  1. #1
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10

    Huds on the right?

    Huds are not my area of expertise... Can someone give me an example (Maybe with my basic hud) of how to put a hud coming off the right side of the window?

    A Number of my scripts have a loot counter and the loot counter/profit are going out the bottom of the screen, so I want to move my general hud to the right and then move the loot counter up higher.


    My general hud is quite basic and may need to be re-written to be able to be moved over, but I'm not sure.

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Try something like this
    PHP Code:
    clientwin.right 500 

  3. #3
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    was doin that stuff like that, just made the whole hud disappear. can you give an exampple of a font change, colour change and 1-2 lines of text.

  4. #4
    Normal User
    Join Date
    Oct 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5
    Quote Originally Posted by pink_panther View Post
    was doin that stuff like that, just made the whole hud disappear. can you give an exampple of a font change, colour change and 1-2 lines of text.
    Hi PinkPanther,

    Ive been using your Hellheim script for a while and i edited it some time ago to appear on the right just by changing the X position. Not sure if u wanted something else but here is my version of it in case it can help you (not like i did much lol):

    PHP Code:
    -- [ General Info HUD by ToadZ v0.4 ] --   http://www.tibiaibot.com/forum/showthread.php?8212-General-Info-HUD-by-ToadZ

    local lootitems = {"broken key ring""gold ingot""bonelord eye""demonic essence""hardened bone""yellow piece of cloth""unholy bone""piece of dead brain""giant eye""ultimate health potion""small diamond""black pearl""small sapphire""bony tail""great health potion""white pearl""silver brooch""elder bonelord tentacle""great mana potion""platinum coin""assassin star""brown piece of cloth""small flask of eyedrops""gauze bandage""life crystal""demonic skeletal hand""strong mana potion""ghoul snack""half-digested piece of meat""mana potion""health potion""flask of embalming fluid""rotten piece of cloth""pile of grave earth""gold coin""green mushroom"        "bloody edge""divine plate""mini mummy""amulet of loss""skull helmet""royal helmet""golden armor""dragon slayer""spellweaver's robe""war axe""tower shield""haunted blade""bonelord helmet""skull staff""bonebeast trophy""blue gem""spiked squelcher""knight armor""titan axe""dragonbone staff""skeleton decoration""terra rod""guardian shield""ruby necklace""bonelord shield""death ring""spike sword""black shield""stone skin amulet""golden mug""crystal ring""life ring""concentrated demonic blood"}


    local lootsvalue = {8000500040001000100050048042038031030028025021019016015015012010010010095908580806055504530302511009999999999999999999999999450004000030000200001500012000900080008000750060006000500050005000400030003000200020002000120010001000800500250250500}

    local showLoots true 
    local y 
    30 
    local x 
    980 
    local totall 

    local total 

    local loots 
    getitems(unpack(lootitems))  
    local qtdl loots.count-1  
    local 
    function captalizeAll(firstrest
      return 
    first:upper()..rest:lower() 
    end 

    if showLoots then  
    setfontcolor
    ("white"
    addtext('-----------------------------------------'1000y
    setfontcolor("yellow")  
    10  
    addtext
    ('         [ Items looted ]'1015y
    10  
    setfontcolor
    ("white")  
    addtext('-----------------------------------------'1000y
    10  
    for i=0,qtdl do  
    if 
    loots[i].loot 0 then  
    lootname 
    loots[i].name:gsub("(%a)([%w_']*)"captalizeAll)  
    if 
    string.len(loots[i].name) > 17 then  
    addtext
    (string.sub(lootname1sub)..".."xy)  
    else 
    addtext(lootnamexy
    end  
    addtext
    ("- "..loots[i].loot.." ("..(math.floor(loots[i].loot*lootsvalue[i+1] / 100)/10).."k)"1130ytotall totall loots[i].loot*lootsvalue[i+115 end end  
    10  
    addtext
    ("Total"xy)  
    addtext("-"120y)  
    addtext(totall.." GPs",1110y)  
    10 end 

  5. #5
    Normal User
    Join Date
    Oct 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5
    PHP Code:
    1000
    20
    local Type 
    "Comic Sans Ms"
    local Size 12
    local Color 
    "white"
    local Color2 rgbcolor(1,1,1)

    setfontstyle(TypeSizeColor)
    addtext('Anything'xy)

    setfontstyle(TypeSizeColor2)
    addtext('Something'xy+20
    PHP Code:
    clientwin.right*0.7
    clientwin.top+40 
    local Type1 
    "Comic Sans Ms" 
    local Type2 "Arial" 
    local Size 12 
    local Color 
    "White" 

    setfontstyle(Type1SizeColor
    addtext('Anything'xy)
    setfontstyle(Type2SizeColor
    addtext('Something'xy+20
    Little example :P But i guess the hard part is not to add text but to make the HUD itself
    Last edited by Lawlz; 01-14-2013 at 06:12 PM.

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    I use ToadZ hud for loot counting. but I understand you can easily just increase the X Pos so it fits on your right side, but what im trying to do is have it come off the right side the way it comes off the left, so no matter what size screen you have, it will still be in the correct place.

  7. #7
    Normal User
    Join Date
    Oct 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    15
    Rep Power
    5
    When i used clientwin.right*0.7 it appeared like that on my screen and i guess it should be on any resolution. Maybe adding something to make sure it is an integer? Not sure if that exists.

  8. #8
    Normal User
    Join Date
    May 2012
    Location
    England
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    16
    Rep Power
    5
    Position = worldwin.right + 10?

  9. #9
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    ill try that when i get home.

  10. #10
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Ok, I understand now.

    worldwin.right is what I was after.

    clientwin.right + anything causes it to go out the right side of the screen, which is why I couldnt see it. If I have clientwin.right - 500 than it comes back this (<---) way, so i can see it.

    thanks for the help.

Posting Permissions

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