05-16-2021, 11:10 PM
THE BOLT I HAVE THROWN THEM IN A SQM WHERE I DO STAND OR ACTION I HAVE PLACED THE SCRIP IN THE ACTION AND ALSO THE LUA SCRIPS, HUD SCRIP BUT IT DOES NOT WORK IT COULD HELP ME THANKS
local AMMO = '3446' -- Ammo NAME or ID
local AMMO_OZ = 0.8 -- Ammo unit weight.
local AMMO_MAX_AMOUNT = 100 -- Max. amount that you wanna carry.
local AMMO_LOCATION_GROUND = { X = 32768, Y = 3159, Z = 9 } -- Ammo's location on FLOOR.
local AMMO_CONTAINER = 'camouflage backpack' -- Container that AMMO will be moved to.
local pickup_count = math.max(0, (AMMO_MAX_AMOUNT - itemcount(AMMO, AMMO_CONTAINER)))
if pickup_count > 0 then
local max_bolts_capacity = math.floor(cap() / AMMO_OZ)
if pickup_count > max_bolts_capacity then
pickup_count = max_bolts_capacity
end
local AMMO_ID = 3446(AMMO)
while pickup_count > 0 do
local item_tile = topitem(AMMO_LOCATION_GROUND.X, AMMO_LOCATION_GROUND.Y, AMMO_LOCATION_GROUND.Z, true)
if item_tile.id == AMMO_ID then
if pickup_count >= item_tile.count then
pickup_count = 100
end
if moveitems(AMMO_ID, AMMO_CONTAINER, ground(AMMO_LOCATION_GROUND.X, AMMO_LOCATION_GROUND.Y, AMMO_LOCATION_GROUND.Z), pickup_count) then
wait(1000)
pickup_count = math.min(0, (AMMO_MAX_AMOUNT - 3446(AMMO, AMMO_CONTAINER)))
max_bolts_capacity = math.floor(cap() / AMMO_OZ)
if pickup_count > max_bolts_capacity then
pickup_count = max_bolts_capacity
end
else
break
end
else
break
end
end
end
01:07:12 - Core:Lua:ExecuteScript alt="Big Grin" title="Big Grin" class="smilie smilie_4" />oString:pickupbol: 18: syntax error near 'while'
local AMMO = '3446' -- Ammo NAME or ID
local AMMO_OZ = 0.8 -- Ammo unit weight.
local AMMO_MAX_AMOUNT = 100 -- Max. amount that you wanna carry.
local AMMO_LOCATION_GROUND = { X = 32768, Y = 3159, Z = 9 } -- Ammo's location on FLOOR.
local AMMO_CONTAINER = 'camouflage backpack' -- Container that AMMO will be moved to.
local pickup_count = math.max(0, (AMMO_MAX_AMOUNT - itemcount(AMMO, AMMO_CONTAINER)))
if pickup_count > 0 then
local max_bolts_capacity = math.floor(cap() / AMMO_OZ)
if pickup_count > max_bolts_capacity then
pickup_count = max_bolts_capacity
end
local AMMO_ID = 3446(AMMO)
while pickup_count > 0 do
local item_tile = topitem(AMMO_LOCATION_GROUND.X, AMMO_LOCATION_GROUND.Y, AMMO_LOCATION_GROUND.Z, true)
if item_tile.id == AMMO_ID then
if pickup_count >= item_tile.count then
pickup_count = 100
end
if moveitems(AMMO_ID, AMMO_CONTAINER, ground(AMMO_LOCATION_GROUND.X, AMMO_LOCATION_GROUND.Y, AMMO_LOCATION_GROUND.Z), pickup_count) then
wait(1000)
pickup_count = math.min(0, (AMMO_MAX_AMOUNT - 3446(AMMO, AMMO_CONTAINER)))
max_bolts_capacity = math.floor(cap() / AMMO_OZ)
if pickup_count > max_bolts_capacity then
pickup_count = max_bolts_capacity
end
else
break
end
else
break
end
end
end
01:07:12 - Core:Lua:ExecuteScript