Difference between revisions of "MQ2MMOTLO" - MMOBugs Wiki

(Added MMOBugs TLO)
(Added MMOZone)
Line 148: Line 148:
 
  /echo ${MMOIni[..\sample.ini]}                            KeyOne|KeyTwo|KeyThree, The|
 
  /echo ${MMOIni[..\sample.ini]}                            KeyOne|KeyTwo|KeyThree, The|
 
  /echo ${MMOIni[..\sample.ini, "KeyThree, The", Value4]}    lol
 
  /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:
 +
 +
* <font color="orange">string</font> <font class="highlight2">Name</font> The full zone name.
 +
* <font color="orange">string</font> <font class="highlight2">ShortName</font> The short zone name.
 +
* <font color="orange">int</font> <font class="highlight2">ID</font> The zone ID number.
 +
* <font color="orange">int</font> <font class="highlight2">Type</font> The zone type.
 +
* <font color="orange">int</font> <font class="highlight2">SkyType</font> The zone sky type.
 +
* <font color="orange">float</font> <font class="highlight2">Gravity</font> The current zone gravity.
 +
* <font color="orange">float</font> <font class="highlight2">SafeY</font> The zone safe Y coordinate.
 +
* <font color="orange">float</font> <font class="highlight2">SafeX</font> The zone safe X coordinate.
 +
* <font color="orange">float</font> <font class="highlight2">SafeZ</font> The zone safe Z coordinate.
 +
* <font color="orange">float</font> <font class="highlight2">MinClip</font> The current value of your min clip distance.
 +
* <font color="orange">float</font> <font class="highlight2">MaxClip</font> The current value of your max clip distance.
 +
  
 
==Availability==
 
==Availability==
  
 
This plugin is included with the MMOBugs Compile.
 
This plugin is included with the MMOBugs Compile.

Revision as of 23:50, 19 March 2011

Plugin Info
Name MQ2MMOTLO
Author htw
Link Forum Link
Commands None
Source Available No
Uses INI File No



Description

MQ2MMOTLO adds some new Top-Level Objects.

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}
  • 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


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)


Task

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


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

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'

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).


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.


Availability

This plugin is included with the MMOBugs Compile.