i am new at xenobot and i used Darashia Dragon Lords and it walk through players ,,, and there is a wrong in that script , that character make 1 round and back to dp , everytime it do that , it no wait till mana or hp or cap near to end and back .
Printable View
i am new at xenobot and i used Darashia Dragon Lords and it walk through players ,,, and there is a wrong in that script , that character make 1 round and back to dp , everytime it do that , it no wait till mana or hp or cap near to end and back .
Did you execute the .lua file?
yea , i loaded it
---------------------------------
-------- Darashia Dragon --------
----By Xiaospike & Joshwa534-----
------------Enjoy!!!-------------
---------------------------------
----------- BP SETUP ------------
-- [BP 1] - Main
-- [BP 2] - Prodcuts
-- [BP 3] - Rares
-- [BP 4] - Gold
----------- DP SETUP ------------
-- [DP 1] - Rares
-- [DP 2] - Products
---------- Settings ---------
local MinMana = 100 --- How many mana potions until you leave the hunt.
local MaxMana = 600 --- How many mana potions you begin the hunt with.
local MinHealth = 20 --- How many health potions until you leave the hunt.
local MaxHealth = 80 --- How many health potions you begin the hunt with.
local GoldBP = 8860 --- Item ID of your gold backpack.
local MinCap = 80 ---- if less then script will exit spawn
local DragonLords = true -- if you want to hunt on -2 (Dragon Lords) put true or else to hunt on -1 (Dragons Only) put false.
local Hardcore = true -- if you want to hunt on -3 (Dragon Lords x 4) put true or else put false.
local LogoutStamina = true --- Do you want to logout at 16 hours? (Inside the depot)
Targeting.Start()
Looter.Start()
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
local info = [[
Free Darashia Dragons & Dragon Lords by Xiaospike & Joshwa534]]
wait(5000)
print([[
Free Darashia Dragons & Dragon Lords by Xiaospike & Joshwa534]])
wait(5000)
function onWalkerSelectLabel(labelName)
if (labelName == "checker1") then
Walker.ConditionalGoto((Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(239) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "LeaveCave", "keepHunting1")
elseif (labelName == "checker2") then
Walker.ConditionalGoto((Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(239) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "LeaveDLS", "keepHunting2")
elseif (labelName == "DragonLords") then
if (DragonLords) then
gotoLabel("DL")
else
gotoLabel("NODL")
end
elseif (labelName == "Hardcore") then
Walker.ConditionalGoto((Hardcore) and (Self.ItemCount(268) > MinMana) and (Self.ItemCount(239) > MinHealth) "HardcoreMode", "Softcore")
elseif (labelName == "keepHunting2") then
print(info)
elseif (labelName == "checkstuff") then
local ESTMana = (MaxMana-20)
Walker.ConditionalGoto((Self.ItemCount(268) < ESTMana) or (Self.ItemCount(239) < MaxHealth), "Resupply", "ToHunt")
elseif (labelName == "bank") then
local withdrawManas = math.max(MaxMana - Self.ItemCount(268), 0)*50
local withdrawHealths = math.max(MaxHealth - Self.ItemCount(239), 0)*190
local totalmoneyneeded = (withdrawManas + withdrawHealths)
local MATHCEIL = (math.ceil((totalmoneyneeded/1000)))*1000
Walker.Stop()
Self.SayToNpc({"hi", "deposit all", "yes"}, 65)
if (totalmoneyneeded > 0) then
Self.SayToNpc({"withdraw " .. MATHCEIL, "yes"}, 65)
end
wait(2000)
Walker.Start()
elseif (labelName == "deposit") then
Walker.Stop()
Self.ReachDepot()
Self.DepositItems({3386, 0}, {3392, 0}, {7402, 0}, {7399, 0}, {3428, 0}, {3280, 0}, {818, 0}, {3416, 0}, {8072, 0}, {3071, 0}, {7430, 0}, {3322, 0}, {7290, 0}, {3284, 0}, {3297, 0}, {5919, 0}, {5791, 0})
Self.DepositItems({3028, 1}, {9661, 1}, {5877, 1}, {3373, 1},{5882, 1}, {3029, 1}, {5948, 1}, {236, 1}, {3061, 1}, {3450, 1}, {11457,1}, {5920, 1}, {3351, 1})
wait(1500,1900)
if (LogoutStamina) and (Self.Stamina() < 960) then
Walker.Stop()
else
Walker.Start()
end
elseif (labelName == "HardcoreMode") then
print(info)
elseif (labelName == "potions") then
Walker.Stop()
if (Self.ItemCount(268) < MaxMana) or (Self.ItemCount(239) < MaxHealth) then
Self.SayToNpc({"hi", "flasks", "yes", "yes", "yes", "yes", "yes", "yes", "trade"}, 65)
wait(2000)
if (Self.ItemCount(268) < MaxMana) then
BuyItems(268, MaxMana)
wait(500)
BuyItems(268, MaxMana)
wait(500)
end
if (Self.ItemCount(239) < MaxHealth) then
BuyItems(239, MaxHealth)
wait(500)
BuyItems(239, MaxHealth)
wait(500)
end
wait(200, 500)
end
Walker.Start()
elseif (labelName == "keepHunting1") then
print(info)
elseif (labelName == "resetbp") then
Walker.Stop()
Container.Close(GoldBP)
wait(1000)
Container.GetFirst():OpenChildren(GoldBP)
wait(1000)
Container.GetByName(GoldBP):Minimize()
Walker.Start()
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, 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
And the settings in it i proper towards your character?
Remember to always execute AFTER loading settings.
yea , i know and i did it well .
If you're on non-pvp, you will walk through players as you're able to. As for the other issues you're experiencing, we can handle errors/bugs when they are reported in our script thread.
[code=lua](Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(239) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840))[/code]
These are the values they will force your character to leave the cave, if you are below the minimum amount of specified mana potions, capacity, health potions or your stamina is less than 14 hours then you will leave. Please double check all of these values when it makes you leave the cave and tell me which of the 4 you are below, if you are above each of the 4 values please report back on our scripting thread as most posts outside that thread aren't looked at.
Thank you,
Joshwa534
ok , thanks .. i will try it :) ... i am searching for good script for lvl 161 EK ... i think DL's not good for my lvl .. thanks for answer :)