Sub NewINI()
/varset MyName ${Me.Name}
/varset mcsINI mcs_${Me.Name}.ini
/popup MCS Building new ini file for ${Me.Name} as ${mcsINI}
/echo MCS Building new ini file for ${Me.Name} as ${mcsINI}
/declare a int
/declare b int
/declare SpellName string local
/ini "${mcsINI}" "${MyName}-spells" "shortname" "spell name,start message,landed message,gem,recast if worn off?,resist if resisted,assist type"
|- Dump spells that are loaded
/echo Checking spells
/for a 1 to 20
/echo /if (${Me.Gem[${a}].ID}) ${a}
/if (${Me.Gem[${a}].ID}) {
/ini "${mcsINI}" "${MyName}-spells" "gem${a}" "${Me.Gem[${a}]},,,${a}"
/ini "${mcsINI}" "MQ2Melee-buff" "downshit${a}" "/if (!$ {Me.Moving} && !$ {Me.Invis} && !$ {Me.Feigning} && !$ {Me.Sitting} && !$ {Me.AFK} && !$ {Stick.Active} && $ {Spell[${Me.Gem[${a}]}].Stacks} && !$ {Me.Buff[${Me.Gem[${a}]}} && $ {Cast.Ready[${Me.Gem[${a}]}]} && $ {Me.PctMana}>5) /casting "${Me.Gem[${a}]}"
/ini "${mcsINI}" "MQ2Melee-atk" "holyshit${a}" "/if ($ {Me.Combat} && $ {Target.Type.Equal[NPC]} && $ {Cast.Ready[${Me.Gem[${a}]}]}) /casting ${Me.Gem[${a}]}
}
/next a
|- Dump worn and pack clicky items
/echo Checking items
/for a 1 to 32
/if (${Me.Inventory[${a}].EffectType.Equal[Click Inventory]}) {
/ini "${mcsINI}" "${MyName}-spells" "inv${a}" "${Me.Inventory[${a}]},,,-1,0,0,blind"
}
|-- if its a container check to see whats in it.
/if (${Me.Inventory[${a}].Container}) {
/for b 1 to ${Me.Inventory[${a}].Container}
/if (${Me.Inventory[${a}].Item[${b}].EffectType.Equal[Click Inventory]}) {
/ini "${mcsINI}" "${MyName}-spells" "inv${a}_${b}" "${Me.Inventory[${a}].Item[${b}]},,,-1,0,0,blind"
}
/next b
}
/next a
/popup Scanning AA's this will take a few seconds.
|- Dump AA with an effect
/varset a 1
/varset b 4
/if (${Window[AAWindow].Child[CanPurchaseFilter].Checked}) {
/nomodkey /notify AAWindow CanPurchaseFilter leftmouseup
/delay 5
}
/nomodkey /notify AAWindow AAW_Subwindows tabselect ${b}
/delay 5
:Loop
/if (${Window[AAWindow].Child[List${b}].List[${a}].Length}) {
/nomodkey /notify AAWindow List${b} listselect ${a}
/if (${Window[AAWindow].Child[HotButton].Enabled}) {
/ini "${mcsINI}" "${MyName}-spells" "aa${b}_${a}" "${Window[AAWindow].Child[List${b}].List[${a}, 1]},,,0,0,0,blind"
}
/varcalc a ${a}+1
/goto :Loop
}
/if (${b}>1) {
/varcalc b ${b}-1
/varset a 1
/nomodkey /notify AAWindow AAW_Subwindows tabselect ${b}
/delay 5
/goto :Loop
}
|- Dump Discs
/for a 1 to 8
/echo (${Window[CombatAbilityWnd].Child[CAW_Button${a}].Text.Length}) a = CAW_Button${a}
/if (${Window[CombatAbilityWnd].Child[CAW_Button${a}].Text.Length}) {
/varset SpellName ${Window[CombatAbilityWnd].Child[CAW_Button${a}].Text}
/ini "${mcsINI}" "${MyName}-spells" "disc${a}" "${SpellName},,,-2,0,0,blind"
/ini "${mcsINI}" "MQ2Melee-FLAG" "holyflag${a}" "0"
/ini "${mcsINI}" "MQ2Melee-DISC" "holyshit${a}" "/if (!$ {Melee.DiscID} && $ {Me.PctEndurance} > 25 && ${Me.CombatAbilityReady[${SpellName}]}) /disc ${SpellName}
}
/next a
/return