• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

needing help converting this to a magi macro... (1 Viewer)

chance98

New member
Joined
Dec 29, 2007
RedCents
71¢
im loving crystanes work.. and this works a+ on my wizard box i would like to use it on my magi as well just need to add 2 things to it... need to ad a pet handle area to it telling my pet to attack at mobs hps % that i choose.. and a pet auto summon and pet buff sections... can anyone help me... note would also like to change the snare routine to a malo routine ...

Rich (BB code):
|CrysNuke.mac written for www.redguides.com
|19May07
|Credits: Many thx to all I borrowed snippets from to start with.
|Requirements: Spellslot 9
|Strongly Recommened: AA "Mind Crash"
|Wishful for full functionallity: AAfamiliars, Pyromancy and Cryomancy, a snare spell. Skills in editing an Ini file. :)
|Last Update 01Jul07
|##########################################################################################################################################

#include Spell_Routines.inc
#include CrysNuke1.inc 
#include VarsTable.inc
#include Itemcast.inc

|##########################################################################################################################################

#chat tell

|##########################################################################################################################################

#Event OutDoor		"#*#outdoors#*#" 
#Event OutDoor		"You can not summon a mount here." 
#Event Zoning		"You have entered#*#" 
#Event ImDead		"You have been slain by#*#"
#Event ImDead		"You died.#*#" 
#Event AmSummoned	"You have been summoned!" 
#Event ImHit		"#*# YOU for #*#" 
#Event ImHit		"#*# YOU, but #*#" 
#Event Snaresuccess	"#1# is shackled to the ground."
#Event Snaresuccess	"#1# is immune to changes#*#"
#Event OutDoor		"#*#outdoors#*#"
#Event OutDoor		"You can not summon a mount here."
#Event Critblast	"You deliver a critical blast!#*#"

|##########################################################################################################################################

Sub Main
/Echo  ### Crys's AutoNuke Macro Enabled ###
/Echo  ### Type /echo afhelp for command list ### 
/declare TempAssigny			string outer
/if (${Target.Type.Equal[PC]} && ${Target.ID}) /varset TempAssigny ${Target.Name}
|########Sub AFNvarsdecl(VarsTable.inc)
/call AFNvarsdecl
/varset AFNiniFile CrysNuke_${Me.Name}.ini 
/if (${Defined[param0]}) {
	/call SetTank ${param0}
}
/if (!${Defined[param0]} && ${Target.Type.Equal[PC]} && ${Target.ID}) /call SetTank ${TempAssigny} 
/if (!${Defined[param0]} && !${Target.ID}) {
	/call SetTank
}
|########Sub LoadAFNini(VarsTable.inc)
/call LoadAFNini
/if (!${Me.Buff[${Me.AltAbility[759].Name}].ID} && !${Me.Buff[${Me.AltAbility[453].Name}].ID} && !${Me.Buff[${Me.AltAbility[303].Name}].ID}) /call Event_MyFam FireFam
/call CheckOutDoors
/call CheckLevi
/call MemSpells
/squelch /alert add ${Tankalertlist} ${tankname}
:mainloop
/if (${doleash} && (${Spawn[${leashholder}].ID} && ${Spawn[${leashholder}].Distance}>${leashlength})) /call Leash 
/call Loopchecks
/doevents
/call Targetlists
/if (${SpawnCount[NPC radius 100 zradius 50 alert ${Validtofightalertlist}]}<1) /call Buffcheck
/call Harvestcheck
/if (${SpawnCount[NPC radius 100 zradius 50 alert ${Validtofightalertlist}]}<1) /call Medcheck
/if (!${Spawn[${tankname}].ID}) /call MACheck
/if (${Spawn[${tankname}].ID} && ${Targetchangetimer}<5 && ${Target.ID}) /call TargSwitcheck
/call GetTarget
/call TargetCheck
/if (${engagedmob}==1 && ${Target.ID}==${mobid} && ${Target.LineOfSight}) {
	/call Debuff
	/call Nuke 
}
/goto :mainloop 
/return

Sub TargSwitcheck
/varset Targetchangetimer 150
/if (${Spawn[${tankname}].ID} && ${Spawn[${tankname}].Distance}<${engagedistance} && ${Target.ID} && ${Math.Calc[${Me.Level}/(${Target.Level}*${Target.Level})*25*${Me.Level}]}>${Target.PctHPs} && ${SpawnCount[npc radius 40 zradius 20 notid ${Me.Pet.ID} nearalert ${Tankalertlist} noalert ${Voidalertlist}]}>1) {
	/echo Target of the tank seems to have switched, changeing too.
	/squelch /target clear
	/delay 8 !${Target.ID}
	/call TargetCheck
}
/return

Sub Debuff
/if (${Target.Distance}>200 || !${FindItem[${tempstaff}].ID}) { 
	/if (${Target.Distance}>200) /echo ${Target.CleanName} is too far away to debuff with Elemental Staff.
	/goto :done 
} 
|/echo Debuffing ${Target.CleanName} 
:debuff
/varcalc retrycount ${retrycount}+1
/call Itemcaster "${tempstaff}"
/if (${Macro.Return.Equal[CAST_RESISTED]} && ${retrycount}<${retry}) /goto :debuff 
:done 
/call Eventhandler
/return

