Introduction

First of all, you should understand what are some DEFAULT VALUES here:

onGmPause is default since version 11.8 or something
the default MS is 300.
setFollow is defualt
setAny is default
setRetryAttacks is default
Priority of setmeleekill is 0
stackItems, bot will do this by itself, on special occasions will you need to use this

Just in case, here are some important DEFINITIONS:

Integer a NUMBER that with a range of smaller range
Long a NUMBER with a larger range then integer
String usually a sentence/word

Ok, now we can start with the main chapters:

Chapter I: Special Kills

Ok, the first section is the exori vis/mort rune kill section, as its almost useless now because of the setspell kill section but there are STILL some things here wich are very important, lets have a look!

setExoriVis monstername,
this will enter a command into the script telling your bot to go infront of the monster, face it and cast exori vis, this also applies to setExoriMort!

setSDKill monstername This will enter a command into the script to tell your bot to SD kill a monster of your choice, this is usually used when you are getting luired on frequently.

setAvoidFront monstername One of my favourites and a VERY usefull one at that. the set avoid front. this will enter a command keeping you diagonal to the monster to avoid fire waves etc (amazing for hunting dragons!)

onGMcloseConnection I cannot recomment this AT ALL, and infact it is now IGNORED by the bot for tibia 8.11 as its almost promising to get you banned by a gm, what this does is if your bot sees a GM pop onto your screen it closes your connection (GMs no longer fall for the excuse of you got kicked, and will ban you)

onTrapGiveAlarm When your bot becomes trapped or stuck between going to different waypoints the bot will give the every so annoying (but lovely) alarm. usefull in non pvp worlds were anti botter people trap you in larva caves (usually) - so annoying

Chapter II: Basic Commands

The basic commands for any good script:

setMeleeKill monstername
Now most of you know what this does (and i really hope you do) but since this is a thread forr n00bs ill tell you this tells the bot to attack the monster of your choice (default larva altho if its left blank its nothing )
setHmmKill
Just like the setSDKill in Special kills group but this time it shoots a hmm at monsters of your choice, I recommend using this for deeper tomb scripts (because of stalkers)
SetLoot itemID
just to let you guys know, d7 0b = Gold always enter that one!!! to find different item ids you can goto the tools tutorial! there you will find out how!
onDangerGoto integer when you are attacked or in any kind of danger it will goto the script line of your choice. this is usually used in more advanced scripts!
onGMPause DO NOT, I REPEAT, DO NOT make a script WITHOUT this command, this command makes your script look like you kind of know what your doing, if not selected the bot will keep auto hunting when a gm comes = ban!
onPlayerPause- same thing as the above command but this one does NOT pause healing! it can be a life saver, This is rarely used on scripts, i never use it.
setVeryFriendly Ok this command makes your bot ONLY attack things that attack YOU when another player is on the screen, simple.
setRetryAttacksNow I have never used this but lets use some common sense, im going to say it will retry to attack the monster if it couldnt the first try - this is implemented without being put into the script (default)
setDontRetryAttacks Ok, exact opposite of last one! sorry but detail simply isnt needed, although I would use this on non pvp since people summon what your killing, bot would try to attack it and fail although keep retrying!
setPriority monstername = integer
I love this one and I use it alot, expecially for turtles (Get those stupid spamming toads before they do to much damage)

Example:
ALL monsters on setmeleekill have a default priority of 0
now using this command wiill highten the priority, the higher the priority the more the bot wants to kill
setpriority necromancer +1
setpriority toad +2
setpriority webber +3
Ok lets imagine you go down a hole and OMG theres like 4 toads! and 2 necromancers and 1 webber () the bot will go kill the webber kill the toads THEN the necromancer, if its trapped trying to get one of the toads and your trapped by a necromancer, no worries! bot will kill the necromancer then the toad!

Chapter III: The on and offs

Ok now for the next bunch of buttons <3

setAny
This command tells the bot to kill any creature its told to (defined by setmeleekill) screw other peoples experience because its mine now!
setFriendly
this will attack anything NOT attacking another player while that player is on your screen, recommended, but not default
setFollow
follows the monster defined by setmeleekill, it IS defualt
setLootOn
Will loot all items it is told to (defined by setLoot)
setLootOff
wont even open the bodies, great for wasp hunting before honeycombs were introduced
setNoFollow
this makes the cavebot kinda similar to ng, using this will make the bot NOT follow the monster (but why?) i dont see the reason, but who knows!

Chapter IV: Action commands

