Signup Now
Results 1 to 4 of 4
  1. #1
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0

    Auto Bomb Energy

    I try to make one, but no way, put time for the field, but if bot is killing monster it doesn't shot field.
    Tried to make with topitem but nothing :/

    Anyway?

  2. #2
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    Quote Originally Posted by User Not Found View Post
    I try to make one, but no way, put time for the field, but if bot is killing monster it doesn't shot field.
    Tried to make with topitem but nothing :/

    Anyway?
    FireBomb Action (3 stages), change ID's to Energy Bomb

    init start
    local fieldId = {2132,2133}
    local t = {{x=11111,y=22222,z=3},{x=44444,y=55555,z=6}} -- put how much you want
    function shootFF()
    for i=-6,7 do
    for j=-4,5 do
    local posx,posy,posz = i+$posx,j+$posy,$posz
    for l=1, #t do
    if(posx == t[l].x and posy == t[l].y and posz == t[l].z)then
    local tile = gettile(posx,posy,$posz)
    for k=1, tile.itemcount do
    if(table.find(fieldId,tile.item[k].id))then
    pausewalking(1000)
    useitemon(3192, 0, ground(posx,posy,$posz))
    wait(200)
    pausewalking(0)
    elseif(not table.find(fieldId,tile.item[k].id) and topitem(posx,posy,$posz).id ~= 2131)then
    pausewalking(1000)
    useitemon(3192, 0, ground(posx,posy,$posz))
    wait(200)
    pausewalking(0)
    end
    end
    end
    end
    end
    end
    end
    init end
    auto(1000)

    shootFF()
    Helped you? REP+

  3. #3
    Banned
    Join Date
    Jan 2014
    Posts
    23
    Reputation
    14
    Rep Power
    0
    will use energy bomb on self if no monsters near you and no energy on position you stand

    Code:
    if (maround(5)) <1 and not isitemontile(2122, $posx, $posy, $posz) then 
    useitemon(itemid("Energy Bomb Rune"), 0, ground ($posx, $posy, $posz)) 
    end

  4. #4
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,579
    Reputation
    149
    Rep Power
    27
    function isbombontile(rune, nonpvp, x, y, z)
    local fields = {
    pvp = {fire = {2118, 2119}, poison = 2121, energy = 2122},
    non = {fire = {2131, 2132}, poison = 2134, energy = 2135}
    }
    local dmgtype = runeinfo(rune).dmgtype:lower()
    local ids = fields.pvp[dmgtype]
    if nonpvp then
    ids = table.merge(ids, fields.non[dmgtype])
    end


    for i = -1, 1 do
    for j = -1, 1 do
    if not areitemsontile('any', x+j, y+i, z, ids) and tilewalkable(x+j, y+i, z) then
    return false
    end
    end
    end
    return true
    end


    function areitemsontile(mode, x, y, z, ...)
    local ids = {}
    mode = mode or 'any'
    if type(...) == 'number' then
    ids = {...}
    elseif type(...) == 'string' then
    ids = string.explode(..., ',')
    elseif type(...) == 'table' then
    ids = ...
    end

    local found = 0
    for _, id in ipairs(ids) do
    if isitemontile(tonumber(id), x, y, z) then
    if mode == 'any' then
    return true
    else
    found = found + 1
    end
    end
    end

    if found == #ids then
    return true
    end
    return false
    end

 

 

Posting Permissions

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