------------------------------------------------------------------------------------------------------------------------------------------------------AcidScripts-------------------------------------------
-------------------------------------------Yalahar Mutated Humans-------------------------------------
-------------------------------------------------EK (50+)---------------------------------------------
------------------------------------------------------------------------------------------------------
---------------------------------
-- VARIABLES --
---------------------------------
local ManaID = 268 -- ID of mana potions
local MinMana = 50 -- manas to leave spawn
local MaxMana = 175 -- manas to buy
local ManaPrice = 50 -- price of mana pots
local HealthID = 236 --ID of health potions
local MinHealth = 10 -- healths to leave spawn
local MaxHealth = 20 -- healths to buy
local HealthPrice = 75 -- price of health pots
local MinCap = 50 -- caps to leave spawn
local StaminaLogout = true -- logout if stamina under 18hrs
local MainBP = "grey backpack" -- main backpack color
local LootBP = "brocade backpack" -- loot bp color
local GoldBP = "camouflage backpack" -- gold bp color
---------------------------------
-- MISC --
---------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
dofile("Forgee.lua")
function onWalkerSelectLabel(labelName)
if (labelName == "deposit_items") then
print("~Depositing Items~")
Walker.Stop()
Self.ReachDepot()
wait(1800, 2400)
Self.DepositItems({10308, 0}, {9053, 0}, {9054, 0}, {8072, 1}, {3428, 1}, {3049, 1})
if (Self.Stamina() < 960) or (StaminaLogout == false) then
Walker.Stop()
print("~Stamina Low, Stopping Bot~")
else
Walker.Start()
print("~Sufficient Stamina, Bot will Continue~")
end
elseif (labelName == "bank") then
Walker.Stop()
print("~Depositing Cash and Withdrawing for Supplies~")
wait(1200, 1600)
Self.SayToNpc("hi")
wait(1200, 1600)
Self.SayToNpc("deposit all")
wait(800, 1200)
Self.SayToNpc("yes")
wait(1200, 1600)
Self.WithdrawMoney((ManaPrice*(MaxMana-Self.ItemCount(ManaID)))+1000)
wait(1200, 1600)
Self.SayToNpc("yes")
wait(1200, 1600)
Self.WithdrawMoney((HealthPrice*(MaxHealth-Self.ItemCount(HealthID))))
wait(1200, 1600)
Self.SayToNpc("yes")
wait(800, 1200)
Self.SayToNpc("balance")
wait(800, 1200)
print("~Resetting Backpacks~")
wait(1200, 1600)
Self.CloseContainers()
wait(1800, 2400)
Self.OpenMainBackpack(true):OpenChildren({Item.Get ID(LootBP), true}, {Item.GetID(GoldBP), true})
wait(1800, 2400)
Walker.Start()
elseif (labelName == "buy_potions") then
Walker.Stop()
print("~Buying Potions~")
wait(1200, 1600)
Self.SayToNpc("hi")
wait(800, 1200)
Self.SayToNpc("vials")
wait(800, 1200)
Self.SayToNpc("yes")
wait(800,1200)
Self.SayToNpc("trade")
wait(1800,2400)
Self.ShopBuyItemsUpTo(ManaID, MaxMana)
wait(1800, 2400)
Self.ShopBuyItemsUpTo(HealthID, MaxHealth)
wait(1200, 1600)
Walker.Start()
elseif (labelName == "check_hunt") then
Walker.Stop()
print("~Checking Items~")
if (Self.ItemCount(ManaID) < MaxMana) or (Self.ItemCount(HealthID) < MaxHealth) or (Self.Cap() < MinCap) then
Walker.Start()
gotoLabel("start")
print ("~Insufficient Items/Capacity - Restarting~")
else
Walker.Start()
gotoLabel("hunt")
print("~Sufficient Items/Capacity - Continue to Hunt~")
end
elseif (labelName == "pass_cemetery") then
Walker.Stop()
wait(800, 1200)
Self.SayToNpc("hi")
wait(1200, 1600)
Self.SayToNpc("pass")
wait(1200, 1600)
Self.SayToNpc("cemetery")
wait(1200, 1600)
Walker.Start()
elseif (labelName == "pass_alchemist") then
Walker.Stop()
wait(800, 1200)
Self.SayToNpc("hi")
wait(1200, 1600)
Self.SayToNpc("pass")
wait(1200, 1600)
Self.SayToNpc("alchemist")
wait(1200, 1600)
Walker.Start()
elseif (labelName == "checkpos1") then
if (Self.Position().x == 32798) then
Walker.Start()
else
Walker.Start()
gotoLabel("pass_cemetery")
end
elseif (labelName == "checkpos2") then
if (Self.Position().x <= 32739) then
Walker.Start()
Looter.Start()
Targeting.Start()
else
Walker.Start()
gotoLabel("pass_alchemist")
end
elseif (labelName == "check1") then
Walker.Stop()
print("~Checking Items~")
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HealthID) <= MinHealth) or (Self.Cap() <= MinCap) then
Walker.Start()
gotoLabel("leave")
print ("~Insufficient Items/Capacity - Leaving~")
else
Walker.Start()
print("~Sufficient Items/Capacity - Continuing Hunt~")
end
elseif (labelName == "check2") then
Walker.Stop()
print("~Checking Items~")
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HealthID) <= MinHealth) or (Self.Cap() <= MinCap) then
Walker.Start()
gotoLabel("leave")
print ("~Insufficient Items/Capacity - Leaving~")
else
Walker.Start()
print("~Sufficient Items/Capacity - Continuing Hunt~")
end
elseif (labelName == "check3") then
Walker.Stop()
print("~Checking Items~")
if (Self.ItemCount(ManaID) <= MinMana) or (Self.ItemCount(HealthID) <= MinHealth) or (Self.Cap() <= MinCap) then
Walker.Start()
gotoLabel("leave")
print ("~Insufficient Items/Capacity - Leaving~")
else
Walker.Start()
gotoLabel("start_hunt")
print("~Sufficient Items/Capacity - Continuing Hunt~")
end
elseif (labelName == "pass_cemetery2") then
Walker.Stop()
Looter.Stop()
Targeting.Stop()
wait(800, 1200)
Self.SayToNpc("hi")
wait(1200, 1600)
Self.SayToNpc("pass")
wait(1200, 1600)
Self.SayToNpc("cemetery")
wait(1200, 1600)
Walker.Start()
elseif (labelName == "pass_magician") then
Walker.Stop()
wait(800, 1200)
Self.SayToNpc("hi")
wait(1200, 1600)
Self.SayToNpc("pass")
wait(1200, 1600)
Self.SayToNpc("magician")
wait(1200, 1600)
Walker.Start()
elseif (labelName == "checkpos3") then
if (Self.Position().x == 32745) then
Walker.Start()
else
Walker.Start()
gotoLabel("pass_cemetery2")
end
elseif (labelName == "checkpos4") then
if (Self.Position().x == 32806) then
Walker.Start()
else
Walker.Start()
gotoLabel("pass_magician")
end
elseif (labelName == "restart") then
gotoLabel("start")
elseif (labelName == "start") then
Targeting.Stop()
Looter.Stop()
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
Zakładki