Sub Nuke
/varset nukecount 3
/if (${Target.Named} && ${Target.Level}>=75 && ${Target.PctHPs}>20) {
	/varset nukepause 30
}
:nukeloop 
/call Loopchecks
/if (!${doconcuss}) /varset nukecount 0
/if (${Target.ID} && ${Target.PctHPs}<35 && ${Target.Level}>65 && ${Me.AltAbilityReady[Translocational Anchor]} && (${Target.Class.Name.Find[Wizard]}||${Target.Class.Name.Find[Necromancer]}||${Target.Class.Name.Find[Cleric]}||${Target.Class.Name.Find[Mage]}||${Target.Class.Name.Find[Shaman]}||${Target.Class.Name.Find[Druid]}||${Target.Class.Name.Find[Enchanter]})) /call cast "Translocational Anchor" alt 1s
/if (${Me.SpellReady[${myconcspell}]} && ${doconcuss} && ((!${Me.Song[Gift of Mana].ID} && !${Me.Song[Gift of Radiant Mana].ID})||${nukecount}>=6)) {
|	/echo Nukecount on start of Concloop is ${nukecount}
	/if (${Target.PctHPs}<20 && ${Target.Speed}>5 && !${Mobsnared}) {
		/varset nukecount 0
		/goto :skipconc
	}
	/if ((${Me.Song[Silent Casting].ID}>0 && ${nukecount}<6) || ${Target.PctHPs}<10 || (${Target.Level}<${Me.Level}*0.92 && !${Target.Named} && !${Summoner})) {
		/if (${nukepause}>${Spell[${myconcspell}].MyCastTime} && !${Me.Song[Silent Casting].ID} && ${Target.Level}>${Me.Level}*0.85) {
			/goto :highnukepauseconc
		}
		/varset nukecount 3
		/goto :skipconc
	}
	:highnukepauseconc
	/call cast "${myconcspell}" 3s
	/call Eventhandler
	/if (${Macro.Return.Equal[CAST_RESISTED]}) {
		/varcalc nukecount ${nukecount}-1
		/delay 15
	} else /varcalc nukecount ${nukecount}-4
	/if (${nukecount}<0) /varset nukecount 0
	:skipconc
|	/echo Nukecount after Concloop is ${nukecount}
}
/if ((${Me.AltAbilityReady[246]} || ${Me.AltAbilityReady[208]})&&${Target.PctHPs}>70 && ${Target.Level}>=70 && !${Me.SpellReady[${Mnuke1}]} && !${Me.Song[Gift of Mana].ID} && !${Me.Song[Gift of Radiant Mana].ID}) { 
	/if (${Target.ID} && ${Me.AltAbilityReady[246]}) {
		/call cast 246 alt 1s
	} else {
		/if (${Target.ID} && ${Me.AltAbilityReady[208]}) /call cast 208 alt 1s
	}
} 
/if (${doleash} && (${Spawn[${leashholder}].ID} && ${Spawn[${leashholder}].Distance}>${leashlength})) /call Leash
/if (${Target.Named} && ${Target.Level}>=75 && ${Target.PctHPs}>85 && !${Me.SpellReady[${Mnuke1}]} && ${Me.AltAbilityReady[Silent Casting]}) {
	/if (${Target.ID}) /call cast "Silent Casting" alt 2s
	/if (${Macro.Return.Equal[CAST_SUCCESS]} || ${Me.Song[Silent Casting].ID}) /varset SilCastOntimer 60s
}
/if (${Target.Named} && ${Target.Level}>=75 && (${Target.PctHPs}<85 && ${Target.PctHPs}>20) && !${Me.SpellReady[${Mnuke1}]} && !${Me.AltAbilityReady[Silent Casting]} && ${Me.AltAbilityReady[Arcane Whisper]}) {
	/if (${Target.ID}) /call cast "Arcane Whisper" alt 2s
}
/if (${Target.ID} && ${Target.Level}>=65 && ${FindItem[${Epic2or15}].InvSlot} && ${FindItem[${Epic2or15}].Timer}<1 && !${Me.Casting.ID}) /call ItemCaster "${Epic2or15}"
/if (${Target.ID} && ${FindItem[${GoMRobe}].InvSlot} && ${FindItem[${GoMRobe}].Timer}<1 && !${Me.Casting.ID}) /call ItemCaster "${GoMRobe}"
/if (${nukepausetimer}>0 && !${Me.Song[Gift of Mana].ID} && !${Me.Song[Gift of Radiant Mana].ID}) {
	/goto :pauseskip
}
/if ((${nukecount}<4 || ${Target.Level}<${Me.Level}*0.92 || ${Me.Song[Gift of Mana].ID} || ${Me.Song[Gift of Radiant Mana].ID} || ${Target.PctHPs}<6) && ${nukecount}<6) {
	/if (${Me.Song[Gift of Mana].ID} && ${Target.ID}) {
		/if (!${Me.Casting.ID} && ${Me.SpellReady[${GoMnuke}]}) {
|			/echo Casting ${GoMnuke}
			/varcalc nukecount ${nukecount}+2
			/call cast "${GoMnuke}" 2s
			/call Eventhandler
		}
		/goto :Doneanuke
	}
	/if (${Me.Song[Gift of Radiant Mana].ID} && ${Target.ID}) {
		/if (!${Me.Casting.ID} && ${Me.SpellReady[${GoRMnuke}]}) {
|			/echo Casting ${GoRMnuke}
			/varcalc nukecount ${nukecount}+2
			/call cast "${GoRMnuke}" 2s
			/call Eventhandler
		}
		/goto :Doneanuke
	}
	/if ((${nukecount}<4 || ${Target.Level}<${Me.Level}*0.92 || ${Target.PctHPs}<6) && ${Me.PctMana}>25) {
		/if (${Me.SpellReady[${Mnuke1}]} && ${Target.ID}) {
			/call cast "${Mnuke1}" 2s
			/if ((${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[X]}) && !${Me.Casting.ID}) {
				/varcalc nukecount ${nukecount}+1
			}
			/call Eventhandler
			/goto :Doneanuke
		} else {
			/if (${FindItem[${DmgClicky1}].InvSlot} && ${FindItem[${DmgClicky1}].Timer}<1 && ${Target.ID} && ${Target.PctHPs}<40) {
				/call ItemCaster "${DmgClicky1}"
				/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
					/varcalc nukecount ${nukecount}+1
				}
				/call Eventhandler
				/goto :Doneanuke
			} else {
				/if (${FindItem[${DmgClicky2}].InvSlot} && ${FindItem[${DmgClicky2}].Timer}<1 && ${Target.ID} && ${Target.PctHPs}<35) {
					/call ItemCaster "${DmgClicky2}"
					/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
						/varcalc nukecount ${nukecount}+1
					}
					/call Eventhandler
					/goto :Doneanuke
				} else {
					/if (${FindItem[${DmgClicky3}].InvSlot} && ${FindItem[${DmgClicky3}].Timer}<1 && ${Target.ID} && ${Target.PctHPs}<30) {
						/call ItemCaster "${DmgClicky3}"
						/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
							/varcalc nukecount ${nukecount}+1
						}
						/call Eventhandler
						/goto :Doneanuke
					} else {
						/if (${Me.SpellReady[${Mnuke2}]} && ${Target.ID}) {
							/call cast "${Mnuke2}" 2s
							/if ((${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[X]}) && !${Me.Casting.ID}) {
								/varcalc nukecount ${nukecount}+1
							}
							/call Eventhandler
							/goto :Doneanuke
						}
					}
				}
			}
		}
	} else {
		/if ((${nukecount}<4 || ${Target.Level}<${Me.Level}*0.92 || ${Target.PctHPs}<6) && ${Me.PctMana}<=25) {
			/if (${Me.SpellReady[${LoMnuke}]} && ${Target.ID}) {
				/call cast "${LoMnuke}" 2s
				/varcalc nukecount ${nukecount}-1
				/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
					/varcalc nukecount ${nukecount}+1
				}
				/call Eventhandler
				/goto :Doneanuke
			} else {
				/if (${FindItem[${DmgClicky1}].InvSlot} && ${FindItem[${DmgClicky1}].Timer}<1 && ${Target.ID} && ${Target.PctHPs}<40) {
					/call ItemCaster "${DmgClicky1}"
					/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
						/varcalc nukecount ${nukecount}+1
					}
					/call Eventhandler
					/goto :Doneanuke
				} else {
					/if (${FindItem[${DmgClicky2}].InvSlot} && ${FindItem[${DmgClicky2}].Timer}<1 && ${Target.ID} && ${Target.PctHPs}<35) {
						/call ItemCaster "${DmgClicky2}"
						/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
							/varcalc nukecount ${nukecount}+1
						}
						/call Eventhandler
						/goto :Doneanuke
					} else {
						/if (${FindItem[${DmgClicky3}].InvSlot} && ${FindItem[${DmgClicky3}].Timer}<1 && ${Target.ID} && ${Target.PctHPs}<30) {
							/call ItemCaster "${DmgClicky3}"
							/if (${Macro.Return.Equal[CAST_SUCCESS]} && !${Me.Casting.ID}) {
								/varcalc nukecount ${nukecount}+1
							}
							/call Eventhandler
							/goto :Doneanuke
						}
					}
				}
			}
		}
	}
} else {
	/if (${aggrotimer}<1) {
		/varset aggrotimer 20
		/varcalc nukecount ${nukecount}-1
	}
|	/echo Not nukeing, due to aggromanagment nukecount is ${nukecount}
}
:Doneanuke
|/call Eventhandler
:pauseskip
|/echo ${dosnare} && ${Target.CurrentHPs}<=${snareperc} && ${Target.CurrentHPs}>${snareperc}*0.5 && (!${snaretimer} || !${Mobsnared})
/if (${dosnare} && ${Target.CurrentHPs}<=${snareperc} && ${Target.CurrentHPs}>${snareperc}/3 && (!${snaretimer} || !${Mobsnared}) && !${Me.Song[Gift of Mana].ID} && !${Me.Song[Gift of Radiant Mana].ID}) /call Snare 
/if (${Me.PctMana}<=35) { 
	/if (${Me.AltAbilityReady["Harvest of Druzzil"]} || ${Me.SpellReady[${Harvest}]}) /call Harvestcheck 
} 
/call TargetCheck 
/if (${engagedmob}==0) /return 
/goto :nukeloop 
/return

