• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Help changing hunters.mac.. (Monk Macro) (1 Viewer)

hamburgerhelper

New member
Joined
Jan 22, 2005
RedCents
161¢
Ok, I imagine this will be simple, but why I wait for my downloads to end I was wondering if you could do a simple change in that macro to make it kill hill giants in rathe mountians.. I figure that it is an easy way to make some cash while I sleep..

Any help is greatly appreciated.. the less work for me the more grateful, hehe
 
Re: Help changing hunters.mac..

Ok, now I have no idea what to do now :(.. I am in the Hunter.mac and I am trying to customize it to fit me, a monk..

What I would like it to do is when I am low on health I can press one of my hot buttons "mend" to bring it up, and when I get below 30% Feign Death till 100% then Stand.

Also would like to click epic before each fight....

I feel as though I am over my head and I cannot find a simple fix. If anyone has some code I can just copy paste right in that would be GREAT!! Or a simple list of these macro commands would set me on my way as well.
 
Re: Help changing hunters.mac..

like this?

Rich (BB code):
| MonkHunter Macro 
| MonkHunter.mac 
| Author      : robdawg 
| Edit        : Chill, Fallon 
| Version     : v1.2monk 12/26/2004 
| Useage      : /macro Hunter 
| Description : 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.  This is definitely a work in progress and I am sure 
|      someone can think of plenty of upgrades for this. 
| Monk Updates: Added auto-mend & FD, Eppic clicky, ornate & other clickies for self buffing 
       Update your non-ornate pants & BP names as needed. 
|------------------------------------------------------------------------------------ 

#turbo 10 
#Include SpellCast.inc 
#Include Swap.inc 

Sub Main 

   |------------------------------------------------------------ 
   |Monk stuff, set the haste gloves to Celsestial Fists, or Gauntlets of Enlightenment 
   |------------------------------------------------------------ 
   /declare MF_HasteGloves      string outer 
   /varset MF_HasteGloves Celestial Fists 
   |------------------------------------------------------------ 
   |Monk stuff, Hit Point Percentages to Mend and FD at 
   |------------------------------------------------------------ 
   /declare HP_FD      int outer 35 
   /declare HP_Mend      int outer 65 
   |------------------------------------------------------------ 
   |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  3000 
   |------------------------------------------------------------ 
   |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 
   |------------------------------------------------------------ 
   |Generic Counter Variable 
   |------------------------------------------------------------ 
   /declare c int outer 0 

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

   /fastdrop on 
   /lootn never 

   :Start 
   /doevents 
   /call GMCheck 
   /call BuffCheck 
   /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[5]} 
   /varcalc RV_RandomWait ${RV_RandomWait}+1 
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming 
   /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 

|-------------------------------------------------------------------------------- 
|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! 
   /varset RV_Fighting 1 
   /varset RV_TargetDead 0 
  
   :CombatLoop 
   /doevents 
