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 :)
08-28-2014, 06:07 PM
Borges
Cool Boy... This action reach and open depot?
I'm working right now... I'll test soon...
I was working with a action like this but using loot category... if it is possible to add this option to your script I would greatly appreciate it.
Thanks for share.
08-29-2014, 07:28 AM
Cezarus
Quote:
Originally Posted by borges
Cool Boy... This action reach and open depot?
I'm working right now... I'll test soon...
I was working with a action like this but using loot category... if it is possible to add this option to your script I would greatly appreciate it.
Thanks for share.
Ye, it's not a problem but i just wonder why u want to use this way it xD
Ok ill script it later cause now i have to do something else at house.
08-29-2014, 01:05 PM
StaR
Quote:
Originally Posted by borges
Cool Boy... This action reach and open depot?
I'm working right now... I'll test soon...
I was working with a action like this but using loot category... if it is possible to add this option to your script I would greatly appreciate it.
Thanks for share.
Is it not just easier to edit the hotkey instead of adding a new loot and selecting a category ? :o
08-29-2014, 01:21 PM
Borges
Quote:
Originally Posted by StaR
Is it not just easier to edit the hotkey instead of adding a new loot and selecting a category ? :o
manually on all my scripts? if works like a charm... maybe yes.
@Cezarus I have tested and have some errors like this:
line 24 "rrotection amulet",
line 72 "sakebite rod",
This is not the problem... I have fixed this and added all my items.
The script just deposit first section (SEMI_YASIR_ITEMS) and get stuck.
08-29-2014, 05:45 PM
Cezarus
Quote:
Originally Posted by borges
manually on all my scripts? if works like a charm... maybe yes.
@Cezarus I have tested and have some errors like this:
line 24 "rrotection amulet",
line 72 "sakebite rod",
This is not the problem... I have fixed this and added all my items.
The script just deposit first section (SEMI_YASIR_ITEMS) and get stuck.
change to
"protection amulet"
"snakebite rod"
also, i will update this script with all items but later cause now i don;t have enough time to do that
08-29-2014, 07:39 PM
Borges
Quote:
Originally Posted by Cezarus
change to
"protection amulet"
"snakebite rod"
also, i will update this script with all items but later cause now i don;t have enough time to do that
as I said above, this is not the problem, I'm just telling you what is wrong.
the error is that it puts only the first section and crashes.