Sub Snare
/if (${Me.SpellReady[${snarespell}]}) {
	/varset Mobsnared FALSE
	:snare 
	/varcalc retrycount ${retrycount}+1
	/call cast "${snarespell}" 
	/varcalc nukecount ${nukecount}+1
	/doevents Snaresuccess
	/call Eventhandler
	/if (!${Mobsnared} && ${Target.ID} && ${retrycount}<${retry}) /goto :snare 
}
/return

Sub Eventhandler
:waitcastdone
/if (${Me.Casting.ID}) {
	/delay 1
	/goto :waitcastdone
}
/delay 5
/doevents AmSummoned
/doevents ImHit
/doevents ImDead
/doevents OoM
/doevents Zoning
/doevents Critblast
/if (${nukepause}>0 && !${Me.Song[Silent Casting].ID} && ${Target.PctHPs}>15) /varset nukepausetimer ${nukepause}
/varset aggrotimer 20
|/echo ${nukecount}
/return

Sub Medcheck
/return

Sub Harvestcheck
/if (${Target.PctHPs}>=0 && ${Target.PctHPs}<75 && ${Target.ID}) /return
/if (!${Me.Moving} && ${Me.SpellReady[${Harvest}]} && !${Me.Casting.ID} && ${Me.PctMana}<50) { 
	/if (${Spell[${Harvest}].Name.Find[Patient]} && ${Me.PctMana}<50) {
		/call Cast "${Harvest}" 7s 
		/gsay LoM, Harvesting. No nukes for awhile.
		/delay 22s ${Me.PctHPs}<40 || ${Me.PctMana}>57
	} else {
		/if (!${Me.Spell[${Harvest}].Name.Find[Patient]}) /call Cast "${Harvest}" 7s
	}
	/delay 2 
	:wait1 
	/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait1 
	/if (${Me.Stunned}) { 
		/delay 10s !${Me.Stunned} 
	} 
} 
/if (!${Me.Moving} && ${Me.AltAbilityReady[172]} && !${Me.Casting.ID} && ${Me.PctMana}<80) { 
	/call Cast 172 alt 7s 
	/delay 8 
	:wait2 
	/if (${Me.Casting.ID} || ${Me.Moving}) /goto :wait2 
} 
/return

Sub TargetCheck
/if ((!${Target.ID})||(${Target.ID}!=${mobid})||(${Target.Distance}>${engagedistance})||(${Target.Type.Equal[Corpse]})||(${Target.PctHPs}>99)||(${Spawn[${Target.ID}].Master.Type.Equal[pc]})) { 
/if (${engagedmob} && ${nukepause}>15 && ${lastmoblvl}>${Me.Level}*0.92 && !${Summoner}) {
	/varcalc nukepause ${nukepause}-2
	/ini "${AFNiniFile}" NOTOUCHvars nukepause ${nukepause}
|	/echo Nukepause changed! ${nukepause}
}
/varset lastmoblvl 0
/varset engagedmob 0 
/varset mobid NULL
/varset conccount 0 
/varset nukecount 0 
/varset snaretimer 0 
/varset Mobsnared FALSE
/varset Summoner FALSE
/varset nukepausetimer 0 
/varset nukepause ${Ini[${AFNiniFile},NOTOUCHvars,nukepause,0]}
} 
/return

Sub GetTarget
/if (${SpawnCount[NPC radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}]}>0) {
	/if (${Spawn[${tankname}].ID}) {
		/if ((!${Me.Casting.ID})&&(!${Me.Moving})&&(${Spawn[${tankname}].ID})&&(${Spawn[pc ${tankname}].Distance}<200)&&(${engagedmob}==0)&&(!${asstimer})) { 
			/assist ${tankname} 
			/varset asstimer 1s 
			/delay 8
			/if (${Target.ID} && ${Spawn[NPC ID ${Target.ID} radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}].ID}) /varset mobid ${Target.ID} 
		}
	} else {
		/if (!${Spawn[${tankname}].ID}) {
			/target id ${NearestSpawn[NPC radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}].ID}
			/delay 8 ${Target.ID}
			/delay 2
			/if (${Target.ID} && ${Spawn[NPC ${Target.Name} radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}].ID}) /varset mobid ${Target.ID} 
		}
	}
}
|/echo ${Target.ID}==${mobid} && ${Target.PctHPs}<100 && ${Target.Distance}<=${engagedistance} && ${Target.LineOfSight} && ${Spawn[${mobid}].Type.NotEqual[pc]} && !${Spawn[id ${mobid}].Master.Type.Equal[pc]}
/if (${Target.ID}==${mobid} && ${Target.PctHPs}<100 && ${Target.Distance}<=${engagedistance} && ${Target.LineOfSight} && ${Spawn[${mobid}].Type.NotEqual[pc]} && !${Spawn[id ${mobid}].Master.Type.Equal[pc]}) { 
	/varset engagedmob 1 
	/varset lastmoblvl ${Target.Level}
	/varset Targetchangetimer 150
	/return 
} else { 
	/call TargetCheck 
	/return 
} 
/return

Sub MACheck
/if (!${Spawn[PC ${tankname}].ID} && (${Spawn[PC ${mainassist1}].ID}||${Spawn[PC ${mainassist2}].ID}||${Spawn[PC ${mainassist3}].ID})) { 
/call Event_cycleassist
}
/if (!${Spawn[${mainassist3}].ID} && !${Spawn[${mainassist1}].ID} && !${Spawn[${mainassist2}].ID}) {
	/echo Placeholder for no MA.
}
/return

Sub Targetlists
/if (${ALrefreshtimer}<10) {
	/varset ALrefreshtimer 1000
	/squelch /alert clear ${Voidalertlist}
}
/if (${SpawnCount[Pet radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}]}>0) {
	/declare mc int local
	/for mc 1 to ${SpawnCount[Pet radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}]}
		/if (${Spawn[${mc},Pet radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}].Master.Type.Equal[PC]}) /alert add ${Voidalertlist} ${Spawn[${mc},Pet radius ${Spell[${Mnuke1}].MyRange} noalert ${Voidalertlist}].CleanName}
	/next mc
}
/return

Sub Buffcheck
|## Spells
/if (${SpawnCount[NPC radius 100 zradius50 alert ${Validtofightalertlist}]}<1) {
	/declare i int local 1 
	/for i 1 to ${SpellBuff.Size} 
	/if (${Spell[${SpellBuff[${i}]}].Mana}>${Me.CurrentMana}) /goto :skipbuff
	/if (${Me.Book[${SpellBuff[${i}]}]}==0) {
		/if (!${SpellBuff[${i}].Find[None]}) /echo ${SpellBuff[${i}]} is not in your book, check ini.
		/goto :skipbuff
	}
	/if (!${Me.Buff[${SpellBuff[${i}]}].ID} && ${Spell[${SpellBuff[${i}]}].Stacks}) { 
		/if (${OutDoors} && !${Me.Mount.ID}) {
			/call Itemcaster "${Mount}"
			/delay 10s !${Me.Casting.ID}
			/delay 5
		}
		/if (${Me.Gem[${SpellBuff[${i}]}]}!=9 && ${Me.Buff[${Me.Gem[9]}].ID}) {
			/memspell 9 "${SpellBuff[${i}]}"
			/delay 12s ${Me.Gem[${SpellBuff[${i}]}]}
			/return
		}
		/if (!${Spell[${SpellBuff[${i}]}].TargetType.Find[Self]}) {
			/keypress TAB
			/delay 3 
			/target myself
		}
		/if (${Me.SpellReady[${SpellBuff[${i}]}]}) {
			/echo *** Hang on ! Rebuffing ${SpellBuff[${i}]}
			/call cast "${SpellBuff[${i}]}" gem9 8s
		}
		/if (!${Spell[${SpellBuff[${i}]}].TargetType.Find[Self]}) {
			/keypress TAB
			/delay 3s ${Target.Type.Equal[NPC]}
		}
		/delay 3
		/if (${Target.Type.Equal[PC]}) {
			/squelch /target clear
		}
	}
	:skipbuff
	/if (${Window[SpellBookWnd].Open}) /cleanup
	/next i 
}  
|## Items
/if (${SpawnCount[NPC radius 100 zradius50 alert ${Validtofightalertlist}]}<1) {
	/for i 1 to ${ItemBuff.Size} 
		/if (${ItemBuff[${i}].NotEqual[None]}) /if (!${Me.Buff[${FindItem[${ItemBuff[${i}]}].Spell}].ID} && ${Spell[${FindItem[${ItemBuff[${i}]}].Spell}].Stacks}) {
			/call ItemCaster "${ItemBuff[${i}]}"
			/delay 2
		}
	/next i 
}  
/return

Sub Loopchecks
/if (${GameState.Equal[CHARSELECT]}) {
	/echo Reached Charselect! Bye.
	/endmacro
}
/if (${Cursor.ID}) {
	/echo Delaying 2s for manual trades or itemchanges.
	/delay 2s !${Cursor.ID}
	/if (${Cursor.ID}) /autoinv
	/delay 5
}
/if (${Window[RespawnWnd].Open} || ${SpawnCount[PC ${Me.Name}]}<1) {
	/call Event_ImDead
	/squelch /target clear
	/delay 10 !${Target.ID}
	/call TargetCheck
	/doevents flush ImDead
}
:Hold_for_Invis
/if (${Me.Invis}) {
	/delay 3
	/goto :Hold_for_Invis
}
/if (${Me.Pet.ID} && ${Me.Pet.Name.Find[familiar]}) /pet get lost 
/return

Sub MemSpells
/echo Memming spells. Hang on. 
/if (${OutDoors} && !${Me.Mount.ID} && ${FindItem[${Mount}].InvSlot}) {
	/call Itemcaster "${Mount}"
	/delay 10s !${Me.Casting.ID}
	/delay 5
}
   /if ( ${Me.Gem[${Mnuke1}]}!=1) { 
	/if (!${Me.Book[${Mnuke1}]}) /echo Warning spell ${Mnuke1} not avail. Complete your setup in the ini file.
	/echo Memming Spell ${Mnuke1}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 1 "${Mnuke1}"
	/delay 5
	/delay 15s ${Me.Gem[1].Name.Find[${Mnuke1}]}
   } 
   /if ( ${Me.Gem[${Harvest}]}!=2) { 
	/if (!${Me.Book[${Harvest}]}) /echo Warning spell ${Harvest} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${Harvest}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 2 "${Harvest}"
	/delay 5
	/delay 15s ${Me.Gem[2].Name.Find[${Harvest}]}
   } 
   /if ( ${Me.Gem[${Mnuke2}]}!=3) { 
	/if (!${Me.Book[${Mnuke2}]}) /echo Warning spell ${Mnuke2} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${Mnuke2}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 3 "${Mnuke2}"
	/delay 5
	/delay 15s ${Me.Gem[3].Name.Find[${Mnuke2}]}
   } 
   /if ( ${Me.Gem[${LoMnuke}]}!=4) { 
	/if (!${Me.Book[${LoMnuke}]}) /echo Warning spell ${LoMnuke} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${LoMnuke}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 4 "${LoMnuke}"
	/delay 5
	/delay 15s ${Me.Gem[4].Name.Find[${LoMnuke}]}
   } 
   /if ( ${Me.Gem[${GoMnuke}]}!=5) { 
	/if (!${Me.Book[${GoMnuke}]}) /echo Warning spell ${GoMnuke} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${GoMnuke}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 5 "${GoMnuke}"
	/delay 5
	/delay 15s ${Me.Gem[5].Name.Find[${GoMnuke}]}
   } 
   /if ( ${Me.Gem[${GoRMnuke}]}!=6) { 
	/if (!${Me.Book[${GoRMnuke}]}) /echo Warning spell ${GoRMnuke} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${GoRMnuke}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 6 "${GoRMnuke}"
	/delay 5
	/delay 15s ${Me.Gem[6].Name.Find[${GoRMnuke}]}
   } 
   /if ( ${Me.Gem[${myconcspell}]}!=7) { 
	/if (!${Me.Book[${myconcspell}]}) /echo Warning spell ${myconcspell} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${myconcspell}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 7 "${myconcspell}"
	/delay 5
	/delay 15s ${Me.Gem[7].Name.Find[${myconcspell}]}
   } 
   /if ( ${Me.Gem[${snarespell}]}!=8) { 
	/if (!${Me.Book[${snarespell}]}) /echo Warning spell ${snarespell} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${snarespell}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 8 "${snarespell}"
	/delay 5
	/delay 15s ${Me.Gem[8].Name.Find[${snarespell}]}
   } 
   /if ( ${Me.Gem[${buffspell}]}!=9) { 
	/if (!${Me.Book[${buffspell}]}) /echo Warning spell ${buffspell} not avail. Complete your setup in the ini file. Check for Rk. 's
	/echo Memming Spell ${buffspell}
	/if (${Bool[${Me.Standing}]} && !${Me.Mount.ID}) /sit
	/memspell 9 "${buffspell}"
	/delay 5
	/delay 15s ${Me.Gem[9].Name.Find[${buffspell}]}
   } 
/echo Spells are memmed. 
/if (${Window[SpellBookWnd].Open}) /cleanup
/if (${Bool[${Me.Sitting}]}) /stand
/return

Sub CheckOutDoors
/if (!${FindItem[${Mount}].InvSlot}) /return
/if (!${Me.Mount.ID}) {
	/call Itemcaster "${Mount}"
	/delay 10s !${Me.Casting.ID}
	/delay 5
	/doevents OutDoor
}
/if (${Me.Mount.ID}) {
	/varset OutDoors TRUE
}
/return

Sub CheckLevi
/return

Sub SetTank
/varset AFNiniFile CrysNuke_${Me.Name}.ini 
/if (${Defined[Param2]}) { 
	/ini "${AFNiniFile}" General tankname ${Param0} 
	/ini "${AFNiniFile}" General mainassist1 ${Param0} 
	/varset mainassist1 ${Param0} 
	/varset tankname ${Param0} 
	/ini "${AFNiniFile}" General mainassist2 ${Param1} 
	/varset mainassist2 ${Param1} 
	/ini "${AFNiniFile}" General mainassist3 ${Param2} 
	/varset mainassist3 ${Param2} 
} else {
	/if (${Defined[Param1]}) { 
		/ini "${AFNiniFile}" General tankname ${Param0} 
		/ini "${AFNiniFile}" General mainassist1 ${Param0} 
		/varset mainassist1 ${Param0} 
		/varset tankname ${Param0} 
		/ini "${AFNiniFile}" General mainassist2 ${Param1} 
		/varset mainassist2 ${Param1} 
	} else {
		/if (${Defined[Param0]}) { 
			/ini "${AFNiniFile}" General tankname ${Param0} 
			/ini "${AFNiniFile}" General mainassist1 ${Param0} 
			/varset mainassist1 ${Param0} 
			/varset tankname ${Param0} 
		} else {
			/if (!${Defined[Param0]}) { 
				/varset AFNTempStr ${Ini[${AFNiniFile},General,tankname,Nobody]} 
				/varset tankname ${AFNTempStr} 
				/if (${AFNTempStr.Equal[Nobody]} || ${AFNTempStr.Equal[NULL]}) { 
					/echo You need to start the macro with /mac afnuke tankname and setup your .INI file. 
					/endmacro 
				} 
			} 
		}
	}
}
/if (${Spawn[${tankname}].ID}) { 
	/Echo Your Main Assist is ${tankname} 
	/echo Your SA is ${mainassist2} and TA is ${mainassist3} 
} else /if (!${Spawn[${tankname}].ID}) { 
	/Echo Your Main Assist is ${tankname}, but is not in the zone currently. 
	/echo Your SA is ${mainassist2} and TA is ${mainassist3} 
}
/return

Sub Event_ImHit
/if (${Me.PctHPs}<100 && ${Me.AltAbilityReady[Mind Crash]} && ${Target.ID} && ${Target.PctHPs}>10) {
	/call cast "Mind Crash" alt 2s
	/varcalc nukepause ${nukepause}+1
	/ini "${AFNiniFile}" NOTOUCHvars nukepause ${nukepause}
|	/echo Nukepause changed! ${nukepause}
	/varset nukecount 7
} else {
	/doevents ImHit
}
/doevents ImDead
/return 

Sub Event_AmSummoned
/varcalc nukepause ${nukepause}+3
/ini "${AFNiniFile}" NOTOUCHvars nukepause ${nukepause}
/if ((${Target.Named} && ${Target.Level}>=70) || ${Target.Level}>=${Me.Level}*0.935) {
	/if (${Me.AltAbilityReady[Mind Crash]} && ${Target.ID}) {
		/if (${Target.ID} && ((!${Target.Named} && ${Target.PctHPs}>25)||${Target.Named})) {
			/call cast "Mind Crash" alt 3s
			/echo Casted Mind Crash.
		}
		/varset nukecount 6
		/varcalc nukepause ${nukepause}+3
		/if (${doleash} && ${Spawn[${leashholder}].ID}) /call Leash
	} else {
|		/echo ${Target.ID} && ${Target.PctHPs}>10 && ((!${Target.Named} && ${Me.PctHPs}<100)||${Target.Named})
		/if (${Target.ID} && ${Target.PctHPs}>10 && ((!${Target.Named} && ${Me.PctHPs}<100)||${Target.Named})) {
			/varcalc nukepause ${nukepause}+3
			/ini "${AFNiniFile}" NOTOUCHvars nukepause ${nukepause}
			/varset nukecount 7
			/if (${doleash} && ${Spawn[${leashholder}].ID}) /call Leash
		}
	}
}
|/echo Nukepause changed! ${nukepause}
/varset Summoner TRUE
/doevents flush AmSummoned
/delay 3
/doevents ImHit
/delay 3
/doevents ImHit
/delay 3
/doevents ImHit
/return 

Sub Event_OutDoor
/varset OutDoors FALSE
/varset UseMount FALSE
/return

Sub Event_Critblast
/varcalc nukecount ${nukecount}+1
/return
Sub Leash 
/if (${Spawn[${leashholder} PC].Type.Equal[Corpse]}) /return
/declare X float local
/declare Y float local
/if (${doleash}) { 
	/if (${leashholder.Equal[Nobody]}||${leashholder.Equal[NULL]}||${leashholder.Equal[None]}) { 
		/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${leashlength}) { 
			:FollowingLoop1 
			/call Loopchecks
			/varset X ${Me.X} 
			/varset Y ${Me.Y} 
			/squelch /face fast nolook loc ${stakeY},${stakeX} 
			/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>30) { 
				/keypress forward hold 
				/delay 2 
				/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) /call Obstacle 
			} 
			/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<=30) /keypress back 
			/if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>30) { 
				/goto :FollowingLoop1 
			} else { 
				/keypress forward 
				/keypress back 
				/squelch /face fast nolook loc ${stakeY},${stakeX} 
				/goto :end 
			} 
		} 
	} 
	/if (!${leashholder.Equal[Nobody]}&&!${leashholder.Equal[NULL]}&&!${leashholder.Equal[None]}) { 
		/if ((${Spawn[${leashholder} PC].ID})&&(${Spawn[${leashholder} PC].Distance}>${leashlength})) { 
			:FollowingLoop2 
			/call Loopchecks
			/varset X ${Me.X} 
			/varset Y ${Me.Y} 
			/squelch /face fast nolook id ${Spawn[${leashholder} PC].ID} 
			/if (${Spawn[${leashholder} PC].Distance}>30) { 
				/keypress forward hold 
				/delay 2 
				/if ((${Me.X}==${X}) && (${Me.Y}==${Y})) /call Obstacle 
			} 
			/if (${Spawn[${leashholder} PC].Distance}<=30) /keypress back 
			/if (${Spawn[${leashholder} PC].Distance}>30) { 
				/goto :FollowingLoop2 
			} else { 
				/keypress forward 
				/keypress back 
				/squelch /face fast nolook id ${Spawn[${leashholder} PC].ID} 
				/goto :end 
			} 
			/if (!${Spawn[${leashholder} PC].ID}) { 
				/echo - Leashholder DEAD or ZONED! Leash is BROKEN! 
				/varset doleash FALSE
				/varset leashholder Nobody 
				/ini "${AFNiniFile}" "General" "doleash" "${doleash}" 
				/ini "${AFNiniFile}" "General" "leashholder" "${leashholder}" 
			}
		}
	}
}
:end 
/return 

Sub Obstacle 
/echo Obstacle detected, moving around it 
/keypress forward 
/keypress back hold 
/delay 3 
/keypress back 
/if (${Math.Rand[100]}+1>50) { 
/keypress strafe_right hold 
} else { 
/keypress strafe_left hold 
} 
/delay 5 
/keypress strafe_right 
/keypress strafe_left 
/keypress forward hold 
/return 

Sub Event_Snaresuccess(line, MobtoSnare)
/if (${Target.ID}==${NearestSpawn[NPC ${MobtoSnare}].ID} || ${Bool[${Target.CleanName}==${[${MobtoSnare}].CleanName}]}) {
	/if (${Target.ID}) /tell ${mainassist1} ${Target.CleanName} is snared.
	/varset Mobsnared TRUE
	/varset snaretimer 600 
	/varset retrycount 0 
	/doevents flush Snaresuccess
} else /doevents Snaresuccess
/return

Sub Event_ImDead 
/echo Bummer ! 
/consent group 
/if (${Window[RespawnWnd].Open}) {
	:tryrez
	/if (${Window[ConfirmationDialogBox].Open}) {
		/delay 6
		/notify ConfirmationDialogBox Yes_Button  leftmouseup 
		/delay 20 !${Window[ConfirmationDialogBox].Open}
		/delay 5
		/if (!${Window[ConfirmationDialogBox].Open} && ${Window[RespawnWnd].Open}) {
			/notify RespawnWnd RW_OptionsList listselect 2
			/delay 8
			/notify RespawnWnd RW_SelectButton leftmouseup
			/delay 1s !${Window[RespawnWnd].Open}
			/delay 5
			/goto :rdytoloot
		}
	}
	/if (${Window[RespawnWnd].Open}) {
		/delay 10
		/goto :tryrez
	}
}
:Zone_Loop 
/if (!${Window[RespawnWnd].Open}) {
	/if (${Window[ConfirmationDialogBox].Open}) {
		/delay 6
		/notify ConfirmationDialogBox Yes_Button  leftmouseup 
		/delay 6
	}
/if (${Me.Type.Equal[DEAD]} || ${SpawnCount[PC ${Me.Name}]}<1) { 
	/delay 2s 
	/goto :Zone_Loop
}
/delay 1s 
/delay 5 
:rdytoloot
/call Wait4Rez
/delay 20 
/echo Ah that feels better, lets continue.
/call Event_FireFight
/return 

Sub Wait4Rez 
/if (${Window[RespawnWnd].Open} || ${SpawnCount[PC ${Me.Name}]}<1) {
	:waitforzoned
	/if (${Window[RespawnWnd].Open}) /notify RespawnWnd RW_SelectButton leftmouseup
	/delay 3s ${SpawnCount[PC ${Me.Name}]}>1
	/if (${SpawnCount[PC ${Me.Name}]}<1) /goto :waitforzoned
}
:waitforrez 
/if (!${Window[ConfirmationDialogBox].Open} && !${Window[RespawnWnd].Open} && ((${SpawnCount[${Me}'s corpse]}>0 && ${NearestSpawn[${Me}'s corpse].Distance}>100) || ${SpawnCount[${Me}'s corpse]}<1)) { 
	/delay 5s ${Window[ConfirmationDialogBox].Open} 
	/goto :waitforrez 
} 
/if (${Window[ConfirmationDialogBox].Open}) {
	/delay 8
	/notify ConfirmationDialogBox Yes_Button  leftmouseup 
}
:zonein 
/delay 5 
/squelch /target mycorpse 
/delay 5 
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein 
/if (${Target.CleanName.Equal[${Me}'s corpse]}) { 
	/delay 3s 
	/call Loot_Corpse 
} else /goto :zonein 
/return 

| #################  Looting Corpse 

Sub Loot_Corpse 
/declare LootTotal int local 0 
/declare LootSlot int local 
/squelch /target mycorpse 
/if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) { 
	/echo ** Can't target my corpse. 
	/return 
}    
/if (${Target.Type.Equal[CORPSE]} && ${Target.ID} && ${Target.Distance}>10 && ${Target.Distance}<100) {
	/corpsedrag 
	/delay 5
	/corpsedrop
}
/delay 1s 
/loot 
/delay 1s 
/if (${Me.State.NotEqual[BIND]}) { 
	/echo ** Massive lag right now... Aborting looting. 
	/return 
} 
:LootLag 
/if (${LootTotal}!=${Corpse.Items}) { 
	/varset LootTotal ${Corpse.Items} 
	/delay 5 
	/goto :LootLag 
} 
/for LootSlot 1 to ${LootTotal} 
	:LootItem 
	/itemnotify loot${LootSlot} rightmouseup 
	/delay 3 
	/if (${Corpse.Item[${LootSlot}].ID}) { 
		/delay 2 
		/goto :LootItem 
	} 
/next LootSlot 
/delay 5 
/echo ** Done looting my corpse. 
/notify LootWnd DoneButton leftmouseup 
/return
 
btw this is the defult ini file that goes with it.. i would like to put the pet buff and such in it ...

Rich (BB code):
[General]
tankname=REMOVED BY CCOMP
mainassist1=REMOVED BY CCOMP
mainassist2=Nobody
mainassist3=Nobody
leashholder=Nobody
leashlength=50
followdistance=40
engagedistance=200
snareperc=60
[Tasks]
doleash=FALSE
dosnare=TRUE
doconcuss=TRUE
[Spells]
Harvest=Patient Harvest
myconcspell=Concussive Blast
snarespell=Atol's Spectral Shackles
buffspell=Scales of the Crystalwing
DmgRune=Scales of the Crystalwing
SSRune=Crystalwing Ward
Dmgshield=O`Keil's Levity
Levi=Levitation
[FireSet]
Mnuke1=Flashfires
Mnuke2=Cloudburst Strike
LoMnuke=Chaos Flame
GoMnuke=Ether Flame
GoRMnuke=Ethereal Conflagration
[IceSet]
Mnuke1=Cold Snap
Mnuke2=Cloudburst Strike
LoMnuke=Claw of Selay
GoMnuke=Gelidin Comet
GoRMnuke=Icefall Avalanche
[MagicSet]
Mnuke1=Cloudburst Strike
Mnuke2=Wildmagic Strike
LoMnuke=Leap of Sparks
GoMnuke=Thundaka
GoRMnuke=Ball Lightning
[Items]
tempstaff=Staff of Elemental Flux
DmgClicky1=None
DmgClicky2=None
DmgClicky3=None
ConcClicky=None
Epic2or15=Staff of Phenomenal Power
Mount=None
GoMRobe=None
[Buffs]
SpellBuff[1]=None
SpellBuff[2]=None
SpellBuff[3]=None
SpellBuff[4]=None
SpellBuff[5]=None
[ItemBuffs]
ItemBuff[1]=None
ItemBuff[2]=None
ItemBuff[3]=None
ItemBuff[4]=None
ItemBuff[5]=None
[Healpots]
InstantHealpot=None
[NOTOUCHvars]
nukepause=NULL
 
Last edited by a moderator:
this is another part of it...

Rich (BB code):
Sub AFNvarsdecl
/echo Declareing some variables first.

|-------Variables NEEDED in the inifile
|--General
	/declare mainassist1		string outer
	/declare mainassist2		string outer
	/declare mainassist3		string outer
	/declare leashholder		string outer Nobody
	/declare leashlength		int outer
	/declare followdistance		int outer
	/declare engagedistance		int outer
	/declare snareperc		int outer
|--Channel
|--Tasks
	/declare doleash		bool outer
	/declare dosnare		bool outer
	/declare doconcuss		bool outer
|--Spells
	/declare Harvest		string outer
	/declare myconcspell		string outer
	/declare snarespell		string outer
	/declare buffspell		string outer
	/declare DmgRune		string outer
	/declare SSRune			string outer
	/declare Dmgshield		string outer
	/declare Levi			string outer
|--FireSet
	/declare Mnuke1			string outer
	/declare Mnuke2			string outer
	/declare LoMnuke		string outer
	/declare GoMnuke		string outer
	/declare GoRMnuke		string outer
|--IceSet
|--Will only be setup in the ini file.
|--MagicSet
|--Will only be setup in the ini file.
|--Items
	/declare tempstaff		string outer
	/declare DmgClicky1		string outer
	/declare DmgClicky2		string outer
	/declare DmgClicky3		string outer
	/declare ConcClicky		string outer
	/declare Epic2or15		string outer
	/declare Mount			string outer
	/declare GoMRobe		string outer
|--Buffs
	/declare SpellBuff[5]		string outer
|--ItemBuffs
	/declare ItemBuff[5]		string outer
|--Healpots
	/declare InstantHealpot		string outer
|--NOTOUCHvars
	/declare nukepause		int outer NULL
|-------Variables NOT needed in the inifile, but needed to be reset for each run.
	/declare lastmoblvl		int outer
	/declare engagedmob		int outer
	/declare mobid			int outer
	/declare conccount		int outer
	/declare nukecount		int outer
	/declare snaretimer		timer outer
	/declare Mobsnared		bool outer FALSE
	/declare Summoner		bool outer
	/declare nukepausetimer		timer outer 0
|-------Variables NOT needed in the inifile and NOT needed to be reset.
	/declare AnchorY		float outer
	/declare AnchorX		float outer
	/declare stakeX			int outer
	/declare stakeY			int outer
	/declare retry			int outer 3
	/declare retrycount		int outer 0
	/declare TempSpell		string outer
	/declare myfamiliar		int outer
	/declare tankname		string outer
	/declare AFNTempStr		string outer
	/declare AFNiniFile		string outer None
	/declare AFNiniFlag		int outer 0
	/declare Channeljoined		bool outer FALSE
	/declare returnvalue		int outer 0
	/declare SilCastOntimer		timer outer
	/declare aggrotimer		timer outer
	/declare OutDoors		bool outer FALSE
	/declare UseMount		bool outer TRUE
	/declare asstimer		timer outer
	/declare Targetchangetimer	timer outer
	/declare refreshtimer		timer outer
	/declare ALrefreshtimer		timer outer
	/declare Tankalertlist		int outer 5
	/squelch /alert clear ${Tankalertlist}
	/declare Voidalertlist		int outer 10
	/squelch /alert clear ${Voidalertlist}
	/declare DesObjalertlist	int outer 15
	/squelch /alert clear ${DesObjalertlist}
	/declare Incomalertlist		int outer 20
	/squelch /alert clear ${Incomalertlist}
	/declare Roameralertlist	int outer 25
	/squelch /alert clear ${Roameralertlist}
	/declare Incampalertlist	int outer 30
	/squelch /alert clear ${Incampalertlist}
	/declare Validtofightalertlist	int outer 35
	/squelch /alert clear ${Validtofightalertlist}
	/declare ValidtofightStbyalertlist	int outer 40
	/squelch /alert clear ${ValidtofightStbyalertlist}
	
/echo Declaration done.
/return

Sub LoadAFNini
/varset AFNiniFlag 0
|###INI setup variables
|#######Example, stuff within |Stuff| needs to be replaced for every variable.
|/varset AFNTempStr ${Ini[${AFNiniFile},|InifileSection|,|VariableName|,NOTFOUND]}
|/varset |VariableName| ${AFNTempStr}
|/if (${AFNTempStr.Equal["NOTFOUND"]}) {
|	/varset AFNiniFlag 1
|	/ini "${AFNiniFile}" |InifileSection| |VariableName| Nobody
|	/varset |VariableName| Nobody
|}
|#######Example

|##################### General ############################
/varset AFNTempStr ${Ini[${AFNiniFile},General,mainassist1,NOTFOUND]}
/varset mainassist1 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General mainassist1 Nobody
	/varset mainassist1 Nobody
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,mainassist2,NOTFOUND]}
/varset mainassist2 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General mainassist2 Nobody
	/varset mainassist2 Nobody
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,mainassist3,NOTFOUND]}
/varset mainassist3 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General mainassist3 Nobody
	/varset mainassist3 Nobody
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,leashholder,NOTFOUND]}
/varset leashholder ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General leashholder Nobody
	/varset leashholder Nobody
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,leashlength,NOTFOUND]}
/varset leashlength ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General leashlength 50
	/varset leashlength 50
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,followdistance,NOTFOUND]}
/varset followdistance ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General followdistance 40
	/varset followdistance 40
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,engagedistance,NOTFOUND]}
/varset engagedistance ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General engagedistance 200
	/varset engagedistance 200
}
/varset AFNTempStr ${Ini[${AFNiniFile},General,snareperc,NOTFOUND]}
/varset snareperc ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" General snareperc 60
	/varset snareperc 60
}
|##################### General ############################

|##################### Channel ############################
|
|/varset AFNTempStr ${Ini[${AFNiniFile},Channel,garbag,NOTFOUND]}
|/varset garbag ${AFNTempStr}
|/if (${AFNTempStr.Equal["NOTFOUND"]}) {
|	/varset AFNiniFlag 1
|	/ini "${AFNiniFile}" Channel garbag None
|	/varset garbag None
|}
|
|##################### Channel ############################

|##################### Tasks ############################
/varset AFNTempStr ${Ini[${AFNiniFile},Tasks,doleash,NOTFOUND]}
/varset doleash ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Tasks doleash FALSE
	/varset doleash FALSE
}
/varset AFNTempStr ${Ini[${AFNiniFile},Tasks,dosnare,NOTFOUND]}
/varset dosnare ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Tasks dosnare TRUE
	/varset dosnare TRUE
}
/varset AFNTempStr ${Ini[${AFNiniFile},Tasks,doconcuss,NOTFOUND]}
/varset doconcuss ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Tasks doconcuss TRUE
	/varset doconcuss TRUE
}
|##################### Tasks ############################

|##################### Spells ############################
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,Harvest,NOTFOUND]}
/varset Harvest ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells Harvest "Patient Harvest"
	/varset Harvest "Patient Harvest"
}
/varset AFNTempStr ${Ini[${AFNiniFile},FireSet,Mnuke1,NOTFOUND]}
/varset Mnuke1 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" FireSet Mnuke1 "Flashfires"
	/varset Mnuke1 "Flashfires"
}
/varset AFNTempStr ${Ini[${AFNiniFile},IceSet,Mnuke1,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" IceSet Mnuke1 "Cold Snap"
}
/varset AFNTempStr ${Ini[${AFNiniFile},MagicSet,Mnuke1,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" MagicSet Mnuke1 "Cloudburst Strike"
}
/varset AFNTempStr ${Ini[${AFNiniFile},FireSet,Mnuke2,NOTFOUND]}
/varset Mnuke2 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" FireSet Mnuke2 "Cloudburst Strike"
	/varset Mnuke2 "Cloudburst Strike"
}
/varset AFNTempStr ${Ini[${AFNiniFile},IceSet,Mnuke2,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" IceSet Mnuke2 "Cloudburst Strike"
}
/varset AFNTempStr ${Ini[${AFNiniFile},MagicSet,Mnuke2,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" MagicSet Mnuke2 "Wildmagic Strike"
}
/varset AFNTempStr ${Ini[${AFNiniFile},FireSet,LoMnuke,NOTFOUND]}
/varset LoMnuke ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" FireSet LoMnuke "Chaos Flame"
	/varset LoMnuke "Chaos Flame"
}
/varset AFNTempStr ${Ini[${AFNiniFile},IceSet,LoMnuke,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" IceSet LoMnuke "Claw of Selay"
}
/varset AFNTempStr ${Ini[${AFNiniFile},MagicSet,LoMnuke,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" MagicSet LoMnuke "Leap of Sparks"
}
/varset AFNTempStr ${Ini[${AFNiniFile},FireSet,GoMnuke,NOTFOUND]}
/varset GoMnuke ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" FireSet GoMnuke "Ether Flame"
	/varset GoMnuke "Ether Flame"
}
/varset AFNTempStr ${Ini[${AFNiniFile},IceSet,GoMnuke,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" IceSet GoMnuke "Gelidin Comet"
}
/varset AFNTempStr ${Ini[${AFNiniFile},MagicSet,GoMnuke,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" MagicSet GoMnuke "Thundaka"
}
/varset AFNTempStr ${Ini[${AFNiniFile},FireSet,GoRMnuke,NOTFOUND]}
/varset GoRMnuke ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" FireSet GoRMnuke "Ethereal Conflagration"
	/varset GoRMnuke "Ethereal Conflagration"
}
/varset AFNTempStr ${Ini[${AFNiniFile},IceSet,GoRMnuke,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" IceSet GoRMnuke "Icefall Avalanche"
}
/varset AFNTempStr ${Ini[${AFNiniFile},MagicSet,GoRMnuke,NOTFOUND]}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" MagicSet GoRMnuke "Ball Lightning"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,myconcspell,NOTFOUND]}
/varset myconcspell ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells myconcspell "Concussive Blast"
	/varset myconcspell "Concussive Blast"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,snarespell,NOTFOUND]}
/varset snarespell ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells snarespell "Atol's Spectral Shackles"
	/varset snarespell "Atol's Spectral Shackles"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,buffspell,NOTFOUND]}
/varset buffspell ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells buffspell "Scales of the Crystalwing"
	/varset buffspell "Scales of the Crystalwing"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,DmgRune,NOTFOUND]}
/varset DmgRune ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells DmgRune "Scales of the Crystalwing"
	/varset DmgRune "Scales of the Crystalwing"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,SSRune,NOTFOUND]}
/varset SSRune ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells SSRune "Crystalwing Ward"
	/varset SSRune "Crystalwing Ward"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,Dmgshield,NOTFOUND]}
/varset Dmgshield ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells Dmgshield "O`Keil's Levity"
	/varset Dmgshield "O`Keil's Levity"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Spells,Levi,NOTFOUND]}
/varset Levi ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Spells Levi "Levitation"
	/varset Levi "Levitation"
}
|##################### Spells ############################

|##################### Items ############################
/varset AFNTempStr ${Ini[${AFNiniFile},Items,tempstaff,NOTFOUND]}
/varset tempstaff ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items tempstaff "Staff of Elemental Flux"
	/varset tempstaff "Staff of Elemental Flux"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,DmgClicky1,NOTFOUND]}
/varset DmgClicky1 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items DmgClicky1 None
	/varset DmgClicky1 None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,DmgClicky2,NOTFOUND]}
/varset DmgClicky2 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items DmgClicky2 None
	/varset DmgClicky2 None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,DmgClicky3,NOTFOUND]}
/varset DmgClicky3 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items DmgClicky3 None
	/varset DmgClicky3 None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,ConcClicky,NOTFOUND]}
/varset ConcClicky ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items ConcClicky None
	/varset ConcClicky None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,Epic2or15,NOTFOUND]}
/varset Epic2or15 ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items Epic2or15 "Staff of Phenomenal Power"
	/varset Epic2or15 "Staff of Phenomenal Power"
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,Mount,NOTFOUND]}
/varset Mount ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items Mount None
	/varset Mount None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Items,GoMRobe,NOTFOUND]}
/varset GoMRobe ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Items GoMRobe None
	/varset GoMRobe None
}
|##################### Items ############################

|##################### Buffs ############################
/varset AFNTempStr ${Ini[${AFNiniFile},Buffs,SpellBuff[1],NOTFOUND]}
/varset SpellBuff[1] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Buffs SpellBuff[1] None
	/varset SpellBuff[1] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Buffs,SpellBuff[2],NOTFOUND]}
/varset SpellBuff[2] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Buffs SpellBuff[2] None
	/varset SpellBuff[2] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Buffs,SpellBuff[3],NOTFOUND]}
