This is an old revision of the document!
Map.HasID(ID, X, Y, Z) returns 1 if the position has the ID.
Map.UseOn(ID, OnID, X, Y, Z, Range) use one item on the ground ( samples: key in a door, fire bug in the silk wall ).
Map.Use(ID, X, Y, Z, Range) use a item in the ground ( samples: door, ladder ).
Map.Thrown(ID, Count, X, Y, Z) drops an item on the ground.
Map.PickUp(ID, Count, Container, X, Y, Z) pick up an item on the ground.
Map.PickUpEx(ID, Count, ContainerTo, X, Y, Z, Range) pick up an item on the ground to inside container on the cordinates X, Y and Z.
NPC.Buy(ID, Count, IgnoreCap) buy X (count) items of ID, IgnoreCap is a NPC propertie (1 to ignore, 0 to not ignore).
NPC.BuyInBP(ID, Count, IgnoreCap) NPC.Buy but buy items inside backpacks.
NPC.Sell(ID, Count) sell a item, if the count is -1 then you sell all the items from your backpacks.
NPC.Say(Text) send a message in the NPC channel.
Vip.Online(Name) returns 1 if the friend is online
Hotkey.Use(ID) use a item (sample: food)
Misc.Alert(Message) start a alarm with a custom message.
Misc.ShootCount(InLastSeconds) return the count of shoot missiles in you (sample: you received 5 sudden deaths in the last 2 seconds, if you use Misc.ShootCount(3) it will return 5)
Misc.AttackersCount(InLastSeconds) return the count of attacks received.
Misc.HPLose(InLastSeconds) returns the losen hp in the last seconds.
Misc.LoadUrl(Url) load a URL (advanced)
Misc.LogFile(File, Text) append a text to the file.
Misc.HPGain(InLastSeconds) returns the gained hp in the last seconds.
Misc.HPDelta(InLastSeconds) returns the delta of gained/losen hp in the last seconds.
Misc.HPHitsBigger(InLastSeconds, BiggerThan) returns the number of hits with damage higher than the BiggerThan.
Misc.StandTime returns the time you are in the same sqm.
Misc.ItemCount(ItemName) returns the item count (the item count is the one in hotkey messages, You are using one of xx health potions).
Misc.ItemCountEx(Item ID) returns the item count (the item count is the one in hotkey messages, You are using one of xx health potions).
BBot.TogglePause() activate/desactivate the BBot.
BBot.ToggleVisible() show/hide the BBot.
BBot.ToggleStats() show/hide Statistics.
BBot.LevelSpyReset() turns back to your floor.
BBot.LevelSpyUp() looks one floor up.
BBot.LevelSpyDown() looks one floor down.
Misc.SystemTime.Hour() returns system's clock hour.
Misc.SystemTime.Minute() returns system's clock minute.
Misc.SystemTime.Second() returns system's clock second.
Tibia.KeyDown(Key Decimal Value) returns 1 if the determined key is pressed. You can see all key codes here: Virtual Key Codes
Killer.Start() starts the Killer.
Killer.Stop() stops the Killer.
Trainer.Start() starts the Trainer.
Trainer.Stop() stops the Trainer.
Bot.Pause() Stops all modules of the bot
Bot.LoadSettings(Name) Loads a new configuration, ie a new script. No need to put the extension .bbot
HUD.Display(Text) display a HUD Text in the center of the screen.
HUD.Setup(Xpos of the text (1→Left, 2→Center or 3→Right), Ypos of the text (1→Top, 2→Middle or 3→Bottom), red color, blue color, green color).
Cavebot.Start() starts the cavebot.
Cavebot.Stop() stops the cavebot.
CaveBot.GoStart() makes the cavebot reset to the start of the script.
CaveBot.GoLabel(Label) makes the cavebot jump to a label inside the waypoint.
Macro.Wait(Delay) sleep the macro for a time.
Exit() exit a command group.
Self.Skill.Fist()
Self.Skill.Club()
Self.Skill.Axe()
Self.Skill.Sword()
Self.Skill.Distance()
Self.Skill.Shielding()
Self.Skill.Fishing()
returns the respective skill level.
Self.Skill.Fist%()
Self.Skill.Club%()
Self.Skill.Axe%()
Self.Skill.Sword%()
Self.Skill.Distance%()
Self.Skill.Shielding%()
Self.Skill.Fishing%()
returns the percent of the respective skill.
Self.MagicLevel() returns the magic level.
Self.MagicLevel%() returns the percent of your magic level.
Self.Inventory.RightHand()
Self.Inventory.LeftHand()
Self.Inventory.Legs()
Self.Inventory.Boots()
Self.Inventory.Ring()
Self.Inventory.Ammunition()
Self.Inventory.Helmet()
Self.Inventory.Amulet()
Self.Inventory.Backpack()
Self.Inventory.Armor()
return your inventory item ID.
Self.Inventory.Backpack.Count()
Self.Inventory.Armor.Count()
Self.Inventory.Amulet.Count()
Self.Inventory.Helmet.Count()
Self.Inventory.Ammunition.Count()
Self.Inventory.Ring.Count()
Self.Inventory.Boots.Count()
Self.Inventory.Legs.Count()
Self.Inventory.LeftHand.Count()
Self.Inventory.RightHand.Count()
Returns the amount of items that you have on the inventory slots.
Status.ManaShield() returns 1 if Magic/Mana shield is actived.
Status.Paralysis() returns 1 if you are Paralyzed.
Status.Haste() returns 1 if you are Hasted.
Status.Battle() returns 1 if you are with Battle (normal swords).
Status.Underwater() returns 1 if you are Underwater.
Status.Freezing() returns 1 if you are Freezing.
Status.Dazzled() returns 1 if you are Dazzled.
Status.Cursed() returns 1 if you are Cursed.
Status.Buff() returns 1 if you are Party Buffed.
Status.PZBlock() returns 1 if you are with Battle (red swords).
Status.InPZ() returns 1 if you are inside protection zone.
Status.NoLight() returns 1 if you are without any light.
Status.Poison() returns 1 if you are Poisoned.
Status.Fire() returns 1 if you are Burning.
Status.Energy() returns 1 if you are Energy.
Status.Drunk() returns 1 if you are Drunked.
Status.Invisible() returns 1 if you are Invisible.
Self.UnEquip.Legs(To Container)
Self.UnEquip.Boots(To Container)
Self.UnEquip.Ring(To Container)
Self.UnEquip.Ammo(To Container)
Self.UnEquip.Helmet(To Container)
Self.UnEquip.Amulet(To Container)
Self.UnEquip.Backpack(To Container)
Self.UnEquip.Armor(To Container)
Self.UnEquip.RightHand(To Container)
Self.UnEquip.LeftHand(To Container)
puts your inventory item in a container (0 is your main container).
Self.Equip.Legs(ID)
Self.Equip.Boots(ID)
Self.Equip.Ring(ID)
Self.Equip.Ammo(ID)
Self.Equip.Helmet(ID)
Self.Equip.Amulet(ID)
Self.Equip.Backpack(ID)
Self.Equip.Armor(ID)
Self.Equip.RightHand(ID)
Self.Equip.LeftHand(ID)
puts a item of your containers in your inventory.
Self.TurnN() turns your character to the North.
Self.TurnS() turns your character to the South.
Self.TurnE() turns your character to the East.
Self.TurnW() turns your character to the West.
Self.MoveTo(X, Y, Z) moves your character to the position.
Self.MoveN() moves your character one sqm to the north.
Self.MoveS() moves your character one sqm to the south.
Self.MoveE() moves your character one sqm to the east.
Self.MoveW() moves your character one sqm to the west.
Self.MoveNE() moves your character one sqm to the north-east.
Self.MoveNW() moves your character one sqm to the north-west.
Self.MoveSE() moves your character one sqm to the south-east.
Self.MoveSW() moves your character one sqm to the south-west.
Self.Stop() stops the attacking/following /walking.
Self.Say(Text) sends a message.
Self.Logout() makes your character logout only when no battle sign.
Self.Yell(Text) yell a message.
Self.PositionIn(X1, Y1, Z1, X2, Y2, Z2) returns 1 if your character is in the position square.
Self.Health() returns your HP.
Self.Health%() returns your HP in percent.
Self.HealthMax() returns your HP max.
Self.Mana() returns your Mana.
Self.Mana%() returns your Mana in percent.
Self.ManaMax() returns your ManaMax.
Self.StaminaMins() returns the stamina left in minutes.
Self.Stamina%() returns the stamina left in percents.
Self.Capacity() returns your capacity.
Self.Soul() returns your soul.
Self.Experience() returns your experience.
Self.ExpToNextLevel() returns the experience to the next level.
Self.X() returns your X position.
Self.Y() returns your Y position.
Self.Z() returns your Z position.
Self.Level() returns your Level.
Self.Level%() returns your Level percent.
Self.Attacking() returns 1 if your char is attacking.
Self.Mount() returns 1 if you are riding your mount.
Creature.ByName(Name) returns creature id by name.
Creature.Attacking() returns creature id by red square.
Creature.Target() returns creature id by red square.
Creature.Self() returns yourself id.
Creature.Health(ID) returns the creature id hp (in %).
Creature.Speed(ID) returns the creature id speed.
Creature.DistanceToSelf(ID) returns the distance from you
Creature.NameIn(ID, Name,Na..) returns 1 if the name of the creature is in the list.
Creature.ShootOn(ID, Ammo) shoot a item in the creature id (sample: Ammo '3155' shoots a sudden death).
Creature.X(ID) returns the X position of creature id.
Creature.Y(ID) returns the Y position of creature id.
Creature.Z(ID) returns the Z position of creature id.
Creature.IsPlayer(ID) returns 1 if the creature id is a player.
Creature.IsNPC(ID) returns 1 if the creature id is a player
Creature.Attack(ID) attack the creature id, returns 1 if attacked him
Creature.Follow(ID) follow the creature id, returns 1 if followed him
Creature.KeepDistance(ID, Distance) keep distance from creature id, returns 1 if you can, press “ESC” to stop.
Creature.KeepDiagonal(ID) keep diagonal from creature id, returns 1 if you can, press “ESC” to stop.
Creatures.Beside() returns the number of creatures beside (distance ⇐1).
Creatures.OnScreen() returns the number of the creatures in your screen.
Creatures.ByRange(Range) returns the number of creatures in a range.
Creatures.Killed(Name) returns the number of creatures killed by name.
Creatures.PlayersOnScreen() returns the number of players on screen.
Creatures.PlayersOnRange(Range) returns the number of players in a range.
Creatures.TaskKilled(Name) returns the number of creatures killed by name. You can use this with Full Check to complete tasks.
VarDiv(Name, Value) divides the variable by the value (x / value).
VarMult(Name, Value) multiplies the variable by the value (x * value).
VarAdd(Name, Value) adds to the variable the value (x + value).
VarSub(Name, Value) substract the value from the variable (x - value).
VarMod(Name, Value) mod (x mod value) gives the remainder from dividing. Eg: 5 mod 3 = 2; 5 mod 2 = 1.
To declare and assign values to Variables, do as follows:
cap:=50
sword_id:=7777
X:=Self.X
Explanation: