Log in

View Full Version : [Update] XenoBot v2.4.2



DarkstaR
05-05-2012, 03:26 PM
This update fixes some bugs which arose with the 9.53 update. Additionally, it adds two features which users have been waiting for: the ability to loot creatures as soon as they die and the ability to trade with NPC's.

Changelog:

v2.4.2
Fixed a bug which caused CTRL+F to freeze the client.
Fixed a bug in Special Areas which caused it to act up at times.
Fixed a few bugs which arose with the Scripter in the last update.
Fixed a bug which caused the Looter to ignore Water Elemental corpses.
Fixed a bug which left the Looter and Targeting parameter editors visible when enabling them via the new Context Menu check boxes.
Modified the Looter to take more time looting bodies, ensuring it doesn't miss anything.
Added "Loot First" and "Loot Last" options to the Looter. They work as follows:
Loot First: This is actual addition. Selecting this allows XenoBot to loot a bodies as soon as they appear instead of continuing to chase a mob.
Loot Last: This is the original way. Selecting this will make XenoBot wait until all opposing creatures are slain before continuing to loot bodies.
Added NPC Trading functionality to the Scripter. The new Lua functions are as follows:
Self.ShopSellItem(item, count)
Self.ShopBuyItem(item, count)
Documentation can be seen below.

NPC Trade Documentation:

The new NPC Trade functions can be invoked by passing either an itemID or an item name, and a count.


Self.SayToNpc({"Hi", "Trade"}, 65)
wait(900, 1200)
Self.ShopSellItem(285, 1)
wait(200, 500)
Self.ShopSellItem("chain armor", 1)
wait(200, 500)
Self.ShopBuyItem(266, 1)
wait(200, 500)
Self.ShopBuyItem("parcel", 1)

When invoking VIA item name, however, you need to be weary of alike names. Empty potion flasks, for instance, all share a common name and therefore trying to sell them by name can fail depending on which ones you are actually attempting to sell. For items which fall under this condition, use an item ID in order to execute these functions. Furthermore, like most other functions, XenoBot makes sure the action is possible and tells you if it has failed upon execution. If the function returns a value of 1, it has succeeded. If it returns a value of 0 then it has, for one reason or another, failed. Please note that the functions assume the trade window is already open.


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

Rexdale
05-05-2012, 03:32 PM
i love you.

jikoe
05-05-2012, 03:35 PM
is there maybe an option already "buyitemsupto? "

great job anyways!

Bushu
05-05-2012, 03:35 PM
wow!
is it possible to count how many pots you have, then withdraw that amount of money and buy these pots? or not?

kubax36
05-05-2012, 03:37 PM
Self.ShopBuyItem("parcel", 1)

It will buy upto 1 parcel or it will buy 1 parcel everytime when bot is in shop?

Y2Quake
05-05-2012, 03:41 PM
NPC TRADE. now yep, xeno is growing

Infernal Bolt
05-05-2012, 03:58 PM
Good Job Nick! :)

Stusse
05-05-2012, 04:04 PM
Fucking epic! Good job once again!

Delejon
05-05-2012, 04:13 PM
Good job! :)

Xongiver
05-05-2012, 04:23 PM
Awesome!

Sspanky
05-05-2012, 04:34 PM
Good stuff! thanks

curry
05-05-2012, 05:09 PM
you are my idol. forever loyal to xenobot _/ :)

Pnurt
05-05-2012, 05:19 PM
awesome, but how are we able to know how many pots to buy? or more correctly make the bot know how many pots to buy. exact amounts.

yeyu
05-05-2012, 05:56 PM
"Failed to conect to IWbemServices! [Result Code:0x080041001]" someone know what can be?

Infernal Bolt
05-05-2012, 06:06 PM
wow!
is it possible to count how many pots you have, then withdraw that amount of money and buy these pots? or not?

Lets say you have 64 manas and want to withdraw money for up to 200 manas you can do it like this:

Self.SayToNpc("withdraw " .. ((200-Self.ItemCount(268))*50))
200-64=136
136*50 = 6800

rikardo
05-05-2012, 06:19 PM
just need fish and skinning the monster ahah

sirmate
05-05-2012, 06:19 PM
Good job so far, waiting for option to close backpack function, open backpack not in new window ;)

