Results 1 to 3 of 3

Thread: [HUD] Raid message

  1. #1
    iBot User
    Join Date
    Jul 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    [HUD] Raid message

    As topic. Anyone can do it for me? I need raid message in hud like it is with private message.

  2. #2
    iBot User
    Join Date
    Jun 2012
    Posts
    517
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    4 Post(s)
    Reputation
    132
    Rep Power
    7
    PHP Code:
    -- max lines to display at once 
    local maxindex 
    16

    -- spacing between lines
    local spacing 
    11

    local 
    function addtextshadow(textcolorxposypos)
        
    setfontcolor(rgbcolor(111))
        
    addtext(textxpos+1ypos)
        
    addtext(textxpos-1ypos)
        
    addtext(textxposypos+1)
        
    addtext(textxposypos-1)
        
    setfontcolor(color)
        
    addtext(textxposypos)
    end

    local index 

    local msgs 
    getmessages("Server Log")
    local qtd msgs.count-1
    for i=0,qtd do
        if 
    msgs[qtd-i].type == 15 then
            addtextshadow
    (msgs[qtd-i].textrgbcolor(255255255), worldwin.left+5,worldwin.bottom-(maxindex*spacing)+20+(index*spacing))
            
    index=index+1
            
    if index == maxindex then
                
    break
            
    end
        end
    end 
    Last edited by GabrielTOTS; 11-04-2013 at 06:29 AM.

  3. #3
    Banned
    Join Date
    Jun 2012
    Location
    Ceará
    Posts
    2,114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    81
    Rep Power
    0
    This one will save to the file files/raids.txt all the raids received:

    Btw garkstal used type 18 instead of 15 it'll not work, I have edited his script to the correct usage.

    Lua Code:
    local fl = '../files/raids.txt'
    local ms = getnewmessages("Server Log")
     
    for i = 0, ms.count-1 do
        local m = ms[i]
        if m.type == 15 then
            local hd = io.open(fl)
            if hd == nil then
                local _ = io.open(fl, 'w+')
                _:close()
            else
                hd:close()
            end
            hd = io.open(fl, 'a+')
            hd:write(m.text)
            hd:close()
        end
    end
    Last edited by GabrielTOTS; 11-04-2013 at 06:29 AM.

Posting Permissions

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