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

Any hunter macs? (1 Viewer)

pythag

New member
Joined
Feb 2, 2006
RedCents
Any one have a working hunter mac - tried the standard one and its not working ?

I dont move toward the target during fight or looting therefore useless

My version (well not mine but you know)

Rich (BB code):
| Hunter Macro 
| Author : ins 
| Original Code: Robdawg 
| Usage : : /macro Hunter 
| Requirements: You need MQ2MoveUtils and spellroutines.inc              
|----------------------------------------------------------- 

#event SnareLand "#*# has been ensnared." 
#event OORange "Your target is too far away, get closer!" 
#event OORLoot "You are too far away to loot that corpse." 
#event Dead "You have been slain #*#" 
#event Exp "You gain#*#" 
#event SpellBlocked "Your spell did not #*#" 
#event SpellBlocked "Your spell would not #*#" 

#include spell_routines.inc 
#turbo 10 

Sub Main 
|------------------------------------------------------------ 
|Code: User Variables 
|------------------------------------------------------------ 

   /declare HPHealFight int outer 50 
   /declare HPHealRest int outer 90 
   /declare ManaforPull int outer 50 

   /declare MaxRadius int outer 200 
   /declare MaxZDistance int outer 200 
   /declare Range int outer 12 
   /declare SnareNPC int outer 1 
   /declare NukeNPC int outer 0 
   /declare BuffSpells int outer 8 

   /declare DDSpell string outer "Brushfire" 
   /declare HealSpell string outer "Chloroblast" 
   /declare SnareSpell string outer "Entrap" 
   /declare BuffSpell1 string outer "Vengeful Guard" 
   /declare BuffSpell2 string outer "Protection of the Wild" 
   /declare BuffSpell3 string outer "Mask of the Stalker" 
   /declare BuffSpell4 string outer "Cry of Thunder" 
   /declare BuffSpell5 string outer "Feral Form" 
   /declare BuffSpell6 string outer "Natureskin" 
   /declare BuffSpell7 string outer "Regrowth" 
   /declare BuffSpell8 string outer "Storm Strength" 

   /declare BuffSpellName1 string outer "Cloak of Retribution" 
   /declare BuffSpellName2 string outer "Protection of the Wild" 
   /declare BuffSpellName3 string outer "Mask of the Stalker" 
   /declare BuffSpellName4 string outer "Cry of Thunder" 
   /declare BuffSpellName5 string outer "Feral Form" 
   /declare BuffSpellName6 string outer "Natureskin" 
   /declare BuffSpellName7 string outer "Regrowth" 
   /declare BuffSpellName8 string outer "Storm Strength" 


   /declare DDSpellGem string outer "gem2" 
   /declare HealSpellGem string outer "gem8" 
   /declare SnareSpellGem string outer "alt" 
   /declare BuffSpellGem1 string outer "item" 
   /declare BuffSpellGem2 string outer "gem5" 
   /declare BuffSpellGem3 string outer "gem5" 
   /declare BuffSpellGem4 string outer "gem6" 
   /declare BuffSpellGem5 string outer "gem4" 
   /declare BuffSpellGem6 string outer "gem7" 
   /declare BuffSpellGem7 string outer "gem3" 
   /declare BuffSpellGem8 string outer "gem4" 



|------------------------------------------------------------ 
|Warning: Stop editing here. 
|------------------------------------------------------------ 
|Code: Array & Variable Information. 
|------------------------------------------------------------ 

   /declare BuffSub int outer 1 
   /declare BuffBlock[${BuffSpells}] int outer 0 
   /declare TargetID int outer 0 
   /declare AddCounter int outer 1 
   /declare AddIDArray[10] int outer 0 
   /declare AddIDCounter int outer 1 
   /declare FastRange int outer 
   /declare RangeMax int outer 
   /declare RangeMin int outer 
   /varcalc FastRange ${Range}+3 
   /varcalc RangeMax ${Range}+1 
   /varcalc RangeMin ${Range}-1 
   /declare MyXLOCA int outer 0 
   /declare MyYLOCA int outer 0 
   /declare BreakLoop int outer 0  
   /declare xDistance int outer 0 
   /declare AnchorX int outer ${Me.X} 
   /declare AnchorY int outer ${Me.Y} 
   /declare MyTargetName string outer 
   /declare MyTargetDead int outer 0 
   /declare InvalidTargetID int outer 0 
   /declare RandomWait int outer 0 
   /declare Fighting int outer 0 
   /declare TargetDead int outer 0 
   /declare Snared int outer 0 
   /declare MyXLOC int outer 0 
   /declare MyYLOC int outer 0 
   /declare Oktopull int outer 1 
   /declare Mobstoloot int outer 0 
   /call ReadINI HunterMob.ini "${Zone.Name}" Mob 
   /if (!${Defined[MobArray]}) { 
      /echo Mob Array Creation Error, ending macro... 
      /endmacro 
   } 
   /call ReadINI HunterLoot.ini "${Zone.Name}" Loot 
   /if (!${Defined[LootArray]}) { 
      /echo No Loot Array Created... 
   } 
   /cleanup 
   /fastdrop on 
   /lootn never 


|-------------------------------------------------------------------------------- 
|Code: Main Loop 
|-------------------------------------------------------------------------------- 

   :Start 
   /squelch /target clear 
   /doevents 
   /call CheckHP 
   /if (${Spawn[npc radius 100].ID}==0) /call CheckBuffs 
   /if (${Oktopull}>0&&${Int[${Me.PctHPs}]}>90) /call GetTarget 
   /call CheckAdds 
   /call CheckAnchor 
   /if (!${TargetID}) { 
      /call CheckBuffs 
      /call CheckHP 
      /call CheckMana 
   } 
   /goto :Start 
/return 

|-------------------------------------------------------------------------------- 
|Code: Aquire Target 
|-------------------------------------------------------------------------------- 
Sub GetTarget 
   /declare SpawnSub int local 
   /declare CheckSpawnSub int local 
   /declare IDArray[${MobArray.Size}] int local 
   /for SpawnSub 1 to ${MobArray.Size} 
      /varset IDArray[${SpawnSub}] ${NearestSpawn[npc radius ${MaxRadius} nopcnear "${MobArray[${SpawnSub}]}"].ID} 
   /next SpawnSub 
   /for CheckSpawnSub 1 to ${MobArray.Size} 
      /if (!${IDArray[${CheckSpawnSub}]}) /next CheckSpawnSub 
      /if (${TargetID}==0) /varset TargetID ${IDArray[${CheckSpawnSub}]} 
      /if ((${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].Distance}<${MaxRadius}) && (${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].DistanceZ}<${MaxZDistance})) { 
         /if (${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].Distance}<${Spawn[npc id ${TargetID}].Distance}) { 
            /varset TargetID ${IDArray[${CheckSpawnSub}]} 
         } 
      } 
   /next CheckSpawnSub 
   /if (${TargetID}!=0) { 
      /squelch /target npc id ${TargetID} 
      /call CombatSub 
   } 
/return 

|-------------------------------------------------------------------------------- 
|Code: Combat 
|-------------------------------------------------------------------------------- 
Sub CombatSub 
   /delay 1s 
   /stand 
   /echo Attacking ${Target.CleanName} NOW! 
   /varset Fighting 1 
   /varset TargetDead 0 
   /face nolook 
   /if (${SnareNPC}==1) /call Cast ${SnareSpell} ${SnareSpellGem} 
   :CombatStart 
   /if (${Int[${Target.Distance}]}>20) { 
      /delay 5 
      /doevents 
      /if (${Int[${Target.Distance}]}>40) /ranged 
      /goto :CombatStart 
   } 
   :CombatLoop 
   /squelch /target id ${TargetID} 
   /squelch /stick ${Range} 
   /squelch /attack on 
   /doevents 
   /if ((${Me.AbilityReady[Kick]}) && (${Me.State.NotEqual[STUNNED]})) /doability Kick 
   /if ((${Me.AbilityReady[Taunt]}) && (${Me.State.NotEqual[STUNNED]})) /doability Taunt 
   /call CheckHP 
   /if ((${Target.PctHPs}>30&&${Me.PctMana}>90) && (${Me.State.NotEqual[STUNNED]}) && (${NukeNPC}==1)) /call cast "${DDSpell}" gem2 
   /if ((${Snared}<1) && (${Spawn[npc id ${TargetID}].ID}!=NULL) && (${Me.State.NotEqual[STUNNED]}) && (${SnareNPC}==1)) /call Cast ${SnareSpell} ${SnareSpellGem} 
   /if (${Spawn[corpse id ${TargetID}].ID}!=NULL) { 
      /squelch /attack off 
      /squelch /target clear 
      /doevents 
      /varset Snared 0 
      /call CheckAdds 
      /varset TargetDead 1 
      /varset Fighting 0 
   } 

   /if (${Spawn[npc id ${TargetID}].ID}!=NULL) /goto :CombatLoop  
   /call ClearCorpses 
/return 


|-------------------------------------------------------------------------------- 
|Code: Check Buffs 
|-------------------------------------------------------------------------------- 
Sub CheckBuffs 
   /for BuffSub 1 to ${BuffSpells} 
      /if ((${Me.Buff[${BuffSpell${BuffSub}}].Duration}<30)&&(${BuffBlock[${BuffSub}]}!=1)) { 
         /target ${Me.Name} 
         /call Cast ${BuffSpellName${BuffSub}}  ${BuffSpellGem${BuffSub}} 
      } 
      /doevents 
   /next BuffSub 
   /varset BuffSub 1 
/return 

|-------------------------------------------------------------------------------- 
|Code: Check for Adds 
|-------------------------------------------------------------------------------- 
Sub CheckAdds 
   /squelch /target clear 
   /delay 2s 
   |No target. 
   /if (${Target.ID}==0) /return 

   |Target is NPC, but not TargetID and TargetID is still alive~ 
   /if ((${Target.Type.Equal[NPC]}) && (${Target.ID}!=${TargetID}) && (${Spawn[npc id ${TargetID}].ID}!=NULL)) { 
      /varset AddIDArray[${AddIDCounter}] ${Target.ID} 
      /varcalc AddIDCounter ${AddIDCounter}+1 
      /squelch /target ${TargetID} 
      /return 
   } 

   |No Target, but NPCs on list. 
   /if ((${AddCounter}<${AddIDCounter}) && (${Target.ID}==NULL)) { 
      /echo OMG KILLING ADDS111 
      /varset TargetID ${AddIDArray[${AddCounter}]} 
      /varset AddIDArray[${AddCounter}] 0 
      /varcalc AddCounter ${AddCounter}+1 
      /squelch /target ${TargetID} 
      /varset Fighting 1 
      /return 
   } 

   |Target NPC isn't my target... but I don't have one, kill it~ 
   /if ((${Target.Type.Equal[NPC]}) && (${Spawn[npc id ${TargetID}].ID}==0)) { 
      /varset TargetID ${Target.ID} 
      /squelch /target npc id ${TargetID} 
      /call CombatSub      
      /return 
   } 
/return 

|-------------------------------------------------------------------------------- 
|Code: HP/Mana Upkeep 
|-------------------------------------------------------------------------------- 

Sub CheckHP 
   |Do I need to heal during fight? 
   /if ((${Int[${Me.PctHPs}]}<${HPHealFight})&&${Fighting}) { 
      /call Heal 
   } 
   |Do I need to heal during downtime? 
   /if ((${Int[${Me.PctHPs}]}<${HPHealRest}) &&!${Fighting}) { 
      /call Heal 
      /squelch /target clear 
   } 
/return 

Sub CheckMana 
   |Enough Mana to pull? 
   /if (${Int[${Me.PctMana}]}<${ManaforPull}) { 
      /varset Oktopull 0 
   } 
   /if (${Int[${Me.PctMana}]}>${ManaforPull}) { 
      /varset Oktopull 1 
   } 
/return 

Sub Heal 
   /if ((${Me.Gem[${HealSpell}]})&&(${Me.SpellReady[${HealSpell}]})) { 
      /squelch /stick off 
      /squelch /attack off 
      /declare TempID int inner 0 
      /varset TempID ${Target.ID} 
      /target ${Me.Name} 
      /call cast "${HealSpell}" 
      /squelch /target id ${TempID} 
   } 
/return 

|-------------------------------------------------------------------------------- 
|Code: Looting 
|-------------------------------------------------------------------------------- 
Sub ClearCorpses 
   /declare CorpseSub int local 
   /for CorpseSub 1 to ${Mobstoloot} 
      /call LootMob  
   /next CorpseSub 
   /call ResetSub 
/return 

Sub LootMob 
   /declare LootSlot int inner 0 
   /declare LootCheck int inner 0 
   /declare LootTotal int inner 0 
   /declare LootLoop int local 0 
   :WaitLootMobWnd 
   /squelch /target corpse radius 100 
   /delay 5 
   /squelch /stick 
   /if (${Target.Type.Equal[CORPSE]}) /loot 
   /delay 5 
   /varcalc LootLoop ${LootLoop}+1 
   /if (${LootLoop}>3) /return 
   /if (!${Corpse}) /goto :WaitLootMobWnd 
   /if (!${Corpse.Items}) { 
      /echo NO LOOT! Cheap Bastard! 
      /notify LootWnd DoneButton leftmouseup 
      /delay 2 
      /return 
   } 
   /squelch /stick off 
   /varset LootTotal ${Corpse.Items} 
   /for LootSlot 1 to ${LootTotal} 
      /itemnotify loot${LootSlot} leftmouseup 
      /delay 1s 
      /for LootCheck 1 to ${LootArray.Size} 
         /if (${Cursor.Name.Find[${LootArray[${LootCheck}]}]}) { 
            /echo Keeping a ${Cursor.Name}... WOOT! 
            /varcalc LootStats[${LootCheck}] ${LootStats[${LootCheck}]}+1 
            /autoinventory 
            /delay 1s 
         } 
      /next LootCheck 
      /if (${Cursor.Value}>9000 && ${Cursor.Stackable}) { 
         /echo Keeping a ${Cursor.Name}... 
         /autoi 
         /delay 1s 
      }  
      /if (${Cursor.NoDrop}&&!${Cursor.Magic}) { 
         /echo Destroying a ${Cursor.Name}... 
         /des 
         /delay 1s 
      }  
      /if (${Cursor.NoDrop}&&${Cursor.WornSlots}<1) { 
         /echo Destroying a ${Cursor.Name}... 
         /des 
         /delay 1s 
      }  
      /if (${Cursor.ID}) { 
         /echo Dropping a ${Cursor.Name}... 
         /drop 
         /delay 1s 
      } 
   /next LootSlot 
   /notify LootWnd DoneButton leftmouseup 
/return 



|-------------------------------------------------------------------------------- 
|Code: Reset 
|-------------------------------------------------------------------------------- 
Sub ResetSub 
   /keypress esc 
   /keypress esc 
   /keypress esc 
   /keypress esc 

   /varset Mobstoloot 0 
   /varset AddIDCounter 1 
   /varset AddCounter 1 
   /varset TargetID 0 
   /varset TargetDead 0 
   /varset Fighting 0 
   /varset RandomWait ${Math.Rand[3]} 
   /varcalc RandomWait ${RandomWait}+1 
   /echo Paranoia - Waiting ${RandomWait} seconds before resuming 
   /delay ${RandomWait}s 
/return 

|-------------------------------------------------------------------------------- 
|Code: Reading from an INI File 
|-------------------------------------------------------------------------------- 
Sub ReadINI(FileName,SectionName,ArrayType) 
   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}... 
   /delay 1s 
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) { 
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro... 
      /delay 1s 
      /return 
   } 
   /declare nValues int local 1 
   /declare nArray int local 0 
   /declare KeySet string local ${Ini[${FileName},${SectionName}]} 
   :CounterLoop 
   /if (${String[${Ini[${FileName},${SectionName},${ArrayType}${nValues}]}].Equal[null]}) { 
      /varcalc nValues ${nValues}-1 
      /goto :MakeArray 
   } 
   /varcalc nValues ${nValues}+1 
   /goto :CounterLoop 
   :MakeArray 
   /if (!${nValues}) /return 
   /if (${FileName.Equal["HunterMob.ini"]}&&${nValues}>0) { 
      /echo Declaring Mob Array... 
      /declare MobArray[${nValues}] string outer 
      /declare MobStats[${nValues}] string outer 
   } 
   /if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) { 
      /echo Declaring Loot Array... 
      /declare LootArray[${nValues}] string outer 
      /declare LootStats[${nValues}] string outer 
   } 
   /for nArray 1 to ${nValues} 
      /if (${FileName.Equal["HunterMob.ini"]}) { 
         /varset MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset MobStats[${nArray}] 0 
      } 
      /if (${FileName.Equal["HunterLoot.ini"]}) { 
         /varset LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset LootStats[${nArray}] 0 
      } 
   /next nArray 
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
   /delay 1s 
/return 

|-------------------------------------------------------------------------------- 
|Code: Anchor 
|-------------------------------------------------------------------------------- 
Sub MoveToAnchor 
   /declare iCount int local 
   /varset iCount 0 
   /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 
   :AnchorMoveLoop 
   /delay 1 
   /doevents 
   /face fast nolook loc ${AnchorY},${AnchorX} 
   /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
      /keypress forward hold 
   } else { 
      /keypress forward 
      /face fast away nolook loc ${AnchorY},${AnchorX} 
      /return 
   } 
   /if (${iCount}>2) { 
      /call CheckObstacle 
      /face fast nolook loc ${AnchorY},${AnchorX} 
      /varset iCount 0 
   } 
   /varcalc iCount ${iCount}+1 
   /goto :AnchorMoveLoop 
/return 

Sub CheckAnchor 
   /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) /call MoveToAnchor 
/return 

|-------------------------------------------------------------------------------- 
|Code: Obstacle 
|-------------------------------------------------------------------------------- 
sub Obstacle 
   /keypress forward 
   /keypress back hold 
   /delay 3 
   /keypress back 
   /if (${Math.Rand[2]}) { 
      /keypress strafe_right hold 
      /delay 1 
      /keypress strafe_right 
   } else { 
      /keypress strafe_left hold 
      /delay 1 
      /keypress strafe_left 
   } 
   /keypress forward hold 
/return 

sub CheckObstacle 
   /varset MyXLOCA ${Me.X} 
   /varset MyYLOCA ${Me.Y} 
   /delay 2 
   /if (${MyXLOCA}==${Me.X} && ${MyYLOCA}==${Me.Y}) /call Obstacle 
/return 

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

|-------------------------------------------------------------------------------- 
|Code: Events 
|-------------------------------------------------------------------------------- 
Sub Event_SpellBlocked 
   /varset BuffBlock[${BuffSub}] 1 
   /echo Not buffing with ${BuffSpell${BuffSub}} 
/return 

Sub Event_Exp 
   /varset Snared 0 
   /varcalc Mobstoloot ${Mobstoloot}+1 
/return 

Sub Event_OORange 
   /call CheckObstacle 
/return 

Sub Event_OORLoot 
   /call CheckObstacle 
/return 

Sub Event_SnareLand 
   /varcalc Snared ${Snared}+1 
/return 

Sub Event_Dead 
   /exit 
/return
 
How about this one?

http://www.redguides.com/community/showthread.php?t=11082&highlight=hunter

Rich (BB code):
| Shadowknight Hunter Macro
| SKHunter.mac
| 
|      /macro SKHunter
|      This macro will run your character around killing any mobs in your
|      RV_MobArray.  Then it will attempt to loot all items in your
|      RV_LootArray.
|------------------------------------------------------------------------------------

#include spell_routines.inc
#turbo 10

#Event lom  "#*#LOM#*#"

Sub Main


   |------------------------------------------------------------
   |How many times should aquire target fail before delaying?
   |------------------------------------------------------------
   /declare RV_FailMax          int outer  3
   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  8000
   |------------------------------------------------------------
   |How far is the combat range?
   |------------------------------------------------------------
   /declare RV_Range            int outer 10
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MinZRange        int outer  -1000
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MaxZRange        int outer  1000
   |------------------------------------------------------------
   |Should I loot all items?
   |------------------------------------------------------------
   /declare RV_LootAllItems     int outer  0
   |------------------------------------------------------------
   |Should I display stats?
   |------------------------------------------------------------
   /declare RV_DisplayStats     int outer  1

   |------------------------------------------------------------
   |Loot Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterMob.ini "${Zone.Name}" Mob
   /if (!${Defined[RV_MobArray]}) {
      /echo Mob Array Creation Error, ending macro...
      /endmacro
   }

   |------------------------------------------------------------
   |Mob Array Information.
   |------------------------------------------------------------
   /call ReadINI HunterLoot.ini "${Zone.Name}" Loot
   /if (!${Defined[RV_LootArray]}) {
      /echo No Loot Array Created...
   }

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_FailCounter      int outer  0
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   /declare Oktopull            int outer  1
   /declare RV_FastRange        int outer
   /declare RV_RangeMax         int outer
   /declare RV_RangeMin         int outer
   /varcalc RV_FastRange ${RV_Range}+3
   /varcalc RV_RangeMax ${RV_Range}+1
   /varcalc RV_RangeMin ${RV_Range}-1

   :Start
   /doevents
   /call GMCheck
   /call CheckBuffs
   /if (${Oktopull}>0&&${Int[${Me.PctHPs}]}>70) /call GetTarget


   :KillAdds
   /if (${RV_HasTarget}) /call MoveToMob
   /if (${RV_HasTarget}) /call CombatSub
   /if (${RV_HasTarget}) /call MoveToMob
   /if (${RV_HasTarget} && (${Defined[RV_LootArray]} || ${RV_LootAllItems})) /call LootMob
   /if (${RV_DisplayStats}) /call DisplayStats
   /call ResetSub

   /varset RV_RandomWait ${Math.Rand[30]}
   /varcalc RV_RandomWait ${RV_RandomWait}+1
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming
   /doability 5
   /delay ${RV_RandomWait}s
   
   /if (${Target.ID}) {
      /echo Looks like something is attacking us, killing it...
      /delay 1s
      /varset RV_HasTarget 1
      /varset RV_Fighting 1
      /goto :KillAdds
   }
   
   /goto :Start
   
/return

|--------------------------------------------------------------------------------
|Code: Check Buffs
|--------------------------------------------------------------------------------
Sub CheckBuffs

   /if (${Me.Buff[Shroud of Discord].Duration}<30) /call Cast "Shroud of Discord" gem4
   /if (${Me.Buff[Bobbing Corpse].Duration}<30) /call Cast "Bobbing Corpse" gem5
   /if (${Me.Buff[Cloak of Discord].Duration}<30) /call Cast "Cloak of Discord" gem7
   /if (${Me.Buff[Cloak of Shadows].Duration}<30) /call Cast "Cloak of Shadows" alt
|   /if (${Pet.Buff[Strengthen Death].Duration}<30) /call Cast "Strengthen Death" gem3
/return

|--------------------------------------------------------------------------------
|SUB: Aquire Target
|--------------------------------------------------------------------------------
Sub GetTarget

   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub   int local
   :Acquire
   /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 100
      /for RV_TargetSub 1 to ${RV_MobArray.Size}
         /squelch /target radius ${RV_CurrentRadius} nopcnear notid ${RV_InvalidTargetID} npc "${RV_MobArray[${RV_TargetSub}]}"
         /varset RV_MyTargetID ${Target.ID}
         /varset RV_MyTargetDead 0
         /if (${Target.ID}) {
            /if (${Int[${Target.PctHPs}]}<100) {
               /echo Mob NOT a Full Health, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
               /echo Mob is BELOW Min Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
               /echo Mob is ABOVE Max Z Range, picking another...
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
               /goto :Acquire
            }
            /varset RV_HasTarget 1
            /varset RV_MyTargetName ${Target.CleanName}
            /echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
            /return
         }
      /next RV_TargetSub
      /delay 2
   /next RV_CurrentRadius

   /if (!${Target.ID}) {
      /delay 2s
      /varcalc RV_FailCounter ${RV_FailCounter}+1
      /echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s)
      /if (${RV_FailCounter}>=${RV_FailMax}) {
         /echo Waiting for Respawns, Resetting Failure Counter...
         /delay 60s
         /varset RV_FailCounter 0
      }
      /goto :Acquire
   }
/return

|--------------------------------------------------------------------------------
|SUB: Moving
|--------------------------------------------------------------------------------
Sub MoveToMob

   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /declare RV_DistanceTimer timer 15
   
   /doevents
   
   :MovementLoop

   /if ((!${RV_Fighting})&&(!${RV_TargetDead})&&(${Target.PctHPs}<100)) {
      /echo Mob not at full health, picking another...
      /varset RV_InvalidTargetID ${Target.ID}
      /varset RV_HasTarget 0
      /call ResetSub
      /return
   }

   /if (${Target.ID}) {
      /face fast
   }
   /if (${Int[${Target.Distance}]}>${RV_FastRange}) {
      /keypress forward hold
   }
   /if (${Int[${Target.Distance}]}<${RV_FastRange}&&${Int[${Target.Distance}]}>${RV_RangeMax}) {
      /keypress forward
   }
   /if (${Int[${Target.Distance}]}<${RV_RangeMin}) {
      /keypress back
   }
   /if (!${RV_DistanceTimer}) {
      /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
      /varset RV_MyXLOC ${Int[${Me.X}]}
      /varset RV_MyYLOC ${Int[${Me.Y}]}
      /varset RV_DistanceTimer 15
      /goto :Movementloop
   }
   /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop

/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub

   /echo Attacking Mob NOW!
   /gsay incoming
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   
   :CombatLoop
   /doevents
   /attack on
   
   /call MoveToMob
   /call SpecialIT

   /if (!${Target.ID}) {
      /attack off
      /keypress forward
      /keypress back
     
      /varset RV_TargetDead 1
      /varset RV_Fighting 0
      /delay 1s
      /target radius 30 corpse
      /delay 1s
      /if (!${Target.ID}) {
         /call ResetSub
         /return
      }
      /face fast
   }
   /if (!${RV_TargetDead}) {
      /goto :CombatLoop
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Special Combat
|--------------------------------------------------------------------------------
Sub SpecialIt

   /declare TempID    int inner  0

   /if ((${Target.Distance}<11)&&(${Me.AbilityReady["Bash"]})) /doability "Bash"

   /if ((${Target.Distance}<11)&&(${Me.AbilityReady["Taunt"]})) /doability "Taunt"
   
   /if ((${Int[${Me.PctHPs}]}<30)&&(${Me.Gem["Feign Death"]})&&(${Me.SpellReady["Feign Death"]})) {
      /varset TempID ${Target.ID}
      /keypress forward
      /keypress back
      /keypress F1
      /echo Playing dead because of low health...cleric should GATE!
      /gsay Playing dead because of low health...cleric should GATE!
      /call cast "Feign Death" gem8
      /delay 3s
      /target id ${TempID}
   }

/return

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob

   /declare LootSlot    int inner  0
   /declare LootCheck   int inner  0
   /declare LootTotal   int inner  0
   
   /face fast
   
   /keypress forward
   /keypress back
   
   /fastdrop on
   /lootn never
   /delay 2s
   /loot
   /delay 2s
   /if (!${Corpse.Items}) {
      /echo NO LOOT! Cheap Bastard!
      /return
   }

   /varset LootTotal ${Corpse.Items}
   /for LootSlot 1 to ${LootTotal}
      /itemnotify loot${LootSlot} leftmouseup
      /delay 1s
      /if (${RV_LootAllItems}) {
         /echo Keeping a ${Cursor.Name}... WOOT!
         /autoinventory
         /delay 1s
      } else {
         /for LootCheck 1 to ${RV_LootArray.Size}
            /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) {
               /echo Keeping a ${Cursor.Name}... WOOT!
               /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1
               /autoinventory
               /delay 1s
            }
         /next LootCheck
      }
      /if (${Cursor.ID}) {
         /echo Destroying a ${Cursor.Name}...
         /destroy
         /delay 1s
      }
   /next LootSlot
   
   /notify LootWnd DoneButton leftmouseup
   /delay 2
   
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub

   /keypress esc
   /keypress esc
   /keypress esc
   /keypress esc
   
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
   
/return

|--------------------------------------------------------------------------------
|SUB: Obstacle Avoidance
|--------------------------------------------------------------------------------
Sub HitObstacle

   /echo Obstacle hit, 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
   /warp target
   
/return

|--------------------------------------------------------------------------------
|SUB: GM Check
|--------------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
     
      /echo GM has entered the zone!
      /echo FUCK HIM but ending the macro...

      /keypress forward
      /keypress back

      /quit
      /endmacro
   }
   
/return

|--------------------------------------------------------------------------------
|SUB: Reading from an INI File
|--------------------------------------------------------------------------------
Sub ReadINI(FileName,SectionName,ArrayType)

   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}...
   /delay 1s
   
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) {
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro...
      /delay 1s
      /return
   }
   /declare nValues     int local  1
   /declare nArray      int local  0
   /declare KeySet      string local  ${Ini[${FileName},${SectionName}]}

   :CounterLoop
   /if (!${KeySet.Arg[${nValues},|].Length}) {
      /varcalc nValues ${nValues}-1
      /goto :MakeArray
   }
   /varcalc nValues ${nValues}+1
   /goto :CounterLoop 

   :MakeArray
   /if (!${nValues}) /return
   /if (${FileName.Equal["HunterMob.ini"]}&&${nValues}>0) {
      /echo Declaring Mob Array...
      /declare RV_MobArray[${nValues}]   string outer
      /declare RV_MobStats[${nValues}]   string outer
   }
   /if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) {
      /echo Declaring Loot Array...
      /declare RV_LootArray[${nValues}]  string outer
      /declare RV_LootStats[${nValues}]  string outer
   }
   /for nArray 1 to ${nValues}
      /if (${FileName.Equal["HunterMob.ini"]}) {
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_MobStats[${nArray}] 0
      }
      /if (${FileName.Equal["HunterLoot.ini"]}) {
         /varset RV_LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]}
         /varset RV_LootStats[${nArray}] 0
      }
   /next nArray
   
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}...
   /delay 1s
   
/return

|--------------------------------------------------------------------------------
|SUB: Display Stats
|--------------------------------------------------------------------------------
Sub DisplayStats

   /declare nArray  int local
   
   /if (${Defined[RV_LootArray]}) {
      /for nArray 1 to ${RV_LootArray.Size}
         /echo ${Int[${RV_LootStats[${nArray}]}]} ${RV_LootArray[${nArray}]}'s
      /next nArray
   }
   
/return

Sub event_lom
     /mqpause
     /delay 5m
     /mqpause
/return

Huntermob.ini
Rich (BB code):
[Eastern Plains of Karana]
Mob1=Spider
Mob2=Lion
Mob3=Griffawn

[East Commonlands]
Mob1=a black bear
Mob2=Spiderling

[The Feerrott]
Mob1=Spider 

[The Western Plains of Karana]
Mob1=Spiderling

[Toxxulia Forest]
Mob1=a large widow
Mob2=a large wood spider
Mob3=a spiderling
Mob4=a widow hatchling

[West Commonlands]
Mob1=black bear
Mob2=young kodiak
Mob3=kodiak
Mob4=grizzly bear
Mob5=spiderling

[Kithicor Woods]
Mob1=black bear
Mob2=young kodiak
Mob3=grizzly bear
Mob4=spiderling

[Marus Seru]
Mob1=a Greyhopper

[The Scarlet Desert]
Mob1=a fierce rockhopper
Mob2=a frenzied rockhopper
Mob3=a powerful rockhopper
Mob4=A Savage Rockhopper
Mob5=a scarlet rockhopper

[Shadeweaver's Thicket]
Mob1=A Needle Clawed Hopper
Mob2=A Saurek Darkclaw
Mob3=A Saurek Deathmaw

[Natimbi, The Broken Shores]
Mob1=a reef crustacean
Mob2=a hynid fleshripper
Mob3=a shore stonemite
Hunterloot.ini
Rich (BB code):
[Eastern Plains of Karana]
Loot1=Silk
Loot2=High Quality
Loot3=Medium Quality
Loot4=Feather

[East Commonlands]
Loot1=Spiderling Silk
Loot2=Low Quality Bear Skin
Loot3=Medium Quality Bear Skin
Loot4=high Quality Bear Skin

[The Feerrott]
Loot1=Spiderling Silk 

[The Western Plains of Karana]
Loot1=Spiderling Silk

[Toxxulia Forest]
Loot1=Spiderling Silk
Loot2=Spider Silk

[West Commonlands]
Loot1=Low Quality Bear Skin
Loot2=Siderling Silk
Loot3=Medium Quality Bear Skin
Loot4=high Quality Bear Skin

[Kithicor Woods]
Loot1=Low Quality Bear Skin
Loot2=Siderling Silk
Loot3=Medium Quality Bear Skin
Loot4=high Quality Bear Skin
Loot5=Thick Grizzly Bear Skin

[Marus Seru]
Loot1=Low Quality Rockhopper Hide
Loot2=Medium Quality Rockhopper Hide
Loot3=High Quality Rockhopper Hide

[The Scarlet Desert]
Loot1=Low Quality Rockhopper Hide
Loot2=Medium Quality Rockhopper Hide
Loot3=High Quality Rockhopper Hide

[Shadeweaver's Thicket]
Loot1=Low Quality Rockhopper Hide
Loot2=Medium Quality Rockhopper Hide
Loot3=High Quality Rockhopper Hide

[Natimbi, the Broken Shores]
Loot1=Aligned Ore

It's worked for me... just enter in what zones youll be using it in, what mobs youll be hunting and what you want to loot
 
Any hunter macs?

Users who are viewing this thread

Back
Top