Raphael
05-05-2012, 06:24 PM
Now we're getting somewhere.

Junnior
05-05-2012, 06:55 PM
NICE!! :D woke up to this shit, there is no better feeling right now xD

rikardo
05-05-2012, 06:55 PM
Lets say you have 64 manas and want to withdraw money for up to 200 manas you can do it like this:

Self.SayToNpc("withdraw " .. ((200-Self.ItemCount(268))*50))
200-64=136
136*50 = 6800


okej, it works but how can i buy all money get in mana potion ?
and how can i check the cap to buy rSpears in royal spears ?

stefps
05-05-2012, 06:59 PM
wohooo finally

LukeFisher
05-05-2012, 07:00 PM
great, minimizing backpacks is needed now

Raphael
05-05-2012, 07:01 PM
okej, it works but how can i buy all money get in mana potion ?
and how can i check the cap to buy rSpears in royal spears ?

Quit being such a newbie, rikardinho, and know you always have me.

DarkstaR
05-05-2012, 07:13 PM
"Failed to conect to IWbemServices! [Result Code:0x080041001]" someone know what can be?

Try this

http://networkadminkb.com/KB/a21/how-to-fix-wmi-error-0x80041001.aspx

rikardo
05-05-2012, 07:36 PM
Quit being such a newbie, rikardinho, and know you always have me.

thanks very much my little brother.
i'll ask u in msn

Sharri
05-05-2012, 07:49 PM
my dreamz comin' true ;D

<3 the update

LukeFisher
05-05-2012, 07:54 PM
Lool just noticed that the looter has been upgraded too, such a pleasant surprise, awesome update!

Mister Neo
05-05-2012, 08:08 PM
My special area still bugs, its walking back and forth between the special area's (targeting) while there is no monster and after 10 sec walker gets stuck.

XtrmJosh
05-05-2012, 08:19 PM
What position are you gonna do me in?

rikardo
05-05-2012, 08:30 PM
why with new xenobot i can move correct, i'm using
Self.DepositItems(236, {2871, 1})

and xenobot move it to backpack in deport slot 00
any1 have this bug ?

Junnior
05-05-2012, 08:43 PM
so this only buys 100 at a time? or can u buy up to lets say 1k manas? cant seem to figure that out.

XtrmJosh
05-05-2012, 09:01 PM
so this only buys 100 at a time? or can u buy up to lets say 1k manas? cant seem to figure that out.

Test it for yourself & find out, ain't so hard.

Luls
05-05-2012, 09:18 PM
It always seems that when I have a very long day/very shitty day at work, there's a Xeno update when I get home :D

Junnior
05-05-2012, 09:18 PM
Test it for yourself & find out, ain't so hard.
i did that why im asking xD

XtrmJosh
05-05-2012, 09:49 PM
i did that why im asking xD

Well if you tell it to buy 1000, what does it do? Just buy 100?

DarkstaR
05-05-2012, 10:21 PM
You cannot buy more than 100 items in the shop in Tibia in a single transaction, can you? No? Alright.

This is a bare trade function. If you need to buy 200 manas you buy 100 manas twice, just as you would in the manual trade window.

pungman
05-05-2012, 10:50 PM
You cannot buy more than 100 items in the shop in Tibia in a single transaction, can you? No? Alright.

This is a bare trade function. If you need to buy 200 manas you buy 100 manas twice, just as you would in the manual trade window.


Hahah so true lol

Junnior
05-06-2012, 12:02 AM
You cannot buy more than 100 items in the shop in Tibia in a single transaction, can you? No? Alright.

This is a bare trade function. If you need to buy 200 manas you buy 100 manas twice, just as you would in the manual trade window.


i know that lol, i was asking, if you could put like say 500 in the function and it would buy 500 :D thanks anyway

DarkstaR
05-06-2012, 01:20 AM
i know that lol, i was asking, if you could put like say 500 in the function and it would buy 500 :D thanks anyway

Um, that's the EXACT question I answered. Exact. Thanks anyway.

Raphael
05-06-2012, 01:22 AM
nvm...

Sharri
05-06-2012, 04:53 AM
Um, that's the EXACT question I answered. Exact. Thanks anyway.

Would be nice if that would get replaced with buyitemsupto instead or if there would be an alternative.

Syntax
05-06-2012, 05:26 AM
Not tested but cba to login to Tibia. Feel free to leech it.

local function buyAlotOfItemsBecauseItsSuchAGodDamnBigDeal(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

Junnior
05-06-2012, 05:30 AM
Um, that's the EXACT question I answered. Exact. Thanks anyway.

lool ok, nice job on update btw :D

Kelevra712
05-06-2012, 08:06 AM
Thanks DarkstaR

Hendy
05-06-2012, 11:42 AM
Thanks.

soul4soul
05-06-2012, 02:11 PM
nice update. hopefully Ill have time to test it out sometime this week. Now I can finish my scripts with those npc trade options.

rikardo
05-06-2012, 05:29 PM
any1 got problem with depositer in deport ?
all my script use the same script to deposit



elseif (labelName == 'deport') then
Self.DepositItems(9657, {2869, 1})
Self.DepositItems(9657, {7398, 2})
wait(2000)


and it deposit all in slot 00 in deport.
what script i should use to deposit right from now ?

Mister Neo
05-06-2012, 07:48 PM
Write
depot
instead of
deport

Should work.

Spectrus
05-06-2012, 08:12 PM
Write
depot
instead of
deport

Should work.

Not necessarily. That's the name of his label, as long as it matches in his waypoints it should be fine. The function was written by Syntax, maybe he can explain why it's not working.

Bazzolator
05-06-2012, 11:42 PM
Could some1 help me with this?

It sells 1 halberd and then it runs to next wpt >.<

Self.SayToNpc({"Hi", "Trade"}, 65)
sleep(math.random(700, 1400))
Self.ShopSellItem("halberd", 100)
sleep(math.random(700, 1400))
Self.ShopSellItem("plate armor", 100)
sleep(math.random(700, 1400))

DarkstaR
05-06-2012, 11:45 PM
Try pausing your cavebot.

Bazzolator
05-07-2012, 12:07 AM
Which is the code? too tired to search on the forums, just want my depositer done so I can go to sleep :u

sowwy for asking nub questions :d

Y2Quake
05-07-2012, 12:10 AM
453 people used xenobot today ;)

Infernal Bolt
05-07-2012, 12:50 PM
Which is the code? too tired to search on the forums, just want my depositer done so I can go to sleep :u

sowwy for asking nub questions :d


delayWalker(10000)
will delay the walker for 10 seconds.

this is my halberd&twohanded sword seller


delayWalker(10000)
Self.SayToNpc({"hi", "trade"}, 65)
wait(900, 1200)
Self.ShopSellItem(3269, Self.ItemCount(3269))
wait(900, 1200)
Self.ShopSellItem(3265, Self.ItemCount(3265))
wait(700, 1400)

Bazzolator
05-07-2012, 03:14 PM
delayWalker(10000)
will delay the walker for 10 seconds.

this is my halberd&twohanded sword seller


delayWalker(10000)
Self.SayToNpc({"hi", "trade"}, 65)
wait(900, 1200)
Self.ShopSellItem(3269, Self.ItemCount(3269))
wait(900, 1200)
Self.ShopSellItem(3265, Self.ItemCount(3265))
wait(700, 1400)


Thx! works great

SamuraiX
05-07-2012, 05:08 PM
Great Job DarkstaR !!!

Without wanting to be boring ... but the option to open the bodies only with the items listed would be amazing! :D


Thanks for all!

rikardo
05-08-2012, 01:41 AM
Great Job DarkstaR !!!

Without wanting to be boring ... but the option to open the bodies only with the items listed would be amazing! :D


Thanks for all!


it would be great

Syntax
05-11-2012, 06:58 PM
bump to keep newest version on top :P

Cyro
05-19-2012, 07:40 PM
Awesome.

Crown Royal
05-22-2012, 03:44 PM
Great Job DarkstaR !!!

Without wanting to be boring ... but the option to open the bodies only with the items listed would be amazing! :D


Thanks for all!

..I too have thought of this, would save time looting empty bodies, or bodies with only 20gold in them :P

Xankora
05-22-2012, 08:05 PM
Hello Darkstar. Do you have plans to add a multiple spell attacks (Ex. exori frigo & exori gran frigo) to the targeting, I was unable to find a script for it with the search function.

Thank you,
Xank