Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FREE Pickup ammo from a container on floor
#1
PICKUP AMMO FROM A CONTAINER ON FLOOR
local MINIMUM_CAP = 100 -- The minimum amount of capacity that you want to have.
local AMMO = 'bolt' -- Ammo NAME or ID
local AMMO_OZ = 0.8 -- Ammo unit weight.
local AMMO_MAX_AMOUNT = 10 -- Max. amount that you wanna carry.
local AMMO_GROUND_CONTAINER = 'bag' -- Ammo's container on FLOOR.
local AMMO_GROUND_LOCATION = { X = 12345, Y = 12345, Z = 7 } -- Ammo's location on FLOOR.
local AMMO_CONTAINER = 'red backpack' -- Container that AMMO will be moved to.

local pickup_count = math.max(0, (AMMO_MAX_AMOUNT - itemcount(AMMO, AMMO_CONTAINER, true)))
if pickup_count > 0 then
    
    local max_capacity = math.floor((cap - MINIMUM_CAP) / AMMO_OZ)
    if pickup_count > max_capacity then
        pickup_count = max_capacity
    end
    if pickup_count > 100 then
        pickup_count = 100
    end

    if pickup_count > 0 then
        local AMMO_ID = itemid(AMMO)
        for i = 1, 3 do
            local WINDOW_CONTAINER_BEFORE = windowcount(AMMO_GROUND_CONTAINER)
            openitem(AMMO_GROUND_CONTAINER, ground(AMMO_GROUND_LOCATION.X, AMMO_GROUND_LOCATION.Y, AMMO_GROUND_LOCATION.Z))
            wait(1000)
            local WINDOW_CONTAINER_AFTER = windowcount(AMMO_GROUND_CONTAINER)

            if WINDOW_CONTAINER_AFTER > WINDOW_CONTAINER_BEFORE then
                while pickup_count > 0 and itemcount(AMMO, AMMO_GROUND_CONTAINER) > 0 do
                    moveitems(AMMO_ID, AMMO_CONTAINER, AMMO_GROUND_CONTAINER, pickup_count) then
                    wait(1000)
                    pickup_count = math.max(0, (AMMO_MAX_AMOUNT - itemcount(AMMO, AMMO_CONTAINER, true)))
                    max_capacity = math.floor((cap - MINIMUM_CAP) / AMMO_OZ)
                    if pickup_count > max_capacity then
                        pickup_count = max_capacity
                    end
                    if pickup_count > 100 then
                        pickup_count = 100
                    end
                end
                break
            end
        end
    end
end

keywords: refill ammo, refill arrow, refill bolts, pickup ammo, pickup arrow, pickup bolts, take bolts, take ammo, take arrow, container, backpack, bp
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016