Results 1 to 5 of 5

Thread: Question about HUD

  1. #1
    Normal User Juryaa's Avatar
    Join Date
    Jun 2012
    Location
    Santa Catarina, Brazil
    Posts
    410
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5

    Question about HUD

    I wonder how to put the HUD that shows the recent loots just above the chat (default server log, etc).

    Thanks in advance.

  2. #2
    iBot User
    Join Date
    Feb 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    30
    Rep Power
    5
    PHP Code:
    -- you can add more items here
    local warnitems 
    = {'dragon shield''wand of inferno''serpent sword','dragon hammer'}

    -- 
    max lines to display at once 
    local maxindex 


    -- spacing between lines
    local spacing 
    15


    local index 

    local msgs 
    getmessages("Server Log")
    local qtd msgs.count-1
    for i=0,qtd do
       if 
    msgs[qtd-i].type == 19 and msgs[qtd-i].text:find('Loot of 'then
          
          local colorm 
    false
          local l 
    0
          
    for l=1table.getn(warnitems) do
             if 
    msgs[qtd-i].text:find(warnitems[l]) then
                colorm 
    true
                
    break
             
    end
          end
          
    if colorm then
             setfontcolor
    ('red')
          else
             
    setfontcolor('green')
          
    end

          addtext
    (msgs[qtd-i].textworldwin.left+5,worldwin.bottom-(maxindex*spacing)+20+(index*spacing))

          
    index=index+1
          
    if index == maxindex then
            
    break
          
    end
       end
    end 
    add this on HUD sector, credits to jonatas

  3. #3
    Normal User Juryaa's Avatar
    Join Date
    Jun 2012
    Location
    Santa Catarina, Brazil
    Posts
    410
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5
    Quote Originally Posted by coalamct View Post
    PHP Code:
    -- you can add more items here
    local warnitems 
    = {'dragon shield''wand of inferno''serpent sword','dragon hammer'}

    -- 
    max lines to display at once 
    local maxindex 


    -- spacing between lines
    local spacing 
    15


    local index 

    local msgs 
    getmessages("Server Log")
    local qtd msgs.count-1
    for i=0,qtd do
       if 
    msgs[qtd-i].type == 19 and msgs[qtd-i].text:find('Loot of 'then
          
          local colorm 
    false
          local l 
    0
          
    for l=1table.getn(warnitems) do
             if 
    msgs[qtd-i].text:find(warnitems[l]) then
                colorm 
    true
                
    break
             
    end
          end
          
    if colorm then
             setfontcolor
    ('red')
          else
             
    setfontcolor('green')
          
    end

          addtext
    (msgs[qtd-i].textworldwin.left+5,worldwin.bottom-(maxindex*spacing)+20+(index*spacing))

          
    index=index+1
          
    if index == maxindex then
            
    break
          
    end
       end
    end 
    add this on HUD sector, credits to jonatas
    Not work.

  4. #4
    Banned
    Join Date
    May 2012
    Posts
    1,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    127
    Rep Power
    0
    It works.Put it on the HUD section and then enable

  5. #5
    Normal User Juryaa's Avatar
    Join Date
    Jun 2012
    Location
    Santa Catarina, Brazil
    Posts
    410
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5
    Quote Originally Posted by BUgWT View Post
    It works.Put it on the HUD section and then enable
    I put, but appears only normal hud.

Posting Permissions

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