PDA

View Full Version : [Update] XenoBot v3.0.0



DarkstaR
12-24-2012, 12:47 AM
This update brings some significant modifications to the Scripter, allows .xbst settings to include .lua scripts, fixes bugs, adds the new minimap color to the pathfinder logic, and improves a lot of functionality.

With the release of version 3 of XenoBot, I just want to thank everyone who has helped me get it this far in the time that it has. I could not have done it without the support of my customers and I definitely couldn't have done it without my dedicated forum staff. Thanks guys!


EDIT: INFORMATION ON v3.0.0 ISSUES:

1. The following error is caused by using Forgee's library and is NOT bug a with XenoBot. His library accidentally overwrites a critical class within the Scripter. In previous versions, this class was not used often, causing the bug to go unnoticed. Now, however, this class is used extensively so Forgee's library is causing all kinds of issues. I sent Forgee a message about this and haven't had a reply in two days, so if you want this fixed remove Forgee.lua from your scripts. If you're buying scripts from people using Forgee or Sirmate, you may want to let them know you will no longer purchase scripts if they use third-party libraries.


05:54 XenoScript Error:
Script: ?Corym?Config.lua
Line #: 1684
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'GetItemIDFromDualInput' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot


2. Many functions have been updated to do checks on the environment they are operating in, causing poorly written scripts to break. If you are,as example, using the OpenDoor() function to go down a sewer grate, and wonder why it's not working, it's because your script is bad and you should feel bad. If you paid for scripts like this, consider switching script providers or advise your provider to improve his/her methods.


3. Loading settings closes all running .lua scripts now. Therefore, if you're using loadSettings() in a script, you need to make sure that the settings file you are loading will reload that .lua script if you don't want it to indefinitely die.

ISSUES END


Changelog:

v3.0.0
Fixed the Looter, it wont miss so many bodies now.
Fixed the debug which occurred when one-liners got too long. I also increased the one-liner max length to 500 characters.
Modified the Settings system, it will now work with Lua scripts.
When a setting is saved, it packages all running .lua scripts into the .xbst.
When a setting is loaded, it does the one of following for each .lua script:
1. If the script doesn't exist in your lua directory, it creates and executes it.
2. If the script does exist in your lua directory, and it is the same, it executes it.
3. If the script does exist in your lua directory, but it is different, it asks you if you want to replace or skip.
- Replace will replace the file currently in your lua directory with the one in the .xbst and then execute it.
- Skip will keep the file currently in your lua directory and execute it. You will have to save the .xbst to make it remember this one.
Improved Lua error message handling.
Improved Targeting, it wont be as slow now.
Improved the container opening functions in the Scripter.
Improved many Scripter functions to accept item ID's and names interchangeably:
Container:OpenChildren(...)
Self.UseItemWithMyPosition(idOrName)
Self.UseItemWithMe(idOrName)
Self.UseItemWithTarget(idOrName)
Self.UseItemWithFollow(idOrName)
Self.ItemCount(idOrName, container, countEquipment)
Self.UseLever(x, y, z, idOrName)
Self.DropItem(x, y, z, idOrName, count)
Self.DropItems(x, y, z, ...)
Self.Equip(idOrName, slot, count)
Self.DepositItems(...)
Self.WithdrawItems(slot, ...)
Improved Self.WithdrawItems() to open children in the same window. *
Improved Self.DepositItems() to open children in the same window. *
Improved the Scripter classes to allow static calls. *
Added the new swamp grass minimap color to the Pathfinder, it now recognizes it as blocking.
Added Channel.New() to the Scripter. *
Functionality: Works exactly the same as Channel.Open().
Added Creature.New() to the Scripter. *
Functionality: Returns a creature object, derived from the input.
Parameters:
Input: Either a creature index (number 0-1299), a creature name (string), or a creature ID (number > 1300)
Added Container.New() to the Scripter. *
Functionality: Returns a container object, derived from the input.
Parameters:
Input: Either a container index (number 0-15), a container name (string), or a container ID (number > 99)
Added Self.GetSpectators() to the Scripter. *
Functionality: Returns a table of all creatures on the screen.
Parameters
multiFloor: true to include all floors, false (or blank) to only include current floor.
Added Self.GetTargets() to the Scripter. *
Functionality: Returns a table of all monsters within a range on the screen.
Parameters
distance: distance a creature must be within to be included.
Added Self.isAreaPvPSafe() to the Scripter. *
Functionality: Returns true if it's safe to cast an area spell and false if it could get us a skull.
Parameters
radius: radius to check for players.
multiFloor: true to check all floors, false to only check current floor.
ignoreParty: true to ignore party members in the check, false to include them.
safeList: an optional list of players to ignore in the check.
Added Self.UseDoor() to the Scripter. *
Functionality: Opens or closes a door.
Parameters
x, y, z: door position.
close: true if we are trying to close the door, false (or blank) if we're trying to open it.
Added Item.GetRingActiveID() to the Scripter. *
Functionality: Works exactly the same as getActiveRingID.
Added Container.GetAll() to the Scripter. *
Functionality: Works exactly the same as Container.GetIndexes().
Added the Module class to the Scripter. *
Module.New()
Functionality: registers a function to be executed every x milliseconds
Returns: A module instance.
Parameters:
Name: The name of the module.
Callback: The main function of the module.
Module:Execute()
Functionality: Executes the modules function.
Module:Name()
Functionality: returns the name of the module object.
Module:IsActive()
Functionality: returns if the function is currently running or not.
Module:Delay()
Functionality: delays the modules execution.
Parameters:
Time: amount of miliseconds to wait.
Module:Start()
Functionality: un-pauses the module.
Module:Stop()
Functionality: pauses the module.

Changes marked with * are thanks to @Syntax (http://forums.xenobot.net/member.php?u=193)


--------------------------------------
------- [[ Lua examples: ]] -------
--------------------------------------

-- interchangeable name/ids example --
Self.UseItemWithMe("mana potion") -- same as: Self.UseItemWithMe(268)
Self.Equip("stonecutter axe", "weapon") -- same as: Self.Equip(3319, "weapon")
Self.UseItemWithTarget("sudden death rune") -- same as: Self.UseItemWithTarget(3155)
Self.DropItems(Self.Position().x, Self.Position().y, Self.Position().z, 284, 285, "label")
Self.DepositItems(
17809,
"cheese cutter",
{17818, 0},
{"earflap", 0}
)
Self.WithdrawItems(
0, --into backpack 0
{268, 0, 100},
{"power bolt", 0, 1500},
{"strong mana potion", 0, 300}
)


-- static calls example --
Container.Minimize("blue backpack") -- same as: Container.GetByName("blue backpack"):Minimize()
Container.OpenChildren("blue backpack", 8860, 2871) -- same as: Container.GetByName("blue backpack"):OpenChildren(8860, 2871)
Creature.isTarget('Demon') -- same as: Creature.GetByName('Demon'):isTarget()

-- module example --
function DoFish(module) --our fisher callback
local WATER_FISH = {4597, 4598, 4599, 4600, 4601, 4602}
for x = -7, 7, 1 do
for y = -5, 5, 1 do
local position = Self.Position()
local item = Map.GetTopUseItem(position.x + x, position.y + y, position.z)
if(table.contains(WATER_FISH, item.id))then
Self.UseItemWithGround(3483, position.x + x, position.y + y, position.z)
module:Delay(1000) --delay myself for 1 second
end
end
end
end
local fisher = Module.New('auto-fisher', DoFish) -- create an autofisher module
fisher:Stop() -- stops the fisher
fisher:Start() -- starts the fisher
Module.Stop('auto-fisher') -- also stops the fisher
Module.Start('auto-fisher') -- also starts the fisher

For download and operation instructions, refer back to this thread:
http://forums.xenobot.net/showthread.php?19

Syntax
12-24-2012, 12:50 AM
Awesome. Dat update page.

soul4soul
12-24-2012, 12:58 AM
now that is an awesome update. I see a suggestion or 2 of mine in there time to update my thread.


This update brings some significant modifications to the Scripter, allows .xbst settings to include .lua scripts, fixes bugs, adds the new minimap color to the pathfinder logic, and improves a lot of functionality.
excited to mess around with that and many other features.

edit:
dont like it anymore. With all these changes I have some work to do to improve my scripts and give them the latest features. Plus the new scripts that will be possible to add.

Avani
12-24-2012, 01:02 AM
Wow, that's a nice and long list!

I was kinda hoping for a Screenshot() function but well, this will keep me entertained for a long time :)

mlody10666
12-24-2012, 01:03 AM
look nice:)

Apoc
12-24-2012, 01:41 AM
Good xmas present to all of us, who enjoy ur software.

Dizix
12-24-2012, 01:57 AM
I like to read big change logs :)

The speed that this bot is evolving at is beyond what I had in mind and I'm glad I've sticked with Xenobot since the start. Happy Holidays!

Mak
12-24-2012, 02:04 AM
my tibia closes when opening settings.
And Exura Sio Frien No work

http://s2.subirimagenes.com/otros/previo/thump_8199628aaaaa.jpg

Irax
12-24-2012, 02:09 AM
DarkstaR

My tibia crash

http://s2.subirimagenes.com/otros/previo/thump_8199633tibia.jpg

DarkstaR
12-24-2012, 02:11 AM
Please upload your .xbst files if you're getting debugs.

Also, make sure nothing has a lock on any lua files it might be trying to open.

Stusse
12-24-2012, 02:32 AM
sick list! gotta check tomorrow :D

Irax
12-24-2012, 02:55 AM
not file any
just trying to pick a Xbst fast is when you close the tibia

DarkstaR
12-24-2012, 02:57 AM
not file any
just trying to pick a Xbst fast is when you close the tibia

It doesn't happen for me. I need your .xbst file or I cannot help you.

Irax
12-24-2012, 03:02 AM
do not try to open.

and remove all Xbst I keep closing the tibia

where upload. Xbst?

jaime
12-24-2012, 03:09 AM
BUGS!

jaime
12-24-2012, 03:14 AM
DarkstaR CHECK YOUR PM OR ENTER THIS SCRIPT BUG XENO CHECK IT http://forums.xenobot.net/showthread.php?7766-Neant-s-Xenobot-Scripts&p=102093&viewfull=1#post102093

DarkstaR
12-24-2012, 03:25 AM
my tibia closes when opening settings.
And Exura Sio Frien No work

http://s2.subirimagenes.com/otros/previo/thump_8199628aaaaa.jpg


@DarkstaR (http://forums.xenobot.net/member.php?u=2)

My tibia crash

http://s2.subirimagenes.com/otros/previo/thump_8199633tibia.jpg


This has been fixed, re-download.

jaime
12-24-2012, 03:48 AM
what need change pls

21:47 XenoScript Error:
Script: [One-Liner executed by XenoBot Walker]
Line #: 1386
Chunk: C:\Program Files?XenoBot?Data?XenoLuaLib.lua
Error: attempt to perform arithmetic on global 'index' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

DarkstaR
12-24-2012, 03:52 AM
what need change pls

21:47 XenoScript Error:
Script: [One-Liner executed by XenoBot Walker]
Line #: 1386
Chunk: C:\Program Files?XenoBot?Data?XenoLuaLib.lua
Error: attempt to perform arithmetic on global 'index' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

I need your script.

jaime
12-24-2012, 03:53 AM
<item text="!cdataread" tag="254"><![CDATA[while (Self.Step("south") == 0) do wait(200) end]]></item>

jaime
12-24-2012, 03:54 AM
when it do it this waypoint it happen
<item text="!cdataread" tag="254"><![CDATA[while (Self.Step("south") == 0) do wait(200) end]]></item>

DarkstaR
12-24-2012, 03:58 AM
when it do it this waypoint it happen
<item text="!cdataread" tag="254"><=!=[=C=D=A=T=A=[while (Self.Step("south") == 0) do wait(200) end]=]=></item>

This has been fixed, re-install.

kennysside
12-24-2012, 04:52 AM
DarkstaR for president!

Ungoliant
12-24-2012, 05:20 AM
Very impressive update. Especially considering it just followed a major game update.

Good job sir, will test and give feedback in the next couple of days.

Syntax
12-24-2012, 05:37 AM
Oh and if anyone cares I documented most of the functions in the lib if you want to read up on what each function does/returns.

Irax
12-24-2012, 05:46 AM
--[[ YOU CAN USE THIS AS A STANDALONE SCRIPT OR ADD IT TO A LABEL MANAGER SCRIPT AND
TOGGLE IT ON AND OFF BY CHANGING THIS VARIABLE IN YOUR LABELS. ]]--
local safeStrike = true

registerEventListener(TIMER_TICK, "onTick")
function onTick()
if safeStrike then
local pos = Self.LookPos()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isPlayer() and (c:Position().x == pos.x and c:Position().y == pos.y and c:Position().z == pos.z) then
Self.Turn(math.abs(Self.LookDirection() - 1))
end
end
end
end

Script No Work

Syntax
12-24-2012, 05:55 AM
--[[ YOU CAN USE THIS AS A STANDALONE SCRIPT OR ADD IT TO A LABEL MANAGER SCRIPT AND
TOGGLE IT ON AND OFF BY CHANGING THIS VARIABLE IN YOUR LABELS. ]]--
local safeStrike = true

registerEventListener(TIMER_TICK, "onTick")
function onTick()
if safeStrike then
local pos = Self.LookPos()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isPlayer() and (c:Position().x == pos.x and c:Position().y == pos.y and c:Position().z == pos.z) then
Self.Turn(math.abs(Self.LookDirection() - 1))
end
end
end
end

Script No Work

registerEvent has to be after the function:

--[[ YOU CAN USE THIS AS A STANDALONE SCRIPT OR ADD IT TO A LABEL MANAGER SCRIPT AND
TOGGLE IT ON AND OFF BY CHANGING THIS VARIABLE IN YOUR LABELS. ]]--
local safeStrike = true

function onTick()
if safeStrike then
local pos = Self.LookPos()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isPlayer() and (c:Position().x == pos.x and c:Position().y == pos.y and c:Position().z == pos.z) then
Self.Turn(math.abs(Self.LookDirection() - 1))
end
end
end
end
registerEventListener(TIMER_TICK, "onTick")

DarkstaR
12-24-2012, 06:04 AM
--[[ YOU CAN USE THIS AS A STANDALONE SCRIPT OR ADD IT TO A LABEL MANAGER SCRIPT AND
TOGGLE IT ON AND OFF BY CHANGING THIS VARIABLE IN YOUR LABELS. ]]--
local safeStrike = true

registerEventListener(TIMER_TICK, "onTick")
function onTick()
if safeStrike then
local pos = Self.LookPos()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isPlayer() and (c:Position().x == pos.x and c:Position().y == pos.y and c:Position().z == pos.z) then
Self.Turn(math.abs(Self.LookDirection() - 1))
end
end
end
end

Script No Work

It works well with the module system, too.


function SafeStrike(module)
if safeStrike then
local pos = Self.LookPos()
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isPlayer() and (c:Position().x == pos.x and c:Position().y == pos.y and c:Position().z == pos.z) then
Self.Turn(math.abs(Self.LookDirection() - 1))
end
end
end
end
Module.New('safestrike', SafeStrike)

Y2Quake
12-24-2012, 06:15 AM
lovely, xmas gift?

Irax
12-24-2012, 06:16 AM
most of my scripts do not work:

MistrockSettingsTibtrak03:

I can not come up with EXANI hur "up


dofile("Forgee.lua")

------------------------------------------------------------------------------------------
------- Customize your script ------------------------------------------------------------
------------------------------------------------------------------------------------------


Hard = true -- Set true if you want the hardest version, with more smiths and drones

---BP Setup---
GoldBp = "Golden Backpack" -- Put the name of your backpack for gold
GoldBpID = 2871 -- Put the ID of your backpack for gold
LootBp = "Demon Backpack" -- Put the name of your backpack for loot
LootBpID = 9601 -- Put the ID of your backpack for loot

---Potions & Cap Setup---

--Cap
CapToRefill = 50 -- below this amount bot goes to refill
--Mana
PotsToRefill = 50 -- below this amount bot goes to refill
ManasToBuy = 150 -- Amount of mana potions to buy
pots = 268 -- ID of manapotion (should not be changed)
--Health
HealthPotsID = 236 -- ID of healthpotion you want to buy
HealthPotsPrice = 100 -- Price of healthpotion
HealthPotsToBuy = 25 -- Amount of healthpotions to buy



------------------------------------------------------------------------------------------
------- Do Not Touch Below! :) -----------------------------------------------------------
------------------------------------------------------------------------------------------

registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

function onWalkerSelectLabel(labelName)
if (labelName == "ReopenBps") then
setBotEnabled(false)
closeBackpacks()
wait(1000,2000)
openBackpacks(GoldBpID, LootBpID)
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "CheckStatus") then
setBotEnabled(false)
local pots = Self.ItemCount(268)
local cap = Self.Cap()

if(pots <= PotsToRefill or cap <= CapToRefill) then
setBotEnabled(true)
gotoLabel('ToTown')
else
setBotEnabled(true)
gotoLabel('Hunt')
end
elseif (labelName == "DepositGold") then
setBotEnabled(false)
delayWalker(10000)
Self.SayToNpc('hi')
wait(1000,2000)
Self.SayToNpc('deposit all')
wait(1000,2000)
Self.SayToNpc('yes')
wait(1000,2000)
local GoldToManas = ((ManasToBuy-Self.ItemCount(268))*50)
local GoldToHealth = ((HealthPotsToBuy-Self.ItemCount(HealthPotsID))*HealthPotsPrice)
local GoldToPots = (GoldToManas+GoldToHealth)
Self.SayToNpc("withdraw " .. GoldToPots)
wait(1000,2000)
Self.SayToNpc('yes')
wait(1000,2000)
Self.SayToNpc('withdraw 500')
wait(1000,2000)
Self.SayToNpc('yes')
wait(1000,2000)
setBotEnabled(true)

elseif (labelName == "DepositLoot") then
setBotEnabled(false)
Self.DepositItems({7452, 0}, {7398, 0}, {9657, 0})
setBotEnabled(true)

elseif (labelName == "ReachDepot") then
setBotEnabled(false)
Self.ReachDepot()
setBotEnabled(true)

elseif (labelName == "GoMistrock") then
setBotEnabled(false)
Self.SayToNpc({'hi','mistrock','yes'}, 60)
wait(1500,3000)
setBotEnabled(true)
elseif (labelName == "GoYalahar") then
setBotEnabled(false)
Self.SayToNpc({'hi','yalahar','yes'}, 60)
wait(1500,3000)
setBotEnabled(true)
elseif (labelName == "CheckManas") then
if (Self.ItemCount(pots) <= PotsToRefill) then
setWalkerEnabled(true)
gotoLabel("BuyManas")
else
setWalkerEnabled(true)
gotoLabel("GoHunt")
end
elseif (labelName == "BuyPotions") then
setBotEnabled(false)
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItem(268,(ManasToBuy-Self.ItemCount(268)))
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "BuyHealthPotions") then
setBotEnabled(false)
Self.SayToNpc({"Hi", "Trade"}, 65)
wait(1000,2000)
Self.ShopBuyItem(HealthPotsID,(HealthPotsToBuy-Self.ItemCount(HealthPotsID)))
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "LevitateDown") then
setBotEnabled(false)
Self.Cast("exani hur down", 50)
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "LevitateUp") then
setBotEnabled(false)
Self.Cast("exani hur up", 50)
wait(1000,2000)
setBotEnabled(true)
elseif (labelName == "CheckHard") then
delayWalker(3000)
if Hard == true then
gotoLabel("Hard")
else
gotoLabel("Soft")
end
elseif (labelName == "CheckHard2") then
delayWalker(3000)
if Hard == true then
gotoLabel("Hard2")
else
gotoLabel("Soft2")
end
elseif(labelName == "CheckPosition") then
setBotEnabled(false)
print("Distance to next node: " .. Self.DistanceFromPosition(32620,31411,2))
if(Self.DistanceFromPosition(32620, 31411, 2) <= 0) then
setBotEnabled(true)
gotoLabel("Continue")
else
wait(1000,2000)
gotoLabel('back')
wait(2000,3000)
setBotEnabled(true)
end
elseif(labelName == "CheckPosition2") then
setBotEnabled(false)
print("Distance to next node: " .. Self.DistanceFromPosition(32621,31411,3))
if(Self.DistanceFromPosition(32621, 31411, 3) <= 0) then
setBotEnabled(true)
gotoLabel("Continue2")
else
wait(1000,2000)
gotoLabel('back2')
wait(2000,3000)
setBotEnabled(true)
end
elseif(labelName == "CheckPosition3") then
setBotEnabled(false)
print("Distance to next node: " .. Self.DistanceFromPosition(32628,31411,4))
if(Self.DistanceFromPosition(32628, 31411, 4) <= 2) then
setBotEnabled(true)
gotoLabel("Continue3")
else
wait(1000,2000)
gotoLabel('back3')
wait(2000,3000)
setBotEnabled(true)
end
elseif (labelName == "Levitatedown") then
delayWalker(2000)
Self.Cast("exani hur down", 50)
wait(1000,2000)
setTargetingEnabled(false)
elseif (labelName == "Levitateup") then
delayWalker(2000)
Self.Cast("exani hur up", 50)
wait(1000,2000)
setTargetingEnabled(false)
elseif (labelName == "CheckHealthsShop") then
setBotEnabled(false)
if ((Self.ItemCount(HealthPotsID) < HealthPotsToBuy)) then
setBotEnabled(true)
gotoLabel("BuyHealthPotions")
else
setBotEnabled(true)
gotoLabel("GoOn")
end
end
end

All worked before upgrade...
I will have to change?

GambaZ
12-24-2012, 06:24 AM
Hell yeah, thanks boss !
Gonna try it now.

DarkstaR
12-24-2012, 06:30 AM
most of my scripts do not work:

MistrockSettingsTibtrak03:

I can not come up with EXANI hur "up

All worked before upgrade...
I will have to change?

It's fixed now, re-download and re-install.

Irax
12-24-2012, 06:34 AM
thanks you are the best

LuckyStrike
12-24-2012, 09:10 AM
Big changes, can anyone tell me if special areas are now working 99%?

Pepsi_901
12-24-2012, 09:30 AM
Looks good indeed. Great update, but still no special areas :/

martinpwnage
12-24-2012, 09:47 AM
05:45 XenoScript Error:
Script: ?Corym?Config.lua
Line #: 1572
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'MakeDualInputIntoTableIDTable' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

I keep getting this error in a checking label which is not on line 1572..im not sure what this means anywho :s

spicejam
12-24-2012, 09:54 AM
Great update! I love the idea of saving lua's to settingsfiles and the improvement of looting dead bodies.

Thx

Roarz
12-24-2012, 10:01 AM
Xenobot closes my tibia when i am logged in and trying to inject it into my client.. It used to let me do this yesterday.
Refer to screenshot please.

http://i.imgur.com/UYYhC.jpg/

jokke628866
12-24-2012, 10:34 AM
Thanks for the update, ur doing a very good job:D
But i got some problems with my script.

using JXScripts RPZao dragonlords. Worked like a charm until i installed the xenobot update this morning. Now all it does is kill the script (except its running anyways, still opening doors and changing softs) But eventually after running around dp for 2 minutes it got stuck running in and out the door to the lever in Zao. Something to look into i guess =\

Merry christmas :D

Tibtrak
12-24-2012, 10:36 AM
My scripts are working fine.
Sick update, thanks!

Merry christmas!

Avani
12-24-2012, 11:10 AM
Thanks for the update, ur doing a very good job:D
But i got some problems with my script.

using JXScripts RPZao dragonlords. Worked like a charm until i installed the xenobot update this morning. Now all it does is kill the script (except its running anyways, still opening doors and changing softs) But eventually after running around dp for 2 minutes it got stuck running in and out the door to the lever in Zao. Something to look into i guess =\

Merry christmas :D

You have to delete Loadsettings() from the LUA. Then load all the LUA's and XBST and save the XBST again.

And i also have a problem with opening doors etc. I think these funtions are intervering with the new xenobot functions.

jokke628866
12-24-2012, 11:16 AM
You have to delete Loadsettings() from the LUA. Then load all the LUA's and XBST and save the XBST again.

And i also have a problem with opening doors etc. I think these funtions are intervering with the new xenobot functions.


I just did a rollback to the version i used yesterday, until they find the problem

Virse
12-24-2012, 11:19 AM
Hi DarkstaR,

I use this script for slime training but I get this message:

11:17 XenoScript Error:
Script: SlimeTrainer.lua
Line #: 1826
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to compare number with table
This is an error with user-input and should not be reported as a bug with XenoBot.

here is the script:

]]--
while(true) do
if (Self.TargetID() == 0) then
if (getTargetsInArea(Self.Position(), 1, 0, 0) == 2) then
setTargetingEnabled(true)
wait(500)
setTargetingEnabled(false)
end
end
wait(2000,3000)
end

Syntax
12-24-2012, 12:19 PM
Virse, while this is a minor backwards compat bug that will be fixed. I wrote you a better script in the mean time. Let me know if it works well for you.

You should be able to use it the exact same way.

Module.New('slime-trainer', function(mod)
if (Self.TargetID() == 0 and #Self.GetTargets(1) == 2) then
setTargetingEnabled(true)
mod:Delay(500)
setTargetingEnabled(false)
end
mod:Delay(math.random(2000,3000))
end)

Tripkip
12-24-2012, 01:16 PM
Before the update the Self.Step"(EAST)" was working flawless. So I saw that with the update it would automaticly load the scripts now aswell, so I saved settings when I had all the needed scripts executed.

Then when it went to refill, it wouldnt go trough the teleporter at banuta main floor (with self.step)

So either way, Xenobot somehow corrupted the files when saving, or Self.Step isnt working proppely anymore.

Also, before speaking to npc's at like boats, it is waiting way longer now then before. Maybe because of the self.reachnpc? Did u change anything to one liners that could cause this bugs?

Self.ReachNpc Doesnt work at all.

Edit: I Downloaded the new version 3.00 At like 11;00 PM.
Edit 2: All Oneliners arent working properly.

Avani
12-24-2012, 01:29 PM
Before the update the Self.Step"(EAST)" was working flawless. So I saw that with the update it would automaticly load the scripts now aswell, so I saved settings when I had all the needed scripts executed.

Then when it went to refill, it wouldnt go trough the teleporter at banuta main floor.

So either way, Xenobot somehow corrupted the files when saving, or Self.Step isnt working proppely anymore.

Also, before speaking to npc's at like boats, it is waiting way longer now then before. Maybe because of the self.reachnpc? Did u change anything to one liners that could cause this bugs?

Self.ReachNpc Doesnt work at all.

Edit: I Downloaded the new version 3.00 At like 11;00 PM.
Edit 2: All Oneliners arent working properly.

I can confirm these bugs. I have excactly the same thing.

Also, is it just me or is the site really slow today?

Avani
12-24-2012, 01:29 PM
Before the update the Self.Step"(EAST)" was working flawless. So I saw that with the update it would automaticly load the scripts now aswell, so I saved settings when I had all the needed scripts executed.

Then when it went to refill, it wouldnt go trough the teleporter at banuta main floor.

So either way, Xenobot somehow corrupted the files when saving, or Self.Step isnt working proppely anymore.

Also, before speaking to npc's at like boats, it is waiting way longer now then before. Maybe because of the self.reachnpc? Did u change anything to one liners that could cause this bugs?

Self.ReachNpc Doesnt work at all.

Edit: I Downloaded the new version 3.00 At like 11;00 PM.
Edit 2: All Oneliners arent working properly.

I can confirm these bugs. I have excactly the same thing.

Also, is it just me or is the site really slow today?

Tripkip
12-24-2012, 01:32 PM
Its slow.

Good to know I am not the only one. Thought I did something wrong. Any Moderator that could Enlighten Darkstar with the great news xD?

DarkstaR
12-24-2012, 02:07 PM
05:45 XenoScript Error:
Script: ?Corym?Config.lua
Line #: 1572
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'MakeDualInputIntoTableIDTable' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

I keep getting this error in a checking label which is not on line 1572..im not sure what this means anywho :s

I will need your script to fix this, but it look like you're using Self.DropItems() incorrectly.


Xenobot closes my tibia when i am logged in and trying to inject it into my client.. It used to let me do this yesterday.
Refer to screenshot please.

Nothing changed with the injector, you must be doing something wrong. Try a full re-install. There's no reason this should happen now if it didn't before.


Thanks for the update, ur doing a very good job:D
But i got some problems with my script.

using JXScripts RPZao dragonlords. Worked like a charm until i installed the xenobot update this morning. Now all it does is kill the script (except its running anyways, still opening doors and changing softs) But eventually after running around dp for 2 minutes it got stuck running in and out the door to the lever in Zao. Something to look into i guess =\

Merry christmas :D

I'll need the script.


You have to delete Loadsettings() from the LUA. Then load all the LUA's and XBST and save the XBST again.

And i also have a problem with opening doors etc. I think these funtions are intervering with the new xenobot functions.

Most people were using the open door functions incorrectly. Now that they have been properly updated, it is breaking peoples scripts. This is why I always yell at people for doing things wrong - I update thing properly and they break because they are used improperly.

Provide you script I'll see if I can fix it.


Before the update the Self.Step"(EAST)" was working flawless. So I saw that with the update it would automaticly load the scripts now aswell, so I saved settings when I had all the needed scripts executed.

Then when it went to refill, it wouldnt go trough the teleporter at banuta main floor (with self.step)

So either way, Xenobot somehow corrupted the files when saving, or Self.Step isnt working proppely anymore.

Also, before speaking to npc's at like boats, it is waiting way longer now then before. Maybe because of the self.reachnpc? Did u change anything to one liners that could cause this bugs?

Self.ReachNpc Doesnt work at all.

Edit: I Downloaded the new version 3.00 At like 11;00 PM.
Edit 2: All Oneliners arent working properly.

Self.Step"(EAST)" Is a very improper way to call it. Try Self.Step(EAST), works fine for me.
I have no clue what Self.ReachNpc is, I have not made a function like that so it must be a third party function using some shitty hack to reach the npc. Post it and I'll take a look.
One liners are working perfectly fine. Any problem with them are due to bad scripts.

Let me just reiterate that all of my scripts work FINE. All Infernal Bolts scripts work FINE and all of Spectrus' script work FINE. Most of your issues are poorly made scripts.

Avani
12-24-2012, 02:11 PM
Self.Step"(EAST)" Is a very improper way to call it. Try Self.Step(EAST), works fine for me.


Thanks, that solved it for me.

Tripkip
12-24-2012, 02:28 PM
Self.Step"(EAST)" Is a very improper way to call it. Try Self.Step(EAST), works fine for me.
I have no clue what Self.ReachNpc is, I have not made a function like that so it must be a third party function using some shitty hack to reach the npc. Post it and I'll take a look.
One liners are working perfectly fine. Any problem with them are due to bad scripts.

Let me just reiterate that all of my scripts work FINE. All Infernal Bolts scripts work FINE and all of Spectrus' script work FINE. Most of your issues are poorly made scripts.

Alright ill post the Lua file in the next post, geuss you dont need the xbst? geuss the seller wont like it if post his full script in here xD

soul4soul
12-24-2012, 02:29 PM
Except for needing to change my HUD, HUD.createtextitem wouldn't work I had to replace it with HUD.New everything appears to be working. Due to some other changes I need to use tostring now to force it from being an item but thats all understandable. I think not being able to use HUD.createtextitem might be a bug. In the lib you have
HUD.CreateTextDisplay = HUD.New
HUD.CreateItemDisplay = HUD.New
again executing your example script it runs into errors.

09:33 XenoScript Error:
Script: a.lua
Line #: 1
Chunk: C:?Users?soul4soul?Documents?XenoBot?Scripts?a.lua
Error: attempt to call field 'CreateTextDisplay' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.


This update brings some significant modifications to the Scripter, allows .xbst settings to include .lua scripts, fixes bugs, adds the new minimap color to the pathfinder logic, and improves a lot of functionality.

With the release of version 3 of XenoBot, I just want to thank everyone who has helped me get it this far in the time that it has. I could not have done it without the support of my customers and I definitely couldn't have done it without my dedicated forum staff. Thanks guys!

Changelog:


Modified the Settings system, it will now work with Lua scripts.
When a setting is saved, it packages all running .lua scripts into the .xbst.
When a setting is loaded, it does the one of following for each .lua script:
1. If the script doesn't exist in your lua directory, it creates and executes it.
2. If the script does exist in your lua directory, and it is the same, it executes it.
3. If the script does exist in your lua directory, but it is different, it asks you if you want to replace or skip.
- Replace will replace the file currently in your lua directory with the one in the .xbst and then execute it.
- Skip will keep the file currently in your lua directory and execute it. You will have to save the .xbst to make it remember this one.

Testing this now. im encountering problems. scenario 2, 3"a", and 3"b" work fine but 1 doesnt work. I get this error.

09:23 XenoScript Error:
Script: control - South Cyclops.lua
Error: cannot open C:\Users\soul4soul\Documents\XenoBot\Scripts\contr ol - South Cyclops.lua: No such file or directory
This is an error with user-input and should not be reported as a bug with XenoBot.

Virse
12-24-2012, 02:32 PM
Virse, while this is a minor backwards compat bug that will be fixed. I wrote you a better script in the mean time. Let me know if it works well for you.

You should be able to use it the exact same way.

Module.New('slime-trainer', function(mod)
if (Self.TargetID() == 0 and #Self.GetTargets(1) == 2) then
setTargetingEnabled(true)
mod:Delay(500)
setTargetingEnabled(false)
end
mod:Delay(math.random(2000,3000))
end)

Hey mate, thanks alot for your reply but this script gives me the same error as I had before sorry to say :/ but thanks for giving it a go :P

Tripkip
12-24-2012, 02:33 PM
DELETED

DarkstaR
12-24-2012, 02:38 PM
Except for needing to change my HUD, HUD.createtextitem wouldn't work I had to replace it with HUD.New everything appears to be working. Due to some other changes I need to use tostring now to force it from being an item but thats all understandable. I think not being able to use HUD.createtextitem might be a bug. In the lib you have [code]HUD.CreateTextDisplay = HUD.New
HUD.CreateItemDisplay = HUD.New.


I already posted saying this was fixed. Re-download and re-install (quite a few issues have been fixed as well.)

DarkstaR
12-24-2012, 02:40 PM
Must be me, but I cant attach file to this post.

So here is a link.
https://www.dropbox.com/s/pj614lhedb6crm7/[ED] Deeper Banuta -1 MAGE_Stusse.lua

https://www.dropbox.com/s/evwkly7wvpld1qf/[RP] Deeper Banuta -1 RP_Stusse.lua

@DarkstaR (http://forums.xenobot.net/member.php?u=2)

Creature.Follow("NpcName") wait(2000) is a much better way to reach NPC's

soul4soul
12-24-2012, 02:42 PM
I already posted saying this was fixed. Re-download and re-install (quite a few issues have been fixed as well.)
I did Re-download and Re-install. both are still issues for me.

Hendy
12-24-2012, 02:43 PM
That change log <3

Thanks!

Y2Quake
12-24-2012, 02:44 PM
it seems like forgee's backpack reopener doesn't work anymore but well i think that doesn't matter much.

i'll just have to change all my lua's :p

DarkstaR
12-24-2012, 02:51 PM
I did Re-download and Re-install. both are still issues for me.

Downloading from the button on xenobot.net does not automatically clear cache so make sure to grab it from the Downloads forum page. That might be your issue.

Tripkip
12-24-2012, 02:51 PM
Aight thanks alot, Im gonna try that. While you're on it.

Like half of the times, the Depositter doesnt deposit (all) my items. this causes the bot to get stuck when trying to buy potions/sd's because it doesn't thave enough cap.
Could you take a look into that aswell? Its about the same scripts I just send you.

Btw, I just checked the LUA, it actually says Self.Step (east). But in the XBST file its named Self.Step("EAST"). Ive changed it in the XBST file, geuss thats wrong huh xD?


DarkstaR or any other Pro scripter :P

DarkstaR
12-24-2012, 02:53 PM
it seems like forgee's backpack reopener doesn't work anymore but well i think that doesn't matter much.

i'll just have to change all my lua's :p




Self.CloseContainers()
repeat
wait(900)
until (Self.UseItemFromEquipment("backpack") > 0) --opens main backpack
wait(1000)
Container.GetFirst():OpenChildren("brocade backpack", "backpack of holding", "orange backpack")

A lot less messy then letting the bot sit there and use hotkeys at random until they're open, :P

DarkstaR
12-24-2012, 02:56 PM
Aight thanks alot, Im gonna try that. While you're on it.

Like half of the times, the Depositter doesnt deposit (all) my items. this causes the bot to get stuck when trying to buy potions/sd's because it doesn't thave enough cap.
Could you take a look into that aswell? Its about the same scripts I just send you.

Btw, I just checked the LUA, it actually says Self.Step (east). But in the XBST file its named Self.Step("EAST"). Ive changed it in the XBST file, geuss thats wrong huh xD?


@DarkstaR (http://forums.xenobot.net/member.php?u=2) or any other Pro scripter :P

It needs either

Self.Step(EAST) or Self.Step("east"). Anything else that may have previously worked was actually a lucky bug not intended to work :P

The deposit function has always been a bit sketchy as well. Just put the deposit statement in the lua 2 or 3 times, that's what I always do. Lmao. (I really don't know what the issue may be, it was made by Syntax and is very hard to understand.)

Masiar
12-24-2012, 02:59 PM
In before version its work:



local HUDText = HUD.CreateTextDisplay(100, 100, "", 255, 120, 120)
local HUDItem = HUD.CreateItemDisplay(100, 120, 1781, 48, 100)

local countFile = assert(io.open("C:\\Users\\ht\\Desktop\\stones.txt", "r"))

while (true) do

if(countFile ~= Self.ItemCount(1781)) then
local file = io.open("C:\\Users\\ht\\Desktop\\stones.txt", "w")
file:write(Self.ItemCount(1781))
file:flush()
file:close()
end

HUDText:SetText("Stones: " .. Self.ItemCount(1781) .. " left ")


wait(1000)
end


On v3.0 i see this error msg:



15:56 XenoScript Error:
Script: stones.lua
Line #: 1
Chunk: ...\Documents\XenoBot\Scripts\stones.lua
Error: attempt to call field 'CreateTextDisplay' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

robin
12-24-2012, 03:18 PM
Thanks for the update ;)

Unfortunately the following script doesn't work:


local config = {
attacks = {
--[[
spells should be prioritized from top to bottom, eg: exori gran will be attempted before exori or exori mas.

players:
true = the area will include players in the threshold
false = the area will only count the monsters in the area

aggressive:
0 = attack triggers when no players are in the area.
1 = attack triggers when only war enemies and skulled players, noone else.
2 = attack triggers when innocents are in the area but not when friendlies are.
3 = attack triggers when friendlies are in the area but not when innocents are.
4 = attack triggers without any regards to players in the area.
]]
--{words="exori gran", threshold=3, mana=340, radius=1, aggressive=4, players=false},
{words="exori", threshold=4, mana=120, radius=1, aggressive=4, players=false}
--{words="exori ico", threshold =1, mana=40, radius=1, aggressive=4, players=false},
--{words="exori hur", threshold =2, mana=40, radius=1, aggressive=4, players=false}
}
}

local function think()
for _, info in ipairs(config.attacks)do
local amount = getTargetsInArea(Self.Position(), info.radius, info.aggressive, info.players)
if(amount)then
if(amount >= info.threshold) and (Self.CanCastSpell(info.words)) then
Self.Cast(info.words, info.mana)
end
end
end
end


yields an error:
16:07 XenoScript Error:
Script: Script.lua
Line #: 1943
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to index global 'pos' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.


How can I fix this?

soul4soul
12-24-2012, 03:19 PM
Redownloading and clearing cache did nothing for me i already tried it

In before version its work:



local HUDText = HUD.CreateTextDisplay(100, 100, "", 255, 120, 120)
local HUDItem = HUD.CreateItemDisplay(100, 120, 1781, 48, 100)

local countFile = assert(io.open("C:\\Users\\ht\\Desktop\\stones.txt", "r"))

while (true) do

if(countFile ~= Self.ItemCount(1781)) then
local file = io.open("C:\\Users\\ht\\Desktop\\stones.txt", "w")
file:write(Self.ItemCount(1781))
file:flush()
file:close()
end

HUDText:SetText("Stones: " .. Self.ItemCount(1781) .. " left ")


wait(1000)
end


On v3.0 i see this error msg:
oooh someone with the same problem as me. To get it to work for now change your first 2 lines.
local HUDText = HUD.New(100, 100, "", 255, 120, 120)
local HUDItem = HUD.New(100, 120, 1781, 48, 100)

DarkstaR
12-24-2012, 03:28 PM
Thanks for the update ;)

yields an error:
16:07 XenoScript Error:
Script: Script.lua
Line #: 1943
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to index global 'pos' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.


How can I fix this?


I fixed this. Re-download and re-install. config.players will be ignored, though - player consideration is determined by the aggressiveness.

getTargetsInArea(Self.Position(), info.radius, info.aggressive)

Virse
12-24-2012, 03:33 PM
Hi DarkstaR could you help me with this issue please,

this is the slime trainer script im using, it worked perfectly before XenoBot update:

]]--
while(true) do
if (Self.TargetID() == 0) then
if (getTargetsInArea(Self.Position(), 1, 0, 0) == 2) then
setTargetingEnabled(true)
wait(500)
setTargetingEnabled(false)
end
end
wait(2000,3000)
end

and this is the error im receiving after update:

15:33 XenoScript Error:
Script: SlimeTrainer.lua
Line #: 1
Chunk: C:?Users?robert?Documents?XenoBot?Scripts?SlimeTra iner.lua
Error: unexpected symbol near ']'
This is an error with user-input and should not be reported as a bug with XenoBot.

Thanks in advance.

DarkstaR
12-24-2012, 03:35 PM
Redownloading and clearing cache did nothing for me i already tried it

oooh someone with the same problem as me. To get it to work for now change your first 2 lines.
local HUDText = HUD.New(100, 100, "", 255, 120, 120)
local HUDItem = HUD.New(100, 120, 1781, 48, 100)

I was wrong, sorry. I fixed what was originally wrong but messed up and broke a different piece of the code :p Now it works for sure, I tested it myself.

DarkstaR
12-24-2012, 03:36 PM
I fixed this. Re-download and re-install. config.players will be ignored, though - player consideration is determined by the aggressiveness.

getTargetsInArea(Self.Position(), info.radius, info.aggressive)


Look right up here ^


Hi DarkstaR could you help me with this issue please,

this is the slime trainer script im using, it worked perfectly before XenoBot update:

]]--
while(true) do
if (Self.TargetID() == 0) then
if (getTargetsInArea(Self.Position(), 1, 0, 0) == 2) then
setTargetingEnabled(true)
wait(500)
setTargetingEnabled(false)
end
end
wait(2000,3000)
end

and this is the error im receiving after update:

Thanks in advance.

For you it is:
if (getTargetsInArea(Self.Position(), 1, 0) == 2) then

Just make sure to re-download and re-install.

raiQi
12-24-2012, 03:51 PM
Thank you for update, seems nice eventho I cant test it yet, and merry Christmas! :D

Tripkip
12-24-2012, 03:52 PM
deleted.

robin
12-24-2012, 03:53 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.

DarkstaR
12-24-2012, 03:55 PM
Creature.Follow is a library function, not one you have to make. I fixed that.

*REMOVED*

Y2Quake
12-24-2012, 03:55 PM
Self.CloseContainers()
repeat
wait(900)
until (Self.UseItemFromEquipment("backpack") > 0) --opens main backpack
wait(1000)
Container.GetFirst():OpenChildren("brocade backpack", "backpack of holding", "orange backpack")

A lot less messy then letting the bot sit there and use hotkeys at random until they're open, :P

Harder better faster stronger.

i've a question, with that same example how do resize the backpacks to be all small?

thanks nick

Tripkip
12-24-2012, 03:59 PM
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....

Virse
12-24-2012, 04:09 PM
Look right up here ^



For you it is:
if (getTargetsInArea(Self.Position(), 1, 0) == 2) then

Just make sure to re-download and re-install.

I've made the changes and even re-downloaded and installed again and I'm still receiving an error trying to run the script :S

DarkstaR
12-24-2012, 04:09 PM
Y2Quake

Container.Minimize("golden backpack")
Container.Minimize("orange backpack")
Container.Minimize("red backpack")

Etc.


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....

The only thing I changed was the Creature.Follow.

Stusse
12-24-2012, 04:12 PM
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

Y2Quake
12-24-2012, 04:14 PM
thanks so much rydan, now i've another problem.

The following lua doesn't even load nor give any kind of error log.



------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


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.

DarkstaR
12-24-2012, 04:16 PM
@DarkstaR (http://forums.xenobot.net/member.php?u=2) 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

Should tell him to remove the dropbox links, then.

Stusse
12-24-2012, 04:17 PM
Should tell him to remove the dropbox links, then.
Already done ofcourse. :P

DarkstaR
12-24-2012, 04:18 PM
thanks so much rydan, now i've another problem.

The following lua doesn't even load nor give any kind of error log.

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.


You call loadSettings(), which restarts the LUA because loading a setting closes all Lua files and loads the ones associated with the .xbst's it's loading. If you're gonna use loadSettings(), use it in an independent script.

Y2Quake
12-24-2012, 04:33 PM
this was changed in this update? it worked nice with the last update.

ty i'll remove it now

Stusse
12-24-2012, 04:34 PM
Creature.Follow("NpcName") wait(2000) is a much better way to reach NPC's
Quoted links aswell, please remove =)

hugs

Y2Quake
12-24-2012, 04:40 PM
Yey, it worked now Nick ty.

merry xmas everybody!

martinpwnage
12-24-2012, 04:50 PM
I will need your script to fix this, but it look like you're using Self.DropItems() incorrectly.



I've pm'd you a link, thanks!

dexter killer
12-24-2012, 05:07 PM
DarkstaR

This error occurs with your script Players Above.lua


15:01 XenoScript Error:
Script: @PlayersAbove.lua
Line #: 1
Chunk: ...rs\Admin\Documents\XenoBot\Scripts\@PlayersAbov e.lua
Error: attempt to call field 'CreateTextDisplay' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

Avani
12-24-2012, 05:40 PM
I don't know if this a bug or it's intented to be this way:

If you load a XBST with a script attached to it that uses the loadSettings() line it will keep loading the script in some sort of loop.

soul4soul
12-24-2012, 07:27 PM
09:33 XenoScript Error:
Script: a.lua
Line #: 1
Chunk: C:?Users?soul4soul?Documents?XenoBot?Scripts?a.lua
Error: attempt to call field 'CreateTextDisplay' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.


Testing this now. im encountering problems. scenario 2, 3"a", and 3"b" work fine but 1 doesnt work. I get this error.
still have this error with the lastest download.

DarkstaR
12-24-2012, 09:40 PM
still have this error with the lastest download.

I've downloaded myself and tested. Worked 100%. Make sure your cache is clear.

Syntax
12-24-2012, 09:55 PM
Virse, there's no way it would give the same error. Just tested it and it's running fine. PM how you're implementing it.

soul4soul
12-24-2012, 09:58 PM
I've downloaded myself and tested. Worked 100%. Make sure your cache is clear.
Sorry I went to quote my other post and I forgot you cant quote a quote plus i did a poor job editing my quote.

This is the error Im still getting.

This update brings some significant modifications to the Scripter, allows .xbst settings to include .lua scripts
Changelog:


Modified the Settings system, it will now work with Lua scripts.
When a setting is saved, it packages all running .lua scripts into the .xbst.
When a setting is loaded, it does the one of following for each .lua script:
1. If the script doesn't exist in your lua directory, it creates and executes it.
2. If the script does exist in your lua directory, and it is the same, it executes it.
3. If the script does exist in your lua directory, but it is different, it asks you if you want to replace or skip.
- Replace will replace the file currently in your lua directory with the one in the .xbst and then execute it.
- Skip will keep the file currently in your lua directory and execute it. You will have to save the .xbst to make it remember this one.

Testing this now. im encountering problems. scenario 2, 3"a", and 3"b" work fine but 1 doesnt work. I get this error. The script doesnt get unpacked(?) into the scripts folder.

16:55 XenoScript Error:
Script: control - South Cyclops.lua
Error: cannot open C:\Users\soul4soul\Documents\XenoBot\Scripts\contr ol - South Cyclops.lua: No such file or directory
This is an error with user-input and should not be reported as a bug with XenoBot.

DarkstaR
12-24-2012, 10:50 PM
I'll check it out.

Tizet
12-24-2012, 11:00 PM
23:59 XenoScript Error:
Script: EK-Nightmares.lua
Line #: 1943
Chunk: C:\Program Files?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.
... i reinstall xeno and install again , and i got same problem ; /

line 1943 =
"function getTargetsInArea(pos, radius, aggressiveness) --this function will be deprecated completely in the near future, do not use "

fixed by Syntax .

Thanks <3 !

Syntax
12-24-2012, 11:29 PM
Already pm'ed this fix to Tizet and he verified it works. For anyone that HAS to use this function here is the temp fix (it will be patched soon):

function getTargetsInArea(pos, radius, aggressiveness) --this function will be deprecated completely in the near future, do not use
local n = #Self.GetTargets(radius)
local safe = Self.isAreaPvPSafe(radius+2, true, true) or aggressiveness == 4
return safe and n or 0
end
Note the comment, this is a deprecated function so it's recommended to phase it out and use 'Self.GetTargets'.

Tizet
12-24-2012, 11:32 PM
working ! :)
Merry X-mas !

DarkstaR
12-24-2012, 11:38 PM
23:59 XenoScript Error:
Script: EK-Nightmares.lua
Line #: 1943
Chunk: C:\Program Files?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.
... i reinstall xeno and install again , and i got same problem ; /

line 1943 =
"function getTargetsInArea(pos, radius, aggressiveness) --this function will be deprecated completely in the near future, do not use "

fixed by Syntax .

Thanks <3 !

Just patched this, try a re-install.

Tripkip
12-24-2012, 11:53 PM
When saving HUD, bot crashes.

Helechos
12-25-2012, 12:00 AM
Which is the version of Xenobot that could work for Tibia 8.6? Please, if anyone here is still reading these posts.

Thank you =)

Fixi
12-25-2012, 12:06 AM
There is no XenoBot for Version 8.60.....

twan
12-25-2012, 12:25 AM
Anyone knows where I can find the list of all the lua functions from darkstar? DarkstaR

Syntax
12-25-2012, 12:26 AM
Anyone knows where I can find the list of all the lua functions from darkstar? DarkstaR

"C:\Program Files (x86)\XenoBot\Data\XenoLuaLib.lua"

twan
12-25-2012, 12:39 AM
Thanks.

soul4soul
12-25-2012, 02:09 AM
Im have problems with custom chat channels. I cant send any messages into them. You can test it with this tictactoe script. http://forums.xenobot.net/showthread.php?5665-TicTacToe-guys!&highlight=game. On line 23 youll need to add tostring() to force the numbers into a string.

Syntax
12-25-2012, 02:38 AM
Im have problems with custom chat channels. I cant send any messages into them. You can test it with this tictactoe script. http://forums.xenobot.net/showthread.php?5665-TicTacToe-guys!&highlight=game. On line 23 youll need to add tostring() to force the numbers into a string.

It's working as is. HUD.New expects number values to be for itemids, strings to be for text. The old constructors are for backwards compatibility. If you can't wrap the number in quotes: '1' as in this case where the numbers are generated. Do as you said with tostring or string.format. I don't see this affecting a huge audience but I'll look and see if there's more checks we can undergo before assuming it's an itemid :P

soul4soul
12-25-2012, 02:43 AM
It's working as is. HUD.New expects number values to be for itemids, strings to be for text. The old constructors are for backwards compatibility. If you can't wrap the number in quotes: '1' as in this case where the numbers are generated. Do as you said with tostring or string.format. I don't see this affecting a huge audience but I'll look and see if there's more checks we can undergo before assuming it's an itemid :P
That is not the problem Im fine with doing that and already adapted all my scripts to it. I was letting darkstar know he needed to make that change if he wanted to use that script to test custom chat channels.

Syntax
12-25-2012, 03:17 AM
That is not the problem Im fine with doing that and already adapted all my scripts to it. I was letting darkstar know he needed to make that change if he wanted to use that script to test custom chat channels.

Misread sorry, I will look in to sending messages. Thanks.

martinpwnage
12-25-2012, 09:46 AM
I will need your script to fix this, but it look like you're using Self.DropItems() incorrectly.

I was using Self.DropFlask() but i removed it and it works fine now and continues with the supply checking, no idea why it meant Self.DropItems() though :s


Edit: now i get this error in the Self.DepositItems()


05:54 XenoScript Error:
Script: ?Corym?Config.lua
Line #: 1684
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'GetItemIDFromDualInput' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

robin
12-25-2012, 01:26 PM
For some reason #Self.GetTargets doesn't work and always returns 0. #Self.GetSpectators works fine.

dondiablo
12-25-2012, 04:02 PM
I got this when the bot tries to deposit items:


16:53 XenoScript Error:
Script: [Spheres] Spheres v2.lua
Line #: 1684
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'GetItemIDFromDualInput' (a nil
value)
This is an error with user-input and should not be reported as a
bug with XenoBot.

The function where it stucks is:


elseif label == "Depot" then
setWalkerEnabled(false)
Self.ReachDepot()
Self.DepositItems({"wand of starstorm", 1}, {"energy soil", 0}, {"berserk potion", 0}, {"small amethyst", 0}, {"great health potion", 0})
wait(500, 900)
Self.WithdrawItems(2, {"small enchanted amethyst", 0, 20})
if Self.ItemCount(678) < 20 then
gotoLabel("Depot")

PunktG
12-25-2012, 04:16 PM
testing :)
thx for all
and Merry xmas

KingDavey
12-25-2012, 09:21 PM
Creature.Follow is a library function, not one you have to make. I fixed that.

*REMOVED*

Yo bro, did you mean you removedthis function from the library? cause i cant seem to find it in there, if not how do i use it?

Just do like:
Local npcName = "Noob"
Creature.Follow(npcName)

help please haha

Bomasz
12-25-2012, 09:36 PM
OP Update.

Lua saved with XBST is what I was looking for, for a long long time. :D
Will test it as soon as I go home.

Crown Royal
12-26-2012, 12:01 AM
Very long update. Did a great job, thanks DarkstaR!

Avani
12-26-2012, 12:06 AM
Creature.Follow("NpcName") wait(2000) is a much better way to reach NPC's

I can't get this to work :S



elseif (labelName == "GoVenore") then
setWalkerEnabled(false)
Creature.Follow("Captain Breezelda")
wait(2000)
Self.SayToNpc({"hi", "Venore", "yes"}, 65)
setWalkerEnabled(true)

Joshwa534
12-26-2012, 12:20 AM
I can't get this to work :S



elseif (labelName == "GoVenore") then
setWalkerEnabled(false)
Creature.Follow("Captain Breezelda")
wait(2000)
Self.SayToNpc({"hi", "Venore", "yes"}, 65)
setWalkerEnabled(true)


Because Creature.Follow("NpcName") doesn't work and I can't find it in the XenoLuaLib.lua
http://i50.tinypic.com/10zu52t.jpg

nato12
12-26-2012, 01:52 AM
DarkstaR
could u explain me why it dont work anymore????


Self.UseLever(Self.Position().x + 1, Self.Position().y, Self.Position().z, 2772)

DarkstaR
12-26-2012, 02:47 AM
I was using Self.DropFlask() but i removed it and it works fine now and continues with the supply checking, no idea why it meant Self.DropItems() though :s


Edit: now i get this error in the Self.DepositItems()


05:54 XenoScript Error:
Script: ?Corym?Config.lua
Line #: 1684
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'GetItemIDFromDualInput' (a nil value)
This is an error with user-input and should not be reported as a bug with XenoBot.

This is a bug with Forgee's library. He overwrites the global item class on accident, causing it to break. Before, the Item class wasn't used extensively so this went unnoticed. Now, though, I use it a lot more and so Forgee's library causes issues.

DarkstaR
12-26-2012, 02:49 AM
Because Creature.Follow("NpcName") doesn't work and I can't find it in the XenoLuaLib.lua
http://i50.tinypic.com/10zu52t.jpg

Thats because it is Creature:Follow, a member function, but calling it using the static call syntax (. instead of : ) causes the "self" field to be the first argument (in this case, the NPC name). We then do a Creature.New() and call :Follow() from there.

This works, I use it personally.

DarkstaR
12-26-2012, 02:50 AM
I got this when the bot tries to deposit items:


16:53 XenoScript Error:
Script: [Spheres] Spheres v2.lua
Line #: 1684
Chunk: C:\Program Files ?x86??XenoBot?Data?XenoLuaLib.lua
Error: attempt to call field 'GetItemIDFromDualInput' (a nil
value)
This is an error with user-input and should not be reported as a
bug with XenoBot.

The function where it stucks is:


elseif label == "Depot" then
setWalkerEnabled(false)
Self.ReachDepot()
Self.DepositItems({"wand of starstorm", 1}, {"energy soil", 0}, {"berserk potion", 0}, {"small amethyst", 0}, {"great health potion", 0})
wait(500, 900)
Self.WithdrawItems(2, {"small enchanted amethyst", 0, 20})
if Self.ItemCount(678) < 20 then
gotoLabel("Depot")


This is a bug with Forgee's library. He overwrites the global item class on accident, causing it to break. Before, the Item class wasn't used extensively so this went unnoticed. Now, though, I use it a lot more and so Forgee's library causes issues.

xiaospike
12-26-2012, 03:15 AM
Thats because it is Creature:Follow, a member function, but calling it using the static call syntax (. instead of :) causes the "self" field to be the first argument (in this case, the NPC name). We then do a Creature.New() and call :Follow() from there.

This works, I use it personally.



Creature.Follow("NpcName") wait(2000) is a much better way to reach NPC's

.........

dondiablo
12-26-2012, 12:14 PM
This is a bug with Forgee's library. He overwrites the global item class on accident, causing it to break. Before, the Item class wasn't used extensively so this went unnoticed. Now, though, I use it a lot more and so Forgee's library causes issues.

So how am I supposed to fix this?

DarkstaR
12-26-2012, 01:46 PM
So how am I supposed to fix this?

Learning to read and comprehend is the first step.

Go to the first post in this thread.

marco1992
12-26-2012, 02:38 PM
I for example using old version (from 20 th dec) since witch update half of my scripts fucked up

PunktG
12-26-2012, 04:39 PM
Tibia updates -> Bot needs update
Bot updates -> Scripts need updates

Get the fact that scripts do sometimes need an update to work with new things.

ye is true
all should be hapy bot is better each update

Masiar
12-27-2012, 06:07 AM
Problem with Windows 8.

http://i50.tinypic.com/2wc1aft.jpg

DarkstaR
12-27-2012, 02:19 PM
Problem with Windows 8.

http://i50.tinypic.com/2wc1aft.jpg

Make sure it's run as admin.


Also, Sublime Text is the shit.

Stusse
12-27-2012, 03:19 PM
Not sure what I'm doing wrong either but the creature.follow doesnt seem to work the way I use it. Just followed your instructions previously posted in this thread.

DarkstaR
12-27-2012, 03:40 PM
Not sure what I'm doing wrong either but the creature.follow doesnt seem to work the way I use it. Just followed your instructions previously posted in this thread.

Are you following a creature behind a counter, or something?

As long as you are on the creatures screen it works fine. I use it.

Stusse
12-27-2012, 03:45 PM
Are you following a creature behind a counter, or something?

As long as you are on the creatures screen it works fine. I use it.
Unfortunately I'm standing in range with just but an open deck between me and the Npc.

Tried with both just the Creature.Follow to let it create new creature itself, also tried with to make a creature for the npc and follow it, niether worked for me :(

Junglemaster1992
12-27-2012, 04:55 PM
Hey, the backpackreopener doesnt function anymore when Xeno uses it.

Greetings

Stusse
12-27-2012, 05:16 PM
Hey, the backpackreopener doesnt function anymore when Xeno uses it.

Greetings
Depens ofcourse on which backpackresetter function your using.

I suggest you use this:



--Main bp = backpack nr 1--
BP2 = Item.GetID("Red Backpack") --<<--Your bp nr 2
BP3 = Item.GetID("Blue Backpack")--<<--Your bp nr 3
BP4 = Item.GetID("Golden Backpack")--<<--Your bp nr 4

setBotEnabled(false)
wait(800,1200)
Self.CloseContainers()
wait(1500,2000)
repeat
wait(1200)
until (Self.UseItemFromEquipment("backpack") > 0)
wait(1500)
Container.GetFirst():OpenChildren(BP2, BP3, BP4)
wait(800,1200)
setBotEnabled(true)

DarkstaR
12-27-2012, 05:43 PM
Depens ofcourse on which backpackresetter function your using.

I suggest you use this:



--Main bp = backpack nr 1--
BP2 = Item.GetID("Red Backpack") --<<--Your bp nr 2
BP3 = Item.GetID("Blue Backpack")--<<--Your bp nr 3
BP4 = Item.GetID("Golden Backpack")--<<--Your bp nr 4

setBotEnabled(false)
wait(800,1200)
Self.CloseContainers()
wait(1500,2000)
repeat
wait(1200)
until (Self.UseItemFromEquipment("backpack") > 0)
wait(1500)
Container.GetFirst():OpenChildren(BP2, BP3, BP4)
wait(800,1200)
setBotEnabled(true)


You don't need to use Item.GetID anymore, it will do that for you.




Backpacks = {"Red Backpack", "Blue Backpack", "Golden Backpack"}

setBotEnabled(false)
Self.CloseContainers()
repeat wait(1200) until (Self.UseItemFromEquipment("backpack") > 0)
wait(1500)
Container.GetFirst():OpenChildren(unpack(Backpacks ))
setBotEnabled(true)

Stusse
12-27-2012, 05:57 PM
You don't need to use Item.GetID anymore, it will do that for you.

Okey, sweet!

Anyways darkstar, do you mind writing exactly how you should write the Creature follow for lets say Npc "Darkstar"? Would be good to see what you're using that actually works, since it isnt for me :(

Thansk :)

DarkstaR
12-27-2012, 06:05 PM
Okey, sweet!

Anyways darkstar, do you mind writing exactly how you should write the Creature follow for lets say Npc "Darkstar"? Would be good to see what you're using that actually works, since it isnt for me :(

Thansk :)

Creature.Follow("DarkstaR")

Stusse
12-27-2012, 06:07 PM
Creature.Follow("DarkstaR")
Aight well, you got any ideas what can be wrong since that's exactly what I'm doing...

Thanks

Infernal Bolt
12-27-2012, 06:09 PM
Okey, sweet!

Anyways darkstar, do you mind writing exactly how you should write the Creature follow for lets say Npc "Darkstar"? Would be good to see what you're using that actually works, since it isnt for me :(

Thansk :)

Creature.GetByName("Darkstar"):Follow()
if his version doesn't work.

XtrmJosh
12-27-2012, 06:10 PM
Looks like a positive step here for XB, too bad it's so late into the development, now scripters must put extra time into repairing old scripts instead of making new... I guess it's the price you pay for joining a revolution though...

Well done, and keep it up.

Junglemaster1992
12-27-2012, 06:11 PM
I use forgee.lua bpopener, but when Xeno wants to open the bp's it stucks at a bp, before update I hadnt this problem :///

Greetings

Infernal Bolt
12-27-2012, 06:15 PM
I use forgee.lua bpopener, but when Xeno wants to open the bp's it stucks at a bp, before update I hadnt this problem :///

Greetings

Talk to forgee about that.

DarkstaR
12-27-2012, 06:21 PM
Aight well, you got any ideas what can be wrong since that's exactly what I'm doing...

Thanks

I just realized that, in fixing another issue, I subtly broke this. My bad. In your XenoLuaLib.lua, replace Creature.New() with this one for now:


function Creature.New(value)
local c = {}
setmetatable(c, Creature)

if (value == nil) then
c._id = -1
c._listindex = -1
c._name = ""
else
if (type(value) == 'string') then
c._name = value
c._id = getCreatureID(value)
c._listindex = getCreatureListIndex(c._id)
elseif (type(value) == 'number') then
if (value < 1300) then
value = getCreatureIDFromIndex(value)
end


c._id = value
c._listindex = getCreatureListIndex(c._id)
c._name = getCreatureName(c._listindex)
end
end

return c
end



I use forgee.lua bpopener, but when Xeno wants to open the bp's it stucks at a bp, before update I hadnt this problem :///

Greetings

Read the thread. Forgee's backpack opener is outdated and there are much better options.

Junglemaster1992
12-27-2012, 06:23 PM
Alright, thanks :)

Stusse
12-27-2012, 07:52 PM
Many thanks, will test and report back with results!

Edit: Works good with it being changed! Thanks

PunktG
12-27-2012, 08:00 PM
Mate how i can do 17972, 17977 id as walkable in xeno ?
bot show on diagnostick info as blocking and noobs try kill me :)

DarkstaR
12-27-2012, 08:47 PM
Mate how i can do 17972, 17977 id as walkable in xeno ?
bot show on diagnostick info as blocking and noobs try kill me :)

What are these items? I can add them in the next update.

PunktG
12-27-2012, 09:25 PM
What are these items? I can add them in the next update.

some box i see once like dude block me and check id
and is walkable for sure

DarkstaR
12-27-2012, 09:31 PM
some box i see once like dude block me and check id
and is walkable for sure

Next update will have them :)

PunktG
12-27-2012, 09:35 PM
Next update will have them :)

thx :)

Masiar
12-27-2012, 11:08 PM
Make sure it's run as admin.


Also, Sublime Text is the shit.

yes, i run this as admin.

i like sublime's UI and highlights. What do you use ?