Mam pewien problem, prosze o pomoc :/
Proboje sie nauczyc robic full afk skrypt i w sumie prawie wszystko dziala..prawie..
Jak juz jest na expie to po zrobieniu "pętelki"(wpt), majac dalej potiony i capa wraca niewiadomo po co... pomoze ktos? Dodam ze uzywam tylko manasow a w hp wstawilem po prostu 0 do tego cfg
---------------------------------
--------Twoj Waypoint------------
-------Created By Sanix----------
---------------------------------
----------- BP SETUP ------------
--~ [BP 1] ~-- Main
--~ [BP 2] ~-- Produkty
--~ [BP 3] ~-- Gold
----------- DP SETUP ------------
--~ [DP 1] ~-- Rare
--~ [DP 2] ~-- Produkty
------------ Settings -----------
-- Mana Potions --
local ManasToLeave = 20 -- Z iloma manasami wracać
local WantedManas = 150 -- Ile Manasow kupić
local ManaPotID = 268 -- Mana Potion ID
local ManaCost = 50 -- Mana Potion koszt
-- Health Potions --
local HealthToLeave = 0 -- Z iloma healtami wracać
local WantedHealth = 0 -- Ile Healtow Kupić
local HealthPotID = 236 -- Health Potion ID
local HealthCost = 100 -- Koszt HP Potka
-- Other Options --
local MainBP = 2854 -- ID plecaka glownego (Czerwony)
local ItemBP = 8860 -- ID plecaka na itemy (Pomaranczowy)
local GoldBP = 8860 -- ID plecaka na kase (Camouflage)
local MinCap = 50 -- 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(5000)
print([[
--<Waypoint 100% Afk>--]])
wait(5000)
-----------------------------------------------------------------------------------------------------------------------------------------
function onWalkerSelectLabel(labelName)
if (labelName == "Checker") then
if (Self.ItemCount(ManaPotID) <= ManasToLeave) or (Self.ItemCount(HealthPotID) <= HealthToLeave) or (Self.Cap() < MinCap) then
gotoLabel("Leave")
else
gotoLabel("Start Hunt")
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({7436, 0}, {7454, 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
Self.DepositItems({10293, 1}, {10311, 1}) -- tutaj to smao co wyżej bo jak jest za dużo itemek w jednej lini to się zawiesza
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(HealthPotIDID))))
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({"Hi", "flasks", "yes", "yes", "yes"}, 65)
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(800, 1700))
setWalkerEnabled(true)
elseif (labelName == "FullCheck") then
if (Self.ItemCount(ManaPotID) < WantedManas) or (Self.Cap() < MinCap) or (Self.ItemCount(HealthPotID) < WantedHealth) then
gotoLabel("PreDeposit")
else
gotoLabel("LetsHunt")
end
elseif (labelName == "ResetBp") then
Walker.Stop()
Container.Close(ItemBP)
wait(1000)
Container.Close(GoldBP)
wait(1000)
Container.GetFirst():OpenChildren(ItemBP)
wait(1000)
Container.GetFirst():OpenChildren(GoldBP)
wait(1000)
Container.GetByName(ItemBP):Minimize()
wait(1000)
Container.GetByName(GoldBP):Minimize()
wait(200)
if (HideEquipment) then
Client.HideEquipment()
wait(1000)
end
Walker.Start()
end
end
----------------------- Functions ----------------------
function SellItems(item) -- item = item ID
wait(300, 1700)
Self.ShopSellItem(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
Zakładki