move <current x,y,z>
Thiss command will move you to your current Position, but it gets better, theres a command you can say INGAME for this! no need to toggle in between windows, exiva addmove will add a move line to your script
useItem <current x,y,z>
this will use the item in your arrow slot on the current position your in, say you want your bot to cut grass with a machete? first cut the grass, stand where it was and add this line into your bot, not when the bot gets here it will use the machete on the grass!
fishX integer
this will fish the amount of times you want to replace 0 with 10~ or 100 it doesnt matter
closeConnection
this will close your connection, its good if you want your bot to goto dp change gold or whatever then logout, thats what its mainly used for
WaitX integer
when the bot hits this line, it will wait for X seconds then continue after that is done
stackItems
this is rarely used, but it will stack all stackable items in your open containers into the least amount of piles possible
resetLoot
after your bot reaches this line, it will now define your loot as NOTHING, so if you want to change what your bot loots midway use this, this command is usually used when putting loot into dp, but keeping gold

example:
setloot d7 0b
setloot d9 0d <no idea what that is
resetloot
setloot d9 0d
putlooton depot
resetloot
d7 0b
d8 0d

This script will put ONLY item "d9 0d" into your depot then switch back to looting both
ResetKill
this will redefine setmelee kill / sethmmkill all back to nothing, use this how you want to, ive never used it
sayMessage string
when the bot hits this line it will say a message into defualt channel saying whatever you put into the textbox
fastExiva string
sorry but im going to have to be vague on this one!
this processes a exiva command then instantly jumps to the next line
putLootOnDepot
this puts all your loot into your locker, always used in depositer scripts its a great function and is now used more then it ever was!
dropLootOnGround
this is great for money maker scripts like tombs, it will drop your loot where you currently are! then continue on, if you leave it going you wont have to run a deposit script (wich will obviously take more time) but be warned theifs love when you run this on your script!

Chapter V: Variables

it starts getting a little advanced here

ifTrue( [Variable] [operator] [integer] ) Goto integer
Oh god, this looks tuff, but lets break this down!
iftrue, well im not going to bother with that one,
Variable: in blackd there is MANY integer such as mymana, variables are defined with "$" on either side "$mymana$" for a complete set of variables goto the events section!
Operator: "<" ">" "=" "<=" ">=" "<>"
In order, Smaller then, Greater then, equal to, equal or smaller then, Greater or equal to, Not equal to
integer: a number of the variable (this will make sense in a couple seconds)
Goto integer: if all is true then goto line number X (number)

example: ifTrue ( $mymana >= 25 )Goto 5
this will make my bot jump to line 5 if my mana is greater than 25!

Ok dont worry, that was the hardest one!

gotoScriptLine integer
this will make your bot goto the chosen script line if this isnt at the end of your script your script will end
IfEnoughItemsGoto [itemid] [integer] [integer]
Ok this is simple! if you have so many items or more it will goto the defined scriptline

example: IfEnoughItemsGoto d7 0b 1000 4
this will make your bot goto scriptline 4 when you get 1000 gold peices (10 piles of gold)
this used to be used for depositer scripts until the ifTrue command came out!

ifFewitemsgoto [itemid] [integer] [integer]
also because of ifTrue command, this command is rarely ever used its exactly the same as IfEnoughItems, just opposite, instead of using these 2 options, get used to using the IfTrue command!

Comment (#)
Not really needed, it is usually used just to let the people using your script know what its doing at that section (advanced scripters will use this for that exact reason)

Label( : )
Ahh, now heres one i like, we used to have to find exactly wich line to jump to, but now because of this, we dont! just replace the integer with the label name! (i think, il have to be reassured of this because i dont use this... im old school )

Chapter VI: Other things

Execute 1 line each [integer] ms change
the default to this is 300MS 0.3 of a second, wich is fast, if you are having problems talking to friends ingame, try raising this to 500~, i use 550 just because of this reason! (this is located at the top in the middle)

Cavebot global settings (located in the middle to the right)

Change autoheal at pk to %
Self exlanatory, if you get attacked by something not set as meleekill or on your runemaker list then your cavebot will make you heal at a different %
HP for exori vis and Runes

I THINK, this will change the minimun health you have to have to make runes/cast exori vis
Allow reposition at start
Sorry guys I dont no what this does

Try alternative path/Kill the monsters when you have been blocked more then [long]
If you are getting blocked by killable monsters (although not defined by setmeleekill) then this will find a different path and use it
next option will kill the monster when you have been blocked by the monster for a time (in ms 1 second = 1000 ms) default 100 seconds :O

Allow looting when a person is near
ever since tibia 8.0? was introduced you cannot loot other peoples monsters, so just leave this on, i wont bother explain it

Chapter VII: Loading scripts

Ok guys were on the home stretch!! and its the easiest part

Char: dropdownlist
In this you will find your char name on the drop down list so select the character your using before continuing with anything!

Listbox

The great listbox, this shows the script your running/working on! what a life saver this is

edit current lime ()

First select a line from the list box, now you can edit it in ANY way or even delete it using the command below

File dropdownlist

This will find all text files in your blackd folder (the main folder) this is used to save/load your scripts to make a new one, put a name of it followed by .txt (THAT IS VERY IMPORTANT) and press save/load now you can star working on your script

Update file list

if you have the bot loaded then added more scripts press this to update the list to include all the current files in the blackd file!

Thanks for reading!