XenoBot Forums - Powered by vBulletin

User Tag List

Results 1 to 6 of 6

Thread: moving potions to supply bp

  1. #1

    Join Date
    Oct 2012
    Posts
    188
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    moving potions to supply bp

    so i am having trouble this script i got keeps glitching out when buying manas/healths and wont bring them to supply bp this is the code could any1 care to either fix it or write me one that will work greatly appreciated

    local items = {268, 266, 236, 239, 238, 237, 7643,}
    -- mana/health id

    local MainBP = MainBP
    local PotionsBP = SuppBP

    Module.New("Sort Supplies", function()
    local bp1 = Container(MainBP)
    for spot, item in bp1:iItems() do
    if (table.contains(items, item.id)) then
    bp1:MoveItemToContainer(spot, Container.New(PotionsBP))
    break
    end
    end
    end)

  2. #2
    Moderator Elvang's Avatar
    Join Date
    Dec 2010
    Location
    B.C. Canada
    Posts
    1,365
    Mentioned
    104 Post(s)
    Tagged
    1 Thread(s)
    lua code:

    local MainBP = MainBP
    local PotionsBP = SuppBP

    local MainBP = 'Blue Backpack'
    local PotionsBP = 'Red Backpack'


    You didn't change the backpack names?

  3. #3

    Join Date
    Oct 2012
    Posts
    188
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Elvang View Post
    lua code:

    local MainBP = MainBP
    local PotionsBP = SuppBP

    local MainBP = 'Blue Backpack'
    local PotionsBP = 'Red Backpack'


    You didn't change the backpack names?
    no no its in the section your not supposed to change its supposed to when buying mana potions/healths move them to my supply bp

  4. #4

    Join Date
    Oct 2012
    Posts
    188
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    bump can any1 help me?!

  5. #5
    dean015's Avatar
    Join Date
    Nov 2015
    Posts
    119
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ohagan View Post
    bump can any1 help me?!
    Code:
    local SuppliesBP = "Jewelled backpack"



    Code:
    Module.New('Shove-pots', function(mod)
        local DROP_ITEMS = {"mana potion", "great health potion", "ultimate health potion"}
     
        for i = 0, #Container.GetAll() do   -- let's find bps
            search = Container.New(i)
            cont = Container.New(SuppliesBP)
            for spot = 0, cont:ItemCount() do
                local item = search:GetItemData(spot)
                if cont:isOpen() and search:Name() ~= cont:Name() then
                    if table.find(DROP_ITEMS, Item.GetName(item.id)) and not cont:isFull() then
                        search:MoveItemToContainer(spot, cont:Index(), 0, 100)  -- just shove to selected bp
                    end
                end
            end
        end
    end)

    not mine but it works

  6. #6

    Join Date
    Oct 2012
    Posts
    188
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    @dean015 that you so much this just made my script that i paid for from not full afk cause hes a noob to full afk your the best

Posting Permissions

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