Results 1 to 10 of 10

Thread: magic wall timer

  1. #1
    Normal User
    Join Date
    Feb 2012
    Posts
    178
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    11
    Rep Power
    5

    magic wall timer

    Hello need new magic wall timer please code

  2. #2
    iBot User
    Join Date
    May 2012
    Location
    USA
    Posts
    153
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    16
    Rep Power
    5
    Code:
    -- ___ -- _______ _______ ______ _____ _______ _ _ _ _______
    -- /\ \ -- | | | |_____| | ____ | | | | | |_____| | |
    -- /::\ \ -- | | | | | |_____| __|__ |_____ |__|__| | | |_____ |_____
    -- /:/\:\ \ --
    -- /::\~\:\ \ --
    -- /:/\:\ \:\__\ --
    -- \/_|::\/:/ / -- _______ _____ _______ _______ ______
    -- |:|::/ / -- | | | | | |______ |_____/
    -- |:|\/__/ -- | __|__ | | | |______ | \_
    -- |:| | --
    -- \|__| --
    
    -- ENGINE
    -- DON'T CHANGE NOTHING BELOW THIS LINE
    
    local SCRIPT = {
    NAME = "Magic Wall Timer HUD",
    VERSION = "1.0",
    }
    
    MAGIC_WALLS = MAGIC_WALLS or {
    ID = {2128, 2129, 2130, 10181, 10182},
    TIME = {20000, 20000, 45000, 20000, 45000}
    }
    
    POSITIONS = POSITIONS or {
    QUANTITY = 0,
    X = {},
    Y = {},
    Z = {},
    TIMES = {}
    }
    
    local function findpixel(X, Y)
    H = math.floor(worldwin.width / 2) + ((X - posx) * (math.floor(worldwin.width / 15)))
    V = math.floor(worldwin.bottom / 2) + ((Y - posy) * (math.floor(worldwin.width / 15)))
    return {x = H - 9, y = V + 12}
    end
    
    setfontstyle("calibri", 8, "ffd700")
    setposition(worldwin.left, worldwin.top)
    
    for HORIZONTAL = -7, 7 do
    for VERTICAL = -5, 5 do
    local TOP_ITEM_ID = toptileitem(posx + HORIZONTAL, posy + VERTICAL, posz)
    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 MAGIC_WALL_INDEX <= #MAGIC_WALLS.ID then
    local GROUND_INDEX = 0
    repeat
    GROUND_INDEX = GROUND_INDEX + 1
    until (GROUND_INDEX > POSITIONS.QUANTITY) or ((POSITIONS.X[GROUND_INDEX] == posx + HORIZONTAL) and (POSITIONS.Y[GROUND_INDEX] == posy + VERTICAL) and (POSITIONS.Z[GROUND_INDEX] == posz))
    if GROUND_INDEX > POSITIONS.QUANTITY then
    POSITIONS.QUANTITY = POSITIONS.QUANTITY + 1
    table.insert(POSITIONS.X, POSITIONS.QUANTITY, posx + HORIZONTAL)
    table.insert(POSITIONS.Y, POSITIONS.QUANTITY, posy + VERTICAL)
    table.insert(POSITIONS.Z, POSITIONS.QUANTITY, posz)
    table.insert(POSITIONS.TIMES, POSITIONS.QUANTITY, timems + 200 + MAGIC_WALLS.TIME[MAGIC_WALL_INDEX])
    end
    end
    end
    end
    
    if POSITIONS.QUANTITY > 0 then
    for INDEX = 1, POSITIONS.QUANTITY do
    local MW_TIME = POSITIONS.TIMES[INDEX]
    if MW_TIME == nil then
    MW_TIME = 0
    end
    local TOP_ITEM_ID = toptileitem(POSITIONS.X[INDEX], POSITIONS.Y[INDEX], POSITIONS.Z[INDEX])
    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_WALLS.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:%.2d", (MW_TIME - timems) / 1000, (MW_TIME - timems) % 1000 / 10), SCREEN.x + 8, SCREEN.y + 12)
    end
    else
    POSITIONS.QUANTITY = POSITIONS.QUANTITY - 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
    just searched forum not tested you will have to try yourself ;p

  3. #3
    Normal User Y4rR0's Avatar
    Join Date
    May 2012
    Location
    Warsaw, Poland
    Posts
    596
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    18 Post(s)
    Reputation
    87
    Rep Power
    6
    How about drawwallstimer()? Its new HUD function from update v2.0.2

  4. #4
    Normal User
    Join Date
    Jun 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by Y4rR0 View Post
    How about drawwallstimer()? Its new HUD function from update v2.0.2
    how to use it exactly?

  5. #5
    Focus Group bofing's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    664
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    52 Post(s)
    Reputation
    95
    Rep Power
    6
    Quote Originally Posted by Aiven View Post
    how to use it exactly?
    HUD > List > Options / new > drawwallstimer() - in HUD action > drop refreshrate a bit lower > set hud enabled

  6. #6
    iBot User
    Join Date
    May 2012
    Location
    USA
    Posts
    153
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    16
    Rep Power
    5
    Quote Originally Posted by Y4rR0 View Post
    How about drawwallstimer()? Its new HUD function from update v2.0.2
    I didn't know it was released on this version glad you said that!

  7. #7
    Normal User
    Join Date
    Jun 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    well it works, but this is really anoying when you're running around many mag walls on battle, and those numbers on mw just jump up/down all the time~~ any solution?

  8. #8
    Normal User Hawkeye's Avatar
    Join Date
    May 2012
    Posts
    508
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    43
    Rep Power
    6
    Yeah, it's a bit annoying on open battles etc. coz a lot of numbers ;p
    The true warrior doesn't fight because he hates people infront of him,
    he fight because he is loyal to those behind him.

  9. #9
    Focus Group bofing's Avatar
    Join Date
    Jun 2012
    Location
    Poland
    Posts
    664
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    52 Post(s)
    Reputation
    95
    Rep Power
    6
    Quote Originally Posted by Aiven View Post
    well it works, but this is really anoying when you're running around many mag walls on battle, and those numbers on mw just jump up/down all the time~~ any solution?
    if you set refresh rate for example to 100~ its not that bad, you can even set it lower to get a better result but it will take more of your cpu :P

  10. #10
    Normal User jaicob1891's Avatar
    Join Date
    Nov 2012
    Location
    Sweden
    Posts
    62
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    15
    Rep Power
    5
    anyone has the problem that some m-walls when you walk around resets to 20 seconds timer? after beeing down to like 10-15? so you are like 5-10 sec off

Posting Permissions

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