PDA

View Full Version : [Update] XenoBot v2.4.3



DarkstaR
05-24-2012, 12:55 AM
This update fixes a few small bugs, re-invents some old functionality and adds many essential Scripter functions. Furthermore, I've made some improvements to some old scripting functions with the help of @Syntax (http://forums.xenobot.net/member.php?u=193).

Changelog:

v2.4.3
Fixed some bugs related to the saving and loading of "Pathfinder" settings.
Fixed "Startup Items" to actually be functional for all XenoBot panels. It now includes all possible panels in its list of options (Startup Items are panels which will automatically be opened upon inject/login).
Fixed "Alarms" to flash the clients button in the windows taskbar
Added the following functionality to the Scripter:
Added a "Channel" class which provides methods for creating and working with console channels. This class has the following functionality:
Channel.Open(name, speakcallback, closecallback)
Returns: A channel class object
Channel:Name()
Channel:ID()
Channel:Close()
Channel:SendOrangeMessage(sender, text)
Channel:SendYellowMessage(sender, text)
Added an "Item" class which provides methods for determining the properties of different items. This class has the following functionality:
Item.GetName(id)
Returns: The name of the item ID provided
Item.GetID(name [,spot])
Returns: The ID of the item name provided
Notes: If multiple ID's share the same name, they can be indexed using the optional spot paremeter
Item.isContainer(id)
Item.isCorpse(id)
Item.isStackable(id)
Item.isUseWithable(id)
Item.isFood(id)
Added new methods to the "Self" class. The functionality as is follows:
Self.ShopGetItemPurchasePrice(item)
Returns:
The cost to purchase the specified item from the current shop window
-1 if the specified item is not sold in the current shop
Notes:
The parameter can either be an item name or item ID
Self.ShopGetItemSaleCount(item)
Returns:
The amount of the specified item it is possible to sell in the shop
0 if the specified item is not sellable in the current shop or if you hold no instances of the specified item
Notes:
The parameter can either be an item name or item ID
Self.DropItem(x, y, z, itemid [, count])
Returns: Nothing
Self.GetSpellCooldown(spell)
Returns: The amount of time (MS) before the spell can be cast
Self.MeetsSpellRequirements(spell)
Returns: True if you have enough level and mana to cast the provided spell, false if otherwise
Self.CanCastSpell(spell)
Returns: (Self.GetSpellCooldown(spell) == 0 and Self.MeetsSpellRequirements(spell))
Added new methods to global scope:
alert()
Plays an alert sound and flashes the Tibia client.
Returns: Nothing
Modified the following Scripter functions:
Container:UseItem() now takes an optional boolean parameter which determines, in the case of the item being a container, if it opens in the same window or not.
Self.Equip() has an optional "count" parameter appended to its argument list.
Self.WithdrawItems() will now withdraw an exact amount of items instead of a rough amount.
The following functions will now natively support transactions of more than 100 items at a time:
Self.ShopSellItem()
Returns:
1, 0 if successful
0, [amountNotSold] if failed
Self.ShopBuyItem()
Returns:
1, 0 if successful
0, [amountNotBought] if failed


Example use of the new Item class along with the cooldown checks and new shop functions:

function yesNo(value)
return (value and "yes" or "no")
end

function displayItemInfo(id)
print("Item %d [%s] is: \n Container: %s\n Corpse: %s\n Stackable: %s\n UseWithable: %s\n Food: %s",
id,
Item.GetName(id),
yesNo(Item.isContainer(id)),
yesNo(Item.isCorpse(id)),
yesNo(Item.isStackable(id)),
yesNo(Item.isUseWithable(id)),
yesNo(Item.isFood(id)))
end

function exhaustSelfThenCheckIfICanCast(spell)
if (Self.CanCastSpell(spell)) then
Self.Say(spell)
wait(1000)
print("%s casted 1000 MS ago. %d MS left on cooldown.", spell, Self.GetSpellCooldown(spell))
elseif (not Self.MeetsSpellRequirements(spell)) then
print("%s can not be cast. You either lack the mana or required level!", spell)
else
print("%s is currently on cooldown for %d MS.", spell, Self.GetSpellCooldown(spell))
end
end

displayItemInfo(Item.GetID("boots of haste"))
exhaustSelfThenCheckIfICanCast("utevo lux")

print("SD's cost %d each and you have %d vials to be sold.", Self.ShopGetItemPurchasePrice("sudden death rune"), Self.ShopGetItemSaleCount(285))


while (true) do
alert()
wait(100)
end


Example use of the new Channel class with a command handler:

function mySpeakCallback(c, message)
c:SendYellowMessage("Input", message)
if (message == "close") then
c:Close()
end
end
function myCloseCallback(c)
print("%s custom channel has been closed.", c:Name())
end

local commander = Channel.Open("Commander", mySpeakCallback, myCloseCallback)
commander:SendOrangeMessage("Commander", "Please say a command")

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

Spectrus
05-24-2012, 01:18 AM
Mmmmmh. Tasty.

Y2Quake
05-24-2012, 01:21 AM
GJ BRO!

Hendy
05-24-2012, 01:23 AM
Thanks DarkstaR.

braedan13
05-24-2012, 01:27 AM
Thanks alot :)

soul4soul
05-24-2012, 01:52 AM
great work. many of those functions were really needed. I have some scripts to update now.

flpsan
05-24-2012, 06:50 AM
Great job, solved too many problems I had.

Not sure if its a bug, that's why im not posting at bug section

Here, the loop is blocking any kind of message typed by me in game.

function mySpeakCallback(c, message)
c:SendYellowMessage("Input", message)
if (message == "close") then
c:Close()
end
end

function myCloseCallback(c)
print("%s custom channel has been closed.", c:Name())
end

local commander = Channel.Open("Test", mySpeakCallback, myCloseCallback)

while true do
-- some code here
wait(10000)
end

curry
05-24-2012, 07:43 AM
well done, and thanks for update :).. just wondering if u fixed the special area bug where walker gets stuck?

Xongiver
05-24-2012, 08:01 AM
Spells for mage works great now, my exp rate on grims increased from 580k/h to 670k/h just because of this function. Old way to cast different spells was inefficient.

GambaZ
05-24-2012, 08:12 AM
Excellent ! Thank you boss. :)

Xongiver
05-24-2012, 08:56 AM
What chenges ou made in bot? Since this update functions to open door and going through teleports causes tibia crash. Used function:



elseif (labelName == "DoorEast") then
setWalkerEnabled(false)
wait(500)
Self.OpenDoor(Self.Position().x + 1, Self.Position().y, Self.Position().z)
setWalkerEnabled(true)

while (true) do
if (Self.DistanceFromPosition(33197, 31347, 6) < 1) then
gotoLabel("AfterTP")
wait(1000)
elseif (Self.DistanceFromPosition(33144, 31248, 6) < 1) then
gotoLabel("AfterTP1")
wait(1000)
end
end

flpsan
05-24-2012, 09:18 AM
Im getting some debugs too

detdu
05-24-2012, 10:41 AM
Really nice to wake up to an update, Cheers Dark!

Junglemaster1992
05-24-2012, 01:06 PM
I am not able to execute syntax lib and forgee lua after update and tibia crashes

Pandarohoo
05-24-2012, 01:29 PM
If I download this updated & new bot, will my old settings (profiles) disappear? Also, how do I get the files for the settings I've done, I might want to release a few :)! And finally, how do I import scripts? I've created a folder in /xenobot/ called scripts but they don't appear in the script list :(!

DarkstaR
05-24-2012, 01:32 PM
I'll look into debugs.

Are they all having to do with the Scripter?

Pandarohoo
05-24-2012, 01:55 PM
I'll look into debugs.

Are they all having to do with the Scripter?

Was that an answer to me huh? xD!

kimfinnstrom
05-24-2012, 01:55 PM
I am getting a error when my character are about to travel. So yes i think it's all about scripts

Junglemaster1992
05-24-2012, 02:19 PM
Seems the same to me.

DarkstaR
05-24-2012, 04:05 PM
Can you give me some scripts that trigger the debugs?

Also, seeing some debug reports would help.

Pandarohoo
05-24-2012, 04:16 PM
Can you give me some scripts that trigger the debugs?

Also, seeing some debug reports would help.

http://forums.xenobot.net/showthread.php?3735-Windows-7-x64-Debug-at-certain-label

DarkstaR
05-24-2012, 05:13 PM
I've just re-uploaded a patchfix for 2.4.3 that should fix some if not all of the debugs.
I've not been able to re-create them easily but the ones I could re-create are seemingly gone.
Please re-download and re-install and let me know if it fixes anything.

Junglemaster1992
05-24-2012, 05:43 PM
I still cant execute Forgee.lua and Syntaxlualib.lua

DarkstaR
05-24-2012, 05:46 PM
Please provide those scripts for testing.

Also, as previously stated, Syntaxlualib.lua is now integrated to the main library. You should break dependencies on it and convert your scripts to work with the native library.

nato12
05-24-2012, 05:52 PM
some scripts didnt work like the next:
functions:
-- Infernal Bolt.cfg

Xongiver
05-24-2012, 06:18 PM
Tested patch, seems like problems are gone, didnt had crashes after reinstalling bot.

nato12
05-24-2012, 07:23 PM
look that script darkstar:
http://forums.xenobot.net/showthread.php?514

functions.lua‎ didnt work

Rydan
05-25-2012, 04:42 PM
Special Areas considered by targeting doesn't work that good or well let's say miserable.
It's just walking back and forth all the time.
I've got it recorded via TibiaCast if you want to see it.

And if the bot tries to loot a creature using Loot Bodies: First while drinking a potion or healing or doing anything else will sometimes stop the bot from trying to open the body and just keep on hunting.

Dezzie
05-25-2012, 07:27 PM
"Fixed some bugs related to the saving and loading of "Pathfinder" settings."

By "fixing" this, did you remove the loading completely? Why wont you just let it load as it did before? kinda annyoing starting up a dl script and having to enable walk on fire each time...

DarkstaR
05-26-2012, 02:33 AM
Not sure what you're talking about cause it works perfect for me.

nato12
05-26-2012, 06:16 AM
it doenst work. look at mine post before. try test functions.lua

http://forums.xenobot.net/showthread.php?514

Rydan
05-26-2012, 12:07 PM
DarkstaR
I've sent you a link to a recording.

DarkstaR
05-26-2012, 05:25 PM
Recordings do nothing for me.
Provide example scripts if you want help.

Rydan
05-26-2012, 06:56 PM
It's just about Special Areas. What do you need the script for when you see where they are on the recording?
I can send you the script tho if it's really needed.

Luls
05-26-2012, 07:18 PM
Just so DarkstaR doesn't have to be a dick again (<3) he's asked for any scripts multiple times to see what it was that was messing up, then he specifically said a recording wouldn't be useful to find out in depth what's wrong.

Rydan
05-26-2012, 11:25 PM
Just so DarkstaR doesn't have to be a dick again (<3) he's asked for any scripts multiple times to see what it was that was messing up, then he specifically said a recording wouldn't be useful to find out in depth what's wrong.

Yea I understood that, the problem is that I've deleted the Special Areas right after I noticed they do not work well so I can still bot there without having to wait for them to get fixed.
So I have to recreate them at the same spots which is actually not a that big problem but I just wanted to be sure if that's really needed.

nato12
05-27-2012, 02:03 AM
DarkstaR

could u tell me when will take a look at mine link??
or something

ziemniaq
05-27-2012, 11:00 AM
DarkstaR
Could You please add this in new update as non-walkable furniture?:
12:58 You see a goblin statue. [ID 2030]

My character tries to go throught it, but he can't. I have to break it myself, everytime.

DarkstaR
05-27-2012, 04:50 PM
@DarkstaR (http://forums.xenobot.net/member.php?u=2)
Could You please add this in new update as non-walkable furniture?:
12:58 You see a goblin statue. [ID 2030]

My character tries to go throught it, but he can't. I have to break it myself, everytime.

Added.
You can also add it yourself to Data/Items.xml under itemtype "blocking" until its officially released.

sirmate
05-27-2012, 05:09 PM
Added.
You can also add it yourself to Data/Items.xml under itemtype "blocking" until its officially released.

2025, 2029, 2030, 2043, 2044, 2045, 2046, 2047, 2048, 2059, 2060, 2061, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2465, 2466, 2467, 2468, 2524, 2904, 2959, 2960, 2961, 2962, 2963, 2964, 2975, 2976, 2979, 2982, 2986, 2997, 2998, 2999, 3000, 3484, 3485, 3486, 3487, 3510, 3511, 3512, 3513, 5046, 5055, 5056, 6109, 6110, 6111, 6112, 6367, 6368, 6369, 6370, 7860, 7861, 7862, 7863, 9132, 9141, 10208, 10210, 10211, 10212, 10213, 10214, 10215

Some more ID's to add :p

Niyar
05-27-2012, 05:21 PM
2025, 2029, 2030, 2043, 2044, 2045, 2046, 2047, 2048, 2059, 2060, 2061, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2465, 2466, 2467, 2468, 2524, 2904, 2959, 2960, 2961, 2962, 2963, 2964, 2975, 2976, 2979, 2982, 2986, 2997, 2998, 2999, 3000, 3484, 3485, 3486, 3487, 3510, 3511, 3512, 3513, 5046, 5055, 5056, 6109, 6110, 6111, 6112, 6367, 6368, 6369, 6370, 7860, 7861, 7862, 7863, 9132, 9141, 10208, 10210, 10211, 10212, 10213, 10214, 10215

Some more ID's to add :p

You're the man! ;).

DarkstaR
05-27-2012, 05:30 PM
2025, 2029, 2030, 2043, 2044, 2045, 2046, 2047, 2048, 2059, 2060, 2061, 2445, 2446, 2447, 2448, 2449, 2450, 2451, 2452, 2453, 2454, 2465, 2466, 2467, 2468, 2524, 2904, 2959, 2960, 2961, 2962, 2963, 2964, 2975, 2976, 2979, 2982, 2986, 2997, 2998, 2999, 3000, 3484, 3485, 3486, 3487, 3510, 3511, 3512, 3513, 5046, 5055, 5056, 6109, 6110, 6111, 6112, 6367, 6368, 6369, 6370, 7860, 7861, 7862, 7863, 9132, 9141, 10208, 10210, 10211, 10212, 10213, 10214, 10215

Some more ID's to add :p


How.. kind of you to provide me with such a tedious list.

sirmate
05-27-2012, 05:39 PM
No problem, for sure that list is not complete but it prolly contains most of the not walkable items :)

DarkstaR
05-27-2012, 06:48 PM
Well, most non-walkable items are identified already by the client.

I only need to add ones that the client doesn't identify as non-walkable, such as the goblin statues.

Neum
05-27-2012, 06:53 PM
hello,

how to use that with an especific amount of items? thanks a lot

B0tt3r
05-29-2012, 04:15 AM
My bot don't take all the loot :s

Spectrus
05-29-2012, 05:12 AM
My bot don't take all the loot :s

Enable the looter? :)

B0tt3r
05-29-2012, 08:37 AM
Enable the looter? :)




-.- today make a script and the bot miss some items :s

braedan13
05-31-2012, 02:15 AM
Maybe can you be more specific and we can help you more ? Thx

Pitzy
06-01-2012, 04:17 PM
maybe you can help me? cause i bought it yesterday and i can't botting i have Freeze Tibia crash i have win xp i dont know what is wrong :(

DarkstaR
06-01-2012, 04:34 PM
Make sure you have no AV blocking injection and make sure to grab the c++ redist mentioned in the download thread.

Pitzy
06-02-2012, 11:21 AM
I don't have antyvirus in my computer and i downloaded it but still can't botting ...stupid freezes ;(

robin
06-03-2012, 02:10 PM
The Pathfinder still doesn't work for me. When I load my settings 'Walk on Fire' and 'Walk on Furniture' are unchecked even though they are enabled in my settings file. I tried reinstalling XenoBot to no avail.

botam
06-03-2012, 07:58 PM
DarkstaR, check you pms plz.
Thanks. See ya.

Erra
06-04-2012, 12:13 PM
The Pathfinder still doesn't work for me. When I load my settings 'Walk on Fire' and 'Walk on Furniture' are unchecked even though they are enabled in my settings file. I tried reinstalling XenoBot to no avail.

Same here, just doesn't load for some reason.

p0pas
06-07-2012, 06:08 PM
Darkstarr say info abaut next update!

Xongiver
06-08-2012, 07:24 AM
The Pathfinder still doesn't work for me. When I load my settings 'Walk on Fire' and 'Walk on Furniture' are unchecked even though they are enabled in my settings file. I tried reinstalling XenoBot to no avail.


I have found solution for this issue. Open your xbst file in notepad and find this:



<panel name="Pathfinder">
<control name="walkOnFireEnable" value="1"/>
<control name="walkOnFurnitureEnable" value="1"/>
<control name="lastWPEvadeEnable" value="1"/>
<control name="showDiagnoticEnable" value="0"/>
<control name="walkWithMapclicks" value="0"/>
</panel>


then you just have to delete line:

<control name="walkWithMapclicks" value="0"/>

so your pathfinder looks like:



<panel name="Pathfinder">
<control name="walkOnFireEnable" value="1"/>
<control name="walkOnFurnitureEnable" value="1"/>
<control name="lastWPEvadeEnable" value="1"/>
<control name="showDiagnoticEnable" value="0"/>
</panel>


Save it. 'Walk on Fire' and 'Walk on Furniture' wont be unchecked anymore. Its tested.

Messed Around
06-09-2012, 08:08 AM
I have found solution for this issue. Open your xbst file in notepad and find this:



<panel name="Pathfinder">
<control name="walkOnFireEnable" value="1"/>
<control name="walkOnFurnitureEnable" value="1"/>
<control name="lastWPEvadeEnable" value="1"/>
<control name="showDiagnoticEnable" value="0"/>
<control name="walkWithMapclicks" value="0"/>
</panel>


then you just have to delete line:

<control name="walkWithMapclicks" value="0"/>

so your pathfinder looks like:



<panel name="Pathfinder">
<control name="walkOnFireEnable" value="1"/>
<control name="walkOnFurnitureEnable" value="1"/>
<control name="lastWPEvadeEnable" value="1"/>
<control name="showDiagnoticEnable" value="0"/>
</panel>


Save it. 'Walk on Fire' and 'Walk on Furniture' wont be unchecked anymore. Its tested.

o.o Nice find.

Flappy Joe
06-10-2012, 01:46 PM
The problem about the Pathfinding has been fixed, it will be gone in the next update.

Stusse
06-11-2012, 12:53 AM
DarkstaR
Seems like Self.DropItem function does not support objects that are not stackable? I tried to do a trasher drop but it kept throwing out all instead of only set amount(5), was about to drop items that are not stackable. Just wanted to know if it should work or if the function only supports stackable items? :)
/Stusse

