Difference between revisions of "MQ2Ifs" - MMOBugs Wiki

(Created page with "{{Pluginbox |name=MQ2Ifs |author={PeteSampras |commands=/ifadd, /ifdelete, /iflist, /fclear, /ifswap, /ifrename }} ==Description== Create unparsed ini en...")
 
 
Line 1: Line 1:
 
{{Pluginbox
 
{{Pluginbox
 
|name=MQ2Ifs
 
|name=MQ2Ifs
|author=[[User:PeteSampras|{PeteSampras]]
+
|author=[[User:PeteSampras|PeteSampras]]
 
|commands=/ifadd, /ifdelete, /iflist, /fclear, /ifswap, /ifrename
 
|commands=/ifadd, /ifdelete, /iflist, /fclear, /ifswap, /ifrename
 
}}
 
}}
Line 21: Line 21:
 
==TLO/Members==
 
==TLO/Members==
 
Ifs.Exists[key] - Does this key exist?
 
Ifs.Exists[key] - Does this key exist?
 +
 
Ifs.Statement[key] - Parses the value of that key. /if (${Ifs.Statement[key]}) /do this
 
Ifs.Statement[key] - Parses the value of that key. /if (${Ifs.Statement[key]}) /do this
 +
 
Ifs.Total - total number of ifs mapped out
 
Ifs.Total - total number of ifs mapped out
  
 
==Examples==
 
==Examples==
 
My ini is \mq2\macros\bot_petesampras.ini
 
My ini is \mq2\macros\bot_petesampras.ini
 +
 
My section is [Heals]
 
My section is [Heals]
 +
 
My key is UseHeal1=${If[${Group.MainTank.PctHPs}<30 && ${Me.PctMana}>40,1,0]}
 
My key is UseHeal1=${If[${Group.MainTank.PctHPs}<30 && ${Me.PctMana}>40,1,0]}
 +
  
 
/ifadd macros\bot_petesampras.ini,Heals,UseHeal1
 
/ifadd macros\bot_petesampras.ini,Heals,UseHeal1
 +
  
 
Now I can:
 
Now I can:
 +
 
Verify it exists: ${If.Exists[UseHeal1]}
 
Verify it exists: ${If.Exists[UseHeal1]}
 +
 
View it unparsed: /iflist UseHeal1
 
View it unparsed: /iflist UseHeal1
 +
 
Parse it: ${Ifs.Statement[UseHeal1]}
 
Parse it: ${Ifs.Statement[UseHeal1]}
 +
 
Delete it: /ifdelete UseHeal1
 
Delete it: /ifdelete UseHeal1
  

Latest revision as of 18:30, 15 December 2018

Plugin Info
Name MQ2Ifs
Author PeteSampras
Commands /ifadd, /ifdelete, /iflist, /fclear, /ifswap, /ifrename

Description

Create unparsed ini entries that you can use in macros.

Commands

This plugin provides one command for you to use with multiple options.

  • /ifadd ini_path,section,key - adds this key and value in this section of this ini file.
  • /ifdelete key - deletes this key
  • /iflist [all|key] - lists all or individual key, can be left blank to list all
  • /ifclear - clears all ifs
  • /ifrename key1 key2 - renames key1 to key2
  • /ifswap key1 key2/span> - swaps the if statements for key1 and key2

TLO/Members

Ifs.Exists[key] - Does this key exist?

Ifs.Statement[key] - Parses the value of that key. /if (${Ifs.Statement[key]}) /do this

Ifs.Total - total number of ifs mapped out

Examples

My ini is \mq2\macros\bot_petesampras.ini

My section is [Heals]

My key is UseHeal1=${If[${Group.MainTank.PctHPs}<30 && ${Me.PctMana}>40,1,0]}


/ifadd macros\bot_petesampras.ini,Heals,UseHeal1


Now I can:

Verify it exists: ${If.Exists[UseHeal1]}

View it unparsed: /iflist UseHeal1

Parse it: ${Ifs.Statement[UseHeal1]}

Delete it: /ifdelete UseHeal1


Availability

This plugin is available as a compiled binary in the MMOBugs binary distribution. The source code is not available