
Originally Posted by
Rydan
This should work, could net test it yet tho.
was not working, but fixed it in 30 seconds and added shit items drop
Thanks!!
This is the one after my edit
lua code:function Self.RemoveRust()
local rustyitems = {8894, 8895, 8896, 8897, 8898, 8899}
local function getFlaskContainer()
local cont = Container.GetFirst()
while (cont:isOpen()) do
if ((cont:CountItemsOfID(9016)) > 0) then
return cont
end
cont = cont:GetNext()
end
return nil
end
local contto = Container.GetFirst()
while (contto:isOpen()) do
for _, item in ipairs(rustyitems) do
if (contto:CountItemsOfID(item) > 0) then
contfrom = getFlaskContainer()
if (not contfrom) then
return false
end
for spotfrom = 0, contfrom:ItemCount() - 1 do
if (contfrom:GetItemData(spotfrom).id == 9016) then
for spotto = 0, contto:ItemCount() - 1 do
if (contto:GetItemData(spotto).id == item) then
local unrust = false
while (not unrust) do
unrust = contfrom:UseItemWithContainerItem(spotfrom, contto:Index(), spotto)
wait(800, 1500)
end
return true
end
end
end
end
end
end
contto = contto:GetNext()
end
return true
end
function dropshit()
if (Self.ItemCount(3357) > 0) or (Self.ItemCount(3377) > 0) or (Self.ItemCount(3359) > 0) or (Self.ItemCount(3358) > 0) or (Self.ItemCount(3372) > 0) or (Self.ItemCount(3558) > 0) or (Self.ItemCount(3557) > 0) or (Self.ItemCount(3362) > 0) then
Self.DropItems(Self.Position().x, Self.Position().y, Self.Position().z, 3357, 3377, 3359, 3358, 3372, 3558, 3557, 3362)
wait(2000)
end
end
while (true) do
Self.RemoveRust()
wait(2000)
dropshit()
wait(1000)
end