Results 1 to 7 of 7

Thread: Problem with Refilling ammo from depo

  1. #1
    iBot User Chudson's Avatar
    Join Date
    Nov 2014
    Posts
    82
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    24 Post(s)
    Reputation
    57
    Rep Power
    3

    Problem with Refilling ammo from depo

    Hello!
    I have a little problem with action. Can someone help me with that?
    I make sometjing like that:
    Lua Code:
     
    local AmmoType = "bolt"
    local AmmoBP = "backpack"
    local AmmoDPBP = "Red Backpack"
    local AmmoMax = 600
    local AmmoToTake = AmmoMax - itemcount(AmmoType, AmmoBP)
     
     
    while windowcount() > 0 do
    closewindows()
    wait(300,500)
    setsettings("Settings\\CaveBot\\Settings\\OpenNextBp", "no")
    updateworld()
    end
    while windowcount(MainBP) == 0 do
    openitem(MainBP,'back')
    wait(1000)
    updateworld()
    end
    while windowcount(AmmoBP) == 0 do
    openitem(AmmoBP,MainBP)
    wait(1000)
    resizewindows()
    updateworld()
    end
    while windowcount("locker") == 0 do
    reachgrounditem("depot")
    wait(1000)
    openitem("depot")
    wait(1000)
    updateworld()
    end
    while windowcount("depot chest") == 0 do
    openitem("depot chest", "locker")
    wait(1000)
    updateworld()
    end
    while windowcount(AmmoDPBP) == 0 do
    openitem(AmmoDPBP, "depot chest")
    wait(1000)
    updateworld()
    end
     
     
     
    while itemcount(AmmoType, AmmoBP) < AmmoMax do
    	for k = 1,10 do
    		while AmmoToTake > 0 and itemcount(AmmoType, AmmoDPBP) > 0 and itemcount(AmmoType, AmmoBP) <  AmmoMax do
    			moveitems(AmmoType,AmmoDPBP, AmmoBP, AmmoToTake)
                            wait(500,700)
                            AmmoToTake = AmmoToTake -100
    		end
    	end
    openitem(AmmoDPBP, AmmoDPBP)
    wait(300,600)
    updateworld()
    end


    But it doeas not work well....

  2. #2
    Normal User
    Join Date
    Nov 2014
    Location
    Poland - podlaskie
    Posts
    132
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    47
    Rep Power
    3
    try dont use normal backpack change local AmmoBP = "backpack", for example, purple backpack, or orange etc.

  3. #3
    iBot User Chudson's Avatar
    Join Date
    Nov 2014
    Posts
    82
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    24 Post(s)
    Reputation
    57
    Rep Power
    3
    Quote Originally Posted by JuicyScripts View Post
    try dont use normal backpack change local AmmoBP = "backpack", for example, purple backpack, or orange etc.
    its only example. i also dont use "bolts"

  4. #4
    Normal User
    Join Date
    Nov 2014
    Location
    Poland - podlaskie
    Posts
    132
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    47
    Rep Power
    3
    no bolts ;p you want using brown backpack, but sometime normal backpack make stuck... change yout name backpack from "backpack" on "purple backpack" or other ;]

  5. #5
    iBot User Chudson's Avatar
    Join Date
    Nov 2014
    Posts
    82
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    24 Post(s)
    Reputation
    57
    Rep Power
    3


    MAN... Its ONLY EXAMPLE! I rly dont use brown bp. I dont have variables in action at all (all is in setup)....

  6. #6
    iBot User Chudson's Avatar
    Join Date
    Nov 2014
    Posts
    82
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    24 Post(s)
    Reputation
    57
    Rep Power
    3
    Bump

  7. #7
    iBot User Chudson's Avatar
    Join Date
    Nov 2014
    Posts
    82
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    24 Post(s)
    Reputation
    57
    Rep Power
    3
    bump

Posting Permissions

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