Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Mana Potions --
- local ManasToLeave = 100 -- Z iloma manasami wracać
- local WantedManas = 500 -- Ile Manasow kupić
- local ManaPotID = 238 -- Mana Potion ID
- local ManaCost = 120 -- Mana Potion koszt
- -- Ava --
- local AmmoToLeave = 500 -- Z iloma ava wracać
- local WantedAmmo = 1500 -- Ile avakupić
- local AmmoID = 3161 -- ava ID
- local AmmoCost = 45 -- ava koszt
- -- Health Potions --
- local HealthToLeave = 100 -- Z iloma sdwracać
- local WantedHealth = 200 -- Ile sd Kupić
- local HealthPotID = 3155 -- sd ID
- local HealthCost = 108 -- Koszt sd
- -- Other Options --
- local MainBP = "Blue Backpack" -- ID plecaka glownego (holding)
- local PotsBP = "jewelled backpack" -- ID plecaka na kase (brocade)
- local SsaBP = "Pirate Backpack" -- ID plecaka glownego (holding)
- local RingiBP = "Beach Backpack" -- ID plecaka glownego (holding)
- local MinCap = 150 -- Od ilu Capa wracać
- local HideEquipment = true -- Zminimalizować EQ
- -- Floor Settings --
- local SecondFloor = true -- Tego nie zmieniajcie
- Targeting.Start()
- Looter.Start()
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- --------------------------------------------------------------------
- registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
- local info = [[]]
- wait(500)
- print([[
- Targeting,Wtp na expa, teleport crystale, i Healing]])
- wait(1000)
- -----------------------------------------------------------------------------------------------------------------------------------------
- function onWalkerSelectLabel(labelName)
- if (labelName == "Checker") then
- if (Self.ItemCount(ManaPotID) <= ManasToLeave) or (Self.Cap() < MinCap) or (Self.ItemCount(HealthPotID) <= HealthToLeave) or (Self.ItemCount(AmmoID) <= AmmoToLeave) then
- gotoLabel("Leave")
- wait(200)
- Self.PrivateMessage("Zdupydomordy", "wypierdalaj do depo")
- wait(200)
- Self.PrivateMessage("Syrop", "wypierdalaj do depo")
- wait(200)
- else
- gotoLabel("StartHunt")
- end
- elseif (labelName == "TravelGo") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("wyspa na ktora chcesz plynanc") -- Tutaj wpisz wyspe na ktora sie udajesz.
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "TravelBack") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.Say("hi")
- sleep(math.random(700, 1400))
- Self.SayToNpc("Wyspa powrotna") -- Tutaj wpisz wyspe powrotna
- sleep(math.random(300, 1000))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Deposit") then
- setWalkerEnabled(false)
- Self.ReachDepot()
- Self.DepositItems({3554, 0}, {7456, 0}, {821, 0}, {826, 0}, {7404, 0}, {7402, 0}, {827, 0}, {3320, 0}, {3019, 0}, {3324, 0}, {3051, 0}, {7402, 0}, {3428, 0}, {3416, 0}, {7404, 0}, {3364, 0}, {7399, 0}, {9056, 0}, {3364, 0}, {7368, 0}, {5741, 0}, {7427, 0}, {7419, 0}, {7412, 0}, {3567, 0}, {3098, 0}, {7388, 0}, {7418, 0}, {3324, 0}, {10438, 0}, {3360, 0}, {3392, 0}, {8057, 0}, {3342, 0}, {8061, 0}, {7386, 0}, {7407, 0}, {7416, 0}, {7421, 0}, {823, 0}, {6553, 0}, {6499, 0}, {5914, 0}, {9058, 0}, {7368, 0}) -- Tutaj dodajesz ID itemkow ktore ma odkładać do Depo a po przecinku backpack w kolejności od lewej strony 0 oznacza miejsce pierwsze a 1 miejsce 2, 2 to miejsce trzecie i tak dalej
- wait(1500,1900)
- elseif (labelName == "Cash") 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 == "Withdraw") then
- setWalkerEnabled(false)
- delayWalker(5000)
- Self.SayToNpc("hi")
- sleep(math.random(700, 1400))
- Self.WithdrawMoney((ManaCost*(WantedManas-Self.ItemCount(ManaPotID))))
- sleep(math.random(700, 1400))
- Self.WithdrawMoney((HealthCost*(WantedHealth-Self.ItemCount(HealthPotID))))
- sleep(math.random(700, 1400))
- Self.WithdrawMoney((AmmoCost*(WantedAmmo-Self.ItemCount(AmmoID))))
- sleep(math.random(700, 1400))
- Self.WithdrawMoney(100)
- sleep(math.random(700, 1400))
- Self.SayToNpc("yes")
- setWalkerEnabled(true)
- elseif (labelName == "Potions") then
- setWalkerEnabled(false)
- delayWalker(10000)
- Self.SayToNpc("hi")
- sleep(math.random(800, 1700))
- Self.SayToNpc("trade")
- sleep(math.random(2000, 2400))
- Self.ShopBuyItem(ManaPotID, (WantedManas-Self.ItemCount(ManaPotID)))
- sleep(math.random(2000, 2400))
- Self.ShopBuyItem(HealthPotID, (WantedHealth-Self.ItemCount(HealthPotID)))
- sleep(math.random(2000, 2400))
- Self.ShopBuyItem(AmmoID, (WantedAmmo-Self.ItemCount(AmmoID)))
- sleep(math.random(800, 1700))
- setWalkerEnabled(true)
- elseif (labelName == "Ammo") then
- setWalkerEnabled(false)
- delayWalker(10000)
- Self.SayToNpc("hi")
- sleep(math.random(800, 1700))
- Self.SayToNpc("trade")
- sleep(math.random(2000, 2400))
- Self.ShopBuyItem(AmmoID, (WantedAmmo-Self.ItemCount(AmmoID)))
- sleep(math.random(2000, 2400))
- setWalkerEnabled(true)
- elseif (labelName == "Sell") then
- setWalkerEnabled(false)
- delayWalker(10000)
- Self.SayToNpc("hi")
- sleep(math.random(800, 1700))
- Self.SayToNpc("trade")
- sleep(math.random(2000, 2400))
- Self.ShopSellItem(21165, Self.ShopGetItemSaleCount(21165))
- Self.ShopSellItem(21164, Self.ShopGetItemSaleCount(21164))
- Self.ShopSellItem(21167, Self.ShopGetItemSaleCount(21167))
- sleep(math.random(2000, 2400))
- setWalkerEnabled(true)
- elseif (labelName == "FullCheck") then
- if (Self.ItemCount(ManaPotID) < WantedManas) or (Self.Cap() < MinCap) then
- gotoLabel("PreDeposit")
- else
- gotoLabel("LetsHunt")
- end
- elseif (labelName == "ResetBp") then
- Walker.Stop()
- Self.CloseContainers()
- Self.OpenMainBackpack(true):OpenChildren({MainBP, true}, {PotsBP, true}, {SsaBP, true}, {RingiBP, true})
- wait(200)
- if (HideEquipment) then
- Client.HideEquipment()
- wait(1000)
- end
- Walker.Start()
- end
- end
- ----------------------- Functions ----------------------
- AmmoType = "avalanche rune"
- SuppliesContainer = "jewelled backpack"
- --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--
- AmmoTypeID = Item.GetID(AmmoType)
- Module('StackAmmo', function(mod)
- if (#Container.GetAll() >= 1) then
- if (Container(0):CountItemsOfID(AmmoTypeID) >=1) then
- for spot = Container(0):ItemCount()-1, 0, -1 do
- local item = Container(0):GetItemData(spot)
- if (item.id == AmmoTypeID) then
- Container(0):MoveItemToContainer(spot, Container.GetByName(SuppliesContainer):Index(), 0)
- break
- end
- end
- end
- end
- mod:Delay(1)
- end)
- Ammo1Type = "sudden death rune"
- SuppliesContainer = "jewelled backpack"
- --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--
- Ammo1TypeID = Item.GetID(Ammo1Type)
- Module('StackAmmo', function(mod)
- if (#Container.GetAll() >= 1) then
- if (Container(0):CountItemsOfID(Ammo1TypeID) >=1) then
- for spot = Container(0):ItemCount()-1, 0, -1 do
- local item = Container(0):GetItemData(spot)
- if (item.id == Ammo1TypeID) then
- Container(0):MoveItemToContainer(spot, Container.GetByName(SuppliesContainer):Index(), 0)
- break
- end
- end
- end
- end
- mod:Delay(1)
- end)
- function SellItems(item) -- item = item ID
- wait(300, 1700)
- Self.ShopSellAllItem(item, Self.ShopGetItemSaleCount(item))
- wait(900, 1200)
- end
- 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, 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("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("To depo jest zajete, szukam dalej.")
- end
- end
- return false
- end
- repeat
- reachedDP = gotoDepot()
- if reachedDP then
- return true
- end
- tries = tries - 1
- sleep(100)
- print("Nie udalo sie dotrzec do depo... " .. tries .. " szukam dalej.")
- 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