PDA

View Full Version : setting changes



kanten
05-25-2013, 08:54 AM
Hi, i just bough xenobot and i dont know anything,

I need help with how to changes settings (how many manas it should refill and leave hunt)
and how do i change it

Adky
05-25-2013, 10:00 AM
Download a script and open the lua file, the settings of the script is usually in the top of the file.

Go to Support > Self Healer for healing.

kanten
05-25-2013, 11:36 AM
i edited the settings and changed it to my own, but whenever save it, it wont work,
the script dont talk with npc and dont deposit, it dont buy x mana nothing

Zero Damn
05-25-2013, 12:09 PM
i edited the settings and changed it to my own, but whenever save it, it wont work,
the script dont talk with npc and dont deposit, it dont buy x mana nothing

You mean you edited the .lua file (script)
1st make sure you have put both .lua file in the scripts folder and the .xbst in the settings folder.
Once you're in game right click on yourself > settings > Load all > Yes
After loading the settings load the script, right click on yourself > script > (name of the script) > execute script.
Then tick on all of the "Targeting / Walker / Looter"

This should work ^^

kanten
05-25-2013, 06:55 PM
it work partly, no cavebot waypoints were found, and i cant edited settings to my own, like how many pots i want to start with whenever i cahnge that it still ignore it

dinmamma
05-25-2013, 07:05 PM
Seems like you are saving it in the wrong place... or when you save you save it as .txt instead of .lua. To save as .lua you must choose "All files" below name field, that way it will save .lua as it is, if it's a .txt you would need to put .lua at the end of the name to convert.

kanten
05-25-2013, 07:11 PM
alla mina e text, hur ändra jag tillbaka det? har försök med att skriva .lua bakom alla .txt

kanten
05-25-2013, 07:21 PM
if possible can someone convert this to .lua



---------------------------------
-----Yalahar Mutated Humans------
----By Xiaospike & Joshwa534-----
------------Enjoy!!!-------------
---------------------------------

--------- BP SETUP ----------
-- [BP 1] - Main
-- [BP 2] - Rares + Products
-- [BP 3] - Gold

--------- DP SETUP ----------
-- [DP 1] - Rares
-- [DP 2] - Products

------ REFILL SETTINGS ------
local MinMana = 50 --- How many mana potions until you leave the hunt.
local MaxMana = 200 --- How many mana potions you begin the hunt with.

local MinHealth = 10 --- How many health potions until you leave the hunt.
local MaxHealth = 20 --- How many health potions you begin the hunt with.

local GoldBP = 2866 --- Item ID of your gold backpack.
local MinCap = 100 --- Leaves spawn when character reaches this cap.
local HideEquipment = true --- Do you want to minimize your equipment?

----- LOCATION SETTINGS -----
local Mountain = false --- Do you want to hunt the moutain?
local StayMountain = false --- Do you want to stay on the mountain?
local LogoutStamina = true --- Do you want to logout at 16 hours? (Inside the depot)

--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------

Targeting.Start()
Looter.Start()

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

print([[
Yalahar Mutated Humans by Xiaospike & Joshwa534]])
wait(5000)

function onWalkerSelectLabel(labelName)
if (labelName == "Checker") then
Walker.ConditionalGoto((Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(236) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "Leave", "keepHunting")

elseif (labelName == "Checker1") then
Walker.ConditionalGoto((Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(236) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "Leave", "keepHunting1")

elseif (labelName == "Checker2") then
Walker.ConditionalGoto((Self.ItemCount(268) <= MinMana) or (Self.Cap() < MinCap) or (Self.ItemCount(236) <= MinHealth) or ((LogoutStamina) and (Self.Stamina() < 840)), "Leave", "keepHunting2")

elseif (labelName == "CheckMountain") then
Walker.ConditionalGoto((Mountain) and (Self.ItemCount(268) > MinMana) and (Self.Cap() > MinCap) and (Self.ItemCount(236) > MinHealth) and ((LogoutStamina) and (Self.Stamina() > 840)), "HuntMountain", "SkipMountain")

elseif (labelName == "StayMountain") then
Walker.ConditionalGoto((StayMountain) and (Self.ItemCount(268) > MinMana) and (Self.Cap() > MinCap) and (Self.ItemCount(236) > MinHealth) and ((LogoutStamina) and (Self.Stamina() > 840)), "StayMountain2", "LeaveMountain")

elseif (labelName == "checkstuff") then
local ESTMana = (MaxMana-20)
Walker.ConditionalGoto((Self.ItemCount(268) < ESTMana) or (Self.ItemCount(236) < MaxHealth), "resupply", "ToHunt")

elseif (labelName == "bank") then
local withdrawManas = math.max(MaxMana - Self.ItemCount(268), 0)*50
local withdrawHealths = math.max(MaxHealth - Self.ItemCount(236), 0)*100
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({7386, 0}, {8072, 0}, {3428, 0}, {9103, 0})
Self.DepositItems({9053, 1},{10308, 1},{9054, 1},{9055, 1}, {9668, 1}, {3033, 1}, {5894, 1}, {9662, 1})
if (LogoutStamina) and (Self.Stamina() < 960) then
Cavebot.Stop()
else
Walker.Start()
end

elseif (labelName == "SellFlasks") then
Walker.Stop()
Self.SayToNpc({"hi", "flasks", "yes", "yes", "yes", "trade"}, 65)
wait(2000)
Walker.Start()

elseif (labelName == "potions") then
Walker.Stop()
if (Self.ItemCount(268) < MaxMana) or (Self.ItemCount(236) < 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(236) < MaxHealth) then
BuyItems(236, MaxHealth)
wait(500)
end
wait(200, 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

dinmamma
05-25-2013, 07:26 PM
Spara som -> Filnamn: blabla.lua -> Filformat: Alla filer

kanten
05-25-2013, 07:28 PM
det är filformat : .lua