User Tools

Site Tools


macros_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
macros_commands [2013/09/07 19:53]
kimoszin [Creatures]
macros_commands [2017/03/08 17:59]
megano0body
Line 1: Line 1:
-====== Macros Commands ======+====== Macro Commands ======
  
-===== Map =====+===== Creating Variables =====
  
-**Map.HasID**(//ID, X, Y, Z//) returns 1 if the position has the ID.+To create variables you must use the following syntax:
  
-**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 ).+**VariableName** := //DefaultValue//
  
-**Map.Use**(//ID, X, Y, Z, Range//) use a item in the ground ( samplesdoor, ladder ).+Example:
  
-**Map.Thrown**(//ID, Count, X, Y, Z//) drops an item on the ground.+**HP**:=//Self.Health()//
  
-**Map.PickUp**(//ID, Count, Container, X, Y, Z//) pick up an item on the ground.+**MagicNumber**:=//3529//
  
-**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. +===== Using Variables =====
-===== NPC =====+
  
-**NPC.Buy**(//ID, Count, IgnoreCap//) buy X (count) items of IDIgnoreCap is NPC propertie (1 to ignore, 0 to not ignore).+You can use the variables in many places of the BBotto use variable use this syntax:
  
-**NPC.BuyInBP**(//ID, Count, IgnoreCap//) NPC.Buy but buy items inside backpacks.+**!**//VariableName//**!**
  
-**NPC.Sell**(//ID, Count//) sell a item, if the count is -1 then you sell all the items from your backpacks.+Self.Say(**!**//HP//**!**)
  
-**NPC.Say**(//Text//) send a message in the NPC channel.+SecondMagicNumber:=**!**//MagicNumber//**!**
  
-===== VIP =====+Variables can be used in the FullCheck and some other features of the BBot.
  
-**Vip.Online**(//Name//) returns 1 if the friend is online+===== Internals =====
  
-===== Hotkeys =====+**Exit**//()// Stop the macro execution
  
-**Hotkey.Use**(//ID//) use item (sample: food)+**Label**//(Name)// Go to Label
  
-===== Misc =====+**VarAdd**//(Name, Value)// Increase the variable value by a given value
  
-**Misc.Alert**(//Message//) start a alarm with custom message.+**Inc**//(Name, Value)// Increase the variable value by given value
  
-**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)+**VarSub**//(Name, Value)// Decrease the variable value by a given value
  
-**Misc.AttackersCount**(//InLastSeconds//) return the count of attacks received.+**Dec**//(Name, Value)// Decrease the variable value by a given value
  
-**Misc.HPLose**(//InLastSeconds//) returns the losen hp in the last seconds.+**VarMult**//(Name, Value)// Multiplies the variable value by the given value
  
-**Misc.LoadUrl**(//Url//) load a URL (advanced)+**Mult**//(Name, Value)// Multiplies the variable value by the given value
  
-**Misc.LogFile**(//FileText//) append a text to the file.+**VarDiv**//(NameValue)// Divides the variable value by the given value
  
-**Misc.HPGain**(//InLastSeconds//) returns the gained hp in the last seconds.+**Div**//(Name, Value)// Divides the variable value by the given value
  
-**Misc.HPDelta**(//InLastSeconds//) returns the delta of gained/losen hp in the last seconds.+**VarMod**//(Name, Value)// Returns the modulos remainder of the Variable by the Value
  
-**Misc.HPHitsBigger**(//InLastSecondsBiggerThan//) returns the number of hits with damage higher than the BiggerThan.+**Mod**//(NameValue)// Returns the modulos remainder of the Variable by the Value
  
-**Misc.StandTime** returns the time you are in the same sqm.+===== Player State =====
  
-**Misc.ItemCount**(//ItemName//) returns the item count (the item count is the one in hotkey messages, You are using one of xx health potions).+**Self.Health**//()// Absolute player health
  
-**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).+**Self.Health%**//()// Percent player health
  
-**BBot.TogglePause**//()// activate/desactivate the BBot.+**Self.HealthMax**//()// Absolute max player health
  
-**BBot.ToggleVisible**//()// show/hide the BBot.+**Self.Mana**//()// Absolute player mana
  
-**BBot.ToggleStats**//()// show/hide Statistics.+**Self.Mana%**//()// Percent player mana
  
-**BBot.LevelSpyReset**//()// turns back to your floor.+**Self.ManaMax**//()// Absolute max player mana
  
-**BBot.LevelSpyUp**//()// looks one floor up.+**Self.StaminaMins**//()// The player stamina minutes
  
-**BBot.LevelSpyDown**//()// looks one floor down.+**Self.Stamina%**//()// The percent of the player stamina
  
-**Misc.SystemTime.Hour**//()// returns system's clock hour.+**Self.Soul**//()// The soul of the player
  
-**Misc.SystemTime.Minute**//()// returns system's clock minute.+**Self.Experience**//()// The experience of the player
  
-**Misc.SystemTime.Second**//()// returns system's clock second.+**Self.ExpToNextLevel**//()// The experience left to the next level
  
-**Tibia.KeyDown**(//Key Decimal Value//) returns 1 if the determined key is pressed. You can see all key codes here: [[Virtual Key Codes]]+**Self.Level**//()// The current player level
  
-**Killer.Start**//()// starts the Killer.+**Self.Level%**//()// The current percent of the player level
  
-**Killer.Stop**//()// stops the Killer.+**Self.Attacking**//()// Is the player attacking (Returns: Yes=1; No=0)
  
-**Trainer.Start**//()// starts the Trainer.+**Self.MagicLevel**//()// The player magic level
  
-**Trainer.Stop**//()// stops the Trainer.+**Self.MagicLevel%**//()// The player magic level percent
  
-===== BOT =====+**Self.Capacity**//()// The player capacity
  
-**Bot.Pause**//()// Stops all modules of the bot+**Self.X**//()// The player global position X
  
-**Bot.LoadSettings**//(Name)// Loads a new configuration, ie a new script. No need to put the extension .bbot+**Self.Y**//()// The player global position Y
  
-===== HUD =====+**Self.Z**//()// The player global position Z
  
-**HUD.Display**(//Text//) display a HUD Text in the center of the screen.+**Self.Mount**//()// The player mount id
  
-**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).+**Self.Balance**//()// The player current balance gathered from NPC Trade window
  
-===== Cavebot =====+===== Player Status =====
  
-**Cavebot.Start**//()// starts the cavebot.+**Status.Poison**//()// The player poison status (Returns: Yes=1; No=0)
  
-**Cavebot.Stop**//()// stops the cavebot.+**Status.Fire**//()// The player burning status (Returns: Yes=1; No=0)
  
-**CaveBot.GoStart**//()// makes the cavebot reset to the start of the script.+**Status.Energy**//()// The player electrified status (Returns: Yes=1; No=0)
  
-**CaveBot.GoLabel**(//Label//) makes the cavebot jump to a label inside the waypoint. +**Status.Drunk**//()// The player good drunk status (Returns: Yes=1; No=0)
-===== Macro =====+
  
-**Macro.Wait**(//Delay//) sleep the macro for a time.+**Status.ManaShield**//()// The player mana shield status (Returns: Yes=1; No=0)
  
-**Exit**() exit a command group. +**Status.Paralysis**//()// The player paralysis status (Returns: Yes=1; No=0)
-===== Self.Skill =====+
  
-**Self.Skill.Fist**//()//+**Status.Haste**//()// The player haste status (Returns: Yes=1; No=0)
  
-**Self.Skill.Club**//()//+**Status.Battle**//()// The player in battle status (Returns: Yes=1; No=0)
  
-**Self.Skill.Axe**//()//+**Status.Underwater**//()// The player under water status (Returns: Yes=1; No=0)
  
-**Self.Skill.Sword**//()//+**Status.Freezing**//()// The player freezing status (Returns: Yes=1; No=0)
  
-**Self.Skill.Distance**//()//+**Status.Dazzled**//()// The player dazzled status (Returns: Yes=1; No=0)
  
-**Self.Skill.Shielding**//()//+**Status.Cursed**//()// The player cursed status (Returns: Yes=1; No=0)
  
-**Self.Skill.Fishing**//()//+**Status.Buff**//()// The player strengthened or buffered status (Returns: Yes=1; No=0)
  
-returns the respective skill level. +**Status.PZBlock**//()// The player PZ block (cannot logout, enter pz) status (Returns: Yes=1; No=0)
-===== Self.Skill% =====+
  
-**Self.Skill.Fist%**//()//+**Status.InPZ**//()// The player inside protection zone status (Returns: Yes=1; No=0)
  
-**Self.Skill.Club%**//()//+**Status.NoLight**//()// The player no light status (Returns: Yes=1; No=0)
  
-**Self.Skill.Axe%**//()//+**Status.Bleeding**//()// The player bleeding status (Returns: Yes=1; No=0)
  
-**Self.Skill.Sword%**//()//+**Status.Invisible**//()// The player invisible status (Returns: Yes=1; No=0)
  
-**Self.Skill.Distance%**//()//+===== Player Inventory =====
  
-**Self.Skill.Shielding%**//()//+**Self.Inventory.Helmet**//()// The player Helmet slot item id
  
-**Self.Skill.Fishing%**//()//+**Self.Inventory.Amulet**//()// The player Amulet slot item id
  
-returns the percent of the respective skill. +**Self.Inventory.Backpack**//()// The player Backpack slot item id
-===== Self.MagicLevel =====+
  
-**Self.MagicLevel**//()// returns the magic level. +**Self.Inventory.Armor**//()// The player Armor slot item id
-===== Self.MagicLevel% =====+
  
-**Self.MagicLevel%**//()// returns the percent of your magic level. +**Self.Inventory.RightHand**//()// The player Right Hand (->) slot item id
-===== Self.Inventory =====+
  
-**Self.Inventory.RightHand**//()//+**Self.Inventory.LeftHand**//()// The player Left Hand (<-) slot item id
  
-**Self.Inventory.LeftHand**//()//+**Self.Inventory.Legs**//()// The player Legs slot item id
  
-**Self.Inventory.Legs**//()//+**Self.Inventory.Boots**//()// The player Boots slot item id
  
-**Self.Inventory.Boots**//()//+**Self.Inventory.Ring**//()// The player Ring slot item id
  
-**Self.Inventory.Ring**//()//+**Self.Inventory.Ammunition**//()// The player Ammunition slot item id
  
-**Self.Inventory.Ammunition**//()//+**Self.Inventory.Helmet.Count**//()// The player Helmet slot item count
  
-**Self.Inventory.Helmet**//()//+**Self.Inventory.Amulet.Count**//()// The player Amulet slot item count
  
-**Self.Inventory.Amulet**//()//+**Self.Inventory.Backpack.Count**//()// The player Backpack slot item count
  
-**Self.Inventory.Backpack**//()//+**Self.Inventory.Armor.Count**//()// The player Armor slot item count
  
-**Self.Inventory.Armor**//()//+**Self.Inventory.RightHand.Count**//()// The player Right Hand (->) slot item count
  
-return your inventory item ID. +**Self.Inventory.LeftHand.Count**//()// The player Left Hand (<-) slot item count
-===== Self.Inventory.Count =====+
  
-**Self.Inventory.Backpack.Count**()+**Self.Inventory.Legs.Count**//()// The player Legs slot item count
  
-**Self.Inventory.Armor.Count**()+**Self.Inventory.Boots.Count**//()// The player Boots slot item count
  
-**Self.Inventory.Amulet.Count**()+**Self.Inventory.Ring.Count**//()// The player Ring slot item count
  
-**Self.Inventory.Helmet.Count**()+**Self.Inventory.Ammunition.Count**//()// The player Ammunition slot item count
  
-**Self.Inventory.Ammunition.Count**()+**Self.Inventory.ID**//(Slot)// Get the ID of a inventory slot. Slots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo
  
-**Self.Inventory.Ring.Count**()+**Self.Inventory.Count**//(Slot)// Get the count of a inventory slot. Slots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo
  
-**Self.Inventory.Boots.Count**()+**Self.Inventory.UseOn**//(Slot, UseID)// Use a item into a slot (e.g: enchant item). Slots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo
  
-**Self.Inventory.Legs.Count**()+===== Player Skills =====
  
-**Self.Inventory.LeftHand.Count**()+**Self.Skill.Fist**//()// The current First skill level
  
-**Self.Inventory.RightHand.Count**()+**Self.Skill.Club**//()// The current Club skill level
  
-Returns the amount of items that you have on the inventory slots.+**Self.Skill.Axe**//()// The current Axe skill level
  
-===== Status =====+**Self.Skill.Sword**//()// The current Sword skill level
  
-**Status.ManaShield**//()// returns 1 if Magic/Mana shield is actived.+**Self.Skill.Distance**//()// The current Distance skill level
  
-**Status.Paralysis**//()// returns 1 if you are Paralyzed.+**Self.Skill.Shielding**//()// The current Shielding skill level
  
-**Status.Haste**//()// returns 1 if you are Hasted.+**Self.Skill.Fishing**//()// The current Fishing skill level
  
-**Status.Battle**//()// returns 1 if you are with Battle (normal swords).+**Self.Skill.Fist%**//()// The current First skill percent
  
-**Status.Underwater**//()// returns 1 if you are Underwater.+**Self.Skill.Club%**//()// The current Club skill percent
  
-**Status.Freezing**//()// returns 1 if you are Freezing.+**Self.Skill.Axe%**//()// The current Axe skill percent
  
-**Status.Dazzled**//()// returns 1 if you are Dazzled.+**Self.Skill.Sword%**//()// The current Sword skill percent
  
-**Status.Cursed**//()// returns 1 if you are Cursed.+**Self.Skill.Distance%**//()// The current Distance skill percent
  
-**Status.Buff**//()// returns 1 if you are Party Buffed.+**Self.Skill.Shielding%**//()// The current Shielding skill percent
  
-**Status.PZBlock**//()// returns 1 if you are with Battle (red swords).+**Self.Skill.Fishing%**//()// The current Fishing skill percent
  
-**Status.InPZ**//()// returns 1 if you are inside protection zone.+===== Player Actions =====
  
-**Status.NoLight**//()// returns 1 if you are without any light.+**Self.Say**//(Text)// Say a text in the default channel
  
-**Status.Poison**//()// returns 1 if you are Poisoned.+**Self.Whisper**//(Text)// Whisper a text in the default channel
  
-**Status.Fire**//()// returns 1 if you are Burning.+**Self.Yell**//(Text)// Yell a text in the game
  
-**Status.Energy**//()// returns 1 if you are Energy.+**Self.PrivateMessage**//(ToPlayer, Text)// Send a private message to a player
  
-**Status.Drunk**//()// returns 1 if you are Drunked.+**Self.Stop**//()// Stop current action
  
-**Status.Invisible**//()// returns 1 if you are Invisible. +**Self.PositionIn**//(X1, Y1, Z1, X2, Y2, Z2)// Check if the player is in a position box (Returns: Yes=1; No=0)
-===== Self.UnEquip =====+
  
-**Self.UnEquip.Legs**(//To Container//)+**Self.MoveTo**//(X, Y, Z)// Walk to a position
  
-**Self.UnEquip.Boots**(//To Container//)+**Self.MoveN**//()// Step one sqm to the north
  
-**Self.UnEquip.Ring**(//To Container//)+**Self.StepNorth**//()// Step one sqm to the north
  
-**Self.UnEquip.Ammo**(//To Container//)+**Self.MoveS**//()// Step one sqm to the south
  
-**Self.UnEquip.Helmet**(//To Container//)+**Self.StepSouth**//()// Step one sqm to the south
  
-**Self.UnEquip.Amulet**(//To Container//)+**Self.MoveE**//()// Step one sqm to the east
  
-**Self.UnEquip.Backpack**(//To Container//)+**Self.StepEast**//()// Step one sqm to the east
  
-**Self.UnEquip.Armor**(//To Container//)+**Self.MoveW**//()// Step one sqm to the west
  
-**Self.UnEquip.RightHand**(//To Container//)+**Self.StepWest**//()// Step one sqm to the west
  
-**Self.UnEquip.LeftHand**(//To Container//)+**Self.MoveNE**//()// Step one sqm to the north east
  
-puts your inventory item in a container (0 is your main container).+**Self.StepNorthEast**//()// Step one sqm to the north east
  
-===== Self.Equip =====+**Self.MoveNW**//()// Step one sqm to the north west
  
-**Self.Equip.Legs**(//ID//)+**Self.StepNorthWest**//()// Step one sqm to the north west
  
-**Self.Equip.Boots**(//ID//)+**Self.MoveSE**//()// Step one sqm to the south east
  
-**Self.Equip.Ring**(//ID//)+**Self.StepSouthEast**//()// Step one sqm to the south east
  
-**Self.Equip.Ammo**(//ID//)+**Self.MoveSW**//()// Step one sqm to the south west
  
-**Self.Equip.Helmet**(//ID//)+**Self.StepSouthWest**//()// Step one sqm to the south west
  
-**Self.Equip.Amulet**(//ID//)+**Self.Logout**//()// Logout the player as soon as possible (stop cavebot and wait for logout unblock)
  
-**Self.Equip.Backpack**(//ID//)+**Self.TurnN**//()// Turn the player to the north
  
-**Self.Equip.Armor**(//ID//)+**Self.TurnNorth**//()// Turn the player to the north
  
-**Self.Equip.RightHand**(//ID//)+**Self.TurnS**//()// Turn the player to the south
  
-**Self.Equip.LeftHand**(//ID//)+**Self.TurnSouth**//()// Turn the player to the south
  
-puts a item of your containers in your inventory.+**Self.TurnE**//()// Turn the player to the east
  
-===== Self.Turn =====+**Self.TurnEast**//()// Turn the player to the east
  
-**Self.TurnN**//()// turns your character to the North.+**Self.TurnW**//()// Turn the player to the west
  
-**Self.TurnS**//()// turns your character to the South.+**Self.TurnWest**//()// Turn the player to the west
  
-**Self.TurnE**//()// turns your character to the East.+**Self.ReOpenBackpacks**//()// Closes and open the player backpacks
  
-**Self.TurnW**//()// turns your character to the West. +**Self.ToggleMinimizeBackpack**//(Index)// Toggle a backpack minimize state
-===== Self.Moves =====+
  
-**Self.MoveTo**(//XY, Z//) moves your character to the position.+**Self.SayInChannel**//(ChannelIDWords)// Send a message to a channel ID
  
-**Self.MoveN**//()// moves your character one sqm to the north.+**Self.ToggleMount**//()// Toggle the player mount
  
-**Self.MoveS**//()// moves your character one sqm to the south.+**Self.Backpacks.UseOn**//(UseID, UseOn)// Use a item on a item inside your backpack
  
-**Self.MoveE**//()// moves your character one sqm to the east.+**Self.OpenBackpacks**//()// Return the number of open backpacks
  
-**Self.MoveW**//()// moves your character one sqm to the west.+===== Player Inventory Equip =====
  
-**Self.MoveNE**//()// moves your character one sqm to the north-east.+**Self.Equip.Helmet**//(ID)// Equip a item on the Helmet slot
  
-**Self.MoveNW**//()// moves your character one sqm to the north-west.+**Self.Equip.Amulet**//(ID)// Equip a item on the Amulet slot
  
-**Self.MoveSE**//()// moves your character one sqm to the south-east.+**Self.Equip.Backpack**//(ID)// Equip a item on the Backpack slot
  
-**Self.MoveSW**//()// moves your character one sqm to the south-west. +**Self.Equip.Armor**//(ID)// Equip a item on the Armor slot
-===== Self Actions =====+
  
-**Self.Stop**//()// stops the attacking/following /walking.+**Self.Equip.RightHand**//(ID)// Equip a item on the Right Hand (->) slot
  
-**Self.Say**(//Text//) sends message.+**Self.Equip.LeftHand**//(ID)// Equip item on the Left Hand (<-) slot
  
-**Self.Logout**//()// makes your character logout only when no battle sign.+**Self.Equip.Legs**//(ID)// Equip a item on the Legs slot
  
-**Self.Yell**(//Text//) yell message.+**Self.Equip.Boots**//(ID)// Equip item on the Boots slot
  
-**Self.PositionIn**(//X1, Y1, Z1, X2, Y2, Z2//) returns 1 if your character is in the position square. +**Self.Equip.Ring**//(ID)// Equip a item on the Ring slot
-===== Self.Properties =====+
  
-**Self.Health**//()// returns your HP.+**Self.Equip.Ammo**//(ID)// Equip a item on the Ammunition slot
  
-**Self.Health%**//()// returns your HP in percent.+**Self.Equip**//(Slot, ID)// Equip a item into slotSlots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo
  
-**Self.HealthMax**//()// returns your HP max.+===== Player Inventory UnEquip =====
  
-**Self.Mana**//()// returns your Mana.+**Self.UnEquip.Helmet**//(ToContainer)// Unequip the Helmet slot and put the item on the given container index
  
-**Self.Mana%**//()// returns your Mana in percent.+**Self.UnEquip.Amulet**//(ToContainer)// Unequip the Amulet slot and put the item on the given container index
  
-**Self.ManaMax**//()// returns your ManaMax.+**Self.UnEquip.Backpack**//(ToContainer)// Unequip the Backpack and put the item on the given container index
  
-**Self.StaminaMins**//()// returns the stamina left in minutes.+**Self.UnEquip.Armor**//(ToContainer)// Unequip the Armor slot and put the item on the given container index
  
-**Self.Stamina%**//()// returns the stamina left in percents.+**Self.UnEquip.RightHand**//(ToContainer)// Unequip the Right Hand (->) slot and put the item on the given container index
  
-**Self.Capacity**//()// returns your capacity.+**Self.UnEquip.LeftHand**//(ToContainer)// Unequip the Left Hand (<-) slot and put the item on the given container index
  
-**Self.Soul**//()// returns your soul.+**Self.UnEquip.Legs**//(ToContainer)// Unequip the Legs slot and put the item on the given container index
  
-**Self.Experience**//()// returns your experience.+**Self.UnEquip.Boots**//(ToContainer)// Unequip the Boots slot and put the item on the given container index
  
-**Self.ExpToNextLevel**//()// returns the experience to the next level.+**Self.UnEquip.Ring**//(ToContainer)// Unequip the Ring slot and put the item on the given container index
  
-**Self.X**//()// returns your X position.+**Self.UnEquip.Ammo**//(ToContainer)// Unequip the Ammunition slot and put the item on the given container index
  
-**Self.Y**//()// returns your Y position.+**Self.UnEquip**//(Slot, ToContainer)// Unequip a item a container indexSlots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo
  
-**Self.Z**//()// returns your Z position.+===== Player Drop Equip =====
  
-**Self.Level**//()// returns your Level.+**Self.Drop.Helmet**//(X, Y, Z)// Drop a item on the Helmet to the ground
  
-**Self.Level%**//()// returns your Level percent.+**Self.Drop.Amulet**//(X, Y, Z)// Drop a item on the Amulet to the ground
  
-**Self.Attacking**//()// returns 1 if your char is attacking.+**Self.Drop.Backpack**//(X, Y, Z)// Drop a item on the Backpack to the ground
  
-**Self.Mount**//()// returns 1 if you are riding your mount.+**Self.Drop.Armor**//(X, Y, Z)// Drop a item on the Armor to the ground
  
-===== Creature =====+**Self.Drop.RightHand**//(X, Y, Z)// Drop a item on the RightHand (->) to the ground
  
-**Creature.ByName**(//Name//) returns creature id by name.+**Self.Drop.LeftHand**//(X, Y, Z)// Drop a item on the LeftHand (<-to the ground
  
-**Creature.Attacking**//()// returns creature id by red square. +**Self.Drop.Legs**//(X, Y, Z)// Drop a item on the Legs to the ground
  
-**Creature.Target**//()// returns creature id by red square.+**Self.Drop.Boots**//(X, Y, Z)// Drop a item on the Boots to the ground
  
-**Creature.Self**//()// returns yourself id.+**Self.Drop.Ring**//(X, Y, Z)// Drop a item on the Ring to the ground
  
-**Creature.Health**(//ID//) returns the creature id hp (in %).+**Self.Drop.Ammo**//(X, Y, Z)// Drop a item on the Ammo to the ground
  
-**Creature.Speed**(//ID//) returns the creature id speed.+===== Player Pickup Equip =====
  
-**Creature.DistanceToSelf**(//ID//) returns the distance from you+**Self.PickUp.Helmet**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Helmet slot
  
-**Creature.NameIn**(//ID, Name,Na..//) returns 1 if the name of the creature is in the list. +**Self.PickUp.Amulet**//(ID, XY, Z, Range)// Pickup a item from the ground to the Amulet slot
  
-**Creature.ShootOn**(//ID, Ammo//) shoot a item in the creature id (sample: Ammo '3155' shoots a sudden death).+**Self.PickUp.Backpack**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Backpack slot
  
-**Creature.X**(//ID//) returns the X position of creature id.+**Self.PickUp.Armor**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Armor slot
  
-**Creature.Y**(//ID//) returns the position of creature id. +**Self.PickUp.RightHand**//(ID, X, YZ, Range)// Pickup a item from the ground to the RightHand slot
-  +
-**Creature.Z**(//ID//) returns the Z position of creature id.+
  
-**Creature.IsPlayer**(//ID//) returns 1 if the creature id is player.+**Self.PickUp.LeftHand**//(ID, X, Y, Z, Range)// Pickup item from the ground to the LeftHand slot
  
-**Creature.IsNPC**(//ID//) returns 1 if the creature id is player.+**Self.PickUp.Legs**//(ID, X, Y, Z, Range)// Pickup item from the ground to the Legs slot
  
-**Creature.Attack**(//ID//) attack the creature id, returns 1 if attacked him.+**Self.PickUp.Boots**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Boots slot
  
-**Creature.Follow**(//ID//) follow the creature id, returns 1 if followed him.+**Self.PickUp.Ring**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Ring slot
  
-**Creature.KeepDistance**(//ID, Distance//) keep distance from creature id, returns 1 if you can, press "ESC" to stop.+**Self.PickUp.Ammo**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Ammo slot
  
-**Creature.KeepDiagonal**(//ID//) keep diagonal from creature id, returns 1 if you can, press "ESC" to stop.+===== NPC Trading =====
  
-===== Creatures =====+**NPC.Buy**//(ID, Count, IgnoreCap)// Buy a item on the Trade, requires the Trade open before using the macro (by saying Hi,Trade)
  
-**Creatures.Beside**//()// returns the number of creatures beside (distance <=1).+**NPC.BuyInBP**//(ID, Count, IgnoreCap)// Buy a item in a backpack from the Trade, requires the Trade open before using the macro (by saying Hi,Trade)
  
-**Creatures.OnScreen**//()// returns the number of the creatures in your screen.+**NPC.Sell**//(ID, Count(-1 is all))// Sell item to the Trade, requires the Trade open before using the macro (by saying Hi,Trade)
  
-**Creatures.ByRange**(//Range//) returns the number of creatures in a range.+**NPC.Say**//(Text)// Say a text in the special NPC channel
  
-**Creatures.Killed**(//Name//) returns the number of creatures killed by name.+**NPC.Trade.Money**//()// The player current money gathered from NPC Trade window
  
-**Creatures.PlayersOnScreen**//()// returns the number of players on screen.+===== Working with Maps =====
  
-**Creatures.TaskKilled**(//Name//) returns the number of creatures killed by name. You can use this with Full Check to complete tasks.+**Map.UseOn**//(ID, OnID, X, Y, Z, Range)// Use a item on the Map (shovel) (Returns: Yes=1; No=0)
  
-**Creatures.PlayersOnRange**(//Range//) returns the number of players in range.+**Map.Use**//(ID, X, Y, Z, Range)// Use item from the Map (Ports) (Returns: Yes=1; No=0)
  
-**Creatures.ByName**(//Name//) returns the number of creatures in you screen by name.+**Map.HasID**//(ID, X, Y, Z)// Check if a map position has a item (Returns: Yes=1; No=0)
  
-**Creatures.NPCOnScreen**//()// returns the number of NPC in your screen.+**Map.Thrown**//(ID, Count, X, Y, Z)// Thrown a item on the map from your backpacks (Returns: Yes=1; No=0)
  
-===== Variables =====+**Map.PickUp**//(ID, Count, ContainerTo, X, Y, Z)// Pick a item from the map (Returns: Yes=1; No=0)
  
-**VarDiv or Div**(NameValuedivides the variable by the value (x / value).+**Map.PickUpEx**//(IDCount, ContainerTo, X, Y, Z, Range)// Pick a item from the map in a range (Returns: Yes=1; No=0)
  
-**VarMult or Mult**(Name, Value) multiplies the variable by the value (x * value).+===== Working with Creatures =====
  
-**VarAdd or Inc**(Name, Valueadds to the variable the value (x + value).+**Creature.ByName**//(Name)// Gather a ID from the first creature with the name given found
  
-**VarSub or Dec**(Name, Valuesubstract the value from the variable (x - value).+**Creature.Attacking**//()// Gather the ID from the creature being attacked
  
-**VarMod or Mod**(Name, Valuemod (x mod value) gives the remainder from dividing. Eg: 5 mod 3 = 2; 5 mod 2 = 1.+**Creature.Target**//()// Gather the ID from the creature being attacked
  
-**To declare and assign values ​​to Variables, do as follows:**+**Creature.Self**//()// Gather the ID from the player
  
-**cap**//:=//<del>50</del>+**Creature.Health**//(ID)// Returns the health percent of the creature with the given ID
  
-**sword_id**//:=//<del>7777</del>+**Creature.Speed**//(ID)// Returns the absolute speed value of the creature with the given ID 
 + 
 +**Creature.DistanceToSelf**//(ID)// Calculate the distance from the creature with the given ID to the player 
 + 
 +**Creature.NameIn**//(ID, Name,Na..)// Verify if the creature from the given ID name is in the list (ReturnsYes=1; No=0) 
 + 
 +**Creature.ShootOn**//(ID, Ammo)// Shoot a item on the creature (potions, runes and other items) 
 + 
 +**Creature.X**//(ID)// Global position X from the creature 
 + 
 +**Creature.Y**//(ID)// Global position Y from the creature 
 + 
 +**Creature.Z**//(ID)// Global position Z from the creature 
 + 
 +**Creature.IsPlayer**//(ID)// Check if a creature is a player (Returns: Yes=1; No=0) 
 + 
 +**Creature.IsNPC**//(ID)// Check if a creature is NPC or a Monster (Returns: Yes=1; No=0) 
 + 
 +**Creature.GroupCount**//(ID)// Returns the number of the group that the player is in (guild or party) 
 + 
 +**Creature.SquareVisible**//(ID)// Check if a creature has a square 
 + 
 +**Creature.SquareRed**//(ID)// Return the RED color of the creature square 
 + 
 +**Creature.SquareGreen**//(ID)// Return the GREEN color of the creature square 
 + 
 +**Creature.SquareBlue**//(ID)// Return the BLUE color of the creature square 
 + 
 +**Creature.Attack**//(ID)// Attack a creature 
 + 
 +**Creature.Follow**//(ID)// Follow a creature 
 + 
 +**Creature.KeepDistance**//(ID, Distance)// Keep a certain distance from a creature 
 + 
 +**Creature.KeepDiagonal**//(ID)// Keeps on the diagonal of a creature 
 + 
 +===== Creature Statistics ===== 
 + 
 +**Creatures.Beside**//()// Count the number of creatures in a 1 sqm range 
 + 
 +**Creatures.OnScreen**//()// Count the number of creatures in the screen 
 + 
 +**Creatures.ByRange**//(Range)// Count the number of creatures in a sqm range 
 + 
 +**Creatures.Killed**//(Name)// Count the number of creatures killed with a certain name 
 + 
 +**Creatures.PlayersOnScreen**//()// Count the number of players on the screen 
 + 
 +**Creatures.TaskKilled**//(Name)// Counts the number of task kills from a certain creature (BOT count, not absolute count) 
 + 
 +**Creatures.PlayersOnRange**//(Range)// Counts the number of players in a sqm range 
 + 
 +**Creatures.ByName**//(Name)// Counts the number of creatures with a certain name 
 + 
 +**Creatures.NPCOnScreen**//()// Counts the number of NPC or Monsters in the screen 
 + 
 +**Creatures.ByRangeName**//(Range, Name)// Counts the number of creatures with a certain name within a range 
 + 
 +**Creatures.ByNameBeside**//(Name)// Counts the number of creatures with a certain name with a 1 sqm distance 
 + 
 +===== Misc Functions ===== 
 + 
 +**Misc.ShootCount**//(InLastSeconds)// Return the number of magic shoot effects in a certain number of seconds 
 + 
 +**Misc.AttackersCount**//(InLastSeconds)// Return the number of creatures that attacked the player in a certain number of seconds 
 + 
 +**Misc.HPLose**//(InLastSeconds)// Return the number of HP loose in a certain number of seconds 
 + 
 +**Misc.HPGain**//(InLastSeconds)// Return the number of HP gained in a certain number of seconds 
 + 
 +**Misc.HPDelta**//(InLastSeconds)// Return the number of HP delta in a certain number of seconds 
 + 
 +**Misc.ManaDelta**//(InLastSeconds)// Return the number of MANA delta in a certain number of seconds 
 + 
 +**Misc.HPHitsBigger**//(InLastSeconds, BiggerThan)// Counts the number of hits that was bigger than a given value in a certain number of seconds 
 + 
 +**Misc.StandTime**//()// Returns in seconds the time that the player dont walk 
 + 
 +**Misc.ItemCount**//(ItemName)// Return the number of items from the hotkey message: You are using the... 
 + 
 +**Misc.Alert**//(Message)// Start a sound alarm with a message 
 + 
 +**Misc.LoadUrl**//(Url)// Load a URL 
 + 
 +**Misc.LogFile**//(File, Text)// Log a message in a text file 
 + 
 +**Misc.ItemCountEx**//(ItemID)// Count the number of items with a ID on the open backpacks 
 + 
 +**HUD.Display**//(Text)// Displays a HUD message on game screen 
 + 
 +**HUD.Setup**//(HAlign, VAlign, R, B, G)// Set how the HUD message from the macro is shown in the game screen 
 + 
 +**HUD.Print**//(HAlign, VAlign, R, B, G, Expire, Text)// Show a HUD in the game screen with specific settings 
 + 
 +**Cavebot.Start**//()// Starts the Cavebot 
 + 
 +**Cavebot.Stop**//()// Stops the Cavebot 
 + 
 +**Cavebot.Reset**//()// Resets the Cavebot 
 + 
 +**CaveBot.GoLabel**//(Label)// Makes the Cavebot go to a waypoint label 
 + 
 +**CaveBot.GoStart**//()// Makes the Cavebot go to the first waypoint item 
 + 
 +**Killer.Start**//()// Start the Killer 
 + 
 +**Killer.Stop**//()// Stop the Killer 
 + 
 +**Bot.Pause**//()// Toggle the BBot pause 
 + 
 +**BBot.TogglePause**//()// Toggle the BBot pause 
 + 
 +**Bot.LoadSettings**//(Name)// Load a settings configuration file 
 + 
 +**BBot.ToggleVisible**//()// Toggles the BBot main window visible 
 + 
 +**BBot.ToggleStats**//()// Shows the BBot statistics on the game screen (HUD and Informations) 
 + 
 +**BBot.LevelSpyReset**//()// Reset the Level Spy 
 + 
 +**BBot.LevelSpyUp**//()// Makes the Level Spy go up one floor 
 + 
 +**BBot.LevelSpyDown**//()// Makes the Level Spy go down one floor 
 + 
 +**Macro.Wait**//(Delay)// Pause the macro and the entire bot for a delay in miliseconds 
 + 
 +**Hotkey.Use**//(ID)// Use a Tibia item with a hotkey (e.g Gold Coin) 
 + 
 +**Misc.SystemTime.Hour**//()// Returns the system HOUR 
 + 
 +**Misc.SystemTime.Minute**//()// Returns the system MINUTE 
 + 
 +**Misc.SystemTime.Second**//()// Returns the system SECOND 
 + 
 +**Tibia.KeyDown**//(VirtualKeyCode)// Check if a Key is down in tibia 
 + 
 +**Tibia.IsKeyDown**//(VirtualKeyCode)// Check if a Key is down in tibia 
 + 
 +**Trainers.Stop**//()// Stop the Trainers 
 + 
 +**Trainers.Start**//()// Start the Trainers 
 + 
 +**Misc.Random**//(Min, Max)// Generate a random number in a range 
 + 
 +**Trainers.ClearTrainers**//()// Clear the Trainers training creatures 
 + 
 +**Protectors.Disable**//(Name)// Disable a protector by its name 
 + 
 +**Protectors.Pause**//(Name)// Disable a protector by its name 
 + 
 +**Protectors.Enable**//(Name)// Enable a protector by its name 
 + 
 +**Protectors.UnPause**//(Name)// Enable a protector by its name 
 + 
 +**Protectors.DisableAll**//()// Disable all the Protectors 
 + 
 +**Protectors.PauseAll**//()// Disable all the Protectors 
 + 
 +**Protectors.EnableAll**//()// Enable all the Protectors 
 + 
 +**Protectors.UnPauseAll**//()// Enable all the Protectors 
 + 
 +**ReUser.Pause**//(Name)// Pause a ReUser by its name. Current ReUser names: Magic Shield, Anti Paralysis, Invisible, Cure Poison, Cure Bleeding, Cure Curse, Cure Eletrification, Cure Burning, Intense Recovery, Recovery, Protector, Strong Haste, Swift Foot, Charge, Haste, Blood Rage, Sharpshooter, Ultimate Light, Great Light, Light, Soft Boots, Ring, Left Hand, Right Hand, Amulet, Ammunition 
 + 
 +**ReUser.UnPause**//(Name)// Unpause a ReUser by its name 
 + 
 +**ReUser.PauseAll**//()// Pause all the ReUsers 
 + 
 +**ReUser.UnPauseAll**//()// Unpause all the ReUsers 
 + 
 +**Tibia.SendKey**//(VirtualKeyCode)// Send a key to the Tibia 
 + 
 +**Tibia.SendText**//(Text)// Send a text to the Tibia 
 + 
 +**Tibia.Screenshot**//()// Takes a Tibia Screenshot 
 + 
 +**Tibia.StealthScreenshot**//()// Clean up the HUD and take a Tibia Screenshot 
 + 
 +**Tibia.Close**//()// Close the Tibia process 
 + 
 +**Tibia.Ping**//()// Retrieve aproximate Tibia connection ping 
 + 
 +**Tibia.WindowWidth**//()// Retrieve the Tibia window width 
 + 
 +**Tibia.WindowHeight**//()// Retrieve the Tibia window height 
 + 
 +**ReconnectManager.LoadProfile**//(ProfileName)// Load a Reconnect Manager profile 
 + 
 +**ReconnectManager.TerminateTask**//()// Terminate the current Reconnect Manager task and start the process to go to the next task 
 + 
 +**Macro.Run**//(MacroName)// Execute a macro by name 
 + 
 +**Debug.Click**//(X, Y)// Debug a mouse click 
 + 
 +**Debug.ClickEx**//(X, Y)// Debug a mouse click 
 + 
 +**Misc.Click**//(X, Y)// Send a mouse click 
 + 
 +**Misc.ClickEx**//(X, Y)// Send a mouse click
  
-**X**//:=//<del>Self.X</del> 
  
-**__Explanation__**: 
-  * Unordered List ItemThe name of the variable is in bold. 
-  * The sign := in italicsis the assignment. 
-  * The value strike-through is the value that the variable **cap** or **sword_id** will receive. 
-  * In the last option the variable **X** is receiving a command **Self.X** that will be assigned to this variable the coordinate **X**. 
macros_commands.txt · Last modified: 2021/11/15 16:43 (external edit)