|If your a monk clap your hands... or at least click your haste gloves 
   /if (${MF_HasteGloves.Equal[${Me.Inventory[hands]}]} && !${Me.Buff["Celestial Tranquility"].Duration}) /cast item "${MF_HasteGloves}" 

   /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["Flying Kick"]})) /doability "Flying Kick" 

   /if ((${Int[${Me.PctHPs}]}<${HP_Mend})&&(${Me.AbilityReady["Mend"]})) { 
      /echo HP under ${HP_Mend}%! Mending at ${Me.PctHPs} health... 
      /doability "Mend" 
   } 

   /if ((${Int[${Me.PctHPs}]}<${HP_FD})&&(${Me.AbilityReady["Feign Death"]})) { 
      /echo Health under ${HP_FD}%! Getting my ass kicked, time to FD! 
      /doability "Feign Death" 
      /beep 
      /beep 
      /beep 
      /endmacro 
   } 

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

      /doability "Feign Death" 
      /afk 
      /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 (${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 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: Buff Check - Monk Specific, but can be edited for other classes 
|-------------------------------------------------------------------------------- 
Sub BuffCheck 

  /if (!${Me.Standing} && !${Me.Mount.ID}>0) /stand 
  /if (${Me.Moving}) { 
    /keypress forward 
    /keypress back 
    /delay 5 
  } 

  /if (${Me.Buff["Frostreaver's Blessing"].Duration} !> ${MF_BuffTicks}) { 
    /echo Need the dorf stuff 
    /call swap "Clicky:Ring of Dain Frostreaver IV" 
   } 

  /for c 1 to 15 
    /if (${Me.Buff[${c}].Name.Find["boar"]} || ${Me.Buff[${c}].Name.Find["bear"]} || ${Me.Buff[${c}].Name.Find["stamina"]}) /goto :nosta 
  /next c 
  /if (${Me.Buff["Health"].Duration} !> ${MF_BuffTicks}) { 
    /target myself 
    /delay 1 
    /echo topping off stamina buffage 
    /call swap "swap:Flayed Barbarian Skin Leggings=Leggings of Enlightenment|clicky:Leggings of Enlightenment|swap:Leggings of Enlightenment=Flayed Barbarian Skin Leggings" 
    /delay 1 
    /target clear 
  } 
  :nosta 

  /for c 1 to 15 
  /if (${Me.Buff["Shield of the Arcane"].Duration} !> ${MF_BuffTicks}) { /call swap "swap:Vest of the Serpent=Chestwraps of Enlightenment|clicky:chest|swap:Chestwraps of 

Enlightenment=Vest of the Serpent" 
  /echo Wish I had focus, but this will have to do 
  /delay 1 
  } 
  :focused 

/return


You also need this:

swap.inc

Rich (BB code):
|** Swap.mac Version 2. by: Preocts   Updated Last: 05/15/2004 
        As a summer project to help me learn C++ I am currently creating 
        a plugin that will completely replace this macro and more. I am 
        thinking this will eliminate the ini functions of the operation. In 
        replacement /commands will be able to be used in macros for complex 
        or multi-staged swaps. Everything is up in the air at this point 
        because I still get headaches trying to learn Pointers. ::sigh:: 
        As my knowledge of C++ increases I hope to be able to contribute 
        to the advancement of the MacroQuest project. 

Introduction: 
  A much much much evolved version of my old switch.mac that I wrote about 
  a month ago. This one is VERY flexible in what you can do. Ini or param 
  driven commands. You can also store ini commands in-game. Does not open 
  your inventory window but will open packs as needed. Resets your packs 
  after macro is done so if you had 'that' one open it will remain open. 

  I use this most heavily on my bard, allowing me to swap instruments out 
  with a push of a hotkey. Wrote in a clicky command for my rogue who always 
  seemed to lose her buff gear in her packs! ((cronic packrat)) 

  This is written to be modular and expanded. Almost all the subs handle one 
  aspect of the 'switch' so adding this to your existing macros as an include 
  should be almost painless. 

Making an Include File: (or using parts of this macro) 
  There are 7 subs below that can be pulled out of this entire macro and 
  used inside your own macros for the manipulation of items and slots. 
  The two rightclick subs will wait for any casting items to finsih before 
  releasing control back to where they were called 
     1) Sub LeftClickItem(ItemName) &lt;------ Searches, finds, left clicks 
     2) Sub LeftClickSlot(Slot) &lt;---------- Left clicks any slot name or num 
     3) Sub LeftClickPackSlot(Pack,Slot) &lt;- Opens bags, then left clicks 
     4) Sub RightClickItem(ItemName) &lt;----- For those rightclick items 
     5) Sub RightClickSlot(Slot) &lt;--------- Same, but with slotnames 
    *6) Sub OpenPack(Pack) &lt;--------------- Needed for 1, and 3 
    *7) Sub DisplayError(sInput) &lt;--------- Needed for ALL the above. 
  The parameters they need are self explaining. If you want to use them just 
  copy them and the following two subs to you macro file or an include. 
  *These are standalones but required if you use 1-5 

Some important notes: 
+ If the item is stacked the ENTIRE stack is picked up. 
+ Be cool. "Enclose your commandline in quotes" 
+ Options are explicit. If it tells you [ItemName]&gt;[SlotName/CustomName] then 
  that is what you MUST give it. IN THAT ORDER! 
+ All commands must be separated by | when entering mulitple actions. The 
  expection are IF commands. They use /. Mixing will cause problems. 
+ No command will check Cursor Status before executing. Assumed Empty! 
  This means you need to think your logic out. If move an item to your neck 
  slot and then move an item to your mainhand, be sure you did something with 
  the item that 'was' in your neck slot before you began. 
+ Clicky Commands for items inside packs are pointless and will do nothing. 
+ bouncy bouncy bouncy bouncy boun- damnit 
+ HolyShit! Did I just add IF statements? Why yes! Yes I did. 

+ VERY VERY IMPORTANT INOFRMATION: 
  The newest installment of this macro includes rewritten command handling. 
  What does this mean to you? Well, you now have no limits as to how you 
  do commands. You can call CommandSet@s from CommandSet@s, inside IFs, and 
  'nest' them as deeply as MQ2 can handle. THE MAJOR FACTOR HERE IS: 
  You now run the change of creating an infinite loop. In non-programming 
  terms this means you can cause this macro to keep running forever with no 
  end. There is an example of this at the end of the comments section. 
  (although I haven't tested it, I'm sure you still CANNOT nest ifs. Sorry) 

Commands: 

+ "Swap:[ItemName/SlotName/CustomName]=[ItemName/SlotName/CustomName]" 
   Puts the first item you give it where the second is and puts the second 
   where the first was. 

