Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --BP SETUP--
- local MainBp = "Jewelled Backpack" ----- Main Backpack
- local LootBp = "Blue backpack" ---- Backpack to put loot in
- local GoldBp = "Backpack" ------ Backpack to put gold in
- local ManaBp = "Golden backpack" ------ Backpack to put manas in
- --(info: all the bps should be different (individual) colours)
- --[[
- Depot SETUP (Have 2 backpacks in your depot, filled with backpacks)
- BP1 = Rares
- BP2 = Stackables
- --]]
- --[[Variables]]--
- local MinCap = 50 -- Mininum cap
- local ManaPotID = 268 -- ID of mana potion
- local ManaPotCost = 50 -- Cost of each mana potion
- local MinManaPot = 100 -- Mininum mana potion
- local MaxManaPot = 500 -- Maximum mana pots to buy
- local HealthPotID = 239 -- ID of health potion (strong = 236, great = 239)
- local MinHealthPot = 40 -- Minimum health potion
- local MaxHealthPot = 70 -- Maximum health potions to buy
- local HealthPotCost = 190 -- Cost of each mana potion
- --[[########################################################]]--
- --[[##########NOTHING BELOW HERE SHOULD BE CHANGED##########]]--
- --[[########################################################]]--
- --[[LABEL MANAGER]]--
- displayInformationMessage("FRAZZIE DOMINANDO")
- registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
- function onWalkerSelectLabel(labelName)
- if (labelName == "Start") then
- Targeting.Start()
- Looter.Start()
- Walker.Start()
- end
- end
- --[[Open Backpacks]]--
- elseif (labelName == "OpenBP") then
- print("Opening Backpacks")
- setWalkerEnabled(false)
- Self.CloseContainers()
- Self.OpenMainBackpack(true):OpenChildren({LootBp, true}, {GoldBp, true}, {ManaBp, true})
- setWalkerEnabled(true)
- elseif (labelName == "CheckBP") then
- print("Checking Backpacks")
- if #Container.GetAll() == 4 then
- Walker.Goto("BPsOK")
- else
- Walker.Goto("OpenBP")
- end
- setWalkerEnabled(true)
- elseif (labelName == "CheckBP") then
- print("Checking Backpacks")
- if #Container.GetAll() == 4 then
- Walker.Goto("BPsOK")
- else
- Walker.Goto("OpenBP")
- end
- setWalkerEnabled(true)
- --[DepositItems]]--
- elseif (labelName == "Deposit") then
- print("Depositing Items")
- Walker.Stop()
- Self.ReachDepo()
- Self.DepositItems({8027, 0}, {8043, 0})
- Self.DepositItems({9665, 1}, {3028, 1})
- Walker.Start()
- --[DepositGold]]--
- elseif (labelName == "DepositGold") then
- print("Depositing Gold")
- setWalkerEnabled(false)
- Self.SayToNpc("Hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Deposit all")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Yes")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Balance")
- setWalkerEnabled(true)
- elseif (labelName == "Potchecker") then
- if ((Self.ItemCount(ManaPotID) < MaxManaPot) or (Self.ItemCount(HealthPotID) <= MinHealthPot)) then
- gotoLabel("BuyPotions")
- end
- elseif (labelName == "Minimize") then
- setWalkerEnabled(false)
- Client.HideEquipment()
- wait(500, 1400)
- for x = 0, #Container.GetIndexes() - 1 do
- local bp = Container.GetFromIndex(x)
- bp:Minimize()
- wait(200, 400)
- --[[RefillPotions]]--
- elseif (labelName == "WithdrawCash") then
- print("Withdrawing Cash")
- Walker.Stop()
- Self.SayToNpc({"hi", "deposit all", "yes", "balance"}, 60, 5)
- local totalManaCost = math.abs((ManaPotCost*(MaxManaPot-Self.ItemCount(ManaPotID))))
- local totalHealthCost = math.abs((HealthPotCost*(MaxHealthPot-Self.ItemCount(HealthPotID))))
- local boatMoney = 2000
- local totalmoneyneeded = (totalManaCost + totalHealthCost + boatMoney)
- wait(100,300)
- local MATHCEIL = (math.ceil((totalmoneyneeded/1000)))*1000
- if (MATHCEIL > 0) then
- wait(700,1400)
- Self.WithdrawMoney(MATHCEIL)
- wait(500,900)
- end
- Walker.Start()
- --[[BuyPotions]]--
- elseif (labelName == "BuyPotions") then
- print("Buying Potions")
- Walker.Stop()
- Self.SayToNpc({"hi", "trade"}, 65)
- wait(900, 1200)
- Self.ShopBuyItemsUpTo(ManaPotID, MaxManaPot)
- wait(500,900)
- Self.ShopBuyItemsUpTo(ManaPotID, MaxManaPot)
- wait(500,900)
- Self.ShopBuyItemsUpTo(ManaPotID, MaxManaPot)
- wait(500,900)
- Self.ShopBuyItemsUpTo(ManaPotID, MaxManaPot)
- wait(500,900)
- Self.ShopBuyItemsUpTo(HealthPotID, MaxHealthPot)
- wait(500,900)
- Self.ShopBuyItemsUpTo(HealthPotID, MaxHealthPot)
- Walker.Start()
- elseif (labelName == "CheckGo") then
- if (Self.ItemCount(3549) == 1) then
- print("Current Mana Potions: " .. Self.ItemCount(ManaPotID) .. " / " .. MaxManaPot .. "\nCurrent Health Potions: " .. Self.ItemCount(HealthPotID) .. " / " .. MaxHealthPot .. "\nSoft Boots" .. " = " .. "Active" )
- else
- print("Current Mana Potions: " .. Self.ItemCount(ManaPotID) .. " / " .. MaxManaPot .. "\nCurrent Health Potions: " .. Self.ItemCount(HealthPotID) .. " / " .. MaxHealthPot .. "\nSoft Boots" .. " = " .. "Not found" )
- end
- delayWalker(1000)
- if ((Self.ItemCount(ManaPotID) < MaxManaPot) or (Self.Cap() <= MinCap) or (Self.ItemCount(HealthPotID) < MaxHealthPot)) then
- gotoLabel("Start")
- end
- elseif (labelName == "Check1") then
- if (Self.ItemCount(3549) == 1) then
- print("Current Mana Potions: " .. Self.ItemCount(ManaPotID) .. " / " .. MaxManaPot .. "\nCurrent Health Potions: " .. Self.ItemCount(HealthPotID) .. " / " .. MaxHealthPot .. "\nSoft Boots" .. " = " .. "Active" )
- else
- print("Current Mana Potions: " .. Self.ItemCount(ManaPotID) .. " / " .. MaxManaPot .. "\nCurrent Health Potions: " .. Self.ItemCount(HealthPotID) .. " / " .. MaxHealthPot .. "\nSoft Boots" .. " = " .. "Not found" )
- end
- delayWalker(1000)
- if ((Self.ItemCount(ManaPotID) <= MinManaPot) or (Self.Cap() <= MinCap) or (Self.ItemCount(HealthPotID) <= MinHealthPot)) then
- gotoLabel("Leave")
- end
- elseif (labelName == "Check2") then
- if (Self.ItemCount(3549) == 1) then
- print("Current Mana Potions: " .. Self.ItemCount(ManaPotID) .. " / " .. MaxManaPot .. "\nCurrent Health Potions: " .. Self.ItemCount(HealthPotID) .. " / " .. MaxHealthPot .. "\nSoft Boots" .. " = " .. "Active" )
- else
- print("Current Mana Potions: " .. Self.ItemCount(ManaPotID) .. " / " .. MaxManaPot .. "\nCurrent Health Potions: " .. Self.ItemCount(HealthPotID) .. " / " .. MaxHealthPot .. "\nSoft Boots" .. " = " .. "Not found" )
- end
- delayWalker(1000)
- if ((Self.ItemCount(ManaPotID) <= MinManaPot) or (Self.Cap() <= MinCap) or (Self.ItemCount(HealthPotID) <= MinHealthPot)) then
- gotoLabel("Leave")
- else
- gotoLabel("StartHunt")
- --[[DepotChooser]]--
- Self.ReachDepo = function (attempt)
- local attempt = attempt or 4
- Walker.Stop()
- local DepotIDs = {3497, 3498, 3499, 3500}
- local DepotPos = {}
- for i = 1, #DepotIDs do
- local dps = Map.GetUseItems(DepotIDs[i])
- for d = 1, #dps do
- table.insert(DepotPos, dps[d])
- end
- end
- local function gotoDepot()
- local pos = Self.Position()
- for i = 1, #DepotPos do
- location = DepotPos[i]
- Self.UseItemFromGround(location.x, location.y, location.z)
- wait(1000, 2000)
- if Self.DistanceFromPosition(pos.x, pos.y, pos.z) >= 1 then
- wait(5000, 6000)
- if Self.DistanceFromPosition(location.x, location.y, location.z) == 1 then
- Walker.Start()
- return true
- end
- else
- print("There is something blocking the path.")
- end
- end
- return false
- end
- repeat
- reachedDP = gotoDepot()
- if reachedDP then
- return true
- end
- attempt = attempt - 1
- sleep(100)
- print("Attempt to reach depot was unsuccessfull. " .. attempt .. " attempts left.")
- until attempt <= 0
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement