Difference between revisions of "MQ2MMOTLO" - MMOBugs Wiki

(→‎/setrole: formatting)
(move Desc)
Line 10: Line 10:
  
  
 +
 +
==Description==
 +
<font class="highlight">MQ2MMOTLO</font> adds some new Top-Level Objects and commands.
  
 
==General Commands==
 
==General Commands==
Line 23: Line 26:
 
* <font color="orange">/setrole</font> <font class="highlight2">list</font> Lists the roles
 
* <font color="orange">/setrole</font> <font class="highlight2">list</font> Lists the roles
 
* <font color="orange">/setrole</font> <font class="highlight2">2 mercenary</font> Sets role of extended target #2 to mercenary
 
* <font color="orange">/setrole</font> <font class="highlight2">2 mercenary</font> Sets role of extended target #2 to mercenary
 
==Description==
 
<font class="highlight">MQ2MMOTLO</font> adds some new Top-Level Objects.
 
  
 
== New Top-Level Objects==
 
== New Top-Level Objects==

Revision as of 15:53, 23 April 2011

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



Description

MQ2MMOTLO adds some new Top-Level Objects and commands.

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


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)

Availability

This plugin is included with the MMOBugs Compile.