Put this in peristent:
init start
local SEMI_LOOT_SORTER_TBL = {
SEMI_YASIR_ITEMS = {
semi_containerName = "yellow backpack",
semi_itemsTBL = {
"demonic skeletal hand",
"ghoul snack",
"rotten piece of cloth",
}
},
SEMI_GREEN_USEFUL_RINGS_AND_AMULETS = {
semi_containerName = "green backpack",
semi_itemsTBL = {
"life ring",
"might ring",
"ring of healing",
"dragon necklace",
"time ring",
"rrotection amulet",
}
},
SEMI_GREEN_DJIN_ALESAR_ITEMS = {
semi_containerName = "green backpack",
semi_itemsTBL = {
"Ancient Shield",
"Black Shield",
"Bonebreaker",
"Dark Armor",
"Dark Helmet",
"Dragon Hammer",
"Dreaded Cleaver",
"Earth Knight Axe",
"Energy Knight Axe",
"Fiery Knight Axe",
"Giant Sword",
"Haunted Blade",
"Icy Knight Axe",
"Knight Armor",
"Knight Axe",
"Knight Legs",
"Mystic Turban",
"Onyx Flail",
"Poison Dagger",
"Scimitar",
"Serpent Sword",
"Skull Staff",
"Strange Helmet",
"Titan Axe",
"Tower Shield",
"Vampire Shield",
"Warrior Helmet"
}
},
SEMI_GREEN_DJIN_YAMAN_ITEMS = {
semi_containerName = "green backpack",
semi_itemsTBL = {
"hailstorm rod",
"moonlight rod",
"mysterious fetish",
"necrotic rod",
"northwind rod",
"silver amulet",
"dwarven ring",
"energy ring",
"sakebite rod",
"springsprout rod",
"strange talisman",
"terra rod",
"underworld rod"
}
},
SEMI_GREEN_DJIN_ITEMS = {
semi_containerName = "green backpack",
semi_itemsTBL = {
"knight legs",
"knight armor",
"skull staff",
"terra rod",
}
},
SEMI_ADDON_ITEMS = {
semi_containerName = "jewelled backpack",
semi_itemsTBL = {
"ankh",
"demonic essence",
"heaven blossom", "holy orchid",
"spider silk", "red piece of cloth",
}
}
}
init end
function checkHowMuchSpaceLeftInContainer(containereus)
semi_check = getcontainer(containereus)
local free_slots = semi_check.maxcount - semi_check.itemcount
return free_slots
end
function openNextContainerWithTheSameNameFunction(xXx_container_name)
local czyOtwartyKolejnyBP = false
for m = 0, 15 do
local semiContainerek = getcontainer(m)
if semiContainerek.isopen then
for r = 1, semiContainerek.itemcount do
local info = iteminfo(semiContainerek.items[r].id)
if info.iscontainer then
listas('[openNextContainerWithTheSameNameFunction]:found container id:'.. semiContainerek.items[r].id ..' cointainer id to open:'.. iteminfo(xXx_container_name).id .. '.')
if semiContainerek.items[r].id == iteminfo(xXx_container_name).id then
listas('[openNextContainerWithTheSameNameFunction]:Opening next container...')
openitem(semiContainerek.items[r].id, m)
wait(1000, 1500)
czyOtwartyKolejnyBP = true
listas("[openNextContainerWithTheSameNameFunction]: Opened next container.")
break
end
end
end
end
end
listas("[openNextContainerWithTheSameNameFunction]: Finished.")
end
function pickUpItemsFromCurrentSQMToBP(nazwa_naszego_bp_lala)
if checkHowMuchSpaceLeftInContainer(nazwa_naszego_bp_lala) < 1 then
openNextContainerWithTheSameNameFunction(nazwa_naszego_bp_lala)
end
pickupitems()
end
function semiSortLoot(pickFromContainerWithName, openNextContainerWithSameName)
if not(pickFromContainerWithName ~= nil) or not(pickFromContainerWithName ~= "") then
listas("[semiSortLoot]: PUT NAME OF CONTAINER IN ()")
return false
end
if not(iteminfo(pickFromContainerWithName).iscontainer) then
listas("[semiSortLoot]: THIS ITEM IS NOT CONTAINER")
return false
elseif iteminfo(pickFromContainerWithName).iscontainer then
listas("[semiSortLoot]: Wszystko git :)")
end
for k,v in pairs(SEMI_LOOT_SORTER_TBL) do
for _, semi_naszItemek in ipairs(v.semi_itemsTBL) do
semi_naszItemek = semi_naszItemek:lower()
while itemcount(semi_naszItemek, pickFromContainerWithName) > 0 do
listas("[semiSortLoot]: Moving '".. semi_naszItemek .."', from '".. pickFromContainerWithName .."' to '".. v.semi_containerName .."'.")
if checkHowMuchSpaceLeftInContainer(v.semi_containerName) < 1 then
openNextContainerWithTheSameNameFunction(v.semi_containerName)
end
moveitems(semi_naszItemek, v.semi_containerName, pickFromContainerWithName, 100)
end
end
end
listas("[semiSortLoot]: Finished moving items.")
if openNextContainerWithSameName then
listas("[semiSortLoot]: Looking for next container to open...")
openNextContainerWithTheSameNameFunction(pickFromContainerWithName)
end
end
And now to hotkey:
auto(10)
semiSortLoot("brocade backpack", true)
Instruction:
You have to put all items into 1 backpack (backpack > backpack > backpack > backpack) with the same colour. (Change color/name of container in hotkey, just put here your container name instead of brocade backpack)
Now just open backpacks required to sort loot (You can change names in peristent script above)
For now i only added few items to test it and it works good, later i will add all items + maybe i will add more features.
Aha, if u have house and items there, so just open brocade backpack and run this hotkey:
auto (100)
pickUpItemsFromCurrentSQMToBP("brocade backpack")
have fun