/varset SpellBuff[3] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Buffs SpellBuff[3] None
	/varset SpellBuff[3] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Buffs,SpellBuff[4],NOTFOUND]}
/varset SpellBuff[4] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Buffs SpellBuff[4] None
	/varset SpellBuff[4] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},Buffs,SpellBuff[5],NOTFOUND]}
/varset SpellBuff[5] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Buffs SpellBuff[5] None
	/varset SpellBuff[5] None
}
|##################### Buffs ############################

|##################### ItemBuffs ############################
/varset AFNTempStr ${Ini[${AFNiniFile},ItemBuffs,ItemBuff[1],NOTFOUND]}
/varset ItemBuff[1] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" ItemBuffs ItemBuff[1] None
	/varset ItemBuff[1] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},ItemBuffs,ItemBuff[2],NOTFOUND]}
/varset ItemBuff[2] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" ItemBuffs ItemBuff[2] None
	/varset ItemBuff[2] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},ItemBuffs,ItemBuff[3],NOTFOUND]}
/varset ItemBuff[3] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" ItemBuffs ItemBuff[3] None
	/varset ItemBuff[3] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},ItemBuffs,ItemBuff[4],NOTFOUND]}
/varset ItemBuff[4] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" ItemBuffs ItemBuff[4] None
	/varset ItemBuff[4] None
}
/varset AFNTempStr ${Ini[${AFNiniFile},ItemBuffs,ItemBuff[5],NOTFOUND]}
/varset ItemBuff[5] ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" ItemBuffs ItemBuff[5] None
	/varset ItemBuff[5] None
}
|##################### ItemBuffs ############################

|##################### Healpots ############################
/varset AFNTempStr ${Ini[${AFNiniFile},Healpots,InstantHealpot,NOTFOUND]}
/varset InstantHealpot ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" Healpots InstantHealpot None
	/varset InstantHealpot None
}
|##################### Healpots ############################

|##################### NOTOUCHvars ############################
/varset AFNTempStr ${Ini[${AFNiniFile},NOTOUCHvars,nukepause,NOTFOUND]}
/varset nukepause ${AFNTempStr}
/if (${AFNTempStr.Equal["NOTFOUND"]}) {
	/varset AFNiniFlag 1
	/ini "${AFNiniFile}" NOTOUCHvars nukepause NULL
	/varset nukepause NULL
}
|##################### NOTOUCHvars ############################

|/varset AFNTempStr ${Ini[${AFNiniFile},holdsection,garbage,NOTFOUND]}
|/varset garbage ${AFNTempStr}
|/if (${AFNTempStr.Equal["NOTFOUND"]}) {
|	/varset AFNiniFlag 1
|	/ini "${AFNiniFile}" holdsection garbage None
|	/varset garbage None
|}

/if (${AFNiniFlag}==1) {
/echo INI file created/appended. Please customize ${AFNiniFile} in your macros directory. After that Macro should be gtg.
/end
}
/return
 
needing help converting this to a magi macro...

Users who are viewing this thread

Back
Top