Log in

View Full Version : Help with script



alutor
09-17-2014, 04:44 AM
Hi guys im new users, and I need help with script.



06:36 XenoScript Error:
Script: Mammoths.lua
Line #: 1
Chunk: C:?Users?Filip?DOCUME?1?XenoBot?Scripts??Mammoths. lua
Error: unexpected symbol near 'ď' <---- HERE IS NOT D BUT NOT NORMALLY i with TWO "
This is an error with user-input and should not be reported as a bug with XenoBot.
10964
10965

THERE IS MY SCRIPTS, I MADE IS SOLO ;/

satoshi
09-17-2014, 07:45 AM
Delete it and start over lol

reecey
09-17-2014, 07:55 AM
Post the script here if you want help

alutor
09-17-2014, 08:23 AM
local ManasToLeave = 15
local WantedManas = 100
local ManaPotID = 268
local ManaCost = 50
local HealthToLeave = 8
local WantedHealth = 20
local HealthPotID = 266
local HealthCost = 45
local MainBP = 5949
local ItemBP = 7342
local GoldBP = 8860
local MinCap = 10
local HideEquipment = true

local SecondFloor = true


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({10295, 0}, {9632, 0}, {10315, 0}, {10299, 0}, {10307, 0}, {10310, 0})
Self.DepositItems({7463, 0}, {7432, 0}, {3443, 0}, {3044, 0}, {10321, 0}, {10426, 0})
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", "Trade"}, 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, 20) -- 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