Created
May 9, 2019 00:29
-
-
Save xackery/4343a812b1c8cf0a4e6971cd6ce87f88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub DoCampFarm | |
/call AfkSetup | |
/if (!${IsCampFarmEnabled}) /return | |
/if (!${Cast.Ready}) /return | |
| Pull Logic | |
/if (${PullTargetID}>0 && ${Me.XTarget}==0 && ${Group.MainAssist.ID} == ${Me.ID}) { | |
/call ClosestNPCID 2000 500 "" | |
/if (!${Macro.Return}) /return | |
/varset PullTargetID ${Macro.Return} | |
/call IsNPCPullable ${PullTargetID} | |
/if (${Macro.Return}) { | |
/echo to pull? | |
/if (${Me.Class.ShortName.Equal[SHD]}) { | |
/if (${Navigation.Active}) /nav stop | |
/echo tagging ${Spawn[id ${PullTargetID}].CleanName} ${Spawn[id ${PullTargetID}].Distance}m | |
/casting "Terror of Kra`Du Rk. II" -targetid|${PullTargetID} -maxtries|3 | |
/delay 1s | |
/if (${Me.XTarget}>0) { | |
/echo bringing home | |
/nav locxyz ${CampX} ${CampY} ${CampZ} | |
} | |
} | |
} | |
} | |
/if (${Me.Moving}) /return | |
/if (${Navigation.Active}) /return | |
/if (${RoamTimer}!=0) /return | |
/varset RoamTimer 2s | |
| Aggro Logic | |
/if (${Me.XTarget}>0) { | |
/varset CampTimer 1s | |
/if (${Me.XTarget}==1 && ${Me.Primary}!=10747) /bandolier activate 2hs | |
/if (${Me.XTarget}>1 && ${Me.Primary}==10747) /bandolier activate 1hs | |
/if (${PullTargetID}>0) { | |
/if (${Navigation.Active}) /nav stop | |
/varset PullTargetID 0 | |
} | |
/if (${Math.Distance[${Me.X},${Me.Y},${Me.Z}:${CampX},${CampY},${CampZ}]}>20) { | |
/echo got aggro, going to camp | |
/nav locxyz ${CampX} ${CampY} ${CampZ} | |
/return | |
} | |
/if (${Group.MainAssist.ID} != ${Me.ID}) /return | |
| find targets nearby | |
/if (${Target.ID}==0 || !${Me.Combat}) { | |
/call NearestXTarget | |
/if (${Macro.Return}==0) { | |
|/echo Bug? No nearby xtarget but me.xtarget >0 | |
/echo Waiting for mobs to get nearby | |
/if (${LastFaceID}!=${Target.ID}) /face | |
/return | |
} | |
/echo Target & Engage ${Spawn[id ${Macro.Return}]} | |
/target id ${Macro.Return} | |
/stick 10 | |
/attack | |
} | |
/return | |
} | |
|Idle Logic | |
|/call DoCastInvis | |
/if (${Math.Distance[${Me.X},${Me.Y},${Me.Z}:${CampX},${CampY},${CampZ}]}>20) { | |
/echo idle, going to camp | |
/nav locxyz ${CampX} ${CampY} ${CampZ} | |
/return | |
} | |
/if (${Group.MainAssist.ID}!= ${Me.ID}) /return | |
| find mob within darkness.ini | |
/call ClosestNPCID 1000 100 "" | |
/if (!${Macro.Return}) /return | |
/if (${CampTimer}) /return | |
/varset PullTargetID ${Macro.Return} | |
/if (${Spawn[id ${Macro.Return}].LineOfSight} && ${Spawn[id ${Macro.Return}].Distance}<210) /return | |
/echo Running to pull ${Spawn[id ${Macro.Return}].CleanName} ${Spawn[id ${Macro.Return}].Distance}m | |
/nav spawn id ${Macro.Return} | |
/return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment