Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------ REFILL SETTINGS ------
- local LeaveMana = 60 --- How many mana potions until you leave the hunt?
- local BuyMana = 200 --- How many mana potions you begin the hunt with?
- local MaxMana = 200
- local LeaveBolt = 200 --- How many Prismatic Bolt until you leave the hunt?
- local BuyBolt = 2200 --- How many Prismatic Bolt you begin the hunt with?
- local MaxBolt = 2200
- local LeaveCap = 0 --- Leaves spawn when character reaches this cap
- local MinSoft = 0
- local MaxSoft = 0
- local MinMoney = 0
- local BuyFood = 300
- local MinFood = 100 --- How many Brown Mushroms until you leave the hunt
- local MaxFood = 300 --- How many Brown Mushroms you begin the hunt witch
- -- Item ID's, if you don't want to use SHP and SMP, change these:
- local FoodName = "Brown Mushroom"
- local FoodCost = 10
- local SoftName = "Pair Soft Boots"
- local MoneyName = "Gold Coin"
- local ManaName = "Ultimate Mana Potion"
- local ManaCost = 350
- local BoltName = "Sudden Death Rune"
- local BoltCost = 100
- -- Backpack Configuration:
- local MainBP = "Buggy Backpack"
- local StackBP = "Grey bakcpack"
- local LootBP = "Zaoan chess box"
- local Mana1BP = "Purple Backpack"
- local ManaBP = "Jewelled Backpack"
- --------- HUNT SETTINGS ---------
- -- Here I'm gonna get the item ids, leave this as it is.
- local FoodID = Item.GetID(FoodName)
- local ManaID = Item.GetID(ManaName)
- local SoftID = Item.GetID(SoftName)
- local BoltID = Item.GetID(BoltName)
- local LootID = { 14079, 14078, 14081, 17812, 17859 } -- items you are selling to Rock in a Hard Place
- local MoneyID = Item.GetID(MoneyName)
- -- local GoldBP = 3253 --- Item ID of your gold backpack.
- registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
- function onWalkerSelectLabel(labelName)
- if (labelName == "CheckManas") then
- -- Check Supplies, GoBackHunt or Leave
- Walker.ConditionalGoto((Self.ItemCount(ManaID) <= LeaveMana) or (Self.ItemCount(BoltID) < LeaveBolt) or (Self.Cap() < LeaveCap), "Leave", "GoBackHunt")
- elseif (labelName == "WithdrawMoney") then
- Walker.Stop()
- wait(2000)
- Self.SayToNpc({"hi", "Withdraw 1", "yes"}, 100)
- wait(2000)
- Walker.Start()
- elseif (labelName == "WithdrawMoney2") then
- Walker.Stop()
- wait(2000)
- Self.SayToNpc({"hi", "Withdraw 30001", "yes"}, 100)
- wait(2000)
- Walker.Start()
- elseif (labelName == "WithdrawMoney3") then
- Walker.Stop()
- wait(2000)
- Self.SayToNpc({"hi", "Withdraw 3001", "yes"}, 100)
- wait(2000)
- Walker.Start()
- elseif (labelName == "CheckSoft2") then
- -- Check Supplies, GoBackEdron or SoftRefiller
- Walker.ConditionalGoto((Self.ItemCount(6529) >= MaxSoft), "GoBackEdron", "SoftRefiler")
- elseif (labelName == "LoadSoft") then
- Walker.Stop()
- wait(2000)
- Self.SayToNpc({"hi", "Soft Boots", "yes"}, 100)
- wait(2000)
- Walker.Start()
- elseif (labelName == "CheckFood") then
- -- Check Supplies, Complet2 or GoRefilFood
- Walker.ConditionalGoto((Self.ItemCount(3725) <= MinFood), "GoRefilfood", "Complet2")
- elseif (labelName == "CheckFood2") then
- -- Check Supplies, GoBackDepot or FoodShop
- Walker.ConditionalGoto((Self.ItemCount(3725) >= MaxFood), "GoBackDepot2", "FoodShop")
- elseif (labelName == "CheckBolt") then
- -- Check Supplies, GoBuyManas or BackAmmoShop
- Walker.ConditionalGoto((Self.ItemCount(16141) >= MaxBolt), "GoBuyManas", "AmmoShop")
- elseif (labelName == "CheckPots") then
- -- Check Supplies, GoHunt or BackManaShop
- Walker.ConditionalGoto((Self.ItemCount(237) >= MaxMana), "GoHunt", "ManaShop")
- elseif (labelName == "End") then
- -- Check Supplies, StartScript or Start
- Walker.ConditionalGoto((Self.ItemCount(3031) >= MinMoney), "Start", "StartScript")
- elseif (labelName == "BuyMana") then
- -- Buy Mana Potions
- Walker.Stop()
- if (Self.ItemCount(ManaID) < BuyMana) then
- print("Buying Mana Potion")
- Self.SayToNpc("hi", 100)
- wait(1000)
- Self.SayToNpc("trade", 100)
- while (Self.ItemCount(ManaID) < BuyMana) do
- Self.ShopBuyItemsUpTo(ManaID, BuyMana)
- wait(500,800)
- end
- wait(200, 500)
- end
- Walker.Start()
- elseif (labelName == "BuySD") then
- -- Buy Prismatic Bolts
- Walker.Stop()
- print("Buying SD")
- Self.SayToNpc({"hi"}, 100)
- wait(1000)
- Self.SayToNpc({"trade"}, 100)
- -- Buy spears, make sure Self.ItemCount returns items in hands.
- while (Self.ItemCount(BoltID) < BuyBolt) do
- Self.ShopBuyItemsUpTo(BoltID, BuyBolt)
- wait(500,800)
- end
- Walker.Start()
- elseif (labelName == "SailCarlin") then
- Walker.Stop()
- wait(1000)
- Self.SayToNpc({"Please Bring Me To Carlin"}, 100)
- wait(1000)
- Walker.Start()
- elseif (labelName == "SailVenore") then
- Walker.Stop()
- wait(1000)
- Self.SayToNpc({"Please Bring Me To Venore"}, 100)
- wait(1000)
- Walker.Start()
- elseif (labelName == "checksoft") then
- -- Check Soft, norefill or refill
- Walker.ConditionalGoto((Self.ItemCount(6530) >= 1), "refill", "norefill")
- elseif (labelName == "LoadSoft") then
- Walker.Stop()
- wait(1000)
- Self.SayToNpc({"hi", "Soft Boots", "yes"}, 100)
- wait(1000)
- Walker.Start()
- elseif (labelName == "banksoft") then
- Walker.Stop()
- wait(1000,1500)
- Self.SayToNpc({"hi", "withdraw 50000", "yes"}, 65)
- wait(1000,1500)
- Walker.Start()
- elseif (labelName == "SailFury") then
- Walker.Stop()
- Self.SayToNpc({"hi"}, 100)
- wait(1000)
- Self.SayToNpc({"collapsed mansion"}, 100)
- wait(1000)
- Self.SayToNpc({"yes"}, 100)
- Walker.Start()
- elseif (labelName == "SailAsylum") then
- Walker.Stop()
- wait(1000)
- Self.SayToNpc({"Please Bring Me To Asylum"}, 100)
- wait(1000)
- Walker.Start()
- elseif (labelName == "CheckPosDoorL") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33080 and pos.y == 31215 and pos.z == 7) then
- Walker.Goto("GoDoorL")
- else
- Walker.Goto("PosDoorL")
- end
- elseif (labelName == "CheckPosDoorW") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33090 and pos.y == 31190 and pos.z == 7) then
- Walker.Goto("GoDoorW")
- else
- Walker.Goto("PosDoorW")
- end
- elseif (labelName == "CheckPosDoorW2") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33077 and pos.y == 31180 and pos.z == 8) then
- Walker.Goto("GoDoorW2")
- else
- Walker.Goto("PosDoorW2")
- end
- elseif (labelName == "CheckPosDoorW3") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33080 and pos.y == 31164 and pos.z == 8) then
- Walker.Goto("GoDoorW3")
- else
- Walker.Goto("PosDoorW3")
- end
- elseif (labelName == "CheckPosDoorW4") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33080 and pos.y == 31164 and pos.z == 8) then
- Walker.Goto("GoDoorW4")
- else
- Walker.Goto("PosDoorW4")
- end
- elseif (labelName == "CheckPosDoorW5") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33077 and pos.y == 31180 and pos.z == 8) then
- Walker.Goto("GoDoorW5")
- else
- Walker.Goto("PosDoorW5")
- end
- elseif (labelName == "CheckPosDoorW6") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33090 and pos.y == 31190 and pos.z == 7) then
- Walker.Goto("GoDoorW6")
- else
- Walker.Goto("PosDoorW6")
- end
- elseif (labelName == "Door1") then
- Walker.Stop()
- if not Map.IsTileWalkable(33230, 32412, 7) then
- Self.UseItemFromGround(33230, 32412, 7)
- end
- Walker.Start()
- elseif (labelName == "Door2") then
- Walker.Stop()
- if not Map.IsTileWalkable(33230, 32406, 7) then
- Self.UseItemFromGround(33230, 32406, 7)
- end
- Walker.Start()
- elseif (labelName == "Door3") then
- Walker.Stop()
- if not Map.IsTileWalkable(33224, 32398, 7) then
- Self.UseItemFromGround(33224, 32398, 7)
- end
- Walker.Start()
- elseif (labelName == "Door4") then
- Walker.Stop()
- if not Map.IsTileWalkable(33221, 32394, 7) then
- Self.UseItemFromGround(33221, 32394, 7)
- end
- Walker.Start()
- elseif (labelName == "Door5") then
- Walker.Stop()
- if not Map.IsTileWalkable(33221, 32400, 7) then
- Self.UseItemFromGround(33221, 32400, 7)
- end
- Walker.Start()
- elseif (labelName == "CheckPosLevW") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33082 and pos.y == 31110 and pos.z == 2) then
- Walker.Goto("GoLevW")
- else
- Walker.Goto("PosLevW")
- end
- elseif (labelName == "CheckPosLevW2") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33078 and pos.y == 31080 and pos.z == 13) then
- Walker.Goto("GoLevW2")
- else
- Walker.Goto("PosLevW2")
- end
- elseif (labelName == "Tp4") then
- Walker.Stop()
- wait(500)
- Self.Step(NORTH)
- wait(500)
- Walker.Start()
- elseif (labelName == "DoorL2") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33074, 31170, 7)
- wait(500)
- Walker.Start()
- elseif (labelName == "SailOramond") then
- Walker.Stop()
- wait(1000)
- Self.SayToNpc({"Please Bring Me To Oramond"}, 100)
- wait(1000)
- Walker.Start()
- elseif (labelName == "DoorL") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33080, 31215, 7)
- wait(500)
- Walker.Start()
- elseif (labelName == "Tp5") then
- Walker.Stop()
- wait(500)
- Self.Step(WEST)
- wait(500)
- Walker.Start()
- elseif (labelName == "Tp6") then
- Walker.Stop()
- wait(500)
- Self.Step(NORTH)
- wait(500)
- Walker.Start()
- elseif (labelName == "Tp7") then
- Walker.Stop()
- wait(500)
- Self.Step(NORTH)
- wait(500)
- Walker.Start()
- elseif (labelName == "TpSc") then
- Walker.Stop()
- wait(500)
- Self.Step(NORTH)
- wait(500)
- Walker.Start()
- elseif (labelName == "UP") then
- Walker.Stop()
- wait(500)
- Self.Say({"exani hur up"}, 1)
- wait(500)
- Walker.Start()
- elseif (labelName == "DOWN") then
- Walker.Stop()
- wait(500)
- Self.Say({"exani hur down"}, 1)
- wait(500)
- Walker.Start()
- elseif (labelName == "Lever") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(32994, 31547, 4)
- wait(500)
- Self.UseItemFromGround(32994, 31547, 4)
- wait(500)
- Walker.Start()
- elseif (labelName == "Lever2") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33062, 31527, 10)
- wait(500)
- Self.UseItemFromGround(33062, 31527, 10)
- wait(500)
- Walker.Start()
- elseif (labelName == "Lever3") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(32992, 31539, 4)
- wait(500)
- Self.UseItemFromGround(32992, 31539, 4)
- wait(500)
- Walker.Start()
- elseif (labelName == "LeverW") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33078, 31079, 13)
- wait(500)
- Walker.Start()
- elseif (labelName == "LeverW2") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33082, 31109, 2)
- wait(500)
- Walker.Start()
- elseif (labelName == "DoorW") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33090, 31190, 7)
- wait(500)
- Walker.Start()
- elseif (labelName == "DoorW2") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33077, 31180, 8)
- wait(500)
- Walker.Start()
- elseif (labelName == "DoorW3") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33080, 31164, 8)
- wait(500)
- Walker.Start()
- elseif (labelName == "Door3") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33083, 31216, 8)
- wait(500)
- Walker.Start()
- elseif (labelName == "Door2") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33074, 31170, 7)
- wait(500)
- Walker.Start()
- elseif (labelName == "Door3") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33074, 31170, 7)
- wait(500)
- Walker.Start()
- elseif (labelName == "Door4") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(33080, 31215, 7)
- wait(500)
- Walker.Start()
- elseif (labelName == "Door5") then
- Walker.Stop()
- wait(500)
- Self.UseItemFromGround(32990, 31547, 4)
- wait(500)
- Walker.Start()
- elseif (labelName == "DoorO1") then
- Walker.Stop()
- if not Map.IsTileWalkable(33060, 31529, 10) then
- Self.UseItemFromGround(33060, 31529, 10)
- end
- Walker.Start()
- elseif (labelName == "DoorO2") then
- Walker.Stop()
- if not Map.IsTileWalkable(33032, 31530, 10) then
- Self.UseItemFromGround(33032, 31530, 10)
- end
- Walker.Start()
- elseif (labelName == "DoorO3") then
- Walker.Stop()
- if not Map.IsTileWalkable(33032, 31530, 10) then
- Self.UseItemFromGround(33032, 31530, 10)
- end
- Walker.Start()
- elseif (labelName == "DoorO4") then
- Walker.Stop()
- if not Map.IsTileWalkable(33060, 31529, 10) then
- Self.UseItemFromGround(33060, 31529, 10)
- end
- Walker.Start()
- elseif (labelName == "DoorO5") then
- Walker.Stop()
- if not Map.IsTileWalkable(32990, 31547, 4) then
- Self.UseItemFromGround(32990, 31547, 4)
- end
- Walker.Start()
- elseif (labelName == "DoorO6") then
- Walker.Stop()
- if not Map.IsTileWalkable(33214, 31789, 7) then
- Self.UseItemFromGround(33214, 31789, 7)
- end
- Walker.Start()
- elseif (labelName == "CheckPosBoat") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 32954 and pos.y == 32023 and pos.z == 6) then
- Walker.Goto("GoRefilSoft2")
- else
- Walker.Goto("PosBoat")
- end
- elseif (labelName == "CheckPosBoat2") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33175 and pos.y == 31764 and pos.z == 6) then
- Walker.Goto("GoDepot")
- else
- Walker.Goto("PosBoat2")
- end
- elseif (labelName == "CheckPosC") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 32984 and pos.y == 31539 and pos.z == 1) then
- Walker.Goto("GoWalls")
- else
- Walker.Goto("PosC")
- end
- elseif (labelName == "CheckPosSc") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33093 and pos.y == 31122 and pos.z == 12) then
- Walker.Goto("GoSc")
- else
- Walker.Goto("PosSc")
- end
- elseif (labelName == "CheckPosDoor3") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33074 and pos.y == 31170 and pos.z == 7) then
- Walker.Goto("GoDoor3")
- else
- Walker.Goto("PosDoor3")
- end
- elseif (labelName == "CheckPosDoor4") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33080 and pos.y == 31215 and pos.z == 7) then
- Walker.Goto("GoDoor4")
- else
- Walker.Goto("PosDoor4")
- end
- elseif (labelName == "CheckPosUp") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33026 and pos.y == 31550 and pos.z == 5) then
- Walker.Goto("GoUp")
- else
- Walker.Goto("PosUp")
- end
- elseif (labelName == "CheckPosDown") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33008 and pos.y == 31555 and pos.z == 5) then
- Walker.Goto("GoDown")
- else
- Walker.Goto("PosDown")
- end
- elseif (labelName == "CheckPosLever") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33061 and pos.y == 31527 and pos.z == 10) then
- Walker.Goto("GoLever")
- else
- Walker.Goto("PosLever")
- end
- elseif (labelName == "CheckDoorO1") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33060 and pos.y == 31529 and pos.z == 10) then
- Walker.Goto("GoDoorO1")
- else
- Walker.Goto("PosDoorO1")
- end
- elseif (labelName == "CheckDoorO2") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33032 and pos.y == 31530 and pos.z == 10) then
- Walker.Goto("GoDoorO2")
- else
- Walker.Goto("PosDoorO2")
- end
- elseif (labelName == "CheckPosDoorL3") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33074 and pos.y == 31170 and pos.z == 7) then
- Walker.Goto("GoDoorL3")
- else
- Walker.Goto("PosDoorL3")
- end
- elseif (labelName == "CheckPosDoorL4") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33086 and pos.y == 31199 and pos.z == 7) then
- Walker.Goto("GoDoorL4")
- else
- Walker.Goto("PosDoorL4")
- end
- elseif (labelName == "CheckPosLever2") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 32993 and pos.y == 31547 and pos.z == 4) then
- Walker.Goto("GoLever2")
- else
- Walker.Goto("PosLever2")
- end
- elseif (labelName == "CheckDoor05") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 32990 and pos.y == 31547 and pos.z == 4) then
- Walker.Goto("GoDoor05")
- else
- Walker.Goto("PosDoor05")
- end
- elseif (labelName == "CheckPosLever3") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 32991 and pos.y == 31539 and pos.z == 1) then
- Walker.Goto("GoLever3")
- else
- Walker.Goto("PosLever3")
- end
- elseif (labelName == "CheckPosC2") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33193 and pos.y == 31784 and pos.z == 3) then
- Walker.Goto("GoC2")
- else
- Walker.Goto("PosC2")
- end
- elseif (labelName == "CheckDoorO6") then
- delayWalker(2000)
- local pos = Self.Position()
- if (pos.x == 33214 and pos.y == 31789 and pos.z == 7) then
- Walker.Goto("GoDoorO6")
- else
- Walker.Goto("PosDoorO6")
- end
- elseif (labelName == "StartScript") then
- -- Buy Mana Potions
- Walker.Stop()
- print("Wez Gosciu !!!! -- tego labela nie musisz robic dziewico jebana")
- Walker.Start() Walker.Start()
- elseif (labelName == "Hunt") then
- -- Buy Mana Potions
- Walker.Stop()
- print("Refil Is Complet Go Hunt")
- Walker.Start() Walker.Start()
- elseif (labelName == "DepositGold") then
- -- Deposit Gold, check balance.
- Walker.Stop()
- Self.SayToNpc({"hi", "deposit all", "yes"}, 100)
- local withdrawManas = math.max(BuyMana - Self.ItemCount(ManaID), 0)*ManaCost
- local withdrawBolt = math.max(BuyBolt - Self.ItemCount(BoltID), 0)*BoltCost
- local total = math.abs(withdrawManas + withdrawBolt)+5000
- if total >= 1 then
- Self.SayToNpc({"withdraw " .. total, "yes", "balance"}, 100)
- end
- Walker.Start()
- elseif (labelName == "DepositItems") then
- -- Deposit Items
- Walker.Stop()
- Self.ReachDepot()
- Self.DepositItems()
- wait(1000)
- Self.DepositItems({3366,0}, {3414,0}, {3364,0}, {3420,0}, {7382,0}, {7393,0}, {3063,0}, {5954,1}, {6499,1}, {238,1}, {7643,1}, {3032,2}, {3320,0}, {3033,2}, {3328,2}, {3029,2}, {3330,2}, {9057,2})
- Self.DepositItems({6499,1}, {10312,1}, {5944,1}, {10306,1}, {9660,1})
- elseif (labelName == "OpenBps") then
- -- Reset Backpacks
- Walker.Stop()
- Self.CloseContainers()
- Self.OpenMainBackpack()
- Container.GetLast():Minimize()
- wait(500,600)
- Container.GetByName(MainBP):OpenChildren(StackBP)
- Container.GetLast():Minimize()
- wait(500,600)
- Container.GetByName(MainBP):OpenChildren(LootBP)
- Container.GetLast():Minimize()
- wait(500,600)
- Container.GetByName(MainBP):OpenChildren(ManaBP)
- Container.GetLast():Minimize()
- wait(500,600)
- Container.GetByName(MainBP):OpenChildren(Mana1BP)
- Container.GetLast():Minimize()
- wait(500,600)
- Container.GetByName(ManaBP):OpenChildren(ManaBP)
- Container.GetLast():Minimize()
- wait(500,600)
- Walker.Start()
- end
- end
- Self.ReachDepot = function (tries)
- local tries = tries or 3
- Walker.Stop()
- local DepotIDs = {3497, 3498, 3499, 3500}
- local DepotPos = {}
- for i = 1, #DepotIDs do
- local dps = Map.GetUseItems(DepotIDs[i])
- for j = 1, #dps do
- table.insert(DepotPos, dps[j])
- end
- end
- local function gotoDepot()
- local pos = Self.Position()
- print("Depots found: " .. tostring(#DepotPos))
- 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("Something is blocking the path. Trying next depot.")
- end
- end
- return false
- end
- repeat
- reachedDP = gotoDepot()
- if reachedDP then
- return true
- end
- tries = tries - 1
- sleep(100)
- print("Attempt to reach depot was unsuccessfull. " .. tries .. " tries left.")
- until tries <= 0
- return false
- end
- Map.GetUseItems = function (id)
- if type(id) == "string" then
- id = Item.GetID(id)
- end
- local pos = Self.Position()
- local store = {}
- for x = -7, 7 do
- for y = -5, 5 do
- if Map.GetTopUseItem(pos.x + x, pos.y + y, pos.z).id == id then
- itemPos = {x = pos.x + x, y = pos.y + y, z = pos.z}
- table.insert(store, itemPos)
- end
- end
- end
- return store
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement