PDA

View Full Version : [Tutorial] How to make full afk script.



biaggio12
06-11-2013, 11:35 AM
How to make full afk scripts

Tutorial by biaggio12

First of all, you have to answer a question. Do you really want to make full afk script, and can you spend some time on it. if you don`t, then turn off that page and head to Neant or other sellers. They scripts are awesome, really,
Second of all:
making script is 4-phase activity.
1. Choosing spot
2. Making Waypoints
3. Lua Scripting
4.Testing phase

So you really want to make full afk script. Well then let`s start. Answer a question what you would like to bot, which character, and then check if you have character.
All done? Fine, now login to tibia, load xenobot, and head to the spot you would like to hunt and now think about how would you like to run on hunting place.
I will use my 40 knight, to create script for magician tower north of thais.


You have to start with something so add label start.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1112_48_28_zpsad40a827.png
Now make waypoints all over the spot.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1112_51_35_zpsae90ef38.png
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1112_52_22_zpsc68af976.png
Because my monsters do not drop food i will add some other waypoints to kill wolfs.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1112_54_50_zps37ebc01a.png
Now im thinking hey, this is really small tower, i will add something more to kill but what if my lvl is too low ?
West of this tower is small elf camp. I will go there but only if in lua(later ill explain) will be set ElfHunt = true. On way to elfs there are few bears too.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1112_57_13_zpsce3693d8.png
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1112_58_28_zps00fa43db.png
North of tower is double hunter spawn. Why not ? Slingshot is nice item : ).
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1113_00_37_zps82271467.png
NOW IMPORTANT THING. YOU HAVE TO ADD ALTERNATIVE FOR CHOICE. EXAMPLE: You dont want to hunt elves so when you are going to check for it you have to add alternative not to hunt them.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1113_07_30_zps1342a406.png
You have to check your supplies, so...
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1113_12_06_zpsa6a73b71.png
You see labels out there ?

NoElfs
Check
Wait
Stand
wait(10000)
Leave
I did it that way because, if you choose not to hunt elfs, bot will skip to label NoElfs then bot will check your supplies and if you have enough of it bot will go to label Wait and will wait 10000 seconds then will go to label named Start and will go all over the tower again. I forget to put one more label after wait it should be called GotoStart so it would be like that

NoElfs
Check
Wait
Stand
wait(10000)
GotoStart
Leave

Now After leave label im setting way back to city.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1209_36_54_zpsbee5204d.png
You see those wpts from Leave to Enter City. Thats my way from spawn to town. I put label EnterCity and EnterDepo cuz i have in habit to name activities. Dunno why xd. but i think its a good thing. Once you are in depo, you have to add label to deposit money. "DepositCashafter that you have to add label to deposit items like i did "DepositItems". After depositing you have to reset your backpacks "ResetBPs" then you have to set way back to hunt. But you won`t go to hunt without potions right ? And you can`t buy potions without money so that`s why there is "WithdrawCash" Label.



After reseting backpacks i set my way to mana shop.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1118_52_13_zpsab540cb3.png
As it in my habit i have put label GotoManaShop, then i set waypoints to mana shop xd.
Once im near Xodet its necessary to put STAND waypoint.
http://i450.photobucket.com/albums/qq226/biaggio12/Screenshot-2013-06-1209_51_10_zpsaae4bab9.png
After stand, label "BuyManas" just to buy manas - simple. Next, label named "CheckSupp" is checking supplies if your refill is done or not. If its not then in lua later we will set that bot will come back to label named "EnterDepo" so bot will try to refill again. After that we just need to set our way back to hunting spot. Waypoints after "Gotospawn are way to spawn. After that your .xbst file is ready, and you can head to step 3 - LUA SCRIPTING.

HOW TO MAKE TARGETING (http://forums.xenobot.net/showthread.php?4382-XenoBOT-Beginning.) - BY FrogWT

biaggio12
06-11-2013, 11:36 AM
reserved Will finish when i have time

biaggio12
06-11-2013, 11:36 AM
reserved aaa

Kociii
06-11-2013, 11:52 AM
This is good ;)

biaggio12
06-11-2013, 02:10 PM
Thanks. I`ll try to finish it tommorow. If there is something that anyone do not understand just let me know

zxzero
06-11-2013, 02:14 PM
<3 I have been looking for something like this, I know how to do the waypoints but the .lua is what gets me. :/

biaggio12
06-11-2013, 04:34 PM
soon stay tuned for finishing :D

Bandido
06-11-2013, 08:54 PM
Looks pretty good. Hope you can teach us how to deposit the gold.

popit
06-11-2013, 11:31 PM
good tutorial you've made :D

Adky
06-12-2013, 05:32 AM
I planned to make a tutorial, but I got mad because I couldn't find the right words to express & explain myself so I scrapped the idea :P

Oh and a second Thais Magician Tower script, cheers :(

Nice tut though, good job

biaggio12
06-12-2013, 07:50 AM
Firs part of tutorial done. I hope you guys enjoy it.
Adky thanks :D
If there is anything that any of you do not understand please quote it ill try to explain with easier words : P

Zythox
06-12-2013, 08:36 AM
Nice tutorial mate, will help out a lot of people for sure!

biaggio12
06-12-2013, 05:09 PM
Thanks :D
200 !

Sure
06-12-2013, 06:21 PM
I have been w8 for something like this! Thank hou so much! Now the lua part gona be legendary! Haha
Hugs! :D

Infernal Bolt
06-12-2013, 06:44 PM
Standing exactly 10 seconds every time you are checking your supplies, why would you do that?

biaggio12
06-12-2013, 06:49 PM
It`s waiting for respawn. Not waiting for checking supplies.
ON label check if there are enough potions will go to label Wait, and wait for respawn, if not enough will go to label leave

Infernal Bolt
06-12-2013, 06:58 PM
It`s waiting for respawn. Not waiting for checking supplies.
ON label check if there are enough potions will go to label Wait, and wait for respawn, if not enough will go to label leave
why wait 10 sec to leave though?
just asking if there's a reason to have it there :D

biaggio12
06-12-2013, 07:23 PM
Its not waiting 10 sec to leave, it leaves immediately. It waits 10 sec if its not leaving :D

benjaminheinesen
06-13-2013, 01:38 AM
Awesome Post mate!
I'm deffinitely going to try and make my own when the .Lua part comes out ;)
If there was a Rep++ you would deffinitely get it ;)

robbinroxxor
02-28-2014, 02:33 PM
I dont understand the parth with potions refil. lets say i wanna refil when i have 30 mana potions, where do i write it then?

pudgybot
02-28-2014, 07:12 PM
Hey robbinroxxor !! If you are asking about leaving hunting area when you have 30 or less mana potions, then:

1: add a "local MinManaPot = 30" at the top of your lua (without quotes). This declares your minimum mana pots.
2: add a "local ManaPotID = 268" at the top with it as well (without quotes) . This declares what mana potion you are using. This example is a normal mana potion!
3: In your check label (the label used to decide if your leaving) add something like this:


if ((Self.ItemCount(ManaPotID) <= MinManaPot)) then
gotoLabel("Leave")
end

This will check if you have equal to or less than the mana pots you want, if you don't have enough, it will skip to Leave label in your script!


Hope this helped! Have a wonderful day!

These specific clips of code were taken from Mage Peninsula -2 by Biesje Team (Gave wrong props! Got my scripts mixed up sorry.)

Biesje Team
03-01-2014, 10:55 AM
Hey robbinroxxor !! If you are asking about leaving hunting area when you have 30 or less mana potions, then:

1: add a "local MinManaPot = 30" at the top of your lua (without quotes). This declares your minimum mana pots.
2: add a "local ManaPotID = 268" at the top with it as well (without quotes) . This declares what mana potion you are using. This example is a normal mana potion!
3: In your check label (the label used to decide if your leaving) add something like this:


if ((Self.ItemCount(ManaPotID) <= MinManaPot)) then
gotoLabel("Leave")
end

This will check if you have equal to or less than the mana pots you want, if you don't have enough, it will skip to Leave label in your script!


Hope this helped! Have a wonderful day!

These specific clips of code were taken from Mage Peninsula -2 by Biesje Team (Gave wrong props! Got my scripts mixed up sorry.)

Thanks for the props mate. :)

Happy weekend everyone,
Biesje Team

Blanz420
03-02-2014, 12:20 AM
Dope tut, jus missn the lua lol.

tonmage
05-26-2014, 12:52 AM
tengo el xeno que dura 3 dias y no puedo ingresar por mas que intento quien podria ayudarme? me aparece la parte donde sale user name and password no se que tengo que colocar ni que hacer alguien me podria ayudar por favorrrrr

Donatello
08-18-2014, 11:37 AM
Are you gonna do the .lua part? xD

robin
08-18-2014, 05:04 PM
Good tutorial to get started :)

Tibiano
11-25-2014, 03:50 PM
Can you keep going with the Tutorial bro? Looks perfect! :)

nichjeremy
01-20-2015, 11:46 AM
the first part looks easy. wheres the real stuff. the .lua thats what i dont understand

Dope
11-29-2015, 09:10 PM
Hi all,

Can somebody give me the .lua data

Big Thx Your Dope

germanzel
12-04-2015, 09:00 PM
Where is lua. scripts?

fafatax
09-23-2016, 02:41 AM
Goood

Igorscz2
12-02-2019, 09:24 PM
nice tutorial