I have made the correction, my question, did he pick up the bolts from the floor and mount them in the red backpack, or did he pick up the bolts that are inside the red backpack located on the floor?
I have made stand and action on top of the sqm where I have the bolts and I have placed the coordinate in the script, I get an error
CONSOLE SAYS
15:46:10 - 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:2: 24: attempt to index global 'AMMO_LOCATION_GROUND' (a nil value)
local MINIMUM_CAP = 100 -- The minimum amount of capacity that you want to have.
local AMMOLOCAL = '3446' -- 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 = 'red backpack' -- Ammo's container on FLOOR.
local AMMO_GROUND_LOCATION = { X = 32817, Y = 31602, Z = 9 } -- 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
if 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
else
break
end
else
break
end
end
end
end