Latest Scripts: Ultimate Dawnport FACC Spots Souleater Tunnels Useful Lua:
HELP IT STILL STOP LOOTING AFTER 1 OR 2 ITEMS ON 2-4/10 monsters ;/
sometimes i must reopen dead 3x to take all loot.... ;[
Some tips to improve your code
1- Should iterate through looting items just once and store them
2- Should iterate through open containers, and check name as you did
3- Should iterate through items in said container instead and check if is in our list previously stored, then decide destination
4- Add a delay after moving item
Thats a more optimal way, I will make it when I am back if still needed.
so if you can fix it please do it im waiting
init start
local cache = {}
local conts = {'Slain', 'Dead', 'Remains'}
local clickWait = {10, 30} -- it means X to X ms
local pressWait = {10, 30} -- it means X to X ms
local category = '' -- leave empty if You want to take all items (non category)
-- Don't touch below!
setsetting('Settings/MouseMoveSpeed', 'Instantaneous')
setsetting('Settings/ScrollMode', 'Click on scrollbar')
setsetting('Settings/ClickWaitTime', tostring(clickWait))
setsetting('Settings/PressWaitTime', tostring(pressWait))
foreach lootingitem m category do
cache[m.id] = m.destination
end
init end
auto(100)
for i = 1, windowcount() do
local cont = getcontainer(i - 1)
for _, pattern in ipairs(conts) do
if cont.name:lower():find(pattern:lower()) then
for k = 1, bp.itemcount do
local item = cont.items[k]
if cache[item.id] then
moveitems(item.id, cache[item.id], cont.name, (item.count ~= 0) and item.count or 1)
waitping(2, 2.5)
end
end
end
end
end
was hunting with it today, didnt get any problem
error in Persistent script NewPersistentScript2:
["for k = 1, bp.itemcount do"]:NewPersistentScript2:25 attempt to index global 'bp' (a nil value)