Thank you for update, seems nice eventho I cant test it yet, and merry Christmas!![]()
Thank you for update, seems nice eventho I cant test it yet, and merry Christmas!![]()
Das Leben ist ein schlechtes Geschäft. Warum? Es kostet so viel Mühe zu überleben. Und was ist der Lohn? Nur der Tod.
deleted.
Last edited by Tripkip; 12-24-2012 at 04:17 PM.
Re-downloaded and clean re-installed and deleted the last parameter in getTargetsInArea and now getting another error:
16:48 XenoScript Error:
Script: Script.lua
Line #: 1943
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'isAttackSafe' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.
Hmm alright, I take it that you editted from the 1st links I send you, since in my new one I had the depositter 3x? Or did you delete that on purpose aswell? Fk scripts are so sensetive....
@Y2Quake
Container.Minimize("golden backpack")
Container.Minimize("orange backpack")
Container.Minimize("red backpack")
Etc.
The only thing I changed was the Creature.Follow.
@DarkstaR Happy you fixed his problem, however PM it to him or hide the post please since the lua file is a paid script. Respect
/Stusse
thanks so much rydan, now i've another problem.
The following lua doesn't even load nor give any kind of error log.
[CODE=LUA]
------Yalahar Zombies Script-------
--------By Hypn0tic Ki11er---------
--------------Enjoy!!--------------
---I recommend you stack BPs inside of the backpacks in your DP and regular backpacks.
Paladin = true --Are you a Paladin?
--------Soft Boots Settings-------
SoftBoots = false --Whether you are using Soft Boots.
SecondaryBootID = 3079 --Boots you use (when not using softs(keep it in main BP -|||||- 4033 = Draken Boots. 3079 = Boots of Haste.
BoatAccess = true --Can you travel with Karith (Yalahar) to Venore (Without going through Liberty Bay)?
---------Checker Settings---------
LeaveNoSofts = false --Whether you want to leave if you don't have any soft boots left.
LeaveUponGoldAmount = false --Whether you want to leave upon reaching a certain gold amount (determined below).
GoldToLeave = 10000 --Amount of gold before you leave the cave.
MinCap = 10 --At what capacity do you want to leave the cave?
ManasToLeave = 45 --How many Mana Potions to leave the cave?
HealthsToLeave = 20 --How many Health Potions to leave the cave?
GoldID = 3031 --Gold ID
---Support---
WantedHPS = 50 --How many Health Potions do you want in your BP?
WantedMPS = 250 --How many Mana Potions do you want in your BP?
HealthCost = 100 --How much each Health Potion costs.
ManaCost = 80 --How much each Mana Potion costs.
HealthPotID = 236 --Health Potion ID.
ManaPotID = 237 --Mana Potion ID.
---Distance---
---Optional---
WantedDistance = 35 --Amount of your Distance Weapon that you want.
DistanceToLeave = 10 --Amount of your Distance Weapon for you to leave.
DistanceCost = 25 --How much each unit of your distance weapon costs. It is set to Drill Bolt by default.
DistanceID = 7378 --Set this to the Ammo/Spear you want to use. It is defaultly set to Drill Bolt.
--------------
GoldBP = 8860
LootBP = 2854
-----------------------------------------------
if (Paladin == true) then
loadSettings("[Paladin] Yalahar Zombies", "All")
end
if (Paladin == false) then
loadSettings("[Knight] Yalahar Zombies", "All")
end
setTargetingEnabled(true)
setLooterEnabled(true)
-----------------------------------------------
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")
function onWalkerSelectLabel(labelName)
if (labelName == "InitialChecker") then
setWalkerEnabled(false)
if ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) and ((SoftBoots == true)) or ((Self.ItemCount(ManaPotID) < WantedMPS)) or ((Self.ItemCount(HealthPotID) < WantedHPS)) or (LeaveUponGoldAmount == true) and ((Self.ItemCount(GoldID) <= 3000)) then
gotoLabel("ToDepot")
setWalkerEnabled(true)
else
gotoLabel("ToHunt")
setWalkerEnabled(true)
end
elseif (labelName == "ResetBP") then
Self.CloseContainers()
repeat
wait(900)
until (Self.UseItemFromEquipment("backpack") > 0) --opens main backpack
wait(1000)
Container.GetFirst():OpenChildren(GoldBP, LootBP)
elseif (labelName == "BuyDistance") then
setWalkerEnabled(false)
delayWalker(5000) --Stops walker so that the character doesn't move away from the NPC.
Self.SayToNpc({"Hi", "Trade"}, 100)
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
buyitems(DistanceID, (WantedDistance-Self.ItemCount(DistanceID)))
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
setWalkerEnabled(true)
elseif (labelName == "Bank") then
setWalkerEnabled(false)
delayWalker(7000) --Stops walker so that the character doesn't move away from the NPC.
Self.SayToNpc("hi")
sleep(math.random(700, 1400)) --Sleep between everything the character says to avoid suspicion.
Self.SayToNpc("deposit all")
sleep(math.random(300, 1000)) --Sleep between everything the character says to avoid suspicion.
Self.SayToNpc("yes")
sleep(math.random(700, 1400)) --Sleep between everything the character says to avoid suspicion.
Self.WithdrawMoney((ManaCost*(WantedMPS-Self.ItemCount(ManaPotID))))
Self.WithdrawMoney((HealthCost*(WantedHPS-Self.ItemCount(HealthPotID))))
if ((SoftBoots == true)) and ((BoatAccess == true)) and ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) then
Self.WithdrawMoney((10000*(Self.ItemCount(6530))))
Self.WithdrawMoney(370)
wait(500)
elseif ((SoftBoots == true)) and ((BoatAccess == false)) and ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) then
Self.WithdrawMoney((10000*(Self.ItemCount(6530))))
Self.WithdrawMoney(1160)
sleep(math.random(700, 1400)) --Sleep between everything the character says to avoid suspicion.
else
sleep(math.random(700, 1400)) --Sleep between everything the character says to avoid suspicion.
end
if (Paladin == true) then
sleep(math.random(700, 1400)) --Sleep between everything the character says to avoid suspicion.
Self.WithdrawMoney((DistanceCost*(WantedDistance-Self.ItemCount(DistanceID)))+1500)
sleep(math.random(700, 1400)) --Sleep between everything the character says to avoid suspicion.
end
setWalkerEnabled(true)
elseif (labelName == "Deposit") then
setWalkerEnabled(false)
Self.ReachDepot()
Self.DepositItems({3324, 0}, {9659, 0}, {3026, 0}, {3027, 0}, {10320, 0}, {3079, 0}, {3567, 0}, {3325, 0}, {12304, 0}, {3435, 0}, {8073, 0}, {3574, 0}, {7456, 0}, {7427, 0}, {9028, 0}, {7407, 0},{3055, 0}, {820, 0}, {3052, 0})
wait(1500,1900)
setWalkerEnabled(true)
elseif (labelName == "SellItems") then
setWalkerEnabled(false)
Self.SayToNpc("hi")
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
Self.SayToNpc("trade")
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
sellitems(3351, Self.ItemCount(3351))
sellitems(3269, Self.ItemCount(3269))
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
setWalkerEnabled(true)
elseif (labelName == "BuyPotions") then
setWalkerEnabled(false)
Self.SayToNpc("hi")
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
Self.SayToNpc({"Hi", "flasks", "yes", "yes", "yes", "Trade"}, 100)
sleep(math.random(2000, 2400)) --Sleep between everything the character says to avoid suspicion.
buyitems(ManaPotID, (WantedMPS-Self.ItemCount(ManaPotID)))
buyitems(HealthPotID, (WantedHPS-Self.ItemCount(HealthPotID)))
sleep(math.random(800, 1700)) --Sleep between everything the character says to avoid suspicion.
setWalkerEnabled(true)
elseif (labelName == "CheckSofts") then
setWalkerEnabled(false)
if ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) and ((SoftBoots == true)) then
gotoLabel("ToVenore")
setWalkerEnabled(true)
else
gotoLabel("ToHunt")
setWalkerEnabled(true)
end
elseif (labelName == "Checker") then
setWalkerEnabled(false)
if ((Self.ItemCount(DistanceID) < DistanceToLeave)) and (Paladin == true) or ((Self.ItemCount(3549) == 0)) and ((Self.ItemCount(6529) == 0)) and ((LeaveNoSofts == true)) or (Self.Cap() <= MinCap) or ((Self.ItemCount(ManaPotID) < ManasToLeave)) or ((Self.ItemCount(HealthPotID) < HealthsToLeave)) or (LeaveUponGoldAmount == true) and ((Self.ItemCount(GoldID) >= GoldToLeave)) then
setWalkerEnabled(true)
gotoLabel("Leave")
else
setWalkerEnabled(true)
gotoLabel("KeepHunting")
end
elseif (labelName == "KeepHunting") then
if (Self.Feet().id ~= 3549) and (Self.Feet().id ~= 6529) and ((SoftBoots == true)) then
if ((Self.ItemCount(3549) == 0)) then
setWalkerEnabled(false)
Self.Equip(6529, "feet")
wait(500)
setWalkerEnabled(true)
else
setWalkerEnabled(false)
Self.Equip(3549, "feet")
wait(500)
setWalkerEnabled(true)
end
end
elseif (labelName == "Leave") then
setWalkerEnabled(false)
Self.Equip(SecondaryBootID, "feet")
wait(500)
setWalkerEnabled(true)
end
end
------------------------------------
----------OTHER FUNCTIONS-----------
----------DON'T MESS HERE-----------
------------------------------------
function buyitems(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopBuyItem(item, amnt) == 0)then
return printf("ERROR: failed to buy item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count <= 0
end
function sellitems(item, count)
count = tonumber(count) or 1
repeat
local amnt = math.min(count, 100)
if(Self.ShopSellItem(item, amnt) == 0)then
return printf("ERROR: failed to sell item: %s", tostring(item))
end
wait(200,500)
count = (count - amnt)
until count == 0
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
Self.ReachDepot = function (tries)
local tries = tries or 3
setWalkerEnabled(false)
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
setWalkerEnabled(true)
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
[/CODE]
thanks for having a look.
This is the server log when i load it:
13:12 XenoBot: Loaded settings successfully.
it doesn't print any error so its weird.