Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Moderator Dehan's Avatar
    Join Date
    Dec 2013
    Posts
    1,404
    Reputation
    315
    Rep Power
    26

    Advanced Anti Furniture Trap

    Advanced Anti Furniture Trap

    Description:
    Advanced Anti Furniture Trap, will check your screen for furnitures trapping you and will destroy them with disintegrate rune or a weapon.
    It checks for furnitures and for tiles trashed.
    If you want to use Disintegrate Runes they must be visible on your backpacks, also leave the option enabled.
    It will first check if you have disintegrate runes to use, if not will open the browse field and destroy it with a weapon.
    Default weapon is a machete.

    Code:
    init start
    itemToBreak = 'machete'
    disintegrate = true --will try to use disintegrate rune on the field

    -- DO NOT EDIT BELOW THIS LINE

    --@desc new anti furniture trap, will check for furnitures trapping you and will destroy them with disintegrate rune or a weapon
    --@param standtime: your stand time in seconds to active the function
    --@param itemb: item used to break the furniture trapping
    function antitrap(standtime,itemb)
    local standtime = standtime or 30
    local itemb = itemb or 'machete'
    if $standtime > standtime*1000 then
    for x,y,z in screentiles() do
    if (not tilewalkable(x,y,z) or gettile(x,y,z).itemcount >= 10) and tilereachable(x,y,z) and tiledestructible(x,y,z) then
    pausewalking(30000)
    closewindows('browse field') wait(1000,2000)
    while windowcount('browse field') == 0 do
    browsefield(x,y,z) wait(1000,2000)
    end
    local bf = getcontainer('browse field')
    for k = 1,bf.lastpage do
    for i = 0,bf.itemcount do
    local bfId = bf.item[i].id
    while itemcount(bfId, 'browse field') > 0 and shouldbreak(bfId) do
    if itemcount(3197) > 0 and disintegrate then
    useitemon(3197,bfId,'browse field') wait(500,1000)
    else
    useitemon(itemb,bfId,'browse field') wait(500,1000)
    end
    end
    if bf.curpage ~= bf.lastpage then
    nextpage('browse field') wait(1000,2000)
    end
    end
    end
    pausewalking(0)
    end
    end
    end
    end

    function shouldbreak(id)
    if (not iteminfo(id).isunmove and iteminfo(id).isunpass) or (iteminfo(id).destructible) then
    return true
    end
    return false
    end

    function tiledestructible(x,y,z)
    tileinfo = gettile(x,y,z)
    if tileinfo.itemcount >= 10 then
    return true
    else
    for i = 1,tileinfo.itemcount do
    if shouldbreak(tileinfo.item[i].id) then
    return true
    end
    end
    end
    return false
    end

    init end

    auto(1000)
    antitrap(30,itemToBreak)

    Level Latest Scripts by Dehan
    250+
    [EK & ED & MS & RP] [Navigation] Prison -1
    200+
    [EK & ED & MS] [Navigation] Asura Palace
    200+
    [EK & ED] [Navigation] Lower Roshamuul Softcore

  2. #2
    Free User Akiller's Avatar
    Join Date
    Aug 2015
    Posts
    240
    Reputation
    33
    Rep Power
    18
    good job

  3. #3

  4. #4
    Free User oliveraf's Avatar
    Join Date
    Dec 2015
    Posts
    9
    Reputation
    10
    Rep Power
    0
    awesome! Ive got one question: is it possible to add of stuff i want it to destroy, like parcels or furniture kits?
    if its possible, how would I do that?

    Thanks

  5. #5

  6. #6
    Free User downloadkct's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    1,167
    Reputation
    25
    Rep Power
    23
    nice ^^ does it work with parcels (noob question) ?
    Old 'n Proud Neobot-Elfbot and blackd user

  7. #7
    Free User
    Join Date
    Aug 2016
    Posts
    4
    Reputation
    10
    Rep Power
    0
    Apparently It does not work when there are parcels (furniture kit) under fire and with fire around....

  8. #8
    Free User
    Join Date
    Aug 2015
    Posts
    88
    Reputation
    10
    Rep Power
    18
    Maybe it's possible to add in the code that it will use destroy field on fire then start to destroy the shit on the ground?

    In Oramond there is many blockers on the stairs up to the city.

  9. #9
    Free User Cisco's Avatar
    Join Date
    Aug 2014
    Location
    Brazil
    Posts
    1,424
    Reputation
    119
    Rep Power
    23
    Quote Originally Posted by oliveraf View Post
    awesome! Ive got one question: is it possible to add of stuff i want it to destroy, like parcels or furniture kits?
    if its possible, how would I do that?

    Thanks
    Quote Originally Posted by downloadkct View Post
    nice ^^ does it work with parcels (noob question) ?
    Quote Originally Posted by gustavoehler View Post
    Apparently It does not work when there are parcels (furniture kit) under fire and with fire around....
    Quote Originally Posted by knoxknox View Post
    Maybe it's possible to add in the code that it will use destroy field on fire then start to destroy the shit on the ground?

    In Oramond there is many blockers on the stairs up to the city.
    Dehan - Anti Furniture Trap work

    And no need to use disintegrate


  10. #10
    Wind Powered
    Join Date
    Feb 2016
    Location
    Brasil
    Posts
    121
    Reputation
    12
    Rep Power
    17
    Nice, Thank you

 

 

Posting Permissions

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