XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 5 of 5

Thread: Main backpack loot sorter

  1. #1
    Kruel's Avatar
    Join Date
    Aug 2012
    Posts
    76
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Main backpack loot sorter

    So I'm currently using Darkstars loot sorter and I was just wondering if instead of using a backpack as the "Main" backpack and instead using a dp chest was possible. Can anyone help me out? I tried writing "Depot Box II" and it didn't work. Below is the script I'm using.

    Code:
    MerchantsAndItems =
    {
        BlueDjinn = {"Magic Light Wand", "Orb", "Wand of Cosmic Energy", "Wand of Decay", "Wand of Draconia", "Wand of Dragonbreath", "Wand of Inferno", "Wand of Starstorm", "Wand of Voodoo", "Wand of Vortex", "Angelic Axe", "Blue Robe", "Bonelord Shield", "Boots of Haste", "Broadsword", "Butcher's Axe", "Crown Armor", "Crown Helmet", "Crown Legs", "Crown Shield", "Crusader Helmet", "Dragon Lance", "Dragon Shield", "Earth Spike Sword", "Earth War Hammer", "Energy Spike Sword", "Energy War Hammer", "Fiery Spike Sword", "Fiery War Hammer", "Fire Axe", "Fire Sword", "Glorious Axe", "Guardian Shield", "Ice Rapier", "Icy Spike Sword", "Icy War Hammer", "Noble Armor", "Obsidian Lance", "Queen's Sceptre", "Royal Helmet", "Shadow Sceptre", "Spike Sword", "Thaian Sword", "War Hammer"},
        GreenDjinn = {"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", "Hailstorm Rod", "Moonlight Rod", "Mysterious Fetish", "Necrotic Rod", "Northwind Rod", "Snakebite Rod", "Springsprout Rod", "Strange Talisman", "Terra Rod", "Underworld Rod"},
        Rashid = {"Abyss Hammer", "Amber Staff", "Ancient Amulet", "Assassin Dagger", "Bandana", "Beastslayer Axe", "Beetle Necklace", "Berserker", "Blacksteel Sword", "Blessed Sceptre", "Bone Shield", "Bonelord Helmet", "Brutetamer's Staff", "Castle Shield", "Chaos Mace", "Coconut Shoes", "Composite Hornbow", "Cranial Basher", "Crocodile Boots", "Crystal Mace", "Crystal Necklace", "Crystal Ring", "Crystal Sword", "Crystalline Armor", "Daramanian Mace", "Daramanian Waraxe", "Dark Shield", "Death Ring", "Demon Shield", "Demonbone Amulet", "Demonrage Sword", "Devil Helmet", "Diamond Sceptre", "Doll", "Dragon Scale Mail", "Dragon Slayer", "Dragonbone Staff", "Dreaded Cleaver", "Earth Cranial Basher", "Earth Dragon Slayer", "Earth Heroic Axe", "Earth Mystic Blade", "Earth Relic Sword", "Earth War Axe", "Elvish Bow", "Emerald Bangle", "Energy Cranial Basher", "Energy Dragon Slayer", "Energy Heroic Axe", "Energy Mystic Blade", "Energy Relic Sword", "Energy War Axe", "Epee", "Fiery Cranial Basher", "Fiery Dragon Slayer", "Fiery Heroic Axe", "Fiery Mystic Blade", "Fiery Relic Sword", "Fiery War Axe", "Flower Dress", "Flower Wreath", "Fur Boots", "Furry Club", "Glacier Amulet", "Glacier Kilt", "Glacier Mask", "Glacier Robe", "Glacier Shoes", "Gold Ring", "Golden Armor", "Golden Legs", "Guardian Halberd", "Hammer of Wrath", "Heavy Mace", "Heavy Machete", "Heavy Trident", "Heroic Axe", "Hibiscus Dress", "Icy Cranial Basher", "Icy Dragon Slayer", "Icy Heroic Axe", "Icy Mystic Blade", "Icy Relic Sword", "Icy War Axe", "Jade Hammer", "Krimhorn Helmet", "Leaf Legs", "Leopard Armor", "Leviathan's Amulet", "Light Shovel", "Lightning Boots", "Lightning Headband", "Lightning Legs", "Lightning Pendant", "Lightning Robe", "Lunar Staff", "Magic Plate Armor", "Magma Amulet", "Magma Boots", "Magma Coat", "Magma Legs", "Magma Monocle", "Mammoth Fur Cape", "Mammoth Fur Shorts", "Mammoth Whopper", "Mastermind Shield", "Medusa Shield", "Mercenary Sword", "Mystic Blade", "Naginata", "Nightmare Blade", "Noble Axe", "Norse Shield", "Orcish Maul", "Paladin Armor", "Pirate Boots", "Pirate Hat", "Pirate Knee Breeches", "Pirate Shirt", "Pirate Voodoo Doll", "Platinum Amulet", "Ragnir Helmet", "Relic Sword", "Ring of the Sky", "Ruby Necklace", "Ruthless Axe", "Sacred Tree Amulet", "Sapphire Hammer", "Scarab Amulet", "Scarab Shield", "Shockwave Amulet", "Silver Brooch", "Silver Dagger", "Skull Helmet", "Skullcracker Armor", "Spiked Squelcher", "Steel Boots", "Swamplair Armor", "Taurus Mace", "Terra Amulet", "Terra Boots", "Terra Hood", "Terra Legs", "Terra Mantle", "The Justice Seeker", "Tortoise Shield", "Vile Axe", "Voodoo Doll", "War Axe", "War Horn", "Witch Hat", "Wyvern Fang"},
    }
     
    BackpacksToSortTo =
    {
        BlueDjinn = "Blue Backpack",
        GreenDjinn = "Green Backpack",
        Rashid = "Orange Backpack",
        Others = "Yellow Backpack",
        Main = "Brocade Backpack"
    }
     
    function itemMoveHelper(contFrom, fromSpot, contTo)
     
        print("Moving from %s spot %d to %s", contFrom:Name(), fromSpot, contTo:Name())
        if (contTo:ItemCount() == contTo:ItemCapacity()) then --opens the next container
            local openAt = contTo:ItemCount() - 1
            if (Item.isContainer(contTo:GetItemData(openAt).id)) then
                contTo:UseItem(openAt, true)
                wait(1500)
            else
                print("No more room for items in %s. Please fix the problem and restart the script.", contTo:Name())
                wait(99999999)
            end
        end
         
        contFrom:MoveItemToContainer(fromSpot, contTo:Index(), contTo:ItemCapacity() - 1)
    end
     
    function itemFound(nameTable, itemId)
        local itemName = string.upper(Item.GetName(itemId))
        for _, name in pairs(nameTable) do
            if (itemName == string.upper(name)) then
                return true
            end
        end
         
        return false
    end
     
    local error = false
    local backpacks = {}
    for merchant, bpName in pairs(BackpacksToSortTo) do
        backpacks[merchant] = Container.GetByName(bpName)
        if (not backpacks[merchant]:isOpen()) then
            error = true
            print("You must open a %s as your %s backpack. Please fix the problem and restart the script.", bpName, merchant)
            break
        end
    end
     
    if (not error) then
        repeat
         
            while (backpacks["Main"]:ItemCount() > 0) do
                local item = backpacks["Main"]:GetItemData(0)
                 
                if (Item.isContainer(item.id) and backpacks["Main"]:ItemCount() == 1) then --open next backpack of loot
                    backpacks["Main"]:UseItem(backpacks["Main"]:ItemCount()-1, true)
                    wait(1000)
                    break
                else --move it the loot
                    local foundBp = backpacks["Others"]
                    for merchant, _ in pairs(MerchantsAndItems) do
                        if (itemFound(MerchantsAndItems[merchant], item.id)) then
                            foundBp = backpacks[merchant]
                            break
                        end
                    end
                 
                    itemMoveHelper(backpacks["Main"], 0, foundBp)
                    wait(500, 900)
                end
            end
        until (backpacks["Main"]:ItemCount() == 0)
    end

  2. #2
    Lifetime Subscriber L!p3's Avatar
    Join Date
    Dec 2011
    Location
    Brazil
    Posts
    157
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kruel View Post
    So I'm currently using Darkstars loot sorter and I was just wondering if instead of using a backpack as the "Main" backpack and instead using a dp chest was possible. Can anyone help me out? I tried writing "Depot Box II" and it didn't work. Below is the script I'm using.

    lua code:
    MerchantsAndItems =
    {
    BlueDjinn = {"Magic Light Wand", "Orb", "Wand of Cosmic Energy", "Wand of Decay", "Wand of Draconia", "Wand of Dragonbreath", "Wand of Inferno", "Wand of Starstorm", "Wand of Voodoo", "Wand of Vortex", "Angelic Axe", "Blue Robe", "Bonelord Shield", "Boots of Haste", "Broadsword", "Butcher's Axe", "Crown Armor", "Crown Helmet", "Crown Legs", "Crown Shield", "Crusader Helmet", "Dragon Lance", "Dragon Shield", "Earth Spike Sword", "Earth War Hammer", "Energy Spike Sword", "Energy War Hammer", "Fiery Spike Sword", "Fiery War Hammer", "Fire Axe", "Fire Sword", "Glorious Axe", "Guardian Shield", "Ice Rapier", "Icy Spike Sword", "Icy War Hammer", "Noble Armor", "Obsidian Lance", "Queen's Sceptre", "Royal Helmet", "Shadow Sceptre", "Spike Sword", "Thaian Sword", "War Hammer"},
    GreenDjinn = {"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", "Hailstorm Rod", "Moonlight Rod", "Mysterious Fetish", "Necrotic Rod", "Northwind Rod", "Snakebite Rod", "Springsprout Rod", "Strange Talisman", "Terra Rod", "Underworld Rod"},
    Rashid = {"Abyss Hammer", "Amber Staff", "Ancient Amulet", "Assassin Dagger", "Bandana", "Beastslayer Axe", "Beetle Necklace", "Berserker", "Blacksteel Sword", "Blessed Sceptre", "Bone Shield", "Bonelord Helmet", "Brutetamer's Staff", "Castle Shield", "Chaos Mace", "Coconut Shoes", "Composite Hornbow", "Cranial Basher", "Crocodile Boots", "Crystal Mace", "Crystal Necklace", "Crystal Ring", "Crystal Sword", "Crystalline Armor", "Daramanian Mace", "Daramanian Waraxe", "Dark Shield", "Death Ring", "Demon Shield", "Demonbone Amulet", "Demonrage Sword", "Devil Helmet", "Diamond Sceptre", "Doll", "Dragon Scale Mail", "Dragon Slayer", "Dragonbone Staff", "Dreaded Cleaver", "Earth Cranial Basher", "Earth Dragon Slayer", "Earth Heroic Axe", "Earth Mystic Blade", "Earth Relic Sword", "Earth War Axe", "Elvish Bow", "Emerald Bangle", "Energy Cranial Basher", "Energy Dragon Slayer", "Energy Heroic Axe", "Energy Mystic Blade", "Energy Relic Sword", "Energy War Axe", "Epee", "Fiery Cranial Basher", "Fiery Dragon Slayer", "Fiery Heroic Axe", "Fiery Mystic Blade", "Fiery Relic Sword", "Fiery War Axe", "Flower Dress", "Flower Wreath", "Fur Boots", "Furry Club", "Glacier Amulet", "Glacier Kilt", "Glacier Mask", "Glacier Robe", "Glacier Shoes", "Gold Ring", "Golden Armor", "Golden Legs", "Guardian Halberd", "Hammer of Wrath", "Heavy Mace", "Heavy Machete", "Heavy Trident", "Heroic Axe", "Hibiscus Dress", "Icy Cranial Basher", "Icy Dragon Slayer", "Icy Heroic Axe", "Icy Mystic Blade", "Icy Relic Sword", "Icy War Axe", "Jade Hammer", "Krimhorn Helmet", "Leaf Legs", "Leopard Armor", "Leviathan's Amulet", "Light Shovel", "Lightning Boots", "Lightning Headband", "Lightning Legs", "Lightning Pendant", "Lightning Robe", "Lunar Staff", "Magic Plate Armor", "Magma Amulet", "Magma Boots", "Magma Coat", "Magma Legs", "Magma Monocle", "Mammoth Fur Cape", "Mammoth Fur Shorts", "Mammoth Whopper", "Mastermind Shield", "Medusa Shield", "Mercenary Sword", "Mystic Blade", "Naginata", "Nightmare Blade", "Noble Axe", "Norse Shield", "Orcish Maul", "Paladin Armor", "Pirate Boots", "Pirate Hat", "Pirate Knee Breeches", "Pirate Shirt", "Pirate Voodoo Doll", "Platinum Amulet", "Ragnir Helmet", "Relic Sword", "Ring of the Sky", "Ruby Necklace", "Ruthless Axe", "Sacred Tree Amulet", "Sapphire Hammer", "Scarab Amulet", "Scarab Shield", "Shockwave Amulet", "Silver Brooch", "Silver Dagger", "Skull Helmet", "Skullcracker Armor", "Spiked Squelcher", "Steel Boots", "Swamplair Armor", "Taurus Mace", "Terra Amulet", "Terra Boots", "Terra Hood", "Terra Legs", "Terra Mantle", "The Justice Seeker", "Tortoise Shield", "Vile Axe", "Voodoo Doll", "War Axe", "War Horn", "Witch Hat", "Wyvern Fang"},
    }

    BackpacksToSortTo =
    {
    BlueDjinn = "Blue Backpack",
    GreenDjinn = "Green Backpack",
    Rashid = "Orange Backpack",
    Others = "Yellow Backpack",
    Main = "Brocade Backpack"
    }

    function itemMoveHelper(contFrom, fromSpot, contTo)

    print("Moving from %s spot %d to %s", contFrom:Name(), fromSpot, contTo:Name())
    if (contTo:ItemCount() == contTo:ItemCapacity()) then --opens the next container
    local openAt = contTo:ItemCount() - 1
    if (Item.isContainer(contTo:GetItemData(openAt).id)) then
    contTo:UseItem(openAt, true)
    wait(1500)
    else
    print("No more room for items in %s. Please fix the problem and restart the script.", contTo:Name())
    wait(99999999)
    end
    end

    contFrom:MoveItemToContainer(fromSpot, contTo:Index(), contTo:ItemCapacity() - 1)
    end

    function itemFound(nameTable, itemId)
    local itemName = string.upper(Item.GetName(itemId))
    for _, name in pairs(nameTable) do
    if (itemName == string.upper(name)) then
    return true
    end
    end

    return false
    end

    local error = false
    local backpacks = {}
    for merchant, bpName in pairs(BackpacksToSortTo) do
    backpacks[merchant] = Container.GetByName(bpName)
    if (not backpacks[merchant]:isOpen()) then
    error = true
    print("You must open a %s as your %s backpack. Please fix the problem and restart the script.", bpName, merchant)
    break
    end
    end

    if (not error) then
    repeat

    while (backpacks["Main"]:ItemCount() > 0) do
    local item = backpacks["Main"]:GetItemData(0)

    if (Item.isContainer(item.id) and backpacks["Main"]:ItemCount() == 1) then --open next backpack of loot
    backpacks["Main"]:UseItem(backpacks["Main"]:ItemCount()-1, true)
    wait(1000)
    break
    else --move it the loot
    local foundBp = backpacks["Others"]
    for merchant, _ in pairs(MerchantsAndItems) do
    if (itemFound(MerchantsAndItems[merchant], item.id)) then
    foundBp = backpacks[merchant]
    break
    end
    end

    itemMoveHelper(backpacks["Main"], 0, foundBp)
    wait(500, 900)
    end
    end
    until (backpacks["Main"]:ItemCount() == 0)
    end


    Try it and tell me if it's working:

    lua code:
    local DPBox = 1 -- From 1 to 17.

    DPChests = {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII"}

    MerchantsAndItems =
    {
    BlueDjinn = {"Magic Light Wand", "Orb", "Wand of Cosmic Energy", "Wand of Decay", "Wand of Draconia", "Wand of Dragonbreath", "Wand of Inferno", "Wand of Starstorm", "Wand of Voodoo", "Wand of Vortex", "Angelic Axe", "Blue Robe", "Bonelord Shield", "Boots of Haste", "Broadsword", "Butcher's Axe", "Crown Armor", "Crown Helmet", "Crown Legs", "Crown Shield", "Crusader Helmet", "Dragon Lance", "Dragon Shield", "Earth Spike Sword", "Earth War Hammer", "Energy Spike Sword", "Energy War Hammer", "Fiery Spike Sword", "Fiery War Hammer", "Fire Axe", "Fire Sword", "Glorious Axe", "Guardian Shield", "Ice Rapier", "Icy Spike Sword", "Icy War Hammer", "Noble Armor", "Obsidian Lance", "Queen's Sceptre", "Royal Helmet", "Shadow Sceptre", "Spike Sword", "Thaian Sword", "War Hammer"},
    GreenDjinn = {"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", "Hailstorm Rod", "Moonlight Rod", "Mysterious Fetish", "Necrotic Rod", "Northwind Rod", "Snakebite Rod", "Springsprout Rod", "Strange Talisman", "Terra Rod", "Underworld Rod"},
    Rashid = {"Abyss Hammer", "Amber Staff", "Ancient Amulet", "Assassin Dagger", "Bandana", "Beastslayer Axe", "Beetle Necklace", "Berserker", "Blacksteel Sword", "Blessed Sceptre", "Bone Shield", "Bonelord Helmet", "Brutetamer's Staff", "Castle Shield", "Chaos Mace", "Coconut Shoes", "Composite Hornbow", "Cranial Basher", "Crocodile Boots", "Crystal Mace", "Crystal Necklace", "Crystal Ring", "Crystal Sword", "Crystalline Armor", "Daramanian Mace", "Daramanian Waraxe", "Dark Shield", "Death Ring", "Demon Shield", "Demonbone Amulet", "Demonrage Sword", "Devil Helmet", "Diamond Sceptre", "Doll", "Dragon Scale Mail", "Dragon Slayer", "Dragonbone Staff"},
    }

    BackpacksToSortTo =
    {
    BlueDjinn = "Yellow Backpack",
    GreenDjinn = "Orange Backpack",
    Rashid = "Blue Backpack",
    Others = "Brocade Backpack",
    Main = "Depot Box "..DPChests[DPBox]
    }

    function itemMoveHelper(contFrom, fromSpot, contTo)

    print("Moving from %s spot %d to %s", contFrom:Name(), fromSpot, contTo:Name())
    if (contTo:ItemCount() == contTo:ItemCapacity()) then --opens the next container
    local openAt = contTo:ItemCount() - 1
    if (Item.isContainer(contTo:GetItemData(openAt).id)) then
    contTo:UseItem(openAt, true)
    wait(1500)
    else
    print("No more room for items in %s. Please fix the problem and restart the script.", contTo:Name())
    wait(99999999)
    end
    end

    contFrom:MoveItemToContainer(fromSpot, contTo:Index(), contTo:ItemCapacity() - 1)
    end

    function itemFound(nameTable, itemId)
    local itemName = string.upper(Item.GetName(itemId))
    for _, name in pairs(nameTable) do
    if (itemName == string.upper(name)) then
    return true
    end
    end

    return false
    end

    local error = false
    local backpacks = {}
    for merchant, bpName in pairs(BackpacksToSortTo) do
    backpacks[merchant] = Container.GetByName(bpName)
    if (not backpacks[merchant]:isOpen()) then
    error = true
    print("You must open a %s as your %s backpack. Please fix the problem and restart the script.", bpName, merchant)
    break
    end
    end

    local j = 0
    if (not error) then
    repeat
    print("Box: "..BackpacksToSortTo.Main)
    while (backpacks["Main"]:ItemCount() > j) do
    local item = backpacks["Main"]:GetItemData(j)

    if Item.isContainer(item.id) then --Check if it's a backpack/Container
    j = j + 1
    else --move it the loot
    local foundBp = backpacks["Others"]
    for merchant, _ in pairs(MerchantsAndItems) do
    if (itemFound(MerchantsAndItems[merchant], item.id)) then
    foundBp = backpacks[merchant]
    break
    end
    end

    itemMoveHelper(backpacks["Main"], j, foundBp)
    wait(500, 900)
    end
    end
    until (backpacks["Main"]:ItemCount() == j)
    end

  3. #3
    Kruel's Avatar
    Join Date
    Aug 2012
    Posts
    76
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by L!p3 View Post
    [/SIZE]

    Try it and tell me if it's working:

    lua code:
    local DPBox = 1 -- From 1 to 17.

    DPChests = {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII"}

    MerchantsAndItems =
    {
    BlueDjinn = {"Magic Light Wand", "Orb", "Wand of Cosmic Energy", "Wand of Decay", "Wand of Draconia", "Wand of Dragonbreath", "Wand of Inferno", "Wand of Starstorm", "Wand of Voodoo", "Wand of Vortex", "Angelic Axe", "Blue Robe", "Bonelord Shield", "Boots of Haste", "Broadsword", "Butcher's Axe", "Crown Armor", "Crown Helmet", "Crown Legs", "Crown Shield", "Crusader Helmet", "Dragon Lance", "Dragon Shield", "Earth Spike Sword", "Earth War Hammer", "Energy Spike Sword", "Energy War Hammer", "Fiery Spike Sword", "Fiery War Hammer", "Fire Axe", "Fire Sword", "Glorious Axe", "Guardian Shield", "Ice Rapier", "Icy Spike Sword", "Icy War Hammer", "Noble Armor", "Obsidian Lance", "Queen's Sceptre", "Royal Helmet", "Shadow Sceptre", "Spike Sword", "Thaian Sword", "War Hammer"},
    GreenDjinn = {"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", "Hailstorm Rod", "Moonlight Rod", "Mysterious Fetish", "Necrotic Rod", "Northwind Rod", "Snakebite Rod", "Springsprout Rod", "Strange Talisman", "Terra Rod", "Underworld Rod"},
    Rashid = {"Abyss Hammer", "Amber Staff", "Ancient Amulet", "Assassin Dagger", "Bandana", "Beastslayer Axe", "Beetle Necklace", "Berserker", "Blacksteel Sword", "Blessed Sceptre", "Bone Shield", "Bonelord Helmet", "Brutetamer's Staff", "Castle Shield", "Chaos Mace", "Coconut Shoes", "Composite Hornbow", "Cranial Basher", "Crocodile Boots", "Crystal Mace", "Crystal Necklace", "Crystal Ring", "Crystal Sword", "Crystalline Armor", "Daramanian Mace", "Daramanian Waraxe", "Dark Shield", "Death Ring", "Demon Shield", "Demonbone Amulet", "Demonrage Sword", "Devil Helmet", "Diamond Sceptre", "Doll", "Dragon Scale Mail", "Dragon Slayer", "Dragonbone Staff"},
    }

    BackpacksToSortTo =
    {
    BlueDjinn = "Yellow Backpack",
    GreenDjinn = "Orange Backpack",
    Rashid = "Blue Backpack",
    Others = "Brocade Backpack",
    Main = "Depot Box "..DPChests[DPBox]
    }

    function itemMoveHelper(contFrom, fromSpot, contTo)

    print("Moving from %s spot %d to %s", contFrom:Name(), fromSpot, contTo:Name())
    if (contTo:ItemCount() == contTo:ItemCapacity()) then --opens the next container
    local openAt = contTo:ItemCount() - 1
    if (Item.isContainer(contTo:GetItemData(openAt).id)) then
    contTo:UseItem(openAt, true)
    wait(1500)
    else
    print("No more room for items in %s. Please fix the problem and restart the script.", contTo:Name())
    wait(99999999)
    end
    end

    contFrom:MoveItemToContainer(fromSpot, contTo:Index(), contTo:ItemCapacity() - 1)
    end

    function itemFound(nameTable, itemId)
    local itemName = string.upper(Item.GetName(itemId))
    for _, name in pairs(nameTable) do
    if (itemName == string.upper(name)) then
    return true
    end
    end

    return false
    end

    local error = false
    local backpacks = {}
    for merchant, bpName in pairs(BackpacksToSortTo) do
    backpacks[merchant] = Container.GetByName(bpName)
    if (not backpacks[merchant]:isOpen()) then
    error = true
    print("You must open a %s as your %s backpack. Please fix the problem and restart the script.", bpName, merchant)
    break
    end
    end

    local j = 0
    if (not error) then
    repeat
    print("Box: "..BackpacksToSortTo.Main)
    while (backpacks["Main"]:ItemCount() > j) do
    local item = backpacks["Main"]:GetItemData(j)

    if Item.isContainer(item.id) then --Check if it's a backpack/Container
    j = j + 1
    else --move it the loot
    local foundBp = backpacks["Others"]
    for merchant, _ in pairs(MerchantsAndItems) do
    if (itemFound(MerchantsAndItems[merchant], item.id)) then
    foundBp = backpacks[merchant]
    break
    end
    end

    itemMoveHelper(backpacks["Main"], j, foundBp)
    wait(500, 900)
    end
    end
    until (backpacks["Main"]:ItemCount() == j)
    end
    Thanks man! I'll give it a try once I can login...apparently alot of us are having the same issue

  4. #4

    Join Date
    Feb 2013
    Location
    Singapore
    Posts
    86
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kruel View Post
    Thanks man! I'll give it a try once I can login...apparently alot of us are having the same issue
    how did this go?

  5. #5

    Join Date
    Oct 2013
    Posts
    97
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    didnt work :/ same problem as just editing the names of the bps to "Depot Box I" etc. "You must open a Depot Box II as your Main backpack. Please fix the problem and restart the script."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •