Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mana Potions --
- local ManasToLeave = 100
- local WantedManas = 299
- local ManaPotID = 238
- local ManaCost = 50
- local UsingSoftboots = false
- -- Health Potions --
- local SuddenToLeave = 150
- local WantedSudden = 900
- local SuddenID = 3155
- local SuddenCost = 110
- local AvaToLeave = 50
- local WantedAva = 150
- local AvaID = 3161
- local AvaCost = 45
- -- Other Options --
- local backpacks = {'golden backpack', 'buggy backpack', 'crown backpack'}
- local MainBP = 2854
- local ItemBP = 2871
- local GoldBP = 14249
- local StackBP = 9605
- local SuppliesBP = 2872
- local RingBP = 3253
- local MinCap = 10
- local HideEquipment = true
- -- Seller --
- local itemID = 3028
- local item2ID = 3032
- local item3ID = 3033
- local item4ID = 3381
- local item5ID = 3382
- local item6ID = 3280
- local item7ID = 3419
- local item8ID = 3381
- local item9ID = 3063
- local item10ID = 2958
- -- Floor Settings --
- local MaxAs = 19
- local SecondFloor = true
- local sWE = setWalkerEnabled
- local swe = setWalkerEnabled
- Targeting.Start()
- Looter.Start()
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- local info = [[]]
- wait(5000)
- print([[
- --<By Sholhzeyz :D>--]])
- wait(3000)
- -----------------------------------------------------------------------------------------------------------------------------------------
- function onWalkerSelectLabel(labelName)
- if (labelName == "Checker") then
- -- Check Supplies, Hunt or Leave
- Walker.ConditionalGoto((Self.ItemCount(ManaPotID) <= ManasToLeave) or (Self.ItemCount(SuddenID) <= SuddenToLeave) or (Self.ItemCount(AvaID) <= AvaToLeave), "Leave", "StartHunt")
- elseif (labelName == "Venore") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("venore") -- Tutaj wpisz wyspe na ktora sie udajesz.
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Seller") then
- setWalkerEnabled(false)
- delayWalker(10000)
- Self.SayToNpc("hi")
- sleep(math.random(800, 1700))
- Self.SayToNpc("trade")
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item5ID, Self.ShopGetItemSaleCount(item5ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item6ID, Self.ShopGetItemSaleCount(item6ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item7ID, Self.ShopGetItemSaleCount(item7ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item8ID, Self.ShopGetItemSaleCount(item8ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item9ID, Self.ShopGetItemSaleCount(item9ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item10ID, Self.ShopGetItemSaleCount(item10ID))
- sleep(math.random(1000, 1500))
- setWalkerEnabled(true)
- elseif (labelName == "Seller Bank") then
- setWalkerEnabled(false)
- delayWalker(10000)
- Self.SayToNpc("hi")
- sleep(math.random(800, 1700))
- Self.SayToNpc("trade")
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(itemID, Self.ShopGetItemSaleCount(itemID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item2ID, Self.ShopGetItemSaleCount(item2ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item3ID, Self.ShopGetItemSaleCount(item3ID))
- sleep(math.random(1000, 1500))
- Self.ShopSellItem(item4ID, Self.ShopGetItemSaleCount(item4ID))
- sleep(math.random(1000, 1500))
- setWalkerEnabled(true)
- function SellItems(item)
- wait(300, 1700)
- Self.ShopSellItem(item, Self.ShopGetItemSaleCount(item))
- wait(900, 1200)
- end
- elseif (labelName == "Asylum") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Asylum")
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Edron") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Edron")
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Oxidia") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Oxidia")
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Deposit") then
- setWalkerEnabled(false)
- Self.ReachDepot()
- Self.DepositItems({237, 1}, {3032, 1}, {3027, 1}, {3026, 1}, {9057, 1})
- Self.DepositItems({3419, 0}, {3048, 0}, {3381, 0}, {2995, 0}, {3382, 0}, {3280, 0}, {3079, 0}, {3324, 0}, {7456, 0}, {8073, 0}, {3098, 0}, {3567, 0}, {3055, 0}, {820, 0}, {12304, 0})
- wait(1500,1900)
- elseif (labelName == "Money") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("deposit all")
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Out") then
- swe(false)
- wait(500, 800)
- withdraw = 0
- withdraw = math.abs(withdraw + ((WantedManas - Self.ItemCount(ManaPotID)) * ManaCost))
- withdraw = math.abs(withdraw + ((WantedSudden - Self.ItemCount(SuddenID)) * SuddenCost))
- withdraw = math.abs(withdraw + ((WantedAva - Self.ItemCount(AvaID)) * AvaID))
- withdraw = withdraw + 2000
- Self.SayToNpc({'hi', 'withdraw ', tostring(withdraw) , 'yes'})
- wait(500, 800)
- swe(true)
- wait(500, 800)
- buyPotions(ManaPotID, WantedManas)
- wait(500,800)
- buyPotions(AvaID, WantedAva)
- wait(500, 800)
- elseif (labelName == "btaa") then
- swe(false)
- wait(500, 800)
- buyPotions(ManaPotID, WantedManas)
- wait(500, 800)
- buyPotions(UhpId, WantedUhp)
- wait(500, 800)
- swe(true)
- elseif (labelName == "Buy Ammo") then
- setWalkerEnabled(false)
- buyPotions(AmmoID, WantedAmmo)
- setWalkerEnabled(true)
- elseif (labelName == "FullCheck") then
- if (Self.ItemCount(ManaPotID) < WantedManas) or (Self.Cap() < MinCap) or (Self.ItemCount(SuddenID) < WantedSudden) or (Self.ItemCount(AvaID) < WantedAva) then
- gotoLabel("Resupply")
- else
- gotoLabel("SkipSupplies")
- end
- elseif (labelName == "on") then
- setTargetingEnabled(true)
- wait(1500)
- elseif (labelName == "off") then
- setTargetingEnabled(false)
- wait(100)
- elseif (labelName == "StopLoot") then
- setLooterEnabled(false)
- wait(500)
- elseif (labelName == "startLoot") then
- setLooterEnabled(true)
- wait(500)
- elseif (labelName == "yemeen") then
- setWalkerEnabled(false)
- delayWalker(500)
- Self.Step(EAST)
- wait(500)
- setWalkerEnabled(true)
- elseif (labelName == "shemal") then
- setWalkerEnabled(false)
- delayWalker(500)
- Self.Step(WEST)
- wait(500)
- setWalkerEnabled(true)
- elseif (labelName == "fo2") then
- setWalkerEnabled(false)
- delayWalker(500)
- Self.Step(NORTH)
- wait(500)
- setWalkerEnabled(true)
- elseif (labelName == "ta7t") then
- setWalkerEnabled(false)
- delayWalker(500)
- Self.Step(SOUTH)
- wait(500)
- setWalkerEnabled(true)
- elseif (labelName == "CheckSofts") then
- print("Checking Softs")
- delayWalker(3000)
- if (UsingSoftboots == true) and (Self.ItemCount(6530) >= 1) then
- gotoLabel("GoSofts")
- else
- gotoLabel("SkipSofts")
- end
- elseif (labelName == "WithdrawSofts") then
- print("Withdrawing Soft Boots Money")
- Walker.Stop()
- Self.WithdrawMoney(11000)
- Walker.Start()
- elseif (labelName == "RepairSofts") then
- Walker.Stop()
- Self.SayToNpc({"hi", "soft boots", "yes"}, 65)
- Walker.Start()
- elseif (labelName == "tempo") then
- Self.Say("utito tempo")
- wait(100)
- elseif (labelName == "Ring") then
- setWalkerEnabled(false)
- Self.ReachDepot()
- if (Self.ItemCount(3098) < MaxAs) then
- repeat
- Self.WithdrawItems(2, {3098, 5, (MaxAs-Self.ItemCount(3098, 2))})
- wait(1500,1900)
- until (Self.ItemCount(3098) == MaxAs)
- end
- elseif (labelName == "LeviUpW") then
- Walker.Stop()
- wait(500, 1000)
- Self.Turn(WEST)
- wait(500, 1000)
- Self.Say("Exani hur up")
- wait(2000, 2500)
- Walker.Start()
- elseif (labelName == "LeviDownS") then
- Walker.Stop()
- wait(500, 1000)
- Self.Turn(SOUTH)
- wait(500, 1000)
- Self.Say("Exani hur down")
- wait(2000, 2500)
- Walker.Start()
- elseif (labelName == "LeviDownE") then
- Walker.Stop()
- wait(500, 1000)
- Self.Turn(EAST)
- wait(500, 1000)
- Self.Say("Exani hur down")
- wait(2000, 2500)
- Walker.Start()
- elseif (labelName == "LeviUpN") then
- Walker.Stop()
- wait(500, 1000)
- Self.Turn(NORTH)
- wait(500, 1000)
- Self.Say("Exani hur up")
- wait(2000, 2500)
- Walker.Start()
- elseif (labelName == "DoorS") then
- setWalkerEnabled(false)
- wait(200)
- Self.OpenDoor(Self.Position().x, Self.Position().y + 1, Self.Position().z)
- wait(200)
- Self.OpenDoor(Self.Position().x, Self.Position().y + 1, Self.Position().z)
- setWalkerEnabled(true)
- elseif (labelName == "DoorN") then
- setWalkerEnabled(false)
- wait(200)
- Self.OpenDoor(Self.Position().x, Self.Position().y - 1, Self.Position().z)
- wait(200)
- Self.OpenDoor(Self.Position().x, Self.Position().y - 1, Self.Position().z)
- setWalkerEnabled(true)
- elseif (labelName == "DoorE") then
- setWalkerEnabled(false)
- wait(200)
- Self.OpenDoor(Self.Position().x + 1, Self.Position().y, Self.Position().z)
- wait(200)
- Self.OpenDoor(Self.Position().x + 1, Self.Position().y, Self.Position().z)
- setWalkerEnabled(true)
- elseif (labelName == "DoorW") then
- setWalkerEnabled(false)
- wait(200)
- Self.OpenDoor(Self.Position().x - 1, Self.Position().y, Self.Position().z)
- wait(200)
- Self.OpenDoor(Self.Position().x - 1, Self.Position().y, Self.Position().z)
- setWalkerEnabled(true)
- elseif (labelName == "OpenE") then
- Walker.Stop()
- Self.UseItemFromGround(Self.Position().x + 1, Self.Position().y, Self.Position().z)
- Walker.Start()
- elseif (labelName == "OpenW") then
- Walker.Stop()
- Self.UseItemFromGround(Self.Position().x - 1, Self.Position().y, Self.Position().z)
- Walker.Start()
- elseif (labelName == "OpenN") then
- Walker.Stop()
- Self.UseItemFromGround(Self.Position().x, Self.Position().y - 1, Self.Position().z)
- Walker.Start()
- elseif (labelName == "OpenS") then
- Walker.Stop()
- Self.UseItemFromGround(Self.Position().x, Self.Position().y + 1, Self.Position().z)
- Walker.Start()
- elseif (labelName == "Bp") then
- -- Reset Backpacks
- bpReseter()
- end
- end
- ----------------------- Functions ----------------------
- function BuyItems(item, count) -- item = item id, count = how many you want to buy up to
- wait(900, 1200)
- if (Self.ItemCount(item) < count) then
- Self.ShopBuyItem(item, (count-Self.ItemCount(item)))
- wait(200, 500)
- end
- end
- Self.ReachDepot = function (tries)
- local tries = tries or 3
- Walker.Stop()
- local DepotIDs = {3497, 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("Ilosc znalezionych Depo: " .. 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("")
- end
- end
- return false
- end
- repeat
- reachedDP = gotoDepot()
- if reachedDP then
- return true
- end
- tries = tries - 1
- sleep(100)
- print("")
- 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
- buyPotions = function(itemid, count) -- buying itemid upto count.
- sWE(false)
- print('Attempting to buy ' .. count .. ' ' .. Item.GetName(itemid) .. ' s.')
- if Self.ItemCount(itemid) < count then
- print('Buying ' .. count - Self.ItemCount(itemid) .. ' ' .. Item.GetName(itemid) .. '.')
- Self.SayToNpc({'hi', 'flasks', 'yes', 'yes', 'trade'})
- wait()
- repeat
- Self.ShopBuyItemsUpTo(itemid, count)
- until Self.ItemCount(itemid) >= count
- if Self.ItemCount(itemid >= count) then
- print('Buying successfull.')
- else
- print('Something went wrong.')
- errorLog('Something is wrong with potionsBuyer')
- end
- Self.SayToNpc('Bye')
- end
- sWE(true)
- end
- bpReseter = function()
- swe(false)
- if #backpacks > 0 then
- repeat
- Self.CloseContainers()
- Self.OpenMainBackpack(true)
- for i = 1, #backpacks do
- Container(0):OpenChildren(backpacks[i])
- end
- until #Container.GetAll() == (#backpacks + 1)
- if #Container.GetAll() == (#backpacks + 1) then
- print('Reseting successful.')
- else
- print('Something went wrong.')
- end
- else
- print('Change config file. Array: backpacks is empty.')
- end
- swe(true)
- end
- registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement