zxzero
08-22-2016, 11:10 PM
I have these 2 scripts, although I have not tested it thoroughly I am sure they will clash with each other. What I need is a way to make it ignore picking up if the cap is under x amount.
--[[
Free Itams
Version 1.2
Created by Mr Trala
]]
config = {
itemID = {3031}, -- ItemIDs to be picked up
MBP = "Orange Backpack" -- Ex. "Purple Backpack", "Backpack of holding", "Bag" etc. Should have various of the same bp.
}
function freeitams()
p = Self.Position()
for y = -1, 1 do
for x = -1, 1 do
if table.contains(config.itemID, Map.GetTopUseItem(p.x + x, p.y + y, p.z).id) then
wait(50,100)
Map.PickupItem(p.x+x, p.y+y, p.z, Container.GetByName(config.MBP):Index(), 0)
end
end
end
end
registerEventListener(TIMER_TICK, "freeitams")
local MinCap = 10 -- Mininum cap
Module.New(" Drop gold", function(module)
if (Self.ItemCount(3031) > 100) and (Self.Cap() < MinCap) then
Self.DropItem(Self.Position().x, Self.Position().y, Self.Position().z, 3031)
module:Delay(1000)
end
end)
--[[
Free Itams
Version 1.2
Created by Mr Trala
]]
config = {
itemID = {3031}, -- ItemIDs to be picked up
MBP = "Orange Backpack" -- Ex. "Purple Backpack", "Backpack of holding", "Bag" etc. Should have various of the same bp.
}
function freeitams()
p = Self.Position()
for y = -1, 1 do
for x = -1, 1 do
if table.contains(config.itemID, Map.GetTopUseItem(p.x + x, p.y + y, p.z).id) then
wait(50,100)
Map.PickupItem(p.x+x, p.y+y, p.z, Container.GetByName(config.MBP):Index(), 0)
end
end
end
end
registerEventListener(TIMER_TICK, "freeitams")
local MinCap = 10 -- Mininum cap
Module.New(" Drop gold", function(module)
if (Self.ItemCount(3031) > 100) and (Self.Cap() < MinCap) then
Self.DropItem(Self.Position().x, Self.Position().y, Self.Position().z, 3031)
module:Delay(1000)
end
end)