+ "MoveTo:[ItemName]&gt;[SlotName/CustomName]" 
   Moves Item to Slot 

+ "PickUp:[ItemName/SlotName/CustomName]" 
   Places Item onto cursor (More literally, preforms a leftmouseup on []) 

+ "Clicky:[ItemName/SlotName]" 
   Rightclicks Item/Slot. Waits for Cast. 

+ "Empty" 
   Smart Empty of Cursor. Fails on full Inv. 

+ "IfOn?ItemName?TrueAction/?FalseAction/?" 
   If ItemName is on the cursor, preform TrueAction. Else, preform FalseAction 
   Ending ? is required or you risk errors. 
   Actions can contain more than one command. Divider inside Ifs is / not |. 
   Neither True or False actions are required. ?-1? will skip that action 

+ "IfIn?ItemName:SlotName?TrueAction/?FalseAction/?" 
   If ItemName is in SlotName then do TrueAction, else do FalseAction. 
   Ending ? is required or you risk errors. CANNOT CHECK INSIDE PACKS. 
   Actions can contain more than one command. Divider inside Ifs is / not |. 
   Neither True or False actions are required. ?-1? will skip that action 
    
+  "KeyName$Commands" 
    Writes Commands to KeyName in the INI file. Does not run Commands. 

Options: 
  [ItemName] are full item names only. No partial names will be found. 
  [SlotName] The following list are valid slot names: 
    mainhand offhand ranged charm leftear rightear leftwrist rightwrist arms 
    head neck face shoulder chest legs waist rightfinger leftfinger feet ammo 
    back pack1 pack2 pack3 pack4 pack5 pack6 pack7 pack8 
    (Slot Numbers will work as long as they are not located inside a pack) 
  [CustomName] may be used to identify a slot inside a pack. Format: 
    pack1!2     Slot 2 in Pack1 
    pack5!4     Slot 4 in Pack5 
    (Forces the macro to make sure that pack is open) 

Using Swap.Mac: 
  Something to always remember: Swap.Mac does not care what is on the cursor 
  when it runs a command. That's why I made Ifs. 

  /macro swap "Swap:Foraging Machette=Scimitar of the Emerald Dawn" 
    Swaps the two items between their current slots. 

  /macro swap "MoveTo:Fisherman's Companion&gt;Pack8!3" 
    Moves Companion to pack8, slot three. Note: if anything was there it is 
    now on the cursor. 

  /macro swap "pickup:arms" 
    Leftclicks the arms slot. 

  /macro swap "Clicky:LeftEar" 
    This rightclicks your left ear piece. 

  /macro swap "Moveto:Shrunken Goblin Skull Earring&gt;LeftEar|Clicky:LeftEar|Pickup:LeftEar|Empty" 
    Moves your SGSE to your ear slot (whatever was there in on cursor) 
    Clicks the slot, casting the self-buff 
    Picks up the SGSE(leftear) which places whatever was there back there. 
    Empty the Cursor. 

  /macro swap "EarBuff$Moveto:Shrunken Goblin Skull Earring&gt;LeftEar|Clicky:LeftEar|Pickup:LeftEar|Empty" 
    Writes the command to ini. DOES NOT RUN COMMANDS 
    Ini would then contain: 
      EarBuff=Moveto:Shrunken Goblin Skull Earring&gt;LeftEar|Clicky:LeftEar|Pickup:LeftEar|Empty 

  /macro swap "EarBuff@"   &lt;------- MUST end with @ to pull from ini. 
    The same thing as: 
  /macro swap "Moveto:Shrunken Goblin Skull Earring&gt;LeftEar|Clicky:LeftEar|Pickup:LeftEar|Empty" 

  /macro swap "IfOn?Foraging Machette?pickup:MainHand/Empty?-1?" 
    If your foraging Machette is on the cursor, place it in the MainHand 
    slot and empty cursor. 

  /macro swap "IfIn?Shrunken Goblin Skull Earring:LeftEar?clicky:LeftEar?EarBuff@? 
    If the SGKE is in the leftear click it. 
    Otherwise, do a bunch of commands to put the earring in the LeftEar 
    slot and click it. 

Rules about IFs 
  1) Thou shalt not ever nest IFs. 
  2) Thou shalt not ever use | in IFs. Thou shall use / instead. 

Ini File: 
  Default Ini Filename: Swapper.ini 

  Example: 
    [SwapCommands] 
    Drums=Swap:OffHand=Mistmoore Battle Drums| 
    Lute=Swap:OffHand=Lute| 
    Fight=PickUp:OffHand|MoveTo:Symphonic Saber&gt;MainHand|MoveTo:Battle Drummers Main Gauche&gt;OffHand| 
    Kite=PickUp:MainHand|MoveTo:Mistmoore Battle Drums&gt;OffHand|Empty| 
    EarBuff=Moveto:Shrunken Goblin Skull Earring&gt;LeftEar|Clicky:LeftEar|Pickup:LeftEar|Empty 

Examples of things you can now do: 
  [SwapCommands] 
  Wow=Drums@|Lute@|EarBuff@ 
  /macro swap "Wow@" 
  /macro swap "ifin?Mistmoore Battle Drums:offhand?Lute@?Drums@?" 

Never End Loop: (really simple "duh!" kind of example) 
  [SwapCommands] 
  Set1=bunchofcommandshere|Swap2@ 
  Set2=bunchmorecommandshere|Swap1@ 

  /macro swap Swap1@ 

  THIS WILL NEVER STOP! Set1 calls Set2 which calls Set1 again, on and on. 
**| 

#define IniFileName Swapper.ini 

Sub Swap(sInput) 
  /if (!${Defined[sInput]}) /call DisplayError "SwitchMain;No Parameter Defined" 
  /if (${sInput.Right[1].NotEqual[|]}) /varset sInput ${sInput}| 

|  /declare GlobalTimerOut timer outer 0 
  /declare nCount int local 
  /declare InvState[8] int local 

  /if (${sInput.Find[$]}) { 
    /ini "IniFileName" "SwapCommands" "${sInput.Arg[1,$]}" "${sInput.Arg[2,$]}" 
    /echo Written to IniFileName: 
    /echo ${sInput.Arg[1,$]}=${sInput.Arg[2,$]} 
    /return 
  } 

  /for nCount 1 to 8 
    /if (${Window[Pack${nCount}].Open}) { 
      /varset InvState[${nCount}] 0 
    } else { 
      /varset InvState[${nCount}] 1 
    } 
  /next nCount 

  /call Parser "${sInput}" 

  /for nCount 1 to 8 
    /if (${Window[Pack${nCount}].Open} && ${InvState[${nCount}]}) /itemnotify Pack${nCount} rightmouseup 
    /delay 1 
  /next nCount 

/return 

Sub Parser(sInput) 
  /if (!${Defined[sInput]}) /call DisplayError "Parser;No Parameter Defined" 
  /if (${sInput.Right[1].NotEqual[|]}) /varset sInput ${sInput}| 

  /declare CommandSet string local 
  /declare nCount int local 1 

  :ParserLoop 
    /if (${sInput.Arg[${nCount},|].Find[@]}) { 
      /varset CommandSet ${Ini[IniFileName,SwapCommands,${sInput.Arg[${nCount},|].Arg[1,@]},NOTFOUND]} 
      /if (${CommandSet.Equal[NOTFOUND]}) /call DisplayError "Main;Swapset ${sInput.Arg[${nCount},|].Arg[1,@]} not found" 
      /call Parser "${CommandSet}" 
    } else { 
      /call HandleCommand "${sInput.Arg[${nCount},|]}" 
    } 
    /varcalc nCount ${nCount}+1 
  /if (${sInput.Arg[${nCount},|].Length}) /goto :ParserLoop 
/return 

Sub IfCommandSet(sInput) 
|This does absolutly nothing with the commands given. It only changes 
|all the /s to |s for the main parser. 
  /if (!${Defined[sInput]}) /call DisplayError "IfCommandSet;No parameter given" 
  /if (${sInput.Equal[-1]}) /return 
  /declare nStep int local 1 
  /declare sStep string local 

  /for nStep 1 to ${sInput.Length} 
    /if (${sInput.Mid[${nStep},1].Equal[/]}) { 
      /varset sStep ${sStep}| 
    } else { 
      /varset sStep ${sStep}${sInput.Mid[${nStep},1]} 
    } 
  /next nStep 
  /call Parser "${sStep}" 
/return 

Sub HandleCommand(sInput) 
  /if (!${Defined[sInput]}) /call DisplayError "HandleCommand;No Parameter Defined 

|IfOn: IF statement directly checks the cursor.name and compares. Pulls the 
|resulting command out of sInput and parses them separetly. 
  /if (${sInput.Arg[1,?].Equal[IfOn]}) { 
    /if (${Cursor.Name.Equal[${sInput.Arg[2,?]}]}) { 
      /call IfCommandSet "${sInput.Arg[3,?]}" 
    } else { 
      /call IfCommandSet "${sInput.Arg[4,?]}" 
    } 
  } 

|IfIn: If statement checks for the presents of an item in a slot. Pulls the 
|resulting command out of sInput and parses them separetly. ITEM BEFORE SLOT 
  /if (${sInput.Arg[1,?].Equal[IfIn]}) { 
    /if (${sInput.Arg[2,?].Arg[2,:].Find[!]}) /varset ${sInput} 
    /if (${InvSlot[${sInput.Arg[2,?].Arg[2,:]}].Item.Name.Equal[${sInput.Arg[2,?].Arg[1,:]}]}) { 
      /call IfCommandSet "${sInput.Arg[3,?]}" 
    } else { 
      /call IfCommandSet "${sInput.Arg[4,?]}" 
    } 
  } 

|Swap: Most complex since both params can be any of the three types. Determine 
|what type the param is, send a leftclick command, then do the same for the 
|next param. In the end send a leftclick command to the slot used in the first 
|param. Follow? 
  /if (${sInput.Arg[1,:].Equal[Swap]}) { 
    /varset sInput ${sInput.Arg[2,:]} 
    /declare Param1 string local ${sInput.Arg[1,=]} 
    /declare Param2 string local ${sInput.Arg[2,=]} 
    /declare SlotUsed int local 
    /if (${Param1.Find[!]}) { 
      /call LeftClickPackSlot ${Param1.Arg[1,!]} ${Param1.Arg[2,!]} 
    } else { 
      /call ValidSlot ${Param1} 
      /if (${Macro.Return.Equal[true]}) { 
        /call LeftClickSlot "${Param1}" 
        /varset SlotUsed ${InvSlot[${Param1}].ID} 
      } else { 
        /call LeftClickItem "${Param1}" 
        /varset SlotUsed ${Macro.Return} 
      } 
    } 
    /if (${Param2.Find[!]}) { 
      /call LeftClickPackSlot ${Param2.Arg[1,!]} ${Param2.Arg[2,!]} 
    } else { 
      /call ValidSlot ${Param2} 
      /if (${Macro.Return.Equal[true]}) { 
        /call LeftClickSlot "${Param2}" 
      } else { 
        /call LeftClickItem "${Param2}" 
      } 
    } 
    /call LeftClickSlot ${SlotUsed} 
  } 

|MoveTo: Pickup the item and move it to the slot. Nothing is done to the 
|cursor after this point. i.e. If the slot had an item in it that item is now 
|on the cursor. 
  /if (${sInput.Arg[1,:].Equal[Moveto]}) { 
    /varset sInput ${sInput.Arg[2,:]} 
    /call LeftClickItem "${sInput.Arg[1,&gt;]}" 
    /varset sInput ${sInput.Arg[2,&gt;]} 
    /if (${sInput.Find[!]}) { 
      /call LeftClickPackSlot ${sInput.Arg[1,!]} ${sInput.Arg[2,!]} 
    } else { 
      /call LeftClickSlot "${sInput}" 
    } 
  } 

|PickUp: Determine whether the param given is a slot/packslot/or item then 
|send the proper leftclick command. Does not concider any items already on 
|the cursor. 
  /if (${sInput.Arg[1,:].Equal[PickUp]}) { 
    /varset sInput ${sInput.Arg[2,:]} 
    /if (${sInput.Find[!]}) { 
      /call LeftClickPackSlot ${sInput.Arg[1,!]} ${sInput.Arg[2,!]} 
    } else { 
      /call ValidSlot ${sInput} 
      /if (${Macro.Return.Equal[true]}) { 
        /call LeftClickSlot "${sInput}" 
      } else { 
        /call LeftClickItem "${sInput}" 
      } 
    } 
  } 

|Clicky: Determine whether the param given is a slot or item. Send a click 
|command to that slot/item. Very simple. 
  /if (${sInput.Arg[1,:].Equal[Clicky]}) { 
    /varset sInput ${sInput.Arg[2,:]} 
    /call ValidSlot ${sInput} 
    /if (${Macro.Return.Equal[true]}) { 
      /call RightClickSlot "${sInput}" 
    } else { 
      /call RightClickItem "${sInput}" 
    } 
  } 

|Empty: Easiest of all. Empty the cursor of any contents as long as there is 
|room for them in the inventory. Will error exit if there is not room. 
  /if (${sInput.Arg[1,:].Equal[EMPTY]}) { 
    /call Command_Empty 
  } 

| /delay 1 
/return 

| BEGIN THE GUTS OF THE MACRO ------------------------ 

Sub LeftClickItem(ItemName) 
  /if (!${Defined[ItemName]}) /call DisplayError "LeftClickItem;No Parameter" 
  /declare CC int local ${Cursor.ID} 
  /if (${Window[BigBankWnd]}) { 
    /declare ItemLoc int local ${FindItem[=${ItemName}].InvSlot.ID} 
    /if (!${ItemLoc}) { 
      /varset ItemLoc ${FindItemBank[=${ItemName}].InvSlot.ID} 
      /if (!${ItemLoc}) /call DisplayError "LeftClickItem;${ItemName} not found in inventory or bank." 
    } 
  } else { 
   /declare ItemLoc int local ${FindItem[=${ItemName}].InvSlot.ID} 
   /if (!${ItemLoc}) /call DisplayError "LeftClickItem;${ItemName} not found in inventory." 
  } 
  /if (${InvSlot[${ItemLoc}].Pack.ID}) /call OpenPack ${InvSlot[${ItemLoc}].Pack.ID} 
|Inventory Window doesn't need to be open but Packs do for /itemnotify to work 
  /shift /itemnotify ${ItemLoc} leftmouseup 
  /declare TimerOut timer local 2s 
  :LCIWait 
    /if (!${TimerOut}) /call DisplayError "LeftClickItem;Operation Timed Out" 
    /if (${Cursor.ID}==${CC}) /goto :LCIWait 
|Stay in loop until timeout or cursor change. Error exit on timeout because 
|something has gone wrong at that point. The item WAS reported in the slot 
|we DID just click. If we don't get a change in the cursor.... 
|Return ItemLoc so we can use it in a Swap call. 
|ItemLoc==SlotNumber of where we just got this item. 
/return ${ItemLoc} 

Sub LeftClickSlot(Slot) 
  /if (!${Defined[Slot]}) /call DisplayError "LeftClickSlot;No Parameter" 
  /declare CC int local ${Cursor.ID} 
  /shift /itemnotify ${Slot} leftmouseup 
  /declare TimerOut timer local 2s 
  :LCSWait 
    /if (${Cursor.ID}==${CC} && ${TimerOut}) /goto :LCSWait 
|Keep in loop until cursor changes or timeout. Don't error on timeout since 
|we can assume no cursor change meant that slot was empty or the item can't 
|go into that slot. 
/return 

Sub LeftClickPackSlot(Pack,Slot) 
  /if (!${Defined[Pack]} || !${Defined[Slot]}) /call DisplayError "LeftClickPackSlot;No Parameter" 
  /declare CC int local ${Cursor.ID} 
  /call OpenPack ${Pack} 
  /shift /itemnotify in ${Pack} ${Slot} leftmouseup 
  /declare TimerOut timer local 2s 
  :LCPSWait 
    /if (${Cursor.ID}==${CC} && ${TimerOut}) /goto :LCPSWait 
|Keep in loop until cursor changes or timeout. Don't error on timeout since 
|we can assume no cursor change meant that slot was empty or the item can't 
|go into that slot. 
/return 

Sub RightClickItem(ItemName) 
  /if (!${Defined[ItemName]}) /call DisplayError "RightClickItem;No Parameter" 
  /declare ItemLoc int local ${FindItem[=${ItemName}].InvSlot.ID} 
  /if (!${ItemLoc}) /call DisplayError "RightClickItem;Error, ${ItemName} not found in inventory." 

  /if (${InvSlot[${ItemLoc}].Pack.ID}) /return 
|If the item is inside a pack just exit. Nothing happens if you click them. 
  /itemnotify ${ItemLoc} rightmouseup 
  /delay 2 
  :WaitForCast 
    /if (${Me.Casting.ID}) /goto :WaitForCast 
|Really nothing to check beyond waiting for a spell to cast. Either something 
|happens or something doesn't. Items don't fizzle and one should hope this 
|isn't being used to cast a Crusiable of Escape where interuppts matter. 
/return 

Sub RightClickSlot(Slot) 
  /if (!${Defined[Slot]}) /call DisplayError "RightClickSlot;No Parameter" 
  /itemnotify ${Slot} rightmouseup 
  /delay 2 
  :WaitForCast 
    /if (${Me.Casting.ID}) /goto :WaitForCast  
|Yay, so easy. Slot name-&gt;Click-&gt;WaitForCast-&gt;DONE! 
/return 

Sub OpenPack(Pack) 
|Input can be string or int. 
  /if (!${Defined[Pack]}) /call DisplayError "OpenPack;No Parameter Defined" 
|Looks reduntant but makes sense. This allows either a slotname or number to be evaluated. 
  /if (!${Window[${InvSlot[${Pack}].Name}].Open}) { 
    /itemnotify ${Pack} rightmouseup 
    /declare TimerOut timer local 4s 
    :Wait1 
    /if (!${TimerOut}) /call DisplayError "OpenPack;Error Could Not open ${InvSlot[${Pack}].Name}" 
    /if (!${Window[${InvSlot[${Pack}].Name}].Open}) /goto :Wait1 
    /delay 3 
|Bags seem to take a few extra cycles to register 'open' with both MQ and EQ, hence the /delay 
  } 
/return 

Sub DisplayError(sInput) 
  /echo Warning, Error. Macro Ended in Sub ${sInput.Arg[1,;]} 
  /if (${sInput.Arg[2,;].Length}) /echo Error Message: ${sInput.Arg[2,;]} 
  /endmacro 
/return 

| END THE GUTS OF THE MACRO ------------------------ 


Sub Command_Empty 
|Rather basic. Exception is now we can make sure there is room for the item. 
  :EmptyLoop 
    /if (!${Cursor.ID}) /return 
|Better to end the macro than drop something really important. 
    /if (!${Me.FreeInventory[${Cursor.Size}]}) /call DisplayError "Command_Empty:No Inventory Space for ${Cursor.Name}." 
    /autoinventory 
  /goto :EmptyLoop 
/return  

Sub ValidSlot(SlotName) 
|Input can be string or int. 
  /if (!${Defined[SlotName]}) /call DisplayError "ValidSlot;No Parameter Defined" 
|If the slotname or number has an ID then it exists. 
  /if (${InvSlot[${SlotName}].ID}) { 
    /return TRUE 
  } else { 
    /return FALSE 
  } 
/return FALSE
 
Last edited:
Ok, now I am wondering if any veteran coders can help me out for further customization of this macro.. What I would like it to do is read from the ini in priority instead of by distance to the mobs and maybe there is a way to put distance limits on some mobs

Thanks in advance
 
hamburgerhelper said:
Ok, now I am wondering if any veteran coders can help me out for further customization of this macro.. What I would like it to do is read from the ini in priority instead of by distance to the mobs and maybe there is a way to put distance limits on some mobs

Thanks in advance

That would be VERY nice
 
sure, i'll start looking into it after i get out of rifts :)
 
Haha, forgot all about this one, but that priority still alludes me to this day! Would love to see it in my casters hunter the most, make AFK leveling soo much easier, hehe..

If you get it done ill add it to my hunters, and post what I have as of now..
 
I tryed myself but failed but i would like if this where rewrote for warp :) with delys and everything
and like when you are at 1% health or w/e that you gate another thing is i would also like it wrote so that it can be used by someone under level 65 :P
 
Or a move to object and if you are stuck on a object for say 10seconds to just /warp target would be nice and on top of it if your running into a object for 10seconds it looks like your lagging so you should be safe :)
 
ok i have altered the macro but what im trying to do is use it as a way to lvl a monk and instead of useing the mobs name i want to look for mob by its lvl if that is possible do i change it in the hunter.ini



Rich (BB code):
| MonkHunter Macro 
| MonkHunter.mac 
| Author      : robdawg 
| Edit        : Chill, Fallon 
| Version     : v1.2monk 12/26/2004 
| Useage      : /macro Hunter 
| Description : 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.  This is definitely a work in progress and I am sure 
|      someone can think of plenty of upgrades for this. 
| Monk Updates: Added auto-mend & FD, Eppic clicky, ornate & other clickies for self buffing 
       Update your non-ornate pants & BP names as needed. 
|------------------------------------------------------------------------------------ 

#turbo 10  
#Include Swap.inc 

Sub Main 

   |------------------------------------------------------------ 
   |Monk stuff, set the haste gloves to Celsestial Fists, or Gauntlets of Enlightenment 
   |------------------------------------------------------------ 
   /declare MF_HasteGloves      string outer 
   /varset MF_HasteGloves Celestial Fists 
   |------------------------------------------------------------ 
   |Monk stuff, Hit Point Percentages to Mend and FD at 
   |------------------------------------------------------------ 
   /declare HP_FD      int outer 35 
   /declare HP_Mend      int outer 65 
   |------------------------------------------------------------ 
   |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  3000 
   |------------------------------------------------------------ 
   |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 
   |------------------------------------------------------------ 
   |Generic Counter Variable 
   |------------------------------------------------------------ 
   /declare c int outer 0 

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

   /fastdrop on 
   /lootn never 

   :Start 
   /doevents 
   /call GMCheck 
   /call BuffCheck 
   /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[5]} 
   /varcalc RV_RandomWait ${RV_RandomWait}+1 
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming 
   /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 

|-------------------------------------------------------------------------------- 
|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! 
   /varset RV_Fighting 1 
   /varset RV_TargetDead 0 
  
   :CombatLoop 
   /doevents 
