| altability | array | buff | character | ground | group | groupmember | item |
| plugin | skill | spawn | spell | string | switch | time | timer |
| type | window | zone |
| argb | bool | body | byte | class | corpse | deity | evolving |
| float | heading | int | invslot | ticks | race | raidmember |
| currentzone | macro | macroquest | math | merchant | raid |


[MQ2]Echo - [MQ2] no combat - endingCall Stack
[MQ2]WriteChatColor([MQ2] no combat - ending)
[MQ2]WriteChatColor(Cleared the following: Timers Arrays)
[MQ2]EndMacro - Ended
[MQ2]WriteChatColor(The current macro has ended.)
>>>First-chance exception at 0x03002e30 (MQ2Main.dll) in eqgame.exe: 0xC0000005: Access violation reading location 0x0127bde8.
>>>MQ2Main.dll!HideDoCommand(EQData::_SPAWNINFO * pChar=0x423338e8, char * szLine=0x0127bde8, int delayed=0) Line 118 + 0x9 C++Code where the crash occurred
MQ2Main.dll!DoNextCommand() Line 40 C++
MQ2Main.dll!Heartbeat() Line 255 + 0x5 C++
MQ2Main.dll!Detour_ProcessGameEvents() Line 270 C++
eqgame.exe!004acd5f()
ntdll.dll!77f944a8()
ntdll.dll!77f57d70()
ntdll.dll!77f58a3a()
ntdll.dll!77f5d760()
ntdll.dll!77f8696d()
ntdll.dll!77f59bf9()
ntdll.dll!77f5d90e()
ntdll.dll!77f5d8e2()
ntdll.dll!77f944a8()
ntdll.dll!77f944a8()
ntdll.dll!77f57d70()
ntdll.dll!77f58a3a()
MQ2CommandAPI.cpp (line 118)Disassembly
if (Pos==0) {
if (pCommand->Parse) {
pCommand->Function(pChar,ParseMacroParameter(pChar,szParam));
}
else
pCommand->Function(pChar,szParam);
>>>strcpy(szLastCommand,szLine);
return;
}
pCommand->Function(pChar,szParam);Macro Fundamentals
03002E15 mov eax,dword ptr [pChar]
03002E18 lea edx,[esp+1018h]
03002E1F push edx
03002E20 push eax
03002E21 call dword ptr [esi+40h]
03002E24 add esp,8
strcpy(szLastCommand,szLine);
03002E27 mov edx,offset _szLastCommand (3075528h)
03002E2C mov eax,ebx
03002E2E sub edx,ebx
>>>03002E30 mov cl,byte ptr [eax]
03002E32 mov byte ptr [edx+eax],cl
03002E35 inc eax
03002E36 test cl,cl
03002E38 jne HideDoCommand+340h (3002E30h)
return;
Sub MainEverything within Sub Main is performed once you start the macro.
:OnExit
/return
|This is a single line commentMulti line comments can also be used. Multi-line comments begin with |** and end with **|
|** This is a multiple line comment wherePound Commands
you could use this form of commenting **|
Example#include "filename"
#define Me charactername
When the macro executes, when Me occurs, it will be replaced with charactername
ExampleA matching Sub must be used. Custom events are further explained in Subroutines.
#event SpellFizzle "Your spell fizzles"
Matching Sub:
Sub Event_SpellFizzle
/return
global
Variables of global scope ALWAYS exist until they are deleted or macroquest ends
outer
Variables of outer scope exist while a macro is running
local (default)
Variables of local scope only exist while within a macro function or "Sub"
ExamplesArrays
/declare MyVar int outer
Creates an int variable named MyVar that exists while the macro is running
/declare MyVar local
Creates a string variable named MyVar that exists within the Sub it was created in
/declare MyTimer timer outer 3000
Creates a timer named MyTime that is set to 3000 at creation and exists while the macro is running
Array ExamplesThere is no limit to the number of dimensions or the number of elements in each dimension, but use your own good judgement.
MyArray[10] int
Creates a single-dimension local array of int with 10 elements (1-10) all 0
MyArray[10,10] int outer 5
Creates a 2-dimensional 10x10 elements(1-10,1-10) int array of scope outer with all values of 5
MyArray[4,5,6] string outer UNDEFINED-ARRAY-ELEMENT
Creates a 3-dimensional array with 4x5x6 elements (1-4,1-5, 1-6) with UNDEFINED-ARRAY-ELEMENT in each location
Examples/varcalc varname formula
/varset MyString ${MyString}stuff
concatenate a string variable
/varset MyString stuff${MyString}
inserts stuff at the front of ${MyString}
/varset MyInt 123
Sets MyInt to 123
/varset MyTimer 123s
Sets MyTimer to 123 seconds
/varset MyFloat 1.23
Sets MyFloat to 1.23
/varset MyIntArray[n] 123
Sets array element n to 123
Examples/vardata varname newMQ2Datavalue
/varcalc MyInt 1+2*2+1
/varcalc MyInt 1+(2*2)+1
ExampleParsing
/vardata MyFloat Math.Calc[${Me.X}+${Me.Y}]
Example${${MyString}} will get the value of a MQ2Data query stored in MyString. This could be Me.Buff[1], or a variable name, or anything that is valid inside ${}. There is no limit to this recursion.
${MyString${MyVar}}
The parser first evaluates ${MyVar}. If MyVar's value is 1, this is then ${MyString1}.
${MyString1} is then evaluated, giving the value of whatever MyString1 is.
Sub Main
.
code
.
/return
Sub Main(int MyParam1, MyParam2, float MyParam3)
/if (${Defined[MyVar2]}) /goto :DoThis
/call MySub ${var1} ${var3}
/echo This value was returned from MySub: ${Macro.Return}
/return
Sub without defined parameters
Sub MySub
/if (${Defined[Param0]}) /goto :DoThis
.
execute this code when /call MySub is executed. Parameters are not necessary.
.
/return [value|${varname}]
Sub with defined parametersThe above Sub has 3 Parameters, MyParam0 is an int type, MyParam1 is a boolean type , and MyParam2 is a string type.
Sub MySub(int MyParam0, bool MyParam1, MyParam2)
.
execute this code when /call MySub is executed.
.
/return [value|${varname}]
Sub Event_Chat[(ChatType,Sender,ChatText)]
ChatType : Channel of message (tell, group, say)
Sender : Name of the person who sent the message
ChatText : Text they sent
ExampleTimer Events
Sub Event_Chat[(ChatType,Sender,ChatText)]
.
This code is executed when /doevents finds(queues) text in the channel defined by #chat "channel"
.
/return [value|${varname}]
Sub Event_Timer[(Timer,OriginalValue)]
Timer: Timer that fired
OriginalValue : Value timer was originally set to
ExampleCustom Events
Sub Event_Timer[(Timer,OriginalValue)]
.
This code is executed when /doevents detects(queues) any defined timer reaching 0
.
/return [value|${varname}]
Old Event systemThe #1# in the middle of the match text is what you use to indicate "this part of the message should be given to me in a parameter".
#Event SelfEcho "[MQ2] Genbot "
Here is what the new Event look like:
#Event SelfEcho "[MQ2] Genbot #1#"
ExampleMacroQuest2 Commands
#Event SkillUp "You have become better at #1#! (#2#)"
Sub Event_SkillUp(SkillUpText,Skill,int Amount)
/popup ${Skill} increased - ${Amount} ...
/echo ${Skill} increased - ${Amount} ...
/return
SkillUpText = "You have become better at #1#! (#2#)"
Skill = Parameter 1 = #1#
Amount = Parameter 2 = #2#
| list all | Lists all AA abilities available to you (doesn't mean you have them) in format [ID : name] |
| list timers | Lists just the AA you have that have timers |
| info abilityname | Gives information about a particular AA ability |
| act abilityname | Works like "/alt act ##", but takes the name instead of ## (note: You will notice a fraction of a second delay using this method vs. the /alt act ## method.) |
/alias [ list| aliasname delete] [ name command]
Examples
/alert add 1 "spawnname" Adds spawnname to alert list 1 /alert clear # Clears all members from alert list 1 /alert list # Lists all members of alert list 1 /alert add 1 npc radius 300 'spawnname' Sets alert(1) to TRUE if 'spawnname' is within radius of 300 from your location /alert add 2 npc range 30 200 'spawnname' Sets alert(2) to TRUE if any 'spawnname' are within 30 to 200 range from your location
/alias list/altkey command
Lists all aliases
/alias /hp /echo My health is ${Me.PctHPs}
Typing /hp in the EQ chat box will display: My health is % in the EQ chat window
/alias aliasname delete
Deletes aliasname from Macroquest.ini
| list | Lists all MQ2 binds |
| eqlist | Lists all Everquest binds |
| name keycombo | Binds name to the normal key combination keycombo |
| ~name keycombo | Binds name to the alternate key combination keycombo |
| name clear | Clears the key combination from name |
| ~name clear | Clears the alternate key combination from name |
Examples:/call subroutine [ Param0... [ Param#]]
/bind forward e Binds the forward command to key e /bind ~forward up Binds the forward command to alternate key uparrow /bind forward clear Clears the key used for the forward command /bind '/bind cast1 shift+1 Binds ''Cast gem 1'' to shift 1 key combination
Note: Changing EQ binds will not immediately update the display in the options window. Change the bind
list selection in the options window to see the updated keys.
Examples/caption list| type value| update # MQCaptions [on|off]
/call MySub Executes Sub MySub /call MySub varname1 varname2 ...[varname#] Executes Sub Mysub and passes parameters
Player1 is linked to /shownames 1
Player2 is linked to /shownames 2
Player3 is linked to /shownames 3
Player4 is linked to /shownames 4
Example
Player1=${If[${NamingSpawn.Trader},Trader,]}${If[${NamingSpawn.Invis},(${NamingSpawn.DisplayName})
Use "\n" to add a new line when setting captions
ExampleWhen using MQCaption if no parameter is given, the default parameter is off
/caption update 20
Sets the number of nearest spawns for MQ2 to update the name of each pass to 20. By default, this is 35.
Examplesname that can be used
/captioncolor list
/captioncolor pcclass on
/captioncolor pctrader on
/captioncolor pctrader 255 128 0
PC OFF (Default color for PCs)/cast [" spellname" | " ${varname}" | #] [ item " itemname"] [ list]
PCCon OFF (PCs by con color)
PCPVPTeam OFF (PCs by PVP team color)
PCRaid OFF (Raid members))
PCClass OFF (PCs by class color(raid settings))
PCGroup OFF (Group members))
PCTrader ON Color: 255 127 0. (Traders)
NPC OFF (NPC default color))
NPCCon ON (NPCs by con color))
NPCClass OFF (NPCs by class color (raid settings))
NPCMerchant ON Color: 255 127 0. (NPC Merchants)
NPCBanker ON Color: 200 0 255. (NPC Bankers)
NPCAssist ON Color: 255 255 0. (NPCs from main assist))
NPCMark ON Color: 255 255 0. (Marked NPCs)
PetNPC OFF (Pet with NPC owner)
PetPC OFF (Pet with PC owner)
PetClass OFF (Pet by class color (raid settings))
Corpse OFF (Corpses))
CorpseClass OFF (Corpse by class color (raid settings))
/cast "complete heal"/charinfo
/cast "${SpellName}"
/cast 1
/cast item "mana robe"
/cast list
Examples
/click left Performs a left mouse click at the current mouse position /click left 100 100 Performs a left mouse click at 100 100 /click left +30 -30 Performs a left mouse click 30 pixels right and 30 pixels up from the current location /click right target Performs a right click on your current target /click left center Performs a left click in the center of the viewport area
Example/ctrlkey command
/combine pack8
Example usage (NOTE: MQ2's very first bind command is "RANGED" so you do not need to do this, but for example)/declare varname global | local | timer | array | array2
/custombind add mybind
/custombind set mybind /ranged
/bind mybind n
Binds the /ranged command to the n key
Examples
/delay 5 Delays the macro execution for 5 tenths of a second /delay 1s Delays the macro for 1 second /delay 1m Delays the macro for one minute
Example of condition usage:
/keypress forward hold
/delay 1s ${Spawn[1234].Distance}<${Spawn[1234].MaxMeleeTo}
/keypress forward
Will execute /keypress forward when ${Spawn[1234].Distance}<${Spawn[1234].MaxMeleeTo} evaluates to TRUE or after 1 second passes.
Example
/docommand ${If[${Me.Sitting},dotrue,dofalse]}
Examples/doors [" filter"]
/doevents chat doevents will only run chat events /doevents flush Clears all events in the /doevents queue /doevents SpellFizzle doevents will only run SpellFizzle events
Example:/endmacro
/echo My current health is at ${Me.PctHPs}
Examples/filter [ macros all| enhanced| none] [ skills all | increase | none] [ target | money | food | encumber | debug on | off] [ name [ add text] | remove ] [ zrange #] [ mq on| off]
/face Turns you to face and look at your selected target /face nolook Faces your target without changing your vertical view angle /face fast Immediately turns your character to face and look at the target /face fast predict Immediately turns your character to face and look at the target's estimated position /face fast nolook Immediately turns your character to face your target without changing your vertical view angle /face fast nopredict Immediately turns your character to face and look at your target's estimated position /face item Faces and looks at the item from /itemtarget /face fast item Immediately faces and looks at the item from /itemtarget
/for varname value1 to|downto value2 [step val3]/goto : labelname
.
commands
.
/next varname
/goto :MyLabel/help macro
/highlight color # # #
Sets the highlight color to an RGB value
Note: You can use search filters for spawnname
Example/ini " ini filename" " keyname" " valuename" " value"
/if (${firstvar.Equal[This is true]}) {
/echo TRUE
} else /if (!${secondvar}) {
/echo FALSE
/mqlog secondvar equals: ${secondvar}
} else {
/echo It's Something else
}
Example/itemnotify [ in] location [ slot#] notification
stuff.ini contains:
[MySection]
Key1=123
Key2=This is cool!
Key3=Wheeee... 15
/ini "stuff.ini" "Section2" "ANewKey" "Some Data!"
stuff.ini after the above command is executed:
[MySection]
Key1=123
Key2=This is cool!
Key3=Wheeee... 15
[Section2]
ANewKey=Some Data!
notification can be:
leftmouse No action leftmouseup Removes the item and puts it on cursor (same as left clicking it) leftmouseheld For making hotkeys (you know, hold down left button) leftmouseheldup No action rightmouse No action rightmouseup Casts the effect, or opens the container (same as right clicking it) rightmouseheld Opens item display window rightmouseheldup Closes the item display window for that item
Examples:/items [" filter"]
Exchange of item in primary slot:
/itemnotify pack8 leftmouseup
itemnotify mainhand leftmouseup
itemnotify pack8 leftmouseup
Click grim aura earring:
itemnotify rightear rightmouseup
ExamplesNote: /keypress works with EQ key binds as well as MQ2 keybinds. See /bind
/keypress jump Taps the key mapped as the jump key /keypress forward hold Holds down the mapped forward key /keypress forward Releases the mapped forward key after /keypress forward hold
AutoExec.CFG
Executed on the first pulse
CharSelect.CFG
Executed when you are put at character select
server_character.CFG
Executed when this character enters the world
mapshortname.CFG
Executed when you zone into this zone
pluginname-AutoExec.CFG
Executed when this plugin is loaded (after its initialization is complete)
Examples of file names:/loadhud hudname
tallon_lordsoth.cfg
character
oot.cfg, soldungb.cfg, soldunga.cfg, take.cfg
maps
MQ2Map-AutoExec.CFG, MQ2ChatWnd-AutoExec.CFG
plugins
Examples/macro filename [ Param0 [ Param1...]]
/look 50 Changes your look angle to +50 /look -75 Changes your look angle to -75 (down)
Example/mapfilter help| option [ color R# G# B#] (Requires MQ2Map plugin to be loaded)
/mapclick lalt+shift /mycommand %i
leftalt+shift right click on a spawn will cause /mycommand to be executed.
| All | Enables/disables map functions |
| CastRadius # | Sets radius of casting circle to # (omit or set to 0 to disable) |
| Corpse | Displays corpses |
| Custom | Sets custom filter (omit to disable). Used same search options as /target and the Spawn search TLOs |
| Ground | Displays ground items |
| Group | Displays group members in a specific color |
| Help | Displays the available options for /mapfilter |
| Menu | Allows display of right-click context menu |
| Mount | Displays mounts |
| NormalLabels | Toggles non-MQ2 label display |
| NPC | Displays NPCs |
| NPCConColor | Displays NPCs in consider colors |
| PC | Displays PCs |
| PCConColor | Displays PCs in consider colors |
| Pet | Displays pets |
| spellradius | Displays a circle on the map, normally for spell radius. |
| Target | Displays your target |
| TargetLine | Displays a line to your target |
| TargetMelee # | Draws a melee-range circle around your target |
| TargetRadius # | Sets radius of a circle around your target to # (omit or set to 0) |
| Timer | Displays Timer objects on the map |
| Trap | Displays trap objects on the map |
| Trigger | Displays hidden triggers/traps |
| Untargetable | Displays untargettable spawns on the map |
| Vector | Displays heading vectors |
Examples/mapnames normal| target options (Requires MQ2Map plugin to be loaded)
/maphide reset
Re-generates the spawn list.
/maphide npc range 1-39
Hides all spawns level 39 and below
Here are a few examples as a guideCurrent % codes (more may be added later)
/mapnames normal [%l %R %C] %N
/mapnames target [%l %R %C] %N (%x, %y, %z)
| n | "Decorated" name like "a_coyote34" |
| N | "Cleaned up" name like "a coyote" |
| h | Current health % |
| i | SpawnID |
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| R | Race full name - lower case "r" is reserved for race 3-letter code |
| C | Class full name - lower case "c" is reserved for class 3-letter code |
| l | Level |
Example
/memspell 1 "complete heal" memorizes Complete Heal in spell gem 1
Example/nomodkey command
/multiline ; /stand ;/rude ;/sit
Example/notify windowname 0 | controlname [ notification [ data]]
/noparse /ini blah blah blah ${stuff}
Note: ${stuff} is literal instead of changing it to the current value of stuff.
| leftmouseup | Performs a left click on controlname |
| leftmouseheld | Left click and hold on controlname until leftmouseheldup is performed |
| leftmouseheldup | Releases the mouse from leftmouseheld |
| rightmouseup | Performs a right click on controlname |
| rightmouseheld | Performs a right click and hold on controlname |
| rightmouseheldup | Releases the mouse from rightmouseheld |
| enter | Presses the enter key on controlname |
| close | Clicks the Close Window gadget of windowname |
| mouseover | Hovers the mouse over controlname |
| newvalue n | Changes the value in controlname to n |
| listselect n | Selects the nth item in the controlname list |
You can use /notify to click on a link in the chat window.
Examples
/notify hotbuttonwnd HB_Button1 leftmouseup Activates the first hotkey /notify somewindow SomeSlider newvalue 100 Moves the referenced slider in the window to 100 /notify trackingwnd 0 close Closes the tracking window /notify TradeskillWnd RecipeList listselect 1 Selects the first item in the RecipeList listbox
/plugin name noauto/popup text
loads name without updating Macroquest.ini
/plugin name unload noauto
unloads name without updating Macroquest.ini
/popup Current Mana: ${Me.CurrentMana}/ranged [ spawnID]
/popup Run away! Run away!
Example/sellitem 1| #
Sub MySub
.
<code>
.
/return [value|${varname}]
/seterror clear/shiftkey command
Clears the last error value
Example
/shiftkey /itemnotify pack1 leftmouseup
Pick up an entire stack
Examples/spew on| off
/skills Lists all of your skills with skill level /skills pottery Returns your pottery skill
/squelch /filter mq on/substitute [ orig substitution | delete] [ list]
<do your stuff here>
/squelch /filter mq off
Examples/target option
/substitute mom Mother
/substitute omg Oh my god!
/substitute k "%omg, kill %t before I tell your %mom"
The final example if you typed "/say %k" would produce:
Oh my god!, kill targetname before I tell your Mother
Please note the following rules/reminders:
- You don't use the percent signs when creating the substitutions or editing your config file.
- You can use MQ's subsitutions without spaces around them (unlike EQs!) (ie: /echo "%omg%mom" would return "/echo Oh my god!Mother"
- Substitutions do not currently work in macros.
- /sub is currently a valid shorthand for "/subsitute"
- You can use EQ's wildcards (ie: %t) within your substitutions; however, you have to leave spaces around them (yes, they suck)
- You cannot CURRENTLY replace EQ wildcards with MQ substitutions (ie, you can't make a replacement for %m (This may be supported in the future.)
| clear | Clears your current target |
| pc|npc | Selects nearest pc or npc. |
| corpse | Selects the nearest corpse |
| pet | Selects the nearest pet |
| class class | Selects the nearest class match to target |
| race race | Selects nearest race to target |
| range min max | Sets the minimum and maximum level range to target |
| noalert alert# | Target nearest spawn not on alert # |
| nearalert alert# | ***NEED TO FILL THIS DESCRIPTION IN*** |
| notnearalert alert# | ***NEED TO FILL THIS DESCRIPTION IN*** |
| zradius zheight | Targets the spawn if it is within the height value |
| radius distance | Targets the spawn if it is within the 2D distance |
| nopcnear radius | ***NEED TO FILL THIS DESCRIPTION IN*** |
| notid|id spawnid | ***NEED TO FILL THIS DESCRIPTION IN*** |
| spawnname | Targets the nearest specified spawnname |
| myself|mycorpse | Targets the yourself or your corpse |
| alert alert# | Targets the specified keyword |
Example/unload
/timed 10 /echo 1 second has passed
Example/vardata varname new_mq2data_value
/varcalc MyVar ${Me.CurrentMana} - ${Spell[Complete Heal].Mana}
Example/varset varname value| ${varname2}
/vardata MyFloat Math.Calc[${Me.X}+${Me.Y}]
Examples/where [ pc| npc|" spawn name"]
/varset myvar 25 Sets myvar to 25 /varset array[3] 10 Sets the value of array[3] to 10 /varset casttimer 30 Sets the timer to 3 seconds /varset array[2,12] 45 Sets the value of array[2,12] to 45 /varset casttimer 3m Sets the Timer to 3 minutes
ExamplesThe message returned is:
/where Lists the closest pc or npc /where pc Lists the closest pc /where npc Lists the closest npc where npc "orc pawn" Lists where the closest orc pawn is
| group|pc|npc [invis|merchant|tribute|gm|corpse|any] | Lists all matches in the zone for the option used. Note that tribue is tribute master and gm is Guild Leader |
| range minlevel maxlevel | Lists all matches for the option used that are within the level range designated. |
| radius # | Lists all matches for the option used that are within the radius designated. |
| guild | noguild | Lists all guild members in the zone or pc's in the zone not in a guild |
| lfg | Lists all characters who are looking for a group in the zone |
| loc intX intY | Returns the spawn located that intX intY |
| name | Lists the character with the name name if he/she/it is in the zone |
| alert # | Lists any npc/pc on alert # |
| noalert # | Match all spawns not on list # |
| knight | returns Paladins and Shadowknights in the zone |
| tank | returns paladins, shadowknights, and warriors in the zone |
| healer | returns druids and clerics in the zone |
| dps | returns wizards, rangers, and rogues in the zone |
| slower | returns shamans, enchanters, and beastlords in the zone |
float DistanceYou then append .Distance to the TLO name: Target.Distance
Distance from player in (x,y)
/echo Distance to target is: ${Target.Distance}which returns the distance to your target in the float format ###.###
ExampleMQ2Data Members
Using the int immediate type member with a spawn reference type member:
If you wanted to convert the float value Distance to an int value, you could append one of the members of the float immediate type.
${Target.Distance.Int}
int Screw"int" is a type of object which means WHOLE NUMBER while Screws is the name of the object
${TopLevelObject[index](cast).Member[index](cast).Member[index](cast)}To change ${Target} from a string to a boolean:
${Target}(bool)Which could be used in:
${If[${Target}(bool),true,false]}All Boolean use must use a numeric property. ${If[${Target.Name},true,false]} will fail.
ExampleHowever, the part that will come in handy is for people to extend these types by using their own types in a plugin. If you wanted, you could have your plugin make a type called "mytype" that accesses a spawn. Maybe a member of mytype is called "IsCloseToMe" and is a bool value. This would let you do: ${Spawn[1](mytype).IsCloseToMe}.
/varset myvar ${Spawn[1](int)}Do NOT do that! It will only work until the memory address changes. Instead, use the ID as you always have:
/echo ${Int[${myvar}](spawn).Name}
/varset myvar ${Spawn[1].ID} /echo ${Spawn[${myvar}].Name}
| altability AltAbility[n] | Alt ability by number |
| altability AltAbility[name] | Alt ability by name |
ExamplesBool
/echo ${AltAbility[Combat Stability].RequiresAbility}}
Returns the pre-requisite AA ability needed to train in this Ability
/echo ${AltAbility[n].RequiresAbility}}
Returns the pre-requisite AA ability needed to train in the Ability with the number n
Examples
/declare MyVar bool
/varset MyVar ${Bool[This is true]}
/echo ${MyVar} would echo TRUE
/varset MyVar ${Bool[NULL]}
/echo ${MyVar} would echo FALSE
int CurrentHPs Current hit pointsThe italicized text preceding the member name indicates the return type, in this case an integer. The property name follows the return type.
ExampleIf you look at the members and properties of the character referenceType, you will notice that there is no Speed property, but since character has access to the properties of the spawn reference Type, you can find your character's speed by using ${Me.Speed}
/echo ${Me.CurrentHPs}
ExampleCursor
/if ${Corpse.Open} {
Do this stuff
}
If the loot window is open Do this stuff
ExampleDefined
/if (${Cursor.ID} ) /autoinv
If something is on your cursor, drop it into the autoinventory
ExampleGround
/if (${Defined[varname]}) { Do this stuff }
If the variable has been declared execute Do this stuff
ExampleFindItem
/echo ${Ground.Distance}
Echos the distance to the ground item you have targeted
ExamplesFindItemBank
/itemnotify ${FindItem[sprinkler].InvSlot} leftmouseup
Picks up your cleric epic from your corpse
/itemnotify ${FindItem[swirling].InvSlot} leftmouseup
Picks up any item containing the word swirling from the opened corpse
ExampleFindItemBankCount
/echo ${FindItem[=Swirling Shadows]}
This is a simple example with little use, but If the item is found, the name of the item will be echoed
ExampleFindItemCount
/echo ${FindItemBankCount[Swirling]}
Returns how many Swirling Shadows you have in your bank
ExampleFloat
/echo ${FindItem[=Water Flask]}
Echoes the number of Water Flask you have in your inventory
ExampleGameTime
${Float[12.345].Deci}
Creates a float object of 12.345 and truncates the decimal to one decimal place
ExampleGroup
/echo ${GameTime.Date}
Echos todays real time date to the chat window
| heading Heading[degrees] | Creates a heading object using degrees (clockwise) |
| heading Heading[y,x] | Creates a heading object using the heading to this y,x location. |
| heading Heading[N,W] | Same as above, just an alternate method |
ExamplesIf
/echo ${Heading[15].ShortName}
Echos the shortname of the heading of 15 degrees.
/echo ${Heading[-342,700].ShortName}
Echos the shortname heading to the location -342,700
ExamplesIni
/docommand ${If[${Me.Sitting},/stand,/echo I am not sitting down]}
If I am sitting, stand up, Otherwise echo I am not sitting down
/docommand ${If[${Me.CurrentHP}<50,/cast "Gate",/goto :Continue]}
If my hp percent is below 50 cast the Gate spell, otherwise goto the Continue label
ExampleInt
sample.ini contains:
[KeyOne]
value1=foo
value2=bar
[KeyTwo]
Value3=foobar
${Ini[sample.ini,KeyOne,value1]} returns foo
${Ini[sample.ini,KeyOne] returns value1|value2||
${Ini[sample.ini] returns KeyOne|KeyTwo||
| int Int[n] | Make an int object using n |
ExampleInvSlot
/echo ${Int[123].Hex}
echos the result of the conversion of 123 to an int in hexadecimal
| invslot InvSlot[name] | Inventory slot by name |
| invslot InvSlot[#] | Inventory slot by number |
ExamplesLastSpawn
/if (!${Window[pack${bag}].Open}) /itemnotify pack${bag} rightmouseup
If the container in slot pack${bag} isn't opened, open it
/if (${InvSlot[bank${index}].Item.Container}) /call CheckPack bank${index}
Is the item in bank${index} a container, if so /call CheckPack and pass the parameter bank${index}
| spawn LastSpawn[n] | The nth latest spawn (chronological order) |
| spawn LastSpawn[-n] | The nth oldest spawn (chronological order) |
ExamplesLineOfSight
/echo ${LastSpawn[10].ID}
Echos the spawnID of the 10th mob to spawn in the zone
/echo ${LastSpawn[-10]}
Echos the name of the 10th to last spawn in the zone
ExampleMacro
/echo ${LineOfSight[20,40,-20:100,-300,70}
Returns TRUE if Line of Sight is clear between the two locations
ExampleMacroQuest
/echo This macro has been running for: ${Macro.RunTime.Second} seconds
ExampleMath
/echo ${MacroQuest.LastTell}
Returns the name of the last person to send you a tell
ExampleMerchant
/echo ${Math.Sqrt[49]}
Echos the square root of 49
/echo ${Math.Rand[500]}
Echos a random number between 0 and 500
/echo ${Math.Calc[49%6+25]}
Echos the result of 49%6+25, or 1+25
| merchant Merchant | Currently active merchant |
ExampleNamingSpawn
/echo ${Merchant.Name}
Echos the name of the merchant whos window you have open
Player1= what is displayed using /shownames 1Look in the [Captions] section of the Macroquest.ini file included in the zip file for examples
Player2= what is displayed using /shownames 2
Player3= what is displayed when using /shownames 3
Player4 = what is displayed when using /shownames 4
| spawn NearestSpawn[n] | The nth nearest spawn |
| spawn NearestSpawn[search] | The nearest spawn matching this search (same as Spawn[search]) |
| spawn NearestSpawn[n,search] | The nth nearest spawn matching this search |
ExamplesPlugin
/echo ${NearestSpawn[npc range 100 "orc pawn"]}
Finds any npc containing orc pawn in its name that is within 100 of you
/echo ${NearestSpawn[1]}
Finds the closest spawn to you
| plugin Plugin[name] | Finds plugin by name |
| plugin Plugin[n] | Plugin by number, starting with 1 and stopping whenever the list runs out of plugins. |
| raid Raid | Current raid |
ExampleSelect
/echo ${Raid.Members}
Echos the number of members in your raid
| intSelect[argument,value1[,value2,...] | Returns a numeric value for a position match of the argument |
ExamplesSelectedItem
/echo ${Select[${Stuff},this,that,another]}
If ${Stuff} is equal to this, the value 1 will be echoed
If ${Stuff} is equal to that, the value 2 will be echoed
If ${Stuff} is equal to another, the value 3 will be echoed
If ${Stuff} isn't equal to this,that, or another the value 0 will be echoed
| item SelectedItem | When using a merchant, etc. this is the selected item |
ExamplesSkill
/if (${SelectedItem.Charges}<1)
Determines if the selected item is out of charges
/if (${SelectedItem.Name.Equal[rusty dagger]})
Checks to see if the selected item is a rusty dagger
| skill Skill[n] | Skill by number |
| skill Skill[name] | Skill by name |
ExamplesSpawn
/echo ${Skill[1].ReuseTime}
Displays the reuse time of skill 1
/echo ${Skill[backstab]].ID}
Displays the skill number of the backstab skill
| spawn Spawn[ID] | Find spawn by ID |
| spawn Spawn[search string] | Find spawn by spawn search string |
ExamplesSpawnCount
/echo ${Spawn[n]}
Displays the name of the spawn with id number n
/target ${Spawn[npc radius 500 trakanon]}
Targets the npc with the name Trakanon only if within a radius of 500
| int SpawnCount | Total number of spawns in current zone |
| int SpawnCount[search] | Total number of spawns in current zone matching the search |
ExamplesSpell
/echo ${SpawnCount}
Displays the count of all spawns
/echo ${SpawnCount[range 45 50}
Displays the count of all spawns in the level range of 45 to 50
| spell Spell[n] | Find spell by ID |
| spell Spell[name] | Find spell by name |
ExamplesSwitch
/echo ${Spell[n].MyCastTime}
Returns your adjusted cast time for spell with id n
/echo ${Spell[spellname].PushBack}
Returns the pushback amount of spellname
| switch Switch | Your target, if you have a switch (door, etc) targeted |
ExamplesTarget
/echo ${Switch.Heading}
Returns the direction to the switch
/echo ${Switch.Open}
Returns TRUE or FALSE
| spawn Target | Your target |
ExamplesTime
/echo ${Target.Level}
Echos the level of your target(if it has one)
/echo ${Target.Name.Equal[iron oxide]}
Echoes a boolean value of whether your item targetted is Iron Oxide
| time Time | Your local time in real life |
ExampleType
/echo ${Time.DayOfWeek}
Returns the day of the week
| type Type[name] | Finds an MQ2 Data type by name |
ExamplesWindow
/if ${Type[MyParam].Name.NotEqual[bool]} {
/echo This variable is not of type bool
}
${Type[spawn].Member[ID]}
Determines if a member of a type exists
${Type[spawn].Member[${n}]}
Enumerate members of a type using a loop
| window Window[name] | Find window by name |
ExamplesZone
/echo ${Window[MerchantWnd].Open}
Returns TRUE if a Merchant window is open
/echo ${Window[windowname]}
Returns TRUE if the WindowName exists, but doesn't have to be opened.
/echo ${Window[MerchantWnd].Minimized}
Returns TRUE if the Window is opened and minimized
${Window[TradeskillWnd].Child[RecipeList].List[=Inky Shadow Silk]}
Find an item in the tradeskill item list box by the exact name Inky Shadow Silk
${Window[TradeskillWnd].Child[RecipeList].List[1]}
Get the first-column text for the 1st item in the tradeskill item list box
| currentzone Zone | Current zone |
| zone Zone[name] | Find zone by short name |
| zone Zone[n] | Find zone by ID |
ExamplesReference Types
/echo ${Zone.Type}
Returns an integer representing the zone you are in
/echo ${Zone[zonename].ID}
Returns the ID of zonename, even if you aren't in the zone
/echo ${Zone[zoneid].ShortName}
Returns the short name of the zone with ID zoneid
| int AARankRequired | Rank required to train |
| int Cost | Base cost to train |
| string Description | Basic description |
| int ID | ID number |
| int MaxRank | Max rank available in this ability |
| int MinLevel | Minimum level to train |
| string Name | Name of the alt ability |
| altability RequiresAbility | Required ability (if any) |
| int RequiresAbilityPoints | Points required in above ability |
| int ReuseTime | Reuse time in seconds |
| string ShortName | Short name |
| spell Spell | Spell used by the ability (if any) |
| int Type | Type (1-6, this may change to string eventually) |
| To String | Returns the total number of points you have spent in that ability |
| int Dimensions | Number of dimensions this array stores |
| int Size | Total number of elements this array stores |
| int Size[n] | Total number of elements stored in the nth dimension of this array |
| To String | None |
| int ID | Gives the song # or buff # not the spell's ID |
| int Level | Level |
| spell Spell | Spell |
| float Mod | Bard song modifier |
| ticks Duration | Duration |
| To String | Same as spell.Name |
| int AAExp | AA exp as a raw number |
| int AAPoints | Unused AA points |
| int AAPointsSpent | The number of points you have spent on AA abilities |
| int AAPointsTotal | The total number of AA points you have |
| int Ability[name] | Doability button number this skill name is on |
| string Ability[slot] | Skill name assigned to this doability button |
| bool AbilityReady[name] | Ability with this name ready? |
| bool AbilityReady[slot] | Ability on this button ready? |
| int AccuracyBonus | Accuracy bonus from gear/spells |
| altability AltAbility[n | name] | Returns the total number of points you have spent in ability n or name |
| bool AltAbilityReady[n | name] | Alt ability readiness of ability n or name |
| int AltAbilityTimer[n | name] | Alt ability reuse time (seconds) left of ability n or name |
| int AltAbilityTimer[name] | Alt ability reuse time (seconds) left by name |
| bool AltTimerReady | Alternate timer ready? (Bash/Slam/Frenzy/Backstab. Note that AbilityReady works fine with most of these) |
| int AGI | Character Agility |
| bool AmIGroupLeader | Group Leader? |
| int AttackBonus | Attack bonus from gear/spells |
| int AttackSpeed | Your Attack Speed % |
| bool AutoFire | TRUE if AutoFire is activated. |
| int AvoidanceBonus | Avoidance bonus from gear/spells |
| item Bank[slot] | Item in this slot (1-18) |
| int Book[name] | Spell slot the spell with this name is assigned to in your spellbook |
| spell Book[slot] | Spell assigned to this slot in your spellbook |
| buff Buff[name] | Finds buff with this name |
| buff Buff[slot] | The buff in this slot (1-15) |
| int CareerFavor | Career favor |
| int Cash | Cash in copper |
| int CashBank | Banked cash in copper |
| int CHA | Character Charisma |
| bool Combat | In combat? |
| int CombatEffectsBonus | Combat Effects bonus from gear/spells |
| int Copper | Copper |
| int CopperBank | Copper in bank |
| int CountBuffs | Number of buffs you have, not including short duration buffs |
| spell CombatAbility[n] | Combat ability by number in your list (not same as others lists!) |
| int CombatAbility[name] | Combat ability number in your list by name (not same as others lists!) |
| bool CombatAbilityReady[name] | Returns TRUE or FALSE |
| int CombatAbilityTimer[name] | Returns the time remaining before the Combat Ability is usable |
| int CurrentFavor | Current favor |
| int CurrentHPs | Current hit points |
| int CurrentMana | Current mana |
| int CurrentWeight | Character current weight |
| int DamageShieldBonus | Damage Shield bonus from gear/spells |
| int Dar | Damage absorption remaining |
| int DEX | Character Dexterity |
| int DoTShieldBonus | DoT Shield bonus from gear/spells |
| int Doubloons | Doubloons character has |
| int EbonCrystals | Returns how many of this crystal you have in your inventory |
| int Endurance | Current endurance |
| int EnduranceBonus | Endurance bonus from gear/spells |
| int EnduranceRegen | Endurance regen from the last tick |
| int Exp | Experience (of 330) |
| int FreeBuffSlots | Number of open buff slots (not counting the bard buff slots) |
| int FreeInventory | Count of free inventory spaces |
| int FreeInventory[n] | Count of free inventory spaces of at least n size (giant=4) |
| int Gem[name] | The slot # with this spell name |
| spell Gem[slot] | The spell in this slot # |
| int Gold | Gold on character |
| int GoldBank | Gold in bank |
| spawn GroupAssistTarget | Current group assist target |
| bool Grouped | Grouped? |
| int GroupLeaderExp | Group leadership exp |
| int GroupLeaderPoints | Group leadership points |
| string GroupList | Returns a string of your group members (excluding you) |
| spawn GroupMarkNPC[n] | Current group marked NPC (1-3) |
| int GukEarned | Total LDoN points earned in Guk |
| int HPBonus | Hit point bonus from gear/spells |
| int HPRegen | Hit point regeneration |
| int HPRegenBonus | HP regen bonus from gear/spells |
| int Hunger | Hunger level |
| int ID | Spawn ID |
| int INT | Character Intelligence |
| item Inventory[slot] | Item in this slot (1-30) |
| item Inventory[slotname] | Item in this slot (inventory slots only, but same names as /itemnotify) |
| string Language | The language you are currently using |
| int LanguageSkill[languagename] | Your skill in the selected language |
| int LargestFreeInventory | Size of largest free inventory space |
| int LDoNPoints | Available LDoN points |
| int Level | Character Level |
| int ManaBonus | Mana bonus from gear/spells |
| int ManaRegen | Mana regeneration |
| int ManaRegenBonus | Mana regen bonus from gear/spells |
| int MaxEndurance | Max endurance |
| int MaxHPs | Max hit points |
| int MaxMana | Max mana |
| int MirEarned | Total ldon points earned in Miragul |
| int MMEarned | Total ldon points earned in MM |
| bool Moving | Moving? (including strafe) |
| string Name | First name |
| int Orux | Orux character has |
| float PctAAExp | AA exp as a % |
| int PctEndurance | Percent endurance |
| float PctExp | Experience as a % |
| float PctGroupLeader | ExpGroup leadership exp as a % |
| int PctHPs | Percent hit points |
| int PctMana | Percent mana |
| float PctRaidLeaderExp | Raid leadership exp as a % |
| spell PetBuff[n] | The spell in this slot (1-29) |
| int PetBuff[name] | Finds slot with this spell name |
| int Phosphenes | Phosphenes character has |
| int Phosphites | Phosphites character has |
| int Platinum | Platinum on your character |
| int PlatinumBank | Platinum in bank |
| int PlatinumShared | Shared-bank platinum |
| string PlayerState | Returns COMBAT, DEBUFFED, COOLDOWN, ACTIVE, RESTING, UNKNOWN |
| int RadiantCrystals | Returns how many of this crystal you have in your inventory |
| spawn RaidAssistTarget[n] | Current raid assist target (1-3) |
| int RaidLeaderExp | Raid leadership exp |
| int RaidLeaderPoints | Raid leadership points |
| spawn RaidMarkNPC[n] | Current raid marked NPC (1-3) |
| bool RangedReady | Ranged attack ready? |
| int RujEarned | Total ldon points earned in ruj |
| bool Running | Returns TRUE or FALSE |
| int ShieldingBonus | Shielding bonus from gear/spells |
| int Silver | Silver on your character |
| int SilverBank | Silver in bank |
| int Skill[n] | Skill level of skill with this ID |
| int Skill[name] | Skill level of skill with this name |
| buff Song[name] | Finds song with this name |
| buff Song[slot] | The song in this slot (1-6) |
| spawn Spawn | The character's spawn |
| bool SpellReady[name] | Gem with this spell name ready for cast? |
| bool SpellReady[slot] | Spell in this gem ready for cast? |
| int SpellShieldBonus | Spell Shield bonus from gear/spells |
| int STA | Character Stamina |
| int STR | Character Strength |
| int StrikeThroughBonus | Strikethrough bonus from gear/spells |
| bool Stunned | Stunned? |
| int StunResistBonus | Stun Resist bonus from gear/spells |
| string Surname | Last name |
| int svCold | Character Cold Resist |
| int svDisease | Character Disease Resist |
| int svFire | Character Fire Resist |
| int svMagic | Character Magic Resist |
| int svPoison | Character Poison Resist |
| int TakEarned | Total ldon points earned in tak |
| spawn TargetOfTarget | Target of target (moved to character type) |
| int Thirst | Thirst level |
| int TributeTimer | Shows the remaining time of the 10 minute timer |
| int WIS | Character Wisdom |
| To String | Same as Name |
| int ID | Ground item ID (not the same as item ID, this is like spawn ID) |
| float Distance | Distance from player to ground item in (x,y) |
| float X | X coordinate |
| float Y | Y coordinate |
| float Z | Z coordinate |
| float W | X (Westward-positive) |
| float N | Y (Northward-positive) |
| float U | Z (Upward-positive) |
| heading Heading | Ground item is facing this heading |
| heading HeadingTo | Direction player must move to meet this ground item |
| bool LineOfSight | Returns if ground spawn is in Line of Sight |
| string Name | Name |
| To String | Same as ID |
| int GroupSize | Returns the number of players in your group. |
| groupmember Member[n] | n is 1 to 5 (0 gives self) |
| int Member[name] | Gives the number, as used above |
| int Members | Total group members, excluding self |
| groupmember Leader | The leader of the group |
| To String | Same as Members |
| string Name | Name of the group member. Should work regardless of whether they are in zone |
| spawn Spawn | Direct access to the group member's spawn type |
| bool Leader | Is this the group leader? |
| To String | Same as Name |
| bool Attuneable | Is the item Attuneable? |
| int BuyPrice | Price to buy this item at this merchant |
| float CastTime | Spell effect's cast time |
| int Charges | Charges |
| string Class[n] | Returns the nth short class name of the listed classes on an item |
| int Classes | Returns the number of Classes that can use the item |
| int Container | Number of slots, if this is a container |
| string Deity[n] | Returns the nth diety of the listed dieties on an item |
| int Deities | Returns the number of dieties that can use the item |
| string DMGBonus | Type None Magic Fire Cold Poison Disease |
| string EffectType | Spell effect type 0 Proc 1 Clickable from inventory (any class) 2 Worn effect (haste, cleave) 3 Unknown (*We now know it's 'Expendable'*) 4 Clickable must be worn 5 Clickable from inventory (class restricted) 6 Focus effect 7 Memmable spell scroll |
| int FreeStack | The number of items needed to fill all the stacks of the item you have (ie with a stacksize of 20. If you have 3 stacks (1, 10, 20 in those stacks), you have room for 60 total, you have 31 on you... so FreeStack would return 29 |
| int ID | Item ID |
| int Items | Number of items, if this is a container |
| item Item[n] | nth contained item, if this is a container |
| float ItemDelay | Returns the delay of the weapon |
| string LDoNTheme | "Non-LDON" "Deepest Guk" "Miragul's" "Mistmoore" "Rujarkian" "Takish" |
| bool Lore | Lore? |
| bool Magic | Magic? |
| int MaxPower | Maximum Power of Power Source |
| string Name | Name of the item |
| bool NoDrop | No drop? |
| bool NoRent | No rent? |
| int Power | Current Power of Power Source |
| string Purity | What Purity the Power Source has |
| string Race[n] | Returns the nth race name of the listed races on an item |
| int Races | Returns the number of races that can use the item |
| int RequiredLevel | Returns the Required Level of an item |
| int SellPrice | Price to sell this item at this merchant |
| int Size | Item size |
| spell Spell | Spell effect |
| int Stack | Stack count |
| bool Stackable | Stackable? |
| int StackCount | Returns the count of the items in all stacks of the item |
| int StackSize | Maximum number if items that can be in the stack |
| int Timer | Returns the number of seconds left on an item recast timer |
| string Type | Type |
| int Tribute | Tribute value of the item |
| int Value | Item value in copper |
| int Weight | Item weight |
| invslot WornSlot[n] | The nth invslot this item can be worn in (fingers/ears count as 2 slots) |
| bool WornSlot[name] | Can item be worn in invslot with this name? (worn slots only..) |
| int WornSlots | The number of invslots this item can be worn in (fingers/ears count as 2 slots) |
| To String | Same as Name |
| string Name | Name of the plugin, for example "MQ2ChatWnd" |
| To String | Same as Name |
| string Name | Name of the skll |
| int ID | Skill number |
| float Accuracy | Base accuracy of the skll |
| int ReuseTime | Reuse timer (dont know yet if it's in 10ths of seconds or what) |
| bool AltTimer | Skill uses the kick/bash/slam/backstab/frenzy timer? |
| int MinLevel | Minimum level for your class |
| int StartingSkill | Base skill level for your class |
| int SkillCap | Returns the skill cap based on your level and class |
| To String | Same as Name |
| int AARank | AA rank number |
| string AATitle | Actual AA title (e.g. Sage, Impresario, etc) |
| bool AFK | AFK? |
| int Animation | Current animation id |
| bool Anonymous | Anonymous? |
| bool Assist | Current Raid or Group assist target? |
| bool Binding | Binding wounds? |
| body Body | Body type |
| spell Casting | Spell, if currently casting |
| class Class | Class |
| string CleanName | The "cleaned up" name |
| string ConColor | GREY, GREEN, LIGHT BLUE, BLUE, WHITE, YELLOW, RED |
| int CurrentHPs | Current hit points |
| deity Deity | Deity |
| float DistanceX | Distance from player in X plane |
| float DistanceY | Distance from player in Y plane |
| float DistanceZ | Distance from player in Z plane |
| float Distance | Distance from player in (x,y) |
| float Distance3D | Distance from player in (x,y,z) |
| float DistancePredict | Estimated distance in (x,y), taking into account the spawn's movement speed but not the player's |
| float DistanceW | Distance from player in X plane (East/West) |
| float DistanceN | Distance from player in Y plane (North/South) |
| float DistanceU | Distance from player in Z plane (Up/Down) |
| bool Ducking | Ducking? |
| bool FeetWet | Feet wet/swimming? |
| bool Feigning | Feigning? |
| bool Fleeing | Is your target moving away from you |
| string Gender | Gender |
| bool GM | GM? |
| bool GroupLeader | Current Raid or Group marked npc mark number (raid first) |
| string Guild | Guild name |
| string GuildStatus | Guild status (Leader, Officer, Member) |
| heading Heading | Heading in this direction |
| heading HeadingTo | Heading player must travel in to reach this spawn |
| heading HeadingToLoc[y,x] | Heading to the coordinates y,x from the spawn |
| float Height | Height |
| int Holding | Represents what the pc/npc is holding |
| int Hunger | Hunger level |
| int ID | SpawnID |
| string Name | Name |
| int Level | Level |
| float X | X coordinate |
| float Y | Y coordinate |
| float Z | Z coordinate |
| float N | Y, the Northward-positive coordinate |
| float W | X, the Westward-positive coordinate |
| float U | Z, the Upward-positive coordinate |
| float S | Shortcut for -Y (makes Southward positive) |
| float E | Shortcut for -X (makes Eastward positive) |
| float D | Shortcut for -Z (makes Downward positive) |
| bool LineOfSight | Returns TRUE if spawn is in LoS |
| spawn Next | Next spawn in the list |
| spawn Prev | Previous spawn in the list |
| float Speed | Speed |
| bool Levitating | Levitating? |
| bool Sneaking | Sneaking? |
| string Light | Name of the light class this spawn has |
| string State | STAND SIT DUCK BIND FEIGN DEAD STUN UNKNOWN |
| int MaxHPs | Maximum hit points |
| int PctHPs | Percent hit points |
| string Type | PC NPC Untargetable Mount Pet Corpse Chest Trigger Trap Timer Item |
| string Surname | Last name |
| spawn Master | Master, if it is charmed or a pet |
| spawn Pet | Pet |
| spawn Mount | Mount |
| race Race | Race |
| float MaxRange | The Max distance from this spawn for it to hit you |
| float MaxRangeTo | The Max distance from this spawn for you to hit it |
| bool Swimming | Swimming? |
| bool Underwater | Underwater? |
| bool Roleplaying | Roleplaying? |
| float Look | Looking this angle |
| bool Invis | Invisible? (also includes both successful and failed hides as well as shroud of stealth) |
| bool LFG | LFG? |
| bool Linkdead | Linkdead? |
| bool Trader | Trader? |
| bool Sitting | Sitting? |
| bool Standing | Standing? |
| bool Invited | Invited to group? |
| spawn NearestSpawn[search] | Find the nearest spawn matching this search, to this spawn (most efficient on yourself) |
| spawn NearestSpawn[n,search] | Find the nth nearest spawn matching this search, to this spawn (most efficient on yourself) |
| int Mark | Current Raid or Group marked npc mark number (raid first) |
| int Thirst | Thirst level |
| string Suffix | Suffix attached to name, such as: of <servername> |
| To String | Same as Name |
| float AERange | AE range |
| string CastOnAnother | Message when cast on others |
| string CastOnYou | Message when cast on yourself |
| float CastTime | Cast time (unadjusted) |
| ticks Duration | Duration of the spell if any |
| float FizzleTime | Time to recover after fizzle |
| int ID | Spell ID |
| string Name | Name |
| int Level | Level |
| int Mana | Mana cost (unadjusted) |
| float MyCastTime | Adjusted cast time |
| float PushBack | Push back amount |
| float Range | Maximum range to target |
| int MyRange | This is YOUR actual cast range, including extended range from focus effects. |
| float RecastTime | Time to recast after successful cast |
| float RecoveryTime | Same as FizzleTime |
| int ResistAdj | Resist adjustment |
| string ResistType | Chromatic Disease Poison Cold Fire Magic Unresistable Unknown |
| string Skill | Skill name |
| string SpellType | Beneficial(Group) Beneficial Detrimental Unknown |
| bool Stacks | Does the selected spell stack with your current buffs |
| bool StacksWith[ ] | Does the selected spell stack with the specific buff |
| string TargetType | Group v2 AE PC v2 etc |
| To String | Same as Name |
| string Arg[n,separator] | Gets nth argument using separator as the separator (single character). separator defaults to space |
| int Compare[text] | -1 if the string is alphabetically before text, 0 if equal, 1 if after. Case does not count. |
| int CompareCS[text] | -1 if the string is alphabetically before text, 0 if equal, 1 if after. Case counts. |
| int Count[char] | Count the number of occurrences of a particular character in the string |
| bool Equal[text] | Strings equal? Case does not count |
| bool EqualCS[text] | Strings equal? Case counts! |
| int Find[text] | Looks for the given text, gives position (currently NULL if not found) |
| string Left[length] | The left (length) of the string.. Left[2] of "Left" will be "Le" |
| string Left[-length] | The left ("all but" length) of the string.. Left[-1] of "Left" will be "Lef" |
| int Length | The length of the string |
| string Lower | The string in all lower case |
| string Mid[position,length] | The left (length) starting at (position).. Mid[2,3] of "Left" will be "ef" |
| bool NotEqual[text] | Strings not equal? Case does not count |
| bool NotEqualCS[text] | Strings not equal? Case counts! |
| string Replace[old,new] | |
| string Right[length] | The right (length) of the string.. Right[2] of "Left" will be "ft" |
| string Right[-length] | The right ("all but" length) of the string.. Right[-1] of "Left" will be "eft" |
| string Token[n,separator] | Retrieve a token from the string using a custom separator. Will not skip empty values |
| string Upper | The string in all UPPER CASE |
| To String | this IS a string, assface |
Exampleswitch
Sub Main
/declare MyVar string local
/varset MyVar THIS,,IS,A,,TEST
/echo Using Arg: ${MyVar.Arg[2,,]}
/echo Using Token: ${MyVar.Token[2,,]}
/return
The output from the above would be:
Using Arg: IS
Using Token: (empty string)
| int ID | Switch ID |
| float Distance | Distance from player to switch in (x,y) |
| float X | X |
| float Y | Y |
| float Z | Z |
| float W | X (Westward-positive) |
| float N | Y (Northward-positive) |
| float U | Z (Upward-positive) |
| heading Heading | Switch is facing this heading |
| bool LineOfSight | Returns TRUE if the switch is in LoS |
| float DefaultX | "closed" state X |
| float DefaultY | "closed" state Y |
| float DefaultZ | "closed" state Z |
| float DefaultW | "closed" state X (Westward-positive) |
| float DefaultN | "closed" state Y (Northward-positive) |
| float DefaultU | "closed" state Z (Upward-positive) |
| heading DefaultHeading | "closed" state heading |
| bool Open | Open? |
| heading HeadingTo | Direction player must move to meet this switch |
| string Name | Name |
| To String | Same as ID |
| int Hour | Hour (0-23) |
| int Minute | Minute |
| int Second | Second |
| int SecondsSinceMidnight | Number of seconds since midnight |
| int DayOfWeek | 1=sunday to 7=saturday (might make a data type later) |
| int Day | Day of the month |
| int Month | Month of the year |
| int Year | Year |
| string Time12 | hhmmss, 12-hour format |
| string Time24 | hhmmss, 24-hour format |
| string Date | MM/DD/YYYY |
| bool Night | Gives true if the current hour is considered "night" in EQ (700pm-659am) |
| To String | Same as Time24 |
| int Value | Current value of the timer |
| int OriginalValue | Original value of the timer |
| To String | Same as Value |
| string Name | Type name |
| string Member[id] | Member name based on an internal ID number (based on 1 through n, not all values will be used) |
| int Member[name] | Member internal ID number based on name (will be a number from 1 to n) |
| To String | Same as Name |
| bool Open | TRUE if the window is open |
| window Child[name] | Child with this name |
| int VScrollMax | Vertical scrollbar range |
| int VScrollPos | Vertical scrollbar position |
| int VScrollPct | Vertical scrollbar position in % to range from 0 |
| int HScrollMax | Horizontal scrollbar range |
| int HScrollPos | Horizontal scrollbar position |
| int HScrollPct | Horizontal scrollbar position in % to range from 0 |
| bool Children | Has children? |
| bool Siblings | Has siblings? |
| window Parent | Parent window |
| window FirstChild | First child window |
| window Next | Next sibling window |
| bool Minimized | Minimized? |
| int X Screen | X position |
| int Y Screen | Y position |
| int Height | Height in pixels |
| int Width | Width in pixels |
| bool MouseOver | Mouse currently over? |
| argb BGColor | Background color |
| string Text | Window's text |
| string Tooltip | TooltipReference text |
| int Style | Window style code |
| bool Enabled | Enabled? |
| bool Highlighted | Highlighted/mouse over? |
| bool Checked | Checked? (useful for buttons) |
| string List[n,y] | Get the text for the nth item in a list box. Only works on list boxes. Use of ,y is optional and allows selection of the column of the window to get text from. |
| int List[text,y] | Find an item in a list box by partial match (use window.List[=text] for exact). Only works on list boxes. Use of ,y is optional and allows selection of the column of the window to search in. |
| string Name | Name of window piece (e.g. "ChatWindow" for top level windows, or the Piece name (NOTE: CUSTOM UI DEPENDANT) for child windows) |
| string ScreenID | ScreenID of window piece (ScreenID is NOT custom ui dependant, this *must be* the same on ALL UIs) |
| string Type | Type of window piece (Screen for top level windows, or Listbox, Button, Gauge, Label, Editbox, Slider, etc) |
| To String | TRUE if exists, FALSE if not |
| int ID | Zone ID |
| string Name | Full name like "Ocean of Tears" |
| string ShortName | Short name like "oot" |
| To String | Same as Name |
| int A | Alpha |
| int R | Red |
| int G | Green |
| int B | Blue |
| int Int | The integer formed by ARGB |
| To String | The hex value of the integer formed by ARGB |
| To String | "TRUE" for non-zero, or "FALSE" for zero |
| int ID | The body type's ID # |
| string Name | The full body type name |
| To String | Same as Name |
| To String | The number |
| bool CanCast | Can usually cast? (not melee only) |
| bool ClericType | Cleric/Paladin? |
| bool DruidType | Druid/Ranger? |
| int ID | The class's ID # |
| string Name | The "long name" as in "Ranger" |
| bool NecromancerType | Necromancer/Shadowknight? |
| bool PetClass | Pet class? (shaman, necromancer, mage, beastlord) |
| bool PureCaster | Pure caster? (can gate!) |
| bool ShamanType | Shaman/Beastlord? |
| string ShortName | The "short name" as in "RNG" |
| To String | Same as Name |
| int Items | Item count on the corpse |
| item Item[n] | nth item on the corpse |
| item Item[name] | Finds an item by partial name in this corpse (use Item[=name] for exact) |
| bool Open | Corpse open? |
| To String | FALSE, except if a corpse is open gives TRUE |
| int ID | The deity's ID # |
| string Name | The full deity name |
| string Team | The team name |
| To String | Same as Name |
| int ExpPct | Returns the current exp percent of the evolving item |
| bool ExpOn | Is Evolving exp on? |
| int Level | Returns the current level of the evolving item |
| int MaxLevel | Returns the maximum level of the evolving item |
| To String | Returns TRUE or FALSE, is item an evolving item |
| string Deci | ###.# |
| string Centi | ###.## |
| string Milli | ###.### |
| int Int | The whole number portion (will not round) |
| string Precision[n] | Convert to a string with this number of digits after the decimal (1 is Deci, 2 is Centi, etc) |
| To String | ###.## |
| int Clock | The nearest clock direction, e.g. 1-12 |
| float Degrees | Heading in degrees (same as casting to float) |
| float DegreesCCW | Heading in degrees Counter-Clockwise (the way the rest of MQ2 and EQ uses it, and is expected by older macros) |
| string Name | "south" "south by southeast" etc |
| string ShortName | "S" "SSE" etc |
| To String | Same as ShortName |
| float Float | The number as a float (instead of 123, this will give 123.0) |
| string Hex | The hex value of the integer |
| int Reverse | Endianness reversed |
| To String | The number |
| int ID | Number of this item slot (usable directly by /itemnotify) |
| item Item | Item contained by this item slot |
| invslot Pack | Container that must be opened to access the slot with /itemnotify |
| int Slot | Slot number inside the pack which holds the item |
| string Name | For inventory slots not inside packs, the slot name |
| To String | Same as ID |
| int Hours | The number of hours in hh:mm:ss |
| int Minutes | The number of minutes in hh:mm:ss (will never be 60+) |
| int Seconds | The number of seconds in hh:mm:ss (will never be 60+) |
| string Time | The time formatted as mm:ss |
| int TotalMinutes | The total number of minutes |
| int TotalSeconds | The total number of seconds |
| int Ticks | The value in ticks |
| string Time | Time in the form mm:ss (if there are no hours, the form will be mm:ss) |
| string TimeHMS | Time in the form hh:mm:ss (if there are no hours, the form will be mm:ss) |
| To String | Same as Ticks |
| int ID | The race's ID # |
| string Name | The full race name |
| To String | Same as Name |
| class Class | Raid member's class (works without being in zone) |
| int Group | Current group number (or 0) |
| bool GroupLeader | Group leader? |
| int Level | Raid member's level (works without being in zone) |
| bool Looter | Allowed to loot with current loot rules and looters? |
| string Name | Player's name |
| bool RaidLeader | Raid leader? |
| spawn Spawn | spawn object for this player if available (must be in zone) |
| To String | Same as Name |
| float Gravity | Gravity |
| int ID | Zone ID |
| float MinClip | Minimum clip plane allowed in this zone |
| float MaxClip | Maximum clip plane allowed in this zone |
| string Name | Full name like "Ocean of Tears" |
| string ShortName | Short name like "oot" |
| int SkyType | Sky type |
| int Type | Zone type |
| To String | Same as Name |
| string Name | Name of current macro |
| int Params | Number of parameters to current sub |
| string Return | Last value from /return |
| int RunTime | Amount of time macro has been running |
| To String | Same as Name |
| string BuildDate | Date that mq2main.dll was built |
| bool ChatChannel[channelname|#] | Returns TRUE if channelname is joined or returns the channel name of # |
| bool ChatChannels | Returns the number of chat channels joined |
| string Error | Last normal error message |
| string GameState | CHARSELECT INGAME UNKNOWN |
| string LastCommand | Last command entered |
| bool LClickedObject | Clicked a ground spawn, TS container, NPC, or PC |
| string LastTell | Name of last person to send you a tell |
| string LoginName | Your station name |
| int MouseX | Mouse's x location |
| int MouseY | Mouse's y location |
| string MQ2DataError | Last MQ2Data parsing error message |
| int Running | Running time of current MQ2 session, in milliseconds |
| string Server | Full name of your server |
| string SyntaxError | Last syntax error message |
| int ViewportX | Left edge of the viewport area |
| int ViewportY | Top edge of the viewport area |
| int ViewportXMax | Right edge of the viewport area |
| int ViewportYMax | Bottom edge of the viewport area |
| int ViewportXCenter | Horizontal center of the viewport area |
| int ViewportYCenter | Vertical center of the viewport area |
| To String | None |
| float Abs[formula] | Absolute value (calculates first) |
| float Acos[n] | The Acos of n |
| float Asin[n] | The Asin of n |
| float Atan[n] | The Atan of n |
| float Calc[formula] | Evaluates a mathematical formula |
| float Cos[n] | The Cos of n |
| int Dec[hex] | The decimal value given a hexadecimal string |
| float Distance[y,x,z:y,x,z] | Performs distance calculations in 1, 2 or 3 dimensions. Default to your character's current x, y or z. |
| float Distance[N,W,U:N,W,U] | Same as above, just demonstrating that the order is the same as above |
| string Hex[n] | The hex value of n |
| int Not[n] | Performs a bitwise not on n |
| int Rand[n] | Random number with range of n, meaning Rand[n]=0-(n-1). e.g. Rand[2] will give 0 or 1 |
| float Sin[n] | The Sin of n |
| float Sqrt[formula] | The square root of formula |
| float Tan[n] | The Tan of n |
| To String | NULL |
| int Items | Item count on the merchant |
| item Item[n] | nth item on the merchant |
| item Item[name] | Finds an item by partial name at this merchant (use merchant.Item[=name] for exact) |
| To String | FALSE, except if a merchant is open gives TRUE |
| float Markup |
The value used to calculate item values for merchant (Markup is what your charisma, faction, change) Markup*Cost=Merchant sell price. Cost*(1/Markup)=Your sell price. 1.05 is the cap, so there might not be a cap based on charisma. |
| bool Open | Merchant open? |
| float AverageLevel | Average level of raid members (yay more accurate than in the window) |
| raidmember Leader | Raid leader |
| string Looter[n] | Specified looter name by number |
| int Looters | Number of specified looters |
| int LootType | Loot type number (1-leader 2-leader&groupleader 3-leader&specified) |
| raidmember Member[n] | Raid member by number |
| raidmember Member[name] | Raid member by name |
| int Members | Total number of raid members |
| raidmember Target | Raid target (clicked in raid window) |
| int TotalLevels | Sum of all raid members' levels |
| To String | None |
/echo ${Me.Buff[1]}Containers
/echo ${Me.Buff[1].Duration.Time}
/echo ${Me.Buff[name].Duration.Time}
/if (${Target.Distance}<11)&&(${Me.AbilityReady[Bash]}) /doability "Bash"
${Me.Inventory[slot]}Getting names
/if (${InvSlot[pack${index}].Item.Container})
/if (!${InvSlot[pack${index}].Item.Container} && ${InvSlot[pack${index}].Item.ID})
${Window[Enviro].Open}
${Group[1].Name}Getting ID's
${Target.Name}
${Group[1].Pet.Name}
/echo ${Cursor.ID}Using Arg
/echo ${Me.Gem[3].ID}
/echo ${Group[3].ID}
/echo Bat 1: ${NearestSpawn[1,npc bat].ID}
/echo Bat 2: ${NearestSpawn[2,npc bat].ID}
/echo Bat 3: ${NearestSpawn[3,npc bat].ID}
/target id ${NearestSpawn[1,pc].ID}Using Defined
Target the nearest PC
/if (!${Defined[myVar]}) {String Comparisons
/declare myVar int local 0
}
/docommand ${If[Cursor.Name.Compare[itemname],/autoinv,/destroy}Numeric Comparisons
/if (${Param1.Equal[yourself]}
/if (${Param1.NotEqual[${Me.Name}]})
/if (${AttackOnAssist}==1)Casting
/if (${Target.ID}==${Int[${Param0}]})
/if (${Target.Distance.Int}<100)
/if (!${Me.Combat} && ${DoTraps}==1)
${Window[SpellBookWnd].Open}Calculations
${Me.Casting}
${Me.Gem[1].Name}
/if (${Math.Distance[${AnchorX},${AnchorY}]}>${AnchorRadius})Ini
${Math.Calc[${Target.Y}-${Math.Cos[${Target.Heading}]}]}
${Math.Distance[${Math.Calc[${Target.Y}-${Me.Y}]}]}
/varset DoEvade ${Ini[${IniFile},Combat,DoEvade]}Windows
Window closedSpawn Searches
/if (!${Window[pack${PackNum}].Open}) {/echo not open}
/if (${Window[pack${PackNum}].Open}==FALSE) {/echo not open}
/if (${Window[pack${PackNum}].Open}==NULL) {/echo not open}
Window Open
/if ${Window[pack${PackNum}].Open} { do this }
Window Lists
${Window[TradeskillWnd].Child[RecipeList].List[1]}
Get the first-column text for the nth item in a list box
${Me.NearestSpawn[1,trigger].Distance}MacroQuest2 and the UI
${Me.NearestSpawn[1,trap].Distance}
${Me.NearestSpawn[1,timer].Distance}
${Me.NearestSpawn[1,untargetable].Distance}
| 1000: ${Me.CurrentMana} | 2000: ${Target.Level} |
| 1001: ${Me.MaxMana} | 2001: ${Target.Class} |
| 1002: ${Me.State} | 2002: ${Target.Race} |
| 1003: ${Me.Speed} | 2003: ${Target.Distance} |
| 1004: ${Me.Heading} | 2004: |
| 1005: ${Me.X} | 2005: ${Target.State} |
| 1006: ${Me.Y} | 2006: ${Target.X} |
| 1007: ${Me.Z} | 2007: ${Target.Y} |
| 1008: ${Me.Dar} | 2008: ${Target.Z} |
| 1009: ${Me.Cash} | 2009: ${Target.Heading} |
| 1010: ${Me.CashBank} | 2010: ${Target.Speed} |
| 1011: ${Me.Platinum) | |
| 1012: ${Me.PlatinumShared} | |
| 1013: ${Me.Gold} | |
| 1014: ${Me.SilverBank} | |
| 1015: ${Me.CopperBank} | |
| 3000: ${Zone} | 4000: ${Macro.Name} |
| 3001: | 4001: ${Macro.RunTime} |
| 3002: ${Me.Bound} | |
| 3003: ${Time() | |
| 3004: ${Time.Hour} | |
| 3005: ${Time.Minute} | |
| 3006: ${Time.Second} | |
| 3007: ${Time.Date} | |
| 3008: ${Time.Year} | |
| 3009: ${Time.Month} | |
| 3010: ${Time.Day} | |
| 3011: ${Spawn.GM} | |
| 3012: ${Me.FreeInventory} |
<Label item =&Target_Level&>MQ2 UI Tooltypes
<ScreenID>TargetLevel</ScreenID>
<EQType>2000</EQType>
<Font>2</Font>
<RelativePosition>true</RelativePosition>
<Location>
<X>24</X>
<Y>33</Y>
</Location>
<Size>
<CX>22</CX>
<CY>14</CY>
</Size>
<Text>0</Text>
<TextColor>
<R>255</R>
<G>255</G>
<B>0</B>
</TextColor>
<NoWrap>true</NoWrap>
<AlignCenter>false</AlignCenter>
<AlignRight>true</AlignRight>
<AlignLeft>false</AlignLeft>
</Label>
<EQType>9999</EQType>MQ2 Config Files
<TooltipReference>${variable}</TooltipReference>
Example
<Label item ="BW_Buff0_Duration">
<ScreenID>Buff0Duration</ScreenID>
<EQType>9999</EQType>
<TooltipReference>${Me.Buff1.Duration}</TooltipReference>
<Font>2</Font>
<RelativePosition>true</RelativePosition>
<Location>
<X>23</X>
<Y>3</Y>
</Location>
<Size>
<CX>153</CX>
<CY>14</CY>
</Size>
<Text></Text>
<TextColor>
<R>255</R>
<G>255</G>
<B>255</B>
</TextColor>
<NoWrap>true</NoWrap>
<AlignCenter>false</AlignCenter>
<AlignRight>false</AlignRight>
</Label>
/loadcfg server_charactername.CFGExample of an entry in a CFG file for a character:
Loads a CFG file for the character
/custombind add lootcorpseConfigs that are automatically loaded:
/custombind set lootcorpse /multiline ; /target corpse radius 17; /loot
/bind lootcorpse f
AutoExec.CFG Executed on the first pulseExamples of file names
CharSelect.CFG Executed when you are put at character select
server_charactername.CFG Executed when this character enters the world
mapshortname.CFG Executed when you zone into this zone
pluginname-AutoExec.CFG Executed when this plugin is loaded (after its initialization is complete)
CharacterNote: Plugins can use LoadCfgFile(filename)
tallon_lordsoth.cfg
Maps
oot.cfg, soldungb.cfg
soldunga.cfg
take.cfg
Plugins
MQ2Map-AutoExec.CFG
MQ2ChatWnd-AutoExec.CFG
MQ2Bzsrch -- a bazaar search plug-inMQ2Bzrsrch Plugin
MQ2Chat -- Directs MQ2 output to the regular chat window
MQ2ChatWnd -- Directs MQ2 output to a special chat window (safer)
MQ2EQBugFix -- fix a crash(!) when exiting with no journal entries
MQ2EQIM -- EQIM
MQ2CustomBinds -- Allows you to specify custom commands to execute on a key combination
MQ2FPS -- frame limiter (similar to EQPlayNice)
MQ2IRC -- IRC plugin
MQ2ItemDisplay -- Add extra data to item windows
MQ2Label -- allows custom UI labels
MQ2Map -- enhanced map
MQ2Telnet -- act as a telnet server for macro output
| bazaar Bazaar | Bazaar search info |
| bool Done | Search complete? |
| int Count | Result count |
| bazaaritem Item[n] | Result info by index (1-based) |
| To String | Same as Done |
| string Name | Item name |
| spawn Trader | The guy selling it |
| int Price | Price the guy is selling it for |
| int Quantity | Number of this item this guy has |
| int ItemID | The item's ID number |
| int Value | Value of the item? |
| To String | Same as Name |
/plugin MQ2Chat unloadTo enable this plugin
/plugin MQ2ChatMQ2ChatWnd plugin
/plugin mq2chatOnce you do the above two commands, all output from MacroQuest2 and normal EverQuest commands will go to your log, and will be visible to EverQuest.
loads the default chat plugin (normal chat window)
/plugin mq2chatwnd unload
unloads the MacroQuest2 chat window
/custombind list | [a dd| delete| clear] name [ -down| -up] | set name [ -down| -up ] commandExamples
/custombind listMQ2EQIM plugin
Lists all of your custom binds names and commands (the key combinations must be set using /bind)
/custombind add name
Will add a new bind name for use here, with /keypress, /bind, etc.
/custombind delete name
Removes a custom bind
/custombind clear name
Clears a specific command for a custom bind. If -up or -down is not specified, defaults to -down.
/custombind set name [-down|-up] command
will set a specific command for a custom bind. If up or down is not specified, defaults to down.
Example usage (NOTE: MQ2's very first bind command is "RANGED" so you do not need to do this, but for example)/custombind add mybindTo set the real RANGED bind, do "/bind ranged "
/custombind set mybind /ranged
/bind mybind g
| int Buddies | Size of the buddy index (will not necessarily be equal to the number of buddies, but n in Buddy[n] will never exceed this number) |
| string Name | Buddy's name (may be fennin.Name or just Name, depending on how you added them) |
| string Status | "Removed from list", "Offline", "EQIM", "EQIM (AFK)", "Unknown Status(4)", "Playing", "Playing (AFK)" |
| int StatusID | Numeric representation of the above (0,1,2,3,4,5,6) |
| time LastSeen | Last time this buddy was on/seen |
| To String | Same as Name |
| buddy Buddy[name] | Info on buddy with this name |
| buddy Buddy[n] | Buddy with this index number in the system |
/maxfps fg|bg #MQ2FPS plugin adds these Top-Level Objects (these are NOT in the standard reference because they are from a plugin not built in)
Sets the foreground or background framerate
/fps mode [absolute|calculate]
Changes the mode used by /maxfps to absolute or calculate. You can specify the mode, or use /fps mode to toggle between the two.
/fps on|off
Enables or disables the framerate display
/render fg|bg #|~#
Sets the foreground or background rendering rate. This is how many out of n frames MQ2FPS will allow to be drawn. You keep moving full speed, the client responds to mouse or keys, the UI is still drawn... but, the world itself will not be drawn as often.
The use of # will cause MQ2FPS to draw 1 of # frames.
The use of ~# will cause MQ2FPS to draw n - 1 frames, where n is #. Examples/render bg 3 Draws 1 out of 3 frames /render bg ~3 Draws 2 out of 3 frames
| float FPS | Current frames per second |
| int MaxFPS | Current max frames per second |
| bool Foreground | Is this session in the foreground? |
ExampleExample MQ2HUD.INI
/loadhud bard
In this case, the [bard] section in MQ2HUD.ini could also be [BARD]
The command to load the default HUD specifically is /defaulthud
[Elements]Seeing as how the mouse functions perfectly fine in full screen mode, the cursor has been forced to display the same as it would in UI-visible mode. The only difference is the item is not displayed on your cursor. With MQ2HUD and the "CursorItemName" example, you could have it show the name of the item attached to your cursor in full screen mode (use type 6 if you want it to follow your cursor in full screen mode only).
;The order is TYPE,X,Y,RED,GREEN,BLUE,TEXT
TargetInfo=3,5,35,255,255,255,${Target}
GMIndicator=3,5,45,0,0,255,${Spawn[gm]}
CursorItemName=7,-15,-15,255,255,255,${If[${Cursor.ID},${Cursor},]}
ClickMeForFun=6,-25,-25,255,255,255,${If[!${Cursor.ID},click me,]}
TYPE is currently any combination of the following:
1 - Display in non-full screen mode
2 - Display in full screen mode ("f10 mode")
4 - X,Y is based on cursor location
e.g. 1+2+4=7. 7 means all 3 of the above. 6 means 2 and 4. 3 means 1 and 2. Just add them together. There is no way to end up with a number that could mean two different combinations.
/classhudTop Level Objects
Loads a class specific hud. This HUD must have a [hudname] section in MQ2HUD.ini
/defaulthud
Load the default HUD specifically
/hud normal|underui|always
normal will make the HUD display as it would normally on top of UI, not at char select or in "f10 mode"
underui will make the HUD display as normal except UNDER the UI, and not at char select or in "f10 mode"
always will make the HUD display under the UI, at char select, and in "f10 mode"
/loadhud hudname (not case sensitive)
Loads a HUD by the name hudname. This HUD must have a [hudname] section in MQ2HUD.ini
/zonehud
Loads a HUD specific to a zone.This HUD must have a [hudname] section in MQ2HUD.ini
Note: There is currently no command to add or remove these from inside the game. One will probably be added soon. The plugin will automatically re-load the list from the .ini when you modify and save the .ini.
| string HUD | Name of currently loaded HUD |
| irc Irc | Creates an irc object |
| bool Connected | connected? |
| string Server | current server |
| string Channel | current channel |
| string Nick | current nickname |
| int Port | current port |
| To String | same as Connected |
Example/mapfilter help|option [color R# G# B#]
/mapclick lalt+shift /mycommand %i
leftalt+shift right click on a spawn will cause /mycommand to be executed.
| all | Enables/disables map functions |
| CastRadius # | Sets radius of casting circle to # (omit or set to 0 to disable) |
| Corpse | Displays corpses |
| Custom | Sets custom filter (omit to disable). Used same search options as /target and the Spawn search TLOs |
| Ground | Displays ground items |
| Group | Displays group members in a specific color |
| Help | Displays the available options for /mapfilter |
| Menu | Allows display of right-click context menu |
| Mount | Displays mounts |
| NormalLabels | Toggles non-MQ2 label display |
| NPC | Displays NPCs |
| NPCConColor | Displays NPCs in consider colors |
| PC | Displays PCs |
| PCConColor | Displays PCs in consider colors |
| Pet | Displays pets |
| Target | Displays your target |
| TargetLine | Displays a line to your target |
| TargetMelee # | Draws a melee-range circle around your target |
| TargetRadius # | Sets radius of a circle around your target to # (omit or set to 0) |
| Timer | Displays Timer objects on the map |
| Trap | Displays trap objects on the map |
| Trigger | Displays hidden triggers/traps |
| Untargetable | Displays untargettable spawns on the map |
| Vector | Displays heading vectors |
/mapfilter Ground/mapnames normal | target options
Toggles ground spawns on or off
/mapfilter custom npc range 40 65
Displays all npcs of level range 40 to 65
/mapfilter custom npc range 60 65 radius 50
Displays all npcs of level 60 to 65 within a radius of 50
/mapfilter custom npc range 60 65 radius 50
Displays all npcs of level 60 to 65 within a radius of 50
/mapfilter Trigger color 200 200 0
Sets the color of Triggers
Note: The use of custom is a one time event, it is not persistent.
/maphide "spawnname" [reset]
command to hide spawnname from the map. Hidden spawns are in effect until the mapped spawns are re-generated (such as changing some map filters)
/maphide reset
Re-generates the spawn list.
/maphide npc range 1-39
Hides all spawns level 39 and below
/mapnames normal [%l %R %C] %N /mapnames target [%l %R %C] %N (%x, %y, %z)The command takes a parameter specifying normal/target, and then the custom string. The plugin will replace the %l %r %c %N stuff with a piece of information. Each code is CASE SENSITIVE and exactly one character in length. It is important to note that names are NOT updated continually, except for your target if the target map filter is on. In testing the system was approximately 4 times as slow if all names were updated continually.
| spawn MapSpawn | Object that is created when your cursor hovers on a spawn on the map |
${MapSpawn.ID}MQ2Telnet plugin
Set Enabled=1 and set a valid Port=###Also, please set a "Welcome=message" and definitely a private "Password=junk"
;**********************************************************************setting port=0 will disable the Telnet capability
; for use with the telnet server plugin -- mq2telnet
;**********************************************************************
[Telnet Server]
; port = 0 off, else put the port number here
Port=6669
; localonly boolean -- supposedly does a get peer name to compare address
; but you must use the hostname not 127.0.0.1 or localhost when connecting
LocalOnly=0
Welcome=YAY!!! ya made it!!! n00b!
LoginPrompt=login:
PasswordPrompt=password:
[Users]
;username=password
wassup=ubahmanualguy
twister=god
Example2. Add the new plugin to your Visual Studio workspace (Visual C++ is part of Visual Studio, so this is the same as adding it to your Visual C++ workspace).
mkplugin myplugin
This will create a plugin named "MQ2Myplugin"
If you don't know how to use DOS, you should do this:
Start->Run: c:\mq2\mkplugin myplugin
Replacing c:\mq2\ with the path to where you have the MacroQuest2 source files at.
| + | Addition |
| - | Subtraction |
| / | Division |
| \ | Integer Division |
| * | Multiplication |
| % | mod |
| ^ | Exponent |
| & | Bitwise AND |
| | | Bitwise OR |
| ~ | Bitwise NOT |
| ^^ | XOR |
| << | Bitwise shift left |
| >> | Bitwise shift right |
| == | Equal to |
| != | Not equal to |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
| && | AND |
| | | | OR |
| ! | NOT |
| Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | |
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace |
| Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
| Caps_Lock | A | S | D | F | G | H | J | K | L | ; | ' | Enter | |
| Shift | Z | X | C | V | B | N | M | , | . | / | Right_Shift | ||
| Ctrl | Alt | Space | Right_Alt | Right_Ctrl | |||||||||
| Prnt_Scrn | Scroll_Lock | ||||||
| Insert | Home | Page_Up | Num_Lock | Num_/ | Num_* | Num_- | |
| Delete | End | Page_Down | Num_7 | Num_8 | Num_9 | Num_+ | |
| Num_4 | Num_5 | Num_6 | |||||
| Up | Num_1 | Num_2 | Num_3 | Num_Enter | |||
| Left | Down | Right | Num_0 | Num_Del | |||
| 1H Blunt | 1H Slashing | 2H Blunt |
| 2H Slashing | Abjuration | Alteration |
| Apply Poison | Archery | Backstab |
| Bind Wound | Bash | Block |
| Brass Instruments | Channeling | Conjuration |
| Defense | Disarm | Disarm Traps |
| Divination | Dodge | Double Attack |
| Dragon Punch | Duel Wield | Eagle Strike |
| Evocation | Feign Death | Flying Kick |
| Forage | Hand To Hand | Hide |
| Kick | Meditate | Mend |
| Offense | Parry | Pick Lock |
| Piercing | Riposte | Round Kick |
| Safe Fall | Sense Heading | Sing |
| Sneak | Specialize Abjure | Specialize Alteration |
| Specialize Conjuration | Specialize Divination | Specialize Evocation |
| Pick Pockets | Stringed Instruments | Throwing |
| Tiger Claw | Tracking | Wind Instruments |
| Fishing | Make Poison | Tinkering |
| Research | Alchemy | Baking |
| Tailoring | Sense Traps | Blacksmithing |
| Fletching | Brewing | Alcohol Tolerance |
| Begging | Jewelry Making | Pottery |
| Percussion Instruments | Intimidation | Berserking |
| Taunt | Slam |
| Alchemy | Baking | Blacksmithing |
| Brewing | Firing | Fishing |
| Fletching | Fletching WoodElf | Jewelry Making |
| Make Poison | Medicine | Quest |
| Merchant | Mixing | Pottery |
| Regular | Research ??? | Research ENC |
| Research MAG | Research NEC | Research WIZ |
| Research Practice | Tailoring | Tailoring Halfling |
| Tinkering |
| 0 | charm |
| 1 | leftear |
| 2 | head |
| 3 | face |
| 4 | rightear |
| 5 | neck |
| 6 | shoulder |
| 7 | arms |
| 8 | back |
| 9 | leftwrist |
| 10 | rightwrist |
| 11 | ranged |
| 12 | hands |
| 13 | mainhand |
| 14 | offhand |
| 15 | leftfinger |
| 16 | rightfinger |
| 17 | chest |
| 18 | legs |
| 19 | feet |
| 20 | waist |
| 21 | powersource |
| 22 | ammo |
| pack1 - pack8 | Your pack slots |
| 23-30 | character general inventory slots |
| bank1 - bank16 | Character bank slots |
| sharedbank1 - sharedbank2 | Shared bank pack slots |
| trade1 - trade8 | Trade Window |
| loot1 - loot31 | Corpse window |
| enviro1 - enviro10 | Environmental containers (forge, kiln, etc...) |
| merchant1 - merchant80 | Merchant window |
| bazaar1 - bazaar80 | Bazaar search window |
| inspect1 - inspect31 | Inspect window |
| AAW_ArchetypePage | COMBW_ContainerArea | InventoryWindow | PlayerWindow | TributeMasterWnd |
| AAW_ClassPage | COMBW_FavoritesArea | IW_CharacterView | PvpLeaderboardWnd | VideoModesWindow |
| AAW_GeneralPage | COMBW_FlagsArea | JournalCatWnd | PvPMerchantWnd | TributeBenefitWnd |
| AAW_Page4 | COMBW_LeftSideArea | JournalNPCWnd | PvPStatsWnd | |
| AAW_Page5 | COMBW_RecipeListArea | KnowledgeBasePage | QuantityWnd | |
| AAW_Page6 | COMBW_RightSideArea | LargeDialogWindow | RAID_MemberPage | |
| AAWindow | COMBW_SearchArea | LeadershipWindow | RAID_NotePage | |
| ActionsAbilitiesPage | CompassWindow | LEW_GroupPage | RaidOptionsWindow | |
| ActionsCombatPage | CursorAttachment | LEW_RaidPage | RaidWindow | |
| ActionsMainPage | DynamicZoneWnd | LoadskinWnd | SelectorWindow | |
| ActionsSocialsPage | DZLeaderSection | LootWnd | ShortDurationBuffWindow | |
| ActionsWindow | EditLabelWnd | LW_LootInvWnd | SkillsSelectWindow | |
| ActorParticlesPage | EnvironmentParticlesPage | MapToolbarWnd | SkillsWindow | |
| AdventureLeaderboardWnd | FacePickWindow | MapViewWnd | SocialEditWnd | |
| AdventureMerchantWnd | FeedbackWindow | MerchantWnd | SpellBookWnd | |
| AdventureRequestWnd | FileSelectionWnd | MusicPlayerWnd | SpellParticlesPage | |
| AdventureStatsWnd | FindLocationWnd | MVW_MapRenderArea | StoryWnd | |
| AlarmWnd | Friends_TimerSlider0 | MW_MerchantSlotsWnd | SystemInfoDialogBox | |
| BazaarSearchWnd | FriendsWindow | MW_SlotsWndThree | TargetOfTargetWindow | |
| BazaarWnd | FW_FriendsPage | MW_SlotsWndTwo | TargetWindow | |
| BigBankWnd | FW_IgnorePage | NewTicketPage | TBW_LabelWnd | |
| BodyTintWnd | GemsGameWnd | NoteWindow | TBW_Layout | |
| BookWindow | GGW_GameView | OpenTicketsPage | TextEntryWnd | |
| BreathWindow | GiveWnd | OptionsChatPage | TicketCommentWindow | |
| BuffWindow | GroupInfoPage | OptionsColorPage | TicketWindow | |
| BugReportWindow | GroupListPage | OptionsDisplayPage | TipWindow | |
| BZW_BazaarSlotsWnd | GroupSearchFiltersWnd | OptionsGeneralPage | TMW_ActiveBenefitArea | |
| CastingWindow | GroupSearchWnd | OptionsKeyboardPage | TMW_BenefitMasterArea | |
| CastSpellWnd | GroupWindow | OptionsMousePage | TMW_DonateWnd | |
| CJNPC_Layout | GT_MemberPage | OptionsWindow | TMW_LabelWnd | |
| ColorPickerWnd | GT_NotePage | PetInfoWindow | TMW_Layout | |
| CombatAbilityWnd | GuildManagementWnd | PIW_BuffWindow | TrackingWnd | |
| CombatSkillSelectWnd | HelpWindow | PlayerInfoPage | TradeskillWnd | |
| COMBW_CombineArea | HotButtonWnd | PlayerListPage | TradeWnd | |
| COMBW_ComponentArea | InspectWnd | PlayerNotesWindow | TrainWindow |
1. Select Build->Clean 2. Build->Batch Build and select only the Release versionsQ: fatal error C1083: Cannot open include file: '..\Dxsdk81\include\dinput.h': No such file or directory
You should end up with this sort of directory tree:Q: What files can I delete in the Release folder after compiling MQ2?
c:\macroquest\dx81sdk
c:\macroquest\mq2main
c:\macroquest\release