Was there a new update, and it fucked up every script? The only script i have been able to use properly is the rook one, and the rest all try to make me walk back in forth in town no matter what script it is
Printable View
Was there a new update, and it fucked up every script? The only script i have been able to use properly is the rook one, and the rest all try to make me walk back in forth in town no matter what script it is
http://forums.xenobot.net/showthread...XenoBot-v3.2.4
I tested today my scripts today and everything works fine so seems like it's badly wrote script after all.
I can't use yours because I am a 35 RP, but the yalahar script for minos and elves is the one that came closest for me to working, but everytime it gets back to town all it does is walk back and forth to and from bank to shops
Did it work before the update ? It seems like you just don't have enough cap to buy supplies or enough gold in bank.
I have plently of gold, and I just started using xenobot today. cap you might be right
It doesn't really seem badly written, it just gets confused and goes back to step one after buying supplies and i have plenty of money and cap left
Can you guys stop being idiots and focus on the question in hand: @Rydan @Nakuu.
The OP states that the script is walking back and forth. If the scripts were badly written, based on the information @DarkstaR provided us with in the update thread, the only thing that will be different is that the walker may wait for longer than is necessary, or just not restart after a label. It would not lead to this kind of issue. So, stop throwing insults at people, and start doing something productive. From where I'm standing, all I can see is people sucking up to DarkstaR and trying to insult other people, not knowing who they are in fact insulting.
@inadequate - Are you able to post the lua file somewhere? Or is it a paid for script? If it's paid for, contact the vendor, otherwise, post the Lua file and I will take a look and see if I can spot the error. It would also be handy if you could post it on www.pastebin.com, that way I can view it from my tablet and respond on the bus tomorrow.
---------------------------------
-----Yalahar Minos or Elves------
----By Xiaospike & Joshwa534-----
------------Enjoy!!!-------------
---------------------------------
--------- BP SETUP ----------
-- [BP 1] - Main + Rares
-- [BP 2] - Products
-- [BP 3] - Gold
--------- DP SETUP ----------
-- [DP 1] - Rares
-- [DP 2] - Products
------ REFILL SETTINGS ------
local MinMana = 1 --- How many mana potions until you leave the hunt.
local MaxMana = 50 --- How many mana potions you begin the hunt with.
local MinHealth = 1 --- How many health potions until you leave the hunt.
local MaxHealth = 25 --- How many health potions you begin the hunt with.
local GoldBP = 8860 --- Item ID of your gold backpack.
local MinCap = 5 --- Leaves spawn when character reaches this cap.
local HideEquipment = true --- Do you want to minimize your equipment?
local LogoutStamina = true --- Do you want to logout at 16 hours? (Inside the depot)
local MaxAmmo = 15 --- How many spears you begin the hunt with.
local MinAmmo = 1 --- How many spears left when you leave the hunt.
----- LOCATION SETTINGS -----
local Elves = false --- Do you want to hunt the Elves?
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-------------------- DO NOT TOUCH THIS CODE ------------------------
---------------------- IF YOU DO NOT KNOW --------------------------
---------------------- WHAT YOU ARE DOING --------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
print([[
Yalahar Minotaurs or Elves 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(266) <= MinHealth) or (Self.ItemCount(7378) <= MinAmmo) or ((LogoutStamina) and (Self.Stamina() < 840)), "leave1", "keepHunting1")
elseif (labelName == "checker2") then
Walker.ConditionalGoto((Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(266) <= MinHealth) or (Self.ItemCount(7378) <= MinAmmo) or ((LogoutStamina) and (Self.Stamina() < 840)), "leave2", "keepHunting2")
elseif (labelName == "checkHuntSpot") then
Walker.ConditionalGoto((Elves), "toElves", "toMinos")
elseif (labelName == "GotoTown") then
Walker.Goto("toTown")
elseif (labelName == "checkstuff") then
local ESTMana = (MaxMana-20)
Walker.ConditionalGoto((Self.ItemCount(268) < ESTMana) or (Self.ItemCount(266) < MaxHealth) or (Self.ItemCount(7378) < MaxAmmo), "resupply", "tohunt")
elseif (labelName == "bank") then
local withdrawManas = math.max(MaxMana - Self.ItemCount(268), 0)*50
local withdrawHealths = math.max(MaxHealth - Self.ItemCount(266), 0)*45
local withdrawAmmo = math.max(MaxAmmo - Self.ItemCount(7378), 0)*15
local totalmoneyneeded = (withdrawManas + withdrawHealths + withdrawAmmo)
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({7438, 0}, {3073, 0}, {3037, 0}, {7401, 0}, {7425, 0}, {3082, 0})
Self.DepositItems({5922, 1},{5921, 1},{11473, 1},{11465, 1}, {3061, 1}, {237, 1}, {5878, 1}, {11472, 1}, {11464, 1}, {11482, 1}, {9635, 1}, {11451, 1}, {11483, 1})
if (LogoutStamina) and (Self.Stamina() < 960) then
Walker.Stop()
else
Walker.Start()
end
elseif (labelName == "potions") then
Walker.Stop()
if (Self.ItemCount(268) < MaxMana) or (Self.ItemCount(266) < 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)
end
if (Self.ItemCount(266) < MaxHealth) then
BuyItems(266, MaxHealth)
wait(500)
end
wait(200, 500)
end
Walker.Start()
elseif (labelName == "buyammo") then
Walker.Stop()
Self.SayToNpc({"hi", "trade"}, 65)
wait(1000)
if (Self.ItemCount(7378) < (MaxAmmo)) then
BuyItems(7378, MaxAmmo)
wait(500)
end
Walker.Start()
elseif (labelName == "resetbp") then
Walker.Stop()
Container.Close(GoldBP)
wait(1000)
Container.GetFirst():OpenChildren(GoldBP)
wait(1000)
Container.GetByName(GoldBP):Minimize()
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("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
After buying everything, it comes out, closes the equipment part, and then jumps all the way back up to step one