Results 1 to 5 of 5

Thread: Magic wll timer

  1. #1
    Normal User
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    Magic wll timer

    At as topic
    I see on forum some hud but not work ;/

  2. #2
    Normal User Nikare's Avatar
    Join Date
    Aug 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Code:
    --          ___             --    _______ _______  ______ _____ _______      _  _  _ _______ 
    --         /\  \          --    |  |  | |_____| |  ____   |   |            |  |  | |_____| |      | 
    --        /::\  \           --    |  |  | |     | |_____| __|__ |_____       |__|__| |     | |_____ |_____ 
    --       /:/\:\  \          -- 
    --      /::\~\:\  \         -- 
    --     /:/\:\ \:\__\        -- 
    --     \/_|::\/:/  /        --             _______ _____ _______ _______  ______ 
    --        |:|::/  /         --                |      |   |  |  | |______ |_____/ 
    --        |:|\/__/          --                |    __|__ |  |  | |______ |    \_ 
    --        |:|  |            -- 
    --         \|__|            -- 
    
    local SCRIPT = { 
        NAME = "Magic Wall Timer", 
        VERSION = "1.0", 
    } 
    
    -- ENGINE 
    -- DON'T CHANGE NOTHING BELOW THIS LINE 
    
    local MAGIC_WALLS = { 
        ID = {2128, 2129, 2130, 10181, 10182}, 
        TIME = {20000, 20000, 45000, 20000, 45000} 
    } 
    local POSITIONS = { 
        QUANTITY = 0, 
        X = {}, 
        Y = {}, 
        Z = {}, 
        TIMES = {} 
    } 
    
    local function inverse(n) 
        return tonumber(n) > 0 and tonumber("-" .. n) or math.abs(n) 
    end 
    
    local function findpixel(X, Y) 
        return {x = math.floor(worldwin.left / 2) + (inverse(X - posx) * (math.floor(worldwin.left / 15))), y = math.floor(worldwin.top / 2) + (inverse(Y - posy) * (math.floor(worldwin.left / 15)))} 
    end 
    
    setfontstyle("calibri", 8, "ffd700") 
    setposition(worldwin.left, worldwin.top) 
    
    for HORIZONTAL = -7, 7 do 
        for VERTICAL = -5, 5 do 
            local TOP_ITEM_ID = topitem(posx + HORIZONTAL, posy + VERTICAL, posz).id 
                    local MAGIC_WALL_INDEX = 0 
                    repeat 
                MAGIC_WALL_INDEX = MAGIC_WALL_INDEX + 1 
            until INDEX > #MAGIC_WALLS.ID or TOP_ITEM_ID == MAGIC_WALLS.ID[INDEX] 
            if MAGIC_WALL_INDEX <= #MAGIC_WALLS.ID then 
                local GROUND_INDEX = 0 
            repeat 
                GROUND_INDEX = GROUND_INDEX + 1 
            until (GROUND_INDEX > POSITIONS.AMOUNT) or ((POSITIONS.X[GROUND_INDEX] == posx + HORIZONTAL) and (POSITIONS.Y[GROUND_INDEX] == posy + VERTICAL) and (POSITIONS.Z[GROUND_INDEX] == posz)) 
                if GROUND_INDEX > POSITIONS.AMOUNT then 
                    POSITIONS.AMOUNT = POSITIONS.AMOUNT + 1 
                    table.insert(POSITIONS.X, POSITIONS.AMOUNT, posx + HORIZONTAL) 
                    table.insert(POSITIONS.Y, POSITIONS.AMOUNT, posy + VERTICAL) 
                    table.insert(POSITIONS.Z, POSITIONS.AMOUNT, posz) 
                    table.insert(POSITIONS.TIMES, POSITIONS.AMOUNT, timems + 200 + MAGIC_WALLS.TIME[MAGIC_WALL_INDEX]) 
                end 
            end 
        end 
    end 
    
    if POSITIONS.AMOUNT > 0 then 
        for INDEX = 1, POSITIONS.AMOUNT do 
            local MW_TIME = POSITIONS.TIMES[INDEX] 
            if MW_TIME == nil then 
                MW_TIME = 0 
            end 
            local TOP_ITEM_ID = topitem(POSITIONS.X[INDEX], POSITIONS.Y[INDEX], POSITIONS.Z[INDEX]).id 
            local MAGIC_WALL_INDEX = 0 
            repeat 
                MAGIC_WALL_INDEX = MAGIC_WALL_INDEX + 1 
            until MAGIC_WALL_INDEX > #MAGIC_WALLS.ID or TOP_ITEM_ID == MAGIC_WALLS.ID[MAGIC_WALL_INDEX] 
            if MW_TIME - timems > 0 and MAGIC_WALL_INDEX <= #MAGIC_WALL.ID then 
                if POSITIONS.Z[MAGIC_WALL_INDEX] == posz then 
                    local SCREEN = findpixel(POSITIONS.X[MAGIC_WALL_INDEX], POSITIONS.Y[MAGIC_WALL_INDEX]) 
                    addtext(string.format("%.2d:%.1d", (MW_TIME - timems) / 1000, (MW_TIME - timems) % 1000), SCREEN.x + 8, SCREEN.y + 12) 
                end 
                    else 
                POSITIONS.AMOUNT = POSITIONS.AMOUNT - 1 
                table.remove(POSITIONS.X, MAGIC_WALL_INDEX) 
                table.remove(POSITIONS.y, MAGIC_WALL_INDEX) 
                table.remove(POSITIONS.z, MAGIC_WALL_INDEX) 
                table.remove(POSITIONS.TIMES, MAGIC_WALL_INDEX) 
            end 
        end 
    end
    Last edited by Nikare; 11-14-2012 at 04:49 PM.

  3. #3
    Normal User
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    does not work

  4. #4
    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
    You need Ropiderz library aswell.

  5. #5
    Normal User
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5
    I have Sirmate/Ropiderz/Raphael/standard .lua and still does not work

Posting Permissions

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