Container = name of the bag/bp you will put spear into
DistanceWeapon = name of stuff u wanna pick up
PickUp = true/false aka enable/disable
Cap = if cap lower than this it will stop to pick up
Code:
local config = {
Container = "Red Backpack",
DistanceWeapon = {"Spear", "Small Stone"},
PickUp = true,
Cap = 470
}
while true do
for i = 0, #Container.GetIndexes() - 1 do
local c = Container.GetFromIndex(i)
if c:isOpen() and (c:Name():find("The") or c:Name():find("Demonic") or c:Name():find("Split") or c:Name():find("Dead") or c:Name():find("Slain") or c:Name():find("Dissolved") or c:Name():find("Remains") or c:Name():find("Elemental")) then
for s = 0, c:ItemCount() - 1 do
local item = Item.GetName(c:GetItemData(s).id):titlecase()
if config.PickUp and table.contains(config.DistanceWeapon, item) and Self.Cap() > config.Cap then
local destCont = Container.GetByName(config.Container)
c:MoveItemToContainer(s, destCont:Index(), math.min(destCont:ItemCount() + 1, destCont:ItemCapacity() - 1))
wait(600, 890)
break
end
end
end
end
wait(50)
end
@Cheeze17