MQ2MMOTLO - MMOBugs Wiki

Plugin Info
Name MQ2MMOTLO
Author htw
Link Forum Link
Commands /moneyreset /setrole /twopen
Source Available No
Uses INI File No



Description

MQ2MMOTLO adds some new Top-Level Objects and commands.


NOTE: THIS PLUGIN IS NO LONGER REQUIRED/PROVIDED. All functionality is built into MQ2Main/MQ2MMOBugs that was previously provided by MQ2MMOTLO. - htw

General Commands

/setrole

This command allows you to set the role of a Extended Target window entry, via the command line.

/setrole list Lists the available role names.
/setrole ## rolename Sets the role index ## (from 1, through the number of target entries, to max of 20) to rolename (see 'list' for names).

/setrole Examples

  • /setrole list Lists the roles
  • /setrole 2 mercenary Sets role of extended target #2 to mercenary

New Top-Level Objects

The following TLOs are added by this plugin:

MMOBugs

MMOBugs Has several members, that allow you to check some miscellaneous stuff.

  • MMOBugs :bool

MMOBugs Members

  • bool Status Simple indicator that returns true when plugin is loaded. Same as doing ${MMOBugs}
  • string StationName Your account login name (station name).
  • bool Behind Are you behind your target? (takes into account Seized Opportunity if you have it)
  • bool BehindRaw Are you behind your target? (does not consider Seized Opportunity)
  • int MaxBuffs The total number of buff slots you have on your toon
  • int NumBuffs The current number of buffs you have on your toon
  • int FreeBuffs The current number of free buff slots you have on your toon
  • string ZoneTime The time you've been in the current zone in hh:mm:ss string format (or since MQ2MMOTLO was loaded, if shorter).
  • int ZoneSecs The total seconds you've been in the current zone (or since MQ2MMOTLO was loaded, if shorter).
  • int ZoneMins The total minutes you've been in the current zone (or since MQ2MMOTLO was loaded, if shorter).
  • int ZoneHours The total hours you've been in the current zone (or since MQ2MMOTLO was loaded, if shorter).
  • bool AllowUntargetable True if the AllowUntargetable option is enabled for MQ2 target command and map targeting.
  • bool AllowTarget True if the AllowMQ2Target option is enabled for MQ2.
  • bool AllowInstantCamp True if the AllowInstantCamp option is enabled for MQ2.
  • int TargetRange The current setting of MQ2TargetRange, which is the max range allowed for the MQ2 target command. 0 = unlimited
  • int MapRange The current setting of MQ2MapRange, which is the max range allowed for click target on map for MQ2Map. 0 = unlimited

Range

Range Allows you to check if a value is inside or between a specified upper or lower bounds. If the value falls with the specified parameters it will return TRUE, else it will return FALSE.


  • Range :bool

Range Members

  • Between[lower,upper:value]
  • Inside[lower,upper:value]

Range Examples

${Range.Inside[10,90:${Me.PctHPs}]}
${Range.Between[80,100:${Me.PctEndurance}]}
${Range.Inside[10,90:${Target.PctHPs}]}
${Range.Between[10,100:${Target.Distance}]}

Inside is like: (value>lower) && (value<upper)
Between is like: (value>=lower) && (value<=upper)

Doors

Doors Allows you to access the doors (switches) list and related information.

Doors Members

