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 floor
#1
Pickup ammo from 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)

        while pickup_count > 0 do
            local item_tile = topitem(AMMO_LOCATION_GROUND.X, AMMO_LOCATION_GROUND.Y, AMMO_LOCATION_GROUND.Z, false)
            if item_tile.id == AMMO_ID  then
                if pickup_count >= item_tile.count or pickup_count > 100 then
                    pickup_count = 100
                end

                moveitems(AMMO_ID, AMMO_CONTAINER, AMMO_GROUND_CONTAINER, pickup_count)
                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
            else
                break
            end
        end
    end
end

keywords: refill ammo, refill arrow, refill bolts, pickup ammo, pickup arrow, pickup bolts, take bolts, take ammo, take arrow, floor, ground
Reply

#2
06:47:53 - LUA Script -> Persistent01: 12: attempt to perform arithmetic on a luaNet_function value (global 'cap')

been trying to use this one , but been getting this error , any tips on how to fix it ?
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.
I've fixed it.
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016