Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
macros_commands [2013/09/12 07:27] megano0body |
macros_commands [2017/03/08 17:59] megano0body |
====== Macro Commands ====== | ====== Macro Commands ====== |
| |
| ===== Creating Variables ===== |
| |
===== Internals ===== | To create variables you must use the following syntax: |
| |
| **VariableName** := //DefaultValue// |
| |
| Example: |
| |
| **HP**:=//Self.Health()// |
| |
| **MagicNumber**:=//3529// |
| |
| ===== Using Variables ===== |
| |
| You can use the variables in many places of the BBot, to use a variable use this syntax: |
| |
| **!**//VariableName//**!** |
| |
| Self.Say(**!**//HP//**!**) |
| |
| SecondMagicNumber:=**!**//MagicNumber//**!** |
| |
| Variables can be used in the FullCheck and some other features of the BBot. |
| |
| ===== Internals ===== |
| |
**Exit**//()// Stop the macro execution | **Exit**//()// Stop the macro execution |
**Mod**//(Name, Value)// Returns the modulos remainder of the Variable by the Value | **Mod**//(Name, Value)// Returns the modulos remainder of the Variable by the Value |
| |
===== Player state ===== | ===== Player State ===== |
| |
**Self.Health**//()// Absolute player health | **Self.Health**//()// Absolute player health |
**Self.Mount**//()// The player mount id | **Self.Mount**//()// The player mount id |
| |
===== Player Status ===== | **Self.Balance**//()// The player current balance gathered from NPC Trade window |
| |
| ===== Player Status ===== |
| |
**Status.Poison**//()// The player poison status (Returns: Yes=1; No=0) | **Status.Poison**//()// The player poison status (Returns: Yes=1; No=0) |
**Status.Invisible**//()// The player invisible status (Returns: Yes=1; No=0) | **Status.Invisible**//()// The player invisible status (Returns: Yes=1; No=0) |
| |
===== Player Inventory IDs ===== | ===== Player Inventory ===== |
| |
**Self.Inventory.Helmet**//()// The player Helmet slot item id | **Self.Inventory.Helmet**//()// The player Helmet slot item id |
| |
**Self.Inventory.Ammunition**//()// The player Ammunition slot item id | **Self.Inventory.Ammunition**//()// The player Ammunition slot item id |
| |
===== Player Inventory Counts ===== | |
| |
**Self.Inventory.Helmet.Count**//()// The player Helmet slot item count | **Self.Inventory.Helmet.Count**//()// The player Helmet slot item count |
**Self.Inventory.Ammunition.Count**//()// The player Ammunition slot item count | **Self.Inventory.Ammunition.Count**//()// The player Ammunition slot item count |
| |
===== Player Skill Levels ===== | **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.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.Skill.Fist; **//()// The current First skill level | **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.Skill.Club; **//()// The current Club skill level | ===== Player Skills ===== |
| |
**Self.Skill.Axe; **//()// The current Axe skill level | **Self.Skill.Fist**//()// The current First skill level |
| |
**Self.Skill.Sword; **//()// The current Sword skill level | **Self.Skill.Club**//()// The current Club skill level |
| |
**Self.Skill.Distance; **//()// The current Distance skill level | **Self.Skill.Axe**//()// The current Axe skill level |
| |
**Self.Skill.Shielding; **//()// The current Shielding skill level | **Self.Skill.Sword**//()// The current Sword skill level |
| |
**Self.Skill.Fishing; **//()// The current Fishing skill level | **Self.Skill.Distance**//()// The current Distance skill level |
| |
===== Player Skill Percents ===== | **Self.Skill.Shielding**//()// The current Shielding skill level |
| |
**Self.Skill.Fist%; **//()// The current First skill percent | **Self.Skill.Fishing**//()// The current Fishing skill level |
| |
**Self.Skill.Club%; **//()// The current Club skill percent | **Self.Skill.Fist%**//()// The current First skill percent |
| |
**Self.Skill.Axe%; **//()// The current Axe skill percent | **Self.Skill.Club%**//()// The current Club skill percent |
| |
**Self.Skill.Sword%; **//()// The current Sword skill percent | **Self.Skill.Axe%**//()// The current Axe skill percent |
| |
**Self.Skill.Distance%; **//()// The current Distance skill percent | **Self.Skill.Sword%**//()// The current Sword skill percent |
| |
**Self.Skill.Shielding%; **//()// The current Shielding skill percent | **Self.Skill.Distance%**//()// The current Distance skill percent |
| |
**Self.Skill.Fishing%; **//()// The current Fishing skill percent | **Self.Skill.Shielding%**//()// The current Shielding skill percent |
| |
===== Vip ===== | **Self.Skill.Fishing%**//()// The current Fishing skill percent |
| |
**Vip.Online**//(Name)// (Disabled since Tibia 962)The Online status of a friend (Returns: Yes=1; No=0) | |
| |
===== Player Actions ===== | ===== Player Actions ===== |
| |
**Self.Say**//(Text)// Say a text in the default channel | **Self.Say**//(Text)// Say a text in the default channel |
| |
| **Self.Whisper**//(Text)// Whisper a text in the default channel |
| |
**Self.Yell**//(Text)// Yell a text in the game | **Self.Yell**//(Text)// Yell a text in the game |
| |
| **Self.PrivateMessage**//(ToPlayer, Text)// Send a private message to a player |
| |
**Self.Stop**//()// Stop current action | **Self.Stop**//()// Stop current action |
| |
**Self.ReOpenBackpacks**//()// Closes and open the player backpacks | **Self.ReOpenBackpacks**//()// Closes and open the player backpacks |
| |
| **Self.ToggleMinimizeBackpack**//(Index)// Toggle a backpack minimize state |
| |
**Self.SayInChannel**//(ChannelID, Words)// Send a message to a channel ID | **Self.SayInChannel**//(ChannelID, Words)// Send a message to a channel ID |
| |
**Self.Backpacks.UseOn**//(UseID, UseOn)// Use a item on a item inside your backpack | **Self.Backpacks.UseOn**//(UseID, UseOn)// Use a item on a item inside your backpack |
| |
| **Self.OpenBackpacks**//()// Return the number of open backpacks |
| |
===== Player Inventory Equip ===== | ===== Player Inventory Equip ===== |
| |
| |
**Self.Equip.Helmet**//(ID)// Equip a item on the Helmet slot | **Self.Equip.Helmet**//(ID)// Equip a item on the Helmet slot |
| |
**Self.Equip.Ammo**//(ID)// Equip a item on the Ammunition slot | **Self.Equip.Ammo**//(ID)// Equip a item on the Ammunition slot |
| |
| **Self.Equip**//(Slot, ID)// Equip a item into slot. Slots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo |
| |
===== Player Inventory UnEquip ===== | ===== Player Inventory UnEquip ===== |
**Self.UnEquip.Ammo**//(ToContainer)// Unequip the Ammunition slot and put the item on the given container index | **Self.UnEquip.Ammo**//(ToContainer)// Unequip the Ammunition slot and put the item on the given container index |
| |
===== NPC Trading ===== | **Self.UnEquip**//(Slot, ToContainer)// Unequip a item a container index. Slots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo |
| |
| ===== Player Drop Equip ===== |
| |
| **Self.Drop.Helmet**//(X, Y, Z)// Drop a item on the Helmet to the ground |
| |
| **Self.Drop.Amulet**//(X, Y, Z)// Drop a item on the Amulet to the ground |
| |
| **Self.Drop.Backpack**//(X, Y, Z)// Drop a item on the Backpack to the ground |
| |
| **Self.Drop.Armor**//(X, Y, Z)// Drop a item on the Armor to the ground |
| |
| **Self.Drop.RightHand**//(X, Y, Z)// Drop a item on the RightHand (->) to the ground |
| |
| **Self.Drop.LeftHand**//(X, Y, Z)// Drop a item on the LeftHand (<-) to the ground |
| |
| **Self.Drop.Legs**//(X, Y, Z)// Drop a item on the Legs to the ground |
| |
| **Self.Drop.Boots**//(X, Y, Z)// Drop a item on the Boots to the ground |
| |
| **Self.Drop.Ring**//(X, Y, Z)// Drop a item on the Ring to the ground |
| |
| **Self.Drop.Ammo**//(X, Y, Z)// Drop a item on the Ammo to the ground |
| |
| ===== Player Pickup Equip ===== |
| |
| **Self.PickUp.Helmet**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Helmet slot |
| |
| **Self.PickUp.Amulet**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Amulet slot |
| |
| **Self.PickUp.Backpack**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Backpack slot |
| |
| **Self.PickUp.Armor**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Armor slot |
| |
| **Self.PickUp.RightHand**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the RightHand slot |
| |
| **Self.PickUp.LeftHand**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the LeftHand slot |
| |
| **Self.PickUp.Legs**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Legs slot |
| |
| **Self.PickUp.Boots**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Boots slot |
| |
| **Self.PickUp.Ring**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Ring slot |
| |
| **Self.PickUp.Ammo**//(ID, X, Y, Z, Range)// Pickup a item from the ground to the Ammo slot |
| |
| ===== NPC Trading ===== |
| |
**NPC.Buy**//(ID, Count, IgnoreCap)// Buy a item on the Trade, requires the Trade open before using the macro (by saying Hi,Trade) | **NPC.Buy**//(ID, Count, IgnoreCap)// Buy a item on the Trade, requires the Trade open before using the macro (by saying Hi,Trade) |
**NPC.Say**//(Text)// Say a text in the special NPC channel | **NPC.Say**//(Text)// Say a text in the special NPC channel |
| |
===== Working with Maps ===== | **NPC.Trade.Money**//()// The player current money gathered from NPC Trade window |
| |
| ===== Working with Maps ===== |
| |
**Map.UseOn**//(ID, OnID, X, Y, Z, Range)// Use a item on the Map (shovel) (Returns: Yes=1; No=0) | **Map.UseOn**//(ID, OnID, X, Y, Z, Range)// Use a item on the Map (shovel) (Returns: Yes=1; No=0) |
| |
===== Working with Creatures ===== | ===== Working with Creatures ===== |
| |
| |
**Creature.ByName**//(Name)// Gather a ID from the first creature with the name given found | **Creature.ByName**//(Name)// Gather a ID from the first creature with the name given found |
**Creature.Speed**//(ID)// Returns the absolute speed value of the creature with the given ID | **Creature.Speed**//(ID)// Returns the absolute speed value of the creature with the given ID |
| |
**Creature.DistanceToSelf**//(Calculate the distance from the creature with the given ID to the player)// 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 (Returns: Yes=1; No=0) | **Creature.NameIn**//(ID, Name,Na..)// Verify if the creature from the given ID name is in the list (Returns: Yes=1; No=0) |
| |
===== Creature Statistics ===== | ===== Creature Statistics ===== |
| |
| |
**Creatures.Beside**//()// Count the number of creatures in a 1 sqm range | **Creatures.Beside**//()// Count the number of creatures in a 1 sqm range |
**Creatures.NPCOnScreen**//()// Counts the number of NPC or Monsters in the screen | **Creatures.NPCOnScreen**//()// Counts the number of NPC or Monsters in the screen |
| |
===== Misc functions ===== | **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.ShootCount**//(InLastSeconds)// Return the number of magic shoot effects in a certain number of seconds |
| |
**Protectors.Disable**//(Name)// Disable a protector by its name | **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.Enable**//(Name)// Enable a protector by its name |
| |
| **Protectors.UnPause**//(Name)// Enable a protector by its name |
| |
**Protectors.DisableAll**//()// Disable all the Protectors | **Protectors.DisableAll**//()// Disable all the Protectors |
| |
| **Protectors.PauseAll**//()// Disable all the Protectors |
| |
**Protectors.EnableAll**//()// Enable 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.SendKey**//(VirtualKeyCode)// Send a key to the Tibia |
| |
**Tibia.Close**//()// Close the Tibia process | **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 |
| |
| |