The TLO members are as follows:

  • int Count The number of doors/switches in the zone
  • int Find[#|substring] Find the index number of the indicated door ID # or first matching name by substring
  • int Closest Index of the closest door/switch
  • Door Door[#|substring] Door data for the indicated door index # (not ID number) or first matching name by substring

The Door members are as follows:

  • string Name Name of the door
  • int ID Door ID number (not necessarily the same as the index number)
  • float Distance Distance from the player to the door
  • float X X coordinate of the door
  • float Y Y coordinate of the door
  • float Z Z coordinate of the door
  • float DefaultX X coordinate of the door in the closed position
  • float DefaultY Y coordinate of the door in the closed position
  • float DefaultZ Z coordinate of the door in the closed position
  • float Heading Door is facing this heading
  • float HeadingTo Direction you have to move towards this door
  • float DefaultHeading Door is facing this heading in the closed position
  • bool Open Is the door open?
  • bool LineOfSight Is the door in your line of sight?
  • string State State of the door: CLOSED, OPEN, OPENING, or CLOSING


Task

Task Allows you to check various task information for your toon.

Task Commands

  • /twopen Toggles whether to keep the task window open, in case you accidently close it. This is for use with shared tasks, where the data does not get updated properly if the task window is closed. You should minimize the window in that case, not close it.

Task Members

The TLO members are as follows:

  • string Name The char name in task
  • Task Leader The leader of the task
  • Task Member[#|name] The task member # or name
  • int Members Current number of characters in the task
  • bool IsLeader Is the char the task leader?
  • spawn Spawn Object for this player if available (must be in zone)
  • string Names[x] The task name for task #x in list
  • int Names[taskname] The task number for task taskname in list
  • int Total Current number of tasks in list
  • string Title[taskname|task#] The task name
  • string TypeName[taskname|task#] Quest, Shared, or Other
  • string TimeHMS[taskname|task#] Time left in shared task, in H:MM:SS. 'Unlimited' if not timed.
  • string Time[taskname|task#] Time left in shared task, in MM:SS. 'Unlimited' if not timed.
  • int Type[taskname|task#] 2 = Quest, 1 = Shared
  • int Hours[taskname|task#] Hours left in shared task (rounded down). -1 if unlimited.
  • int Minutes[taskname|task#] Total minutes left in shared task (rounded down). -1 if unlimited.
  • int Seconds[taskname|task#] Total seconds left in shared task. -1 if unlimited.

!!! NOTE: Proper timer data for shared task requires MQUI_TaskListWnd.xml, and at least 1 initial loadskin the first time you log a toon in with plugin loaded, or after you load the plugin in game.

Task Examples

  • ${Task.IsLeader} Am I the task leader?
  • ${Task.Name} My name
  • ${Task.Members} # of members in task
  • ${Task.Member[3].Name} Name of 3rd task member
  • ${Task.Member[2].IsLeader} Is 2nd task member task leader?
  • ${Task.Member[Razza].IsLeader} Is Razza task leader?
  • ${Task.Member[Razza].Spawn.Level} Razza's level (must be in zone)
  • ${Task.Total} Total number of tasks in list
  • ${Task.Names[2]} Name of 2nd task
  • ${Task.Names[Fight or Flight]} Task list index number of the task 'Fight or Flight'
  • ${Task.Title[2]} Name of 2nd task
  • ${Task.Title[Smashing Pumpkins]} Verify the task named 'Smashing Pumpkins', NULL if not found
  • ${Task.TimeHMS[Smashing Pumpkins]} Time left in the task 'Smashing Pumpkins', in H:MM:SS

As you can see, members can be indexed by name or #. # is member 1 through x. If name is used, and is not in task, NULL is returned (as expected).

Expedition

Expedition Allows you to check various expedition information for your toon.


Expedition Members

The TLO members are as follows:

  • string Name The name of the expedition
  • string Leader The leader of the expedition
  • int Max The max number of characters allowed in the expedition
  • int Members Current number of characters in the expedition
  • bool IsLeader Are you the expedition leader?
  • To String Same as Name
  • string Names[x] The character name for character #x in list
  • int Names[charname] The character number for the character charname in list

Expedition Examples

  • ${Expedition.IsLeader} Am I the expedition leader?
  • ${Expedition.Name} The expedition name
  • ${Expedition.Members} # of members in expedition
  • ${Expedition.Max} Max allowed members in the expedition
  • ${Expedition.Names[2]} Name of 2nd toon in expedition list
  • ${Expedition.Names[Bubba]} Character list index number of the expedition


MMOIni

MMOIni Reads value(s) from an ini file located in a relative or absolute path. This TLO is the same as the core Ini TLO, but MMOIni also allows using quotes to enclose a parameter (for example, if a parameter might have a comma), as well as delete a key or entire section. It also provides a command to let you substitute ^ characters for $ characters, so you can write TLO variable syntax to the ini file.

Commands

  • /mmoini FileName Section Key Value : Writes Key=Value to [Section] of FileName. If Value is not provided, the Key is deleted. If Key is not provided, the Section is deleted.
  • /mmoinix FileName Section Key Value : Writes Key=Value to [Section] of FileName. If Value is not provided, the Key is deleted. If Key is not provided, the Section is deleted. All ^ characters provided in the parameters are replaced with $ characters.
  • /mmoinics SourceFileName DestFileName SourceSection DestSection : Copies the section SourceSection from SourceFileName to the DestSection of DestFileName. The first 3 parameters are required, but if DestSection is omitted, it is assumed the same as SourceSection. SourceFileName and DestFileName can be the same.

MMOIni Forms

  • string MMOIni[filename,section,key,default]
    • The section, key, and default do not need to be given. If section or key are not given, multiple values are read.
    • Section and key may be set to -1 to skip them and give a new value.
    • If the ini is located in a directory other than the directory where the macro is located, you can use a DOS-style filepath (relative or absolute) to locate the ini.
    • If any parameter includes a comma in it, enclose the parameter in quotes to prevent incorrect parsing.

MMOIni Access to Types

MMOIni Examples

If sample.ini contains:

[KeyOne]
value1=foo
value2=bar
[KeyTwo]
Value3=foobar
[KeyThree, The]
Value4=lol
/echo ${MMOIni[sample.ini,KeyOne,value1]}                  foo
/echo ${MMOIni[sample.ini,KeyOne]}                         value1|value2||
/echo ${MMOIni[..\sample.ini]}                             KeyOne|KeyTwo|KeyThree, The|
/echo ${MMOIni[..\sample.ini, "KeyThree, The", Value4]}    lol

MMOZone

MMOZone Gives access to information about your current zone.


MMOZone Members

The TLO members are as follows:

  • string Name The full zone name.
  • string ShortName The short zone name.
  • int ID The zone ID number.
  • int Type The zone type.
  • int SkyType The zone sky type.
  • float Gravity The current zone gravity.
  • float SafeY The zone safe Y coordinate.
  • float SafeX The zone safe X coordinate.
  • float SafeZ The zone safe Z coordinate.
  • float MinClip The current value of your min clip distance.
  • float MaxClip The current value of your max clip distance.


Money (Plat/Gold/Silver/Copper)

Plat, Gold, Silver, Copper Gives access to information about your money this session.


Money Commands

  • /moneyreset Resets to 0 all your Start, StartInv, Change, & TotalChange values.

Money Members

The TLO members are as follows:

  • int Current Current amount of this coin type, from all sources (inventory + bank + shared bank + cursor).
  • int Change Change in the amount for this coin type (this session).
  • int Inventory Current amount of this coin type in inventory (carried on you).
  • int Bank Current amount of this coin type in the bank.
  • int Shared Current amount of this coin type in the shared bank.
  • int Cursor Current amount of this coin type held on your cursor.
  • float TotalChange Change in the amount for this session, for all coin types total (plat + gold + silver + copper).
  • float GrandTotal Current amount of money you have overall, of all coin types, from all sources.
  • int Start Amount of this coin type you had at the start of the session.
  • int StartInv Amount of this coin type you had at the start of the session in your inventory (carried on you).

Money Examples

  • ${Plat.Change} Total change in plat this session
  • ${Gold.Bank} Amount of gold in the bank
  • ${Silver.TotalChange} Amount (in plat) of change for all coin types total for this session (all 4 types have this same member calculation)
  • ${Plat.TotalChange} Amount (in plat) of change for all coin types total for this session (all 4 types have this same member calculation)
  • ${Copper.GrandTotal} Total amount of money you have (all 4 types have this same member calculation)
  • ${Plat.Inventory} Amount of plat you have in inventory (carried on you)
  • ${Copper.Current} Total amount of copper you have from all sources (inventory+bank+shared bank+cursor)

XTarget

XTarget Gives access to information about your extended targets.


XTarget Members

The TLO members are as follows:

  • bool Status Indicates the plugin is loaded and the XTarget TLO is available.
  • int Current The current number of extended targets.
  • int Max The max extended targets for the character.
  • int Lowest The lowest hitpoint mob on extended target. This will be the index number, so you can refer to it like ${Me.XTarget[${XTarget.Lowest}].ID}.

BenchMark

BenchMark Gives access to information about benchmarks.

BenchMark Members

The TLO members are as follows:

  • string Name The name of the benchmark.
  • int Count The current number of collected statistics for the indicated benchmark.
  • time Time The total time used for the benchmark.
  • time Average The average time used for the benchmark.
  • int Total The current number of available benchmarks.

BenchMark Examples

  • ${BenchMark.Name[1]} The name of benchmark 1
  • ${BenchMark.Count[1]} The total count of collected statistics (counts of time collection) for benchmark 1
  • ${BenchMark.Time[1]} The time (in ms) used by benchmark 1 (total)
  • ${BenchMark.Average[1]} The time (in ms) used by benchmark 1 (average)


Availability

This plugin is included with the MMOBugs Compile.