• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

If Statement Plugin

Joined
Mar 21, 2014
RedCents
27,491¢
Anyone who has ever tried to load statements(/if (), ${If[]}, ${}) using the ${Ini[]} command will be aware of what this plugin is for.

Give PeteSampras a Big Hug for this one. Credit for the Plugin goes to him. http://www.macroquest2.com/phpBB3/viewtopic.php?f=50&t=19680

Intentions:
This plugin is for custom macro writers or those of us who like to mod existing macros. Build your own Holy/Down shits and add them to your macros.

Instructons:
1. Download plugin and place it in your MQ2 folder.
2. /plugin MQ2Ifs

How to Use:

This plugin will load a string from an ini file and store it in an internal data structure. That can be Later used with the If.Statement[] command.

1. Create/modify a macro.
2. create an ini file with the if statements.
3. If you haven't loaded the plugin /plugin MQ2Ifs. This can be added into the macro.
4. Add command in macro to load the If Statement(s). /ifadd MacroPath,Section,Key(See below for examples)
6. Create /If () statements using the ${If.Statement[Key]}.


MQ2Ifs command format:

/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 - 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

Example:
My ini is \mq2\macros\Ifs_Kissassist.ini
My section is [Heals]
My key is Heals1=${If[${Group.MainTank.PctHPs}<30 && ${Me.PctMana}>40]}

/ifadd macros\Ifs_Kissassist.ini,Heals,Heals1

Now I can:
Verify it exists: ${Ifs.Exists[Heals1]}
View it unparsed: /iflist Heals1
Parse it: ${Ifs.Statement[Heals1]}
Delete it: /ifdelete Heals1


Ini file example for my mage using kissassist_Ifs.mac for the DPS array:
Rich (BB code):
[kissassist]
; Check to malo
DPS1=${If[!${Target.Malod.ID} && !${Me.Song[Chromatic Haze].ID},1,0]}
; For Pet Frenzied Burnout
DPS2=${If[!${Me.Song[Chromatic Haze].ID} && ${Target.Named},1,0]}
; For Thaumatize Pet
DPS3=${If[!${Me.Song[Chromatic Haze].ID},1,0]}
; Check Banestrike
DPS4=${If[!${Me.Song[Chromatic Haze].ID},1,0]}
: Check Fickle Magma
DPS5=${If[!${Me.Song[Chromatic Haze].ID} && !${Me.Song[Flames of Power].ID},1,0]}
; Fire Nuke 1
DPS6=${If[(${Target.PctHPs}>20 || ${Target.Named}) && (${Me.XTarget[${XTSlot2}].ID} || ${Me.Song[Chromatic Haze].ID}) || ${Target.Distance}<30,1,0]}
; Rain Fire
DPS7=${If[(${Target.PctHPs}>10 || ${Target.Named}) && !${Me.XTarget[${XTSlot2}].ID} && !${Me.Song[Chromatic Haze].ID} && ${Target.Distance}>=30,1,0]}
; Fire Nuke 2
DPS8=${If[(${Target.PctHPs}>10 || ${Target.Named}) && (${Me.XTarget[${XTSlot2}].ID} || ${Me.Song[Chromatic Haze].ID}) || ${Target.Distance}<30,1,0]}
; Rain Steal
DPS9=${If[(${Target.PctHPs}>10 || ${Target.Named}) && !${Me.XTarget[${XTSlot2}].ID} && !${Me.Song[Chromatic Haze].ID} && ${Target.Distance}>=30,1,0]}
; GOM Spells
GoMSpell1=${If[!${Me.Song[Chromatic Haze].ID},1,0]}
GoMSpell2=${If[1,1,0]}


Download: (Updated 08/12/2015)
 

Attachments

Last edited:
If Statement Plugin

Users who are viewing this thread

Back
Top
Cart