Elf Variables
Elf Variables
example: if [$mp <= 200] mana self, it will use a mana potion if your mana is under 200
・ $screenleft it will return you the correct number to position a text in the left
part of screen.
example: auto 200 setpos $screenleft 100 | displaytext 'Testing the position', it will show the text: 'Testing the position' on the
X coordinates in the left part of Tibia screen and in Y coordinates in the pixel 100
・ $screenright it will return you the correct number to position a text in the
right part of screen.
example: auto 200 setpos $screenright 100 | displaytext 'Testing the position', it will show the text: 'Testing the position' on the
X coordinates in the right part of Tibia screen and in Y coordinates in the pixel 100
・ $screentop it will return you the correct number to position a text in the top
part of screen.
example: auto 200 setpos 256 [$screentop+200] | displaytext 'Testing the position', it will show the text: 'Testing the position'
on the X coordinates in the pixel 256 of Tibia screen and in Y coordinates in the top part and more 200 pixels below
・ $deltatime will return how long since you loaded the bot (in seconds)
example: setcaption 'Played this session: $deltatime', it will show in the window title: 'Played this session: TIMEINSECONDS'
・ $deltatimems will return how long since you loaded the bot (in
miliseconds)
example: setcaption 'Played this session: $deltatimems', it will show in the window title: 'Played this session:
TIMEINMILISECONDS'
・ $exptnl will return how much experience left for your next level
example: setcaption 'Exp Left: $exptnl', it will show in the window title the text: 'Exp Left: EXPERIENCETONEXTLEVEL'
・ $expgained will return how much experience you gained since you loaded
the ElfBot
example: setcaption 'Exp Left: $exptnl / Exp/Hour: $exph' / Gained this session: $expgained, it will show in the window title the
text: 'Exp Left: EXPERIENCETONEXTLEVEL / Exp/Hour: EXPERIENCEPERHOUR / Gained this session: EXPERIENCEYOUGAINED'
・ $timetnl will return you how long would you take to level up with your
current experience/hour
example: setcaption 'Exp Left: $exptnl / Exp/Hour: $exph' / Gained this session: $expgained / Time Left: $timetnl, it will show
in the window title the text: 'Exp Left: EXPERIENCETONEXTLEVEL / Exp/Hour: EXPERIENCEPERHOUR / Gained this session:
EXPERIENCEYOUGAINED / Time Left: TIMELEFTFORLEVEL'
・ $timetolevel.xx will return how long would you take to level to XX level
with your current experience/hour
example: setcaption 'Time to Level 100: $timetolevel.100', it will show in the window title the text: 'Time to Level 100:
TIMETOLEVEL100'
・ $playersaround.xx will return you how many players are around XX SQMs
around you
example: if [$playersaround.4 == 0] say Exori Mas, it will make you cast 'Exori Mas' if there aren't any players around you in a
range of 4 SQMs
・ $sbtime will return how much time of soft boots you still have (you must
look the soft boots first)
example: setcaption 'Soft Boots Time: $formattime.$sbtime', it will show in the window title: 'Soft Boots Time: SOFTTIME'
・ $poisondmg will return how much of damage you are recieving from the
poison
example: if [$poisondmg > 10] say 'Exana Pox], it will say 'Exana Pox' if the poison damage is higher than 10
・ $ringslot.property will return the ID or COUNT of the item in the ring slot
・ $beltslot.property will return the ID or COUNT of the item in the belt
(ammunition) slot
・ $backslot.property will return the ID or COUNT of the item in the
backpack slot
・ $rhandslot.property will return the ID or COUNT of the item in the right
hand slot
・ $lhandslot.property will return the ID or COUNT of the item in the left
hand slot
・ $amuletslot.property will return the ID or COUNT of the item in the
amulet slot
・ $bootsslot.property will return the ID or COUNT of the item in the boots
slot
・ $legsslot.property will return the ID or COUNT of the item in the legs slot
・ $chestslot.property will return the ID or COUNT of the item in the chest
(armor) slot
These are the properties the slot variables can have.
count -> it will return the amount of items that are in the desired slot.
example: if [$beltslot.count < 20] refillammo, it will refill the ammunition if you have less than 20 items in the left hand
id -> it will return the number ID of the item that are in the desired slot.
example: if [$lhandslot.id != 1234] equiplhand 1234, it will equip the left hand with a 1234 if there isn't a 1234 equiped
・ $mshieldtime, will return the time left in miliseconds to your magic shield
goes out
example: if [$mshieldtime <= 8000] say 'Utamo Vita', it will make you cast 'Utamo Vita' if your magic shield is going out in less
than 8 seconds
・ $hastetime, will return the time left in miliseconds to your haste goes out
example: if [$hastetime <= 2000] say 'Utani Gran Hur', it will make you cast 'Utani Gran Hur' if your haste is going out in less
than 2 seconds
・ $invistime, will return the time left in miliseconds to your invisible goes out
example: if [$invistime <= 5000] say 'Utana Vid', it will make you cast 'Utana Vid' if your invisible is going out in less than 5
seconds
・ $strengthtime, will return the time left in miliseconds to your strenght goes
out
example: if [$strengthtime <= 1500] say 'Utito Tempo', it will make you cast 'Utito Tempo' if your strenthen is going out in less
than 1.5 seconds
・ $dmgs, will return the amount of damage you recieved last second
example: if [$dmgs >= 500] set $spell 'Exura Vita', it will make set the variable $spell to 'Exura Vita' if you recieved more than
500 of damage last second
・ $idlerecvtime, it will return the amount of time elapsed since the server
has sent any information in milliseconds
example: if [$idlerecvtime >= 5000] playsound freezed.wav, it will play the sound 'freezed.wav' if you freezed for more than 5
seconds
・ $standtime, it will return the amount of time you have been standing in the
same place in milliseconds
example: if [$standtime >= 45000] playsound playeronscreen.wav, it will play the sound 'playeronscreen.wav' if you are in the
same SQM for more than 45 seconds
・ $battlesign, it will return 1 if you are battle signed, and 0 if you are not
example: ifnot $battlesign logout, it will make you logout if you aren't PZ locked.
・ $redbattlesign, it will return 1 if you are red battle signed, and 0 if you are
not
example: ifnot $redbattlesign logout, it will make you logout if you aren't PvP PZ locked.
・ $inpz, it will return 1 if you are inside a protection zone, and 0 if you are not
example: if $inpz xlog, it will make you logout if you are inside a pz zone.
・ $rand.x.y will return a random number from x to y, or just $rand.x for one
from 0 to x
example: auto 100 tradesay 'sell knight armor' | wait [($rand.200.350)*1000], it will say in the Trade Channel: "sell knight
armor", and after a random time from 200 to 350 seconds it will say it again
・ $synctime will return the time in milliseconds left for a sync shot if one is in
progress.
example: ifnot $synctime sd target, it will shoot a sudden death rune on your target only if a sync shot order isn't in progress
・ $navion will return 1 if you are connected to the navigation and 0 if not.
example: auto 100 if $navion listas 'Connected to the navigation', if you are connected to the navigation it will show on the
hotkeys activated list the message 'Connected to the navigation'.
・ $exectime will return the time in miliseconds that the bot took to execute
all the hotkeys + some other important bot functionality. This will increase as
you are running more hotkeys. This is updated 10 times per second, and
shouldn't become over 100ms.
example: auto 100 setcaption 'Exec Time: $exectime', it will show on your Tibia window the time needed to execute the bot
functions.
・ $lastdmgtype it will return the type of the last damage you recieved
example: auto 100 if [$lastdmgtype == 30 && $lastdmg > 50 && $poisoned] {say 'Exana Pox' | wait 900}, it will make you cast
'Exana Pox' if the last damage you recieved was of poison type, and you are poisoned and it was higher than 50.
・ $lastdmgername it will the name of the creature that has last attacked
you. This is the name taken from the message "You lose xxx hitpoints due to an
attack by mmmm"
example: auto 100 if [$screencount."Stalker" == 0 && $lastdmgtime < 300 && $lastdmgername == "Stalker"] {useoncreature
3191 self | wait 300}, it will shoot a great fireball rune on yourself if you was damaged by a stalker in the last 300 miliseconds
and there are no stalkers visible on your screen.
・ $lastdmgtime it will return the time since you were last attacked by a
creature in miliseconds.
example: auto 100 if [$screencount."Warlock" == 0 && $lastdmgtime < 300 && $lastdmgername == "Warlock"]
{useoncreature 3175 self | wait 300}, it will shoot a stoneshower rune on yourself if you was damaged by a warlock in the last
300 miliseconds and there are no warlocks visible on your screen.
・ $key.id it will return if you're holding some key. More information about the keys on the end
of this article
example: if [$key.68] countitems 3031 | else statusmessage "You must hold the 'D' Key.", it will count the gold coins if you're
holding the key of ID 68 (D Key) and will send the statusmessage "You must hold the 'D' Key" if you're not holding the key of
ID 68 (D Key).
You can use your personal variable, using foreach command (allcreatures,
allplayers, allmonsters, floorcreatures, floorplayers, floormonsters, screencreatures, screenplayers,
screenmonsters, shootablecreatures, shootableplayers, shootablemonsters). Or the internal
variables listed below.
・ $self.property, it will check something about you
・ $target.property, it will check something about your target
・ $followed.property, it will check something of your current followed player
・ $attacked.property, it will check something of the creature that has
currently red box around it
・ $attacker.property, it will check something of the last creature that has
attacked you
・ $pk.property, it will check something of the last player that attacked you
that the bot has chosen
・ $lastdmger.property, it will check something of the last creature that
made a damage on you
・ $pattacker.property, it will check something of the last player that has
attacked you (same as $pk.property)
・ $mttacker.property, it will check something of the last monster that has
has attacked you
・ $enemy.property, it will check something of the best enemy that the bot
has chosen
・ $friend.property, it will check something of the best friend that the bot has
chosen
・ $subenemy.property, it will check something of the best sub-enemy that
the bot has chosen
・ $subfriend.property, it will check something of the best sub-friend that
the bot has chosen
・ $anyenemy.property, it will check something of the best enemy that the
bot has chosen, if none than the best sub-enemy
・ $anyfriend.property, it will check something of the best enemy that the
bot has chosen, if none than the best sub-friend
・ $coretarget.property, it will check something of the best valid target that
the core aimbot subsystem of the bot has chosen
・ $triggertarget.property, it will check something of the best valid target
that the trigger aimbot subsystem has chosen (only if shot commands have
been issued and a target is valid)
・ $autoaimtarget.property, it will check something of the best target that
both aimbot subsystems combined have chosen. This is simply the triggertarget
if valid, otherwise it is the coretarget.
Or you can select whoever you want setting someone trought the
variables below
・ $creature.name, it will check for a creature on your screen that has the
name 'name', and then you can hold the informations in another variable, for
example: auto 100 set $j $creature.'Bubble'
・ $mostexposed.'targetgroup', it will check for every enemy on your
screen, and then choose the one that more friends of you can shoot it, the
target group can be: sorcerer/druid/knight/paladin/mage/nonmage. And then
you hold the informations in another variable, for example: auto 100 set $i
$mostexposed.'mage'
・ $mostshot.'targetgroup', it will check for the creature that has recieved
most sudden death rune shots in the last two seconds, the target group can be:
enemy/subenemy/friend/subfriend, if you want to specify a vocation also, you
can append a space and one of the following:
sorcerer/druid/knight/paladin/mage/nonmage. And then you hold the
informations in another variable, for example: auto 100 set $i
$mostshot.'enemy mage'
These creature variables have some properties
name -> will return the name of someone, for example: $target.name will
return your target's name
id -> will return the ID of someone, for example: $enemy.id will return your
best enemy's ID
posx -> will return the posx of someone, for example: $friend.posx will return
your best friend's posx
posy -> will return the posy of someone, for example: $friend.posy will return
your best friend's posy
posz -> will return the posz of someone, for example: $friend.posz will return
your best friend's posz
dir -> will return the direction that someone is facing (check the end of this
thread for more information), for example: $self.dir will return your own
direction number
isonnavi -> will return 1 if someone is connected to the navigation, and 0 if not,
for example: $friend.isonnavi will return 1 if the best friend chosen by the bot is
connected to the navigation server, and 0 if not
outfit -> will return the outfit number of someone, for example:
$subenemy.outfit will return your best sub-enemy's outfit number
speed -> will return the speed of someone, for example: $anyenemy.speed will
return your best enemy (or best sub-enemy)'s speed
skull -> will return the skull type of someone (check the end of this thread for
more information), for example: $self.skull will return your own skull type
party -> will return the party icon of someone is in a party (check the end of
this thread for more information), and 0 if not on party, for example:
$self.party will return 4 if you are in the leader of a party
warbanner -> will return the war banner of someone (check the end of this
thread for more information), and 0 if not on a guild war, for example:
$target.warbanner will return 2 if your target is a guild enemy
isenemy -> will return 1 if someone is an enemy, and 0 if not, for example:
$target.isenemy will return 1 if your current target is an enemy, and 0 if not
isfriend -> will return 1 if someone is a friend, and 0 if not, for example:
$target.isfriend will return 1 if your current target is a friend, and 0 if not
isleader -> will return 1 if someone is a combo leader listed in Aimbot dialog,
and 0 if not, for example: $target.isleader will return 1 if your current target is
a leader, and 0 if not
distx -> will return how many sqms to the west or east someone is from you,
$target.distx will return how many sqms to the west or east your target is from
you
disty -> will return how many sqms to the north or south someone is from you,
$target.disty will return how many sqms to the north or south your target is
from you
distance -> will return the highest number of .distx and .disty, $target.distance
will return how many sqms a target is from you
isnpc -> will return 1 if someone is a npc, 0 if not, $followed.isnpc will return 1
if your current followed is a npc, 0 if not
isonscreen -> will return 1 if someone is on the same floor as you and on the
visible portion of the screen, 0 if not, $followed.ismonster will return 1 if your
current followed is on your screen, 0 if not
color2 -> will return the primary color's number of someone, $self.color2 will
return yours primary color's number, 0 if not
color3 -> will return the secondary color's number of someone, $self.color3 will
return yours secondary color's number, 0 if not
color4 -> will return the detail color's number of someone, $self.color4 will
return yours detail color's number, 0 if not
canshoot.'name' -> will return 1 if someone can shoot the creature 'name',
$friend.canshoot.'Bubble' will return 1 if your best friend can shoot 'Bubble', 0 if
not
exposedcount -> will return how many friends/yourself can shoot someone,
$coretarget.exposedcount will return how many friends + you can shoot the
coretarget
shotcount -> will return how many sudden death runes someone has recieved
on the last 2 seconds, $self.shotcount will return how many sudden death runes
you have recieved on the last two seconds
Also, there will be some exclusive variables if the bot managed to get
a look at the player, it will have the 'haslookinfo' property set. You
should verify that it's set before using the below fields:
haslookinfo -> will return 1 if player has the below properties available: if
[$target.haslookinfo && $target.hp < 400] sd $target.id (since $target.hp is
only available if $target.haslookinfo is set. Otherwise, $target.hp would return 0
and the alone condition $target.hp < 400 would be true!)
guild -> will return someone's guild, for example: $target.guild will return your
target's guild
level -> will return someone's level, for example: $enemy.level will return the
best enemy's level
voc -> will return someone's vocation (short), for example: $pattacker.voc will
return the current player attacking you's vocation (like NV, D, S, P, K, ED, MS,
RP, EK)
vocation -> will return someone's vocation (long), for example:
$attacked.vocation will return the attacked player's vocation (like No Vocation,
Druid, Sorcerer, Paladin, Knight, Elder Druid, Master Sorcerer, Royal Paladin,
Elite Knight)
isknight -> will return 1 if someone is a knight, and 0 if not, for example:
$target.isknight will return 1 if your current target is a knight, and 0 if not
ispaladin -> will return 1 if someone is a paladin, and 0 if not, for example:
$target.ispaladin will return 1 if your current target is a paladin, and 0 if not
issorcerer -> will return 1 if someone is a sorcerer, and 0 if not, for example:
$target.issorcerer will return 1 if your current target is a sorcerer, and 0 if not
isdruid -> will return 1 if someone is a druid, and 0 if not, for example:
$target.isdruid will return 1 if your current target is a druid, and 0 if not
ismage -> will return 1 if someone is a druid or a sorcerer, and 0 if not, for
example: $followed.ismage will return 1 if the current followed player is a
mage, 0 if not
maxhp -> will return someone's max hp, for example: $friend.maxhp will return
the best friend's max hp
hp -> will return someone's current hp, for example: $friend.hp will return the
best friend's current hp
maxmp -> will return someone's max mp, for example: $subenemy.maxmp will
return the best sub-enemy's maxmp
mp -> will return someone's max hp, for example: $subenemy.mp will return
the best sub-enemy's current mp
attackedme -> will return 1 if someone attacked you, and 0 if not, for example:
$friend.attackedme will return 1 if the best friend attacked you, and 0 if not
Equalities
If an equality is equal to 0, means it's not true, if it's equal to 1, means it's true
example: if [$connected == 0] reconnect, it will make you reconnect if you are not connected
Skull Types:
No Skull -> 0
Yellow Skull -> 1
Green Skull -> 2
White Skull -> 3
Red Skull -> 4
Black Skull -> 5
Party Types:
No Party -> 0
Inviting (Leader Yellow) -> 1
Inviting (Member Blue) -> 2
on Party (Member Blue) -> 3
on Party (Leader Yellow) -> 4
Exp Sharing, working (Member Blue) -> 5
Exp Sharing, working (Leader Yellow) -> 6
Exp Sharing, on standby (Member Blue) -> 7
Exp Sharing, on standby (Leader Yellow) -> 8
Exp Sharing, not working (Member Blue) -> 9
Exp Sharing, not working (Leader Yellow) -> 10
Direction Types:
North -> 0
East -> 1
South -> 2
West -> 3