Results 1 to 7 of 7

Thread: moveitems not working help

  1. #1
    Normal User
    Join Date
    Jul 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3

    moveitems not working help

    Hello, I have a problem with moveitems not working please help.

    setup:

    Code:
    -- >>>>>>>>>>  Backpacks  <<<<<<<<<<
        MainBPname = "Dragon Backpack"
        LootBPname = "Grey Backpack"
        GoldBPname = "Orange Backpack"
        SupplyBPname = "Green Backpack"
    -- >>>>>>>>>>  Depot  <<<<<<<<<<
        MainDepotname = "Brown Backpack"
        LootDepotname = "Purple Backpack"
        AddonDepotname = "Red Backpack"
    -- >>>>>>>>>>  Potions  <<<<<<<<<<
        mananame = "mana potion" -- Name of mana potion.
        manaprice = 50  -- Price of mana potion to buy.
        manatobuy = 40 -- How many mana potions to buy?
        manatoback = 12 -- How many potions to back reffil?
    problem:

    Code:
    -- problem line a moveitems not working:
    -- moveitems(mananame,SupplyBPname, 1000)
    Code:
    local CurrentManas = itemcount(mananame)
     
    amount = manatobuy - CurrentManas
    while amount > 0 do
    buyitems(mananame, amount)
    wait(500,1000)
    moveitems(mananame,SupplyBPname, 1000) // problem not working please help
    wait(300,400)
    amount = amount-100
    end
    I have a all backpack. Please help. Why is it not working?

  2. #2
    iBot User jose maria's Avatar
    Join Date
    Jan 2014
    Location
    Brazil
    Posts
    85
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    19 Post(s)
    Reputation
    41
    Rep Power
    3
    Try this:
    Lua Code:
     
    local CurrentManas = itemcount(mananame)
     
    amount = manatobuy - CurrentManas
    while amount > 100 do
       buyitems(mananame, 100)
       amount = amount-100
       wait(500,1000)
       moveitems(mananame,SupplyBPname)
       wait(300,400)
    end
    if (amount <= 100) and (amount >= 1) then
       buyitems(mananame,amount)
       moveitems(mananame,SupplyBPname)
    end

  3. #3
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    I would rather use:
    Lua Code:
    buyitemsupto(mananame, manatobuy) 
    wait(250,500) 
    while itemcount(mananame, MainBPname) > 0 do 
    moveitems(mananame, SupplyBPname) 
    wait(250,500) 
    end

  4. #4
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by RafiXWPT View Post
    I would rather use:
    Lua Code:
    buyitemsupto(mananame, manatobuy) 
    wait(250,500) 
    while itemcount(mananame, MainBPname) > 0 do 
    moveitems(mananame, SupplyBPname) 
    wait(250,500) 
    end
    This.

    Why the hell would you make a variable for currentManas, just a waste of time.

    Then an even bigger waste of time, as well as being a point of failure, you're creating a varaible for "amount" then using it in a loop and subtracking 100 off it each time. What if it doesnt move 100?

    Simple is better.

    I'd add 1 more check though, to stop it getting stuck in infinite loops

    Lua Code:
    buyitemsupto(mananame, manatobuy) 
    wait(250,500) 
     
    while itemcount(mananame, MainBPname) > 0 and getcontainer(SupplyBPname).usedslots <= getcontainer(SupplyBPname).maxslots do 
    moveitems(mananame, SupplyBPname) 
    wait(250,500) 
    end

  5. #5
    Normal User
    Join Date
    Jul 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by pink_panther View Post
    This.

    Why the hell would you make a variable for currentManas, just a waste of time.

    Then an even bigger waste of time, as well as being a point of failure, you're creating a varaible for "amount" then using it in a loop and subtracking 100 off it each time. What if it doesnt move 100?

    Simple is better.

    I'd add 1 more check though, to stop it getting stuck in infinite loops

    Lua Code:
    buyitemsupto(mananame, manatobuy) 
    wait(250,500) 
     
    while itemcount(mananame, MainBPname) > 0 and getcontainer(SupplyBPname).usedslots <= getcontainer(SupplyBPname).maxslots do 
    moveitems(mananame, SupplyBPname) 
    wait(250,500) 
    end
    Now the bot goes to the store and buy a good amount of mana potion but does not carry them in your backpack. After purchasing just standing.

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    check your debug log, varaibles and setup.

    make sure you have your supplybp open and main bp open.

  7. #7
    Normal User
    Join Date
    Jul 2014
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3
    Quote Originally Posted by pink_panther View Post
    check your debug log, varaibles and setup.

    Make sure you have your supplybp open and main bp open.

    thanks!!! It's working!!!

Posting Permissions

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