EvenLessSpam
Active member
- Joined
- Oct 31, 2005
- RedCents
- 91¢
This is merely a minor rewrite of the KiteShit.mac (which I'm sorry to say I can't remember who's the author), I just rewrote it to quad kite the 4 mobs that are near Alekson Garn in the SE basement.
There are several Snaring paths cause I haven't been able to find one that's good "enough". So far I'm using one that goes like a square, except that it every other spot it crosses over the middle. This is the path I found best for the purpose.
It will give you some hits once in a while, so if you can't survive that then you shouldn't use this.
It takes me (Level 70 druid) 8 to 10 minutes to kill 4, then there's about a 20 minute respawn timer. Gives about 9-10% AA per quad, not much, but it's AFK in a low populated zone. It gives decent cash and ethereals/spectrals as well as Hero Parts.
Enjoy..
Btw. If this is worth anything then I wouldn't mind a free month here in the EQ1 section
<edit>
Added check for innate camouflage.
Added check for MQ2Cast, and will use that if loaded.
Removed the focus items from within the code and made it into variables that are easier to configure. These focus items will only be used if MQ2Cast is loaded. MQ2Cast will then swap in the items before casting (damage focus, range focus, buff duration focus).
Removed the unused paths that really weren't worth anything anyway.
The pull/snare path looks like this:
</edit>
There are several Snaring paths cause I haven't been able to find one that's good "enough". So far I'm using one that goes like a square, except that it every other spot it crosses over the middle. This is the path I found best for the purpose.
It will give you some hits once in a while, so if you can't survive that then you shouldn't use this.
It takes me (Level 70 druid) 8 to 10 minutes to kill 4, then there's about a 20 minute respawn timer. Gives about 9-10% AA per quad, not much, but it's AFK in a low populated zone. It gives decent cash and ethereals/spectrals as well as Hero Parts.
Enjoy..
Btw. If this is worth anything then I wouldn't mind a free month here in the EQ1 section

<edit>
Added check for innate camouflage.
Added check for MQ2Cast, and will use that if loaded.
Removed the focus items from within the code and made it into variables that are easier to configure. These focus items will only be used if MQ2Cast is loaded. MQ2Cast will then swap in the items before casting (damage focus, range focus, buff duration focus).
Removed the unused paths that really weren't worth anything anyway.
The pull/snare path looks like this:
Rich (BB code):
1 _____ 4
\ /
\ /
/ \
3 /___\ 2
Rich (BB code):
|--Defines---------------------------------------------------------------------|
#define STATE_RESTING 0
#define STATE_PULLING 1
#define STATE_SNARING 2
#define STATE_ROUNDINGUP 3
#define STATE_MOVINGTONUKEPATH 4
#define STATE_NUKING 5
#define STATE_RETURNINGHOME 6
#turbo 20
|--Events----------------------------------------------------------------------|
#event BEING_HIT "#*#hits YOU for#*#"
#event BEING_HIT "#*#kicks YOU for#*#"
#event BEING_HIT "#*#bashes YOU for#*#"
#event BEING_HIT "#*#slashes YOU for#*#"
#event BEING_HIT "#*#pierces YOU for#*#"
#event BEING_HIT "#*#punches YOU for#*#"
#event KILLED_TARGET "You have slain#*#"
#event KILLED_TARGET "You gain experience!!"
#event SNARE_ON "#*#has been ensnared#*#"
#event SNARE_OFF "#*#Ensnare spell has worn off#*#"
#event NUKE_LANDED "#*#has been shaken by Karana's Rage."
#event NUKE_LANDED "#*#hit#*#for#*#points of non-melee damage."
#event KILLED "You have been slain by#*#"
#event KILL "You have slain#*#"
#event HANDS_FULL "#*#with your hands full."
#event ZONING "LOADING, PLEASE WAIT..."
#event ZONED "You have entered#*#"
#event BROKEN_MOVEMENT "You must be completely stopped before doing this action."
|--Sub: Main-------------------------------------------------------------------|
Sub Main
|--Declare various---------------------------------------------------------|
/declare PCCheckRadius float outer 500
/declare i int outer 1
/declare ClosestTarget int outer 0
/declare ClosestTargetDistance int outer 0
/declare ClosestSnaredTarget int outer 0
/declare ClosestSnaredTargetDistance int outer 0
/declare State int outer STATE_RESTING
/declare ThisRunTime int outer 0
/declare BuffState bool outer ${Bool[FALSE]}
/declare EarnedExpPct float outer 0.00
/declare EarnedAAExpPct float outer 0.00
/declare TmpExpPct float outer 0.00
/declare TmpAAExpPct float outer 0.00
/declare TmpExpCalcVar float outer 0.00
/declare AggregateDistance float outer 0.00
/declare StallTimer timer outer 0
/declare LastMana int outer 0
/declare SnareSafeDistance float outer 140.00
/declare NukeSafeDistance float outer 180.00
/declare Proximity float outer 70.00
/declare RangeFocusPct int outer 20
/declare EvacHPPct int outer 30
/declare SotWHPPct int outer 50
/declare UseWarp bool outer true
/declare UseDoCrack bool outer true
/declare UseSpeedHack float outer 0
/declare SotWorSotG string outer Spirit of the Wood
/declare FocusItems string outer
|--Declare spots-----------------------------------------------------------|
/declare RestSpot[3] float outer 0.0
/varset RestSpot[1] -1725.00
/varset RestSpot[2] -2485.00
/varset RestSpot[3] -115.00
/declare PullSpot[2] float outer 0.0
/varset PullSpot[1] -1540.00
/varset PullSpot[2] -2370.00
|** 4-point cross-square **|
/declare SpotCount int outer 4
/declare Spots[4,2] float outer 0.0
/varset Spots[2,1] -1915.00
/varset Spots[2,2] -2600.00
/varset Spots[3,1] -1915.00
/varset Spots[3,2] -2370.00
/varset Spots[4,1] -1540.00
/varset Spots[4,2] -2600.00
/varset Spots[1,1] -1540.00
/varset Spots[1,2] -2370.00
|** Wide 4-point square **|
/declare SpotCount2 int outer 4
/declare Spots2[4,2] float outer 0.0
/varset Spots2[2,1] -1540.00
/varset Spots2[2,2] -2600.00
/varset Spots2[3,1] -1915.00
/varset Spots2[3,2] -2600.00
/varset Spots2[4,1] -1915.00
/varset Spots2[4,2] -2370.00
/varset Spots2[1,1] -1540.00
/varset Spots2[1,2] -2370.00
|** 6-point ellipse
/declare SpotCount2 int outer 6
/declare Spots2[6,2] float outer 0.0
/varset Spots2[1,1] -1525.00
/varset Spots2[1,2] -2485.00
/varset Spots2[2,1] -1655.00
/varset Spots2[2,2] -2585.00
/varset Spots2[3,1] -1800.00
/varset Spots2[3,2] -2585.00
/varset Spots2[4,1] -1925.00
/varset Spots2[4,2] -2485.00
/varset Spots2[5,1] -1800.00
/varset Spots2[5,2] -2385.00
/varset Spots2[6,1] -1655.00
/varset Spots2[6,2] -2385.00
**|
/declare ClosestSpot int outer 0
/declare LongestSpot int outer 0
/declare CurrentSpot int outer 1
/declare LastDistance float outer 0.0
|--Spells------------------------------------------------------------------|
/declare CurrentSpell string outer "NONE"
/declare BuffCount int outer 5
/declare BuffSpells[5] string outer "NONE"
/varset BuffSpells[1] Nettlecoat
/varset BuffSpells[2] Mask of the Forest
/varset BuffSpells[3] Steeloak Skin
/varset BuffSpells[4] Spirit of Eagle
/varset BuffSpells[5] Oaken Vigor
/declare HealSpell string outer UNDEFINED
/varset HealSpell Nature's Infusion
/declare RootSpell string outer UNDEFINED
/varset RootSpell Savage Roots
/declare SnareSpell string outer UNDEFINED
/varset SnareSpell Ensnare
/declare GateSpell string outer UNDEFINED
/varset GateSpell Gate
/declare NukeSpell string outer UNDEFINED
/varset NukeSpell Summer's Flame
/declare QuadSpell string outer UNDEFINED
/varset QuadSpell Karana's Rage
|--Focus Items-------------------------------------------------------------|
/declare BuffFocusCount int outer 2
/declare BuffFocus[2] string outer
/varset BuffFocus[1] Crown of Ambivalence
/varset BuffFocus[2] Orb of Thunderous Spirits
/declare NukeFocusCount int outer 2
/declare NukeFocus[2] string outer
/varset NukeFocus[1] Symbol of the Plaguebringer
/varset NukeFocus[2] Wristband of Judgement
/declare RangeFocusPct int outer 20
|--Targets-----------------------------------------------------------------|
/declare SnaredTargetCount int outer 0
/declare LastSnaredID int outer 0
/declare LastAttemptedSnareTarget int outer 0
/declare AllTargetsSnared bool outer ${Bool[FALSE]}
/declare TargetCount int outer 4
/declare TargetIDs[4] int outer 0
/declare TargetSnareStatus[4] bool outer ${Bool[FALSE]}
/declare KillCount int outer 0
/if ((${UseDoCrack}) && (${Plugin[mq2docrack].Name.Equal[mq2docrack]})) {
/docrack CastStunned on
/docrack IndoorSpells on
/docrack NoMeleePush on
/docrack NoStun on
}
/if ((${UseSpeedHack} > 0) && (${Plugin[mq2superduperreallyghettospeed].Name.Equal[mq2superduperreallyghettospeed]})) /speed ${UseSpeedHack}
/if (${Me.Standing}) /sit
/if (${UseWarp} && (${Plugin[mq2rwarp].Name.Equal[mq2rwarp]})) /squelch /warp loc ${RestSpot[1]} ${RestSpot[2]} ${RestSpot[3]}
:MAINLOOP
/doevents
/if (${Me.PctHPs} < ${EvacHPPct}) /call SubExodus
/if (${Me.PctHPs} < ${SotWHPPct}) /if (${Me.AltAbilityReady[${SotWorSotG}]}) {
/if (${Plugin[mq2cast].Name.Equal[mq2cast]}) {
/if (${Bool[${BuffFocusCount}]}) {
/for i 1 to ${BuffFocusCount}
/varset FocusItems ${FocusItems} "-focus|${BuffFocus[${i}]}"
/next i
}
/casting "${SotWorSotG}" alt ${If[${Bool[${BuffFocusCount}]},${FocusItems},]}
}
/if (${Plugin[mq2cast].Name.NotEqual[mq2cast]}) /aa act "${SotWorSotG}"
}
/call SubCalcSpotDistance
|--Rest/Ground Zero----------------------------------------------------|
/if (${State} == STATE_RESTING) {
/if (!${Me.AFK}) /afk
/if (${Math.Distance[${RestSpot[1]}, ${RestSpot[2]}]} > 50.0) /call SubMoveToSpot ${RestSpot[1]} ${RestSpot[2]} 10.0
/delay 3s
/if ((${Bool[${Spawn[pc notid ${Me.ID}]}]}) && (${Spawn[pc notid ${Me.ID}].Distance} < ${PCCheckRadius}) && (${Spawn[pc notid ${Me.ID}].Name.NotEqual[Eratura]})) /goto :MAINLOOP
/call SubCheckBuffs
/if ((${Me.AltAbilityReady[Innate Camouflage]}) && (!${Bool[${Me.Buff[Camouflage]}]}) && (!${Bool[${Me.Casting}]})) {
/alt act 80
/delay 4s !${Bool[${Me.Casting}]}
/delay 5
}
/if (${Me.Standing} && !${Bool[${Me.Casting}]}) /sit
/if ((${Me.PctHPs} < 99) || (${Me.PctMana} < 99) || !${BuffState}) /goto :MAINLOOP
/if (${SpawnCount[npc radius 200 range 60 65]} < ${TargetCount}) /goto :MAINLOOP
/if ((${BuffState})) /call SubMemorizeSpells
/varset State STATE_PULLING
/if (${Me.AFK}) /afk
/varset TmpExpPct ${Me.PctExp}
/varset TmpAAExpPct ${Me.PctAAExp}
/varset ThisRunTime ${Macro.RunTime}
/varset StallTimer 1200s
/keypress ESC
/autoinv
/for i 1 to ${TargetCount}
/varset TargetIDs[${i}] ${NearestSpawn[${i}, npc radius 200 range 60 65].ID}
/next i
}
|--Pulling-------------------------------------------------------------|
/if (${State} == STATE_PULLING) {
/if (${Math.Distance[${PullSpot[1]}, ${PullSpot[2]}]} > 50.0) /call SubMoveToSpot ${PullSpot[1]} ${PullSpot[2]} 10.0
/face nolook loc ${Spots[2, 1]},${Spots[2, 2]}
/delay 5
/if (!${Bool[${Target}]}) {
/target npc id ${NearestSpawn[npc radius 200 range 60 65].ID}
/delay 2s ${Bool[${Target}]}
}
/varset LastAttemptedSnareTarget ${Target.ID}
/call SubTryToCastSpell "${SnareSpell}"
| NOTE THAT THE SNARE_ON EVENT CHANGES THE STATE TO STATE_SNARING
}
|--Snaring-------------------------------------------------------------|
/if (${State} == STATE_SNARING) {
/if (!${AllTargetsSnared}) {
/varset AllTargetsSnared ${Bool[TRUE]}
/for i 1 to ${TargetCount}
/if (!${TargetSnareStatus[${i}]}) /varset AllTargetsSnared ${Bool[FALSE]}
/next i
}
/varset ClosestTarget ${Target.ID}
/varset ClosestTargetDistance ${Target.Distance}
/varset ClosestSnaredTarget 0
/for i 1 to ${TargetCount}
/target id ${TargetIDs[${i}]}
/if ((${Target.Distance} < ${ClosestTargetDistance}) && (${TargetSnareStatus[${i}]} == ${Bool[FALSE]})) {
/varset ClosestTarget ${Target.ID}
/varset ClosestTargetDistance ${Target.Distance}
}
/if (${TargetSnareStatus[${i}]} == ${Bool[TRUE]}) {
/if (${ClosestSnaredTarget} == 0) {
/varset ClosestSnaredTarget ${Target.ID}
/varset ClosestSnaredTargetDistance ${Target.Distance}
} else {
/if (${Target.Distance} < ${ClosestSnaredTargetDistance}) {
/varset ClosestSnaredTarget ${Target.ID}
/varset ClosestSnaredTargetDistance ${Target.Distance}
}
}
}
/next i
/if (${Target.ID} != ${ClosestTarget}) /target id ${ClosestTarget}
/for i 1 to ${TargetCount}
/if ((${TargetIDs[${i}]} == ${Target.ID}) && (${TargetSnareStatus[${i}]} == ${Bool[FALSE]}) && (${ClosestSnaredTargetDistance} > 100) && (${Target.Distance} > ${SnareSafeDistance}) && (${Me.SpellReady["${SnareSpell}"]})) {
/face nolook loc ${Spots[${Math.Calc[${CurrentSpot}+1]}, 1]},${Spots[${Math.Calc[${CurrentSpot}+1]}, 2]}
/keypress FORWARD
/keypress BACK
/delay 2s (!${Me.Moving})
/delay 5s (${Target.Distance} < ${Math.Calc[${Spell[${SnareSpell}].Range}*1.${RangeFocusPct}]})
/varset LastAttemptedSnareTarget ${Target.ID}
/call SubTryToCastSpell "${SnareSpell}"
/delay 10
/delay 4s (!${Bool[${Me.Casting}]})
/delay 5
}
/next i
/if ((${CurrentSpot} == 4) && (${Bool[${AllTargetsSnared}]})) {
/target npc radius 200 range 60 65
/if (${Target.Distance} > 75) {
/if (${Me.Moving}) {
/keypress FORWARD
/keypress BACK
}
} else {
/varset State STATE_ROUNDINGUP
/face heading ${Math.Calc[${Heading[${Target.Y},${Target.X}].DegreesCCW}+55]}
}
} else {
/call SubContinueOnPath ${bool[FALSE]}
}
}
|--Rounding Up---------------------------------------------------------|
/if (${State} == STATE_ROUNDINGUP) {
/if (!${Me.Moving}) {
/keypress FORWARD
/keypress FORWARD HOLD
}
/varset ClosestTarget ${Target.ID}
/varset ClosestTargetDistance ${Target.Distance}
/for i 1 to ${TargetCount}
/target id ${TargetIDs[${i}]}
/if (${Target.Distance} < ${ClosestTargetDistance}) {
/varset ClosestTarget ${Target.ID}
/varset ClosestTargetDistance ${Target.Distance}
}
/next i
/if (${Target.ID} != ${ClosestTarget}) /target id ${ClosestTarget}
/if (${Target.Distance} > ${Proximity}) {
/face heading ${Math.Calc[${Heading[${Target.Y},${Target.X}].DegreesCCW}+55]}
} else {
/face heading ${Math.Calc[${Heading[${Target.Y},${Target.X}].DegreesCCW}+90]}
}
/call SubCalcAggregateDistance
/if ((${AggregateDistance} < 15) && (${AllTargetsSnared})) {
/if (${Math.Distance[${Spots[2, 1]}, ${Spots[2, 2]}]} < ${Math.Distance[${Spots[2, 1]}, ${Spots[2, 2]}:${Target.Y}, ${Target.X}]}) {
/varset CurrentSpot 2
/varset State STATE_MOVINGTONUKEPATH
}
}
}
|--Moving to Nukepath--------------------------------------------------|
/if (${State} == STATE_MOVINGTONUKEPATH) {
/if (${CurrentSpot} == 2) {
/varset CurrentSpot 1
/varset State STATE_NUKING
/call SubContinueOnPath2 ${Bool[TRUE]}
} else {
/call SubContinueOnPath ${Bool[FALSE]}
}
}
|--Nuking--------------------------------------------------------------|
/if (${State} == STATE_NUKING) {
/if (((${Me.CurrentMana} < ${Math.Calc[${Spell[${QuadSpell}].Mana}+10]}) || (${Me.PctHPs} < ${EvacHPPct})) && (${Target.Distance} > ${NukeSafeDistance})) {
/keypress FORWARD
/keypress BACK
/sit
/delay 13s (${Target.Distance} < ${Proximity})
/stand
}
/if (${Bool[${Me.Casting}]}) /interrupt
/if ((${Target.Distance} > ${NukeSafeDistance}) && (${Me.SpellReady["${QuadSpell}"]}) && (${Me.CurrentMana} > ${Math.Calc[${Spell[${QuadSpell}].Mana}+10]})) {
/keypress FORWARD
/keypress BACK
/delay 2s (!${Me.Moving})
/delay 5
/delay 5s (${Target.Distance} < ${Math.Calc[${Spell[${QuadSpell}].Range}*1.${RangeFocusPct}]})
/if (${KillCount} == ${Math.Calc[${TargetCount}-1]}) {
/call SubTryToCastSpell "${NukeSpell}"
} else {
/call SubTryToCastSpell "${QuadSpell}"
}
/delay 2
/delay 8s (!${Bool[${Me.Casting}]})
/delay 2
}
/if (${KillCount} == ${TargetCount}) {
/echo ::: HoH.Statistics :::
/echo -=-=-=-=-=--=-=-=-=-=-
/echo This.Time : ${Math.Calc[(${Macro.RunTime}-${ThisRunTime})/60]} minutes
/varcalc TmpExpCalcVar ${Me.PctExp}-${TmpExpPct}
/if (${TmpExpCalcVar} < 0) /varcalc TmpExpCalcVar ${TmpExpCalcVar}+100
/varcalc EarnedExpPct ${EarnedExpPct}+${TmpExpCalcVar}
/echo This.Exp : + ${TmpExpCalcVar}
/varcalc TmpExpCalcVar ${Me.PctAAExp}-${TmpAAExpPct}
/if (${TmpExpCalcVar} < 0) /varcalc TmpExpCalcVar ${TmpExpCalcVar}+100
/varcalc EarnedAAExpPct ${EarnedAAExpPct}+${TmpExpCalcVar}
/echo This.AAExp : + ${TmpExpCalcVar}
/echo -=-=-=-=-=--=-=-=-=-=-
/echo Total.Time: ${Math.Calc[${Macro.RunTime}/60]} minutes
/echo Total.Exp : + ${EarnedExpPct}
/echo Total.AAExp : + ${EarnedAAExpPct}
/echo -=-=-=-=-=--=-=-=-=-=-
/echo ${Time.Time24} exp: ${Me.PctExp} aa: ${Me.PctAAExp}
/call SubLootKill
/call SubCleanup
/varset State STATE_RESTING
}
/call SubContinueOnPath2 ${bool[FALSE]}
}
/goto :MAINLOOP
:QUIT
/return
|--LootOpenedCorpse------------------------------------------------------------|
Sub SubLootOpenedCorpse
/declare ItemCount int local 0
/declare LootSlot int local 1
/if (${Corpse.Items} == 0) /goto :DONELOOTING
/lootnodrop never
/varset ItemCount ${Corpse.Items}
/delay 1s
:LootLag
/if (${ItemCount} != ${Corpse.Items}) {
/varset ItemCount ${Corpse.Items}
/delay 2s (${ItemCount} == ${Corpse.Items})
/goto :LootLag
}
/for LootSlot 1 to ${ItemCount}
:LootItem
/itemnotify loot${LootSlot} rightmouseup
/delay 5 !${Corpse.Item[${LootSlot}].ID}
/if (!${Corpse.Item[${LootSlot}].ID}) {
/next LootSlot
} else {
/goto :LootItem
}
/if (${Corpse.Items} > 0) /goto :LootLag
/notify LootWnd DoneButton leftmouseup
/lootnodrop always
:DONELOOTING
/return
|--LootKill--------------------------------------------------------------------|
Sub SubLootKill
/autoinv
/for i 1 to ${TargetCount}
/target corpse radius 300
/if (!${Bool[${Target}]}) /return
/call SubMoveToSpot ${Target.Y} ${Target.X} 15.0
/delay 1s (!${Me.Moving})
/if (${Bool[${Target}]}) {
/loot
/delay 10s ${Bool[${Window[LootWnd]}]}
/call SubLootOpenedCorpse
/notify LootWnd DoneButton leftmouseup
/delay 10s !${Bool[${Window[LootWnd]}]}
}
/next i
/return
|--Cleanup---------------------------------------------------------------------|
Sub SubCleanup
/varset State STATE_RESTING
/varset ClosestTarget 0
/varset ClosestTargetDistance 0
/varset ClosestSnaredTarget 0
/varset ClosestSnaredTargetDistance 0
/varset ThisRunTime 0
/varset TmpExpPct 0.00
/varset TmpAAExpPct 0.00
/varset AggregateDistance 0.0
/varset LastDistance 0.0
/varset CurrentSpot 1
/varset ClosestSpot 0
/varset LongestSpot 0
/varset SnaredTargetCount 0
/varset LastSnaredID 0
/varset LastAttemptedSnareTarget 0
/varset AllTargetsSnared ${Bool[FALSE]}
/for i 1 to ${TargetCount}
/varset TargetIDs[${i}] 0
/varset TargetSnareStatus[${i}] ${Bool[FALSE]}
/next i
/varset KillCount 0
/keypress ESC
/mqlog SubCleanup :: Ended
/return
|--CalcSpotDistance------------------------------------------------------------|
Sub SubCalcSpotDistance
/if ((${State} == STATE_SNARING)) {
/for i 1 to ${SpotCount}
/if (${ClosestSpot} == 0) {
/varset ClosestSpot ${i}
} else {
/if ( (${Math.Distance[${Spots[${i},1]}, ${Spots[${i},2]}]}) < (${Math.Distance[${Spots[${ClosestSpot},1]}, ${Spots[${ClosestSpot},2]}]}) ) /varset ClosestSpot ${i}
}
/if (${LongestSpot} == 0) {
/varset LongestSpot ${i}
} else {
/if ( (${Math.Distance[${Spots[${i},1]}, ${Spots[${i},2]}]}) > (${Math.Distance[${Spots[${LongestSpot},1]}, ${Spots[${LongestSpot},2]}]}) ) /varset LongestSpot ${i}
}
/next i
} else /if ((${State} == STATE_NUKING)) {
/for i 1 to ${SpotCount2}
/if (${ClosestSpot} == 0) {
/varset ClosestSpot ${i}
} else {
/if ( (${Math.Distance[${Spots2[${i},1]}, ${Spots2[${i},2]}]}) < (${Math.Distance[${Spots2[${ClosestSpot},1]}, ${Spots2[${ClosestSpot},2]}]}) ) /varset ClosestSpot ${i}
}
/if (${LongestSpot} == 0) {
/varset LongestSpot ${i}
} else {
/if ( (${Math.Distance[${Spots2[${i},1]}, ${Spots2[${i},2]}]}) > (${Math.Distance[${Spots2[${LongestSpot},1]}, ${Spots2[${LongestSpot},2]}]}) ) /varset LongestSpot ${i}
}
/next i
} else {
/varset ClosestSpot 0
/varset LongestSpot 0
}
/return
|--ContinueOnPath--------------------------------------------------------------|
Sub SubContinueOnPath(bool startingout)
/declare y int local ${Spots[${CurrentSpot}, 1]}
/declare x int local ${Spots[${CurrentSpot}, 2]}
/if (${startingout}) /varset LastDistance ${Math.Distance[${y}, ${x}]}
/if ((${Math.Distance[${y}, ${x}]} < 50) || (${Math.Distance[${y}, ${x}]} > ${LastDistance})) {
/varcalc CurrentSpot ${CurrentSpot}+1
/if (${CurrentSpot} > ${SpotCount}) /varset CurrentSpot 1
/varset y ${Spots[${CurrentSpot}, 1]}
/varset x ${Spots[${CurrentSpot}, 2]}
}
/if (!${Me.Standing}) /stand
/face nolook loc ${Spots[${CurrentSpot}, 1]}, ${Spots[${CurrentSpot}, 2]}
/if (!${Me.Moving}) {
/keypress FORWARD
/keypress FORWARD hold
}
/varset LastDistance ${Math.Distance[${y}, ${x}]}
/return
|--ContinueOnPath2-------------------------------------------------------------|
Sub SubContinueOnPath2(bool startingout)
/declare y int local ${Spots2[${CurrentSpot}, 1]}
/declare x int local ${Spots2[${CurrentSpot}, 2]}
/if (${startingout}) /varset LastDistance ${Math.Distance[${y},${x}]}
/if ((${Math.Distance[${y},${x}]} < 50) || (${Math.Distance[${y}, ${x}]} > ${LastDistance})) {
/varcalc CurrentSpot ${CurrentSpot}+1
/if (${CurrentSpot} > ${SpotCount2}) /varset CurrentSpot 1
/varset y ${Spots2[${CurrentSpot}, 1]}
/varset x ${Spots2[${CurrentSpot}, 2]}
}
/if (!${Me.Standing}) /stand
/face nolook loc ${Spots2[${CurrentSpot}, 1]},${Spots2[${CurrentSpot}, 2]}
/if (!${Me.Moving}) {
/keypress FORWARD
/keypress FORWARD hold
}
/varset LastDistance ${Math.Distance[${y}, ${x}]}
/return
|--CalcAggregateDistance-------------------------------------------------------|
Sub SubCalcAggregateDistance
/varset AggregateDistance ${Math.Distance[${Spawn[id ${TargetIDs[1]}].X}, ${Spawn[id ${TargetIDs[1]}].Y}:${Spawn[id ${TargetIDs[2]}].X}, ${Spawn[id ${TargetIDs[2]}].Y}]}
/varcalc AggregateDistance ${AggregateDistance}+${Math.Distance[${Spawn[id ${TargetIDs[2]}].X}, ${Spawn[id ${TargetIDs[2]}].Y}:${Spawn[id ${TargetIDs[3]}].X}, ${Spawn[id ${TargetIDs[3]}].Y}]}
/varcalc AggregateDistance ${AggregateDistance}+${Math.Distance[${Spawn[id ${TargetIDs[3]}].X}, ${Spawn[id ${TargetIDs[3]}].Y}:${Spawn[id ${TargetIDs[4]}].X}, ${Spawn[id ${TargetIDs[4]}].Y}]}
/varcalc AggregateDistance ${AggregateDistance}+${Math.Distance[${Spawn[id ${TargetIDs[4]}].X}, ${Spawn[id ${TargetIDs[4]}].Y}:${Spawn[id ${TargetIDs[1]}].X}, ${Spawn[id ${TargetIDs[1]}].Y}]}
/return
|--CheckBuffs------------------------------------------------------------------|
Sub SubCheckBuffs
/if (${Bool[${Me.Casting}]}) /return
/varset BuffState ${Bool[FALSE]}
/for i 1 to ${BuffCount}
/if (${Me.Buff[${BuffSpells[${i}]}].Duration} < 110) {
/if (!${Bool[${Me.Gem[${BuffSpells[${i}]}]}]}) {
/call SubMemorizeASpell "${BuffSpells[${i}]}" 3
/return
} else {
/target myself
/call SubTryToCastSpell "${BuffSpells[${i}]}"
/return
}
}
/next i
/varset BuffState ${Bool[TRUE]}
/return
|--MemorizeSpells--------------------------------------------------------------|
Sub SubMemorizeSpells
/call SubMemorizeASpell "${NukeSpell}" 1
/call SubMemorizeASpell "${QuadSpell}" 2
/call SubMemorizeASpell "${GateSpell}" 3
/call SubMemorizeASpell "${SnareSpell}" 4
/call SubMemorizeASpell "${RootSpell}" 5
/call SubMemorizeASpell "Oaken Guard" 6
/call SubMemorizeASpell "Karana's Renewal" 7
/call SubMemorizeASpell "Chlorotrope" 8
/call SubMemorizeASpell "${HealSpell}" 9
/return
|--MemorizeASpell--------------------------------------------------------------|
Sub SubMemorizeASpell
:MEMAGAIN
/doevents
/if (${Me.Gem[${Param0}]} != ${Param1}) {
/memspell ${Param1} "${Param0}"
/delay 6s (${Me.Gem[${Param0}]} == ${Param1})
}
/if (${Me.Gem[${Param0}]} != ${Param1}) /goto :MEMAGAIN
/return
|--TryToCastSpell--------------------------------------------------------------|
Sub SubTryToCastSpell
/declare thespell string local ${String[${Param0}]}
/if (${Me.CurrentMana} < ${Spell["${thespell}"].Mana}) /goto :ENDTRYSPELL
/if (!${Bool[${Me.SpellReady["${thespell}"]}]}) /goto :ENDTRYSPELL
/if (!${Me.Standing}) /stand
/if (${Bool[${Cursor.ID}]}) /autoinv
/delay 2
/if (${Plugin[mq2cast].Name.Equal[mq2cast]}) {
/if (${Bool[${NukeFocusCount}]} && ${Bool[${Spell[${thespell}].Duration}]}) {
/for i 1 to ${NukeFocusCount}
/varset FocusItems ${FocusItems} "-focus|${NukeFocus[${i}]}"
/next i
}
/casting "${thespell}" alt ${If[${Bool[${NukeFocusCount}]},${FocusItems},]}
}
/if (${Plugin[mq2cast].Name.NotEqual[mq2cast]}) /cast "${thespell}"
/varset CurrentSpell ${thespell}
:ENDTRYSPELL
/return
|--MoveToSpot------------------------------------------------------------------|
Sub SubMoveToSpot(float y, float x, float maxdist)
/declare StuckTimer timer local 0
/declare StuckCheck float local 0.00
/varset LastDistance ${Math.Distance[${y}, ${x}]}
/if (!${Me.Standing}) /stand
/face nolook loc ${y},${x}
/delay 1s
/keypress FORWARD
/keypress FORWARD hold
:MOVETOSPOTLOOP
/varset StuckTimer 2s
/varset StuckCheck ${LastDistance}
/doevents
/face nolook loc ${y},${x}
/if (${Math.Distance[${y}, ${x}]} > ${LastDistance}) {
/keypress FORWARD
/keypress BACK
/delay 1s
/face nolook loc ${y},${x}
/delay 1s
/keypress FORWARD
/keypress FORWARD hold
}
/varset LastDistance ${Math.Distance[${y}, ${x}]}
/if (${Math.Distance[${y}, ${x}]} > ${maxdist}) {
/if (!${Bool[${StuckTimer}]} && (${StuckCheck} >= ${LastDistance})) {
/if (${UseWarp} && (${Plugin[mq2rwarp].Name.Equal[mq2rwarp]})) {
/if (${State} == STATE_NUKING) {
/squelch /warp loc ${Spots2[${CurrentSpot,1}]} ${Spots2[${CurrentSpot,2}]} ${Me.Z}
} else /if (${State} == STATE_SNARING) {
/squelch /warp loc ${Spots[${CurrentSpot,1}]} ${Spots[${CurrentSpot,2}]} ${Me.Z}
} else {
/squelch /warp loc ${RestSpot[1]} ${RestSpot[2]} ${Me.Z}
}
} else {
/if (${State} == STATE_NUKING) {
/call SubContinueOnPath2 ${bool[FALSE]}
} else /if (${State} == STATE_SNARING) {
/call SubContinueOnPath ${bool[FALSE]}
} else {
/keypress BACK
/keypress BACK hold
/delay 2s
/if (${Bool[${Math.Rand[2]}]}) {
/face heading ${Math.Calc[${Heading[${y},${x}].DegreesCCW}+45]}
} else {
/face heading ${Math.Calc[${Heading[${y},${x}].Degrees}+45]}
}
/keypress FORWARD
/keypress FORWARD hold
/delay 2s
}
}
}
/goto :MOVETOSPOTLOOP
}
/keypress FORWARD
/keypress BACK
/return
|--Exodus----------------------------------------------------------------------|
Sub SubExodus
/if (${UseWarp} && (${Plugin[mq2rwarp].Name.Equal[mq2rwarp]})) {
/if (${State} == STATE_SNARING) {
/squelch /warp loc ${Spots[${LongestSpot},1]} ${Spots[${LongestSpot},2]} ${Me.Z}
} else /if (${State} == STATE_NUKING) {
/squelch /warp loc ${Spots2[${LongestSpot},1]} ${Spots2[${LongestSpot},2]} ${Me.Z}
} else {
/squelch /warp succor
/fade
}
/varset CurrentSpot ${LongestSpot}
} else {
/keypress FORWARD
/keypress BACK
/delay 1s
/if (${Me.AltAbilityReady[43]}) {
/alt act 43
} else {
/call SubTryToCastSpell "${GateSpell}"
}
}
/return
|--Events----------------------------------------------------------------------|
Sub Event_SNARE_ON
/varset State STATE_SNARING
/varcalc SnaredTargetCount ${SnaredTargetCount}+1
/for i 1 to ${TargetCount}
/if (${LastAttemptedSnareTarget} == ${TargetIDs[${i}]}) /varset TargetSnareStatus[${i}] ${Bool[TRUE]}
/next i
/if (${SnaredTargetCount} == 1) /call SubContinueOnPath ${bool[TRUE]}
/return
Sub Event_Timer(Timer,OriginalValue)
/if (${Defined[Timer]} && ${Timer.Equal[StallTimer]}) {
/call SubCleanup
/varset State STATE_RESTING
/if (${UseWarp} && (${Plugin[mq2rwarp].Name.Equal[mq2rwarp]})) /squelch /warp loc ${RestSpot[1]} ${RestSpot[2]} ${Me.Z}
}
/return
Sub Event_KILL
/varcalc KillCount ${KillCount}+1
/target npc id ${NearestSpawn[npc radius 200 range 60 65].ID}
/return
Sub Event_KILLED
/mqlog Event_KILLED :: State: ${State}; Loc: ${Me.Y}, ${Me.X}, ${Me.Z}; Current/Longest/ClosestSpot: ${CurrentSpot}/${LongestSpot}/${ClosestSpot}
/delay 30s
/quit
/endmacro
/return
Sub Event_ZONED
/mqlog Event_ZONED :: State: ${State}; Loc: ${Me.Y}, ${Me.X}, ${Me.Z}; Current/Longest/ClosestSpot: ${CurrentSpot}/${LongestSpot}/${ClosestSpot}
/keypress FORWARD
/keypress BACK
/delay 30s
/quit
/endmacro
/return
Sub Event_HANDS_FULL
/autoinv
/return
Sub Event_BROKEN_MOVEMENT
/keypress FORWARD
/keypress BACK
/if (${UseWarp} && (${Plugin[mq2rwarp].Name.Equal[mq2rwarp]})) /squelch /warp loc ${RestSpot[1]} ${RestSpot[2]} ${Me.Z}
/return
Sub Event_BEING_HIT
/if (${UseWarp} && (${Plugin[mq2rwarp].Name.Equal[mq2rwarp]})) {
/if (${State} == STATE_SNARING) {
/squelch /warp loc ${Spots[${LongestSpot},1]} ${Spots[${LongestSpot},2]} ${Me.Z}
} else /if (${State} == STATE_NUKING) {
/squelch /warp loc ${Spots2[${LongestSpot},1]} ${Spots2[${LongestSpot},2]} ${Me.Z}
} else {
/squelch /warp succor
/fade
}
/varset CurrentSpot ${LongestSpot}
}
/return
Last edited:


Never played a necro so I've no clue how it's done