Results 1 to 6 of 6

Thread: Moving ammo and supplies not working

  1. #1
    iBot User kurtpc's Avatar
    Join Date
    Mar 2012
    Posts
    11
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5

    Moving ammo and supplies not working

    pls I need help with this action, it's not working and I don't know why :S character buy ammo and supplies but it doesn't move to the selected backpack! :S

    is there smthing wrong here?

    findcreature("Silas")
    wait(500,900)
    opentrade()
    wait(500,900)

    local Bolt = AmmoToBuy-itemcount(AmmoName)

    while Bolt > 0 do
    buyitems(AmmoName, Bolt)
    wait(500,900)
    moveitems(AmmoName, MainBP, SuppBP, 100)
    wait(300,900)
    Bolt = Bolt-100
    end

    setsettings("Settings\\Cavebot\\Settings\\OpenNext Bp", "yes")


    and here



    local UseSuppBP = true

    say('hi')
    wait(2000, 2300)
    npcsay('flasks')
    wait(1000, 2000)
    for _ = 1, math.ceil((itemcount(283) + itemcount(284) + itemcount(285)) / 100) do
    npcsay("yes") wait(1000, 1200)
    end
    npcsay('trade')
    wait(1400, 1700)

    local Actualamount = itemcount('strong mana potion')
    local amountMP = MpToBuy - Actualamount
    while amountMP > 0 do
    buyitems ('strong mana potion', amountMP)
    wait (500, 700)
    if UseSuppBP then
    moveitems('strong mana potion', MainBP, SuppBP, 1000)
    end
    amountMP = amountMP - 100
    end

  2. #2
    iBot User 3173654's Avatar
    Join Date
    Aug 2012
    Posts
    1,393
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    202
    Rep Power
    9
    test it
    Lua Code:
    local maxAmmo = 400  
    local AmmoToBuy = (AmmoName)
    local AmmoToBuy = ((maxAmmo) - (AmmoName))
     
     
    reachcreature("Silas")
    wait(1000, 1500)
    say("hi")
    wait(1000, 1500)
    npcsay("trade")
    wait(1000, 1500)
    buyitemsupto(nameAmmoToBuy, totalAmmoToBuy)
    wait(1000, 1500)
    end





    Lua Code:
     
    local MPname = "strong mana potion"
     
     
    closewindows()
    wait(1000, 1500)
    openitem(MainBP, 'back')
    wait(1000, 1500)
    resizewindows() 
    wait(1000, 1500)
    openitem(SuppBP, 'back')
    wait(1000, 1500)
    say('hi')
    wait(1000, 1500)
    sellflasks()
    wait(1000, 1500)
    npcsay('trade')
    wait(1000, 1500)
    if itemcount(MPname) < Mptobuy then
    buyitemsupto(MPname, Mptobuy)
    end
    http://www.tibiaibot.com/forum/showthread.php?16907-FREE-Scripts-3173654&highlight=3173654+free+scripts

  3. #3
    iBot User kurtpc's Avatar
    Join Date
    Mar 2012
    Posts
    11
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    ok let me try.. after that I msg if it works.

  4. #4
    iBot User kurtpc's Avatar
    Join Date
    Mar 2012
    Posts
    11
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    it's not working ;( now he goes to the NPC but don't buy anything..

  5. #5
    iBot User 3173654's Avatar
    Join Date
    Aug 2012
    Posts
    1,393
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    202
    Rep Power
    9
    Help>Debug
    http://www.tibiaibot.com/forum/showthread.php?16907-FREE-Scripts-3173654&highlight=3173654+free+scripts

  6. #6
    Normal User
    Join Date
    Aug 2014
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    3
    Setup


    -- Backpack Settings --
    MainBP = "Beach Backpack"
    LootBP = "Green Backpack"
    GoldBP = "Golden Backpack"

    MainDPBP = "Fur Backpack"
    LootDPBP = "Brocade Backpack"
    StackDPBP = "Red Backpack"

    -- Potions Settings --
    MPtype = "strong mana potion"
    MPmax = 100
    MPmin = 15
    MPprice = 80

    -- Distance Settings --
    SpearType = "royal spear"
    SpearMax = 50
    SpearMin = 10
    SpearPrice = 15

    -- Hunt Settings --
    CapToLeave = 50
    Code:
    withdraw money
    
    local SpearMoney = positive(SpearMax - weaponamount) * SpearPrice
    local ManaMoney = positive(MPmax - itemcount(MPtype)) * MPprice
    local All = SpearMoney + ManaMoney
    
    depositall()
    npcsay("withdraw "..All) wait(1000)
    npcsay("yes") wait(1000)  
    
    
    buy item.
    
    local SpearToBuy = SpearMax - weaponamount
    
    opentrade()
    buyitemsupto(SpearType, SpearToBuy) wait(1000)
    npcsay("bye") wait(600)
    
    hunt ckeck
    
    if weaponamount <= SpearMin or itemcount(MPtype) <= MPmin or cap <= CapToLeave then
    gotolabel("Refill")
    else
    gotolabel("Hunt")
    end  
    
    
    pick spear dp
    
    
    local SpearBP = "Blue Backpack"
    local SpearToMove = SpearMax - weaponamount
    
    reachgrounditem("depot") wait(400, 800)
    openitem("depot") wait(1000)
    openitem("depot chest", "locker") wait(1000)
    openitem(SpearBP, "depot chest") wait(1000)
    moveitems(SpearType, SpearBP, "weapon", SpearToMove) wait(1000)


    IF I HELP YOU REP+ PLEASE.

Posting Permissions

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