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
macros_commands [2012/09/05 18:37]
dexter [Cavebot]
macros_commands [2021/11/15 16:43] (current)
Line 1: Line 1:
-====== Macros Commands ====== 
  
-===== Map =====+====== Macro Commands ======
  
-**Map.HasID**(//ID, X, Y, Z//) returns 1 if the position has the ID.+===== Creating Variables =====
  
-**Map.UseOn**(//ID, OnID, X, Y, Z, Range//use one item on the ground ( sampleskey in a door, fire bug in the silk wall ).+To create variables you must use the following syntax:
  
-**Map.Use**(//ID, X, Y, Z, Range//) use a item in the ground ( samples: door, ladder ).+**VariableName** := //DefaultValue//
  
-**Map.Thrown**(//ID, Count, X, Y, Z//) drops an item on the ground.+Example:
  
-**Map.PickUp**(//ID, Count, Container, X, Y, Z//) pick up an item on the ground.+**HP**:=//Self.Health()//
  
-**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. +**MagicNumber**:=//3529//
-===== NPC =====+
  
-**NPC.Buy**(//ID, Count, IgnoreCap//) buy X (count) items of ID, IgnoreCap is a NPC propertie (1 to ignore, 0 to not ignore).+===== Using Variables =====
  
-**NPC.BuyInBP**(//IDCount, IgnoreCap//) NPC.Buy but buy items inside backpacks.+You can use the variables in many places of the BBotto use a variable use this syntax:
  
-**NPC.Sell**(//ID, Count//) sell a item, if the count is -1 then you sell all the items from your backpacks.+**!**//VariableName//**!**
  
-**NPC.Say**(//Text//) send a message in the NPC channel.+Self.Say(**!**//HP//**!** or shorthand **!**//HP//)
  
-===== VIP =====+SecondMagicNumber:=**!**//MagicNumber//**!** 
 +ThirdMagicNumber:=**!**//MagicNumber//
  
-**Vip.Online**(//Name//) returns 1 if the friend is online+Variables can be used in the FullCheck and some other features of the BBot. 
 +===== Internals =====
  
-===== Hotkeys =====+**Exit**//()// Stop the macro execution
  
-**Hotkey.Use**(//ID//) use item (sample: food)+**Label**//(Name)// Go to Label
  
-===== Misc =====+**GoLabel**//(Name)// Go to a Label
  
-**Misc.Alert**(//Message//) start a alarm with a custom message.+**Comment**//()// No-op
  
-**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)+**VarSet**//(Name, Value)// Set the variable to given value
  
-**Misc.AttackersCount**(//InLastSeconds//) return the count of attacks received.+**VarGet**//(Name)// Return the INT value of a variable by its name (only for numeric variables!!)
  
-**Misc.HPLose**(//InLastSeconds//) returns the losen hp in the last seconds.+**HasVar**//(VarName)// If a variable exists
  
-**Misc.LoadUrl**(//Url//) load a URL (advanced)+**GenWikiDoc**//()// Generates the Macro Documentation in the BBot.Macros.Documentation.txt file
  
-**Misc.LogFile**(//File, Text//) append a text to the file.+===== Math =====
  
-**Misc.HPGain**(//InLastSeconds//) returns the gained hp in the last seconds.+**VarAdd**//(Name, Value)// Increase the variable by a given value
  
-**Misc.HPDelta**(//InLastSeconds//) returns the delta of gained/losen hp in the last seconds.+**VarSub**//(Name, Value)// Decrease the variable by a given value
  
-**Misc.HPHitsBigger**(//InLastSecondsBiggerThan//) returns the number of hits with damage higher than the BiggerThan.+**VarMult**//(NameValue)// Multiplies the variable by the given value
  
-**Misc.StandTime** returns the time you are in the same sqm.+**VarDiv**//(Name, Value)// Divides the variable by the given value
  
-**Misc.ItemCount**(//ItemName//) returns the item count (the item count is the one in hotkey messages, You are using one of xx health potions).+**VarMod**//(Name, Value)// Returns the modulos remainder of the Variable by the Value
  
-**Misc.ItemCountEx**(//Item ID//) returns the item count (the item count is the one in hotkey messagesYou are using one of xx health potions).+**Add**//(AB)// Return A + B
  
-**BBot.TogglePause**//()// activate/desactivate the BBot.+**Sub**//(A, B)// Return A - B
  
-**BBot.ToggleVisible**//()// show/hide the BBot.+**Mult**//(A, B)// Return A * B
  
-**BBot.ToggleStats**//()// show/hide Statistics.+**Div**//(A, B)// Return A B (integer)
  
-**BBot.LevelSpyReset**//()// turns back to your floor.+**Mod**//(A, B)// Return A % B (modulos remainder)
  
-**BBot.LevelSpyUp**//()// looks one floor up.+**Smallest**//(A, B, C...)// Return smallest of all the parameters
  
-**BBot.LevelSpyDown**//()// looks one floor down.+**Greatest**//(A, B, C...)// Return greatest of all the parameters
  
-**Misc.SystemTime.Hour**//()// returns system's clock hour.+===== String =====
  
-**Misc.SystemTime.Minute**//()// returns system's clock minute.+**Str.Set**//(StrVariableName, StrValue)// Set variable name to STR value
  
-**Misc.SystemTime.Second**//()// returns system's clock second.+**Str.Copy**//(StrInputVariable, StrOutputVariable)// Copy a Input variable into a Output variable
  
-**Tibia.KeyDown**(//Key Decimal Value//) returns 1 if the determined key is pressed. You can see all key codes here: [[Virtual Key Codes]]+**Str.VarEquals**//(StrVariableNameA, StrVariableNameB)// Check if two STR variables are equals (non-sensitive)
  
-**Killer.Start**//()// starts the Killer.+**Str.VarEqualsSensitive**//(StrVariableNameA, StrVariableNameB)// Check if two STR variables are equals (sensitive)
  
-**Killer.Stop**//()// stops the Killer.+**Str.Equals**//(StrA, StrB)// Check if two strings are equals
  
-**Trainer.Start**//()// starts the Trainer.+**Str.EqualsSensitive**//(StrA, StrB)// Check if two strings are equals (sensitive)
  
-**Trainer.Stop**//()// stops the Trainer. +**Str.Regex**//(PatternVariableName, SubjectVariableName)// Check SubjectVariable content matches to PatternVariable content regex, outputs to !Str.MatchSucced, !Str.MatchFailed, !Str.Match.0, !Str.Match.1 [..] !Str.Match.9
-===== HUD =====+
  
-**HUD.Display**(//Text//) display HUD Text in the center of the screen.+**Str.Upper**//(StrVariableName)// Makes string variable uppercase
  
-**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).+**Str.Lower**//(StrVariableName)// Makes a string variable lowercase
  
-===== Cavebot =====+**Str.Reverse**//(StrVariableName)// Reverses a string variable
  
-**Cavebot.Start**//()// starts the cavebot.+**Str.ToHex8**//(OutHex8, Int8)// Convert a number to Hex8 string representation
  
-**Cavebot.Stop**//()// stops the cavebot.+**Str.ToHex16**//(OutHex16, Int16)// Convert a number to Hex16 string representation
  
-**CaveBot.GoStart**//()// makes the cavebot reset to the start of the script.+**Str.ToHex32**//(OutHex32, Int32)// Convert a number to Hex32 string representation
  
-**CaveBot.GoLabel**(//Label//) makes the cavebot jump to a label inside the waypoint. +===== Cooldown variables =====
-===== Macro =====+
  
-**Macro.Wait**(//Delay//) sleep the macro for time.+**Cooldown.Create**//(CooldownName, Delay)// Create cooldown named CooldownName with Delay
  
-**Exit**() exit command group. +**Cooldown.Clear**//(CooldownName)// Clear cooldown named CooldownName
-===== Self.Skill =====+
  
-**Self.Skill.Fist**+**Cooldown.Rest**//(CooldownName)// How many miliseconds Cooldown will be still active (or return 0)
  
-**Self.Skill.Club**+**Cooldown.Blocked**//(CooldownName)// Verifies if there is an active Cooldown named CooldownName
  
-**Self.Skill.Axe**+**Cooldown.UnBlocked**//(CooldownName)// Verifies if there is not an active Cooldown named CooldownName
  
-**Self.Skill.Sword**+**When.Cast**//(WhenName)// Cast a when event
  
-**Self.Skill.Distance**+**When.UnWatch**//()// Unwatches for all the When event
  
-**Self.Skill.Shielding**+**When.AnyMessage**//(WhenLabel, MessagePattern)// Add a When listener for all kinds of messages (avoid: bad performance)
  
-**Self.Skill.Fishing**+**When.Say**//(WhenLabel, MessagePattern)// Add a When listener for Say messages, when the current character says something
  
-returns the respective skill level.+**When.Yell**//(WhenLabel, MessagePattern)// Add a When listener for Yell messages, when the current character says something
  
-===== Self.Skill% =====+**When.SystemMessage**//(WhenLabel, MessagePattern)// Add a When listener for System kind of messages
  
-**Self.Skill.Fist%**+**When.PlayerMessage**//(WhenLabel, MessagePattern)// Add a When listener for Player kind of messages
  
-**Self.Skill.Club%**+**When.PrivateMessage**//(WhenLabel, MessagePattern)// Add a When listener for Private kind of messages
  
-**Self.Skill.Axe%**+**When.NPCMessage**//(WhenLabel, MessagePattern)// Add a When listener for NPC kind of messages
  
-**Self.Skill.Sword%**+===== Player State =====
  
-**Self.Skill.Distance%**+**Self.Health**//()// Absolute player health
  
-**Self.Skill.Shielding%**+**Self.Health%**//()// Percent player health
  
-**Self.Skill.Fishing%**+**Self.HealthMax**//()// Absolute max player health
  
-returns the percent of the respective skill.+**Self.Mana**//()// Absolute player mana
  
-===== Self.MagicLevel =====+**Self.Mana%**//()// Percent player mana
  
-**Self.MagicLevel** returns the magic level.+**Self.ManaMax**//()// Absolute max player mana
  
-===== Self.MagicLevel% =====+**Self.StaminaMins**//()// The player stamina minutes
  
-**Self.MagicLevel%** returns the percent of your magic level.+**Self.Stamina%**//()// The percent of the player stamina
  
-===== Self.Inventory =====+**Self.Soul**//()// The soul of the player
  
-**Self.Inventory.RightHand**+**Self.Experience**//()// The experience of the player
  
-**Self.Inventory.LeftHand**+**Self.ExpToNextLevel**//()// The experience left to the next level
  
-**Self.Inventory.Legs**+**Self.Level**//()// The current player level
  
-**Self.Inventory.Boots**+**Self.Level%**//()// The current percent of the player level
  
-**Self.Inventory.Ring**+**Self.Attacking**//()// Is the player attacking -> :True | :False
  
-**Self.Inventory.Ammunition**+**Self.MagicLevel**//()// The player magic level
  
-**Self.Inventory.Helmet**+**Self.MagicLevel%**//()// The player magic level percent
  
-**Self.Inventory.Amulet**+**Self.Capacity**//()// The player capacity
  
-**Self.Inventory.Backpack**+**Self.X**//()// The player global position X
  
-**Self.Inventory.Armor**+**Self.Y**//()// The player global position Y
  
-return your inventory item ID.+**Self.Z**//()// The player global position Z
  
-===== Self.Inventory.Count =====+**Self.Mount**//()// The player mount id
  
-**Self.Inventory.Backpack.Count**()+**Self.Balance**//()// The player current balance gathered from NPC Trade window
  
-**Self.Inventory.Armor.Count**()+**Self.Direction**//()// The player direction -> :North | :East | :South | :West | :NorthEast | :SouthEast | :SouthWest | :NorthWest
  
-**Self.Inventory.Amulet.Count**()+===== Player Status =====
  
-**Self.Inventory.Helmet.Count**()+**Status.Poison**//()// The player poison status -> :True | :False
  
-**Self.Inventory.Ammunition.Count**()+**Status.Fire**//()// The player burning status -> :True | :False
  
-**Self.Inventory.Ring.Count**()+**Status.Energy**//()// The player electrified status -> :True | :False
  
-**Self.Inventory.Boots.Count**()+**Status.Drunk**//()// The player good drunk status -> :True | :False
  
-**Self.Inventory.Legs.Count**()+**Status.ManaShield**//()// The player mana shield status -> :True | :False
  
-**Self.Inventory.LeftHand.Count**()+**Status.Paralysis**//()// The player paralysis status -> :True | :False
  
-**Self.Inventory.RightHand.Count**()+**Status.Haste**//()// The player haste status -> :True | :False
  
-Returns the amount of items that you have on the inventory slots.+**Status.Battle**//()// The player in battle status -> :True | :False
  
-===== Status =====+**Status.Underwater**//()// The player under water status -> :True | :False
  
-**Status.ManaShield** returns 1 if Magic/Mana shield is actived.+**Status.Freezing**//()// The player freezing status -> :True | :False
  
-**Status.Paralysis** returns 1 if you are Paralyzed.+**Status.Dazzled**//()// The player dazzled status -> :True | :False
  
-**Status.Haste** returns 1 if you are Hasted.+**Status.Cursed**//()// The player cursed status -> :True | :False
  
-**Status.Battle** returns 1 if you are with Battle (normal swords).+**Status.Buff**//()// The player strengthened or buffered status -> :True | :False
  
-**Status.Underwater** returns 1 if you are Underwater.+**Status.PZBlock**//()// The player PZ block (cannot logout, enter pz) status -> :True | :False
  
-**Status.Freezing** returns 1 if you are Freezing.+**Status.InPZ**//()// The player inside protection zone status -> :True | :False
  
-**Status.Dazzled** returns 1 if you are Dazzled.+**Status.NoLight**//()// The player no light status -> :True | :False
  
-**Status.Cursed** returns 1 if you are Cursed.+**Status.Bleeding**//()// The player bleeding status -> :True | :False
  
-**Status.Buff** returns 1 if you are Party Buffed.+**Status.Invisible**//()// The player invisible status -> :True | :False
  
-**Status.PZBlock** returns 1 if you are with Battle (red swords).+===== Player Inventory =====
  
-**Status.InPZ** returns 1 if you are inside protection zone.+**Self.Inventory.Helmet**//()// The player Helmet slot item id
  
-**Status.NoLight** returns 1 if you are without any light.+**Self.Inventory.Amulet**//()// The player Amulet slot item id
  
-**Status.Poison** returns 1 if you are Poisoned.+**Self.Inventory.Backpack**//()// The player Backpack slot item id
  
-**Status.Fire** returns 1 if you are Burning.+**Self.Inventory.Armor**//()// The player Armor slot item id
  
-**Status.Energy** returns 1 if you are Energy.+**Self.Inventory.RightHand**//()// The player Right Hand (->) slot item id
  
-**Status.Drunk** returns 1 if you are Drunked.+**Self.Inventory.LeftHand**//()// The player Left Hand (<-) slot item id
  
-**Status.Invisible** returns 1 if you are Invisible.+**Self.Inventory.Legs**//()// The player Legs slot item id
  
-===== Self.UnEquip =====+**Self.Inventory.Boots**//()// The player Boots slot item id
  
-**Self.UnEquip.Legs**(//To Container//)+**Self.Inventory.Ring**//()// The player Ring slot item id
  
-**Self.UnEquip.Boots**(//To Container//)+**Self.Inventory.Ammunition**//()// The player Ammunition slot item id
  
-**Self.UnEquip.Ring**(//To Container//)+**Self.Inventory.Helmet.Count**//()// The player Helmet slot item count
  
-**Self.UnEquip.Ammo**(//To Container//)+**Self.Inventory.Amulet.Count**//()// The player Amulet slot item count
  
-**Self.UnEquip.Helmet**(//To Container//)+**Self.Inventory.Backpack.Count**//()// The player Backpack slot item count
  
-**Self.UnEquip.Amulet**(//To Container//)+**Self.Inventory.Armor.Count**//()// The player Armor slot item count
  
-**Self.UnEquip.Backpack**(//To Container//)+**Self.Inventory.RightHand.Count**//()// The player Right Hand (->slot item count
  
-**Self.UnEquip.Armor**(//To Container//)+**Self.Inventory.LeftHand.Count**//()// The player Left Hand (<-slot item count
  
-**Self.UnEquip.RightHand**(//To Container//)+**Self.Inventory.Legs.Count**//()// The player Legs slot item count
  
-**Self.UnEquip.LeftHand**(//To Container//)+**Self.Inventory.Boots.Count**//()// The player Boots slot item count
  
-puts your inventory item in a container (0 is your main container).+**Self.Inventory.Ring.Count**//()// The player Ring slot item count
  
-===== Self.Equip =====+**Self.Inventory.Ammunition.Count**//()// The player Ammunition slot item count
  
-**Self.Equip.Legs**(//ID//)+**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.Equip.Boots**(//ID//)+**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.Equip.Ring**(//ID//)+**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.Equip.Ammo**(//ID//)+===== Player Skills =====
  
-**Self.Equip.Helmet**(//ID//)+**Self.Skill.Fist**//()// The current First skill level
  
-**Self.Equip.Amulet**(//ID//)+**Self.Skill.Club**//()// The current Club skill level
  
-**Self.Equip.Backpack**(//ID//)+**Self.Skill.Axe**//()// The current Axe skill level
  
-**Self.Equip.Armor**(//ID//)+**Self.Skill.Sword**//()// The current Sword skill level
  
-**Self.Equip.RightHand**(//ID//)+**Self.Skill.Distance**//()// The current Distance skill level
  
-**Self.Equip.LeftHand**(//ID//)+**Self.Skill.Shielding**//()// The current Shielding skill level
  
-puts a item of your containers in your inventory.+**Self.Skill.Fishing**//()// The current Fishing skill level
  
-===== Self.Turn =====+**Self.Skill.Fist%**//()// The current First skill percent
  
-**Self.TurnN** turns your character to the North.+**Self.Skill.Club%**//()// The current Club skill percent
  
-**Self.TurnS** turns your character to the South.+**Self.Skill.Axe%**//()// The current Axe skill percent
  
-**Self.TurnE** turns your character to the East.+**Self.Skill.Sword%**//()// The current Sword skill percent
  
-**Self.TurnW** turns your character to the West.+**Self.Skill.Distance%**//()// The current Distance skill percent
  
-===== Self.Moves =====+**Self.Skill.Shielding%**//()// The current Shielding skill percent
  
-**Self.MoveTo**(//X, Y, Z//) moves your character to the position.+**Self.Skill.Fishing%**//()// The current Fishing skill percent
  
-**Self.MoveN** moves your character one sqm to the north.+===== Player Actions =====
  
-**Self.MoveS** moves your character one sqm to the south.+**Self.Say**//(Text)// Say a text in the default channel
  
-**Self.MoveE** moves your character one sqm to the east.+**Self.Whisper**//(Text)// Whisper a text in the default channel
  
-**Self.MoveW** moves your character one sqm to the west.+**Self.Yell**//(Text)// Yell a text in the game
  
-**Self.MoveNE** moves your character one sqm to the north-east.+**Self.PrivateMessage**//(ToPlayer, Text)// Send a private message to a player
  
-**Self.MoveNW** moves your character one sqm to the north-west.+**Self.Stop**//()// Stop current action
  
-**Self.MoveSE** moves your character one sqm to the south-east.+**Self.PositionIn**//(X1, Y1, Z1, X2, Y2, Z2)// Check if the player is in a position box -> :True | :False
  
-**Self.MoveSW** moves your character one sqm to the south-west.+**Self.MoveTo**//(X, Y, Z)// Walk to a position
  
-===== Self Actions =====+**Self.MoveN**//()// Step one sqm to the north
  
-**Self.Stop** stops the attacking/following /walking.+**Self.StepNorth**//()// Step one sqm to the north
  
-**Self.Say**(//Text//) sends a message.+**Self.MoveS**//()// Step one sqm to the south
  
-**Self.Logout** makes your character logout only when no battle sign.+**Self.StepSouth**//()// Step one sqm to the south
  
-**Self.Yell**(//Text//) yell a message.+**Self.MoveE**//()// Step one sqm to the east
  
-**Self.PositionIn**(//X1, Y1, Z1, X2, Y2, Z2//) returns 1 if your character is in the position square. +**Self.StepEast**//()// Step one sqm to the east
-===== Self.Properties =====+
  
-**Self.Health** returns your HP.+**Self.MoveW**//()// Step one sqm to the west
  
-**Self.Health%** returns your HP in percent.+**Self.StepWest**//()// Step one sqm to the west
  
-**Self.HealthMax** returns your HP max.+**Self.MoveNE**//()// Step one sqm to the north east
  
-**Self.Mana** returns your Mana.+**Self.StepNorthEast**//()// Step one sqm to the north east
  
-**Self.Mana%** returns your Mana in percent.+**Self.MoveNW**//()// Step one sqm to the north west
  
-**Self.ManaMax** returns your ManaMax.+**Self.StepNorthWest**//()// Step one sqm to the north west
  
-**Self.StaminaMins** returns the stamina left in minutes.+**Self.MoveSE**//()// Step one sqm to the south east
  
-**Self.Stamina%** returns the stamina left in percents.+**Self.StepSouthEast**//()// Step one sqm to the south east
  
-**Self.Capacity** returns your capacity.+**Self.MoveSW**//()// Step one sqm to the south west
  
-**Self.Soul** returns your soul.+**Self.StepSouthWest**//()// Step one sqm to the south west
  
-**Self.Experience** returns your experience.+**Self.Logout**//()// Logout the player as soon as possible (stop cavebot and wait for logout unblock)
  
-**Self.ExpToNextLevel** returns the experience to the next level.+**Self.TurnN**//()// Turn the player to the north
  
-**Self.X** returns your X position.+**Self.TurnNorth**//()// Turn the player to the north
  
-**Self.Y** returns your Y position.+**Self.TurnS**//()// Turn the player to the south
  
-**Self.Z** returns your Z position.+**Self.TurnSouth**//()// Turn the player to the south
  
-**Self.Level** returns your Level.+**Self.TurnE**//()// Turn the player to the east
  
-**Self.Level%** returns your Level percent.+**Self.TurnEast**//()// Turn the player to the east
  
-**Self.Attacking** returns 1 if your char is attacking.+**Self.TurnW**//()// Turn the player to the west
  
-**Self.Mount** returns 1 if you are riding your mount.+**Self.TurnWest**//()// Turn the player to the west
  
 +**Self.ReOpenBackpacks**//()// Closes and open the player backpacks
  
-===== Creatures =====+**Self.ToggleMinimizeBackpack**//(Index)// Toggle a backpack minimize state
  
-**Creatures.Beside** returns the number of creatures beside (distance <=1).+**Self.SayInChannel**//(ChannelID, Words)// Send a message to a channel ID
  
-**Creatures.OnScreen** returns the number of the creatures in your screen.+**Self.ToggleMount**//()// Toggle the player mount
  
-**Creatures.ByRange**(//Range//) returns the number of creatures in range.+**Self.Backpacks.UseOn**//(UseID, UseOn)// Use item on a item inside your backpack
  
-**Creatures.Killed**(//Name//) returns the number of creatures killed by name.+**Self.OpenBackpacks**//()// Return the number of open backpacks
  
-**Creatures.PlayersOnScreen** returns the number of players on screen.+===== Player Inventory Equip =====
  
-**Creatures.PlayersOnRange**(//Range//) returns the number of players in range.+**Self.Equip.Helmet**//(ID)// Equip item on the Helmet slot
  
-**Creatures.TaskKilled**(//Name//) returns the number of creatures killed by name. You can use this with Full Check to complete tasks. +**Self.Equip.Amulet**//(ID)// Equip a item on the Amulet slot
-===== Target =====+
  
-**Target.ByName**(//Name//) targets creature with the name.+**Self.Equip.Backpack**//(ID)// Equip item on the Backpack slot
  
-**Target.Foe** targets the creature you are attacking.+**Self.Equip.Armor**//(ID)// Equip a item on the Armor slot
  
-**Target.Self** targets yourself.+**Self.Equip.RightHand**//(ID)// Equip a item on the Right Hand (->) slot
  
-**Target.Health** returns the target hp (in %).+**Self.Equip.LeftHand**//(ID)// Equip a item on the Left Hand (<-slot
  
-**Target.Speed** returns the target speed.+**Self.Equip.Legs**//(ID)// Equip a item on the Legs slot
  
-**Target.Distance** returns the target distance to your char.+**Self.Equip.Boots**//(ID)// Equip a item on the Boots slot
  
-**Target.NameIn**(//Name, Na..//) returns 1 if the name of the Target is in the list.+**Self.Equip.Ring**//(ID)// Equip a item on the Ring slot
  
-**Target.Shoot**(//Ammo//) shoot a item in the target (sample: ID '3155' shoots a sudden death in the Target).+**Self.Equip.Ammo**//(ID)// Equip a item on the Ammunition slot
  
-===== Variables =====+**Self.Equip**//(Slot, ID)// Equip a item into slot. Slots: Helmet, Head, Amulet, Backpack, Armor, RightHand, Right, LeftHand, Left, Legs, Boots, Ring, Ammunition, Ammo
  
-**VarDiv**(Name, Value) divides the variable by the value (x / value).+===== Player Inventory UnEquip =====
  
-**VarMult**(Name, Valuemultiplies the variable by the value (x * value).+**Self.UnEquip.Helmet**//(ToContainer)// Unequip the Helmet slot and put the item on the given container index
  
-**VarAdd**(NameValueadds to the variable the value (x + value).+**Self.UnEquip.Amulet**//(ToContainer)// Unequip the Amulet slot and put the item on the given container index 
 + 
 +**Self.UnEquip.Backpack**//(ToContainer)// Unequip the Backpack and put the item on the given container index 
 + 
 +**Self.UnEquip.Armor**//(ToContainer)// Unequip the Armor slot and put the item on the given container index 
 + 
 +**Self.UnEquip.RightHand**//(ToContainer)// Unequip the Right Hand (->) slot and put the item on the given container index 
 + 
 +**Self.UnEquip.LeftHand**//(ToContainer)// Unequip the Left Hand (<-) slot and put the item on the given container index 
 + 
 +**Self.UnEquip.Legs**//(ToContainer)// Unequip the Legs slot and put the item on the given container index 
 + 
 +**Self.UnEquip.Boots**//(ToContainer)// Unequip the Boots slot and put the item on the given container index 
 + 
 +**Self.UnEquip.Ring**//(ToContainer)// Unequip the Ring 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 
 + 
 +**Self.UnEquip**//(SlotToContainer)// 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 
 + 
 +===== Party ===== 
 + 
 +**Party.Status**//(ID)// Return the party status for given creature id -> :None | :Invited | :Inviting | :Member | :Leader | :OtherParty 
 + 
 +**Party.IsShared**//()// Return if the party is sharing exp 
 + 
 +**Party.CanShared**//()// Return if the party is sharing exp 
 + 
 +**Party.Invite**//(ID)// Invite given ID party 
 + 
 +**Party.Inviting**//(ID)// Return if given creature ID is inviting you to party 
 + 
 +**Party.Revoke**//(ID)// Revoke party invitation for given ID 
 + 
 +**Party.Join**//(Leader)// Join party of given leader creature id 
 + 
 +**Party.PassLeader**//(Leader)// Pass the leadership to a new given leader id 
 + 
 +**Party.Leave**//()// Leave the current party 
 + 
 +**Party.ToggleShared**//()// Enable or disable party shared exp 
 + 
 +===== 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.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) 
 + 
 +**NPC.SellAll**//(ID)// Sell item to the Trade, requires the Trade open before using the macro (by saying Hi,Trade) 
 + 
 +**NPC.Sell**//(ID, Count)// Sell item to 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.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) -> :True | :False 
 + 
 +**Map.Use**//(ID, X, Y, Z, Range)// Use a item from the Map (Ports) -> :True | :False 
 + 
 +**Map.HasID**//(ID, X, Y, Z)// Check if a map position has a item -> :True | :False 
 + 
 +**Map.Thrown**//(ID, Count, X, Y, Z)// Thrown a item on the map from your backpacks -> :True | :False 
 + 
 +**Map.PickUp**//(ID, Count, ContainerTo, X, Y, Z)// Pick a item from the map -> :True | :False 
 + 
 +**Map.PickUpEx**//(ID, Count, ContainerTo, X, Y, Z, Range)// Pick a item from the map in a range -> :True | :False 
 + 
 +**Map.ItemsOnTile**//(X, Y, Z)// Return the number of items on given SQM 
 + 
 +**Map.Item.ID**//(X, Y, Z, Index)// Return item ID on given SQM and Index 
 + 
 +**Map.Item.Count**//(X, Y, Z, Index)// Return item Count on given SQM and Index 
 + 
 +**Map.ItemOnTop.ID**//(X, Y, Z)// Return item ID on given SQM top index 
 + 
 +**Map.ItemOnTop.Count**//(X, Y, Z)// Return item Count on given SQM top index 
 + 
 +**Map.CreatureOnTop.ID**//(X, Y, Z)// Return creature ID on given SQM top index 
 + 
 +**Map.Find**//(ID, X, Y, Z, Range, OnlyTopItem?)// Find a item by ID in a range, outputs to !Found.X, !Found.Y and !Found.Z, also returns  -> :True | :False 
 + 
 +**Map.UseOn.Equip**//(UseID, X, Y, Z, OnSlot)// Use a item from the map on an equipament -> :True | :False 
 + 
 +===== Working with Creatures ===== 
 + 
 +**Creature.ByName**//(Name)// Gather a ID from the first creature with the name given found 
 + 
 +**Creature.Attacking**//()// Gather the ID from the creature being attacked 
 + 
 +**Creature.Target**//()// Gather the ID from the creature being attacked 
 + 
 +**Creature.Self**//()// Gather the ID from the player 
 + 
 +**Creature.Health**//(ID)// Returns the health percent of the creature with the given ID 
 + 
 +**Creature.IsAlive**//(ID)// Returns creature is alive 
 + 
 +**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 -> :True | :False 
 + 
 +**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 -> :True | :False 
 + 
 +**Creature.IsNPC**//(ID)// Check if a creature is NPC or a Monster -> :True | :False 
 + 
 +**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.Iterator**//(VariableName)// Initialize a creature iterator variable 
 + 
 +**Creature.Next**//(CreatureIterator, NextLabel)// Iterates to NextLabel if CreatureIterator has new valid creature state 
 + 
 +===== 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.OnScreenParty**//()// Count the number of creatures in the screen in party 
 + 
 +**Creatures.ByRange**//(Range)// Count the number of creatures in a sqm range 
 + 
 +**Creatures.ByRangeParty**//(Range)// Count the number of creatures in a sqm range in party 
 + 
 +**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. HAligns = :HLeft | :HCenter | :HRight; VAligns = :VTop | :VMiddle | :VBottom 
 + 
 +**HUD.Print**//(HAlign, VAlign, R, B, G, Expire, Text)// Show a HUD in the game screen with specific settings. HAligns = :HLeft | :HCenter | :HRight; VAligns = :VTop | :VMiddle | :VBottom 
 + 
 +**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 
 + 
 +**CaveBot.NoKill**//(enabled)// Start or stop a NoKill state 
 + 
 +**Killer.Start**//()// Start the Killer 
 + 
 +**Killer.Stop**//()// Stop the Killer 
 + 
 +**OpenCorpses.Pause**//()// Pause the Open Corpses feature 
 + 
 +**OpenCorpses.UnPause**//()// Unpause the Open Corpses feature 
 + 
 +**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 
 + 
 +**Misc.SystemTime.Tick**//()// Returns the system TICK 
 + 
 +**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 
 + 
 +**Debug.Log**//(Message)// Log a message to Macro Debugger 
 + 
 +**Misc.Click**//(X, Y)// Send a mouse click 
 + 
 +**Misc.ClickEx**//(X, Y)// Send a mouse click 
 + 
 +**Misc.SendPacket**//(Buffer)// Send a packet to the server, make sure you know what the hell youre doing 
 + 
 +===== Container Functions ===== 
 + 
 +**Containers.TotalOpen**//()// Number of Open Containers 
 + 
 +**Container.Name**//(ContainerIndex, NameVar)// Sets NameVar to ContainerIndex container name 
 + 
 +**Container.IsOpen**//(ContainerIndex)// Return if the container is open  -> :True | :False 
 + 
 +**Container.Capacity**//(ContainerIndex)// Return the capacity of a container 
 + 
 +**Container.Items**//(ContainerIndex)// Return the amount of items in a container 
 + 
 +**Container.Icon**//(ContainerIndex)// Return the IconID of a container 
 + 
 +**Container.IsCorpse**//(ContainerIndex)// Return if the container is a corpse  -> :True | :False 
 + 
 +**Container.IsDepot**//(ContainerIndex)// Return if the container is a depot  -> :True | :False 
 + 
 +**Container.Item.ID**//(ContainerIndex, SlotIndex)// Return item id at a container/slot 
 + 
 +**Container.Item.Count**//(ContainerIndex, SlotIndex)// Return item id at a container/slot 
 + 
 +**Container.Find**//(ItemID)// Find a item in the containers, output to !Found.Succeed, !Found.Container and !Found.Slot  -> :True | :False 
 + 
 +**Container.Item.Use**//(ContainerIndex, SlotIndex)// Use the item at a container/slot 
 + 
 +**Container.Item.UseOn**//(ContainerIndex, SlotIndex, UseOnId)// Use an item in this container/slot 
 + 
 +**Container.Item.Move**//(FromContainer, FromSlot, ToContainer, Count)// Move a item from a container to another 
 + 
 +**Container.Item.MoveToPos**//(FromContainer, FromSlot, X, Y, Z, Count)// Move a item from a container to a position
  
-**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. 
macros_commands.1346870264.txt.gz · Last modified: 2021/11/15 16:43 (external edit)