|If your a monk clap your hands... or at least click your haste gloves 
   /if (${MF_HasteGloves.Equal[${Me.Inventory[hands]}]} && !${Me.Buff["Celestial Tranquility"].Duration}) /cast item "${MF_HasteGloves}" 

   /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["Kick"]})) /doability "Kick" 

   /if ((${Int[${Me.PctHPs}]}<${HP_Mend})&&(${Me.AbilityReady["Mend"]})) { 
      /echo HP under ${HP_Mend}%! Mending at ${Me.PctHPs} health... 
      /doability "Mend" 
   } 

   /if ((${Int[${Me.PctHPs}]}<${HP_FD})&&(${Me.AbilityReady["Feign Death"]})) { 
      /echo Health under ${HP_FD}%! Getting my ass kicked, time to FD! 
      /doability "Feign Death" 
      /beep 
      /beep 
      /beep 
      /endmacro 
   } 

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

      /doability "Feign Death" 
      /afk 
      /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 (${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 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: Buff Check - Monk Specific, but can be edited for other classes 
|-------------------------------------------------------------------------------- 
Sub BuffCheck 

  /if (!${Me.Standing} && !${Me.Mount.ID}>0) /stand 
  /if (${Me.Moving}) { 
    /keypress forward 
    /keypress back 
    /delay 5 
  } 

  /if (${Me.Buff["Frostreaver's Blessing"].Duration} !> ${MF_BuffTicks}) { 
    /echo Need the dorf stuff 
    /call swap "Clicky:Ring of Dain Frostreaver IV" 
   } 

  /for c 1 to 15 
    /if (${Me.Buff[${c}].Name.Find["boar"]} || ${Me.Buff[${c}].Name.Find["bear"]} || ${Me.Buff[${c}].Name.Find["stamina"]}) /goto :nosta 
  /next c 
  /if (${Me.Buff["Health"].Duration} !> ${MF_BuffTicks}) { 
    /target myself 
    /delay 1 
    /echo topping off stamina buffage 
    /call swap "swap:Flayed Barbarian Skin Leggings=Leggings of Enlightenment|clicky:Leggings of Enlightenment|swap:Leggings of Enlightenment=Flayed Barbarian Skin Leggings" 
    /delay 1 
    /target clear 
  } 
  :nosta 

  /for c 1 to 15 
  /if (${Me.Buff["Shield of the Arcane"].Duration} !> ${MF_BuffTicks}) { /call swap "swap:Vest of the Serpent=Chestwraps of Enlightenment|clicky:chest|swap:Chestwraps of 

Enlightenment=Vest of the Serpent" 
  /echo Wish I had focus, but this will have to do 
  /delay 1 
  } 
  :focused 

/return
 
Last edited:
ok this is working any enhancements would be great

Rich (BB code):
| MonkHunter Macro 
| MonkHunter.mac 
| Author      : robdawg 
| Edit        : Chill, Fallon 
| Version     : v1.2monk 12/26/2004 
| Useage      : /macro Hunter 
| Description : 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.  This is definitely a work in progress and I am sure 
|      someone can think of plenty of upgrades for this. 
| Monk Updates: Added auto-mend & FD, Eppic clicky, ornate & other clickies for self buffing 
       Update your non-ornate pants & BP names as needed. 
|------------------------------------------------------------------------------------ 

#turbo 10  
#Include Swap.inc 

Sub Main 

   |------------------------------------------------------------ 
   |Monk stuff, set the haste gloves to Celsestial Fists, or Gauntlets of Enlightenment 
   |------------------------------------------------------------ 
  
   |------------------------------------------------------------ 
   |Monk stuff, Hit Point Percentages to Mend and FD at 
   |------------------------------------------------------------ 
   /declare HP_FD      int outer 35 
   /declare HP_Mend      int outer 65 
   |------------------------------------------------------------ 
   |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  3000 
   |------------------------------------------------------------ 
   |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 
   |------------------------------------------------------------ 
   |Generic Counter Variable 
   |------------------------------------------------------------ 
   /declare c int outer 0 

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

   /fastdrop on 
   /lootn never 

   :Start 
   /doevents 
   /call GMCheck 
   /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[5]} 
   /varcalc RV_RandomWait ${RV_RandomWait}+1 
   /echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming 
   /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 

|-------------------------------------------------------------------------------- 
|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 5s 
      /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! 
   /varset RV_Fighting 1 
   /varset RV_TargetDead 0 
  
   :CombatLoop 
   /doevents 
|If your a monk clap your hands... or at least click your haste gloves 
   /if (${MF_HasteGloves.Equal[${Me.Inventory[hands]}]} && !${Me.Buff["Celestial Tranquility"].Duration}) /cast item "${MF_HasteGloves}" 

   /attack on 
    
   /call MoveToMob 
   /call SpecialIT 

   /if (!${Target.ID}) { 
      /attack off 
      /keypress forward 
      /keypress back 
      
      /varset RV_TargetDead 1 
      /varset RV_Fighting 0 
      /delay 5s 
      /target radius 30 corpse 
      /delay 5s 
      /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["Kick"]})) /doability "Kick" 

   /if ((${Int[${Me.PctHPs}]}<${HP_Mend})&&(${Me.AbilityReady["Mend"]})) { 
      /echo HP under ${HP_Mend}%! Mending at ${Me.PctHPs} health... 
      /doability "Mend" 
   } 

   /if ((${Int[${Me.PctHPs}]}<${HP_FD})&&(${Me.AbilityReady["Feign Death"]})) { 
      /echo Health under ${HP_FD}%! Getting my ass kicked, time to FD! 
      /doability "Feign Death" 
      /beep 
      /beep 
      /beep 
      /endmacro 
   } 

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

      /doability "Feign Death" 
      /afk 
      /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 (${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 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
 
Help changing hunters.mac.. (Monk Macro)

Users who are viewing this thread

Back
Top
Cart