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_GROUND_LOCATION.X, AMMO_GROUND_LOCATION.Y, AMMO_GROUND_LOCATION.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

#4
It would be easier to create where the character walks below and has an arrow he can pick up. Where the character steps he can pick up an arrow.
Reply

#5
Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString:Cavebot/Action:57: 24: attempt to index global 'AMMO_LOCATION_GROUND' (a nil value)
Reply

#6
07:48:08 - Core:Lua:ExecuteScript
|Only Registered members can see download links. | Click here to buy subscription or here to register.
|Only Registered members can see download links. | Click here to buy subscription or here to register.alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString:Console: 24: attempt to index global 'AMMO_LOCATION_GROUND' (a nil value)
Reply

#7
Spamming won't help, but i just fixed it.
Reply

#8
I understand, could you send me the script that is difficult to execute, where do I execute it in LUA itself? Then, do I select the sqm?

I made a script where he opens the bag but he doesn't pull arrows to the main bp. Is it possible to do an auto loot? Where does he pull arrows from anywhere?
Reply

#9
|Only Registered members can see download links. | Click here to buy subscription or here to register.

Hello.

The script is pretty easy to use, it's recommended to use on Cavebot -> Action waypoint. Create an stand waypoint to reach around ammo location then an Action waypoint with the code from my first post to pickup ammo.
It will pickup ammo from FLOOR, not from a backpack on floor.
You can setup the location on variable AMMO_GROUND_LOCATION .
...
local AMMO_GROUND_LOCATION = { X = 12345, Y = 12345, Z = 7 } -- Ammo's location on FLOOR.
...

No, Looter will not work properly for that matter.
Reply

#10
local AMMO_GROUND_LOCATION = { x = 32237, y = 31839, z = 12 } -- Ammo's location on FLOOR.

I put it exactly like that but it doesn't work ;( it didn't do any action as it's difficult to be a paladin haha
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016