Jimmy
06-12-2012, 02:35 AM
Great update, DarkstaR XenoBot undoubtedly is the best bot today.

p0pas
06-12-2012, 01:53 PM
Waiting for next update, DarkstaR gimmie some info abaut next update. Date or changelog :33333333333333

deasty
06-13-2012, 02:25 PM
How long until 9.54 update? Alot of noobs already beating me in new worlds... cant allow this, Plz update fast, ty

Ryangiggs
06-13-2012, 02:33 PM
How long until 9.54 update? Alot of noobs already beating me in new worlds... cant allow this, Plz update fast, ty

P.S. Do i get my days back for each day this isnt updated?
SHUT THE FUCK UP.
You should get all your days withdrawd fucking idiot...
they are working as hard as they can, wont go any faster if ppl like you keep making this idiotic posts.. wait and shut up or FUCK OFF

p0pas
06-13-2012, 02:41 PM
How long until 9.54 update? Alot of noobs already beating me in new worlds... cant allow this, Plz update fast, ty

P.S. Do i get my days back for each day this isnt updated?

DarkstaR - Ban him please!

deasty
06-13-2012, 02:49 PM
wow, what a rager, get a life man... trololol....
was asking cause i didnt see it anywhere on searches, that so fucking bad? look i can say fuck too!!! omg im great

frigzer
06-13-2012, 02:52 PM
need update

desche188
06-13-2012, 02:59 PM
DarkstaR - Ban him please!

why would DarkstaR ban someone for asking a question about the bot?
just because it has a statement at the end of it nmeans he should get banned?

p0pas
06-13-2012, 03:04 PM
why would DarkstaR ban someone for asking a question about the bot?
just because it has a statement at the end of it nmeans he should get banned?
becouse of his stupidy "P.S. Do i get my days back for each day this isnt updated?"

desche188
06-13-2012, 03:05 PM
no you dont get your days back if it isnt updated

maby if its like 5+ days he might add some time

deasty
06-13-2012, 03:12 PM
5 days? :<
thats a bit discouraging
hope it sback up and running before that xD

SomeKindOfMonster
06-13-2012, 07:16 PM
I'm having some issues, I keep uninstalling Xeno and reainstalling but the tibia client still isnt showing up in the xeno client when loaded, and yes theyre both being ran as admin

youonlyliveonce
06-13-2012, 07:19 PM
The bot hasn't updated yet. You're trying to run an old version of the bot.

Ninjahopparn
06-13-2012, 08:52 PM
Thought it would be updated now when the forum is back online. :p

Vendeliko
06-13-2012, 09:23 PM
Thought it would be updated now when the forum is back online. :p

Unfortunately aint and I cant skill overnight :(

Goml
06-13-2012, 09:25 PM
Unfortunately aint and I cant skill overnight :(

Same =/