• 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

Redguides Listing of Confirmed Macros (Archive Ending 10/10/05)

Status
Not open for further replies.

soultaker

Member
Joined
Feb 2, 2005
RedCents
60¢
UPDATE SOME OF THESE ARE OUT OF DATE WILL BE WORKING ON THIS THREAD HERE SOON TO UPDATE THE MACROS

***NOTE*** This is a listing of all the confirmed macros on this site. When the new site goes live this will be presented in a better manor. Please feel free to post questions in the questions section and list updates in the Strategies section. But for the purpose of this post this is an attempt to make it easier to locate and use these macros.

How to use the code listed in this section: open a notepad file, copy the code below, and save it as name.mac in your macroquest/release/macros folder where name.mac is the name of the macro. Example: target.mac

Each Macro will be listed in this thread as a new posting this way to give the macros some separation. If you wrote one of these macros and would like further instructions posted or have an update for it PM myself and I will make the corrections as needed.

Here is a good break down on Macros to help you write your own:
http://forums.notaddicted.com/showthread.php?t=754

Below is a listing and links to each thread the macros come from. Incase you wish to view the thread first.

1. The AFK Bard Macro

2. The Forage Macro

3. Turn in Macro

4. Rouge Pick Lock

5. Hunter Macro

6. AFK Cleric/Melee EXP/CASH Macro

7. Range Macro

8. Bandaide.mac

9. Monk training mac

10. Player Alerts

11. Bard macro

12. Tradeskill macro (combines only)

13. Exp/Dain Faction

14. Rogue Macro

15. Bard chant & loot macro

16. Rathe Mountains Farm_Giant.mac

17. Bard Chant Hunter

18. Auto-Swarm kite macro

19. AfkCleric.mac

20. Cleric spell trainer

21. Auto Loot and Sell Macro

22. Druid healer macro

23. Chanty macro

24. Extreme Loot Helper

25. Bazaar Plat Farming Macro

26. Max Tradeskills while afk

27. Tank Macro and Healer Macro

28. MonkHunter Macro

29. Afk Bard Macros

30. Celestial Essence macro

31. Shaman slow/heal/dot

32. Ranger Macro Help

33. Puller/Healer Mod

34. AFK Powerlevel Macro

35. AFK Taskmaster

36. Forgotten Halls Subordinate Macro

37. Sumraid and Shrinkraid Macros

38. Corpse Recovery Helper Macro

39. New FHBard FHHealer FHLooter FHPet Macros

40. Language Macro

More to come soon....

Here is the link to MQ2 Free Boards Macro Section for some more published macros.
 
Last edited by a moderator:
Re: Redguides Listing of Confirmed Macros

The AFK Bard Macro by Redbot

This macro, when used in conjunction with the following plugins, will target the nearest mob and chant kite it to death while you run in a circle, then target the next mob, and so on. I've ran it AFK for 38 hours, and haven't had a hitch. I've also gained 20 levels and 1000 AA with it GM and near-player detection added, but if you kite in instanced zones like I do, you don't have to worry about players.

If anyone here needs help with the plugins, compiling macroquest, or this macro don't be afraid to ask.

First off:
1. Get the MQ2MoveUtils and MQ2Twist plugins from the Plugin Guide

2. Compile the plugins and get them working. Refer to the "EQ Underground" guide for help.

3. Get Target.mac (open a notepad file, copy the code below, and save it as target.mac in your macroquest/release/macros folder.

Rich (BB code):
| This macro made for www.Redguides.com
| Don't steal it or we'll punch your fase!
#turbo  
#event camp "personingroup tells the group, 'lets roll'  
#event dzadd "personyouwanttoadd tells you, 'add me'  
#event invite "#*#invites you to join#*#"  
#Event Zoned "#*#You have entered#*#"  
  
  
Sub Main  
  
    
:loopstart 
/doevents  
/call GMcheck  
/if (${Target.Level}>67) /tar npc next 
/if (${Target.Distance}>220) /keypress esc  
/if (${Target.ID}==FALSE) /tar NPC radius 220  
/delay 10  
/goto :loopstart  
/return  
  
 Sub GMcheck  
 /if (${Spawn[gm].ID}) {  
 /echo Gm detected  
 /beep 
 /beep 
 /beep  
 /keypress 9 
 /endmac 
 /unload 
 /q  
 }  
 /return  
  
 Sub event_camp  
 /sit  
 /camp desk  
 /return  
  
 sub event_zoned  
 /delay 5s  
 /sit  
 /camp desk  
 /endmac 
 /return  

 sub event_dzadd 
 /dzadd personyouwanttoadd 
 /return 

 sub event_invite  
 /invite  
 /return

This code will camp you out if a GM is in your zone.

To use:
0) For the first time running, type "/plugin MQ2twist" and then "/plugin MQ2moveutils" (without quotes)
1) Choose 5 songs to twist and memorize them.
2) Stand wherever you want to run in circles (helps to have a room with lots of spawns) and type "/circle on 75" (or replace 75 with whatever radius you like.)
3) Press numlock to start running
4) type "/mac target" to start the targeting macro, the one you copied above.
5) type "/twist 1 2 3 4 5", to twist songs in slots 1,2,3,4,5. Choose other slots if you like.

See this post for further information

http://www.redguides.com/community/showthread.php?t=16
 
Last edited:
Re: Redguides Listing of Confirmed Macros

Forage macro

From the MQ2 Free section, written by bootyjuice modified by mdar. Why am I posting it here then? Mdar's version had several bugs, and I got them worked out. Enjoy. Redbot

Rich (BB code):
|yafm.mac 
| 
|Yet Another Forage Macro 
| 
|Ini File: yafm.ini 
| 
| 0 = destroy 
| x = keep at most x of this item 
| 
|New foraged items are added to the ini file automatically and are kept by default. 


|||||||||||||||||||| 
| Main 
|||||||||||||||||||| 
sub Main 

    /declare DefaultMaxSave int outer 

    /varset DefaultMaxSave ${Ini[yafm.ini,Default,MaxSave,${NotFound}]} 
    /if (${DefaultMaxSave}==${NotFound}) { 
       /ini "yafm.ini" "Default" "MaxSave" "100" 
        /varset DefaultMaxSave 100 
    } 

   /cleanup 

   | Verify that we have the ability to forage. 
   /if (${Me.Skill[Forage]}==0) { 
      /echo You cannot forage, silly person! 
      /goto :Exit 
   } 

   :Forage 

   | If we can forage then do so. 
   /if (${Me.AbilityReady[Forage]}) { 
      | Stand up.  Can't forage while sitting. 
      /if (${Me.State.NotEqual[STAND]}) { 
         /stand 
         /delay 5 
      } 

      /doability forage 
   } 

   | If we successfully foraged something then take care of it. 
   /if (${Cursor.ID}) { 
      /call HandleItem 
   } 

   /goto :Forage 

:Exit 
/return 

|||||||||||||||||||| 
| HandleItem 
|||||||||||||||||||| 
sub HandleItem 

   /declare ItemSetting int local 
   /declare NotFound int local 
   /declare ItemsHave int local 

   /varset NotFound -1 

   :LootIt 

   | Look up this item in yafm.ini 
   /varset ItemSetting ${Ini[yafm.ini,ForageList,${Cursor.Name},${NotFound}]} 
   /delay 5 

   | If the item isn't in the .ini file then add it. 
   /if (${ItemSetting}==${NotFound}) { 
       /ini "yafm.ini" "ForageList" "${Cursor.Name}" "${DefaultMaxSave}" 
       /varset ItemSetting ${DefaultMaxSave} 
   } 

   /varset ItemsHave ${FindItem=${Cursor.Name}} 

   | If we're keeping this item then stash it in our bags. 
   | Otherwise, just destroy it. 
   /if (${ItemSetting}>${ItemsHave}) { 
     /autoinventory 
   } else { 
     /destroy 
   } 

   /delay 5 
   /if (${Cursor.ID}) /goto :LootIt 

/return

Instructions:
Copy the code and save it to a text file named "yafm.mac" using notepad or wordpad. Put yafm.mac into your macros folder(which should be in c:\mq2\release\macros or whatever you named your mq2 folder). Go into everquest and type "/macro yafm". Let it run for awhile, and then quit.

It will automatically create a file called "yafm.ini" in your macro folder. Open that file up with notepad and you can edit how much of each item you will keep. It will look like this:

Rich (BB code):
[Default] 
MaxSave=100 
[ForageList] 
Roots=0 
Pod of Water=0 
Berries=100 
Vegetables=100 
Fishing Grubs=0 
Fruit=100 
Griffon Eggs=100 
Rabbit Meat=100

For example, setting "pod of water" to 50 will let you forage up to 50 pods of water and will delete the rest.

Whatever you do, don't set defaultmax or maxsave to 0. That could destroy your equipment if you click on it! Set it to 10 or 100 and you'll be fine.

See this post for further information: http://www.redguides.com/community/showthread.php?t=169
 
Re: Redguides Listing of Confirmed Macros

Turn-in macro

This is a macro to turn in bonechips to any NPC you please, however, you can modify this to turn in any item you like by changing the name "Bone Chips" in the lines:

/if (${FindItemCount[=Bone Chips]}<4) /goto :Done

and lower down

/if (!${FindItemCount[=Bone Chips]}) /goto :Done

to anything you want, such as Muffins for the kelethin faction quest, bandages for rivervale faction quest, gems or whatever.

Rich (BB code):
|bonechips.mac - 20 DEC 2004 
|Originally by kkmonte. Updated by Redbot for use on Redguides.com 
|USAGE: /macro bonechips.mac 

Sub Main 
/declare l0 int local 

/target npc Gunlok 

:Loop 
/if (${FindItemCount[=Bone Chips]}<4) /goto :Done 

/for l0 0 to 3 
   /ctrlkey /itemnotify ${FindItem[=Bone Chips].InvSlot} leftmouseup 
   /delay 20 ${Cursor.ID} 
   /delay 1 
   /if (${l0}==0) { 
      /click left target 
      /delay 20 ${Window[GiveWnd].Open} 
      /delay 1 
   } else { 
      /notify GiveWnd GVW_MyItemSlot${l0} leftmouseup 
      /delay 20 !${Cursor.ID} 
      /delay 1 
   } 
/if (!${FindItemCount[=Bone Chips]}) /goto :Done
/next l0 

/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 20 !${Window[GiveWnd].Open} 
/delay 1 

:cursorclear 
/autoinv 
/delay 1 
/if (${Cursor.ID}) /goto :cursorclear 

/goto :Loop 

:Done 
/delay 1 
/notify GiveWnd GVW_Give_Button leftmouseup 

/endmacro
 
Re: Redguides Listing of Confirmed Macros

Hunter Macro from MQ2 boards posted by Machiavelli

But now the best way to macro plat is to farm tradeskill crap and sell it. Hunter macro works wonders.

Usage: Configure the hunter macro to your character. Clear out ALL of your bags. Go to East Karana and start it up. Go to bed. Wake up the next morning and corner the market on spider silk. 2k a night, not too shabby.

http://macroquest2.com/phpBB2/viewtopic.php?t=7135

Here's a slightly modified version of the hunter mac:

Rich (BB code):
| Hunter Macro
| Hunter.mac
| Author : robdawg
| Edit: Averad 
| Version : v1.2.1 2004-07-29
| Useage : : /macro Hunter <forage?> <pet class?> <cast?> <attack spell> <heal?> <heal spell>
| Example : : /macro Hunter 0 1 1 Splurt 0 - Will not forage will attack with a pet and cast splut during fight will not cast heal spell
| 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.
|------------------------------------------------------------------------------------

#turbo 10

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 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
|------------------------------------------------------------
|Home Location X (Set if you want location other then were you start the macro)
|------------------------------------------------------------
/declare AnchorX int outer ${Me.X}
|------------------------------------------------------------
|Home Location Y (Set if you want location other then were you start the macro)
|------------------------------------------------------------
/declare AnchorY int outer ${Me.Y}

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

/declare MyXLOCA int outer 0
/declare MyYLOCA int outer 0
/declare BreakLoop int outer 0 
/declare xDistance int outer 0

:Start
/doevents
/if (${Param0.equal[1]}) {
/call Forage
}
/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 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...
/call CheckAnchor
/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 (${Param1.equal[1]}) {
/pet attack
}
 
/attack on

/if (${Param4.equal[1]}) {
/call Heal
}

/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 (${Param2.equal[1]}) {
/cast $(Param3)
}

/if (${Param4.equal[1]}) {
/call Heal
}

/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

/return

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

/if (${Spawn[gm].ID}) {
/beep
/beep
/beep

/echo GM has entered the zone!
/echo $&#* 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 (${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: Forage
|--------------------------------------------------------------------------------
Sub Forage

/cleanup

| Verify that we have the ability to forage.
/if (${Me.Skill[Forage]}==0) {
/echo You cannot forage, silly person!
/goto :Exit
}

| Stand up. Can't forage while sitting.
/if (${Me.State.NotEqual[STAND]}) {
/stand
/delay 5
} 

| If we can forage then do so.
/if (${Me.AbilityReady[Forage]}) {
/doability forage
}

| If we successfully foraged something then take care of it.
/if (${Cursor.ID}) {
/call HandleItem
} 

:Exit

/return

|--------------------------------------------------------------------------------
|SUB: HandleItem
|--------------------------------------------------------------------------------
sub HandleItem

/declare ItemSetting int local
/declare NotFound int local

/varset NotFound -1

| Look up this item in yafm.ini
/varset ItemSetting ${Ini[yafm.ini,ForageList,${Cursor.Name},${NotFound}]}

/delay 5

| If the item isn't in the .ini file then add it.
/if (${ItemSetting}==${NotFound}) {

/ini "yafm.ini" "ForageList" "${Cursor.Name}" "1"

/varset ItemSetting 1

}

| If we're keeping this item then stash it in our bags.
| Otherwise, just destroy it.
/if (${ItemSetting}==1) {

:LootIt
/autoinventory
/delay 5
/if (${Cursor.ID}) /goto :LootIt

} else {

/destroy

}

/return


|--------------------------------------------------------------------------------
|SUB: MoveToAnchor
|--------------------------------------------------------------------------------
Sub MoveToAnchor
/declare iCount int local
/varset iCount 0

/echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}.

:AnchorMoveLoop
/delay 1
/doevents
/face nolook loc ${AnchorY},${AnchorX}

/if (${Math.Distance[${AnchorY},${AnchorX}]}>12) {
/keypress forward hold
} else {
/keypress forward
/face away loc ${AnchorY},${AnchorX}
/return
}

/if (${iCount}>2) {
/call Detectobst
/face nolook loc ${AnchorY},${AnchorX}
/varset iCount 0
}

/varcalc iCount ${iCount}+1
/goto :AnchorMoveLoop
/return

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

|--------------------------------------------------------------------------------
|SUB: MoveToAnchor
|--------------------------------------------------------------------------------
Sub MoveToAnchor
/declare iCount int local
/varset iCount 0

/echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}.

:AnchorMoveLoop
/delay 1
/doevents
/face nolook loc ${AnchorY},${AnchorX}

/if (${Math.Distance[${AnchorY},${AnchorX}]}>12) {
/keypress forward hold
} else {
/keypress forward
/face away loc ${AnchorY},${AnchorX}
/return
}

/if (${iCount}>2) {
/call CheckObstacle
/face nolook loc ${AnchorY},${AnchorX}
/varset iCount 0
}

/varcalc iCount ${iCount}+1
/goto :AnchorMoveLoop
/return

|--------------------------------------------------------------------------------
|SUB: CheckObstacle
|--------------------------------------------------------------------------------
|# Checks to see if we may have bumped into something that is stopping us
sub CheckObstacle
|# Record our current position, wait a moment and then check if its the same
/varset MyXLOCA ${Me.X}
/varset MyYLOCA ${Me.Y}
/delay 2
/if (${MyXLOCA}==${Me.X} && ${MyYLOCA}==${Me.Y}) /call Obstacle
/return

|--------------------------------------------------------------------------------
|SUB: Obstacle
|--------------------------------------------------------------------------------
|# Uses strafe and randomness to try and get around things
sub Obstacle
/keypress forward
/keypress back hold
/delay 5
/keypress back
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
/delay 3
/keypress strafe_right
} else {
/keypress strafe_left hold
/delay 3
/keypress strafe_left
}
/keypress forward hold
/return

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

|--------------------------------------------------------------------------------
|SUB: CheckAnchor
|--------------------------------------------------------------------------------
Sub Heal
/if ((${Int[${Me.PctHPs}]}<50)&&(${Me.Gem[$(Param5)]})&&(${Me.SpellReady[$(Param5)]})) {
/varset TempID ${Target.ID}
/keypress forward
/keypress back
/keypress F1
/echo Casting Heal Spell because of low health...
/cast $(Param5)
/delay 3s
/target id ${TempID}
}
/return

HunterLoot.ini

Add in what you need using the same format

Rich (BB code):
[Eastern Plains of Karana]
Loot1=Silk
Loot2=High Quality
Loot3=Medium Quality
Loot4=Feather

HunterMob.ini

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

See this post for further information: http://www.redguides.com/community/showthread.php?t=127
 
Re: Redguides Listing of Confirmed Macros

AFK Cleric/Melee EXP/CASH Macro...lvl 66to70 by NoobHaxor


Melee macro (pon.mac)

Rich (BB code):
|---------------------------------------
|NoobHaxor's Ultimate Leveling / Cash 
|Macro v 1.0
|---------------------------------------
|Instructions for use:
|1.warp to Thelin
|2.Start instance by saying "ready"
|3.Start Cleric macro /mac poncleric.mac (60% or higher depending on tank)
|4.Start Macro on Tank /mac pon.mac
|---------------------------------------


#include spell_routines.inc
#turbo 10

#Chat Chat
#Chat tell

Sub Main  
   /declare HealerName string outer Name_of_Healer
   /declare myzone int outer ${Zone.ID}
   /declare RV_MyZLOC int outer -150
   |------------------------------------------------------------
   |Loot Array Information. Declare Safe Players.
   |------------------------------------------------------------
   /call ReadINI HunterLoot.ini "${Zone.Name}" Loot
   /if (!${Defined[RV_LootArray]}) {
      /echo No Loot Array Created...
   }
   /alert add 2 pc ${HealerName}
   /alert add 2 pc player2
   /alert add 2 pc player3
   /alert add 2 pc player4

   /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_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   
   :Start
   /doevents
   /call GMCheck
   /call playercheck
   /doevents Chat
   /doevents tell
   /doevents flush
   /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

   /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
	/if (!${Spawn[$HealerName].ID}) /return
	/tar Nightstalker
        /varset RV_HasTarget 1
        /varset RV_MyTargetName ${Target.CleanName}
        /echo Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]}
	/delay 2s
/return

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

   /doevents

  /if (${Int[${Target.Distance}]}>25) {
	/delay 7s
	/warp target
   }
   /if (${RV_MyZLOC}>${Int[${Me.Z}]}) /warp target

   /if (${Target.ID}) {
      /stick 13 moveback
   }

/return

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

   /echo Attacking Mob NOW!
   /varset RV_Fighting 1
   /varset RV_TargetDead 0

   /call MoveToMob
   
   :CombatLoop
   /doevents
   /attack on
   
   /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 
|----Zerker Auto-Frenzy Might want to change to bash / kick if using warrior	
    /if ((${Target.Distance}<17)&&(${Me.AbilityReady["Frenzy"]})) /doability "Frenzy"

|-----Zerker Stun---Might wanna comment section out if not using a BER
    /if ((${Me.PctHPs}<25)&&(${Me.PctHPs}>10)) /disc Mind Strike
    /if (${Me.PctHPs}<10) {
	/gate
	}


/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
|--------Casts Haste after fight is done
   /call cast "Jymall's Gloves of Frenzy" item
   /delay 2s
|---------Requests Conviction from healer after fight done
   /if (!${Me.Buff["Conviction"].Duration}) /tell ${HealerName} c
   /delay 32s
   /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
   /warp loc 6386.45, -5010.02, 4.38    
/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: GM Check ----Player Checks
|--------------------------------------------------------------------------------
Sub GMCheck
/if (${Zone.ID}!=${myzone}) {
	/quit
	/endmacro
	}	
   /if (${Spawn[gm].ID}) {

      /mqlog GM ENTERED ZONE!!!

      /keypress forward
      /keypress back

      /quit
      /endmacro
      /unload
   }
   
/return

Sub playercheck 
   /if (${Spawn[pc noalert 2 radius 300].ID}) { 
        /echo player nearby 
	/log player nearby
	/keypress up 
	/zone potranquility
	/unload 
	/end 
   } 
/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["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["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 Event_Chat(string ChatType,string Sender,string ChatText)
	   /if (${ChatText.Equal[help]}) {
		|--------Might want to comment this out to include a Stun
                        /disc Mind Strike
			/delay 1
			/warp loc 6386.45, -5010.02, 4.38    
			/delay 5s
			/call ResetSub
			/zone ponightmare
			/delay 60s
	        	 }
/return

Cleric Macro (poncleric.mac)

Rich (BB code):
#include spell_routines.inc

#Chat Chat
#Chat tell

Sub Main

|-------Safe Player Checks---------|
   /alert add 2 pc player1
   /alert add 2 pc player2
   /alert add 2 pc player3
   /alert add 2 pc player4

|------------READ THIS SECTION AND EDIT IF NEEDED-----------|

   /declare myzone int outer ${Zone.ID}
   /declare RV_MyZLOC int outer -150
   /declare autohealmode int outer 0
   /declare healspell string outer Complete Healing
   /declare healspellrange int outer 100
   /declare patchheal string outer Pious Remedy
   /declare patchhealrange int outer 100
   /declare yaulpspell string outer Yaulp VII
   /declare autosit int outer 1
   /declare distancetosit int outer 40
   /declare autointerrupt int outer 1
   /declare defaultstophealpoint int outer 65

|** Tweak Heals Here - tankhealpoint is for War/Pal/SK other
than MT, casterhotpoint and casterpatchpoint refer to
wiz/mag/enc/dru, necshmpatchpoint refers to necros and
shamans, defaultpatchpoint refers to all other classes.   **|

   /declare selfhealpoint int outer 65
   /declare tankhealpoint int outer 65



|------------------------END EDITING------------------------|

   /declare healpct int outer 60
   /declare tankname string outer ${Target}
   /declare tanknameid int outer
   /declare tankclass string outer
   /declare stophealpoint int outer ${defaultstophealpoint}
   /if (!${Target.ID}) {
      /echo Target the Tank when you run this macro to designate him as MT
      /end
   } else {
      /varset tanknameid ${Target.ID}
      /varset tankclass ${Target.Class.Name}
   }

   /if (${Defined[Param0]}) {   
      /varset healpct ${Param0}
   } else /echo No Heal% specified, defaulting to 60%
   
   /if (!${Defined[Param1]}) {   
      /echo Usage: /mac AFCleric % healspell
   } else {   
      /if (!${Defined[Param2]}) {
         /varset healspell ${Param1}
      } else /if (!${Defined[Param3]}) {
         /varset healspell ${Param1} ${Param2}
      } else /if (!${Defined[Param4]}) {
         /varset healspell ${Param1} ${Param2} ${Param3}
      } else {
         /varset healspell ${Param1} ${Param2} ${Param3} ${Param4}
      }
   }

   /echo Casting ${healspell} on ${tankname} at ${healpct}% HP
   
   :tankwatchloop
   /if (${Target.Distance}>90) {
	/delay 5s
	/stand
	/delay 1s
	/warp target
	}

   /if (${RV_MyZLOC}>${Int[${Me.Z}]}) /warp target
   /if (${String[${Spawn[${tanknameid}]}].NotEqual[${tankname}]}) /varset tanknameid 0
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
      }
   }
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) {
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
      }
   }
   /if (${GameState.Equal[CHARSELECT]}) /end
   /if (${Target.ID}==${tanknameid}) {
      /varset stophealpoint ${Math.Calc[${healpct}*1.1]}
      /if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
      /if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) {
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
	 /delay 10s
      }
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
   }
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
   }
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand
   }
   /if ((${autohealmode}<2)&&(${Me.PctMana}<=98)) /call MedTime
   /call CheckEvents
   /goto :tankwatchloop
/return
   

Sub CheckEvents
   /delay 1
   /if (${Me.PctHPs}<32) /gate
   /if ((${Me.PctHPs}<85)&&(${Me.PctHPs}>32)) {
	/warp loc 6386.45, -5010.02, 4.38   
	/delay 1
	/tell ${tankname} help
	/target myself
	/delay 1s
	/call Cast "${patchheal}" gem2 1s
	/delay 4s
	/zone ponightmare
	/delay 60s
	}
   /if (!${Me.Buff["Armor of the Zealot"].Duration}&&(${Bool[${Me.Sitting}]})) /call cast "Armor of the Zealot" gem7 7s
   /call GMCheck
   /call playercheck
   /doevents Chat
   /doevents tell
   /doevents flush
/return


Sub MedTime
   :oomwait
   /call CheckEvents
   /if ((${autosit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) {
      /if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${distancetosit}]})&&(${Me.PctHPs}>90)) /sit
      /if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]})) /stand
   }
   /if ((${Bool[${Me.Standing}]})&&(${autosit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit
   /if ((${Bool[${Me.Sitting}]})&&(${autosit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand
   /if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID})) {
      /if ((!${Me.Buff[Vallon].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Strength of Tunare].ID})) /call Cast "${yaulpspell}"
   }
/return


Sub CheckHP
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) {
      /call Interrupt
      /return
   }
/return


Sub FindExactPC(string name)
   /declare nameid int local
   /declare counter int local 1
   :FindNext
   /if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return NOT_FOUND
   /varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
   /if (${Spawn[${nameid}].CleanName.Equal[${name}]}) {
      /target id ${nameid}
      /delay 1s ${Target.ID}==${nameid}
      /if (${Target.ID}==${nameid}) /return TARGET_SUCCESS
   }
   /varcalc counter ${counter}+1
   /if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return NOT_FOUND


Sub Event_Chat(string ChatType,string Sender,string ChatText)
	   /if (${ChatText.Equal[c]}) /call Cast "Conviction" gem8 10s
/return
|--------------------------------------------------------------------------------
|SUB: GM Check /Player Detection           Do Not edit safety reasons
|--------------------------------------------------------------------------------
Sub GMCheck
/if (${Zone.ID}!=${myzone}) {
	/quit
	/endmacro
	}	

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

      /keypress forward
      /keypress back

      /call Cast "${healspell}"
      /delay 6s      
      /quit
      /endmacro
   }
   
/return

Sub playercheck 
   /if (${Spawn[pc noalert 2 radius 300].ID}) { 
        /echo player nearby 
	/mqlog player nearby
	/keypress up 
	/zone potranquility
	/unload 
	/end 
   } 
/return


HunterLoot.ini

*Enter in zone and loot you want looted use formate used

Rich (BB code):
[The Plane of Nightmares]
Loot1=Diamond

Modified mq2warp.cpp file (gives more accurate warp so no warping into the hedges)

Rich (BB code):
#include "../MQ2Plugin.h"

PreSetup("MQ2Warp");
#define CDisplay__MoveLocalPlayerToSafeCoords	0x00440F59

VOID DoWarp(float y, float x, float z);
VOID Warp(PSPAWNINFO pChar, PCHAR szLine);
VOID GateBind(PSPAWNINFO, PCHAR);

PLUGIN_API VOID InitializePlugin(VOID)
{
	AddCommand("/warp",Warp);
	AddCommand("/gate",GateBind);
	GetCharInfo()->Skill[25] = 252;
}


PLUGIN_API VOID ShutdownPlugin(VOID)
{
	DebugSpewAlways("Shutting down MQ2Safe");
	RemoveCommand("/gate");
	RemoveCommand("/warp");
}


// WARP commands
VOID Warp(PSPAWNINFO pChar, PCHAR szLine)
{
	static float LastY;
	static float LastX;
	static float LastZ;
	float NewY = 0;
	float NewX = 0;
	bRunNextCommand = TRUE;
	PSPAWNINFO psTarget = NULL;
	PZONEINFO Zone = (PZONEINFO)pZoneInfo; 
    CHAR command[MAX_STRING]; GetArg(command,szLine,1);
	CHAR Y[MAX_STRING]; GetArg(Y,szLine,2);
	CHAR X[MAX_STRING]; GetArg(X,szLine,3);
	CHAR Z[MAX_STRING]; GetArg(Z,szLine,4);
	if (
		stricmp(command, "succor") != 0 && 
		stricmp(command, "loc") != 0 && 
		stricmp(command, "last") != 0 && 
		stricmp(command, "target") != 0 
	) {
		WriteChatColor("Usage: /warp <succor|last|target|loc y x z>", CONCOLOR_RED);
		return;
		} else {
		if (!stricmp(command,"target"))  {
			if (ppTarget && pTarget) {
			psTarget = (PSPAWNINFO)pTarget;
			}
			if (!psTarget) {
				WriteChatColor("You must have a target for /warp target.", CONCOLOR_RED);
				return;
			}
			float TargetZ = float (psTarget->Z-(psTarget->AvatarHeight*0.5));
			srand (time(NULL));
				//random Y
				if (rand()%2!=0)
				{
					NewY = float(psTarget->Y+rand()%4);
				}
				else {
					NewY = float(psTarget->Y-rand()%4);
				}
				//random X
				if (rand()%2!=0)
				{
					NewX = float(psTarget->X+rand()%4);
				}
				else {
					NewX = float(psTarget->X-rand()%4);
				}
			LastY = NewY;
			LastX = NewX;
			LastZ = TargetZ;
			DoWarp(NewY, NewX, TargetZ);
		} else if (!stricmp(command,"succor"))  {
			static float north = 0;
			((PSPAWNINFO)pCharSpawn)->Heading = north;
			DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
			__asm call dword ptr [MLPTSC];
			return;
		} else if (!stricmp(command,"loc")) {
		if ((Y[0] == 0) || (X[0] == 0) || (Z[0] == 0))
		{
			WriteChatColor("You must provide <y> <x> <z> if going to a location.", CONCOLOR_RED);
			return;
		}
			LastY = (float)atof(Y);
			LastX = (float)atof(X);
			LastZ = (float)atof(Z);
		DoWarp((float)atof(Y), (float)atof(X), (float)atof(Z));
		return;
		} else if (!stricmp(command,"last")) {
		if ((LastY==0) || (LastX==0) || (LastZ==0))
		{
			WriteChatColor("You must have warped before to use this command!.", CONCOLOR_RED);
			return;
		}
		DoWarp(LastY, LastX, LastZ);
		return;
		}
	}
}
// GATE
VOID GateBind(PSPAWNINFO pChar, PCHAR szLine)
{
	pChar->Type = SPAWN_CORPSE;
}
// MEGAWARP

VOID DoWarp(float y, float x, float z)
{
	PZONEINFO Zone = (PZONEINFO)pZoneInfo; 

	float SafeY = Zone->SafeYLoc;
	float SafeX = Zone->SafeXLoc;
	float SafeZ = Zone->SafeZLoc;

	Zone->SafeYLoc = y;
	Zone->SafeXLoc = x;
	Zone->SafeZLoc = z;

	CHAR szMsg[MAX_STRING] = {0}; 
	sprintf(szMsg, "Warping to: %3.2f, %3.2f, %3.2f.", Zone->SafeXLoc, Zone->SafeYLoc, Zone->SafeZLoc);
	WriteChatColor(szMsg, COLOR_PURPLE);

	DWORD MLPTSC = CDisplay__MoveLocalPlayerToSafeCoords;
	__asm call dword ptr [MLPTSC];

	Zone->SafeYLoc = SafeY;
	Zone->SafeXLoc = SafeX;
	Zone->SafeZLoc = SafeZ;
}

With this you can easily pull 2k pp selling diamonds to vender a day. Good AA's and EXP. All in one, One of my best Macros.

See this post for more information: http://www.redguides.com/community/showthread.php?t=1421
 
Re: Redguides Listing of Confirmed Macros

Range attack by kidder60 edited by Siddin

Range Macro for arrows easy to tweak for other range

Rich (BB code):
#event noarrows "#*#You are out of arrows.#*#"

Sub Main
:Start
/if (${Target.Distance}>20 && ${Me.RangedReady}) /ranged
/doevents
/goto :Start
/return 
 
 
sub event_noarrows
/endmac
/mqpause
/return
 
Re: Redguides Listing of Confirmed Macros

Bandaide.mac BY: Alatyami

Rich (BB code):
| Bandaide.mac
| BY: Alatyami
| Last Modified: March 30, 2005
|===============================|

Sub Main
  :mainloop
  /if (${Me.PctHPs} <= 70) /call Bandaide
  /if (${Me.PctHPs} >= 70) /call End
  /goto :mainloop
/return

Sub bandaide
  :bandaide
  /delay 15
  /target ${Me}
  /if (${Me.AbilityReady["Bind Wound"]}) /doability "bind wound"
  /doevents
  /if (${Me.PctHPs} >= 70) /return
  /goto :bandaide
/return

Sub Event_End
Sub End
   /echo Why you laying around? Get to fighting!
   /endmac
/return
 
Re: Redguides Listing of Confirmed Macros

Monk training mac by Pugs

Rich (BB code):
|Monk.mac By Pugs
|
| Well this is a shitty little mac that i made to work on my
| My Skills on My monk its simple and works

Sub Main

/echo Traning You

:loop
   /delay 2s
   /if (${Me.AbilityReady[Feign Death]}) /call FD
   /if (${Me.AbilityReady[Intimidation]}) /call Intimidation
   /if (${Me.AbilityReady[Dragon Punch]}) /call Dragon
   /if (${Me.AbilityReady[Mend]}) /call Mend
         
   
   /goto :loop

/return

Sub FD

/doability "Feign Death"
/delay 20
/sit
/call CheckGM
/return


Sub Intimidation

/doability "Intimidation"
/delay 5
/echo Intimidation
/return

Sub Dragon

/doability "Dragon Punch"
/echo Dragon Punch
/delay 5
/return

Sub Mend

/doability Mend
/echo mend
/delay 5
/return

Sub CheckGM
/echo checking for gms
    /if (${Bool[${Spawn[gm].ID}]}) {
       /echo A GM or Guide has been detected in the zone 
       /dely 5s
       /exit
    }
/return
 
Re: Redguides Listing of Confirmed Macros

Player Alerts by Redbot

Put this in your main loop:

Rich (BB code):
/call playercheck

So it will look something like:

Rich (BB code):
:Loop 
/doevents 
/call playercheck  
/call GMcheck 
/if (${PauseFlag}==1) { 
/delay 1 
/doevents AddAvoid 
/doevents RemoveAvoid 
/goto :Loop

Next, add this where your subs are:

Rich (BB code):
Sub playercheck 
   /if (${Spawn[pc noalert 2 radius 300].ID}) { 
      /echo player nearby 
/g let's get outta here
/keypress up 
/delay 2m 
/say I have to go, my dog is on fire.
/sit 
/camp desk 
/unload 
/end 
   } 
/return


Remember you can have your character do anything after finding a player. I had mine run to my druid who would then teleport me (I can post this code if you guys like), or you can have it /gate and then camp. Just add whatever commands you like after the "/echo player nearby" it's very easy.


If you are powerleveling players, you will want to decide which players you do NOT want to set off the alert. You can either do this manually by typing
"/alert add 2 pc playername"
before you run the macro, or if you have a lot of people you don't want to trigger the alert (for example, you're powerleveling your entire guild), you can make a seperate macro to do it for you like this:


Rich (BB code):
|alert.mac
|RUN THIS FIRST
|list of players to NOT run away from
|Using alert 2 because alert 1 is used by many chant macros
Sub Main
/alert add 2 pc furor
/alert add 2 pc thott
/alert add 2 pc siddin
/alert add 2 pc infernal
/end
/return

and run that BEFORE you run your other macro.

See this thread for more information: http://www.redguides.com/community/showthread.php?t=887
 
Re: Redguides Listing of Confirmed Macros

Bard macro by Mandrack

Rich (BB code):
| bard kiting macro Macro 
| bardwarp.mac 
| Author :Mandrack , thanks rawbdog for the routine which i modified 
| to have it kite instead of stand and fight. 
| assumes you have twist and moveutils and a warp running 
| Version : V 0.50 2005-02-20 
| Useage : /macro bardwarp 
| Description : This macro will run your character around kiting any mobs 
| in your 
| RV_MobArray. Then it will attempt to loot all items in your 
| RV_LootArray. lots of things to do on this betaversion but it gets the 
| job done so far 
|------------------------------------------------------------------------------------ 

#turbo 10 

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 10000000 
|------------------------------------------------------------ 
|How far is the fast movement range? 
|------------------------------------------------------------ 
/declare RV_FastRange int outer 14 
|------------------------------------------------------------ 
|How far is the maximum combat range? 
|------------------------------------------------------------ 
/declare RV_RangeMax int outer 12 
|------------------------------------------------------------ 
|How far is the minimum combat range? 
|------------------------------------------------------------ 
/declare RV_RangeMin int outer 10 
|------------------------------------------------------------ 
|What is the minimum Z Value of mobs I should target? 
|------------------------------------------------------------ 
/declare RV_MinZRange int outer -800 
|------------------------------------------------------------ 
|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 

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

|------------------------------------------------------------ 
|Mob Array Information. 
|------------------------------------------------------------ 
/call ReadINI HunterLoot.ini "${Zone.Name}" 
/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_ObstacleCount int outer 0 

|------------------------------------------------------------ 
|------------------------------------------------------------ 
|------------------------------------------------------------ 
|------------------------------------------------------------ 

| /declare RunTime global 
| /declare HealthMin global 
| /declare HealthMax global 
| /declare DBLevel global 
| /varset RunTime 1 
| /varset MinLevel ${Calc[${Me.Level}-5]} 
| /varset MaxLevel ${Calc[${Me.Level}+6]} 

|------------------------------------------------------------ 




:Start 
/doevents 
/call GMCheck 
/call GetTarget 
/call Hpcheck 
: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 
/call ResetSub 

/varset RV_RandomWait ${Math.Rand[5]} 
/varcalc RV_RandomWait ${RV_RandomWait}+1 
|/echo Paranoia - Waiting ${RV_RandomWait} seconds before resuming 
/delay 1s 

/if (${Target.ID}) { 
/echo Looks like something is attacking us, killing it... 
/delay 1s 
/varset RV_HasTarget 1 
/goto :KillAdds 
} 

/goto :Start 

/return 

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

/declare RV_CurrentRadius int local 
/declare RV_TargetSub int local 
:Acquire 
/for RV_TargetSub 1 to ${RV_MobArray.Size} 
/for RV_CurrentRadius 100 to ${RV_MaxRadius} step 100 
/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)&&(!${RV_HurtTarget})) { 
/echo Mob NOT a Full Health, picking another... 
/varset RV_InvalidTargetID ${Target.ID} 
/call Hpcheck 
/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 Hpcheck 
/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.Name} 
/echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]} 
/warp FRONT target 
/keypress forward 
/keypress back 
/delay 1 

/return 
} 
/next RV_CurrentRadius 
/delay 2 
/next RV_TargetSub 

/if (${Int[${Target.Distance}]}>200) /warp FRONT target 
/if (!${Target.ID}) { 
/delay 5 
/varcalc RV_FailCounter ${RV_FailCounter}+1 
/echo Failed to Acquire Target in Range ${RV_MaxRadius} ${RV_FailCounter} Time(s) 
/if (${FailCounter}>=${FailMax}) { 
/echo Waiting for Respawns, Resetting Failure Counter... 
/delay 60s 
/varset FailCounter 0 
} 
/goto :Acquire 
} 
/return 

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

/if (${Int[${Target.Distance}]}>100) /warp FRONT target 
/keypress forward 
/keypress back 
/varset RV_MyXLOC ${Int[${Me.X}]} 
/varset RV_MyYLOC ${Int[${Me.Y}]} 
/varset RV_ObstacleCount 0 

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

/face fast 
/varcalc RV_ObstacleCount ${RV_ObstacleCount}+1 
/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_ObstacleCount}>=15) { 
/call CheckObstacle 
/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 
/attack off 
/keypress num_lock 
/circle on 50 
/twist 3 4 5 5 
:CombatLoop 
/doevents 
| /if (${Me.AltAbilityReady[199]}) /alt activate 199 
|/call MoveToMob 
/call Hpcheck 
/call SpecialIT 

/if (${Int[${Target.Distance}]}>600) /warp FRONT target 
|/keypress forward 
|/keypress back 
/if (!${Target.ID}) { 


/varset RV_TargetDead 1 
/varset RV_Fighting 0 
/delay 5 
/target radius 30 corpse 
/delay 5 
/if (!${Target.ID}) { 
/call Hpcheck 
/call ResetSub 
/return 
} 
/face fast 
} 
/if (!${RV_TargetDead}) { 
/goto :CombatLoop 
} 

/return 

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

/declare LootSlot int inner 0 
/declare LootCheck int inner 0 
/declare LootTotal int inner 0 

/face fast 
/call Hpcheck 
/keypress forward 
/keypress back 

/delay 5 
/loot 
/delay 5 
/if (!${Corpse.Items}) { 
|/echo NO LOOT! Cheap Bastard! 
/return 
} 

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

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

/cleanup 
/cleanup 

/varset RV_HasTarget 0 
/varset RV_TargetDead 0 
/varset RV_Fighting 0 

/return 

|-------------------------------------------------------------------------------- 
|SUB: Obstacle Check 
|-------------------------------------------------------------------------------- 
Sub CheckObstacle 

/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_ObstacleCount 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[2]}) { 
/keypress strafe_right hold 
} else { 
/keypress strafe_left hold 
} 
/delay 1s 
/keypress strafe_right 
/keypress strafe_left 
/keypress forward hold 
/keypress jump 
/return 

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

/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 

/Keypress instant_camp 
/endmacro 
} 

/return 

|-------------------------------------------------------------------------------- 
|SUB: HP CHECK 
|-------------------------------------------------------------------------------- 
Sub Hpcheck 
/if (${Me.PctHPs} <30) { 
/twist off 
/warp succor 
| uses succor to stand and heal for now. 
/circle off 
/delay 1 
/Twist 1 2 3 4 
/delay 5m 
/if (${Me.PctHPs} >90) { 
/twist 1 2 3 4 
goto start 
} 
} 
/return 




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

/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"]}) { 
/echo Declaring Mob Array... 
/declare RV_MobArray[${nValues}] string outer 
} 
/if (${FileName.Equal["HunterLoot.ini"]}) { 
/echo Declaring Loot Array... 
/declare RV_LootArray[${nValues}] string outer 
} 
/for nArray 1 to ${nValues} 
/if (${FileName.Equal["HunterMob.ini"]}) /varset RV_MobArray[${nArray}] 

${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]} 
/if (${FileName.Equal["HunterLoot.ini"]}) /varset RV_LootArray[${nArray}] 

${Ini[${FileName},${SectionName},${KeySet.Arg[${nArray},|]},NULL]} 
/next nArray 

/echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
/delay 1s 

/return 

Sub Event_Died 
/delay 10 
/sit 
/delay 10 
/camp desktop 
/end 
/return
 
Re: Redguides Listing of Confirmed Macros

Tradeskill macro (combines only) by Siddin

Rich (BB code):
#event OutOfStuff "Sorry, but you don't have everything you need for this recipe in your general inventory." 
  
Sub Main 
:Loop 
 
:ClearCursor 
/if (${Cursor.ID}) { 
/autoinventory 
/goto :ClearCursor 
} 
 
/notify COMBW_CombineArea CombineButton leftmouseup 
/doevents 
/goto :Loop 
/return 
 
Sub Event_OutOfStuff 
/endmacro 
/return
 
Re: Redguides Listing of Confirmed Macros

Velium.mac Exp/Dain Faction by Soultaker

Rich (BB code):
|Velium.mac modified from bonechips.mac
|bonechips.mac - 20 DEC 2004 
|Originally by kkmonte. Updated by Redbot for use on Redguides.com 
|USAGE: /macro velium.mac 
 
Sub Main 
/declare l0 int local 
/declare hi int local
/declare ax int local
 
:Loop 
/if (${FindItemCount[=a small piece of velium]}<1) /goto :Done 
 
/target npc Normon Stonetooth
/warp target
/say I will do a favor
/delay 1
/target npc Harkon Brightsteel
/warp target
 

/for l0 0 
   /ctrlkey /itemnotify ${FindItem[=Normon's axe].InvSlot} leftmouseup 
   /delay 20 ${Cursor.ID} 
   /delay 1 
   /if (${l0}==0) { 
      /click left target 
      /delay 20 ${Window[GiveWnd].Open} 
      /delay 1 
   } else { 
      /notify GiveWnd GVW_MyItemSlot${l0} leftmouseup 
      /delay 20 !${Cursor.ID} 
      /delay 1 
   } 
   
/if (!${FindItemCount[=Normon's axe]}) /goto :Done
 
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 20 !${Window[GiveWnd].Open} 
/delay 1 
 
:cursorclear1 
/autoinv 
/delay 1 
/if (${Cursor.ID}) /goto :cursorclear1 
 
/target npc Harkon Brightsteel
 
/for hi 0 
   /ctrlkey /itemnotify ${FindItem[=a small piece of velium].InvSlot}leftmouseup
   /delay 20 ${Cursor.ID} 
   /delay 1 
   /if (${hi}==0) { 
      /click left target 
      /delay 20 ${Window[GiveWnd].Open} 
      /delay 1 
   } else { 
      /notify GiveWnd GVW_MyItemSlot${hi} leftmouseup 
      /delay 20 !${Cursor.ID} 
      /delay 1 
   } 
   
/if (!${FindItemCount[=a small piece of velium]}) /goto :Done
 
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 20 !${Window[GiveWnd].Open} 
/delay 1 
 
:cursorclear2 
/autoinv 
/delay 1 
/if (${Cursor.ID}) /goto :cursorclear2 
 
/target npc Normon Stonetooth
/warp target
 
/for ax 0 
   /ctrlkey /itemnotify ${FindItem[=Normon's axe].InvSlot} leftmouseup 
   /delay 20 ${Cursor.ID} 
   /delay 1 
   /if (${ax}==0) { 
      /click left target 
      /delay 20 ${Window[GiveWnd].Open} 
      /delay 1 
   } else { 
      /notify GiveWnd GVW_MyItemSlot${ax} leftmouseup 
      /delay 20 !${Cursor.ID} 
      /delay 1 
   } 
 
/notify GiveWnd GVW_Give_Button leftmouseup 
/delay 20 !${Window[GiveWnd].Open} 
/delay 1 
 
:cursorclear3 
/autoinv 
/delay 1 
/if (${Cursor.ID}) /goto :cursorclear3
 
/goto :Loop 
 
:Done 
/delay 1 
/notify GiveWnd GVW_Give_Button leftmouseup 
  
/endmacro

See this thread for futher information: http://www.redguides.com/community/showthread.php?t=746
 
Re: Redguides Listing of Confirmed Macros

Rogue Macro by Jumjum5

Here is a macro that was meant to be the ultimate rogue macro but it can also be used to have any melee class follow the mob around while someone kites it. Kinda long though but here it is......

Rich (BB code):
#Chat tell 
#Event StrikeVic       "#*#Seeking a Victim#*#" 
#Event AttackOn        "#*#Auto attack is on#*#" 
#Event AttackOff       "#*#Auto attack is off#*#" 
#Event Enraged         "#*#|${Target.CleanName}| has become ENRAGED#*#" 
#Event NLEnraged       "#*#|${Target.CleanName}| is no longer enraged#*#" 
#Event TooFarAway      "#*#Your target is too far away, get closer#*#"
#Event Exp             "#*#You gain#*#experience#*#" 
#Event Slain           "#*# slain#*#"
#Event Zoned           "#*#You have entered#*#"
#Event GotHit          "#1#YOU for#*#points of damage."
#Event GotMissed       "#1#to#*#YOU, but #*#" 
#Event SpellBounced    "#*#Your spell did not take hold#*#"
#Event SwitchWeapon    "#*#|${switchtext}|#*#"
#Event FTrap           "#*#You sense a trap in this direction." 
#Event BTrap           "#*#You are certain that #*#" 
#Event TogEvade        "[MQ2] Autoevade#*#"
#Event TogPick         "[MQ2] Autopick#*#"
#Event TogStick        "[MQ2] Autostick#*#" 
#Event TogHS           "[MQ2] Auto Hide & Sneak#*#" 
#Event TogLeash        "[MQ2] Leash#*#" 
#Event TogAuto         "[MQ2] Autoassist#*#" 
#Event TogDynaggro     "[MQ2] Dynaggro#*#" 
#Event TogPause        "[MQ2] Pause#*#"
#Event TogTSwitch      "[MQ2] AutoTargetSwitch#*#"
#Event TogTraps        "[MQ2] AutoTraps#*#"
#Event TogDynclose     "[MQ2] Dynclose#*#" 
#Event LinkParse       "[MQ2] LinkParse#*#" 
#Event SetStopFighting "[MQ2] SetStopFighting#*#"
#Event SetEndFloor     "[MQ2] SetEndFloor#*#"
#Event SetStrikeDisc   "[MQ2] SetStrikeDisc#*#"
#Event SetCloseness    "[MQ2] SetCloseness#*#"
#Event SetFirstassist  "[MQ2] SetMainassist#*#"
#Event SetSecondassist "[MQ2] SetSecondassist#*#"
#Event SetThirdassist  "[MQ2] SetThirdassist#*#"
#Event SetAutoNinja    "[MQ2] SetAutoNinja#*#"
#Event SetWeaponSwitch "[MQ2] SetWeaponSwitch#*#"
#Event SetStickDist    "[MQ2] SetStickDist#*#"
#Event SetChicken      "[MQ2] SetChicken#*#"
#Event SetDisc1        "[MQ2] SetDisc1#*#"
#Event SetDisc2        "[MQ2] SetDisc2#*#"
#Event SetLeashFlex    "[MQ2] SetLeashFlex#*#"
#Event SetVerbosity    "[MQ2] SetVerbosity#*#"
#Event SetChannel      "[MQ2] SetChannel#*#"
#Event DragBodies      "[MQ2] DragBodies#*#"
#Event LootMyCorpse    "[MQ2] LootMyCorpse#*#"
#Event AutoFollow      "[MQ2] AutoFollow#*#"
#Event AddMaster       "[MQ2] AddMaster#*#"
#Event RemMaster       "[MQ2] RemoveMaster#*#"
#Event ItemSet         "[MQ2] ItemSet#*#"
#Event ItemBounce      "[MQ2] ItemBounce#*#"
#Event ItemCast        "[MQ2] ItemCast#*#"
#Event HelpInfo        "[MQ2] RH Help#*#"
#Event StatInfo        "[MQ2] RH Status#*#"

Sub Main

  /echo Loading Rogue Helper... Please Wait!

  /declare doEvade bool outer TRUE 
  /declare StopFightingHealth int outer 30 
  /declare StrikeSkill string outer Assassin 
  /declare MinEndurance int outer 80 
  /declare isEnraged bool outer FALSE 
  /declare strikeReady bool outer FALSE 
  /declare strikeTimer timer outer 0 
  /declare LDExp float outer ${Me.PctGroupLeaderExp} 
  /declare AAExp float outer ${Me.PctAAExp} 
  /declare Exp float outer ${Me.PctExp} 
  /declare doStick bool outer TRUE 
  /declare X float outer 
  /declare Y float outer 
  /declare behindTarget bool outer FALSE 
  /declare i int outer 
  /declare dir int outer 
  /declare delta int outer 
  /declare strafedir string outer 
  /declare closeness int outer 70
  /declare doHideSneak bool outer TRUE
  /declare doLeash bool outer FALSE 
  /declare leashlength int outer 0
  /declare stakeX int outer ${Me.X}
  /declare stakeY int outer ${Me.Y}
  /declare leashholder string outer Nobody
  /declare doAutoassist bool outer FALSE 
  /declare mainassist string outer Nobody
  /declare firstassist string outer Nobody
  /declare secondassist string outer Nobody
  /declare thirdassist string outer Nobody
  /declare assistpct int outer 98 
  /declare oldtargetID int outer ${Target.ID}
  /declare assisttimer timer outer 0
  /declare doDynaggro bool outer FALSE
  /declare gotHit bool outer FALSE
  /declare aggrotimer timer outer 0
  /declare ialias string outer None
  /declare doIclick bool outer FALSE
  /declare bouncenum int outer 1
  /declare ibounce string outer None
  /declare itemspellname string outer None
  /declare clicktimer timer outer 0
  /declare isPaused bool outer FALSE
  /declare ninjamode string outer OFF
  /declare ninjadist int outer 50
  /declare doPick bool outer FALSE 
  /declare doSwitch bool outer FALSE 
  /declare switchtext string outer +Undefined+
  /declare weapon1 string outer None
  /declare weapon2 string outer None
  /declare wstype string outer Detrimental
  /declare doTSwitch bool outer TRUE
  /declare lastevent string outer None
  /declare rngtarget int outer 200
  /declare rngtank int outer 100
  /declare useMU bool outer FALSE
  /declare doTraps bool outer FALSE
  /declare oldheading string outer Default
  /declare doChicken bool outer FALSE
  /declare nimblehealth int outer 20
  /declare doEscape bool outer FALSE
  /declare nimbletimer timer outer 0
  /declare nimbleactive timer outer 0
  /declare chickentimer timer outer 0
  /declare doDisc1 bool outer FALSE
  /declare disc1 string outer Deadly Precision
  /declare disc1end int outer 60
  /declare disc1reuse int outer 5
  /declare disc1reusetimer timer outer 0
  /declare doDisc2 bool outer FALSE
  /declare disc2 string outer Kinesthetics
  /declare disc2end int outer 60
  /declare disc2reuse int outer 5
  /declare disc2reusetimer timer outer 0
  /declare discactive timer outer 0
  /declare leashflex int outer 10
  /declare doDynclose bool outer TRUE
  /declare closenessdesired int outer 70
  /declare acquiretimer timer outer 0
  /declare snuggleup bool outer FALSE
  /declare isTanking bool outer FALSE
  /declare verbosity int outer 2
  /declare channel string outer echo
  /declare rhversion string outer 6.0

  /goto :BypassVCheck
  |- Check versions and load aliases if necessary
  /if (${Ini[RHSettings.ini,General,Version].Equal[${rhversion}]}) /goto :EndAlias
  :BypassVCheck

  /if (${verbosity}>=0) /${channel} Setting Aliases...
  /squelch /alias /status /echo RH Status
  /squelch /alias /rhhelp /echo RH Help
  /squelch /alias /autoevade /echo Autoevade
  /squelch /alias /autopick /echo Autopick
  /squelch /alias /stopfight /echo SetStopFighting
  /squelch /alias /strikedisc /echo SetStrikeDisc
  /squelch /alias /endfloor /echo SetEndFloor
  /squelch /alias /autostick /echo Autostick 
  /squelch /alias /autohs /echo Auto Hide & Sneak
  /squelch /alias /leash /echo Leash 
  /squelch /alias /autoassist /echo Autoassist 
  /squelch /alias /dynaggro /echo Dynaggro
  /squelch /alias /closeness /echo SetCloseness
  /squelch /alias /mainassist /echo SetMainassist
  /squelch /alias /secondassist /echo SetSecondassist
  /squelch /alias /thirdassist /echo SetThirdassist
  /squelch /alias /drag /echo DragBodies
  /squelch /alias /lootmycorpse /echo LootMyCorpse
  /squelch /alias /autofollow /echo AutoFollow
  /squelch /alias /iset /echo ItemSet
  /squelch /alias /ibounce /echo ItemBounce
  /squelch /alias /iclick /echo ItemCast
  /squelch /alias /pause /echo Pause
  /squelch /alias /autoninja /echo SetAutoNinja
  /squelch /alias /addmaster /echo AddMaster
  /squelch /alias /remmaster /echo RemoveMaster
  /squelch /alias /weaponswitch /echo SetWeaponSwitch
  /squelch /alias /targetswitch /echo AutoTargetSwitch
  /squelch /alias /stickdist /echo SetStickDist
  /squelch /alias /autotraps /echo AutoTraps
  /squelch /alias /autochicken /echo SetChicken
  /squelch /alias /autodisc1 /echo SetDisc1
  /squelch /alias /autodisc2 /echo SetDisc2
  /squelch /alias /leashflex /echo SetLeashFlex
  /squelch /alias /verbosity /echo SetVerbosity
  /squelch /alias /channel /echo SetChannel
  /squelch /alias /dynclose /echo Dynclose
  /squelch /alias /lp /echo LinkParse

  :EndAlias

  |-- Update the Version information
  /ini "RHSettings.ini" "General" "Version" "${rhversion}"

  |-- Read in INI settings, if defined...  Leashing is only stored TRUE if there is a Leash-holding Master!
  /if (${Ini[RHSettings.ini,General,AutoEvade].NotEqual[NULL]}) /varset doEvade ${Ini[RHSettings.ini,General,AutoEvade]}
  /if (${Ini[RHSettings.ini,General,StopFightingHealth].NotEqual[NULL]}) /varset StopFightingHealth ${Ini[RHSettings.ini,General,StopFightingHealth]}
  /if (${Ini[RHSettings.ini,General,StrikeSkill].NotEqual[NULL]}) /varset StrikeSkill ${Ini[RHSettings.ini,General,StrikeSkill]}    
  /if (${Ini[RHSettings.ini,General,MinEndurance].NotEqual[NULL]}) /varset MinEndurance ${Ini[RHSettings.ini,General,MinEndurance]}    
  /if (${Ini[RHSettings.ini,General,AutoStick].NotEqual[NULL]}) /varset doStick ${Ini[RHSettings.ini,General,AutoStick]} 
  /if (${Ini[RHSettings.ini,General,Closeness].NotEqual[NULL]}) /varset closeness ${Ini[RHSettings.ini,General,Closeness]} 
  /if (${Ini[RHSettings.ini,General,AutoHideSneak].NotEqual[NULL]}) /varset doHideSneak ${Ini[RHSettings.ini,General,AutoHideSneak]}
  /if (${Ini[RHSettings.ini,General,Leashing].NotEqual[NULL]}) /varset doLeash ${Ini[RHSettings.ini,General,Leashing]} 
  /if (${Ini[RHSettings.ini,General,LeashHolder].NotEqual[NULL]}) /varset leashholder ${Ini[RHSettings.ini,General,LeashHolder]} 
  /if (${Ini[RHSettings.ini,General,LeashLength].NotEqual[NULL]}) /varset leashlength ${Ini[RHSettings.ini,General,LeashLength]} 
  /if (${Ini[RHSettings.ini,General,LeashFlex].NotEqual[NULL]}) /varset leashflex ${Ini[RHSettings.ini,General,LeashFlex]}
  /if (${Ini[RHSettings.ini,General,AutoAssist].NotEqual[NULL]}) /varset doAutoassist ${Ini[RHSettings.ini,General,AutoAssist]} 
  /if (${Ini[RHSettings.ini,General,AssistPercentage].NotEqual[NULL]}) /varset assistpct ${Ini[RHSettings.ini,General,AssistPercentage]} 
  /if (${Ini[RHSettings.ini,General,MainAssist].NotEqual[NULL]}) /varset mainassist ${Ini[RHSettings.ini,General,MainAssist]} 
  /if (${Ini[RHSettings.ini,General,MainAssist].NotEqual[NULL]}) /varset firstassist ${Ini[RHSettings.ini,General,MainAssist]}
  /if (${Ini[RHSettings.ini,General,SecondAssist].NotEqual[NULL]}) /varset secondassist ${Ini[RHSettings.ini,General,SecondAssist]} 
  /if (${Ini[RHSettings.ini,General,ThirdAssist].NotEqual[NULL]}) /varset thirdassist ${Ini[RHSettings.ini,General,ThirdAssist]} 
  /if (${Ini[RHSettings.ini,General,DynamicAggro].NotEqual[NULL]}) /varset doDynaggro ${Ini[RHSettings.ini,General,DynamicAggro]} 
  /if (${Ini[RHSettings.ini,General,AutoNinjaMode].NotEqual[NULL]}) /varset ninjamode ${Ini[RHSettings.ini,General,AutoNinjaMode]} 
  /if (${Ini[RHSettings.ini,General,AutoNinjaDistance].NotEqual[NULL]}) /varset ninjadist ${Ini[RHSettings.ini,General,AutoNinjaDistance]} 
  /if (${Ini[RHSettings.ini,General,AutoPickPocket].NotEqual[NULL]}) /varset doPick ${Ini[RHSettings.ini,General,AutoPickPocket]}
  /if (${Ini[RHSettings.ini,General,WeaponSwitching].NotEqual[NULL]}) /varset doSwitch ${Ini[RHSettings.ini,General,WeaponSwitching]}
  /if (${Ini[RHSettings.ini,General,TargetSwitching].NotEqual[NULL]}) /varset doTSwitch ${Ini[RHSettings.ini,General,TargetSwitching]}
  /if (${Ini[RHSettings.ini,General,StickRangeToTarget].NotEqual[NULL]}) /varset rngtarget ${Ini[RHSettings.ini,General,StickRangeToTarget]}
  /if (${Ini[RHSettings.ini,General,StickRangeToTank].NotEqual[NULL]}) /varset rngtank ${Ini[RHSettings.ini,General,StickRangeToTank]}
  /if (${Ini[RHSettings.ini,General,TrapNegotiation].NotEqual[NULL]}) /varset doTraps ${Ini[RHSettings.ini,General,TrapNegotiation]}
  /if (${Ini[RHSettings.ini,General,AutoChicken].NotEqual[NULL]}) /varset doChicken ${Ini[RHSettings.ini,General,AutoChicken]}
  /if (${Ini[RHSettings.ini,General,NimbleHealth].NotEqual[NULL]}) /varset nimblehealth ${Ini[RHSettings.ini,General,NimbleHealth]}
  /if (${Ini[RHSettings.ini,General,ContingencyEscape].NotEqual[NULL]}) /varset doEscape ${Ini[RHSettings.ini,General,ContingencyEscape]}
  /if (${Ini[RHSettings.ini,General,AutoDisc1].NotEqual[NULL]}) /varset doDisc1 ${Ini[RHSettings.ini,General,AutoDisc1]}
  /if (${Ini[RHSettings.ini,General,Disc1].NotEqual[NULL]}) /varset disc1 ${Ini[RHSettings.ini,General,Disc1]}
  /if (${Ini[RHSettings.ini,General,Disc1Endurance].NotEqual[NULL]}) /varset disc1end ${Ini[RHSettings.ini,General,Disc1Endurance]}
  /if (${Ini[RHSettings.ini,General,Disc1Reuse].NotEqual[NULL]}) /varset disc1reuse ${Ini[RHSettings.ini,General,Disc1Reuse]}
  /if (${Ini[RHSettings.ini,General,AutoDisc2].NotEqual[NULL]}) /varset doDisc2 ${Ini[RHSettings.ini,General,AutoDisc2]}
  /if (${Ini[RHSettings.ini,General,Disc2].NotEqual[NULL]}) /varset disc2 ${Ini[RHSettings.ini,General,Disc2]}
  /if (${Ini[RHSettings.ini,General,Disc2Endurance].NotEqual[NULL]}) /varset disc2end ${Ini[RHSettings.ini,General,Disc2Endurance]}
  /if (${Ini[RHSettings.ini,General,Disc2Reuse].NotEqual[NULL]}) /varset disc2reuse ${Ini[RHSettings.ini,General,Disc2Reuse]}
  /if (${Ini[RHSettings.ini,General,DynamicCloseness].NotEqual[NULL]}) /varset dynclose ${Ini[RHSettings.ini,General,DynamicCloseness]}
  /if (${Ini[RHSettings.ini,General,Verbosity].NotEqual[NULL]}) /varset verbosity ${Ini[RHSettings.ini,General,Verbosity]}
  /if (${Ini[RHSettings.ini,General,Channel].NotEqual[NULL]}) /varset channel ${Ini[RHSettings.ini,General,Channel]}
  /if (${Ini[RHSettings.ini,Weapons,Weapon1].NotEqual[NULL]}) /varset weapon1 ${Ini[RHSettings.ini,Weapons,Weapon1]}
  /if (${Ini[RHSettings.ini,Weapons,Weapon2].NotEqual[NULL]}) /varset weapon2 ${Ini[RHSettings.ini,Weapons,Weapon2]}
  /if (${Ini[RHSettings.ini,Weapons,SwitchText].NotEqual[NULL]}) /varset switchtext ${Ini[RHSettings.ini,Weapons,SwitchText]}
  /varset closenessdesired ${closeness}
  /varset wstype ${FindItem[${weapon1}].Spell.SpellType}

  |- Build Empty master list in RHSettings.ini file if it doesn't exist
  /if (!${Ini[RHSettings.ini,Masters,Controller1].Length}) {
    |- It's not in there yet
    /for i 1 to 20
      /ini "RHSettings.ini" "Masters" "Controller${i}" "Nobody"
    /next i
  }

  /echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
  /echo Jerle's Rogue Helper Macro (v${rhversion}) Starting... 
  /echo =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
  /echo Use "/rhhelp" to display help information
  /echo RH Status

  :ForeverLoop 

   |- Service any events 

   /doevents 
    
   |- If we're stunned or RH is paused, just service events 

   /if (${Me.State.Equal[STUN]} || ${isPaused}) {
     /delay 2
     /goto :ForeverLoop 
   }

   |- While fighting or not fighting...

   |- Turn attacking back on if enraged target, and no longer facing it
   /if (${isEnraged} && ${Target.ID} && ${doAutoassist} && !${Me.Combat}) {
     /call Check_Behind
     /varset behindTarget ${Macro.Return} 
     /if (${Target.ID} && ${behindTarget}) {
       /attack on
       /if (${verbosity}>=1) /${channel} ** Attack re-started (No Enrage Risk): ${Target.CleanName}
     }  
   }

   |- Check if we should chicken out
   /if (${doChicken} && (${Me.PctHPs}<=${nimblehealth}) && !${chickentimer}) {
     /if (${verbosity}>=1) /${channel} Autochicken to the rescue!
     /if (!${nimbletimer}) {
       /disc nimble
       /if (${verbosity}>=1) /${channel} Nimble mode activated!
       /varset nimbletimer 21m
       /varset nimbleactive 12s
     } else /if (${Me.AltAbilityReady[Escape]} && !${nimbleactive}) {
       /if (${verbosity}>=1) /${channel} Contingency Escape activated! (Nimble expired/unavailable)
       /attack off
       /alt activate 102 
       /varset chickentimer 30s
     } else {
       /if (${verbosity}>=1) /${channel} ... or not! Can't escape, can't nimble... Farewell!
       /varset chickentimer 2m
     }
   }

   |- Stop fighting if we lose our target
   /if (${Me.Combat} && !${Target.ID}) /attack off 

   |- Are we suposed to stick to a target?
   /if ((${Me.Combat} || ${strikeReady}) && ${Target.ID} && ${doStick} && (${Target.Distance}<${rngtarget}) && ${Target.Type.Equal[NPC]}) { 
     
     |- Check to see if we're too far from our tank (if applicable)
     /if (${doAutoassist} && (${Spawn[${mainassist}].Distance}>${rngtank})) {
       /if (${useMU} && ${Stick.Status.Equal[ON]}) /squelch /stick off
       /goto :DoneSticking
     }
  
     |- Check to see if we're mounted and dismount if so
     /if (${Me.Buff[Summon Drogmor].ID} || ${Me.Buff[Summon Horse].ID}) /dismount

     |- Use MQ2MoveUtils ? If so, start sticking and bypass RH movement tools
     /if (${useMU}) {
       /varset isTanking FALSE
       /if (${aggrotimer.Value} || ${Me.TargetOfTarget.Name.Equal[${Me}]}) /varset isTanking TRUE
       /if (!${Stick.Status.Equal[ON]} || ${snuggleup}) {
         /if (${isTanking}) {
           /squelch /stick ${closeness}% mpause ${If[${Me.Swimming},uw,]}
         } else {
           /squelch /stick ${closeness}% behind mpause ${If[${Me.Swimming},uw,]}
         }
         /varset snuggleup FALSE
       } else {
         /if (${Stick.MoveBehind}) {
           /if (${isTanking}) {
             /squelch /stick off
             /if (${verbosity}>=2) /${channel} Switched to frontal sticking...
           }
         } else {
           /if (!${isTanking}) {
             /squelch /stick off
             /if (${verbosity}>=2) /${channel} Maneuvering behind target again...
           }
         }
       }
       /goto :DoneSticking
     }

     /if (${Target.ID}) /face ${If[${Me.Swimming},,nolook]} 

     |- If we're too far away to hit it, get 1 second closer, unless we can hit it in less time 
     /if (${Target.Distance}>${Math.Calc[${Target.MaxRangeTo}*${closeness}/100]}) { 

       |- Set current position first before potentially moving (in case we get stuck) 
       /varset X ${Me.X} 
       /varset Y ${Me.Y}  

       /if (!${Target.ID}) /goto :Foreverloop 

       |- Move
       /keypress forward hold 
       /delay 1s ${Target.Distance}<${Math.Calc[${Target.MaxRangeTo}*${closeness}/100]} 
       /keypress forward 

       |- Check to see if we got stuck trying that 
       /if ((${Me.X}==${X}) && (${Me.Y}==${Y})) { 
         |- We're stuck, back off a second, move left or right (randomly) for .5 seconds 
         /if (${verbosity}>=2) /${channel} We're STUCK on something, backing up... 
         /keypress back hold 
         /delay 1s 
         /keypress back 
         /if (${Math.Rand[2]}) { 
           /varset strafedir STRAFE_LEFT 
         } else { 
           /varset strafedir STRAFE_RIGHT 
         } 
         /if (${verbosity}>=2) /${channel} Unsticking: Strafing ${strafedir} a half-second... 
         /keypress ${strafedir} hold 
         /delay 5 
         /keypress ${strafedir} 
       } 
     } 

     /if (!${Target.ID}) /goto :Foreverloop 

     |- If we are close enough to hit it (and don't have aggro), lets try to get behind it a little bit at a time 

     /if ((${Target.Distance}<=${Target.MaxRangeTo}) && !${aggrotimer.Value} && !${Me.TargetOfTarget.Name.Equal[${Me}]}) { 
        
       /call Check_Behind
       /varset behindTarget ${Macro.Return}    

       |- If we're not behind it, strafe around it a little 
       /if (!${behindTarget}) { 
         |- Which way do we strafe? 
         /varcalc delta ${Me.Heading.Clock}-${Target.Heading.Clock} 
         /if (${delta}>6) /varcalc delta ${delta}-12 
         /if (${delta}<-6) /varcalc delta ${delta}+12 
         /if (${delta}<0) { 
           /varset strafedir STRAFE_LEFT 
         } else { 
           /varset strafedir STRAFE_RIGHT 
         } 
         |- Set current position first before moving (in case we get stuck) 
         /varset X ${Me.X} 
         /varset Y ${Me.Y}    
 
         /if (!${Target.ID}) /goto :Foreverloop  

         |- Execute a strafe in the correct direction 
         /keypress ${strafedir} hold 
         /delay 2
         /keypress ${strafedir} 
         /if (${Target.ID}) /face fast ${If[${Me.Swimming},,nolook]} 
         |- Check if we're stuck and warn if so (go through target to fix it)
         /if ((${Me.X}==${X}) && (${Me.Y}==${Y})) { 
           /if (${verbosity}>=2) /${channel} We're STUCK trying to get behind target!
           /delay 1s
         } 
       } 
     } 
   } else {
     /if (${useMU} && ${Stick.Status.Equal[ON]}) /squelch /stick off
   }
   :DoneSticking

   |- Check on switching weapons (assuming it's a buff-weapon and buff is down)

   /if (${doSwitch} && ${wstype.Equal[Beneficial]}) {
     /varset itemspellname ${FindItem[${weapon1}].Spell}
     /if (${itemspellname.NotEqual[${Me.Buff[${itemspellname}]}]} && !${FindItem[${weapon1}].InvSlot.Name.Equal[mainhand]} && !${FindItem[${weapon1}].InvSlot.Name.Equal[offhand]}) {
       /if (${verbosity}>=1) /${channel} ** Beneficial proc-weapon swapping...
       /call Weapon_Swap "${weapon1}" "${weapon2}"
     }
   }

    |- Are we fighting? 

    /if (${Me.Combat}) { 
     |- ** We are fighting ** 

     |- Respond to enraged targets
     /if (${isEnraged} && ${Target.ID}) {
       /call Check_Behind
       /varset behindTarget ${Macro.Return} 
       /if (${Target.ID} && !${behindTarget}) {
         /attack off
         /if (${verbosity}>=1) /${channel} ** Attack ceased (Enrage Risk): ${Target.CleanName}
       }  
     }

     |- If we're sneaking, stop... since it serves no purpose and affects strafing
     /if (${Me.Sneaking}) /doability "Sneak"  

     |- Check up on our autoassist targets if applicable, and switch if MA switches (1 second checks)
     /if (${doTSwitch} && ${doAutoassist} && ${Target.ID} && !${assisttimer}) {
       /varset oldtargetID ${Target.ID}
       /assist ${mainassist}
       /varset assisttimer 1s
     }

     |- Did we just switch targets?  If so, turn off attack and start the loop over!
     /if (${doAutoassist} && ${Target.ID}!=${oldtargetID}) {
       /if (${verbosity}>=1) /${channel} --> *SWITCH* target to: ${Target.CleanName}
       /varset oldtargetID ${Target.ID}
       /attack off
       /delay 2
       /varset assisttimer 1s
       /goto :ForeverLoop
     }

     |- Check for leash tugging and move back to stake some if so 
     /if (${doLeash}) { 
       /if (${leashholder.Equal[Nobody]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${leashlength})) {
         /if (${verbosity}>=2) /${channel} CHOKE! We're at the leash's length! (${leashlength} ft.) 
         /if (${verbosity}>=1) /${channel} ** Autoassist is now OFF!
         /varset doAutoassist FALSE 
         /attack off
         /if (${useMU}) /squelch /stick off
         /face ${If[${Me.Swimming},,nolook]} loc ${stakeY},${stakeX} 
         /keypress forward hold 
         /delay 1s ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<${Math.Calc[${leashlength}*${leashflex}/100]}
         /keypress forward         
         |- Slow 180degree turns take time, and we may have turned off attack, so...
         /goto :ForeverLoop
       }
       /if (!${leashholder.Equal[Nobody]} && ${Spawn[${leashholder}].ID} && (${Spawn[${leashholder}].Distance}>${leashlength})) {
         /if (${verbosity}>=2) /${channel} CHOKE! Tugging on ${leashholder}'s leash! (${leashlength} ft.) 
         /if (${verbosity}>=1) /${channel} ** Autoassist is now OFF!
         /varset doAutoassist FALSE 
         /attack off
         /if (${useMU}) /squelch /stick off
         /squelch /face ${If[${Me.Swimming},,nolook]} id ${Spawn[${leashholder}].ID}
         /keypress forward hold 
         /delay 1s ${Spawn[${leashholder}].Distance}<${Math.Calc[${leashlength}*${leashflex}/100]}
         /keypress forward         
         |- Slow 180degree turns take time, and we may have turned off attack, so...
         /goto :ForeverLoop
       }
       |- Broken leash check
       /if (!${leashholder.Equal[Nobody]} && !${Spawn[${leashholder}].ID}) {
         /if (${verbosity}>=1) /${channel} ** Master DEAD or ZONED! Leash is BROKEN! 
         /varset doLeash FALSE
         /varset leashholder Nobody
         /ini "RHSettings.ini" "General" "Leashing" "${doLeash}" 
         /ini "RHSettings.ini" "General" "LeashHolder" "${leashholder}" 
         /goto :ForeverLoop
       }
     } 

     |- Are we standing, have a target, have backstab ready and can we stick it in the back? 

     /call Check_Behind
     /varset behindTarget ${Macro.Return} 
     /if (${Target.ID} && ${Me.Standing} && !${Me.Casting.ID} && ${behindTarget} && (${Target.Distance}<${Math.Calc[${Target.MaxRangeTo}*${closeness}/100]})) { 
       /if (${Me.AbilityReady["Backstab"]}) { 
         /doability "Backstab" 
         /if (${verbosity}>=2) /${channel} Backstabbing: ${Target.CleanName} 
       } 
     } 

     |- Are we tanking?  If so, just stab it in the face if we can! 

     /if (${Target.ID} && ${Me.Standing} && !${Me.Casting.ID} && (${aggrotimer.Value} || ${Me.TargetOfTarget.Name.Equal[${Me}]})) { 
       /if (${Me.AbilityReady["Backstab"]} && ${InvSlot[mainhand].Item.Type.Equal[Piercing]}) { 
         /doability "Backstab" 
         /if (${verbosity}>=1) /${channel} Tanking -> Facestabbing: ${Target.CleanName} 
       } 
     } 

     |- Can we evade?  Should we?

     /if (${doEvade} && ${Target.ID} && !${Me.Casting.ID} && ${Me.AbilityReady["Hide"]} && (!${Me.Moving} || ${Me.AltAbilityReady[Nimble Evasion]})) { 
       /if (${verbosity}>=2) /${channel} Evading ${Target.CleanName}
       /attack off 
       /delay 1 
       /doability "Hide" 
       /attack on 
     } 

     |- What's it got in it's pocketses?

     /if (${doPick} && ${Target.ID} && !${Me.Casting.ID} && (${Target.Distance}<15) && ${Me.AbilityReady["Pick Pockets"]}) {
       /if (${verbosity}>=2) /${channel} Pick-pocketing ${Target.CleanName}
       /attack off
       /delay 1
       /doability "Pick Pockets"
       /attack on
       /delay 1
       /if (${Cursor.ID}) /autoinv     
     }

     |- Are we so hurt we should stop fighting for a bit? 

     /if (${Me.PctHPs}<=${StopFightingHealth}) { 
       /attack off 
       /if (${verbosity}>=1) /${channel} Getting my ass kicked, ceasing combat! 
     } 

     |- Shall we do our optional discs?

     /if (${doDisc1} && !${disc1reusetimer} && !${discactive} && !${strikeTimer} && ${Target.ID} && ${Target.PctHPs}>=50 && ${Me.PctEndurance}>=${disc1end}) {
       /disc ${disc1}
       /if (${verbosity}>=1) /${channel} Disc #1: ${disc1} activated
       /delay 1s
       /varset discactive 1m
       /varset disc1reusetimer ${disc1reuse}m
     }

     /if (${doDisc2} && !${disc2reusetimer} && !${discactive} && !${strikeTimer} && ${Target.ID} && ${Target.PctHPs}>=50 && ${Me.PctEndurance}>=${disc2end}) {
       /disc ${disc2}
       /if (${verbosity}>=1) /${channel} Disc #2: ${disc2} activated
       /delay 1s
       /varset discactive 1m
       /varset disc2reusetimer ${disc2reuse}m
     }

    } else { 
     |- ** We are not fighting

     |- If we're not hiding or moving, check clicky maintained spells
     /if (${Me.Invis} || ${Me.Moving} || ${clicktimer} || ${Me.State.Equal[BIND]}) /goto :DoneItemChecks
     /varset i 1
     :ItemCheckLoop
     /varset ialias ${Ini[RHItems.ini].Arg[${i},|]}
     /if (${ialias.NotEqual[NULL]}) {
       |- Obtained an itemalias from the RHItems.ini file
       |- We supposed to keep this spell up?
       /if (${Ini[RHItems.ini,${ialias},KeepUp].Equal[FALSE]}) /goto :NextItem
       |- Scan the item's bounce list for the active bouncers
       /varset bouncenum 1
       /varset doIclick TRUE
       :BounceCheckLoop
       /varset ibounce ${Ini[RHItems.ini,${ialias},BounceOff${bouncenum}]}
       /if (${ibounce.NotEqual[NULL]}) {
         /if (${ibounce.Equal[${Me.Buff[${ibounce}]}]}) /varset doIclick FALSE
       } else /goto :DoneBounceChecks
       /varcalc bouncenum ${bouncenum}+1
       /goto :BounceCheckLoop
       :DoneBounceChecks
       |- By now we won't click the item if a bouncer spell is on us
       |- Just have to check to see if the existing buff is on too
       /varset itemspellname ${FindItem[${Ini[RHItems.ini,${ialias},FullName]}].Spell}
       /if (${itemspellname.Equal[${Me.Buff[${itemspellname}]}]}) /varset doIclick FALSE
       |- Finally, do it if we should
       /if (${doIclick}) /docommand /iclick ${ialias}
       |- Did we fail to find that previous item? (i.e. Dead and naked at bind point!)
       /if (${clicktimer}) /goto :DoneItemChecks
       :NextItem
       /varcalc i ${i}+1
     } else /goto :DoneItemChecks
     /goto :ItemCheckLoop
     :DoneItemChecks

     |- Put the closeness value back to the user's desired setting...
     /varset closeness ${closenessdesired}

     |- Lets hide and sneak if not already and we're set to do so ** 

     /if (${doHideSneak} && ${Me.AbilityReady["Sneak"]} && !${Me.Casting.ID} && ${Me.State.NotEqual[BIND]} && !${Window[TradeWnd].Open} && !${Window[MerchantWnd].Open} && !${Window[BigBankWnd].Open}) /doability "Sneak" 
     /if (${doHideSneak} && ${Me.AbilityReady["Hide"]} && !${Me.Casting.ID} && ${Me.Sneaking} && (!${Me.Moving} || ${Me.AltAbilityReady[Nimble Evasion]}) && ${Me.State.NotEqual[BIND]} && !${Window[TradeWnd].Open} && !${Window[MerchantWnd].Open} && !${Window[BigBankWnd].Open}) /doability "Hide" 

     |- It's possible we're poised for a Strike, check and fight if so 

     /call Check_Behind
     /varset behindTarget ${Macro.Return} 
     /if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Me.Standing} && ${Me.State.NotEqual[BIND]} && !${Me.Casting.ID} && ${behindTarget}) { 
       /if (${strikeReady} && ${Me.AbilityReady["Backstab"]}) { 
         /doability "Backstab" 
         /if (${verbosity}>=1) /${channel} Executing a strike: ${Target.CleanName} 
         /varset strikeReady FALSE 
         /attack on 
       } 
     } 

     |- It's also possible we never got behind a target and strike expired! 

     /if (${strikeReady} && ${Target.ID} && !${strikeTimer.Value} && ${Target.Type.Equal[NPC]}) { 
       /if (${verbosity}>=2) /${channel} Didn't find the back of a target in 30 seconds! 
       /varset strikeReady FALSE 
       /attack on 
     } 

     |- If we're set to autoassist, lets find a target 
     /if (${doAutoassist} && !${isEnraged} && !${Me.Casting.ID} && ${Me.State.NotEqual[BIND]}) { 
       |- Is main assist alive/in-zone? 
       /if (!${assisttimer} && !${strikeReady}) { 
         |- Lets try all the assists in priority order until we get an NPC to whack on
         /if (!${Me.Casting.ID}) /assist ${firstassist}
         /delay 1
         /if (${Target.ID} && ${Target.Type.Equal[NPC]}) /goto :EngageCheck
         /if (!${Me.Casting.ID}) /assist ${secondassist} 
         /delay 1
         /if (${Target.ID} && ${Target.Type.Equal[NPC]}) /goto :EngageCheck
         /if (!${Me.Casting.ID}) /assist ${thirdassist} 
         /delay 1
         /if (${Target.ID} && ${Target.Type.Equal[NPC]}) /goto :EngageCheck
         |- If we got here and don't have a target, tanks are invalid or no fighting is going on
         /goto :EndAutoassist
         :EngageCheck
         /varset oldtargetID ${Target.ID}
         /varset assisttimer ${Math.Calc[10+${Math.Rand[5]}].Int}
         |- Who is the valid tank?
         /if (${firstassist.Equal[Main]} || (${Math.Distance[${Target.Y},${Target.X}:${Spawn[pc ${firstassist}].Y},${Spawn[pc ${firstassist}].X}]}<${Target.MaxRangeTo})) {
           /varset mainassist ${firstassist}
           /goto :LastAttackCheck
         }
         /if (${secondassist.Equal[Main]} || (${Math.Distance[${Target.Y},${Target.X}:${Spawn[pc ${secondassist}].Y},${Spawn[pc ${secondassist}].X}]}<${Target.MaxRangeTo})) {
           /varset mainassist ${secondassist}
           /goto :LastAttackCheck
         }
         /if (${thirdassist.Equal[Main]} || (${Math.Distance[${Target.Y},${Target.X}:${Spawn[pc ${thirdassist}].Y},${Spawn[pc ${thirdassist}].X}]}<${Target.MaxRangeTo})) {
           /varset mainassist ${thirdassist}
           /goto :LastAttackCheck
         }
         /goto :EndAutoassist
         :LastAttackCheck
         |- Do we have an NPC targeted and is it hurt enough to attack? 
         /if (${Target.PctHPs}<=${assistpct} && ${Target.Animation}!=32 && ${Target.Animation}!=110) { 
           /if (${verbosity}>=1) /${channel} --> Assisting ${mainassist} on ${Target.CleanName} @ (${Target.PctHPs}%) HPs 
           /echo Seeking a Victim... 
           /goto :Foreverloop      
         } 
       } 
     } 
     :EndAutoassist

     |- Are we supposed to look for traps?
     /if (${doTraps}) {
       /varset oldheading ${Me.Heading.DegreesCCW}
       /if (${Me.AbilityReady["Sense Traps"]}) {
         /doability "Sense Traps"
         /if (${verbosity}>=2) /${channel} Looking for traps... 
       }
     }

     |- We could be on a leash, if so move 1s closer to our stake point (or master)\\

     /if (${doLeash} && !${strikeReady}) { 
       /varset lastevent Event_Leashing
       :LeashStart
       |- Look for new events
       /doevents
       /if (!${lastevent.Equal[Event_Leashing]}) /goto :ForeverLoop
       /if (${Me.Combat}) /goto :ForeverLoop
       /if (${leashholder.Equal[Nobody]} && (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}>${Math.Calc[${leashlength}*${leashflex}/100]})) {
         /if (${verbosity}>=2) /${channel} Moving closer to the Stake... ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]} ft. away 
         /face ${If[${Me.Swimming},,nolook]} loc ${stakeY},${stakeX} 
         /keypress forward hold 
         /delay 1s ${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<${Math.Calc[${leashlength}*${leashflex}/100]}
         /keypress forward 
         /if (${Math.Distance[${Me.Y},${Me.X}:${stakeY},${stakeX}]}<${Math.Calc[${leashlength}*${leashflex}/100]}) {
           /if (${verbosity}>=2) /${channel} Arrived near enough to the Stake. 
           /face fast ${If[${Me.Swimming},,nolook]} away loc ${stakeY},${stakeX}
           /goto :LeashEnd
         }
         /goto :LeashStart
       }
       /if (!${leashholder.Equal[Nobody]} && ${Spawn[${leashholder}].ID} && (${Spawn[${leashholder}].Distance}>${Math.Calc[${leashlength}*${leashflex}/100]})) {
         /if (${verbosity}>=2) /${channel} Moving closer to ${leashholder}... ${Spawn[${leashholder}].Distance} ft. away 
         /if (${Target.ID}!=${Spawn[${leashholder}].ID}) /target id ${Spawn[${leashholder}].ID}
         /if (${Me.Combat}) /attack off
         /face ${If[${Me.Swimming},,nolook]}
         /keypress forward hold 
         /delay 1s ${Spawn[${leashholder}].Distance}<${Math.Calc[${leashlength}*${leashflex}/100]}  
         /keypress forward 
         /if (${Spawn[${leashholder}].Distance}<${Math.Calc[${leashlength}*${leashflex}/100]}) {
           /if (${verbosity}>=2) /${channel} Arrived near enough to Master (${leashholder}). 
           /goto :LeashEnd
         }
         /goto :LeashStart
       }
       |- Broken leash check
       /if (!${leashholder.Equal[Nobody]} && !${Spawn[${leashholder}].ID}) {
         /if (${verbosity}>=1) /${channel} ** Master DEAD or ZONED! Leash is BROKEN! 
         /varset doLeash FALSE
         /varset leashholder Nobody
         /ini "RHSettings.ini" "General" "Leashing" "${doLeash}" 
         /ini "RHSettings.ini" "General" "LeashHolder" "${leashholder}" 
         /goto :LeashEnd
       }
       :LeashEnd
     } 
   } 
  /goto :ForeverLoop 
/return 

|---- SUBROUTINES

Sub Check_Behind
  /declare behindIt FALSE 
  |- Are we behind our target? 
  /for i -1 to 1 
    /varcalc dir (${Target.Heading.Clock}+${i})%12 
    /if (${dir}<1) /varcalc dir ${dir}+12 
    /if (${dir}>12) /varcalc dir ${dir}-12 
    /if (${dir} == ${Me.Heading.Clock}) /varset behindIt TRUE 
  /next i    
/return ${behindIt}

Sub Weapon_Swap(string weapon, string wieldedweapon)
  |- Is it in a Bag?
  /declare camefrom ${FindItem[${weapon}].InvSlot}
  /declare goingto ${FindItem[${wieldedweapon}].InvSlot}
  /if (${verbosity}>=2) /${channel} ** Looking for weapon: ${weapon}
  /if (${FindItem[${weapon}].InvSlot.Pack}) {
    :OpenPack
    /if (!${Window[${FindItem[${weapon}].InvSlot.Pack.Name}].Open}) {
      /itemnotify ${FindItem[${weapon}].InvSlot.Pack.Name} rightmouseup
      /delay 2
      /goto :OpenPack
    } 
    :GrabItem
    /if (!${Cursor.ID}) {
      /itemnotify ${InvSlot[${camefrom}]} leftmouseup
      /delay 2
      /goto :GrabItem
    }
    /declare weaponID int local ${Cursor.ID}
    :SwapIt
    /if (${Cursor.ID}==${weaponID}) {
      /itemnotify ${InvSlot[${goingto}]} leftmouseup
      /delay 2
      /goto :SwapIt
    }
    /delay 2
    /if (${verbosity}>=2) /${channel} ** Swapping out: ${weapon}
    /itemnotify ${InvSlot[${camefrom}]} leftmouseup
    /delay 2
    /if (${Cursor.ID}) {
      /if (${verbosity}>=1) /${channel} ** Failed to use existing slot, dropping to inventory!
      /autoinv
    }
    :ClosePack
    /if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) {
      /itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup
      /delay 2
      /goto :ClosePack
    }
  } else {
    |- It's in the main inventory
    /if (${FindItem[${weapon}].InvSlot}) {
      /itemnotify ${FindItem[${weapon}].InvSlot} leftmouseup
      /delay 2
      /itemnotify ${InvSlot[${goingto}]} leftmouseup
      /delay 2
      /if (${verbosity}>=2) /${channel} ** Swapping out: ${weapon}
      /itemnotify ${InvSlot[${camefrom}]} leftmouseup
      /delay 2
      /if (${Cursor.ID}) {
        /if (${verbosity}>=1) /${channel} ** Failed to use existing slot, dropping to inventory!
        /autoinv
      }
    } else {
      /if (${verbosity}>=1) /${channel} ** "${weapon}" not found!
    }
  }
/return

Sub NinjaLoot
  |- Ninja the corpse's loot, if applicable
  /if (${ninjamode.NotEqual[OFF]}) {
    /declare LootTotal int local -1
    /declare LootSlot int local
    |- Get NPC corpse on target and continue if possible
    /squelch /target npc corpse radius ${ninjadist} 
    /if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) { 
      /if (${verbosity}>=1) /${channel} ** NPC corpse out of range or already looted! 
      /return
    }   
    |- Get 5 seconds (max) closer; warning, no detecting being stuck!
    /face ${If[${Me.Swimming},,nolook]} fast
    /keypress forward hold 
    /delay 5s ${Target.Distance}<5 
    /keypress forward 
    |- Open up the loot window
    /loot 
    /delay 1s
    /if (${Me.State.NotEqual[BIND]}) {
      /if (${verbosity}>=1) /${channel} ** Massive lag or error getting to corpse.  Aborting!
      /return
    }
    /if (${verbosity}>=1) /${channel} ** Looting ${Target.CleanName}  
    |- Get item count accurately  
    :LootLag 
    /if (${LootTotal}!=${Corpse.Items}) { 
      /varset LootTotal ${Corpse.Items} 
      /delay 5 
      /goto :LootLag 
    } 
    /if (!${LootTotal}) {
      /if (${verbosity}>=1) /${channel} ** Empty corpse!
      /goto :DoneLooting
    }
    |- Loot Loop
    /for LootSlot 1 to ${LootTotal} 
      |- Check for full inventory
      /if (!${Me.FreeInventory}) {
        /beep
        /if (${verbosity}>=1) /${channel} ** INVENTORY FULL !
        /varset ninjamode OFF
        /if (${verbosity}>=1) /${channel} ** AutoNinja is now OFF!
        /goto :DoneLooting
      }
      |- Loot item if we should, skip it if not
      /if (${Corpse.Item[${LootSlot}].ID}) {
        /if (!${Corpse.Item[${LootSlot}].NoDrop}) /goto :LootItem
        /if (${Corpse.Item[${LootSlot}].NoDrop} && ${ninjamode.Equal[ALL]}) {
          /if (${verbosity}>=1) /${channel} ** Looting NODROP Item: ${Corpse.Item[${LootSlot}].Name}
          /goto :LootItem
        }
      }
      /if (${verbosity}>=1) /${channel} ** Skipping Item: ${Corpse.Item[${LootSlot}].Name}
      /goto :SkipIt
      :LootItem 
      /itemnotify loot${LootSlot} rightmouseup 
      /delay 3
      /if (${Corpse.Item[${LootSlot}].ID}) { 
        /delay 2
        /goto :LootItem
      } 
      :SkipIt
    /next LootSlot
    /if (${verbosity}>=1) /${channel} ** Done looting ${Target.CleanName}
    :DoneLooting
    /delay 5
    /notify LootWnd DoneButton leftmouseup 
    /delay 5
  }
/return

|---- EVENTS

Sub Event_StrikeVic 
  /varset lastevent Event_StrikeVic 
  |- Is strike disc available, are we hiding/sneaking and do we have enough endurance to use it? 
  /if ((${Me.Invis} && ${Me.PctEndurance}>=${MinEndurance}) && !${strikeTimer.Value}) { 
    /if (${verbosity}>=2) /${channel} Taking careful aim: ${Target.CleanName} 
    /varset strikeTimer 30s 
    /disc ${StrikeSkill} 
    /varset strikeReady TRUE 
  } else { 
    |- Guess not, just attack normally then 
    /attack on 
    /varset strikeReady FALSE 
  } 
/return 

Sub Event_AttackOn 
  /varset lastevent Event_AttackOn
  /if (${verbosity}>=1) /${channel} Autoattack activated! Target: ${Target.CleanName}
  /varset acquiretimer 2s
/return 

Sub Event_AttackOff 
  /varset lastevent Event_AttackOff
  /if (${verbosity}>=1) /${channel} Autoattack turned off! Target: ${Target.CleanName} 
/return 

Sub Event_Enraged 
  /varset lastevent Event_Enraged
  /if (${verbosity}>=1) /${channel} Enrage detected! Target: ${Target.CleanName} 
  /varset isEnraged TRUE 
/return 

Sub Event_NLEnraged 
  /varset lastevent Event_NLEnraged
  /if (${verbosity}>=1) /${channel} Enrage done! Target: ${Target.CleanName} 
  /varset isEnraged FALSE 
  /if (${Target.ID} && ${doAutoassist}) /attack on 
/return 

Sub Event_Exp(string Line)
  /varset lastevent Event_Exp
  |- Ignore leadership experience event triggers (redundant trigger)
  /if (${Line.Find[leadership]}) /return

  |- Manage aggro control here optionally
  /if (${doDynaggro} && ${doAutoassist}) {
    /if (${gotHit}) {
      |- Got hurt that fight, drop it 1%
      /if (${assistpct}>1) /varcalc assistpct ${assistpct}-1
      /varset gotHit FALSE
      /if (${verbosity}>=1) /${channel} ** Had Aggro! Reducing assist% to ${assistpct}%
    } else {
      |- Did not get hurt that fight, raise it 1%
      /if (${assistpct}<99) /varcalc assistpct ${assistpct}+1
      /if (${verbosity}>=1) /${channel} ** No Aggro! Raising assist% to ${assistpct}%
    }
  }

  |- Experience calculation and reporting
  /if (${verbosity}>=1) /${channel} ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%) 
  /varset LDExp ${Me.PctGroupLeaderExp} 
  /varset AAExp ${Me.PctAAExp} 
  /varset Exp ${Me.PctExp} 

  |- If target died while enraged, reset it so autoassist isn't broken...
  /varset isEnraged FALSE 

  |- Do weapon swapping (back to weapon1), if applicable
  /if (${doSwitch} && ${wstype.Equal[Detrimental]}) {
    /call Weapon_Swap "${weapon1}" "${weapon2}"
  } 
/return 

Sub Event_Slain
  /varset lastevent Event_Slain
  /call NinjaLoot
/return

Sub Event_Zoned
  /varset lastevent Event_Zoned
  /if (${verbosity}>=1) /${channel} ** Zoned... Setting Leash and Autoassist to OFF!
  /varset doLeash FALSE
  /varset doAutoassist FALSE
  /ini "RHSettings.ini" "General" "AutoAssist" "${doAutoassist}"
  /ini "RHSettings.ini" "General" "Leashing" "${doLeash}" 
/return 

Sub Event_TooFarAway
  /varset lastevent Event_TooFarAway
  /if (${doDynclose} && !${acquiretimer}) {
    /if (${verbosity}>=1) /${channel} ** Too far away - Getting 20% closer now!
    /varset closeness ${Math.Calc[${closeness}*0.8].Int}
    /if (${closeness}<20) /varset closeness 20
    /varset acquiretimer 2s
    /varset snuggleup TRUE
  }
/return 

Sub Event_FTrap
  /varset lastevent Event_FTrap
  /if (${verbosity}>=1) /${channel} ** Floor Trap discovered...
  /if (${Me.AbilityReady[Disarm Traps]}) { 
    /if (${verbosity}>=2) /${channel} ** Disarming...
    /doability "Disarm Traps" 
  } else {
    /if (${verbosity}>=2) /${channel} ** Can't disarm yet...
  } 
  |- Face our "old" heading, in case we were spun around
  /face nolook fast heading ${oldheading}
/return 

Sub Event_BTrap
  /varset lastevent Event_FTrap
  /if (${verbosity}>=1) /${channel} ** Box Trap (${Target.CleanName}) discovered...
  /if (${Me.AbilityReady[Disarm Traps]}) { 
    /if (${verbosity}>=2) /${channel} ** Disarming...
    /doability "Disarm Traps" 
  } else {
    /if (${verbosity}>=2) /${channel} ** Can't disarm yet...
  } 
  |- Face our "old" heading, in case we were spun around
  /face nolook fast heading ${oldheading}
/return 

Sub Event_TogEvade
  /varset lastevent Event_TogEvade
  /if (${doEvade}) { 
    /varset doEvade FALSE 
    /if (${verbosity}>=1) /${channel} ** Auto-Evading target is now OFF! 
  } else { 
    /varset doEvade TRUE 
    /if (${verbosity}>=1) /${channel} ** Auto-Evading target is now ON! 
  } 
  /ini "RHSettings.ini" "General" "AutoEvade" "${doEvade}"
/return 

Sub Event_SetStopFighting(string Line)
  /varset lastevent Event_SetStopFighting
  /if (${Line.Arg[3].Length}) /varset StopFightingHealth ${Line.Arg[3]}
  /if ((${StopFightingHealth}<0) || (${StopFightingHealth}>100)) {
    /if (${verbosity}>=0) /${channel} Whacko stopfighting percentage input! Defaulting...
  }
  /if (${verbosity}>=0) /${channel} ** Cease Combat when at: ${StopFightingHealth}% HP 
  /ini "RHSettings.ini" "General" "StopFightingHealth" "${StopFightingHealth}"
/return

Sub Event_SetStrikeDisc(string Line)
  /varset lastevent Event_SetStrikeDisc
  /if (${Line.Arg[3].Length}) /varset StrikeSkill ${Line.Arg[3]}
  /if (${verbosity}>=0) /${channel} ** Strike Discipline set to: "${StrikeSkill}"
  /ini "RHSettings.ini" "General" "StrikeSkill" "${StrikeSkill}"
/return

Sub Event_SetEndFloor(string Line)
  /varset lastevent Event_SetEndFLoor
  /if (${Line.Arg[3].Length}) /varset MinEndurance ${Line.Arg[3]}
  /if ((${MinEndurance}<0) || (${MinEndurance}>101)) {
    /if (${verbosity}>=0) /${channel} Whacko endurance percentage input! Defaulting...
  }
  /if (${verbosity}>=0) /${channel} ** Endurance Floor: ${MinEndurance}% 
  /ini "RHSettings.ini" "General" "MinEndurance" "${MinEndurance}"
/return

Sub Event_TogStick 
  /varset lastevent Event_TogStick
  /if (${doStick}) { 
    /varset doStick FALSE 
    /if (${verbosity}>=0) /${channel} ** Auto-Sticking target is now OFF! 
  } else { 
    /varset doStick TRUE 
    /if (${verbosity}>=0) /${channel} ** Auto-Sticking target is now ON! 
  } 
  /ini "RHSettings.ini" "General" "AutoStick" "${doStick}"
/return 

Sub Event_TogHS 
  /varset lastevent Event_TogHS
  /if (${doHideSneak}) { 
    /varset doHideSneak FALSE 
    /if (${verbosity}>=0) /${channel} ** Auto-Hiding & Sneaking is now OFF! 
  } else { 
    /varset doHideSneak TRUE 
    /if (${verbosity}>=0) /${channel} ** Auto-Hiding & Sneaking is now ON! 
  } 
  /ini "RHSettings.ini" "General" "AutoHideSneak" "${doHideSneak}"
/return 

Sub Event_TogLeash(string Line) 
  /varset lastevent Event_TogLeash
  /if (${Line.Arg[3].Equal[ON]}) { 
    /varset doLeash TRUE
    /if (${verbosity}>=0) /${channel} ** Leashing is now ON!
    /ini "RHSettings.ini" "General" "Leashing" "${doLeash}" 
  } else /if (${Line.Arg[3].Equal[OFF]} || (${Int[${Line.Arg[3]}]}<=0)) { 
    /varset doLeash FALSE 
    /varset leashholder Nobody
    /if (${verbosity}>=0) /${channel} ** Leashing is now OFF!
    /ini "RHSettings.ini" "General" "Leashing" "${doLeash}" 
  } else { 
    /if (${Line.Arg[4].Length}) {
      /varset leashholder ${Line.Arg[4]}
      /if (${Spawn[${leashholder}].ID}) {
        /varset doLeash TRUE
        /varset leashlength ${Int[${Line.Arg[3]}]}
        /if (${verbosity}>=0) /${channel} ** Leashing is now ON! Leashlength: ${leashlength} ft. 
        /if (${verbosity}>=0) /${channel} ** Leash-holding master is: ${leashholder}
        /ini "RHSettings.ini" "General" "Leashing" "${doLeash}" 
      } else {
        |- This spawn/thing/target doesn't exist
        /if (${verbosity}>=0) /${channel} ** Can't find "${leashholder}" -- Who is that?!
        /if (${verbosity}>=0) /${channel} ** Leashing is now OFF! 
        /varset doLeash FALSE 
        /varset leashholder Nobody
      }
    } else {
      /varset doLeash TRUE 
      /varset leashholder Nobody
      /varset leashlength ${Int[${Line.Arg[3]}]} 
      /varset stakeX ${Me.X} 
      /varset stakeY ${Me.Y} 
      /if (${verbosity}>=0) /${channel} ** Leashing is now ON! Leashlength: ${leashlength} ft. 
      /if (${verbosity}>=0) /${channel} ** Stake planted at X:${stakeX}, Y:${stakeY} 
    }
  } 
  /ini "RHSettings.ini" "General" "LeashHolder" "${leashholder}" 
  /ini "RHSettings.ini" "General" "LeashLength" "${leashlength}" 
/return 

Sub Event_SetLeashFlex(string Line)
  /varset lastevent Event_SetLeashFlex
  /if (${Line.Arg[3].Length}) /varset leashflex ${Line.Arg[3]}
  /if ((${leashflex}<10) || (${leashflex}>101)) {
    /if (${verbosity}>=0) /${channel} Leash flexibility must be between 10 and 100! Defaulting to 10...
    /varset leashflex 10
  }
  /if (${verbosity}>=0) /${channel} ** Leash Flexibility: ${leashflex}% 
  /ini "RHSettings.ini" "General" "LeashFlex" "${leashflex}"
/return

Sub Event_TogAuto(string Line) 
  /varset lastevent Event_TogAuto
  /if (${Line.Arg[3].Equal[OFF]}) { 
    /varset doAutoassist FALSE 
    /if (${verbosity}>=0) /${channel} ** Autoassist is now OFF! 
  } else /if (${Line.Arg[3].Equal[ON]}) {
    /varset doAutoassist TRUE 
    /if (${verbosity}>=0) /${channel} ** Autoassist is now ON! 
  } else { 
    /varset doAutoassist TRUE 
    /if (${Line.Arg[3].Length}) /varset firstassist ${Line.Arg[3]} 
    /varset mainassist ${firstassist} 
    /if (${Line.Arg[4]} > 0) /varset assistpct ${Line.Arg[4]} 
    /if (${verbosity}>=0) /${channel} ** Autoassist is now ON! 
    /if (${verbosity}>=0) /${channel} ** Assisting: ${mainassist} @${assistpct}% target health 
    /if (${verbosity}>=0) /${channel} ** SA is ${secondassist} & TA is ${thirdassist}
  } 
  /ini "RHSettings.ini" "General" "AutoAssist" "${doAutoassist}"
  /ini "RHSettings.ini" "General" "MainAssist" "${firstassist}"
  /ini "RHSettings.ini" "General" "AssistPercentage" "${assistpct}"
/return 

Sub Event_TogPause 
  /varset lastevent Event_TogPause
  /beep
  /if (${isPaused}) { 
    /varset isPaused FALSE 
    /if (${verbosity}>=0) /${channel} ** Rogue Helper is now RESUMING! 
  } else { 
    /varset isPaused TRUE 
    /if (${verbosity}>=0) /${channel} ** Rogue Helper is now PAUSED!
  } 
/return 

Sub Event_TogDynaggro 
  /varset lastevent Event_TogDynaggro
  /if (${doDynaggro}) { 
    /varset doDynaggro FALSE 
    /if (${verbosity}>=0) /${channel} ** Dynamic Aggro Control is now OFF! 
  } else { 
    /varset doDynaggro TRUE 
    /if (${verbosity}>=0) /${channel} ** Dynamic Aggro Control is now ON! 
  } 
  /ini "RHSettings.ini" "General" "DynamicAggro" "${doDynaggro}"
/return 

Sub Event_TogDynclose
  /varset lastevent Event_TogDynclose
  /if (${doDynclose}) { 
    /varset doDynclose FALSE 
    /if (${verbosity}>=0) /${channel} ** Dynamic Closeness Control is now OFF! 
  } else { 
    /varset doDynclose TRUE 
    /if (${verbosity}>=0) /${channel} ** Dynamic Closeness Control is now ON! 
  } 
  /ini "RHSettings.ini" "General" "DynamicCloseness" "${doDynclose}"
/return 

Sub Event_TogPick
  /varset lastevent Event_TogPick
  /if (${doPick}) { 
    /varset doPick FALSE 
    /if (${verbosity}>=0) /${channel} ** Auto-Pickpocketing is now OFF! 
  } else { 
    /varset doPick TRUE 
    /if (${verbosity}>=0) /${channel} ** Auto-Pickpocketing is now ON! 
  } 
  /ini "RHSettings.ini" "General" "AutoPickPocket" "${doPick}"
/return 

Sub Event_TogTSwitch 
  /varset lastevent Event_TogTSwitch
  /if (${doTSwitch}) { 
    /varset doTSwitch FALSE 
    /if (${verbosity}>=0) /${channel} ** Auto-Target Switching is now OFF! 
  } else { 
    /varset doTSwitch TRUE 
    /if (${verbosity}>=0) /${channel} ** Auto-Target Switching is now ON! 
  } 
  /ini "RHSettings.ini" "General" "TargetSwitching" "${doTSwitch}"
/return 

Sub Event_TogTraps 
  /varset lastevent Event_TogTraps
  /if (${doTraps}) { 
    /varset doTraps FALSE 
    /if (${verbosity}>=0) /${channel} ** Auto-Trap Negotiation is now OFF! 
  } else { 
    /varset doTraps TRUE 
    /if (${verbosity}>=0) /${channel} ** Auto-Trap Negotiation is now ON! 
  } 
  /ini "RHSettings.ini" "General" "TrapNegotiation" "${doTraps}"
/return 

Sub Event_SetCloseness(string Line)
  /varset lastevent Event_SetCloseness
  /if (${Line.Arg[3].Length}) /varset closeness ${Line.Arg[3]}
  /if ((${closeness}<1) || (${closeness}>100)) {
    /if (${verbosity}>=0) /${channel} Whacko closeness percentage input! Defaulting...
    /varset closeness 70
  }
  /varset closenessdesired ${closeness}
  /if (${verbosity}>=0) /${channel} ** AutoStick: ${doStick}, Closeness: ${closeness}
  /ini "RHSettings.ini" "General" "Closeness" "${closeness}"
/return

Sub Event_SetFirstassist(string Line)
  /varset lastevent Event_SetFirstassist
  /if (${Line.Arg[3].Length}) /varset firstassist ${Line.Arg[3]}
  /varset mainassist ${firstassist}
  /if (${verbosity}>=0) /${channel} ** Assisting: ${mainassist} @${assistpct}% target health 
  /if (${verbosity}>=0) /${channel} ** SA is ${secondassist} & TA is ${thirdassist}
  /ini "RHSettings.ini" "General" "MainAssist" "${firstassist}"
/return

Sub Event_SetSecondassist(string Line)
  /varset lastevent Event_SetSecondassist
  /if (${Line.Arg[3].Length}) /varset secondassist ${Line.Arg[3]}
  /if (${verbosity}>=0) /${channel} ** Assisting: ${mainassist} @${assistpct}% target health 
  /if (${verbosity}>=0) /${channel} ** SA is ${secondassist} & TA is ${thirdassist}
  /ini "RHSettings.ini" "General" "SecondAssist" "${secondassist}"
/return

Sub Event_SetThirdassist(string Line)
  /varset lastevent Event_SetThirdassist
  /if (${Line.Arg[3].Length}) /varset thirdassist ${Line.Arg[3]}
  /if (${verbosity}>=0) /${channel} ** Assisting: ${mainassist} @${assistpct}% target health 
  /if (${verbosity}>=0) /${channel} ** SA is ${secondassist} & TA is ${thirdassist}
  /ini "RHSettings.ini" "General" "ThirdAssist" "${thirdassist}"
/return

Sub Event_SetAutoNinja(string Line) 
  /varset lastevent Event_SetAutoNinja
  |- Set the new ninja distance, if supplied
  /if (${Line.Arg[4].Length}) /varset ninjadist ${Line.Arg[4]}
  |- Set the mode, toggle off if unknown
  /if (${Line.Arg[3].Equal[ALL]}) { 
    /varset ninjamode ALL
    /if (${verbosity}>=0) /${channel} ** AutoNinja ON - Will loot ALL items 
    /docommand /lootnodrop never
  } else /if ((${Line.Arg[3].Equal[DROP]}) || (${Line.Arg[3].Equal[DROPABLE]})) { 
    /varset ninjamode DROPABLE
    /if (${verbosity}>=0) /${channel} ** AutoNinja ON - Will loot only DROPABLE items
    /docommand /lootnodrop never
  } else {
    /varset ninjamode OFF
    /if (${verbosity}>=0) /${channel} ** AutoNinja is now OFF!
  }
  /if (${verbosity}>=0) /${channel} ** AutoNinja distance is ${ninjadist} ft.
  /ini "RHSettings.ini" "General" "AutoNinjaMode" "${ninjamode}"
  /ini "RHSettings.ini" "General" "AutoNinjaDistance" "${ninjadist}"
/return 

Sub Event_SetWeaponSwitch(string Line) 
  /varset lastevent Event_SetWeaponSwitch
  |- Sanity Check
  /if (${Line.Arg[3].Equal[OFF]} || !${Line.Arg[5].Length} || ${Line.Arg[6].Length}) { 
    /varset doSwitch FALSE
    /if (${verbosity}>=0) /${channel} ** Auto Weapon Switching is OFF
    /goto :SaveSwitchSettings
  }
  |- Set the weaponswitching information
  /if (${Line.Arg[3].Length}) /varset weapon1 ${Line.Arg[3]}
  /if (${Line.Arg[4].Length}) /varset switchtext ${Line.Arg[4]}
  /if (${Line.Arg[5].Length}) /varset weapon2 ${Line.Arg[5]}
  /varset doSwitch TRUE  
  /if (${verbosity}>=0) /${channel} ** Auto Weapon Switching is ON
  /if (${verbosity}>=0) /${channel} ** ${weapon1} will be swapped out for ${weapon2}
  /if (${verbosity}>=0) /${channel} ** if the text "${switchtext}" is encountered.

  :SaveSwitchSettings
  /doevents flush
  /ini "RHSettings.ini" "General" "WeaponSwitching" "${doSwitch}"
  /ini "RHSettings.ini" "Weapons" "Weapon1" "${weapon1}"
  /ini "RHSettings.ini" "Weapons" "Weapon2" "${weapon2}"
  /ini "RHSettings.ini" "Weapons" "SwitchText" "${switchtext}"
  /varset wstype ${FindItem[${weapon1}].Spell.SpellType}
/return 

Sub Event_SetStickDist(string Line) 
  /varset lastevent Event_SetStickDist
  |- Sanity Check
  /if (!${Line.Arg[3].Length} || !${Line.Arg[4].Length}) { 
    /if (${verbosity}>=0) /${channel} ** What? Bad Syntax.
    /if (${verbosity}>=0) /${channel} Syntax:
    /if (${verbosity}>=0) /${channel} /stickdist <range_to_target> <range_to_tank>
    /return
  }
  |- Set the weaponswitching information
  /varset rngtarget ${Line.Arg[3]}
  /varset rngtank ${Line.Arg[4]}
  /if (${verbosity}>=0) /${channel} ** Auto Stick: ${doStick}, Closeness: ${closeness}% MaxRange
  /if (${verbosity}>=0) /${channel} ** -- Range to Target: ${rngtarget} -- Range to Tank: ${rngtank}
  /ini "RHSettings.ini" "General" "StickRangeToTarget" "${rngtarget}"
  /ini "RHSettings.ini" "General" "StickRangeToTank" "${rngtank}"
/return 

Sub Event_SetChicken(string Line) 
  /varset lastevent Event_SetChicken
  /if (${Line.Arg[3].Equal[OFF]}) { 
    /varset doChicken FALSE 
    /if (${verbosity}>=0) /${channel} ** Autochicken is now OFF! 
  } else /if (${Line.Arg[3].Equal[ON]}) {
    /varset doChicken TRUE 
    /if (${verbosity}>=0) /${channel} ** Autochicken is now ON! 
  } else { 
    /varset doChicken TRUE 
    /if (${Line.Arg[3].Length}) /varset nimblehealth ${Line.Arg[3]} 
    /if (${Line.Arg[4].Equal[ESCAPE]}) {
      /varset doEscape TRUE
    } else {
      /varset doEscape FALSE
    }
    /if (${verbosity}>=0) /${channel} ** Auto Chicken: ${doChicken} -- Nimble: ${nimblehealth}% Escape: ${doEscape}
  } 
  /ini "RHSettings.ini" "General" "AutoChicken" "${doChicken}"
  /ini "RHSettings.ini" "General" "NimbleHealth" "${nimblehealth}"
  /ini "RHSettings.ini" "General" "ContingencyEscape" "${doEscape}"
/return 

Sub Event_SetDisc1(string Line) 
  /varset lastevent Event_SetDisc1
  /if (${Line.Arg[3].Equal[OFF]}) { 
    /varset doDisc1 FALSE 
    /if (${verbosity}>=0) /${channel} ** Autodisc #1 is now OFF! 
  } else /if (${Line.Arg[3].Equal[ON]}) {
    /varset doDisc1 TRUE 
    /if (${verbosity}>=0) /${channel} ** Autodisc #1 is now ON! 
  } else { 
    /varset doDisc1 TRUE 
    /if (${Line.Arg[3].Length}) /varset disc1 ${Line.Arg[3]} 
    /if (${Line.Arg[4]} > 0) /varset disc1end ${Line.Arg[4]} 
    /if (${Line.Arg[5]} > 0) /varset disc1reuse ${Line.Arg[5]} 
    /if (${verbosity}>=0) /${channel} ** Auto Disc #1: ${doDisc1} -> ${disc1}/${disc1reuse} mins - End: ${disc1end}
  } 
  /ini "RHSettings.ini" "General" "AutoDisc1" "${doDisc1}"
  /ini "RHSettings.ini" "General" "Disc1" "${disc1}"
  /ini "RHSettings.ini" "General" "Disc1Endurance" "${disc1end}"
  /ini "RHSettings.ini" "General" "Disc1Reuse" "${disc1reuse}"
/return

Sub Event_SetDisc2(string Line) 
  /varset lastevent Event_SetDisc2
  /if (${Line.Arg[3].Equal[OFF]}) { 
    /varset doDisc2 FALSE 
    /if (${verbosity}>=0) /${channel} ** Autodisc #2 is now OFF! 
  } else /if (${Line.Arg[3].Equal[ON]}) {
    /varset doDisc2 TRUE 
    /if (${verbosity}>=0) /${channel} ** Autodisc #2 is now ON! 
  } else { 
    /varset doDisc2 TRUE 
    /if (${Line.Arg[3].Length}) /varset disc2 ${Line.Arg[3]} 
    /if (${Line.Arg[4]} > 0) /varset disc2end ${Line.Arg[4]} 
    /if (${Line.Arg[5]} > 0) /varset disc2reuse ${Line.Arg[5]} 
    /if (${verbosity}>=0) /${channel} ** Auto Disc #2: ${doDisc2} -> ${disc2}/${disc2reuse} mins - End: ${disc2end}
  } 
  /ini "RHSettings.ini" "General" "AutoDisc2" "${doDisc2}"
  /ini "RHSettings.ini" "General" "Disc2" "${disc2}"
  /ini "RHSettings.ini" "General" "Disc2Endurance" "${disc2end}"
  /ini "RHSettings.ini" "General" "Disc2Reuse" "${disc2reuse}"
/return

Sub Event_SetVerbosity(string Line)
  /varset lastevent Event_SetVerbosity
  /if (${Line.Arg[3].Length}) /varset verbosity ${Line.Arg[3]}
  /if ((${verbosity}<0) || (${verbosity}>2)) {
    /if (${verbosity}>=0) /${channel} Verbosity must be between 0 and 2! Defaulting to 2...
    /varset verbosity 2
  }
  /if (${verbosity}>=0) /${channel} ** Verbosity Level: ${verbosity}
  /ini "RHSettings.ini" "General" "Verbosity" "${verbosity}"
/return

Sub Event_SetChannel(string Line)
  /varset lastevent Event_SetChannel
  /if (${Line.Arg[3].Length}) /varset channel ${Line.Arg[3]}
  /if (${verbosity}>=0) /${channel} ** RH Output Channel: ${channel}
  /ini "RHSettings.ini" "General" "Channel" "${channel}"
/return

Sub Event_SwitchWeapon
  /varset lastevent Event_SwitchWeapon
  /if (${doSwitch}) {
    /call Weapon_Swap "${weapon2}" "${weapon1}"
  } 
/return 

Sub Event_GotHit
  /varset lastevent Event_GotHit
  /if (!${aggrotimer}) /if (${verbosity}>=1) /${channel} ** AGGRO Detected (struck) **
  /varset gotHit TRUE
  /varset aggrotimer 5s
/return 

Sub Event_GotMissed
  /varset lastevent Event_GotMissed
  /if (!${aggrotimer}) /if (${verbosity}>=1) /${channel} ** AGGRO Detected (whiff) **
  /varset gotHit TRUE
  /varset aggrotimer 5s
/return 

Sub Event_SpellBounced
  /varset lastevent Event_SpellBounced
  /varset clicktimer 60s
  /beep
  /beep
  /beep
  /if (${verbosity}>=1) /${channel} ** Just detected a BOUNCED spell!
  /if (${verbosity}>=1) /${channel} ** Use /ibounce to update click-item info!
/return 

Sub Event_DragBodies(string Line)
  /varset lastevent Event_DragBodies
  /declare ArgNum int local 3
  /declare bodycount int local

  :CountCorpses
  /if (${Line.Arg[${ArgNum}].Length}) {
    |- There's a body name for this argument
    /varcalc ArgNum ${ArgNum}+1
    /goto :CountCorpses
  }  
  /varcalc ArgNum ${ArgNum}-1

  /if (${ArgNum}==2) { 
    /if (${verbosity}>=0) /${channel} ** No corpse names supplied!
    /return
  } else {
    /if (${verbosity}>=0) /${channel} ** Target self (F1) to stop dragging!
  }
  :DragLoop 
  /for bodycount 3 to ${ArgNum} 
    /if (${Target.CleanName.Equal[${Me.Name}]}) {
      /if (${verbosity}>=0) /${channel} ** Body dragging ceased.
      /goto :CeaseDragging
    }
    /target ${Line.Arg[${bodycount}]}'s 
    /corpse
    |- Lower this delay at your own risk; too many /corpse commands too fast = cheater!
    /delay 4
  /next bodycount
  /goto :DragLoop
  :CeaseDragging
/return

Sub Event_LootMyCorpse
  /varset lastevent Event_LootMyCorpse
  |- Logic ripped off from Loot.mac and simplified somewhat
  /declare LootTotal int local 0
  /declare LootSlot int local
  |- Get corpse on target and continue looting if possible
  /squelch /target mycorpse 
  /if (${Target.Type.NotEqual[CORPSE]} || !${Target.ID}) { 
    /if (${verbosity}>=0) /${channel} ** Can't target my corpse. 
    /return
  }   
  /corpse 
  /delay 1s
  /loot 
  /delay 1s
  /if (${Me.State.NotEqual[BIND]}) {
    /if (${verbosity}>=0) /${channel} ** Massive lag right now... Aborting looting.
    /return
  }
  |- Get item count accurately
  :LootLag 
  /if (${LootTotal}!=${Corpse.Items}) { 
    /varset LootTotal ${Corpse.Items} 
    /delay 5 
    /goto :LootLag 
  } 
  |- Loot Loop
  /for LootSlot 1 to ${LootTotal} 
    :LootItem 
    /itemnotify loot${LootSlot} rightmouseup 
    /delay 3
    /if (${Corpse.Item[${LootSlot}].ID}) { 
      /delay 2
      /goto :LootItem
    } 
  /next LootSlot
  /delay 5
  /if (${verbosity}>=0) /${channel} ** Done looting my corpse.
  /notify LootWnd DoneButton leftmouseup 
/return

Sub Event_AutoFollow(string Line)
  /varset lastevent Event_AutoFollow
  /declare distance int local 30
  /if (${Ini[RHSettings.ini,General,FollowDistance].NotEqual[NULL]}) /varset distance ${Ini[RHSettings.ini,General,FollowDistance]} 
  /if (${Line.Arg[3].Length}) /target ${Line.Arg[3]}
  /if (${Line.Arg[4].Length}) /varset distance ${Line.Arg[4]}
  /if (${distance}<10) /varset distance 10
  /ini "RHSettings.ini" "General" "FollowDistance" "${distance}" 
  /if (${Target.ID}) {
    /if (${verbosity}>=0) /${channel} ** Autofollow on: ${Target.CleanName} (${distance} ft.)
    /if (${verbosity}>=0) /${channel} ** Change targets to stop autofollowing.
  } else {
    /if (${verbosity}>=0) /${channel} ** Can't activate Autofollow -- no valid target!
    /return
  }
  /declare followID int local ${Target.ID}
  :FollowingLoop
  |- Look for new events
  /doevents
  /if (!${lastevent.Equal[Event_AutoFollow]}) {
    /if (${verbosity}>=0) /${channel} ** Autofollow blocked by: ${lastevent}
    /goto :StopFollowing
  }
  /if (${Target.ID}==${followID}) {
    /if (${Target.ID}) /face fast
    /if (${Target.Distance}>${distance}) {
      /keypress forward hold 
      /delay 1s ${Target.Distance}<=${distance} 
      /keypress forward 
    }
    /goto :FollowingLoop
  }
  :StopFollowing
  /if (${verbosity}>=0) /${channel} ** Autofollow ended.
/return

Sub Event_ItemSet(string Line)
  /varset lastevent Event_ItemSet
  |- Sanity check parameters
  /if (!${Line.Arg[5].Length} || ${Line.Arg[6].Length}) {
    /if (${verbosity}>=0) /${channel} ** Improper use of /iset
    /if (${verbosity}>=0) /${channel} -- /iset <itemalias> keepup|nokeepup <"Item Name">
    /if (${verbosity}>=0) /${channel} -- For example:
    /if (${verbosity}>=0) /${channel} -- /iset gobby keepup "Shrunken Goblin Skull Earring"
    /return 
  }
  /ini "RHItems.ini" "${Line.Arg[3]}" "FullName" "${Line.Arg[5]}"  
  /ini "RHItems.ini" "${Line.Arg[3]}" "KeepUp" "${If[${Line.Arg[4].Equal[keepup]},TRUE,FALSE]}"
  /if (${verbosity}>=0) /${channel} ** ${Line.Arg[5]} (KeepUp=${If[${Line.Arg[4].Equal[keepup]},TRUE,FALSE]}) updated in INI!
/return

Sub Event_ItemBounce(string Line)
  /varset lastevent Event_ItemBounce
  |- Sanity check parameters
  /if (!${Line.Arg[4].Length}) {
    /if (${verbosity}>=0) /${channel} ** Improper use of /ibounce
    /if (${verbosity}>=0) /${channel} -- /ibounce <itemalias> "Some Spell Name"
    /if (${verbosity}>=0) /${channel} -- For example:
    /if (${verbosity}>=0) /${channel} -- /ibounce gobby "Strength of Tunare"
    /return 
  }
  |- Look for that item's section, return if non-existent
  /if (!${Ini[RHItems.ini,${Line.Arg[3]}].Length}) {
    /if (${verbosity}>=0) /${channel} ** [${Line.Arg[3]}] not in INI file!
    /return
  }
  |- Find the next available BounceOff key number and store the spell
  /declare bindex int local 1
  :CheckNextKey
  /if (${Ini[RHItems.ini,${Line.Arg[3]},BounceOff${bindex}].Length}) {
    |- This one is in use...
    /varcalc bindex ${bindex}+1
    /goto :CheckNextKey
  } else {
    |- This one not defined (yet).  Good.
    /ini "RHItems.ini" "${Line.Arg[3]}" "BounceOff${bindex}" "${Line.Arg[4]}"  
    /if (${verbosity}>=0) /${channel} ** Added "${Line.Arg[4]}" to [${Line.Arg[3]}]'s bounce list
  }
/return

Sub Event_ItemCast(string Line)
  /varset lastevent Event_ItemCast
  |- Sanity check parameter
  /if (!${Line.Arg[3].Length}) {
    /if (${verbosity}>=0) /${channel} ** Improper use of /icast
    /if (${verbosity}>=0) /${channel} -- /icast <itemalias>
    /if (${verbosity}>=0) /${channel} -- For example:
    /if (${verbosity}>=0) /${channel} -- /icast gobby
    /return 
  }
  |- Look for that item's section, return if non-existent
  /if (!${Ini[RHItems.ini,${Line.Arg[3]}].Length}) {
    /if (${verbosity}>=0) /${channel} ** [${Line.Arg[3]}] not in INI file!
    /return
  }
  /declare fullname string local ${Ini[RHItems.ini,${Line.Arg[3]},FullName]}
  |- Is it in a Bag?
  /if (${verbosity}>=1) /${channel} ** Attempting to use: ${fullname}
  /if (${FindItem[${fullname}].InvSlot.Pack}) {
    :OpenPack
    /if (!${Window[${FindItem[${fullname}].InvSlot.Pack.Name}].Open}) {
      /itemnotify ${FindItem[${fullname}].InvSlot.Pack.Name} rightmouseup
      /delay 2
      /goto :OpenPack
    } 
    /declare camefrom ${FindItem[${fullname}].InvSlot}
    :GrabItem
    /if (!${Cursor.ID}) {
      /itemnotify ${InvSlot[${camefrom}]} leftmouseup
      /delay 2
      /goto :GrabItem
    }
    /declare clickyID int local ${Cursor.ID}
    /declare wornat int local ${Cursor.WornSlot[1]}
    :SwapFirst
    /if (${Cursor.ID}==${clickyID}) {
      /itemnotify ${InvSlot[${wornat}]} leftmouseup
      /delay 2
      /goto :SwapFirst
    }
    |- Click it
    /delay 2
    /if (${verbosity}>=1) /${channel} ** Clicking: ${fullname}
    /declare previousID ${Cursor.ID}
    /itemnotify ${InvSlot[${wornat}]} rightmouseup
    :SwapAgain
    /if (${Cursor.ID}==${previousID}) {
      /itemnotify ${InvSlot[${wornat}]} leftmouseup
      /delay 2
      /goto :SwapAgain
    }
    |- Put it back
    :PutItBack
    /if (${Cursor.ID}==${clickyID}) {
      /itemnotify ${InvSlot[${camefrom}]} leftmouseup
      /delay 2
      /goto :PutItBack
    } 
    :SummonedCheck
    /if (${Cursor.ID}) {
      |- Something was summoned
      /autoinv
      /delay 2
      /goto :SummonedCheck
    }    
    :ClosePack
    /if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) {
      /itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup
      /delay 2
      /goto :ClosePack
    } 
  } else {
    |- Just click it
    /if (${FindItem[${fullname}].InvSlot}) {
      /if (${verbosity}>=1) /${channel} ** Clicking: ${fullname}
      /itemnotify ${FindItem[${fullname}].InvSlot} rightmouseup
      /delay 2
    } else {
      /if (${verbosity}>=0) /${channel} ** "${fullname}" not found!
    }
  } 
  :CastLoop 
  /delay 1 
  /if (${Me.Casting.ID}) /goto :CastLoop
/return

Sub Event_LinkParse(string Line)
  /varset lastevent Event_LinkParse
  /if (${Line.Arg[3].Length}) {
    /declare comtext string ${Line.Right[-16]}
    /declare linksub ${comtext.Token[1,*]}0013895-00001-00001-00001-00001-00001A04D01F5${comtext.Token[2,*]}${comtext.Token[3,*]}
    /docommand ${linksub}
  }
/return

Sub Event_AddMaster(string Line)
  /varset lastevent Event_AddMaster
  /declare index int local
  /if (${Line.Arg[3].Length}) {
    /for index 1 to 20
      /if (${Ini[RHSettings.ini,Masters,Controller${index}].Equal[Nobody]}) {
        /ini "RHSettings.ini" "Masters" "Controller${index}" "${Line.Arg[3]}"
        /if (${verbosity}>=0) /${channel} ** ${Line.Arg[3]} added as a controller...
        /goto :FallOut
      }
    /next index
    /if (${verbosity}>=0) /${channel} ** Master controller slots all filled! Get rid of some!
  } else {
    /if (${verbosity}>=0) /${channel} ** Huh?
  }
  :FallOut
/return

Sub Event_RemMaster(string Line)
  /varset lastevent Event_RemMaster
  /declare index int local
  /if (${Line.Arg[3].Length}) {
    /for index 1 to 20
      /if (${Ini[RHSettings.ini,Masters,Controller${index}].Equal[${Line.Arg[3]}]}) {
        /ini "RHSettings.ini" "Masters" "Controller${index}" "Nobody"
        /if (${verbosity}>=0) /${channel} ** ${Line.Arg[3]} removed from controller list...
        /goto :FallOut
      }
    /next index
    /if (${verbosity}>=0) /${channel} ** Can't find ${Line.Arg[3]} in access list!
  } else {
    /if (${verbosity}>=0) /${channel} ** Huh?
  }
  :FallOut
/return

Sub Event_Chat(ChatType, Sender, ChatText)
  /varset lastevent Event_Chat
  |- Authenticate if valid controller
  /declare authorized bool local FALSE
  /for i 1 to 20
    /if (${Ini[RHSettings.ini,Masters,Controller${i}].Equal[${Sender}]}) /varset authorized TRUE
  /next i
  /if (${authorized} && ${ChatText.Left[1].Equal[/]}) {
    /if (${verbosity}>=1) /${channel} ** User ${Sender} Authenticated!
    /if (${verbosity}>=0) /${channel} Action --> "${ChatText}"
    /if (${Me.AFK}) /delay 2s
    /tell ${Sender} Command received, performing: ${ChatText}
    /docommand ${ChatText}
  }
/return 

Sub Event_HelpInfo 
  /varset lastevent Event_HelpInfo
  /if (${verbosity}>=0) /${channel} --------=========(RH Help)=========---------- 
  /if (${verbosity}>=0) /${channel} /rhhelp - Display this information!
  /if (${verbosity}>=0) /${channel} /status - Display status of all RH modes
  /if (${verbosity}>=0) /${channel} /pause - Suspends the operations of RH
  /if (${verbosity}>=0) /${channel} /autoevade - Toggle autoevading on or off
  /if (${verbosity}>=0) /${channel} /stopfight <%> - Set % of your health to stop attacking
  /if (${verbosity}>=0) /${channel} /strikedisc <StrikeSkill> - Set to your best strike skill
  /if (${verbosity}>=0) /${channel} /endfloor <%> - Set % of your endurance needed to strike
  /if (${verbosity}>=0) /${channel} /autostick - Toggle autosticking to NPCs while attacking
  /if (${verbosity}>=0) /${channel} /stickdist <range_target> <range_tank> - Set stick thresholds
  /if (${verbosity}>=0) /${channel} /autohs - Toggle automatic hiding/sneaking while not fighting
  /if (${verbosity}>=0) /${channel} /closeness <%> - Set % of max hit range while autosticking
  /if (${verbosity}>=0) /${channel} /dynclose - Toggle automatic real time closeness adjustments
  /if (${verbosity}>=0) /${channel} /autoassist <main_assist> <%health> - Activate autoassist
  /if (${verbosity}>=0) /${channel} /autoassist off - Disable autoassisting
  /if (${verbosity}>=0) /${channel} /autoassist on - Turn on autoassist w/existing tank info
  /if (${verbosity}>=0) /${channel} /mainassist <player> - Sets main assist to <player>
  /if (${verbosity}>=0) /${channel} /secondassist <player> - Sets secondary assist to <player>
  /if (${verbosity}>=0) /${channel} /thirdassist <player> - Sets third assist to <player>
  /if (${verbosity}>=0) /${channel} /dynaggro - Toggle dynamic management of assist health %
  /if (${verbosity}>=0) /${channel} /leash <distance> - Activate leash with <distance> ft.
  /if (${verbosity}>=0) /${channel} /leash <distance> <master> - Activate leash w/a master
  /if (${verbosity}>=0) /${channel} /leash off - Disable leashing
  /if (${verbosity}>=0) /${channel} /leashflex <%length> - Set leash flexibility
  /if (${verbosity}>=0) /${channel} /drag <body1> <body2> ... <bodyN> - Drag corpses
  /if (${verbosity}>=0) /${channel} /lootmycorpse - Loot your own corpse completely
  /if (${verbosity}>=0) /${channel} /iset <itemalias> keepup|nokeepup <"Item Name"> - Item settings
  /if (${verbosity}>=0) /${channel} /ibounce <itemalias> <"Spell Name"> - Add bounce-off spell
  /if (${verbosity}>=0) /${channel} /iclick <itemalias> - Click cast item defined in <itemalias>
  /if (${verbosity}>=0) /${channel} /autoninja <mode> [<range>] - Automatic NPC corpse looting
  /if (${verbosity}>=0) /${channel} /autofollow [<name>] [<distance>] - Follow <name> at <distance>
  /if (${verbosity}>=0) /${channel} /autopick - Toggle pick-pocketing during combat on or off
  /if (${verbosity}>=0) /${channel} /weaponswitch <weapon1> <"switch text"> <weapon2> - weapon swap
  /if (${verbosity}>=0) /${channel} /targetswitch - Toggle autoswitching of targets in autoassist
  /if (${verbosity}>=0) /${channel} /autotraps - Toggle autonegotiation of traps
  /if (${verbosity}>=0) /${channel} /autochicken [ON|OFF|<nimble%>] [ESCAPE] - Preseves your life
  /if (${verbosity}>=0) /${channel} /autodisc1 "Discipline Name"|ON|OFF <end%> <reuse> - Auto disc 1
  /if (${verbosity}>=0) /${channel} /autodisc2 "Discipline Name"|ON|OFF <end%> <reuse> - Auto disc 2
  /if (${verbosity}>=0) /${channel} /addmaster <name> - Add a master to remote control users
  /if (${verbosity}>=0) /${channel} /remmaster <name> - Remove a master from remote control users
/return

Sub Event_StatInfo 
  /varset lastevent Event_StatInfo
  /if (${verbosity}>=0) /${channel} -------=======(Current Status)=======--------
  |- Check for the presense of MQ2MoveUtils plugin
  /if (${Stick.Status.Length}) {
    /varset useMU TRUE
    /if (${verbosity}>=0) /${channel} ** MQ2MoveUtils ENABLED (Enhanced Movement ON)
  } else {
    /varset useMU FALSE
    /if (${verbosity}>=0) /${channel} ** MQ2MoveUtils NOT FOUND (Enhanced Movement OFF)
  }
  /if (${verbosity}>=0) /${channel} ** Auto Evade: ${doEvade}, Cease Combat: ${StopFightingHealth}% HP 
  /if (${verbosity}>=0) /${channel} ** Auto Stick: ${doStick}, Closeness${If[${doDynclose},[DYN],]}: ${closeness}% MaxRange
  /if (${verbosity}>=0) /${channel} ** -- Range to Target: ${rngtarget} -- Range to Tank: ${rngtank}
  /if (${verbosity}>=0) /${channel} ** Auto Hide&Sneak: ${doHideSneak}, Auto Pickpocket: ${doPick}
  /if (${verbosity}>=0) /${channel} ** Auto Chicken: ${doChicken} -- Nimble: ${nimblehealth}% Escape: ${doEscape}
  /if (${verbosity}>=0) /${channel} ** Auto Ninja: ${ninjamode}, Distance: ${ninjadist} ft.
  /if (${verbosity}>=0) /${channel} ** Auto TargetSwitching: ${doTSwitch}, Auto Traps: ${doTraps}
  /if (${verbosity}>=0) /${channel} ** Auto Assist: ${doAutoassist}, Assist at ${assistpct}% HP 
  /if (${verbosity}>=0) /${channel} ** MA: ${firstassist}, SA: ${secondassist}, TA: ${thirdassist}
  /if (${verbosity}>=0) /${channel} ** Leashing: ${doLeash} (${leashlength} ft.), Master: ${leashholder}, Flex: ${leashflex}
  /if (${verbosity}>=0) /${channel} ** Strike Skill: "${StrikeSkill}", End. Floor: ${MinEndurance}%
  /if (${verbosity}>=0) /${channel} ** Auto Disc #1: ${doDisc1} -> ${disc1} / ${disc1reuse} mins - End: ${disc1end}%
  /if (${verbosity}>=0) /${channel} ** Auto Disc #2: ${doDisc2} -> ${disc2} / ${disc2reuse} mins - End: ${disc2end}%
  /if (${verbosity}>=0) /${channel} ** Dynamic Aggro Control: ${doDynaggro}
  /if (${verbosity}>=0) /${channel} ** WeaponSwitching: ${doSwitch}, ${weapon1}->${weapon2} (${switchtext})
  /if (${verbosity}>=0) /${channel} ** Authorized remote controllers:
  /for i 1 to 20
    /if (${Ini[RHSettings.ini,Masters,Controller${i}].NotEqual[Nobody]}) /if (${verbosity}>=0) /${channel} ---- ${Ini[RHSettings.ini,Masters,Controller${i}]} allowed...
  /next i
  /doevents flush
/return

When you enable this macro you can set your ma and what % to assist him at then you can just walk off and do whatever. I have used it many times with my bard,ranger,pally and other characters and nobody has relized that I was there only for a few min. If you are setting it up to run for awhile while you go do something else it is best to have a good group and make sure they will be there awhile otherwise it is good for just being lazy while you just watch the madness hehe.
 
Re: Redguides Listing of Confirmed Macros

Bard chant & loot macro (from Siddin)

Rich (BB code):
|it also loots btw. won't target anything thats not in line of sight,
|you'll need to go through and change all the /twist commands
|to what you want to use.


#event EXP "#*#experience!!"
#event seetarget "You cannot see your target."
#event targetid "Your Tuyen's Chant of Poison has worn off."
#event targetid "Your Tuyen's Chant of Disease has worn off."
#event targetid "Your Tuyen's Chant of Flame has worn off."
#event targetid "Your Tuyen's Chant of Frost has worn off."
#event logoff "LOADING, PLEASE WAIT..."
#event quit "#*#leave hoh quit#*#"

Sub main
/declare CircleRadius int outer (circle radius here)
/declare Xloc float outer ${Me.X}
/declare Yloc float outer ${Me.Y}
/declare myzone int outer ${Zone.ID}
/declare pause int outer 1
/declare avoid1 int outer 0
/declare avoid2 int outer 0
/declare killtarget int outer 0
/declare movedone int outer 0
/declare healsong int outer 1
/declare SeloSong int outer 8 
/declare BellowSong int outer 6
/declare Bellowtimer int outer 300
/declare targetammount int outer
/declare PrevSong int outer 0
/declare maintimer int outer 0
/echo Selo's: ${Me.Gem[${SeloSong}].Name}
:needtarget
/call event_needtarget
/call selosong
:MainLoop 
/if (${Target.ID}==${Me.ID}) /squelch /target clear
/if (${Zone.ID}!=${myzone}) {
/circle off
/nomodkey /keypress forward
/nomodkey /keypress left
/nomodkey /keypress right
/camp desktop
/mqlog camping out
/keypress instant_camp
/endmac
}
/doevents
/if (!${Target.ID}) {
/keypress forward hold
/delay 3s
/goto :needtarget
}
/nomodkey /keypress forward hold
/call healsong
/call selosong
/call Bellow
/call GMCheck

         /delay 1S
/nomodkey /keypress forward hold
/doevents
/goto :MainLoop 
/return 

Sub GMCheck

   /if (${Spawn[gm].ID}) {
/Log GM entered the zone!
/log For safty reasons ending the macro
      /mqlog GM entered the zone!
      /mqlog For safty reasons ending the macro
/keypress forward hold
      /q
   }

/return


Sub Event_NeedTarget 
/squelch /if (!${Target.ID}) {
/squelch /target npc
/if (!${Target.LineOfSight}) /squelch /target clear
}
/keypress forward hold
/if (${Target.ID}) /twist 2 3 4 5 7
/return

Sub Event_NeedTarget2
/squelch /target npc
/if (!${Target.LineOfSight}) /squelch /target clear
/keypress forward hold
/return

Sub Event_seetarget
/varcalc targetammount ${targetammount}+1
/if (${targetammount}>=10) {
/squelch /target npc
/if (!${Target.LineOfSight}) /squelch /target clear
/twist reset
/varset targetammount 0
/return
}
/return

Sub Event_targetid
/varset targetammount 0
/return

sub selosong
      /if (${SeloSong}) /if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=2) { 
         /echo Selos about to die 
/twist  8
         /delay 1S
/nomodkey /keypress forward hold
         /delay 1S
/nomodkey /keypress forward hold
         /delay 1S
/nomodkey /keypress forward hold
         /delay 1S
/nomodkey /keypress forward hold
/twist 2 3 4 5 7
/varset healsong 0
/call healsong
         /varset PrevSong 0 
         /doevents 
         /return 
      } 

/return

Sub healsong
/if (${healsong}==0) /if (${Me.PctHPs}<=95) {
/twist 1 2 3 4 5
/varset healsong 1
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) {
/twist 2 3 4 5 7
/varset healsong 0
/return
}
/return

Sub Event_quit
/circle off
/warp succor
/camp desktop
/endmac
/return

Sub Event_logoff
/delay 60s
/keypress forward
/keypress left
/keypress right
/camp desktop
/endmac
/return

Sub Event_EXP 
/target npc
/if (!${Target.LineOfSight}) /squelch /target clear
/if (${Target.ID}) {
/twist 2 3 4 5 7
/return
} else {
/twist 8
/goto :looting
}
:looting
/look
/target npc
/if (!${Target.LineOfSight}) /squelch /target clear
/if (${Target.ID}) {
/circle on ${CircleRadius} ${Xloc} ${Yloc}
/twist 2 3 4 5 7
/return
}
/target npc corpse radius 200
/if (!${Target.ID}) {
/circle on ${CircleRadius} ${Xloc} ${Yloc}
/return
}
/if (${Target.ID}) {
/circle off
/call LootMob
/goto :looting
}
/return
Sub LootMob 
   /declare LootChance  int inner  0
   /declare LootSlot    int inner  0 
   /declare LootCheck   int inner  0 
   /declare LootTotal   int inner  0 
   /face fast nolook 
/squelch /stick 5
:Distance
/if (${Target.Distance}<=10) { 
/squelch /stick off
/loot
} else {
/goto :Distance 
}
/squelch /stick off
/loot
   /delay 1s 
   /if (!${Corpse.Items}) { 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup
/look
      /return 
   } 

   /varset LootTotal ${Corpse.Items} 
   /for LootSlot 1 to ${LootTotal} 
      /itemnotify loot${LootSlot} rightmouseup 
	/delay 5
   /next LootSlot 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup
/look
/cleanup
/return 

Sub Bellow 
/delay 5
  /if (${Me.AltAbilityReady[Boastful Bellow]} && ${Target.Type.Equal[NPC]}) { 
    /aa act Boastful Bellow 
  } 
/return

Ok, first of all, the only things i'm going to delete in this macro are the coords that i start to recircle after i loot, anybody who uses this will have to put those coords in as well.
 
Re: Redguides Listing of Confirmed Macros

Rathe Mountains Farm_Giant.mac by Siddin

There are quite a few checks to prevent kill stealing, but every now and then you'll get people that root and don't deal 1% damage to the mob before you get there. If you can steal aggro from them within 6 seconds, you'll ks em.

Farm_Giant.mac

Rich (BB code):
|Made for bards!!!!! will need a lot of customization for any other caster, fighter types not so much.

#turbo
#include move.inc
#include sell.inc
#include packs.inc
|If you don't have the noencumber offset for docrack, i suggest uncommenting this line and commenting out the sellitems event
|#Event POK "#*#encumbered#*#"
#event SellItems "#*#The item has dropped to the ground#*#"

Sub Main
|------------------------------------------------------------
   |How many times should aquire target fail before delaying?
   |------------------------------------------------------------
   /declare RV_FailMax          int outer  1
   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  1500
   |------------------------------------------------------------
   |How far is the combat range?
   |------------------------------------------------------------
   /declare RV_Range            int outer 150
   |------------------------------------------------------------
   |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
   |------------------------------------------------------------
       /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_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 SeloSong int outer 8
 
|------------------------------------------------------------
   |Load in Loot Table.
|------------------------------------------------------------
   /call ReadINI Loot.ini "${Zone.Name}" Loot 
   /if (!${Defined[RV_LootArray]}) { 
      /echo No Loot Array Created... 
   } 


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

|------------------------------------------------------------
    |Main program
|------------------------------------------------------------
/echo Starting
   /fastdrop on 
   /lootn never 
   :Start


      /call GMCheck
	/call Gettarget
	/call killmob
      /doevents
   /goto :Start
/return







Sub KillMob
/if (${Target.PctHPs}<95) /squelch /target clear
/if (${Int[${Target.PctHPs}]}<100) /squelch /target clear
  /if (!${Target.ID}) /return
  /look
  /echo Killing a ${Target.CleanName}.
  /stick 125 behind moveback
:distancecheck
/if (${Target.Distance}>=200) /goto :distancecheck
/if (${Target.PctHPs}<95) /squelch /target clear
/if (${Int[${Target.PctHPs}]}<100) /squelch /target clear
  /if (!${Target.ID}) /return
/if (${Me.PctHPs}<=95) {
/twist 2 3 4 5 1
} else {
/twist 2 3 4 5
}
/delay 6s
/if (${Me.TargetOfTarget.Name.NotEqual[${Me}]}) /squelch /target clear
  :KillStart
/call selosong
  /if (${Target.State.Equal[DEAD]}) /keypress esc 
  /if (${Target.ID}) /goto :KillStart
  /twist 8 1
  /twist reset
  /delay 5
  /target id ${RV_MyTargetID} corpse
  /call Lootmob
/return 





|--------------------------------------------------------------------------------
|SUB: Looting based on FishingLoot.ini.
|--------------------------------------------------------------------------------
Sub LootMob 
   /declare LootChance  int inner  0
   /declare LootSlot    int inner  0 
   /declare LootCheck   int inner  0 
   /declare LootTotal   int inner  0 
    
   /face fast 
    
   /keypress forward 
   /keypress back 
    

/stick 12 moveback
:Distance
/if (${Target.Distance}<=10) { 
/stick off
/loot
} else {
/goto :Distance 
}
/loot
   /delay 1.5s 
   /if (!${Corpse.Items}) { 
      /echo NO LOOT! Cheap Bastard! 
|/shift /notify InventoryWindow IW_Money1 leftmouseup
|/destroy
/delay 1
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/delay 1
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/delay 1
/notify LootWnd DoneButton leftmouseup 
/cleanup
      /return 
   } 

   /varset LootTotal ${Corpse.Items} 
   /for LootSlot 1 to ${LootTotal} 
      /itemnotify loot${LootSlot} leftmouseup 
      /delay 5
       
         /for LootCheck 1 to ${RV_LootArray.Size} 
            /if (${Cursor.Name.Find[${RV_LootArray[${LootCheck}]}]}) { 
               /echo Keeping a ${Cursor.Name}... WOOT! 
		/autoinv 
		/delay 1s
		/if (${Cursor.ID}) {
		/autoinv
		/delay 1s
		}
		/if (${Cursor.ID}) {
		/autoinv
		/delay 1s
		}
		/if (${Cursor.ID}) {
		/autoinv
		/delay 1s
		}
               /varcalc RV_LootStats[${LootCheck}] ${RV_LootStats[${LootCheck}]}+1 
               
		

               /delay 5
            
	}
         /next LootCheck 
      } 
     /if (${Cursor.ID}) { 
        /echo Destroying a ${Cursor.Name}... 
	 /destroy
         /delay 5 
      } 
   /next LootSlot 
|/shift /notify InventoryWindow IW_Money1 leftmouseup
|/destroy
/delay 1
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/delay 1
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/delay 1
   /notify LootWnd DoneButton leftmouseup 
   /delay 2 
    /cleanup
/return 

|-------------------------------------------------------------------------------
|SUB: Read loot table from the 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["Mob.ini"]}&&${nValues}>0) { 
      /echo Declaring Mob Array... 
      /declare RV_MobArray[${nValues}]   string outer 
      /declare RV_MobStats[${nValues}]   string outer 
   } 
   /if (${FileName.Equal["Loot.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["Mob.ini"]}) { 
         /varset RV_MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset RV_MobStats[${nArray}] 0 
      } 
      /if (${FileName.Equal["Loot.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: Check for GM's in zone.
|-------------------------------------------------------------------------------
Sub GMCheck

   /if (${Spawn[gm].ID}) {
      /echo GM entered the zone!
      /echo For safty reasons ending the macro
      /call movetoloc 394 2473
      /q
   }

/return

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

   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub   int local
   /varset RV_InvalidTargetID 1
   :Acquire
/doevents
   /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 100
      /for RV_TargetSub 1 to ${RV_MobArray.Size}
         /squelch /target radius ${RV_CurrentRadius} nopcnear 150 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) {
               /varset RV_InvalidTargetID ${Target.ID}
               /call ResetSub
		/squelch /target clear
               /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...
/look
/twist 1 8
/call movetoloc 44 1158
/target radius 500 Cyclops npc
/if (!${Target.ID}) /target radius 500 giant skeleton npc
/if (!${Target.ID}) /target radius 500 lizard npc
/if (!${Target.ID}) /target radius 500 basilisk npc
         /varset RV_FailCounter 0
      }
      /goto :Acquire
   }
/return

Sub Resetsub
   /varset RV_HasTarget 0 
   /varset RV_TargetDead 0 
   /varset RV_Fighting 0 
/return

Sub Event_POK


/twist 1
/delay 4s
/gate
/delay 90s
/call movetoloc -223.63 -67
/call movetoloc -239.39 146.97
/call movetoloc -187.44 156.83
/call movetoloc -188.19 223.64
/call movetospawnname ironstove 10
/click right target
/delay 1s
/call openpacks
/delay 1s
/call sell "Lambent Stone"
/call sell "Fine Steel"
/call sell "jasper"
/delay 1s
/cleanup
/delay 1s
/call movetoloc -118.82 215.76
/call movetoloc 249.92 223.19
|/call movetoloc 332.64 413.01
/keypress right
/keypress left
/keypress forward hold
  :PullMoveLoopd
/if (${Me.State.Equal[SIT]}) /stand 
  /face fast loc 438.60,444.00
  /if (${Math.Distance[438.60,444.00]}>2) /nomodkey /keypress forward hold 
  /if (${Math.Distance[438.60,444.00]}<=2) {
    /nomodkey /keypress forward hold
    /goto :PullMoveLoope1
  }
/goto :PullMoveLoopd
  :PullMoveLoope1

/face fast loc 441.47,490.89
/look
/doortarget
/keypress use
/delay 5
/keypress forward hold
/delay 5
/keypress use
/delay 5
/call movetoloc 441.47 490.89
/target Banker Ceridan
/click right target
/delay 1s
/shift /notify InventoryWindow IW_Money0 leftmouseup
/delay 5
/notify BigBankWND BIGB_Money0 leftmouseup
/delay 5
/shift /notify InventoryWindow IW_Money1 leftmouseup
/delay 5
/notify BigBankWND BIGB_Money1 leftmouseup
/cleanup
/delay 1s
/call movetoloc 438.71 451.62
/face fast loc 439.77,410.76
/look
/delay 5
/keypress use
/delay 5
/keypress forward hold
/delay 5
/keypress use
/keypress forward hold
/call movetoloc 439.77 410.76
/call movetoloc 193.29 218.92
/call movetoloc -232.53 217.27
/call movetoloc -482.08 449.80
/call movetoloc -495.65 706.91
/call movetoloc -531.72 720.84
/call movetoloc -927.40 717.67
/call movetoloc -899.70 501.57
/call movetoloc -844.72 445.98
/call movetoloc -900.08 444.27
/delay 1s
/doortarget POKOGPORT500
/warp target
/twist 6
/delay 5s
/keypress use
/delay 1 
/keypress forward
/keypress use
/delay 1 
/keypress forward
/keypress use
/delay 1 
/keypress forward
/keypress use
/delay 1 
/keypress forward
/keypress use
/delay 30s
/look
/warp loc 324 3422 4
/face fast loc 356.08,3417.19
/keypress left
/keypress right
/keypress forward hold
/delay 30s
/keypress forward hold
/delay 5s
/look
/warp loc -348 158 8
/call movetoloc 44 1128
/twist 8
/delay 10s
/return

sub selosong
      /if (${SeloSong}) /if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=6) { 
         /echo Selos about to die 
/twist 8
         /delay 4s 
/twist 2 3 4 5
         /return 
      } 

/return

Sub Event_SellItems
/twist 6
/call movetoloc 628.45 247.45
/call movetoloc 1037.45 -32.46
/target Viira Bali
/warp target
/call openpacks
/delay 5
/click right target
/call sell "Lambent Stone"
/call sell "Fine Steel"
/call sell "jasper"
/cleanup
/warp loc 628.45 247.45 10.58
/return

Move.inc

Rich (BB code):
| 
| move.inc 
| 
|Advanced moving and object-avoidance routines 
| 
|Originally by beatnik007 (Who credits Mckorr) 
| 
|Revised and converted to MQ2Data by Terramantian 
| 
|Signifagant and on-going Improvments by EQBot_Man 8.9.04 
| Added /call MoveToSpawnName 
| This will take a partial name and a distance and reliably target and move 
| to the nearest spawn of that name 
| Added code to get you to stop a lot closer than 10 units. You should stop almost 
| right at the location you want when using MoveToLoc 
| Sometimes you would get stuck at a door and if you were macroing unattended 
| you would continue to strafe for hours making it obvious you were 
| macroing. Added code that if the strafe function is called more 
| than 10 times in 60 sec to /quit you out 
| Have added lots of little checks including NULL targets and corpse checks and a lot 
| of little things that I can't remember now but I needed to add due to rare 
| circumstances of the subroutines failing to do what they were desigend to do. 
| 
| Subroutines: 
| Sub MoveToLoc 
| Moves you to a specified xy loc 
| Sub MoveToSpawn 
| Moved you to a specified ID number(pretty pointless) 
| Sub MoveToSpawnName 
| Moves you to the nearest spawn given a partial or full name 
| 
|=================================================  ==| 


| Sub MoveToLoc | 
|---------------------------------------------------| 
|This simply moves the player to within 1 unit of | 
|the requested location, while avoiding obstacles | 
| | 
|This is beatnik007's original sub, with a few minor| 
|changes and rewritten in MQ2Data format | 
| | 
|SYNTAX: /call MoveToLoc Y X | 


Sub MoveToLoc(MoveToY, MoveToX) 
/echo Moving to Location: ${MoveToY}, ${MoveToX}. 
/echo Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
/declare FailureTimer timer local 0 
/declare StrafeFailure int local 
/declare running int local 
/declare MaxSpeed int local 
/declare StopDistance int local 
/declare distanceNow float local 
/declare distanceBefore float local 
/declare distanceModifier int local 
/varset running 0 
/declare distanceTimer timer 15 
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
/varset distanceModifier 1 
/varset MaxSpeed 0 
:moveToLocation 

/if (${Me.Speed}>=${MaxSpeed}) /varset MaxSpeed ${Me.Speed} 
/if (${MaxSpeed}<=166) { 
/varset StopDistance 3 
} else { 
/varset StopDistance 10 
} 

/face fast nolook loc ${MoveToY},${MoveToX} 

/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<${StopDistance}) { 
/keypress forward 
/return 
} 

/if (${distanceTimer}==0) { 
/if (${Me.Sneaking}) { 
/varset distanceModifier 2 
} else { 
/varset distanceModifier 1 
} 

/varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
/if (${FailureTimer}==0) { 
/varset StrafeFailure 0 
/varset FailureTimer 600 
} 
/if (${FailureTimer}>0) { 
/varset StrafeFailure ${Math.Calc[${StrafeFailure} + 1]} 
} 
/if (${StrafeFailure}>=10 && ${FailureTimer}>0) { 
/keypress forward 
/keypress back hold 
/delay 5 
/keypress back 
/afk Be back later, leave a message 
/echo Your movement failed more than 10 times in 30 seconds and most likely looked macroed. Ending macro. . . 
/endmacro 
/quit 
} 
/call strafePastObstacle ${StrafeFailure} 
} 

/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
/varset distanceTimer 15 
} 

/if (${running}==0) { 
/keypress forward 
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>${StopDistance}) { 
/varset running 1 
/keypress forward hold 
} 
} else { 
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<${StopDistance}) { 
/varset running 0 
/keypress forward 
} 
} 
/goto :moveToLocation 
/return 


| Sub MoveToSpawn | 
|---------------------------------------------------| 
|This moves the player to within a provided distance| 
|of the provided spawn, while avoiding obstacles | 
| | 
|I "wrote" this, but as you can see, it's the same | 
|as MoveToLoc with a few variable replacements. | 
| | 
|The second parameter, Distance, allows for the | 
|player to stop short of the target by a certain | 
|amount, to provide for different aggro radii, etc. | 
| | 
|SYNTAX: /call MoveToSpawn ID Distance | 

Sub MoveToSpawn(MoveToID, StopDistance) 


/if (!(${Defined[MoveToID]})||(${Spawn[MoveToID].ID})) { 
/echo Spawn ID not found or no ID provided. Aborting... 
/return 
} 
/if (!(${Defined[StopDistance]})) { 
/echo Stopping point not defined, using default distance of 70 
/declare StopDistance int local 
/varset StopDistance 70 
} 
/echo Moving to Spawn: ${MoveToID} (${Spawn[${MoveToID}].CleanName}). 
/echo Current Location: ${Spawn[${MoveToID}].Y}, ${Spawn[${MoveToID}].X} 
/echo Current Distance: ${Spawn[${MoveToID}].Distance} 
/declare FailureTimer timer local 0 
/declare StrafeFailure int local 
/declare running int local 
/declare distanceNow float local 
/declare distanceBefore float local 
/declare distanceModifier int local 
/varset running 0 
/declare distanceTimer timer 15 
/varset distanceBefore ${Spawn[${MoveToID}].Distance} 
/varset distanceModifier 1 

:moveToSpawn 

/squelch /face fast nolook id ${MoveToID} 

/if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
/keypress forward 
/return 
} 

/if (${distanceTimer}==0) { 
/if (${Me.Sneaking}) { 
/varset distanceModifier 2 
} else { 
/varset distanceModifier 1 
} 

/varset distanceNow ${Spawn[${MoveToID}].Distance} 
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
/if (${FailureTimer}==0) { 
/varset StrafeFailure 0 
/varset FailureTimer 600 
} 
/if (${FailureTimer}>0) { 
/varset StrafeFailure ${Math.Calc[${StrafeFailure} + 1]} 
} 
/if (${StrafeFailure}>=10 && ${FailureTimer}>0) { 
/keypress forward 
/keypress back hold 
/delay 5 
/keypress back 
/sit 
/afk Be back later, leave a message 
/echo Your movement failed more than 10 times in 30 seconds and most likely looked macroed. Ending macro. . . 
/endmacro 
/quit 
} 
/call strafePastObstacle ${StrafeFailure} 
} 
/varset distanceBefore ${Spawn[${MoveToID}].Distance} 
/varset distanceTimer 15 
} 

/if (${running}==0) { 
/keypress forward 
/if (${Spawn[${MoveToID}].Distance}>=${StopDistance}) { 
/varset running 1 
/keypress forward hold 
} 
} else { 
/if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
/varset running 0 
/keypress forward 
} 
} 
/goto :moveToSpawn 
/return 


| Sub MoveToSpawnName | 
|---------------------------------------------------| 
|This moves the player to within a provided distance| 
|of the provided spawn, while avoiding obstacles | 
| | 
|I "wrote" this, but as you can see, it's the same | 
|as MoveToLoc with a few variable replacements. | 
| | 
|The second parameter, Distance, allows for the | 
|player to stop short of the target by a certain | 
|amount, to provide for different aggro radii, or to| 
|attack. | 
| | 
|SYNTAX: /call MoveToSpawnName Name Distance | 
| Does take partial names: | 
| /call MoveToSpawnName skel 9 | 
| to move you to the nearest skeleton | 
| | 
| I use this for farming bone chips and silks | 

Sub MoveToSpawnName(Name, StopDistance) 
/keypress esc 
/target ${Name} npc 
/delay 2 
/if (${String[${Target}].Find["NULL"]}) /return 
/if (${String[${Target}].Find["corpse"]}) /return 
/if (!${Target.ID}) { 
/echo Name not found or no name provided. Aborting... 
/return 
} 
/if (!(${Defined[StopDistance]})) { 
/echo Stopping point not defined, using default distance of 70 
/declare StopDistance int local 
/varset StopDistance 70 
} 
/echo Moving to Spawn: ${Target.CleanName}. 
/declare FailureTimer timer local 0 
/declare StrafeFailure int local 
/declare running int local 
/declare distanceNow float local 
/declare distanceBefore float local 
/declare distanceModifier int local 
/varset running 0 
/declare distanceTimer timer 15 
/varset distanceBefore ${Target.Distance} 
/varset distanceModifier 1 

:moveToSpawn 
/if (${String[${Target}].Find["NULL"]}) /return 
/face fast predict 

/if (${Target.Distance}<${StopDistance}) { 
/keypress forward 
/return 
} 

/if (${distanceTimer}==0) { 
/if (${Me.Sneaking}) { 
/varset distanceModifier 2 
} else { 
/varset distanceModifier 1 
} 

/varset distanceNow ${Target.Distance} 
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
/if (${FailureTimer}==0) { 
/varset StrafeFailure 0 
/varset FailureTimer 600 
} 
/if (${FailureTimer}>0) { 
/varset StrafeFailure ${Math.Calc[${StrafeFailure} + 1]} 
} 
/if (${StrafeFailure}>=10 && ${FailureTimer}>0) { 
/keypress forward 
/keypress back hold 
/delay 5 
/keypress back 
/sit 
/afk Be back later, leave a message 
/echo Your movement failed more than 10 times in 30 seconds and most likely looked macroed. Ending macro. . . 
/endmacro 
/quit 
} 
/call strafePastObstacle ${StrafeFailure} 
} 
/varset distanceBefore ${Target.Distance} 
/varset distanceTimer 15 
} 

/if (${running}==0) { 
/keypress forward 
/if (${Target.Distance}>=${StopDistance}) { 
/varset running 1 
/keypress forward hold 
} 
} else { 
/if (${Target.Distance}<${StopDistance}) { 
/varset running 0 
/keypress forward 
} 
} 
/goto :moveToSpawn 
/return 

| Only to be used by the previous functions - It's obvious what it does. | 

sub strafePastObstacle(Number) 
/keypress forward 
/keypress back hold 
/delay ${Math.Calc[${Number}*3/2+4]} 
/keypress back 
/if (!${Me.State.Equal["STAND"]}) /stand 
/if (${Math.Rand[99]}>50) { 
/keypress strafe_right hold 
} else { 
/keypress strafe_left hold 
} 
/delay ${Math.Calc[${Number}*4+5]} 
/keypress strafe_right 
/keypress strafe_left 
/keypress forward hold 
/return 

Sub Turn(THeadingY,THeadingX) 
/declare PHeading outer 0 
/declare THeading outer 0 
/declare Bearing outer 0 
/declare IsTurning outer 0 
/declare TurnKey outer NULL 

:TurnLoop 
/delay 0 
/if (${Me.Sitting}) /sit off 
/varset PHeading ${Me.Heading.Degrees} 
/if (${Defined[THeadingX]}) { 
/varset THeading ${Heading[${THeadingY},${THeadingX}].Degrees} 
} else { 
/varset THeading ${Target.HeadingTo.Degrees} 
} 

/varset Bearing ${Math.Calc[(${PHeading}-${THeading}+540)%360-180]} 

/if (${Bearing}>=-7 && ${Bearing}<=7) { 
/if (${String[${TurnKey}].NotEqual[NULL]}) /keypress ${TurnKey} 
/face heading ${Heading[${THeading}].Degrees} nolook 
/return 
} else /if (${Bearing}>=-180 && ${Bearing}>=7) { 
/if (${String[${TurnKey}].NotEqual
}) /varset TurnKey LEFT } else /if (${Bearing}<=180 && ${Bearing}<=7) { /if (${String[${TurnKey}].NotEqual
}) /varset TurnKey RIGHT } /if (!${IsTurning}) { /keypress ${TurnKey} hold /varset IsTurning 1 } /goto :TurnLoop /return​


Sell.inc

Rich (BB code):
| 
| sell.inc
| Selling Include File needed for macros
| Version 1.3
| Date: August 7, 2004
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2/
|
| These file MUST be in the common directory in your macros directory.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 


Sub Sell(string ItemToSell)
   /declare OldMoney int Inner    
   /declare NewMoney int Inner
 
   /autoinv 

   /if (${ItemToSell.Equal[NULL]}) {
     /return
   }

   :Finding 
      /if (${FindItemCount[${ItemToSell}]}==0) /goto :Done 
      /nomodkey /itemnotify ${FindItem[${ItemToSell}].InvSlot} leftmouseup 

   :WaitFind 
      /if (${Bool[${SelectedItem}]}==FALSE) /goto :WaitFind 

   :Selling
      /delay 5 
      /varset OldMoney ${Me.Cash} 
      /nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup 

   :WaitSell 
      /varset NewMoney $(Me.Cash} 
      /if (${NewMoney}==${OldMoney}) /goto :WaitSell 
      /goto :Finding 

   :Done 
      /echo No more ${ItemToSell} to sell!!!      
/return

packs.inc

Rich (BB code):
| 
| packs.inc
| Open and Close Packs Include File needed for macros
| Version 1.4
| Date: August 7, 2004
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2/
|
| These file MUST be in the common directory in your macros directory.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 

Sub OpenPacks 
   /declare bag int local 0 
   /declare check int local 0 
   /newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory 
   /delay 1s 
   /for bag 1 to 8 step 1 
      /newif (${Window[Pack${bag}].Open}==FALSE) /nomodkey /itemnotify pack${bag} rightmouseup 
   /next bag 
   /delay 1s
   /for check 1 to 9 step 1
      /if  (${Window[TradeskillWnd].Open}) {
         /nomodkey /notify TradeskillWnd ExperimentButton leftmousehold
         /nomodkey /notify TradeskillWnd ExperimentButton leftmouseup
      }
   /next check
   /delay 1s
/return 

Sub ClosePacks 
   /declare bag int local 0 
   /newif (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory 
   /delay 1s
   /for bag 1 to 8 step 1 
      /newif (${Window[Pack${bag}].Open}==TRUE) /nomodkey /itemnotify pack${bag} rightmouseup 
   /next bag 
   /delay 1s
   /newif (${Window[InventoryWindow].Open}) /nomodkey /keypress inventory 
   /delay 1s 
/return

Loot.ini

Rich (BB code):
[The Rathe Mountains]
Loot1=Lambent Stone
Loot2=Fine Steel
Loot3=Jasper

Mob.ini

Rich (BB code):
[The Rathe Mountains]
Mob1=Hill Giant
Mob2=Bloodbeard

See this thread for more information: http://www.redguides.com/community/showthread.php?t=445
 
Re: Redguides Listing of Confirmed Macros

Bard Chant Hunter by Siddin

Rich (BB code):
|- Chanthunter.mac 
#Chat tell 

#Event Tell         "#*#tells you, '#*#" 
#Event NeedTarget   "You must first select a target for this spell!" 
#Event OORTarget   "Your target is out of range, get closer!" 
#Event OORCorpse   "You are too far away to loot that corpse." 
#Event Died         "Returning to home point, please wait..." 
#Event LevelUp      "#*#Welcome to Level#*#" 
#Event Exp         "You gain #*#experience!!" 
#Event AAPoint      "You have gained an ability point!#*#" 
#Event Caster      "#*#begins to cast a spell." 
#Event Selos      "You slow down." 
#Event Aggro      "#*# YOU for #*# points of damage." 
#Event Aggro      "#*# tries to hit YOU, #*#" 

|#################################################  ############################ 
Sub Main() 
   /declare ScriptName string outer ABE    

   /declare vKiteRadius int outer ${Ini[${ScriptName}.ini,${Zone.ShortName},KiteRadius]} 
   /declare vKiteRadiusReset int outer ${Ini[${ScriptName}.ini,${Zone.ShortName},KiteRadiusRese  t]} 
   /declare vMaxKiteRadius int outer ${Ini[${ScriptName}.ini,${Zone.ShortName},MaxHuntRadius]} 
   /declare tMinTargetZ int outer -400 
   /declare tMaxTargetZ int outer 400 
   /declare tNextTargetID int outer 0 
   /declare tSnareTarget int outer 0 
   /declare vFailMax int outer 3 
   /declare vFailCount int outer 0 
   /declare tInvalidTargetID int outer 0 
    
   /declare locMyX int outer 0 
   /declare locMyY int outer 0 

   /declare tmSongTimer timer outer 1 

   /declare SkipCamp2 int outer 1 

   |=================================================  ========================= 
   |   Experience Tracking 
   |=================================================  ========================= 
   /declare expAAStart float outer ${Me.PctAAExp} 
   /declare expAATotal float outer 0 
   /declare expStart float outer ${Me.PctExp} 
   /declare expTotal float outer 0 

   |=================================================  ========================= 
   |   Automatically camp out at a certain time (24hr format) 
   |=================================================  ========================= 
   /declare AutoCamp int outer 0 
   /declare AutoCampHR int outer 4 
   /declare AutoCampMIN int outer 30 
    
   |=================================================  ========================= 
   |   Personal status variables 
   |=================================================  ========================= 
   /declare meDead int outer 0 
   /declare meAFK int outer 1 
    
   /declare HealthMin outer 79 
   /declare HealthMax outer 95 
   /declare HealthON int outer 0 

   |=================================================  ========================= 
   |   Startup Anchor (pull-to) point 
   |=================================================  ========================= 
   /declare AnchorX float outer 
   /declare AnchorY float outer 
   /varset AnchorX ${Ini[${ScriptName}.ini,${Zone.ShortName},AnchorX]} 
   /varset AnchorY ${Ini[${ScriptName}.ini,${Zone.ShortName},AnchorY]} 
    
    
   /popup Welcome to ${ScriptName} 
   /echo ${ScriptName}: Startup Anchor dropped at ${AnchorX},${AnchorY} 
   |/loadspells "Kiting" 

   |=================================================  ========================= 
   |   Edit this accordingly 
   |=================================================  ========================= 
   /lootnodrop never 

   :Loop 
      /call GMCheck     

      /if (${Me.PctHPs}<18) { 
         /i say ${Time.Time12} - Camping to avoid death! (Current HP: ${Me.PctHPs}%) 
         /i say Current Location: ${Me.X}X ${Me.Y}Y 
         /keypress INSTANT_CAMP 
      } 

      /if (${meDead})   { 
         /camp desktop 
         /mqlog I died, wtf. Camping to save rez timer 
      } 

      /if (${tNextTargetID}<=0) /if (!${Target.ID}) { 
         /call AcquireTarget 
      } 

      /if (${tNextTargetID}>0) /if (${Target.ID}&&${Target.Type.Equal[NPC]}) { 
         |/echo ${ScriptName}: User Selected Target or Aggro'd while running 
         /varset tNextTargetID 0 
      } 

      /if (${Target.Distance}>${vMaxKiteRadius}) { 
         /if ( (${tNextTargetID}==0)&&(${Target.PctHPs}<7) ) { 
            /echo tNextTargetID:  ${tNextTargetID} 
            /echo ${ScriptName}: Handling runner... 
            |/circle off 
            |/stick behind 
         } 
          
         |------------------------------------------------------------ 
         |   Runner or target warped, let him go 
         |------------------------------------------------------------ 
         /if (${tNextTargetID}>0) { 
            /echo ${ScriptName}: Target Warped or beyond MaxRadius, getting a new target; old id was ${Target.ID} 
            /varset tInvalidTargetID ${Target.ID} 
            /call ResetSub 
            /call AcquireTarget 
         } 
      } 
       
      |------------------------------------------------------------ 
      |   snare song if mob hp under 21% 
      |------------------------------------------------------------ 
      /if ((${Bool[${Ini[${ScriptName}.ini,${Zone.ShortName},SnareRunner]}]})&&(${Target.PctHPs}<(${Ini[${ScriptName}.ini,${Zone.ShortName},SnarePercent,1  ]}))&&(${Target.Type.Equal[NPC]}) ) { 
         /if (!${tSnareTarget}) { 
            /twist 3 4 5 6 
            /echo ${ScriptName}: Snaring... 
            /varset tSnareTarget 1 
         } 
      } 

      /if ( (${Me.PctHPs}<${HealthMin}) || (${Me.PctHPs}<${HealthMax}) ) { 
         /if ( (!${HealthON}) && (${Me.Buff[Cantata of Replenishment].Duration}<3) ) { 
            /echo ${ScriptName}: Healing ON: ${Me.PctHPs} to ${HealthMax} 
            /squelch /twist 1 
            /varset HealthON 1 
         } 
      } 
       
      /if (${Me.PctHPs}>=${HealthMax}) { 
         /if (${HealthON}) { 
            /echo ${ScriptName}: Healing OFF 
            /varset HealthON 0 
         } 
         /if ( (${Twist.List}==1)&&(${Target.ID}) ) { 
            /twist 4 5 6 7             
         } 
      } 

      /doevents 
       
      | Put your Selo's equivalent here... 
      /if (!${Me.Buff[$Me.Gem[2].Name].Duration}) /varset tmSongTimer 1 
       
      /goto :Loop 
/return 


|-------------------------------------------------------------------------------- 
|SUB: Loots mob and saves items found in ${ScriptName}.ini 
|-------------------------------------------------------------------------------- 
Sub QuickLoot 
   /echo ${ScriptName}: Checking for corpses to cleanup 
   /squelch /target npc corpse radius ${Int[${vMaxKiteRadius}]} 
   /if (${Target.Type.Equal[Corpse]}) { 
      /echo ${ScriptName}: Looting corpse... 
      /call MoveToLoc ${Target.Y} ${Target.X} 
      /loot 
      /delay 5 
       
      /if (!${Corpse.Items}) { 
         /notify LootWnd DoneButton leftmouseup 
         /return 
      } else { 
         /declare LootSlot int local 
         /declare ItemNotFound int local -1 
         /declare KeepLootItem int local 0 
         /declare CorpseItemCount int local 0 
         /varset CorpseItemCount ${Corpse.Items} 
          
         /for LootSlot 1 to ${CorpseItemCount} 
            /itemnotify loot${LootSlot} leftmouseup 
            /delay 5 
            /varset KeepLootItem ${Ini[${ScriptName}.ini,LootList,${Cursor.Name},${ItemNo  tFound}]} 
            /delay 5 
            /if (${KeepLootItem}==${ItemNotFound}) { 
               /ini "${ScriptName}.ini" "LootList" "${Cursor.Name}" "1" 
               /varset KeepLootItem 1 
            } 
             
            /if (${KeepLootItem}==1) { 
               :InventoryItem 
                  /autoinventory 
                  /if (${Cursor.ID}) /goto:InventoryItem 
            } else { 
               |TODO: check to make sure you're not destroying your own gear! 
               /if (${Cursor.ID}) { 
                  /echo ${ScriptName}: DESTROYING a ${Cursor.Name}... (inventory full?) 
                  /destroy 
                  /delay 5 
               } 
            } 
         /next LootSlot 
         /notify LootWnd DoneButton leftmouseup 
      } 
      /delay 2 
      /doevents 
   } 
   /call CheckAnchor 
/return 


|----------------------------------------------------------------------------- 
|SUB: Acquire Target 
|----------------------------------------------------------------------------- 
Sub AcquireTarget 
   /declare RV_CurrentRadius int local 
   /declare RV_TargetSub int local 
   /declare iCamp2 int local 

   :Acquire 
   |------------------------------------------------------------------------- 
   | Check mobs inside current radius then increase by 50 until vMaxKiteRadius 
   |------------------------------------------------------------------------- 
   /for RV_CurrentRadius 10 to ${vMaxKiteRadius} step 20 
      /squelch /mapfilter CastRadius ${RV_CurrentRadius} 
      /squelch /target radius ${RV_CurrentRadius} notid ${tInvalidTargetID} npc 

      /if ( ${Target.Type.Equal[NPC]} ) { 
         /varset tSnareTarget 0 
          
         /circle on ${vKiteRadius} ${AnchorY} ${AnchorX} 

         /if (${Me.Speed}==0) { 
            /keypress num_lock 
         } 

         /if (${Int[${Target.Z}]}<${tMinTargetZ}) { 
            /echo ${ScriptName}: Mob is BELOW Min Z Range, picking another... 
            /varset tInvalidTargetID ${Target.ID} 
            /call ResetSub 
            /goto :Acquire 
         } 

         /if (${Int[${Target.Z}]}>${tMaxTargetZ}) { 
            /echo ${ScriptName}: Mob is ABOVE Min Z Range, picking another... 
            /varset tInvalidTargetID ${Target.ID} 
            /call ResetSub 
            /goto :Acquire 
         } 
          
         /if (${String[${Target.ConColor}].Equal["GREEN"]}) { 
            /if (${Target.Speed}>0) { 
               /echo ${ScriptName}: Green con in radius, clearing it.. 
            } else { 
               /varset tInvalidTargetID ${Target.ID} 
               /call ResetSub 
               /goto :Acquire 
            } 
         } 
          
         /if (${String[${Target.ConColor}].Equal["RED"]}) { 
            /varset tInvalidTargetID ${Target.ID} 
            /call ResetSub 
            /goto :Acquire 
         } 

         /varset RV_CurrentRadius 10 
         /varset vFailCount 0 

         /popup Acquired ${Target.CleanName} at range ${Int[${Target.Distance}]} 
          
         /if (!${Twist.Twisting}&&(${Target.ID})) { 
            /twist 4 5 6 7 
         } 
          
         /if ( (${Twist.Twisting}==1)&&(${Target.ID}) ) { 
            /twist 4 5 6 7 
         } 
          
         /return 
      } 
      /delay 5 
   /next RV_CurrentRadius 

   /if (!${Target.ID}) { 
      /varcalc vFailCount ${vFailCount}+1 
      |/echo ${ScriptName}: Failed to Acquire Target in Range ${vMaxKiteRadius} ${vFailCount} Time(s) 
      /doevents chat 
      /call CheckAnchor 

      | Stop auto-running          
      /if (${Me.Speed}>0) { 
         /keypress num_lock 
         /keypress forward 
         /keypress back 
      } 
       
      /if (${vFailCount}>=${vFailMax}) { 
         /if (${Twist.Twisting}) { 
            /twist off 
         } 
         |/circle off 
       
         /call CheckAnchor 
         /call QuickLoot 

         /echo ${ScriptName}: Checking Autologoff... 
         /if (${AutoCamp}) { 
            /call CheckAnchor 
            | Time.Hour is returned in 24hr format 
            /if ( (${Time.Hour}>=${AutoCampHR}) && (${Time.Minute}>=${AutoCampMIN}) ) { 
               |/echo ${ScriptName}: Alarm Clock: Camping at ${Time.Time24} 
               /i say Alarm Clock: Camping at ${Time.Time24} 
               |/echo ${ScriptName}: Current Location: ${Me.X}X ${Me.Y}Y 
               /varset AutoCamp 0 
               |/echo ${ScriptName}: remember to change camp time HR~ 
               /camp 
               /delay 30s 
               /return 
            } else { 
               /echo ${ScriptName}: Not time to Autologoff 
            } 
         } 

         |/echo ${ScriptName}: Waiting for Respawns... 
         /varset vFailCount 0 
         /echo ${ScriptName}: Idling... 

         /doevents 
         /delay 10s 
      } 
      /goto :Acquire 
   } 
/return 

|----------------------------------------------------------------------------- 
|SUB: MoveToLoc 
|      This simply moves the player to within 1 unit of 
|      the requested location, while avoiding obstacles 
|----------------------------------------------------------------------------- 
Sub MoveToLoc(MoveToY, MoveToX) 
   /if (${MoveToY}==NULL) { 
      /echo ${ScriptName}: MoveToLoc Y location is NULL, not moving 
      /return 
   } 
    
   /if (${MoveToX}==NULL) { 
      /echo ${ScriptName}: MoveToLoc X location is NULL, not moving 
      /return 
   } 
    
   |/echo ${ScriptName}: Moving to Location: ${MoveToY}, ${MoveToX}. 
   |/echo ${ScriptName}: Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
    
   /declare FailureTimer timer local 0 
   /declare running int local 
   /declare MaxSpeed int local 
   /declare StopDistance int local 
   /declare distanceNow float local 
   /declare distanceBefore float local 
   /declare distanceModifier int local 
   /varset running 0 
   /declare distanceTimer timer 15 
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
   /varset distanceModifier 1 
   /varset MaxSpeed 0 
    
   :moveToLocation 
      /if (${Me.Speed}>=${MaxSpeed}) /varset MaxSpeed ${Me.Speed} 
      /if (${MaxSpeed}<=166) { 
         /varset StopDistance 3 
      } else { 
         /varset StopDistance 10 
      } 

      /face fast nolook loc ${MoveToY},${MoveToX} 

      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<${StopDistance}) { 
         /keypress forward 
         /return 
      } 

      /if (${distanceTimer}==0) { 
         /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
         } else { 
            /varset distanceModifier 1 
         } 

         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
            /if (${FailureTimer}==0) { 
               /varset FailureTimer 600 
            } 
            /call HitObstacle 
         } 

         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /varset distanceTimer 15 
      } 

      /if (${running}==0) { 
         /keypress forward 
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>${StopDistance}) { 
            /varset running 1 
            /keypress forward hold 
         } 
      } else { 
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<${StopDistance}) { 
            /varset running 0 
            /keypress forward 
         } 
      } 
      /goto :moveToLocation 
/return 

|-------------------------------------------------------------------------------- 
|SUB: CheckObstacle 
|     Checks to see if we may have bumped into something that is stopping us 
|-------------------------------------------------------------------------------- 
Sub CheckObstacle 
   /varset locMyX ${Me.X} 
   /varset locMyY ${Me.Y} 
   /if (${locMyX}==${Me.X} && ${locMyY}==${Me.Y}) { 
      /call HitObstacle 
   } 
/return 

|-------------------------------------------------------------------------------- 
|SUB: Hit Obstacle (Obstacle Avoidance) 
|-------------------------------------------------------------------------------- 
Sub HitObstacle 
   /echo ${ScriptName}: 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 

|-------------------------------------------------------------------------------- 
|SUB: Reset Targeting variables 
|-------------------------------------------------------------------------------- 
Sub ResetSub 
   /keypress esc 
   /keypress esc 
   /keypress esc 
   /varset vFailCount 0 
/return 

|-------------------------------------------------------------------------------- 
|SUB: CheckAnchor 
|-------------------------------------------------------------------------------- 
Sub CheckAnchor 
   | Standing on anchor point? 
   /if ( ${Math.Distance[${Me.Y},${Me.X}:${AnchorY},${AnchorX}]}==0 ) /return 
    
   | Outside vMaxKiteRadius? 
   /if ( ${Math.Distance[${Me.Y},${Me.X}:${AnchorY},${AnchorX}]} > ${Math.Calc[${vMaxKiteRadius}*1.25]} ) { 
      /echo ${ScriptName}: Outside MaxRadius 
      /call MoveToLoc ${AnchorY} ${AnchorX} 
   } 
    
   /if ( ${Math.Distance[${Me.Y},${Me.X}:${AnchorY},${AnchorX}]} > 5 ) { 
      /call MoveToLoc ${AnchorY} ${AnchorX} 
   } 
/return 

|-------------------------------------------------------------------------------- 
|SUB: Check for adds 
|-------------------------------------------------------------------------------- 
Sub CheckAdds 
   /varset tNextTargetID ${Spawn[npc loc ${Me.X} ${Me.Y} radius ${Math.Calc[${vKiteRadius}*1.50]}].ID} 
   /if (${tNextTargetID}==0) /if (${Target.ID}==0) { 
      /echo ${ScriptName}: Checking for adds... 
      /varset tNextTargetID ${Spawn[npc loc ${Me.X} ${Me.Y} radius ${Math.Calc[${vKiteRadius}*1.25]}].ID} 
      /target ${Spawn[${tNextTargetID}]} 
      /echo ${ScriptName}: UPNEXT: ${tNextTargetID} ID: ${Target.ID} 
      /if (${tNextTargetID}==0) /if (!${Target.ID}) { 
         /if (${Twist.Twisting}) { 
            /twist off 
         } 
         /if (${Me.Speed}>0) { 
            /keypress num_lock 
            /keypress forward 
            /keypress back 
         } 
         /call QuickLoot 
      } 
   } else { 
      /call AcquireTarget 
   } 
/return 

|-------------------------------------------------------------------------------- 
|SUB: GM Check 
|-------------------------------------------------------------------------------- 
Sub GMCheck 
   /if (${Spawn[gm].ID}) { 
      /beep 
      /beep 
      /beep 
      /mqlog ${Time.Time12} - GM has entered the zone, ending the macro. 
      /mqlog Current Location: ${Me.X}X ${Me.Y}Y       
      /endmacro 
   } 
/return 

|-------------------------------------------------------------------------------- 
|SUB: Stops auto-running, sits, and camps out 
|-------------------------------------------------------------------------------- 
Sub Camp 
   /if (${Me.Speed}>0) { 
      /keypress num_lock 
   } 
   /call CheckAnchor 
   /sit 
   /delay 5s 
   /camp 
/return 


|#################################################  ############################### 
| 
| EVENT HANDLERS 
| 
|#################################################  ############################### 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Handles when a casting mob was encountered within your area 
|         and retargets accordingly 
|-------------------------------------------------------------------------------- 
Sub Event_Caster(string CastText) 
   /declare CasterID int local 
   /varset CasterID ${Spawn[${CastText.Left[${Math.Calc[${String[${CastText}].Length}-24]}]}].ID} 
   /if (!${Spawn[ID ${CasterID}].Type.Equal[NPC]}) /return 
   /if (${Target.ID}==${CasterID}) /return 
   /if (${Spawn[ID ${CasterID}].Distance}<=${Math.Calc[${vKiteRadius}*2]}) { 
      /target id ${CasterID} 
      /echo ${ScriptName}: Targeting Caster: ${Target.CleanName} 
   } 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: No target in que, get a new one 
|-------------------------------------------------------------------------------- 
Sub Event_NeedTarget 
   /if (${tNextTargetID}==0) /if (${Target.ID}==0) { 
      /echo ${ScriptName}: Need a target... 
      /varset tNextTargetID ${Spawn[npc loc ${Me.X} ${Me.Y} radius ${vKiteRadius}].ID} 
   } else { 
      /call AcquireTarget 
   } 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Got hit, make sure you're moving 
|-------------------------------------------------------------------------------- 
Sub Event_Aggro 
   /echo Aggro event triggered 
   /if (${Me.Speed}==0) { 
      /keypress num_lock 
   } 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Target Out of Range 
|-------------------------------------------------------------------------------- 
Sub Event_OORTarget 
   /if (${Target.Distance}<${vMaxKiteRadius}) { 
      | 
      | Only chase if hps within reasonable range 
      | 
       
      /if ( (${Me.PctHPs}>${HealthMin})&&(${Target.PctHPs}<50) ) { 
         /echo ${ScriptName}: Chasing... 
         /call MoveToLoc ${Target.Y} ${Target.X} 
         /stick behind 
      } 
       
      /if ( (${Me.PctHPs}>${HealthMin})&&(${Target.PctHPs}>50) ) { 
         /echo ${ScriptName}: Pulling... 
         /call MoveToLoc ${Target.Y} ${Target.X} 
         /call MoveToLoc ${AnchorY} ${AnchorX} 
         /echo ${ScriptName}: Speed Check after pull... 
         /keypress num_lock 
      }       
       
   } 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Corpse Out of Range 
|-------------------------------------------------------------------------------- 
Sub Event_OORCorpse 
   /if (${Target.Type.Equal[Corpse]}) { 
      /face 
      /call MoveToLoc ${Target.Y} ${Target.X} 
      /call QuickLoot 
   } 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: You died, sit and camp 
|-------------------------------------------------------------------------------- 
Sub Event_Died 
   /beep 
   /beep 
   /varset meDead 1 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Level up (aka "DING") 
|-------------------------------------------------------------------------------- 
Sub Event_LevelUp 
   /varset LevelFlag 1 
   /mqlog Level'd up to: ${Me.Level} at ${Time.Time12} - ${Time.Date} 
   /varset expTotal 0 
   /varset expAATotal 0 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Update exp timer and counter, then get next target 
|-------------------------------------------------------------------------------- 
Sub Event_Exp 
   /varcalc expTotal ${Me.PctExp}-${expStart} 
   /varcalc expAATotal ${Me.PctAAExp}-${expAAStart} 
   /call CheckAdds 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Timer handlers for songs (recast, etc) 
|-------------------------------------------------------------------------------- 
Sub Event_Timer(string TimerName) 
   /if (${String[${TimerName}].Equal[tmSongTimer]}) { 
      |------------------------------------------------------------------------ 
      |Refresh SeloSong if it's fading & we're outside 
      |------------------------------------------------------------------------ 
      /if (${Me.Buff[${Me.Gem[2].Name}].Duration}<=6) /if (!${Zone.Type}==1) { 
         /squelch /twist once 2 
         /varset tmSongTimer 30 
         /delay 5s 
         /doevents 
         /return 
      } 
      |/echo ${ScriptName}: Timer Fired: ${TimerName} - ${Time.Time12} 
   } 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: Refresh selo's if it wears off 
|-------------------------------------------------------------------------------- 
Sub Event_Selos 
   /if (${Me.Buff[${Me.Gem[2].Name}].Duration}<=6) { 
      /squelch /twist once 2 
      /return 
   }    
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: what to do when you get a tell 
|-------------------------------------------------------------------------------- 
Sub Event_ChatTell(string line,string chatSender,string chatText) 
   /call Event_Chat "tell" "${chatSender}" "${chatText}" 
/return 

|-------------------------------------------------------------------------------- 
|EVENT SUB: handle incoming tells and relay 
|-------------------------------------------------------------------------------- 
Sub Event_Chat(string ChatType,string ChatSender,string ChatText) 
   /if (${ChatType.Equal[TELL]}) { 
      /if (${Spawn[npc ${ChatSender} radius 100].ID}) /return 

   } 
/return


sample chanthunter.ini

Rich (BB code):
[Commanders] 
yournamehere=1 

[Nadox] 
AnchorX=935 
AnchorY=575 
KiteRadius=30 
KiteRadiusReset=30 
StickRunner=0 
SnareRunner=0 
SnarePercent=8 
MaxHuntRadius=120 

[Maiden] 
AnchorX=-1400 
AnchorY=-1650 
KiteRadius=40 
KiteRadiusReset=40 
StickRunner=1 
SnareRunner=1 
SnarePercent=17 
MaxHuntRadius=280 

[LootList] 
Bone Chips=1 
Tears of Prexus=1 
Wing of Xegony=1 
Words of the Ethereal=1 
Words of Bondage=1 
Words of Acquisition (Beza)=1 
Words of Requisition=1 
Nilitim's Grimoire Pg. 378=1 
Nilitim's Grimoire Pg. 401=1 
Nilitim's Grimoire Pg. 415=1 
Nilitim's Grimoire Pg. 416=1 
Nilitim's Grimoire Pg. 449=1 
Nilitim's Grimoire Pg. 450=1 
Rune of Ap`Sagor=1 
Rune of the Astral=1 
Rune of Crippling=1 
Rune of Concussion=1 
Rune of Frost=1 
Rune of Impetus=1 
Rune of Rathe=1 
Block of Acrylia Ore=1 
Large Brick of Acrylia Ore=0 
Small Brick of Acrylia Ore=0 
Small Piece of Acrylia=0 
Goranga Spiked Club=0 
Hardened Driftwood Great Staff=0 
Shiny Ore Machete=0 
Shiny Stone Hammer=0 
Goranga Idol=0 
Hoop of Magi`kot=0 
Breath of Ro=1 
Fecund Luggald Flesh=0 
Cap of the Fallen Spirit=0 
Words of Grappling=1 
Sharp Luggald Claw=1 
Luggald Dagger=0 
Luggald Trident=0 
Peridot=1 
Star Ruby=1 
Blackened Eye=1

basically go through and edit any /twist to the gems that your spells are in. as well as the order you want to twist. second in the ini file you'll need to put down information for the zone.
 
Re: Redguides Listing of Confirmed Macros

Auto-Swarm kite macro for bards by Siddin

Rich (BB code):
#event DropCharm "#*#charm spell#*#"
#event EXP "You have gained group experience!!"
#event EXP "You gain experience!!"

Sub Main
/declare KiteMob int outer 0
/declare Charmed int outer 0
/declare MyTargetID int outer 0
/declare MyPetID int outer 0
/declare InvisPct int outer 35
/declare InvisSong int outer 9
/declare RunSong int outer 8
/declare CharmSong int outer 7
/declare SwamCount int outer 8
/declare StopSwarm int outer 2
/declare ReCharm int outer 0
/declare EXP int outer 0
/declare HealSong int outer 1
/declare HealPct int outer 75
/declare DotOne int outer 2
/declare DotTwo int outer 3
/declare DotThree int outer 4
/declare DotFour int outer 5


:MainLoop
/doevents
/if (${SpawnCount[radius 150]}<=${StopSwarm}) /call WaitForMobs
/nomodkey /keypress forward hold
/if (!${Me.Pet.ID}) /call Charming
/goto :MainLoop
/return

Sub Event_EXP
/varset MyTargetID 0
/varset MyPetID 0
/varset ReCharm 0
/varset EXP 1
/varset KiteMob 0
/varset Charmed 0
/return

Sub Event_DropCharm
/if (${Target.PctHPs}>${InvisPct}) /varset ReCharm 1
/return

Sub WaitingForCharmDrop
:CharmDrop
/if (!${Me.Pet.ID} && ${Target.PctHPs}>=${InvisPct}) /return
/if (${ReCharm}==1 && ${Target.PctHPs}>=${InvisPct}) /return
/doevents
/if (${Target.PctHPs}<=${InvisPct}) {
/squelch /twist ${InvisSong}
/nomodkey /keypress forward hold
/delay 5s
/twist ${DotOne} ${DotTwo} ${DotThree} ${DotFour}
/varset KiteMob 1
/return
}
/goto :CharmDrop
/return

Sub Charmed
/if (${Target.ID}==${Me.Pet.ID}) {
/target id ${MyTargetID} notid ${Me.ID}
/pet attack
/delay 2
/target id ${MyPetID} notid ${Me.ID}
}
/doevents
/return

Sub KiteMob
/target ID ${MyPetID}
/twist ${DotOne} ${DotTwo} ${DotThree} ${DotFour}
:Doevent
/doevents
/if (${KiteMob}==1)/goto :Doevent
/return

Sub WaitForMobs
:WaitForMobs
/nomodkey /keypress forward hold
/doevents
/if (${SpawnCount[radius 150]}>=${SwamCount}) /return
/goto :WaitForMobs
/return

Sub Charming
/target npc radius 150 notid ${Me.ID}
/varset MyPetID ${Target.ID}
/target npc next radius 150 notid ${Me.ID}
/varset MyTargetID ${Target.ID}
/target id ${MyPetID} notid ${Me.ID}
/squelch /twist off
/echo Charming a ${Target.CleanName}
/squelch /twist ${CharmSong}
/delay 4s
/varset ReCharm 0
/call RunSong
/if (!${Me.Pet.ID}) /return
/call Charmed
/call WaitingForCharmDrop
/if (${KiteMob}==1) /call KitingMob
/return

Sub RunSong
/if (${Me.PctHPs}<=${HealPct}) {
/squelch /twist ${RunSong} ${HealSong}
} else {
/squelch /twist ${RunSong}
/nomodkey /keypress forward hold
/delay 4s
}
/return

Sub KitingMob
:kiting
/doevents
/if (${KiteMob}==1) /goto :kiting
/return
 
Re: Redguides Listing of Confirmed Macros

AfkCleric.mac From MQ2 boards posted by Siddin

From MQ2 forums, this works well for a friend of mine, he uses a mage/cleric group, so pretty much the same thing.


AfCleric.mac

Rich (BB code):
#include spell_routines.inc 

#Chat Chat 
#Chat tell 

Sub Main 

|------------READ THIS SECTION AND EDIT IF NEEDED-----------| 

   /declare mychannel string outer boombash 
   /declare autohealmode int outer 3 
   /declare healspell string outer Complete Healing 
   /declare healspellrange int outer 100 
   /declare patchheal string outer Pious Light 
   /declare patchhealrange int outer 100 
   /declare hotspell string outer Pious Elixir 
   /declare hotspellrange int outer 100 
   /declare daspell string outer Divine Barrier 
   /declare yaulpspell string outer Yaulp VI 
   /declare usegroupheal int outer 1 
   /declare groupheal string outer Word of Replenishment 
   /declare grouphealrange int outer 70 
   /declare usedivarb int outer 1 
   /declare healafterdivarb int outer 0 
   /declare announce int outer 1 
   /declare autosit int outer 1 
   /declare distancetosit int outer 40 
   /declare autointerrupt int outer 1 
   /declare onlyhealfd int outer 1 
   /declare interrupt2healself int outer 1 
   /declare interrupt2healselfhp int outer 50 
   /declare noInvis int outer 1 
   /declare defaultstophealpoint int outer 80 
   /declare acbuff string outer Ward of Valiance 
   /declare longhpbuff string outer Conviction 
   /declare singlesymbuff string outer Symbol of Balikor 
   /declare groupsymbuff string outer NULL 
   /declare spellhastebuff string outer Blessing of Reverence 
   /declare rgcspell string outer Remove Greater Curse 
   /declare healpetmode int outer 2 
   /declare pethealpoint int outer 65 
   /declare manatohealpet int outer 25 
   /declare pethealspell string outer Complete Healing 
   /declare pethealspellrange int outer 100 
   /declare nukeone string outer Reproach 
   /declare nuketwo string outer Order 
   /declare stunone string outer Sound of Divinity 
   /declare stuntwo string outer Shock of Wonder 

|** Tweak Heals Here - tankhealpoint is for War/Pal/SK other 
than MT, casterhotpoint and casterpatchpoint refer to 
wiz/mag/enc/dru, necshmpatchpoint refers to necros and 
shamans, defaultpatchpoint refers to all other classes.   **| 

   /declare selfhealpoint int outer 70 
   /declare dacastpoint int outer 29 
   /declare divarbpoint int outer 25 
   /declare interrupt2divarb int outer 12 
   /declare tankhealpoint int outer 65 
   /declare casterhotpoint int outer 85 
   /declare casterpatchpoint int outer 60 
   /declare necshmpatchpoint int outer 60 
   /declare defaultpatchpoint int outer 70 

|**---------------------TrickyDA Config---------------------| 
The following are HP buffs cleric will click off, in order, 
to get above 40% HP and avoid low HP aggro. Clr will then 
click off DA and resume duties, beg new buffs, etc. To 
enable, set trickyda to 1, 0 will disable 
|---------------------------------------------------------**| 
   /declare trickyda int outer 1 
   /if (${trickyda}==1) { 
      /declare intcount int outer 0 
      /declare trickybuff[20] string outer 
      /varset trickybuff[1] Virtue 
      /varset trickybuff[2] Hand of Virtue 
      /varset trickybuff[3] Conviction 
      /varset trickybuff[4] Hand of Conviction 
      /varset trickybuff[5] Focus of Soul 
      /varset trickybuff[6] Focus of the Seventh 
      /varset trickybuff[7] Wunshi's Focusing 
      /varset trickybuff[8] Talisman of Wunshi 
      /varset trickybuff[9] Protection of the 9 
      /varset trickybuff[10] Blessing of the Nine 
      /varset trickybuff[11] Steeloak Skin 
      /varset trickybuff[12] Blessing of Steeloak 
      /varset trickybuff[13] Symbol of Kazad 
      /varset trickybuff[14] Kazad`s Mark 
      /varset trickybuff[15] Symbol of Balikor 
      /varset trickybuff[16] Balikor's Mark 
      /varset trickybuff[17] Brell's Stalwart Shield 
      /varset trickybuff[18] Brell's Brawny Bulwark 
      /varset trickybuff[19] Spiritual Vigor 
      /varset trickybuff[20] Spiritual Vitality 
   } 
|-------------------End TrickyDA Config---------------------| 


|------------------------END EDITING------------------------| 

   /declare healpct int outer 60 
   /declare tankname string outer ${Target} 
   /declare tanknameid int outer 
   /declare tankclass string outer 
   /declare minorhurt int outer 0 
   /declare majorhurt int outer 0 
   /declare worsthurt string outer NULL 
   /declare worsthurtid int outer 
   /declare worsthp int outer 100 
   /declare worstclass string outer NULL 
   /declare gmember int outer 
   /declare nohotforua string outer NULL 
   /declare nohotforub string outer NULL 
   /declare nohotforuc string outer NULL 
   /declare nohotforud string outer NULL 
   /declare rodwait int outer 0 
   /declare following int outer 0 
   /declare follname string outer NULL 
   /declare pallycount int outer 0 
   /declare stophealpoint int outer ${defaultstophealpoint} 
   /declare buffbeg int outer 0 
   /declare oomspam int outer 1 
   /declare lomspam int outer 1 
   /declare duckspam int outer 1 
   /declare duckfdspam int outer 1 
   /declare duckselfspam int outer 1 
   /declare nomtspam int outer 1 
   /declare ghealhurtcount int outer 0 
   /declare divarboor int outer 0 
   /declare aetime int outer 0 

   /join ${mychannel} 


   /if (!${Target.ID}) { 
      /echo Target the Tank when you run this macro to designate him as MT 
      /end 
   } else { 
      /varset tanknameid ${Target.ID} 
      /varset tankclass ${Target.Class.Name} 
   } 

   /if (${Defined[Param0]}) {    
      /varset healpct ${Param0} 
   } else /echo No Heal% specified, defaulting to 60% 
    
   /if (!${Defined[Param1]}) {    
      /echo Usage: /mac AFCleric % healspell 
      /echo Example: /mac AFCleric 40 Complete Heal 
      /echo Defaulting to ${healspell} at ${healpct}% 
   } else {    
      /if (!${Defined[Param2]}) { 
         /varset healspell ${Param1} 
      } else /if (!${Defined[Param3]}) { 
         /varset healspell ${Param1} ${Param2} 
      } else /if (!${Defined[Param4]}) { 
         /varset healspell ${Param1} ${Param2} ${Param3} 
      } else { 
         /varset healspell ${Param1} ${Param2} ${Param3} ${Param4} 
      } 
   } 

   /echo AFCleric Active, running in Autohealmode ${autohealmode} 
   /echo Casting ${healspell} on ${tankname} at ${healpct}% HP 
   /if (${autohealmode}==0) /echo ONLY ${tankname} will be healed 
   /if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed 
   /if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed 
   /if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group 
    
   :tankwatchloop 
   /if (${String[${Spawn[${tanknameid}]}].NotEqual[${tankname}]}) /varset tanknameid 0 
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) { 
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) { 
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID} 
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid} 
      } 
      /if (${SpawnCount[${tankname} ${tankclass}]}>1) { 
         /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) { 
            /beep 
            /varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID} 
            /echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro 
         } else { 
            /beep 
            /echo Need to restart macro to correctly identify the MT 
         } 
      } 
   } 
   /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) { 
      /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) { 
         /varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID} 
         /echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro 
      } 
   } 
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) { 
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) { 
         /target id ${tanknameid} 
         /delay 6 ${Target.ID}==${tanknameid} 
      } 
   } 
   /if (!${Spawn[${tanknameid}].ID}) { 
      /if (${nomtspam}==1) { 
         /e Warning No Designated MT is available 
         /timed 300 /varset nomtspam 1 
         /varset nomtspam 0 
      } 
   } 
   /if ((${Me.PctMana}<=20)&&(${announce}==1)&&(${lomspam}==1)) { 
      /g ${Me.PctMana}m 
      /varset lomspam 0 
      /timed 300 /varset lomspam 1 
   } 
   /if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) { 
      /g oom 
      /varset oomspam 0 
      /timed 300 /varset oomspam 1 
      /call MedTime 
   } 
   /if (${GameState.Equal[CHARSELECT]}) /end 
   /if (${Target.ID}==${tanknameid}) { 
      /varset stophealpoint ${Math.Calc[${healpct}*1.1]} 
      /if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) { 
         /if (${announce}==1) /g Casting ${patchheal} on %T 
         /call Cast "${patchheal}" gem2 1s CheckHP 
         /delay 15 ${Me.SpellReady[${patchheal}]} 
      } 
      /if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) { 
         /if (${announce}==1) /g Casting ${healspell} on %T 
         /call Cast "${healspell}" gem1 1s CheckHP 
         /delay 15 ${Me.SpellReady[${healspell}]} 
      } 
      /varset stophealpoint ${defaultstophealpoint} 
      /call CheckEvents 
   } 
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) { 
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand 
   } 
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) { 
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand 
   } 
   /if (${autohealmode}==0) { 
      /call CheckEvents 
      /goto :tankwatchloop 
   } 
   /if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${selfhealpoint})) /call Healself 
   /if (${autohealmode}>=2) { 
      /if ((${Target.PctHPs}>${healpct})||(${Target.Distance}>${healspellrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tanknameid}  )) { 
         /call Healgroup 
      } 
   } 
   /if ((${autohealmode}<2)&&(${Me.PctHPs}>${selfhealpoint})&&(${Me.PctMana}<=98)) /call MedTime 
   /call CheckEvents 
   /goto :tankwatchloop 
/return 
    

Sub Healself 
   /if (${Me.PctHPs}>${selfhealpoint}) /return 
   /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]} 
   /if ((!${Target.ID})||(${Target.PctHPs}>=${Math.Calc[1.1*${healpct}]})||(${Target.PctHPs}<=1)||(${Target.ID}!=${tanknameid})) { 
      /if ((${Me.PctHPs}<=${selfhealpoint})&&(${Me.PctHPs}>${dacastpoint})) { 
         /target myself 
         /delay 6 ${Target.Name.Equal[${Me}]} 
         /if (${Target.Name.Equal[${Me}]}) { 
            /if (${announce}==1) /g Casting ${patchheal} on %T 
            /call Cast "${patchheal}" gem2 1s CheckHP 
            /delay 15 ${Me.SpellReady[${patchheal}]} 
         } 
      } 
      /if ((${Me.PctHPs}<=${dacastpoint})&&(${Me.SpellReady[${daspell}]})) { 
         /if (${announce}==1) /g Casting DA!! <<WARNING>> DA!! No Heals for 18 SECONDS 
         :retryda 
         /call Cast "${daspell}" 
         /delay 1 
         /if ((!${Me.Buff[${daspell}].ID})&&(${Me.SpellReady[${daspell}]})) /goto :retryda 
         /if ((${trickyda}==1)&&(${Me.Buff[${daspell}].ID})) /call TrickyDA 
         :dawait 
         /if (${Me.Buff[${daspell}].ID}) { 
            /delay 1s !${Me.Buff[${daspell}].ID} 
            /varset stophealpoint ${defaultstophealpoint} 
            /call CheckEvents 
            /goto :dawait 
         } 
      }            
   } 
   /if (${Me.PctHPs}<=${Math.Calc[${selfhealpoint}*0.7]}) { 
      /target myself 
      /delay 6 ${Target.Name.Equal[${Me}]} 
      /if (${Target.Name.Equal[${Me}]}) { 
         /if (${announce}==1) /g Casting ${patchheal} on %T 
         /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]} 
         /call Cast "${patchheal}" gem2 1s CheckHP 
         /delay 15 ${Me.SpellReady[${patchheal}]} 
      } 
   } 
   /varset stophealpoint ${defaultstophealpoint} 
/return 


Sub Healgroup 
   :healgroup 
   /varset worsthurt NULL 
   /varset worsthp 100 
   /varset worstclass NULL 
   /varset minorhurt 0 
   /varset majorhurt 0 
   /varset ghealhurtcount 0 
   /for gmember 0 to ${Group} 
      /if (${onlyhealfd}==0) { 
         /if (${Group[${gmember}].Distance}<=${patchhealrange}) { 
            /if (${Group[${gmember}].PctHPs}<=${worsthp}) { 
               /varset worsthurt ${Group[${gmember}].Name} 
               /varset worsthurtid ${Group[${gmember}].ID} 
               /varset worsthp ${Group[${gmember}].PctHPs} 
               /varset worstclass ${Group[${gmember}].Class.Name} 
            } 
         } 
      } 
      /if (${onlyhealfd}==1) { 
         /if (${Group[${gmember}].Distance}<=${patchhealrange}) { 
            /if ((${Group[${gmember}].Class.Name.NotEqual[Monk]})&&(${Group[${gmember}].Class.Name.NotEqual[Necromancer]})&&(${Group[${gmember}].PctHPs}<=${worsthp})) { 
               /varset worsthurt ${Group[${gmember}].Name} 
               /varset worsthurtid ${Group[${gmember}].ID} 
               /varset worsthp ${Group[${gmember}].PctHPs} 
               /varset worstclass ${Group[${gmember}].Class.Name} 
            } 
            /if ((${Group[${gmember}].Class.Name.Equal[Monk]})||(${Group[${gmember}].Class.Name.Equal[Necromancer]})) { 
               /if ((${Group[${gmember}].State.Equal[feign]})&&(${Group[${gmember}].PctHPs}<=${worsthp})) { 
                  /varset worsthurt ${Group[${gmember}].Name} 
                  /varset worsthurtid ${Group[${gmember}].ID} 
                  /varset worsthp ${Group[${gmember}].PctHPs} 
                  /varset worstclass ${Group[${gmember}].Class.Name} 
               } 
            } 
         } 
      } 
      /if ((${Group[${gmember}].Distance}<=${grouphealrange})&&(${Group[${gmember}].PctHPs}<=85)) /varcalc ghealhurtcount ${ghealhurtcount}+1 
      /if ((${Group[${gmember}].PctHPs}<=85)&&(${Group[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1 
      /if ((${Group[${gmember}].PctHPs}<=60)&&(${Group[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1 
   /next gmember 
   /if (${autohealmode}==3) { 
      /if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) /if (${Spawn[${tanknameid}].ID}) { 
         /target id ${tanknameid} 
         /delay 6 ${Target.ID}==${tanknameid} 
         /delay 1 
         /if ((${Target.ID}==${tanknameid})&&(${Target.PctHPs}<=${healpct})&&(${Target.Distance}<=${healspellrange})) /return 
      } 
      /if (${Me.PctHPs}<=${selfhealpoint}) /return 
   } 
   /if ((${majorhurt}==0)&&(${minorhurt}==0)) { 
      /if (${Spawn[${tanknameid}].ID}) { 
         /target id ${tanknameid} 
         /delay 6 ${Target.ID}==${tanknameid} 
         /delay 1 
      } 
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) { 
         /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet 
         /if (${Me.PctMana}<=98) /call MedTime 
      } 
      /call CheckEvents 
      /return 
   } 
   /if ((${usedivarb}==1)&&(${worsthp}<=${divarbpoint})&&(${Me.AltAbilityReady[divine arbitration]})) /call Divarbcast 
   /if ((${Math.Calc[${majorhurt}+${minorhurt}]}>=3)&&(${usegroupheal}==1)) { 
      /if (${announce}==1) /g Inc Grp Heal, get close 
      /call Cast "${groupheal}" gem4 1s 
      /delay 15 ${Me.SpellReady[${groupheal}]} 
      /call CheckEvents 
      /return 
   } 
   /if (${worsthurtid}==${tanknameid}) /return 
   /if (${worsthurtid}==${Me.ID}) { 
      /call Healself 
      /call CheckEvents 
      /return 
   } 
   /if ((${String[${worstclass}].Equal[Warrior]})||(${String[${worstclass}].Equal[Paladin]})||(${String[${worstclass}].Equal[Shadow Knight]})) { 
      /if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)) { 
         /target id ${worsthurtid} 
    /delay 5 ${Target.ID}==${worsthurtid} 
         /if (!${Target.ID}) /return 
         /if (${Target.ID}!=${worsthurtid}) /return 
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]} 
         /if (${announce}==1) /g Casting ${healspell} on %T 
         /call Cast "${healspell}" gem1 1s CheckHP 
         /delay 15 ${Me.SpellReady[${healspell}]} 
         /varset stophealpoint ${defaultstophealpoint} 
         /call CheckEvents 
         /return 
      } 
      /if (${worsthp}<=${tankhealpoint}) { 
         /target id ${worsthurtid} 
    /delay 5 ${Target.ID}==${worsthurtid} 
         /if (!${Target.ID}) /return 
         /if (${Target.ID}!=${worsthurtid}) /return 
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]} 
         /if (${announce}==1) /g Casting ${patchheal} on %T 
         /call Cast "${patchheal}" gem2 1s CheckHP 
         /delay 15 ${Me.SpellReady[${patchheal}]} 
         /varset stophealpoint ${defaultstophealpoint} 
         /call CheckEvents 
         /return 
      } 
   } else /if ((${String[${worstclass}].Equal[Magician]})||(${String[${worstclass}].Equal[Wizard]})||(${String[${worstclass}].Equal[Enchanter]})||(${String[${worstclass}].Equal[Druid]})) { 
      /if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) { 
         /if ((${String[${worsthurt}].Equal[${nohotforua}]})||(${String[${worsthurt}].Equal[${nohotforub}]})||(${String[${worsthurt}].Equal[${nohotforuc}]})||(${String[${worsthurt}].Equal[${nohotforud}]})) /return 
         /if (${String[${nohotforua}].Equal[NULL]}) { 
            /target id ${worsthurtid} 
       /delay 5 ${Target.ID}==${worsthurtid} 
       /if (!${Target.ID}) /return 
            /if (${Target.ID}!=${worsthurtid}) /return 
            /varset nohotforua ${Target.Name} 
            /if (${announce}==1) /g Casting ${hotspell} on %T 
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]} 
            /call Cast "${hotspell}" gem3 1s CheckHP 
            /timed 200 /varset nohotforua NULL 
            /delay 15 ${Me.SpellReady[${hotspell}]} 
         } else /if (${String[${nohotforub}].Equal[NULL]}) { 
            /target id ${worsthurtid} 
       /delay 5 ${Target.ID}==${worsthurtid} 
       /if (!${Target.ID}) /return 
            /if (${Target.ID}!=${worsthurtid}) /return 
       /varset nohotforub ${Target.Name} 
            /if (${announce}==1) /g Casting ${hotspell} on %T 
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]} 
            /call Cast "${hotspell}" gem3 1s CheckHP 
            /timed 200 /varset nohotforub NULL 
            /delay 15 ${Me.SpellReady[${hotspell}]} 
         } else /if (${String[${nohotforuc}].Equal[NULL]}) { 
            /target id${worsthurtid} 
       /delay 5 ${Target.ID}==${worsthurtid} 
       /if (!${Target.ID}) /return 
            /if (${Target.ID}!=${worsthurtid}) /return 
       /varset nohotforuc ${Target.Name} 
            /if (${announce}==1) /g Casting ${hotspell} on %T 
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]} 
            /call Cast "${hotspell}" gem3 1s CheckHP 
            /timed 200 /varset nohotforuc NULL 
            /delay 15 ${Me.SpellReady[${hotspell}]} 
         } else /if (${String[${nohotforud}].Equal[NULL]}) { 
            /target id ${worsthurtid} 
       /delay 5 ${Target.ID}==${worsthurtid} 
       /if (!${Target.ID}) /return 
            /if (${Target.ID}!=${worsthurtid}) /return 
       /varset nohotforud ${Target.Name} 
            /if (${announce}==1) /g Casting ${hotspell} on %T 
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]} 
            /call Cast "${hotspell}" gem3 1s CheckHP 
            /timed 200 /varset nohotforud NULL 
            /delay 15 ${Me.SpellReady[${hotspell}]} 
         } 
         /varset stophealpoint ${defaultstophealpoint} 
         /call CheckEvents 
         /return 
      } 
      /if ((${worsthp}<=${casterpatchpoint})&&(${worsthp}>=1)) { 
         /target id ${worsthurtid} 
    /delay 5 ${Target.ID}==${worsthurtid} 
    /if (!${Target.ID}) /return 
         /if (${Target.ID}!=${worsthurtid}) /return 
         /if (${announce}==1) /g Casting ${patchheal} on %T 
         /call Cast "${patchheal}" gem2 1s CheckHP 
         /varset stophealpoint ${defaultstophealpoint} 
         /call CheckEvents 
         /delay 15 ${Me.SpellReady[${patchheal}]} 
         /return 
      } 
      /varset stophealpoint ${defaultstophealpoint} 
   } else /if ((${String[${worstclass}].Equal[Necromancer]})||(${String[${worstclass}].Equal[Shaman]})) { 
      /if ((${worsthp}<=${necshmpatchpoint})&&(${worsthp}>=1)) { 
         /target id ${worsthurtid} 
    /delay 5 ${Target.ID}==${worsthurtid} 
    /if (!${Target.ID}) /return 
         /if (${Target.ID}!=${worsthurtid}) /return 
         /varset stophealpoint ${Math.Calc[${necshmpatchpoint}+5]} 
         /if (${announce}==1) /g Casting ${patchheal} on %T 
    /call Cast "${patchheal}" gem2 1s CheckHP 
    /varset stophealpoint ${defaultstophealpoint} 
    /call CheckEvents 
    /delay 15 ${Me.SpellReady[${patchheal}]} 
    /return 
      } 
   } else /if ((${worsthp}<=${defaultpatchpoint})&&(${worsthp}>=1)) { 
      /target id ${worsthurtid} 
      /delay 5 ${Target.ID}==${worsthurtid} 
      /if (!${Target.ID}) /return 
      /if (${Target.ID}!=${worsthurtid}) /return 
      /if (${announce}==1) /g Casting ${patchheal} on %T 
      /varset stophealpoint ${Math.Calc[${defaultpatchpoint}+5]} 
      /call Cast "${patchheal}" gem2 1s CheckHP 
      /varset stophealpoint ${defaultstophealpoint} 
      /call CheckEvents 
      /delay 15 ${Me.SpellReady[${patchheal}]} 
      /return 
   } 
   /varset stophealpoint ${defaultstophealpoint} 
   /if ((${healpetmode}==2)&&(${Me.PctMana}>${manatohealpet})) /call HealPet 
/return 


Sub Divarbcast 
   /varset divarboor 0 
   /for gmember 0 to ${Group} 
      /if (${Group[${gmember}].Distance}>200) /varcalc divarboor ${divarboor}+1 
   /next gmember 
   /if (${Math.Calc[${Group}-${divarboor}]}>=2) { 
      /if (${announce}==1) /g Inc Divine Arbitration 
      /call Cast "Divine Arbitration" alt 2s 
      /if ((${healafterdivarb}==1)&&(${Me.PctMana}>40)) { 
         /if (${announce}==1) /g Inc Grp Heal, get close 
         /call Cast "${groupheal}" gem4 2s 
         /delay 15 ${Me.SpellReady[${groupheal}]} 
      } 
   } 
/return 


Sub HealPet 
   /varset worsthurt NULL 
   /varset worsthp 100 
   /for gmember 0 to ${Group} 
      /if (${Group[${gmember}].Pet.ID}) { 
         /if (${Group[${gmember}].Pet.Distance}<=${pethealspellrange}) { 
            /if ((${Group[${gmember}].Pet.PctHPs}<=${worsthp})&&(${Group[${gmember}].Pet.PctHPs}<=${pethealpoint})) { 
               /varset worsthurt ${Group[${gmember}].Pet.Name} 
               /varset worsthurtid ${Group[${gmember}].Pet.ID} 
               /varset worsthp ${Group[${gmember}].Pet.PctHPs} 
            } 
         } 
      } 
   /next gmember 
   /if (${String[${worsthurt}].NotEqual[NULL]}) { 
      /target id ${worsthurtid} 
      /delay 5 ${Target.ID}==${worsthurtid} 
      /if (!${Target.ID}) /return 
      /if (${Target.ID}!=${worsthurtid}) /return 
      /delay 3 
      /if (${Target.PctHPs}<=${pethealpoint}) { 
         /if (${announce}==1) /g Casting ${pethealspell} on %T 
         /varset stophealpoint ${Math.Calc[${pethealpoint}+5]} 
         /call Cast "${pethealspell}" spell 1s CheckHP 
         /varset stophealpoint ${defaultstophealpoint} 
         /delay 15 ${Me.SpellReady[${pethealspell}]} 
      } 
   } 
/return 


Sub CheckEvents 
   /delay 1 
   /doevents Chat 
   /doevents tell 
   /doevents flush 
/return 


Sub MedTime 
   :oomwait 
   /call CheckEvents 
   /If ((${FindItem["Rod of Mystical Transvergance"].InvSlot})&&(${Me.PctMana}<=70)&&(${Me.PctHPs}>=98)&&(${rodwait}==0)) { 
      /call Cast "Rod of Mystical Transvergance" item 
      /varset rodwait 1 
      /timed 3000 /varset rodwait 0 
   } 
   /if ((${autosit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) { 
      /if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${distancetosit}]})&&(${Me.PctHPs}>90)) /sit 
      /if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]})) /stand 
   } 
   /if ((${Bool[${Me.Standing}]})&&(${autosit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit 
   /if ((${Bool[${Me.Sitting}]})&&(${autosit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand 
   /if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID})) { 
      /if ((!${Me.Buff[Vallon].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Strength of Tunare].ID})) /call Cast "${yaulpspell}" 
   } 
   /if (${buffbeg}==1) /call Buffbeg 
   /if (${Me.PctHPs}<=${selfhealpoint}) /return 
   /if (${Me.PctMana}<=8) /goto :oomwait 
/return 


Sub CheckHP 
   /if (!${Window[CastingWindow].Open}) /return 
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) { 
      /if ((${announce}==1)&&(${duckspam}==1)) { 
         /g Ducking heal on %T 
         /e Ducking heal on ${Target.Name} 
         /varset duckspam 0 
         /timed 60 /varset duckspam 1 
      } 
      /call Interrupt 
      /return 
   } 
   /if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) { 
      /if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) { 
         /call Interrupt 
         /call Divarbcast 
         /return 
      } 
      /if ((${announce}==1)&&(${duckselfspam}==1)) { 
         /g Ducking heal on %T so I can heal my (ChickenShit) self 
         /e Ducking heal on ${Target} so I can heal myself 
         /varset duckselfspam 0 
         /timed 60 /varset duckselfspam 1 
      } 
      /call Interrupt 
      /return 
   } 
   /if (${onlyhealfd}==1) { 
      /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Monk]})) { 
         /if (${Target.State.NotEqual[feign]}) { 
            /if ((${announce}==1)&&(${duckfdspam}==1)) { 
               /g Ducking heal on %T because he isn't staying FD 
               /e Ducking heal on ${Target.Name} because he isn't staying FD 
               /varset duckfdspam 0 
               /timed 40 /varset duckfdspam 1 
            } 
            /call Interrupt 
            /return 
         } 
      } 
   } 
   /if ((${usedivarb}==1)&&(${Target.PctHPs}<=${divarbpoint})&&(${Target.Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) { 
      /for gmember 0 to ${Group} 
         /if (${Target.ID}==${Group[${gmember}].ID}) { 
            /call Interrupt 
            /call Divarbcast 
            /return 
         } 
      /next gmember 
   } 
/return 


Sub TrickyDA 
   /for intcount 1 to 20 
      /if ((${Me.PctHPs}<40)&&(${Me.Buff[${trickybuff[${intcount}]}].ID})) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${trickybuff[${intcount}]}].ID}-1].Int} leftmouseup 
   /next intcount 
   /if (${Me.Buff[${daspell}].ID}) { 
      :waitalittle 
      /delay 1s ${Me.Buff[${daspell}].Duration}<2 
      /if (${Me.Buff[${daspell}].Duration}>=2) /goto :waitalittle 
   } 
   /varset buffbeg 1 
   /call Buffbeg 
/return 


Sub Buffbeg 
   /if (${buffbeg}==0) /return 
   /echo Begging for buffs now 
   /if ((!${Me.Buff[Voice of Quellious].ID})&&(!${Me.Buff[Tranquility].ID})&&(!${Me.Buff[Koadic's Endless Intellect].ID})&&(!${Me.Buff[Clairvoyance].ID})&&(!${Me.Buff[Voice of Clairvoyance].ID})) { 
      /if (${String[${NearestSpawn[PC guild enchanter]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild enchanter].Distance}<=100) { 
         /tell ${NearestSpawn[PC guild enchanter]} need C plz 
         /delay 20 
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup 
      } else /e No guild Enchanter available for C5 
   } 
   /if ((!${Me.Buff[Protection of the Nine].ID})&&(!${Me.Buff[Blessing of the Nine].ID})&&(!${Me.Buff[Steeloak Skin].ID})&&(!${Me.Buff[Blessing of Steeloak].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) { 
      /if (${String[${NearestSpawn[PC guild druid]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild druid].Distance}<=100) { 
         /tell ${NearestSpawn[PC guild druid]} need dru crack plz 
         /delay 20 
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup 
      } else /e No guild Druid available for DRU crack 
   } 
   /if ((!${Me.Buff[Spiritual Dominion].ID})&&(!${Me.Buff[Spiritual Ascendance].ID})) { 
      /if (${String[${NearestSpawn[PC guild beastlord]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild beastlord].Distance}<=100) { 
         /tell ${NearestSpawn[PC guild beastlord]} need bst crack plz 
         /delay 20 
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup 
      } else /e No guild Beastlord available for BST crack 
   } 
   /if ((!${Me.Buff[Kazad`s Mark].ID})&&(!${Me.Buff[Symbol of Kazad].ID})&&(!${Me.Buff[Symbol of Balikor].ID})&&(!${Me.Buff[Balikor's Mark].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) { 
      /if (${String[${NearestSpawn[PC guild cleric]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild cleric].Distance}<=100) { 
         /tell ${NearestSpawn[PC guild cleric]} need sym plz 
         /delay 20 
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup 
      } else /e No guild Cleric available for Symbol 
   } 
   /if ((!${Me.Buff[Brell's Stalwart Shield].ID})&&(!${Me.Buff[Brell's Brawny Bulwark].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Spiritual Vitality].ID})) { 
      /if (${String[${NearestSpawn[PC guild paladin]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild paladin].Distance}<=100) { 
         /tell ${NearestSpawn[PC guild paladin]} need BSS plz 
         /delay 20 
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup 
      } else /e No guild Paladin available for BSS 
   }      
   /if ((!${Me.Buff[Shield of Maelin].ID})&&(!${Me.Buff[Focus of the Seventh].ID})&&(!${Me.Buff[Focus of Soul].ID})&&(!${Me.Buff[Wunshi's Focusing].ID})&&(!${Me.Buff[Talisman of Wunshi].ID})) { 
      /if (${String[${NearestSpawn[PC guild shaman]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild shaman].Distance}<=100) { 
         /tell ${NearestSpawn[PC guild shaman]} need focus plz 
         /delay 20 
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup 
      } else /e No guild Shaman available for Focus 
   } 
   /varset buffbeg 0 
/return 


Sub FindExactPC(string name) 
   /declare nameid int local 
   /declare counter int local 1 
   :FindNext 
   /if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return NOT_FOUND 
   /varset nameid ${NearestSpawn[${counter}, pc ${name}].ID} 
   /if (${Spawn[${nameid}].CleanName.Equal[${name}]}) { 
      /target id ${nameid} 
      /delay 1s ${Target.ID}==${nameid} 
      /if (${Target.ID}==${nameid}) /return TARGET_SUCCESS 
   } 
   /varcalc counter ${counter}+1 
   /if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext 
/return NOT_FOUND 


Sub Event_Chat(string ChatType,string Sender,string ChatText) 
   /if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})) /return 
   /if (!${Spawn[${Sender}].ID}) { 
      /e ${Sender} is not in the zone 
      /return 
   } 
   /if (${ChatText.Equal[Follow me]}) { 
      /delay 5 
      /if (!${Spawn[${Sender}].ID}) { 
         /e ${Sender} is not in zone for me to follow! 
         /return 
      } 
      /varset follname ${Sender} 
      /varset following 1 
      :targetfoll 
      /target pc ${follname} 
      /delay 1s ${Target.Name.Equal[${follname}]} 
      /if (${Target.Name.Equal[${follname}]}) { 
         /goto :Loop 
      } else /goto :targetfoll 
      :Loop 
      /face fast 
      /if (${Target.Distance}>10) /keypress forward hold 
      /if (${Target.Distance}<9) /keypress back 
      /if (!${Target.ID}) /varset following 0 
      /call CheckEvents 
      /if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) { 
         /goto :Loop 
      } else { 
         /keypress forward 
         /keypress back 
      } 
   } 
   /if (${ChatText.Equal[End follow]}) { 
      /varset following 0 
      /keypress forward 
      /keypress back 
      /timed 50 /face pc ${follname} 
   } 
   /if (${ChatText.Equal[Gbuff now!]}) { 
      /varset pallycount 0 
      /target myself 
      /call Cast "${acbuff}" gem6 7s 
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
      /for gmember 1 to ${Group} 
         /target id ${Group[${gmember}].ID} 
         /delay 1s ${Target.ID}==${Group[${gmember}].ID} 
         /if (${Target.ID}==${Group[${gmember}].ID}) { 
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${acbuff}" gem5 7s 
            /if (${Target.Class.Name.Equal[Paladin]}) { 
               /call Cast "${longhpbuff}" gem4 10s 
               /varcalc pallycount ${pallycount}+1 
            } 
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) { 
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
            } 
         } 
      /next gmember 
      /if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(${String[${groupsymbuff}].NotEqual[NULL]})) /call Cast "${groupsymbuff}" gem5 10s 
      /if ((${Math.Calc[${Group}-${pallycount}]}<2)||(${String[${groupsymbuff}].Equal[NULL]})) { 
         /for gmember 0 to ${Group} 
            /target id ${Group[${gmember}].ID} 
            /delay 1s ${Target.ID}==${Group[${gmember}].ID} 
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${singlesymbuff}" gem5 7s 
         /next gmember 
      } 
   }    
   /if (${ChatText.Equal[BoR now!]}) { 
      /target myself 
      /delay 5 ${Target.Name.Equal[${Me}]} 
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
      /for gmember 1 to ${Group} 
         /target id ${Group[${gmember}].ID} 
         /delay 1s ${Target.ID}==${Group[${gmember}].ID} 
         /if (${Target.ID}==${Group[${gmember}].ID}) { 
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) { 
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
            } 
         } 
      /next gmember 
   }    
   /if (${ChatText.Equal[nuke]}) { 
      /if (${Me.PctMana}<30) { 
         /chat #${mychannel} Cleric Mana ${Me.PctMana}%, holding on nukes! 
      } else { 
         /assist ${Sender} 
         /delay 5 
         /if (${Target.Type.NotEqual[NPC]}) { 
            /assist ${Sender} 
            /delay 5 ${Target.Type.Equal[NPC]} 
         } 
         /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) { 
            /if (${Me.SpellReady[${nukeone}]}) { 
               /if (${announce}==1) /g Casting ${nukeone} on %T 
               /call Cast "${nukeone}" spell 3s 
            } else /if (${Me.SpellReady[${nuketwo}]}) { 
               /if (${announce}==1) /g Casting ${nuketwo} on %T 
               /call Cast "${nuketwo}" spell 3s 
            } else /chat #${mychannel} nukes not ready 
            /if (${Me.PctMana}<=60) /chat #${mychannel} FYI Cleric Mana ${Me.PctMana}% 
         } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP) 
      } 
   } 
   /if (${ChatText.Equal[stun]}) { 
      /assist ${Sender} 
      /delay 5 
      /if (${Target.Type.NotEqual[NPC]}) { 
         /assist ${Sender} 
         /delay 5 ${Target.Type.Equal[NPC]} 
      } 
      /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) { 
         /if (${Me.SpellReady[${stunone}]}) { 
            /if (${announce}==1) /g Casting ${stunone} on %T 
            /call Cast "${stunone}" spell 3s 
         } else /if (${Me.SpellReady[${stuntwo}]}) { 
            /if (${announce}==1) /g Casting ${stuntwo} on %T 
            /call Cast "${stuntwo}" spell 3s 
         } else /chat #${mychannel} stuns not ready 
      } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP) 
   } 
   /if (${ChatText.Equal[buffme]}) { 
      /call FindExactPC ${Sender} 
      /if (${String[${Macro.Return}].NotEqual[TARGET_SUCCESS]}) /return 
      /if (${Target.Class.Name.Equal[Paladin]}) { 
         /call Cast "${longhpbuff}" gem4 10s 
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
         /return 
      } 
      /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) { 
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
      } 
      /call Cast "${acbuff}" gem6 7s 
      /call Cast "${singlesymbuff}" gem5 7s 
   } 
   /if ((${ChatText.Equal[patch me]})||(${ChatText.Equal[heal]})||(${ChatText.Equal[heal me]})||(${ChatText.Equal[heal plz]})||(${ChatText.Equal[heal me plz]})||(${ChatText.Equal[need heal]})) { 
      /call FindExactPC ${Sender} 
      /if (${String[${Macro.Return}].NotEqual[TARGET_SUCCESS]}) /return 
      /if (${Target.Distance}<=${patchhealrange}) { 
         /if (${announce}==1) /g Casting ${patchheal} on %T 
         /call Cast "${patchheal}" gem2 2s 
         /delay 15 ${Me.SpellReady[${patchheal}]} 
      } else /tell ${Sender} your OOR 
   } 
   /if ((${ChatText.Equal[sym]})||(${ChatText.Equal[wog]})||(${ChatText.Equal[V]})||(${ChatText.Equal[bor]})||(${ChatText.Equal[rgc]})||(${ChatText.Equal[hot me]})||(${ChatText.Equal[ch me]})||(${ChatText.Equal[pb]})) { 
      /if (${Spawn[pc ${Sender}].Distance}>250) /return 
      /call FindExactPC ${Sender} 
      /if (${String[${Macro.Return}].NotEqual[TARGET_SUCCESS]}) /return 
   } 
   /if (${ChatText.Equal[sym]}) /call Cast "${singlesymbuff}" gem5 7s 
   /if (${ChatText.Equal[wog]}) /call Cast "${acbuff}" gem6 7s 
   /if (${ChatText.Equal[V]}) /call Cast "${longhpbuff}" gem4 10s 
   /if (${ChatText.Equal[bor]}) { 
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item 
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s 
   } 
   /if (${ChatText.Equal[rgc]}) { 
      /if (${FindItem[Blackflame Sphere].ID}) { 
         /call Cast "Blackflame Sphere" item 
      } else /if (${FindItem[Wand of Casual Blessings].ID}) { 
         /call Cast "Wand of Casual Blessings" item 
      } else /call Cast "${rgcspell}" gem8 5s 
   } 
   /if (${ChatText.Equal[buff pet]}) { 
      /target ${Spawn[pc ${Sender}].Pet} 
      /delay 8 
      /target ${Spawn[pc ${Sender}].Pet} 
      /call Cast "${acbuff}" gem6 7s 
      /call Cast "${singlesymbuff}" gem5 7s 
   } 
   /if (${ChatText.Equal[da pet]}) { 
      /target ${Spawn[pc ${Sender}].Pet} 
      /delay 6 
      /target ${Spawn[pc ${Sender}].Pet} 
      /if (${Me.AltAbilityReady[39]}) /if (${String[${Target.Name}].Equal[${Spawn[pc ${Sender}].Pet.Name}]}) { 
         /call Cast "39" alt 
      } else { 
         /chat #${mychannel} Bestow Divine Aura is not ready, or Target (%T) OOR or wrong target 
      } 
   } 
   /if (${ChatText.Equal[pb]}) /call Cast "Pure Blood" gem6 10s 
   /if (${ChatText.Equal[hot me]}) { 
      /if (${Target.Distance}<=${hotspellrange}) { 
         /if (${announce}==1) /g Casting ${hotspell} on %T 
         /call Cast "${hotspell}" gem2 2s 
         /delay 15 ${Me.SpellReady[${hotspell}]} 
      } else /tell ${Sender} your OOR 
   } 
   /if (${ChatText.Equal[ch me]}) { 
      /if (${Target.Distance}<=100) { 
         /if (${announce}==1) /g Casting Complete Healing on %T 
         /call Cast "Complete Healing" gem2 5s 
         /delay 15 ${Me.SpellReady[${hotspell}]} 
      } else /tell ${Sender} your OOR 
   } 
   /if (${ChatText.Equal[mana check]}) /chat #${mychannel} Cleric Mana ${Me.PctMana}% 
   /if (${ChatText.Equal[slowcamp]}) { 
      /if (${Me.Standing}) /sit 
      /delay 5m ${Me.PctMana}>=98 
      /camp 
      /end 
   } 
/return

You will also need

Here's the Documentation that he had for it, its all written by fantum409, I take no credit except for finding it again *grin*

Rich (BB code):
|**---------------------------------------------------------- 
AFCleric.mac 

Run the macro with Main Tank targeted. 
Usage: /mac AFCleric <%health> <Heal spell> 
Defaults to casting Complete Healing at 60% 

This Cleric macro operates in 4 modes: 

autohealmode=0 will watch a single target's health 
relentlessly. The cleric will not heal self or group, only 
the specified Tankname at the specified %health. 
If the Tank takes dmg fast enough that HP is less than 70% 
of the specified %health, the patchspell will be cast. 
The Tank does not need to be in your group. 

autohealmode=1 will watch Tank as above, but also heal 
self and even attempt to cast DA if self HP get too low. 

autohealmode=2 will watch Tank, self, and also the rest of 
the group. Heals will go first to the person in group with 
lowest HP percentage. Healtypes for people other than Tank 
and self will be based on Class and HP percentage. 

autohealmode=3 is exactly the same as mode 2, except that 
Tank HP and self HP are double checked immediately before 
healing anyone else. If Tank or self HP are low enough to 
justify a heal, they get it first even if other group 
members have lower HP. IE: it tries not to let Tank or 
self die while healing that overnuking wizard. =) 

FaNTuM 
----------------------------------------------------------**| 

Configuration of this program is important. If you run this "out of the box" it may work for you, but will work better for you if you read over the declares in the beginning carefully and make adjustments for your cleric in your environment. Setting something to 0 turns it off, 1 turns on. A couple things can be set to various modes like healmode and autosit. 

|Examples: 
/declare mychannel string outer mychannel 
|as is, will make you autojoin "mychannel." BE SURE TO CHANGE THAT. 
/declare autohealmode int outer 3 
|SEE ABOVE, THIS IS KEY 
/declare healspell string outer Complete Healing 
|Primary healspell to be cast on the main tank 
/declare healspellrange int outer 100 
|Range of primary heal spell 
/declare patchheal string outer Pious Light 
|Patch heal spell. Could be remedy or a light spell, usually 
/declare patchhealrange int outer 100 
|Patch heal spell range 
/declare hotspell string outer Pious Elixir 
|HoT spell of choice, will be cast only on casters and druids, unless requested via chat command. 
/declare hotspellrange int outer 100 
|HoT spell range 
/declare daspell string outer Divine Barrier 
|Divine aura spell of choice 
/declare yaulpspell string outer Yaulp VI 
|Yaulp of choice. Will only be cast if spell is memmed and clr is standing. Recommend autosit mode 0 if you like using yaulp 
/declare usegroupheal int outer 1 
|Toggles use of group heals 
/declare groupheal string outer Word of Replenishment 
|Group heal of choice 
/declare grouphealrange int outer 70 
|Group heal spell range 
/declare usedivarb int outer 1 
|Toggles divine arbitration usage 
/declare healafterdivarb int outer 0 
|Selecting 1 will always cast group heal spell after a div arb. Careful with this one if not grouped with the main tank 
/declare announce int outer 1 
|Toggles annouuncing to group. WHEN GROUPED WITH UNTRUSTED PEOPLE, SET IT TO 0 SO YOUR NOT OBVIOUS ABOUT RUNNING A MACRO 
/declare autosit int outer 1 
|3 Modes: 0,1,2: 
|autosit=0 never sits automatically, allows manual control 
|autosit=1 will sit between heals only if no mobs are within (atack range + distancetosit). When any mob comes within (attack range + (distancetosit / 3)) it will stand. 
|autosit=2 will always sit between heals if nobody is hurt. 
|TIP: make a hotkey in game to toggle autosit mode so you dont autosit while trying to move: </varset autosit 0> will work from in game. 
/declare distancetosit int outer 40 
|See above. Adjust distancetosit up or down if needed depending on the zone, etc. 
/declare autointerrupt int outer 1 
|Toggles automatically interrupting spells. Setting to 0 isn't recommended except for spamming a tank on a raid, etc 
/declare onlyhealfd int outer 1 
|Set to 1 to prevent healing monks and necros while standing. Helps prevent messing up a pull and training the group 
/declare interrupt2healself int outer 1 
|Toggles interrupting heals on others to heal yourself 
/declare interrupt2healselfhp int outer 50 
|How low your HP can go before heals on others will get interrupted to heal self 
/declare noInvis int outer 1 
|Setting this to 1 will prevent you from breaking invis to cast a spell 
/declare defaultstophealpoint int outer 80 
|If target HP go above this level, you will duck heal (if autointerrupt is enabled) 
/declare acbuff string outer Ward of Valiance 
|AC buff of choice 
/declare longhpbuff string outer Conviction 
|Temp, Virtue, Conviction 
/declare singlesymbuff string outer Symbol of Balikor 
|Single target symbol spell 
/declare groupsymbuff string outer NULL 
|Group sym spell. Set to NULL will make the group buff routine use a single target sym spell on everyone 
/declare spellhastebuff string outer Blessing of Reverence 
|Single target spell haste. Careful with group spell haste here, would cast repeatedly single in group buff routine. Will use ornate BP if you have one 
/declare rgcspell string outer Remove Greater Curse 
|Remove curse spell 
/declare healpetmode int outer 2 
|3 Modes: 0,1,2: 
|0=don't heal pets 
|1=heal pets only if MT and groupmembers are all above 85% hp 
|2=heal pets as long as MT and group are all above their specified healpoints 
/declare pethealpoint int outer 65 
|Threshold for pet heals 
/declare manatohealpet int outer 25 
|Must have at least this much mana to consider healing a pet 
/declare pethealspell string outer Complete Healing 
|What spell to heal pets with. Note pet can be main tank, and would then be healed with patch, etc if needed. 
/declare pethealspellrange int outer 100 
|Pet heal spell range 
/declare nukeone string outer Reproach 
|Used in nuke chat command. Must have spell already memmed 
/declare nuketwo string outer Order 
|Used in nuke chat command. Must have spell already memmed 
/declare stunone string outer Sound of Divinity 
|Used in stun chat command. Must have spell already memmed 
/declare stuntwo string outer Shock of Wonder 
|Used in stun chat command. Must have spell already memmed 



|** 
The following chat commands are presently supported, through tells or the chat channel: 
Follow me (follow sender) 
End follow (... ) 
Gbuff now! (buff group) 
BoR now! (single BoR whole group) 
nuke (nuke sender's target once - must have spell memmed) 
stun (stun sender's target once - must have spell memmed) 
buffme (BoR, WoG, Sym by default) 
patch me, heal, heal me, heal plz, heal me plz, need heal (casts patch heal spell on sender) 
sym (single sym on sender) 
wog (single ac buff) 
V (single V) 
bor (single BoR) 
rgc (Remove greater curse, will cast from item if you have one) 
hot me (single HoT) 
ch me (duh) 
pb (pure blood) 
buff pet (ac buff, sym on sender's pet) 
da pet (Casts bestow divine aura on sender's pet) 
mana check (replies to chat channel with mana) 
slowcamp (sits and meds to full then /camp and /end. Use in safe spot, this ends macro) 
**| 


|The following ingame hotkeys are recommended, in addition to any you normally use to start the macro. 
/varset autosit 0 
/varset buffbeg 1 
/mqpause

spell_routines.inc

Rich (BB code):
| spell_routines.inc 
| 
| Written by Rusty~ 
| Last Modified 11/07/2004 
| 
| Features: 
| - Casts spells, clicks items, or uses AA abilities for you 
| - Allows back to back casting without waiting on spell gems to pop all the way up 
| - Will interrupt spell if target dies while casting. If on a mount, it will dismount and duck if the time left 
|   is greater than 7 seconds, else it will move forward a bit to interrupt, then move you back 
|    ** IMPORTANT: if you don't want to interrupt a spell while mounted, put this at the top of your macro: ** 
|    **   /declare noInterrupt int outer 1                                                                  ** 
| - Allows you to use items in bags. Equips item, clicks it, then returns it to its previous location 
| - Lets you set how long you want to keep trying to cast the spell (defaults to 0) 
|   If the spell is interrupted before the given time, it will recast, else it will return CAST_INTERRUPTED 
| - Lets you call a custom subroutine while waiting for spell to finish casting 
|   Try to keep custom subroutines very small. A common use would be to interrupt the spell if a certain condition is true 
| - This file also includes a sub named Interrupt. You can call this to interrupt any spell you're casting instantly. 
| - You can also use the SwapItem sub included in this to swap items to certain slots 
| - Added EquipItem sub to easily equip items in your main Inventory slots. 
| - Note: if you don't want this to cast spells while you're invis, in your main macro have this at the top: 
|      /declare noInvis int outer 1 
|   This will make it return CAST_INVIS if you're invis 
| 
|  Below is a list of outer scope variables you can access in your macros: 
|      refreshTime        - How much time is left till you're done recovering from casting 
|      castEndTime        - How much time left till you're done casting the current spell... usable in custom spell Subs 
|      spellNotHold       - 1 if your last spell didn't take hold, 0 otherwise 
|      spellRecastTime1-9 - How much time left till that spell is back up 
| 
|=================================================  ==================================================  =================== 
|  EquipItem:  An easier way to equip items you have in bags ( useful for weapons or focus items ) 
|              slot name is optional. If not given, it will equip it in the first possible spot 
| 
|    Usage:    
|        /call EquipItem "item name|slotname" 
| 
|        Returns: "old item name|slotname" 
|    Examples: 
|    
|    To Equip Sharp Ended Broken Lever when you have Serpent of Vindication equiped: 
|        /call EquipItem "Sharp Ended Broken Lever" 
|    It will return "Staff of Vindication|mainhand" 
|    To reequip the original item, you can save the return in a variable, and then use it later like this: 
|       /varset oldPrimary ${Macro.Return} 
|       | ... do stuff here with your new item equiped 
|       /call EquipItem ${oldPrimary} 
| 
|=================================================  ==================================================  =================== 
|  SwapItem:  a subroutine which is used in the Cast sub itself. You don't need to do this to cast an item in a bag 
|             but you can call it in your macro to SwapItems (such as weapons or focus items) 
|    Usage:    
|        /call SwapItem "item name" slotname|slotID 
|    Examples: 
|    
|    To swap Darkblade of the Warlord to your main hand: 
|        /call SwapItem "Darkblade of the Warlord" mainhand 
| 
|    To swap stat food in one bag with other food in another bag: 
|        /call SwapItem "Bristlebanes Party Platter" ${FindItem[halas 10lb meat pie].InvSlot} 
| 
|=================================================  ==================================================  =================== 
|  Cast: the main subroutine that casts spells or items for you 
|     Usage: 
|        /call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name] 
|     Examples: 
| 
|     To cast Howl of Tashan and mem it in slot 3 if not memmed: 
|       /call Cast "Howl of Tashan" gem3 
| 
|     To cast Arcane Rune and keep trying for 7 seconds, in case of interrupts. 
|       /call Cast "Arcane Rune" gem5 7s 
| 
|     To click Grim Aura earring that's in a bag: 
|       /call Cast "Shrunken Goblin Skull Earring" item 
| 
|     To use AA ability Eldritch Rune: 
|       /call Cast "Eldritch Rune" alt 
|         or 
|       /call Cast "173" alt 
| 
|     To call a subroutine that interrupts CH if target gets healed before it lands: 
|       /call Cast "Complete Healing" gem1 0 CheckHP 
|     Then in your macro have somewhere: 
|       Sub CheckHP 
|          /if ( ${Target.PctHPs}>=80 ) /call Interrupt 
|       /return 
| 
| Returns these values: 
|----------------------+----------------------------------------------------------------------+ 
| CAST_CANCELLED       | Spell was cancelled by ducking (either manually or because mob died) | 
| CAST_CANNOTSEE       | You can't see your target                                            | 
| CAST_IMMUNE          | Target is immune to this spell                                       | 
| CAST_INTERRUPTED     | Casting was interrupted and exceeded the given time limit            | 
| CAST_INVIS           | You were invis, and noInvis is set to true                           | 
| CAST_NOTARGET        | You don't have a target selected for this spell                      | 
| CAST_NOTMEMMED       | Spell is not memmed and you gem to mem was not specified             | 
| CAST_NOTREADY        | AA ability or spell is not ready yet                                 | 
| CAST_OUTOFMANA       | You don't have enough mana for this spell!                           | 
| CAST_OUTOFRANGE      | Target is out of range                                               | 
| CAST_RESISTED        | Your spell was resisted!                                             | 
| CAST_SUCCESS         | Your spell was cast successfully! (yay)                              | 
| CAST_UNKNOWNSPELL    | Spell/Item/Ability was not found                                     | 
|----------------------+----------------------------------------------------------------------+ 

#event BeginCast "You begin casting#*#" 
#event Collapse "Your gate is too unstable, and collapses.#*#" 
#event FDFail "#1# has fallen to the ground.#*#" 
#event Fizzle "Your spell fizzles#*#" 
#event Immune "Your target is immune to changes in its attack speed#*#" 
#event Immune "Your target is immune to changes in its run speed#*#" 
#event Immune "Your target cannot be mesmerized#*#" 
#event Interrupt "Your casting has been interrupted#*#" 
#event Interrupt "Your spell is interrupted#*#" 
#event NoHold "Your spell did not take hold#*#" 
#event NoLOS "You cannot see your target.#*#" 
#event NoTarget "You must first select a target for this spell!#*#" 
#event NotReady "Spell recast time not yet met.#*#" 
#event OutOfMana "Insufficient Mana to cast this spell!#*#" 
#event OutOfRange "Your target is out of range, get closer!#*#" 
#event Recover "You haven't recovered yet...#*#" 
#event Recover "Spell recovery time not yet met#*#" 
#event Resisted "Your target resisted the #1# spell#*#" 
#event Resisted2 "You resist the #1# spell#*#" 
#event Standing "You must be standing to cast a spell#*#" 
#event Stunned "You are stunned#*#" 
#event Stunned "You can't cast spells while stunned!#*#" 
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#" 


Sub Cast(string spellName,string spellType,timer giveUpTimer,string mySub) 
   /declare castTime float local 
   /if ( ${spellType.Equal[item]} ) { 
      /varset castTime ${FindItem[${spellName}].CastTime} 
   } else /if ( ${spellType.Equal[alt]} ) { 
      /varset castTime ${AltAbility[${spellName}].Spell.MyCastTime} 
   } else { 
      /varset castTime ${Spell[${spellName}].MyCastTime} 
   } 
   /if ( ${Me.Invis} && ${noInvis} ) { 
      /return 
   } 
   :wait_for_stop 
   /if ( !${Defined[spellType]} ) /declare spellType string local spell 
   /if ( ${Me.Casting.ID} ) { 
      /if ( ${Defined[mySub]} ) /call ${mySub} 
      /goto :wait_for_stop 
   }  
   /if ( ${Me.Speed} ) { 
   :wait_for_stop2 
      /if ( ${Defined[mySub]} ) /call ${mySub} 
      /if ( ${Me.Moving} && ${castTime}>0.1 ) /goto :wait_for_stop2 
   } 
   /if ( !${Defined[giveUpTimer]} ) /declare giveUpTimer timer local 0 
   /if ( !${Defined[spellRecastTime1]} ) { 
      /if ( !${Defined[noInterrupt]} ) /declare noInterrupt int outer 0 
      /declare moveBack bool outer false 
      /declare selfResist int outer 
      /declare selfResistSpell string outer 
      /declare castEndTime timer outer 
      /declare refreshTime timer outer 0 
      /declare itemRefreshTime float outer 0 
      /declare startCastingLoc string outer 
      /declare i int local 
      /declare castReturn string outer 
      /declare spellNotHold string outer 
      /delay 5 
      /for i 1 to 9 
         /declare spellRecastTime${i} timer outer 
         /if ( ${Me.SpellReady[${i}]} ) { 
            /varset spellRecastTime${i} 0 
         } else { 
            /varcalc spellRecastTime${i} 10*${Me.Gem[${i}].RecastTime} 
         } 
      /next i 
   } 
   /varset spellNotHold 0 
   /varset selfResist 0 
   /declare delayTime timer local 
   /declare swapItemBack bool local false 
   /declare slotName int local 
   /declare oldItemName string local 
   /declare slotID int local 
   /declare oldSlotID int local 
   /declare spellID int local 
   /declare charges int local 

   /if ( ${Window[SpellBookWnd].Open} ) /keypress spellbook 
   /if ( ${Me.Ducking} ) /keypress duck 
   /if ( !${Me.Standing} ) /stand 

   /doevents Recover 
   /doevents BeginCast 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Standing 
   /doevents FDFail 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted2 
   /doevents Resisted 
   /doevents Immune 
   /doevents Stunned 
   /doevents Collapse 
   /doevents NoTarget 
   /doevents NotReady 
   /varset castReturn CAST_SUCCESS 
    
      /if ( ${spellType.Equal[item]} ) /goto :cast_item 
   /if ( ${spellType.Equal[alt]} ) /goto :cast_alt 

:cast_spell 
   /if ( !${Int[${Me.Book[${spellName}]}]} ) { 
      /echo Spell: "${spellName}" was not found in your book 
      /return CAST_UNKNOWNSPELL 
   } 
   /if ( !${Me.Gem[${spellName}]} ) { 
   :mem_spell 
      /if ( ${Cursor.ID} ) { 
         /autoinventory 
         /delay 5 
         /goto :mem_spell  
      } 
      /if ( ${spellType.Left[3].Equal[gem]} ) { 
         /memspell ${spellType.Right[1]} "${spellName}" 
      } else { 
         /return CAST_NOTMEMMED 
      } 
      /delay 6s ${Me.Gem[${spellName}]} 
      /if ( !${Me.Gem[${spellName}]} ) { 
         /echo Spell mem interrupted... 
         /return CAST_INTERRUPTED 
      } 
      :wait_for_mem 
      
      /delay 15s ${Me.SpellReady[${spellName}]} 
      /if ( !${Me.SpellReady[${spellName}]} ) { 
         /if ( ${giveUpTimer} ) /goto :wait_for_mem 
         /return CAST_NOTREADY 
      } 
   } 
   /varset spellType spell 
   /if ( ${spellName.Find[illusion: ]} && ${Me.AltAbilityReady[project illusion]} ) /call Cast "project illusion" alt 

   /varset giveUpTimer ${giveUpTimer.OriginalValue} 
   /declare recoverWaitTime timer local 30 

:cast_spell_loop 
:wait_for_spell 
   /if ( ${Me.SpellReady[${spellName}]} ) { 
      /varset spellRecastTime${Me.Gem[${spellName}]} 0 
      /goto :skip_delay  
   } 
   /if ( ${spellRecastTime${Me.Gem[${spellName}]}}  ) { 
      /if ( !${giveUpTimer} ) /return CAST_NOTREADY 
      /if ( ${Defined[mySub]} ) /call ${mySub} 
      /goto :wait_for_spell 
   } 
   /if ( !${refreshTime} ) /goto :skip_delay 
:wait_on_refresh 
   /if ( ${Me.SpellReady[${spellName}]} ) /varset refreshTime 0 
   /if ( ${refreshTime}>0 ) { 
      /if ( ${Defined[mySub]} ) /call ${mySub} 
      /goto :wait_on_refresh 
   } 
   /varcalc delayTime 10*(1.5-${Spell[${spellName}].MyCastTime}) 
:cast_delay_loop 
   /if ( ${delayTime}>0 ) { 
      /if ( ${Defined[mySub]} ) /call ${mySub} 
      /goto :cast_delay_loop 
   } 
:skip_delay 
   /varset startCastingLoc ${Me.X} ${Me.Y} ${Me.Z} 
   /cast "${spellName}" 

   /if ( ${Me.Casting.ID} ) { 
      /varset spellID ${Me.Casting.ID} 
      /varcalc castEndTime ${Me.Casting.MyCastTime}*10 
      /if ( ${castEndTime}<${Math.Calc[${Me.Casting.CastTime}*5]} ) /varcalc castEndTime ${Me.Casting.CastTime}*5 
      /echo Casting: ${Me.Casting.Name}${If[!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]} 
   } 

   /varset moveBack false 

   /call WaitCast ${mySub} 

   /if ( ${moveBack} ) { 
      /keypress back hold 
      /delay 4 
      /keypress back 
      /delay 15 !${Me.Moving} 
   } 

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) { 
      /echo Spell was cancelled... 
      /return CAST_CANCELLED 
   } 

   /doevents Recover 
   /doevents BeginCast 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Standing 
   /doevents FDFail 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted2 
   /doevents Resisted 
   /doevents Immune 
   /doevents Stunned 
   /doevents Collapse 
   /doevents NoTarget 
   /doevents NotReady 
    
   /if ( !${spellID} ) /varset spellID ${Spell[${spellName}].ID} 
   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) { 
      /if ( ${castReturn.Equal[CAST_NOTREADY]} ) /return CAST_NOTREADY 
      /if ( ${castReturn.Equal[CAST_FIZZLE]} ) { 
         /echo Spell Fizzled. Recasting... 
         /goto :cast_spell_loop 
      } 
      /if ( ${castReturn.Equal[CAST_RECOVER]} ) { 
         /if ( !${recoverWaitTime} ) { 
            /varcalc spellRecastTime${Me.Gem[${spellName}]} 10*${Spell[${spellID}].RecastTime} 
            /if ( !${giveUpTimer} ) /return CAST_NOTREADY 
         } 
         /goto :cast_spell_loop 
      } 
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_spell_loop 
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) { 
         /if ( ${Me.Stunned} ) { 
            /delay 3s !${Me.Stunned} 
         } else { 
            /delay 7 
         } 
         /goto :cast_spell_loop 
      } 
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) { 
         /if ( ${giveUpTimer} ) { 
            /echo Spell was interrupted. Recasting... 
            /goto :cast_spell_loop 
         } 
         /echo Spell was interrupted... 
         /return CAST_INTERRUPTED 
      } 
   } 
   /if ( !${castReturn.Equal[CAST_CANNOTSEE]} && !${castReturn.Equal[CAST_OUTOFRANGE]} && !${castReturn.Equal[CAST_OUTOFMANA]} && !${castReturn.Equal[CAST_NOTARGET]} ) { 
      /varcalc refreshTime 10*${Spell[${spellID}].RecoveryTime} 
      /varcalc spellRecastTime${Me.Gem[${spellName}]} 10*${Spell[${spellID}].RecastTime} 
   } 
   /if ( ${castReturn.Equal[CAST_COLLAPSE]} ) { 
      /varset giveUpTimer 200 
      /goto :cast_spell_loop 
   } 
/return ${castReturn} 


:cast_item 
   /if ( !${FindItem[${spellName}].InvSlot} ) { 
      /echo Cannot find item: ${spellName} 
      /return CAST_UNKNOWNSPELL 
   }  
   /if ( ${FindItem[${spellName}].InvSlot}>21 ) { 
      /varset swapItemBack true 
      /if ( ${FindItem[${spellName}].WornSlot[1]} && ${FindItem[${spellName}].EffectType.Find[worn]} ) { 
         /varset slotName ${FindItem[${spellName}].WornSlot[1]} 
      } else /if ( ${FindItem[${spellName}].InvSlot}>29 ) { 
         /varset slotName 29 
      } else { 
         /varset slotName ${FindItem[${spellName}].InvSlot} 
      } 
      /varset slotID ${InvSlot[${slotName}].ID}      
      /varset oldSlotID ${FindItem[${spellName}].InvSlot.ID} 
      /varset oldItemName ${InvSlot[${slotID}].Item.Name} 
      /call SwapItem "${spellName}" ${slotID} 
   } 
:cast_item_loop 
:wait_item_loop 
   /if ( ${itemRefreshTime} > ${MacroQuest.Running} ) { 
      /delay 1 
      /goto :wait_item_loop 
   } 
   /varset itemRefreshTime ${Math.Calc[${MacroQuest.Running}+000]} 
   /varset charges ${FindItem[${spellName}].Charges} 
   /varset startCastingLoc ${Me.X} ${Me.Y} ${Me.Z} 
   /cast item "${spellName}" 
   /if ( ${Me.Casting.ID} ) { 
      /varcalc castEndTime ${FindItem[${spellName}].CastTime}*10 
      /echo Casting: ${FindItem[${spellName}].Spell.Name}${If[!${FindItem[${spellName}].Spell.TargetType.Equal[PB AE]} && !${FindItem[${spellName}].Spell.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]} 
   } 
   /if ( ${charges}>0 ) /delay 1s ${FindItem[${spellName}].Charges}!=${charges} 

   /call WaitCast ${mySub} 
    
   /if ( ${swapItemBack} ) { 
      /if ( ${FindItem[${spellName}].ID} ) { 
         /call SwapItem "${spellName}" ${oldSlotID} 
      } else /if ( ${FindItem[${oldItemName}].ID} ) { 
         /call SwapItem "${oldItemName}" ${slotID}          
      } 
      /if ( ${Cursor.Container} ) /autoinventory 
   } 

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) { 
      /echo Spell was cancelled... 
      /return CAST_CANCELLED 
   } 

   /doevents BeginCast 
   /doevents Interrupt 
   /doevents Standing 
   /doevents FDFail 
   /doevents OutOfRange 
   /doevents NoLOS 
   /doevents Resisted2 
   /doevents Resisted 
   /doevents Immune 
   /doevents Stunned 
   /doevents Collapse 
   /doevents NoTarget 
   /doevents NotReady 

   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) { 
      /if ( ${castReturn.Equal[CAST_NOTREADY]} ) /return CAST_NOTREADY 
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_item 
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) { 
         /if ( ${Me.Stunned} ) { 
            /delay 3s !${Me.Stunned} 
         } else { 
            /delay 7 
         } 
         /goto :cast_item 
      } 
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) { 
         /if ( ${giveUpTimer} ) { 
            /echo Spell was interrupted. Recasting... 
            /goto :cast_item 
         } 
         /echo Spell was interrupted... 
         /return CAST_INTERRUPTED 
      } 
   } 
   /if ( ${castReturn.Equal[CAST_COLLAPSE]} ) { 
      /varset giveUpTimer 200 
      /goto :cast_item 
   } 
/return ${castReturn} 


:cast_alt 
   /if ( !${Me.AltAbilityReady[${spellName}]} ) /return CAST_NOTREADY 
   /echo Using AA Ability: ${AltAbility[${spellName}].Name} 
   /alt activate ${AltAbility[${spellName}].ID} 
   /if ( ${AltAbility[${spellName}].Spell.MyCastTime}>=0.5 ) /delay 1s ${Me.Casting.ID} 
   /call WaitCast ${mySub} 
    
   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) { 
      /echo Spell was cancelled... 
      /return CAST_CANCELLED 
   } 
    
   /doevents BeginCast 
   /doevents Interrupt 
   /doevents Standing 
   /doevents FDFail 
   /doevents OutOfRange 
   /doevents NoLOS 
   /doevents Resisted2 
   /doevents Resisted 
   /doevents Immune 
   /doevents Stunned 
   /doevents NoTarget 
      
   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) { 
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_alt 
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) { 
         /if ( ${Me.Stunned} ) { 
            /delay 3s !${Me.Stunned} 
         } else { 
            /delay 7 
         } 
         /goto :cast_alt 
      } 
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) { 
         /if ( ${giveUpTimer} ) { 
            /echo Spell was interrupted. Recasting... 
            /goto :cast_alt 
         } 
         /echo Spell was interrupted... 
         /return CAST_INTERRUPTED 
      } 
   } 
/return ${castReturn} 


Sub EquipItem(string WhatWhere) 
   /declare DestName string local 
   /declare ItemName string local ${String[${WhatWhere}].Arg[1,|]} 
   /declare SlotName string local ${String[${WhatWhere}].Arg[2,|]} 
   /if (${SlotName.Equal[NULL]}) /varset SlotName ${InvSlot[${FindItem[=${ItemName}].WornSlot[1]}].Name} 
   /if (${FindItem[=${ItemName}].InvSlot}<22 || !${FindItem[=${ItemName}].WornSlot[${SlotName}]}) /return 
   /if (!${InvSlot[${SlotName}].Item.Name.Equal[NULL]}) /varset DestName "${InvSlot[${SlotName}].Item.Name}|${SlotName}" 
   /call SwapItem "${ItemName}" "${SlotName}" 
/return ${DestName} 

| Sub EquipItem(string itemName,string slotName) 
   /if ( !${Defined[slotName]} ) /declare slotName string local ${FindItem[${itemName}].WornSlot[1]} 
   /declare oldItem string local ${Me.Inventory[${slotName}].Name} 
   /call SwapItem "${itemName}" ${slotName} 
/return "${oldItem}" ${slotName} 

Sub SwapItem(string itemName,string slotName) 
   /if ( ${InvSlot[${slotName}].Item.Name.Equal[${itemName}]} ) /return 
   /declare slotID int local 
   /declare oldSlotID int local 
   /declare oldItem string local 
   /declare i int local 
   /varset slotID ${InvSlot[${slotName}].ID}           | slotID = slot you're swapping item to 
   /varset oldSlotID ${FindItem[${itemName}].InvSlot.ID} | oldSlotID = slot the item was originally in 
   /varset oldItem ${InvSlot[${slotName}].Item.Name}     | oldItem = name of item in the slot you're swapping WITH 
   /if ( !${slotID} ) { 
      /echo Invalid slot name: ${slotName} 
      /return 
   } 
   /if ( !${oldSlotID} ) { 
      /echo Could not find item ${itemName} 
      /return 
   } 
:auto_inv 
   /if ( ${Cursor.ID} && !${Cursor.Name.Equal[${itemName}]} ) { 
      /if ( ${Cursor.Container} ) { 
         /for i 1 to 8 
            /if ( !${InvSlot[pack${i}].Item.Container} ) { 
               /nomodkey /itemnotify pack${i} leftmouseup 
            } 
         /next i 
      } else { 
         /autoinventory 
      } 
      /goto :auto_inv 
   } 
    

:pick_up_item 
 | if the item is in a bag and it's not open, then open it! 
   /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup 

 | if the slot you're putting it in is inside a bag and it's not open, then open it! 
   /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup 

 | ok.. pick up the item now! 
   /squelch /nomodkey /shiftkey /itemnotify ${InvSlot[${oldSlotID}]} leftmouseup 

 | if item isn't on your cursor, try again! 
   /if ( !${Cursor.Name.Equal[${itemName}]} ) { 
      /if ( ${Cursor.ID} && !${Cursor.Container} ) /autoinventory 
      /goto :pick_up_item 
   } 
:exchange_items 
   /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup 
   /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup 

 | put the item in the new slot, and pick up whatever item was there 
   /squelch /nomodkey /shiftkey /itemnotify ${slotID} leftmouseup 

 | if it didnt get exchanged, try again! 
   /if ( ${Cursor.ID} && !${Cursor.Name.Equal[${oldItem}]} && !${Cursor.Name.Equal[${itemName}]} && !${Cursor.Container} ) /autoinventory 
   /if ( !${InvSlot[${slotID}].Item.Name.Equal[${itemName}]} ) /goto :exchange_items 
:drop_item 
   /if ( !${Cursor.Container} || ( ${InvSlot[${oldSlotID}]}<30 && ${InvSlot[${oldSlotID}]}>=22 ) ) { 
      /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup 
      /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup 
      /squelch /nomodkey /itemnotify ${oldSlotID} leftmouseup 
      /if ( ${Cursor.ID} ) { 
         /if ( !${Cursor.Name.Equal[${oldItem}]} ) /autoinventory 
         /goto :drop_item 
      } 
   } 
:close_pack 
   /if ( ${InvSlot[${oldSlotID}].Pack} && ${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} && ( ${Cursor.Name.Equal[${itemName}]} || ${FindItem[${itemName}].ID} ) ) { 
      /squelch /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup 
      /goto :close_pack 
   } 
   /if ( ${InvSlot[${slotID}].Pack} && ${Window[${InvSlot[${slotID}].Pack.Name}].Open} && ( ${Cursor.Name.Equal[${itemName}]} || ${FindItem[${itemName}].ID} ) ) { 
      /squelch /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup 
      /goto :close_pack 
   } 
/return 

Sub Interrupt 
   /if ( ${Me.Mount.ID} ) /dismount 
   /stopcast 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_CANCELLED 
/return ${Macro.Return} 


Sub WaitCast(string mySub) 
   /declare currentTarget int local ${Target.ID} 
   /declare currentTargetType string local ${Target.Type} 
:wait_cast_loop 
   /if ( ${Bool[${mySub}]} ) /call ${mySub} 
   /if ( ${Me.Casting.ID} ) { 
      /if ( ${currentTarget} && !${Spawn[${currentTarget}].Type.Equal[${currentTargetType}]} ) { 
         /if ( !${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && !${moveBack} && ( !${Me.Mount.ID} || !${noInterrupt} ) ) { 
            /if ( !${Me.Mount.ID} || ${castEndTime}>70 ) { 
               /call Interrupt 
            } else /if ( ${Me.Casting.RecastTime}>3 ) { 
               /varset castReturn CAST_CANCELLED 
               /keypress forward hold 
               /delay 6 
               /keypress forward 
               /varset moveBack true 
            } 
         } 
      } 
      /if ( ${Me.State.Equal[DUCK]} ) /varset castReturn CAST_CANCELLED 
      /delay 1 
      /goto :wait_cast_loop 
   } 
/return 

Sub Event_Fizzle 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_FIZZLE 
/return 

Sub Event_Resisted(string line,string name) 
   /if ( ${selfResist} && ${name.Equal[${selfResistSpell}]} ) { 
      /varset selfResist 0 
      /return    
   } 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESISTED 
/return 

Sub Event_Resisted2(string line,string name) 
   /if ( ${Defined[selfResist]} ) { 
      /varset selfResist 1 
      /varset selfResistSpell ${name} 
   } 
/return 

Sub Event_Interrupt 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_INTERRUPTED 
/return 

Sub Event_Recover 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RECOVER 
/return 

Sub Event_Immune 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_IMMUNE 
/return 

Sub Event_Stunned 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_STUNNED 
/return 

Sub Event_NoLOS 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_CANNOTSEE 
/return 

Sub Event_Standing 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESTART 
/return 

Sub Event_Collapse 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_COLLAPSE 
/return 

Sub Event_OutOfMana 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_OUTOFMANA 
/return 

Sub Event_OutOfRange 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_OUTOFRANGE 
/return 

Sub Event_NoTarget 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_NOTARGET 
/return 

Sub Event_NotReady 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_NOTREADY 
/return 

Sub Event_NoHold 
   /if ( ${Defined[spellNotHold]} ) /varset spellNotHold 1 
/return 

Sub Event_BeginCast 
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_SUCCESS 
/return 

Sub Event_FDFail(string line,string name) 
   /if ( ${name.Equal[${Me.Name}]} && ${Defined[castReturn]} ) { 
      /if ( !${Me.Standing} ) /stand 
      /varset castReturn CAST_RESTART 
   } 
/return

see this Thread for more information: http://www.redguides.com/community/showthread.php?t=412
 
Re: Redguides Listing of Confirmed Macros

Cleric spell trainer by Koneman

modified to work for clerics
works fine fro alteration have yet to run for a long time to do rest

modified from post of MQ2 forum

Rich (BB code):
| clericcast.mac
| 
| Just update what spells you want to practice with and The max skill as followed:
| /call RaiseSkill "Evocation" *Max Skill* "*Spell*"
|
| Be sure to get the newest spellcast.inc from the macroquest forums.
|

#include spellcast.inc 
#event NoComponents "#*#You are missing some required components.#*#" 

Sub Main
/call RaiseSkill "Alteration" 160 "Minor Healing"
/call RaiseSkill "Abjuration" 160 "courage" 
/call RaiseSkill "Conjuration" 160 "summon drink" 
/call RaiseSkill "Evocation" 160 "smite" 
/call RaiseSkill "Divination" 160 "flash of light" 
/call RaiseSkill "Channeling" 160 "Minor Healing" 
/call RaiseSkill "Meditate" 160 "Protection of Steel" 
/call RaiseSkill "Specialize alteration" 160 "minor Healing" 
/endmacro 
/return 

Sub RaiseSkill(SkillName,LevelName,SpellName) 
/echo - Raising ${SkillName} to ${LevelName} with ${SpellName} 
/if (!${Me.Standing}) /stand 

:CheckMana 
/if (${Me.PctMana}<20) /goto :SitDown 

:CheckCursor 
/if (${Cursor.ID}) { 
/autoinv 
/goto :CheckCursor 
}


in order to change spell just change the name and make sure its of that skill

to change what skill it goes to change "160" to whatever you want
(tested this works great up to 255)

to change order just move them around

can be used on all classes to train skills just modify as needed

used on ranger, pally, mage, bst, cleric, druid, sk, necro so far no prob just change spell to what you want to cast and what skill lvl you want it to stop at
*keep in mind there is a cap for how high you can skill up to on these*
i.e. 130 for lvl 28


See this thread for more information: http://www.redguides.com/community/showthread.php?t=196
 
Re: Redguides Listing of Confirmed Macros

Auto Loot and Sell Macro

Found this on Macroquest Forum works great

Rich (BB code):
||||||||||||||||||||||||||||||||||||||||||||||||||  ||||||||||||||||||||||||||||| 
| 
| Author: anon_coward 
| 
| Initial release: 10/14/04 
| 
||||||||||||||||||||||||||||||||||||||||||||||||||  ||||||||||||||||||||||||||||| 
| 
| Description: 
| This macro helps with looting and selling.  There are 2 main parts, looting 
| and selling.  The looting code is run once you open a corpse.  Once you click 
| the corpse open it automatically empties the corpse and adds the items to the 
| INI file.  Then later when you open a merchant, it will automatically sell 
| items that are in the INI file. 
| 
| Each item has an entry in the INI file with one of 4 numbers which mean: 
| KEEP, DESTROY, LEAVE, or SELL.  Items with the KEEP setting are automatically 
| looted, and skipped during the selling part.  The DESTROY setting picks the 
| item up off the corpse and it is immediately destroyed.  Use with CAUTION. 
| This is great for LDON collect missions.  Setting an item to LEAVE means the 
| next time it won't pick it up so it stays on the corpse.  And finally SELL is 
| the magic setting to have it both autolooted and autosold. 
| 
| There is a special check for ${Me.Name} when looting so if you open your own 
| corpse, the INI is ignored and every item should just be looted.  WARNING: 
| MAKE SURE YOU ALREADY GOT YOUR REZ. 
| 
| Finally, you can turn it on and off by using '/echo SET PAUSED' to toggle. 
| The same command pauses and resumes the macro. 
| 
||||||||||||||||||||||||||||||||||||||||||||||||||  ||||||||||||||||||||||||||||| 
| 
| Here are the command it expects: 
| Print settings about an item or your inventory with: 
| ... /echo SHOW LOOT   - display current setting for the item on cursor 
| ... /echo SHOW SELL   - list all inventory items marked to sell 
| 
| With an item on the cursor, you change settings with 
| ... /echo SET KEEP    - just loot this item into inventory 
| ... /echo SET DESTROY - take off the corpse and /destroy it 
| ... /echo SET LEAVE   - just leave it on the corpse 
| ... /echo SET SELL    - put it in inventory and autosell at the next vendor 
| 
| And finally, to turn it on and off 
| ... /echo SET PAUSED  - toggle it on/off with the same command 
| 
||||||||||||||||||||||||||||||||||||||||||||||||||  ||||||||||||||||||||||||||||| 

#Event Print "[MQ2] PRINT #1#" 
#Event Print "[MQ2] SHOW #1#" 
#Event Set   "[MQ2] SET #1#" 
#Event Help  "[MQ2] HELP #1#" 
#Event Help  "[MQ2] HELP" 

Sub Main 

    /echo Loot helper started 
    /call Init 

    :MainLoop 
    /delay 0 
    /doevents 
    /if (${PAUSED}) /goto :MainLoop 
    /if (${Merchant.Open})        /call SellLoot 
    /if (${Window[LootWnd].Open}) /call LootCorpse 
    /goto :MainLoop 

/endmacro 

Sub Init 

    /if (!${Defined[PAUSED]}) /declare PAUSED bool outer FALSE 

    |A few constants for handling loot 
    /if (!${Defined[LOOT_KEEP]})     /declare LOOT_KEEP     int    outer 1 
    /if (!${Defined[LOOT_DESTROY]})  /declare LOOT_DESTROY  int    outer 2 
    /if (!${Defined[LOOT_LEAVE]})    /declare LOOT_LEAVE    int    outer 3 
    /if (!${Defined[LOOT_SELL]})     /declare LOOT_SELL     int    outer 4 

    |A table for mapping numbers to strings for printing 
    /if (!${Defined[LOOT_SETTINGS]}) /declare LOOT_SETTINGS[4] string outer 
    /varset LOOT_SETTINGS[${LOOT_KEEP}]    KEEP 
    /varset LOOT_SETTINGS[${LOOT_DESTROY}] DESTROY 
    /varset LOOT_SETTINGS[${LOOT_LEAVE}]   LEAVE 
    /varset LOOT_SETTINGS[${LOOT_SELL}]    SELL 

    |Default values for specific types of loot 
    /if (!${Defined[LOOT_DEFAULT]})  /declare LOOT_DEFAULT  int    outer ${LOOT_SELL} 
    /if (!${Defined[LOOT_NO_DROP]})  /declare LOOT_NO_DROP  int    outer ${LOOT_LEAVE} 

    /echo Droppable loot defaults to .. ${LOOT_SETTINGS[${LOOT_DEFAULT}]} 
    /echo No Drop loot defaults to .... ${LOOT_SETTINGS[${LOOT_NO_DROP}]} 

/return 

Sub LootCorpse 

    /delay 1s 
    /declare total int local ${Corpse.Items} 

    /if (!${total}) /goto :DoneLooting 

    /declare WATCHDOG     timer local 
    /declare not_found    int   local -1 
    /declare item_setting int   local 
    /declare slot         int   local 
    /for slot 1 to ${total} 

        /varset WATCHDOG 5s 
        :ClearCursor 
        /delay 0 
        /doevents 
        /if (!${WATCHDOG}) { 
            /echo Item stuck on the cursor. Abort! 
            /goto :DoneLooting 
        } 
        /if (${Cursor.ID}) { 
            /autoinventory 
            /delay 5 
            /goto :ClearCursor 
        } 

        /varset item_setting ${Ini[Loot.ini,Loot,${Corpse.Item[${slot}].Name},${not_found}]} 

        | If the item isn't in the .ini file then add it. 
        /if (${item_setting}==${not_found}) { 
            /varset item_setting ${LOOT_DEFAULT} 
            /if (${Corpse.Item[${slot}].NoDrop}) { 
                /varset item_setting ${LOOT_NO_DROP} 
            } 

            /echo Adding to INI "${Corpse.Item[${slot}].Name}" (${LOOT_SETTINGS[${item_setting}]}) 
            /ini Loot.ini Loot "${Corpse.Item[${slot}].Name}" ${item_setting} 
        } 

        /if (${item_setting}==${LOOT_DESTROY} && !${Corpse.Name.Find[${Me}]}) { 
            /echo -- You destroyed a <<${Corpse.Item[${slot}].Name}>>.-- (${LOOT_SETTINGS[${item_setting}]}) 
            /itemnotify loot${slot} leftmouseup 
            /delay 5 
            /if (${Window[ConfirmationDialogBox].Open}) { 
                /notify ConfirmationDialogBox Yes_Button leftmouseup 
                /delay 5 
            } 
            /if (${Cursor.ID}) { 
                /destroy 
                /delay 5 
            } else { 
                /echo Uh oh, DESTROY item didn't show up on Cursor 
            } 

        } else /if (${item_setting}==${LOOT_KEEP} || ${item_setting}==${LOOT_SELL} || ${Corpse.Name.Find[${Me}]}) { 
            /echo -- You have looted a <<${Corpse.Item[${slot}]}>>.-- (${LOOT_SETTINGS[${item_setting}]}) 
            /itemnotify loot${slot} rightmouseup 
            /delay 5 
            /if (${Window[ConfirmationDialogBox].Open}) { 
                /notify ConfirmationDialogBox Yes_Button leftmouseup 
                /delay 5 
            } 

        } else /if (${item_setting}==${LOOT_LEAVE}) { 
            /echo -- You left a <<${Corpse.Item[${slot}]}>>.-- (${LOOT_SETTINGS[${item_setting}]}) 

        } else { 
            /echo Umm, something is wrong in the loot code 
            /echo I don't know what to do with ${Corpse.Item[${slot}]} 
            /echo I guess I'll just leave it there >< 
        } 
    /next slot 

    :DoneLooting 
    /notify LootWnd DoneButton leftmouseup 
    /delay 5 

/return 

Sub SellLoot(bool JUST_PRINT) 

    /if (!${Defined[JUST_PRINT]}) /declare JUST_PRINT bool local FALSE 
    /if (${Merchant.Open} && !${JUST_PRINT}) { 
        /declare i int local 
        /for i 10 downto 1 
            /popup AUTO SELLING in ${i} sec 
            /delay 1s 
            /if (!${Merchant.Open}) /return 
        /next i 
    } 

    /declare plat   int local ${Me.Platinum} 
    /declare gold   int local ${Me.Gold} 
    /declare silver int local ${Me.Silver} 
    /declare copper int local ${Me.Copper} 

    /declare not_found    int local -1 
    /declare item_setting int local 
    /declare slot         int local 
    /declare spot         int local 
    /for slot 1 to 8 
        /if (${InvSlot[pack${slot}].Item.Container}) { 
            /for spot 1 to ${InvSlot[pack${slot}].Item.Container} 
                /if (!${InvSlot[pack${slot}].Item.Item[${spot}].ID}) /goto :NextSpot 
                /varset item_setting ${Ini[loot.ini,Loot,${InvSlot[pack${slot}].Item.Item[${spot}]},${not_found}]} 

                /if (${item_setting}==${not_found}) { 
                    /echo Dunno what to do with ${InvSlot[pack${slot}].Item.Item[${spot}]} pack${slot} slot${spot} 

                } else /if (${item_setting}==${LOOT_KEEP}) { 
                    /goto :NextSpot 

                } else /if (${item_setting}==${LOOT_DESTROY}) { 
                    /echo Should have DESTROYED ${InvSlot[pack${slot}].Item.Item[${spot}]} pack${slot} slot${spot} 

                } else /if (${item_setting}==${LOOT_LEAVE}) { 
                    /echo Should have LEFT ${InvSlot[pack${slot}].Item.Item[${spot}]} pack${slot} slot${spot} 

                } else /if (${item_setting}==${LOOT_SELL}) { 
                    /echo Selling ${InvSlot[pack${slot}].Item.Item[${spot}]} 
                    /if (${JUST_PRINT}) /goto :NextSpot 

                    /if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory 
                    /delay 5 
                    /if (!${Window[pack${slot}].Open}) /nomodkey /itemnotify pack${slot} rightmouseup 
                    /delay 5 
                    /nomodkey /itemnotify ${InvSlot[pack${slot}].Item.Item[${spot}].InvSlot} leftmouseup 
                    /delay 5 
                    /nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup 
                    /delay 5 

                } else { 
                    /echo Bogus item setting: ${InvSlot[pack${slot}].Item.Item[${spot}]} => ${item_setting} 
                } 
            :NextSpot 
            /next spot 

            /if (${Window[pack${slot}].Open}) /nomodkey /itemnotify pack${slot} rightmouseup 
            /delay 1s 

        } else { 
            /if (!${InvSlot[pack${slot}].Item.ID}) /goto :NextSlot 
            /varset item_setting ${Ini[wizard.ini,Loot,${InvSlot[pack${slot}].Item},${not_found}]} slot${slot} 

            /if (${item_setting}==${not_found}) { 
                /echo Dunno what to do with ${InvSlot[pack${slot}].Item} slot${slot} 

            } else /if (${item_setting}==${LOOT_KEEP}) { 
                /goto :NextSlot 

            } else /if (${item_setting}==${LOOT_DESTROY}) { 
                /echo Should have DESTROYED ${InvSlot[pack${slot}].Item} slot${slot} 

            } else /if (${item_setting}==${LOOT_LEAVE}) { 
                /echo Should have LEFT ${InvSlot[pack${slot}].Item} slot${slot} 

            } else /if (${item_setting}==${LOOT_SELL}) { 
                /echo Selling ${InvSlot[pack${slot}].Item} 
                /if (${JUST_PRINT}) /goto :NextSlot 

                /if (!${Window[InventoryWindow].Open}) /nomodkey /keypress inventory 
                /delay 5 
                /nomodkey /itemnotify pack${slot} leftmouseup 
                /delay 5 
                /nomodkey /shift /notify MerchantWnd MW_Sell_Button leftmouseup 
                /delay 5 

             } else { 
                /echo Bogus item setting: ${InvSlot[pack${slot}].Item} => ${item_setting} 
             } 
        } 
    :NextSlot 
    /next slot 

    /varcalc plat   ${Me.Platinum}-${plat} 
    /varcalc gold   ${Me.Gold}-${gold} 
    /varcalc silver ${Me.Silver}-${silver} 
    /varcalc copper ${Me.Copper}-${copper} 

    /if (${plat} || ${gold} || ${silver} || ${copper}) { 
        /echo Made ${plat}pp ${gold}gp ${silver}sp ${copper}cp 
    } 

    /nomodkey /notify MerchantWnd DoneButton leftmouseup 
    /delay 5 
    /if (${Window[InventoryWindow].Open}) /nomodkey /keypress inventory 
    /delay 5 

/return 

Sub SetLootPreference(int pref) 

    /if (!${Cursor.ID}) { 
        /echo Pick up something on your cursor before typing this command 
        /return 
    } 

    /if (!${Defined[pref]}) { 
        /declare not_found    int local -1 
        /declare item_setting int local ${Ini[Loot.ini,Loot,"${Cursor}",${not_found}]} 
        /if (${item_setting}==${not_found}) { 
            /echo No entry for ${Cursor} 
        } else /if (${item_setting}==${LOOT_KEEP}) { 
            /echo Pick up <<${Cursor}>> 
        } else /if (${item_setting}==${LOOT_DESTROY}) { 
            /echo Pick up & DESTROY <<${Cursor}>> 
        } else /if (${item_setting}==${LOOT_LEAVE}) { 
            /echo Leave <<${Cursor}>> on corpse 
        } else /if (${item_setting}==${LOOT_SELL}) { 
            /echo Pick up <<${Cursor}>> (to sell) 
        } else { 
            /echo Unknown TYPE for Loot <<${Cursor}>> 
        } 
        /return 
    } 

    /if (${pref} < 1 || ${pref} > 4) { 
        /echo Prefence ID ${pref} out of range.  ERROR processing command 
        /return 
    } 

    /echo Setting preferenc "${Cursor.Name}" => ${LOOT_SETTINGS[${pref}]} 
    /ini Loot.ini Loot "${Cursor.Name}" ${pref} 
    /if (${pref}==${LOOT_DESTROY}) /destroy 

/return 

Sub Event_Print(string EventTxt,string CmdName) 

    /if (${CmdName.Find[LOOT]}) { 
        /call SetLootPreference 

    } else /if (${CmdName.Find[SELL]}) { 
        /call SellLoot TRUE 

    } else { 
        /echo Unknown command: ${CmdName} 
        /echo for more info type /echo HELP 
    } 

/return 

Sub Event_Set(string EventTxt,string CmdName) 

    /if (${CmdName.Find[SAVE]} || ${CmdName.Find[KEEP]}) { 
        /call SetLootPreference ${LOOT_KEEP} 

    } else /if (${CmdName.Find[DESTROY]}) { 
        /call SetLootPreference ${LOOT_DESTROY} 

    } else /if (${CmdName.Find[LEAVE]}) { 
        /call SetLootPreference ${LOOT_LEAVE} 

    } else /if (${CmdName.Find[SELL]}) { 
        /call SetLootPreference ${LOOT_SELL} 

    } else /if (${CmdName.Find[PAUSE]}) { 
        /if (${PAUSED}) { 
            /varset PAUSED FALSE 
            /echo ${Macro.Name} is active again 
        } else { 
            /varset PAUSED TRUE 
            /echo ${Macro.Name} is being paused 
            /echo type '/echo SET PAUSED' to resume 
        } 

    } else { 
        /echo Unknown command: ${CmdName} 
        /echo for more info type /echo HELP 
    } 

/return 

Sub Event_Help(string EventTxt,string CmdName) 

    /if (!${Defined[CmdName]}) { 
        /echo Help options are 
        /echo ... /echo HELP LOOT 

    } else /if (${CmdName.Find[LOOT]}) { 
        /echo Loot choices are 
        /echo ... /echo SHOW LOOT   - display current setting for the item on cursor 
        /echo ... /echo SHOW SELL   - list all inventory items marked to sell 
        /echo 
        /echo With an item on the cursor, you change settings with 
        /echo ... /echo SET KEEP    - just loot this item into inventory 
        /echo ... /echo SET DESTROY - take off the corpse and /destroy it 
        /echo ... /echo SET LEAVE   - just leave it on the corpse 
        /echo ... /echo SET SELL    - put it in inventory and autosell at the next vendor 
        /echo 
        /echo And finally, to turn it on and off 
        /echo ... /echo SET PAUSED  - toggle it on/off with the same command 
        /echo 
        /echo Droppable loot defaults to .. ${LOOT_SETTINGS[${LOOT_DEFAULT}]} 
        /echo No Drop loot defaults to .... ${LOOT_SETTINGS[${LOOT_NO_DROP}]} 

    } else { 
        /echo Sorry, no help for ${CmdName}. 
    } 

/return
 
Re: Redguides Listing of Confirmed Macros

Druid healer macro by geostone

well this is the macro i use for my druid healer when in groups. it does on thing perfectly and that is keep the group alive. some of the buffs it keeps up some it doesnt but the whole purpose i use it is to heal so here ya's go--

Rich (BB code):
#event MeHit "#*#hits YOU for#*#" 
#event OutOfMana "Insufficient Mana to cast this spell!" 
#event OutOfRange "Your target is out of range, get closer!" 
#event Fizzle "#*#Your spell fizzles!#*#" 
#event SkinBuffs "#*#Your skin returns to normal#*#" 
#event FoE "#*#The avian spirit departs#*#"    
#event Fizzle "#*#Your spell fizzles#*#" 
#event Death "#*#You have entered#*#" 
#event bracken "#*#The bracken falls away#*#" 
#event might "#*#Your natural might fades#*#" 
#event inc "#*#incoming#*#"

#include spell_routines.inc

Sub Main 
/declare Healpct int outer 58
/declare Fastheal string outer Nature's Infusion 
/declare Groupnum int outer 
/declare i int local
/declare Delay int outer 
/declare Casting string outer 

:chkevent 
   /doevents 
   /varset Groupnum ${Group} 
   | *** AutoHeal *** 
:Healcheck 
   /for i 1 to ${Group} 
      /if (${Group[${i}].PctHPs}<=${Healpct}) { 
              /if (${Group[${i}].PctHPs}<1) /goto :nextmember 
              /if (${Group[${i}].Class.Name.Equal["Warrior"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Paladin"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Shadow Knight"]}) /goto :Tankheal 
              /if (${Group[${i}].Class.Name.Equal["Monk"]}) /goto :Tankheal 
         /doevents 
         /goto :CasterHeal 

:Tankheal 
          
             /target pc ${Group[${i}].Name} 
             /g Inc 'Super Duid' Incomplete Heal on %t in 10 seconds stay close or die trying! 
             /varset Casting Karana's Renewal 
             /call cast "Karana's Renewal" gem7 6s
             /doevents 
             /varset Delay ${Math.Calc[${Spell[Karana's Renewal].MyCastTime}*10+10]} 
             /delay ${Delay}  
             /goto :nextmember 
          

:Casterheal 
    
             /target pc ${Group[${i}].Name} 
             /g Incoming 'Super Druid' quickheal on %t! 
             /varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10+25]} 
             /varset Casting ${Fastheal} 
             /call cast "${Fastheal}" gem8 3s
             /doevents 
             /delay ${Delay} 
             /if (${Sit}==1) /sit 
         } 
:nextmember 
      } 
   /next i 
   /goto :chkevent 
/return 

Sub Event_MeHit 
    /if (${Me.PctHPs}<=60 { 
                
                /target myself 
                /stand 
                /g Quickhealing 'Super Druid' %t! 
                /varset Casting Nature's Infusion 
                /cast "Nature's Infusion" 
                /doevents 
                /varset Delay ${Math.Calc[${Spell[Nature's Infusion].MyCastTime}*10+5]} 
                /delay ${Delay} 
              
          
    } else /if (${Me.PctHPs}<=40 AND ${Me.PctHPs}>25) { 
            /target myself 
            /stand 
            /g Fast Heal on %t! 
            /varset Delay ${Math.Calc[${Spell[${Fastheal}].MyCastTime}*10+25]} 
            /varset Casting ${Fastheal} 
            /cast "${Fastheal}" 
            /doevents 
            /delay ${Delay} 
          
    } else { 
        /stand 
    }    
          
        
      
/return 

Sub Event_FoE 
 /keypress back 
   /keypress F1 
   /delay 1s 
   /call cast "Flight of Eagles" gem3 4s
   /delay 6s 
   /keypress esc 
/return 

Sub Event_SkinBuffs 
 /keypress back 
   /keypress F1 
   /delay 1s 
   /call cast "Brackencoat" gem3 4s
   /delay 6s 
   /keypress esc 
/return 

Sub Event_might 
 /keypress back 
  /keypress F1 
  /delay 1s 
  /cast "Nature's Might" 
/return 

Sub Event_bracken 
 /keypress back 
  /keypress F1 
  /delay 1s 
  /cast "Legacy of Bracken" gem4 4s
/return 

Sub Event_fizzle 
/return DAMN_FIZZLE 
/if (${Macro.Return.Equal["DAMN_FIZZLE"]}) /goto :Healcheck 

Sub Event_OutOfRange 
    /g %t your OOR of the Super Druid! 
    /delay 1s 
/return 

sub event_inc
/target ${MainAssist}
/delay 2
/assist
/delay 2
/if (${Target.Type.Equal[NPC]}) /call cast ensnare gemX Ys
/return
 
Re: Redguides Listing of Confirmed Macros

Chanty macro by Rusty

Rich (BB code):
| autoenc.mac 
| By Rusty~ 
| Last update 10/27/2004 
| 
| /macro autoenc [ma name][sa name][radius #][minhp #] 
| 
| Description: 
| Will assist the person set as main assist. If the main assist dies, it will assist the person 
| set as secondary assist if there is one. Once a target is aquired, and is varified as being aggro 
| it will then wait till the mob is engaged by the tank. Then it will wait till mob is under the spcified hp, 
| or the specified time has expired since the tank has engaged, and it will tash, slow, and nuke, if enabled. 
| Will mez any adds within the set radius, and debuff them if it's enabled. 
| This will also keep self buffs up, and buff people on request (with the spells specified in ini). 
| 
| 
| After running the macro for the first time, you should open the ini file generated (Auto_Yourname.ini) 
| Most of the options are self explanatory 
| Here's an example how the ini based buffs work: 
| 
| BuffList1=c6 
| BuffName1=clairvoyance 
| BuffType1=gem4 
| 
| BuffList is a list of words (or phrases) that will trigger the buff, separated by commas 
| BuffName is the name of the spell or item 
| BuffType is either item, gem1-9, or alt, for items, spells, or aa abilities respectively 
| 
| BuffName can also be a "shortcut" name. Shortcut names will cast different buffs depending on certain 
| circumstances. For example, putting "c6" as the BuffName, will cast Voice of Clairvoyance if it's up, 
| or else it will cast Clairvoyance. Following is a list of shortcut buffs and what they do: 
| 
| c6 - Will cast Voice of Clairvoyance if you have no C6 on and are in a group, else will cast Clairvoyance 
| c5 - Voice of Quellious 
| c4 - Will use C4 pants if you have them, else will cast Tranquility 
| c3 - Will use C3 wand if you have it, else will cast Koadic's Endless Intellect 
| c2 - Clairty II 
| c1 - Will cast Rod of Infinite thought if you have, else will cast Clarity 
| haste - If you have group haste memmed (spell name specified in ini), it will cast group haste 
| else it will cast single haste. If you are under 60% mana and have elemental legs 
| it will cast them instead of single or group haste spells 
| shissar - Will cast epic 1.0 
| 
| 
| 
| For each self buff and clicky buff, there's a place to put all the buffs that don't stack with it: 
| 
| Clicky1=Velium Coldain Insignia Ring 
| ClickyNoStack1=Call of Earth,Call of the Rathe,Guard of the Earth,Illusion Fire Elemental 
| 
| *note* To mem spells after death, save a spellset, and put the name of it in your ini under SpellSet 
| 
| 
|----------------------------------------------------------------------------------------------------------+ 
| slash commands: | 
|----------------------------------------------------------------------------------------------------------+ 
| /setma name - sets main assist | 
| /setsa name - sets secondary assist | 
| /buff # - mode 1 buffs all the time, self buff and tells | 
| - mode 2 does self buffs and tells when you have no target | 
| - mode 3 does self buffs only, all the time | 
| - mode 4 does self buffs only, only when you have no target | 
| /debuff on|off - turns auto debuffing on or off | 
| /mez on|off - turns auto mezzing on or off | 
| /mount on|off - turns auto mounting on or off | 
| /nukedelay # - sets the minimum amount of deciseconds between nukes | 
| /engagedelay # - amount of deciseconds before you start nuking mob | 
| /anchor # - sets the leash length when using an anchor | 
| /minhp # - sets the minimum hp % that you'll begin nuking at | 
| /cleanup on|off - turns on auto looting of any droppable loot | 
| /checknamed on|off - turns alerts on for named in your current zone | 
| /runehp # - sets the health % at which you'll cast your rune item or spell| 
| /nukemode 0, 1, 2 - mode 0 turns nukes off completely | 
| - mode 1 uses robe if enabled, and slows nukes if low mana | 
| - mode 2 chain nukes, with only delay being the set /nukedelay | 
| /manarobe mode #|min #|max # - mode 1 uses manrobe all the time | 
| - mode 2 uses your set % to start robing | 
| /radius # - sets the distance at which you'll engage the main assist's | 
| target | 
|----------------------------------------------------------------------------------------------------------+ 

#include spell_routines.inc 
#include gen_routines.inc 
#include move.inc 

#turbo 40 

#chat group 
#chat tell 
#chat chat 
#chat say 

#event AutoStun "[MQ2] AutoStun #1#" 
#event Gate "|${Target.DisplayName}| begins to cast the gate spell#*#" 
#event Mez "[MQ2] mez" 
#event RageOff "#*#is no longer enraged#*#" 
#event RageOn "#*#has become ENRAGED#*#" 
#event Ranger "[MQ2] Ranger" 


Sub Main 
/call GeneralDeclares 

/call DeclareIniVar mainAssist string Settings 
/call DeclareIniVar secondAssist string Settings 
/call DeclareIniVar minRadius int Settings 150 /radius 
/call DeclareIniVar engageDelay int Settings 55 /engagedelay 
/call DeclareIniVar minHP int Settings 95 /minhp 
/call DeclareIniVar autoBuff int Settings 1 /buff 
/call DeclareIniVar useMount int Settings 0 /mount 
/call DeclareIniVar useMez int Settings 1 /mez 
/call DeclareIniVar useDebuff int Settings 1 /debuff 
/call DeclareIniVar nukeMode int Settings 1 /nuke 
/call DeclareIniVar useCharm int Settings 0 /charm 
/call DeclareIniVar useTashFocus int Settings 0 /tash 
/call DeclareIniVar useDPS int Settings 0 /dps 
/call DeclareIniVar hasteGroup int Settings 0 /haste 
/call DeclareIniVar privateChannel string Settings 
/call DeclareIniVar channelAnnounce int Settings 1 
/call DeclareIniVar noInterrupt int Settings 0 
/call DeclareIniVar useManaStone int Settings 0 /manastone 
/call DeclareIniVar checkNamed int Settings 0 /checknamed 
/call DeclareIniVar noInvis int Settings 1 
/call DeclareIniVar useManaRobe int Settings 1 
/call DeclareIniVar manaRobeMode int Settings 1 
/call DeclareIniVar manaRobeMinMana int Settings 70 
/call DeclareIniVar manaRobeMaxMana int Settings 90 
/call DeclareIniVar nukeMana int Settings 50 /nukemana 
/call DeclareIniVar nukeDelay int Settings 0 /nukedelay 
/call DeclareIniVar nukeMode int Settings 1 /nukemode 
/call DeclareIniVar ignoreList string Settings 
/call DeclareIniVar runeHP int Settings 70 
/call DeclareIniVar cleanUp int Settings 0 /cleanup 
/call DeclareIniVar spellSet string Settings "default raid" 
/call DeclareIniVar mezDuration string Settings 500 
/call DeclareIniVar tashDuration string Settings 14m 
/call DeclareIniVar slowDuration string Settings 2100 
/call DeclareIniVar autoAnnounce string Settings 1 
/call DeclareIniVar announceTells string Settings 0 /announcetells 
/call DeclareIniVar rodBitch string Settings 
/call DeclareIniVar noKnockBack string Settings 0 /usezoom 
/call DeclareIniVar usePet int Settings 1 /companion 

/call DeclareIniVar nuke1 string Spells "Psychosis" 
/call DeclareIniVar nuke2 string Spells "Insanity" 
/call DeclareIniVar mezSpell string Spells "Bliss" 
/call DeclareIniVar tashSpell string Spells "Howl of Tashan" 
/call DeclareIniVar slowSpell string Spells "Serpent of Vindication" 
/call DeclareIniVar slowType string Spells "item" 
/call DeclareIniVar charmSpell string Spells "Command of Druzzil" 
/call DeclareIniVar aeMezSpell string Spells "Bliss of the Nihil" 
/call DeclareIniVar shielding string spells "Mystic Shield" 
/call DeclareIniVar singleHasteSpell string Spells "Speed of Salik" 
/call DeclareIniVar groupHasteSpell string Spells "Hastening of Salik" 
/call DeclareIniVar selfRune string Spells "Ethereal Rune" 
/call DeclareIniVar petSpell string Spells "Salik's Animation" 
/call DeclareIniVar selfBuff1 string Spells " " 
/call DeclareIniVar selfBuffNoStack1 string Spells " " 
/call DeclareIniVar selfBuff2 string Spells " " 
/call DeclareIniVar selfBuffNoStack2 string Spells " " 
/call DeclareIniVar selfBuff3 string Spells " " 
/call DeclareIniVar selfBuffNoStack3 string Spells " " 
/call DeclareIniVar selfBuff4 string Spells " " 
/call DeclareIniVar selfBuffNoStack4 string Spells " " 
/call DeclareIniVar selfBuff5 string Spells " " 
/call DeclareIniVar selfBuffNoStack5 string Spells " " 
/call DeclareIniVar buffList1 string Spells "c6,crack,clarity,c5,c" 
/call DeclareIniVar buffName1 string Spells "c6" 
/call DeclareIniVar buffType1 string Spells "gem4" 
/call DeclareIniVar buffList2 string Spells "haste,sov,salik,speed,pants" 
/call DeclareIniVar buffName2 string Spells "haste" 
/call DeclareIniVar buffType2 string Spells "gem4" 
/call DeclareIniVar buffList3 string Spells "mr,grm,god" 
/call DeclareIniVar buffName3 string Spells "guard of druzzil" 
/call DeclareIniVar buffType3 string Spells "gem4" 
/call DeclareIniVar buffList4 string Spells "shissar,snake" 
/call DeclareIniVar buffName4 string Spells "staff of the serpent" 
/call DeclareIniVar buffType4 string Spells "item" 
/call DeclareIniVar buffList5 string Spells "c3" 
/call DeclareIniVar buffName5 string Spells "koadic's endless intellect" 
/call DeclareIniVar buffType5 string Spells "gem4" 

/call DeclareIniVar hpRobe string Items "${InvSlot[chest].Item.Name}" 
/call DeclareIniVar clicky1 string Items "Girdle of Efficiency" 
/call DeclareIniVar clickyNoStack1 string Items " " 
/call DeclareIniVar clicky2 string Items "Veil of the Inferno" 
/call DeclareIniVar clickyNoStack2 string Items " " 
/call DeclareIniVar clicky3 string Items " " 
/call DeclareIniVar clickyNoStack3 string Items " " 
/call DeclareIniVar clicky4 string Items " " 
/call DeclareIniVar clickyNoStack4 string Items " " 
/call DeclareIniVar clicky5 string Items " " 
/call DeclareIniVar clickyNoStack5 string Items " " 
/call DeclareIniVar useFood int Items 1 
/call DeclareIniVar statFood string Items "Bristlebanes Party Platter" 
/call DeclareIniVar food1 string Items "Halas 10lb Meat Pie" 
/call DeclareIniVar food2 string Items "Misty Thicket Picnic" 
/call DeclareIniVar food3 string Items "Holy Cake" 
/call DeclareIniVar food4 string Items " " 
/call DeclareIniVar food5 string Items " " 
/call DeclareIniVar meleeWep string Items "Staff of the Silent Star" 
/call DeclareIniVar invisItem string Items "Opaline Charm" 
/call DeclareIniVar dispellItem string Items "Wand of the Vortex" 
/call DeclareIniVar tashFocusItem string Items "Sharp Ended Broken Lever" 
/call DeclareIniVar normalMainhand string Items "${InvSlot[mainhand].Item.Name}" 


/squelch /custombind add ma 
/squelch /custombind add sa 
/squelch /alias /anchor /echo SetAnchor 
/squelch /alias /manarobe /echo Mana Robe 
/squelch /alias /setma /custombind set ma /assist 
/squelch /alias /setsa /custombind set sa /assist 

/declare i int local 
/declare j int local 
/declare oldTarget int local 
/declare tempTimer timer local 0 
/varset castSub CheckForAdds 
:check_params 
/if ( ${Defined[Param${i}]} ) { 
/if ( ${Param${i}.Equal[ma]} ) { 
/varcalc i ${i}+1 
/call SetIniVar mainAssist Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[sa]} ) { 
/varcalc i ${i}+1 
/call SetIniVar secondAssist Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[radius]} ) { 
/varcalc i ${i}+1 
/call SetIniVar minRadius Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[minhp]} ) { 
/varcalc i ${i}+1 
/call SetIniVar minHP Settings "${Param${i}}" 
} else /if ( ${Param${i}.Equal[buff]} ) { 
/call SetIniVar autoBuff Settings 1 
} else /if ( ${Param${i}.Equal[nobuff]} ) { 
/call SetIniVar autoBuff Settings 0 
} else /if ( ${Param${i}.Equal[nuke]} ) { 
/call SetIniVar nukeMode Settings 1 
} else /if ( ${Param${i}.Equal[nonuke]} ) { 
/call SetIniVar nukeMode Settings 0 
} else /if ( ${Param${i}.Equal[mez]} ) { 
/call SetIniVar useMez Settings 1 
} else /if ( ${Param${i}.Equal[nomez]} ) { 
/call SetIniVar useMez Settings 0 
} else /if ( ${Param${i}.Equal[debuff]} ) { 
/call SetIniVar useDebuff Settings 1 
} else /if ( ${Param${i}.Equal[nodebuff]} ) { 
/call SetIniVar useDebuff Settings 0 
} 
/varcalc i ${i}+1 
/goto :check_params 
} 
/if ( !${Me.Gem[${mezSpell}]} ) { 
/if ( ${Me.Gem[bliss]} ) { 
/call SetIniVar mezSpell Spells Bliss 
} else /if ( ${Me.Gem[sleep]} ) { 
/call SetIniVar mezSpell Spells Sleep 
} else /if ( ${Me.Gem[apathy]} ) { 
/call SetIniVar mezSpell Spells Apathy 
} else /if ( ${Me.Gem[glamour of kintaz]} ) { 
/call SetIniVar mezSpell Spells "Glamour of Kintaz" 
} else /if ( ${Me.Gem[felicity]} ) { 
/call SetIniVar mezSpell Spells Felicity 
} else /if ( ${Me.Gem[euphoria]} ) { 
/call SetIniVar mezSpell Spells Euphoria 
} 
} 

/if ( !${InvSlot[chest].Item.Name.Equal[mana robe]} ) /call SetIniVar hpRobe Items "${InvSlot[chest].Item.Name}" 

/call SwapStatFood 1 

/squelch /alert clear 6 

/if ( ${autoAnnounce} ) /announce on 

/echo AutoEnc Mode Activated 
/if ( ${nukeMode} || ${useDebuff} || ${useMez} ) { 
/echo Main Assist: ${mainAssist} 
/if ( ${Bool[${secondAssist}]} ) /echo Secondary Assist: ${secondAssist} (if ${mainAssist} dies) 
} 
/if ( ${nukeMode} ) /echo Nuke Mode: ${nukeMode} 
/if ( ${useDebuff} ) /echo Auto Debuffs Enabled 
/if ( ${useMez} ) { 
/echo Auto Mez adds within a radius of ${minRadius} 
/if ( !${Me.Gem[${mezSpell}]} ) /memspell 7 "${mezSpell}" 
} 
/if ( ${autoBuff} ) /echo AutoBuff Mode: ${autoBuff} 
/if ( ${useMount} ) /echo Mount is enabled. 
/if ( ${manaRobeMode} ) /echo ManaRobe Mode: ${manaRobeMode} 
:wait_for_target 
/if ( ${nukeMode} || ${useDebuff} || ${useMez} ) /echo Waiting for target... 
/varset newAdds 0 
/varset validTarget 0 
:wait_for_target2 
/if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist} radius ${minRadius}].ID} ) ) { 
/varset mainTank ${secondAssist} 
} else { 
/varset mainTank ${mainAssist} 
} 
/if ( !${Corpse.Open} && ${Spawn[${mainAssist}].NearestSpawn[npc radius ${Math.Calc[${minRadius}*2]}].ID} && ( ${nukeMode} || ${useDebuff} || ${useMez} ) ) { 
/if ( ${Me.Casting.ID} ) /call WaitCast 
/assist ${mainTank} 
/call ManaRobe 
/varset oldTarget ${Target.ID} 
/varset tempTimer 5 
/call CheckRune 100 
:wait_for_assist1 
/call CheckTarget 
/if ( ${tempTimer} && !${validTarget} ) /goto :wait_for_assist1 
} 
/call CheckTarget 
/if ( !${validTarget} || ( !${nukeMode} && !${useDebuff} && !${useMez} ) ) { 
/doevents 
/call CheckBuffs 
/call CheckPet 
/call CheckRune ${runeHP} 
/if ( ${useAnchor} ) /call CheckLoc 
/call ManaRobe 
/goto :wait_for_target2 
} 
/echo Target Aquired >> ${Target.DisplayName} << 
/varset petAttacking false 
/varset engaged 0 
/varset nukeWaitTimer 0 
/varset mobID ${Target.ID} 
/varset mobHPStart ${Target.PctHPs} 
/call UpdateMobList 
/call AddToList mobList ${mobID} 
/if ( ${Defined[mezTimer${mobID}]} ) /deletevar mezTimer${mobID} 
/declare mezTimer${mobID} int outer -1 
/varset newAdds 0 
/varset nukeWaitTimer 0 
/varset fightStartTime 0 
/varset totalNonMeleeDmg 0 
/varset totalMeleeDmg 0 
/if ( ${Defined[waitTimer${mobID}]} ) /deletevar waitTimer${mobID} 
/declare waitTimer${mobID} int outer -1 
:check_add_loop 
/if ( ( ${Target.PctHPs}>${minHP} && ${waitTimer${mobID}} ) || !${assistWaitTimer} ) { 
/if ( ${Spawn[pc ${secondAssist}].ID} && ( !${Spawn[pc ${mainAssist}].ID} || ${Spawn[corpse ${mainAssist} radius ${minRadius}].ID} ) ) { 
/varset mainTank ${secondAssist} 
} else { 
/varset mainTank ${mainAssist} 
} 
/if ( ${Me.Casting.ID} ) /call WaitCast 
/assist ${mainTank} 
/if ( ${useManaRobe} && ( ${refreshTime} || ${nukeWaiTimer} || !${nukeMode} ) ) /call ManaRobe 
/varset tempTimer 8 
:wait_for_assist 
/call CheckForAdds 
/doevents Timer 
/if ( ${tempTimer} && ${Target.ID}==${mobID} ) /goto :wait_for_assist 
/if ( ${Target.ID} && ${Target.ID}!=${mobID} ) { 
/if ( ${Defined[mezTimer${mobID}]} ) /deletevar mezTimer${mobID} 
/call DeleteFromList mobList ${mob} 
/goto :wait_for_target 
} 
/varset assistWaitTimer 5s 
} 
/varset addIndex 1 
:check_add_loop2 
/call CheckForAdds 
/if ( ${addIndex}>1 ) /goto :check_add_loop2 
/if ( ${newAdds} ) /call MezAdds 
/call CheckPet 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Type.Equal[pet]} ) /goto :mob_dead 
/if ( !${nukeMode} && !${useDebuff} && !${useMez} ) /goto :wait_for_target 
/target id ${mobID} 
/if ( ( ${Target.PctHPs}<${mobHPStart} ) && ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Math.Calc[${Spawn[${mobID}].MaxRangeTo}+10]} id ${mobID}].ID} && ${waitTimer${mobID}}<0 && ${Spawn[${mobID}].Distance3D}<=${minRadius} ) { 
/deletevar waitTimer${mobID} 
/declare waitTimer${mobID} timer outer ${engageDelay} 
} 
/doevents 
/target id ${mobID} 

/if ( ${Target.PctHPs}>${minHP} && ${waitTimer${mobID}} ) /goto :check_add_loop 
/if ( ${newAdds} ) /call MezAdds 
/if ( !${engaged} ) { 
/varset engaged 1 
/echo Engaging >> ${Target.DisplayName} << 
} 
/if ( ${Me.Pet.ID} && !${petAttacking} && !${Me.PetBuff[word of worell]} ) { 
/pet attack 
/varset petAttacking true 
} 
/call UpdateMobList 
/doevents Timer 
/if ( ${useDebuff} && !${newAdds} ) /call DebuffMobs 
/if ( ${Spawn[${mobID}].Type.Equal[NPC]} || ( !${Spawn[${mobID}].Master.Type.Equal[PC]} && ${Spawn[${mobID}].Type.Equal[pet]} ) ) { 
/target id ${mobID} 
} else { 
/goto :mob_dead 
} 
/if ( !${newAdds} && ( ${slowTimer${mobID}}>1 || ${slowTimer${mobID}}<0 || !${useDebuff} ) ) { 
/call CheckRune 100 
/call CheckBuffs 
/target id ${mobID} 
/if ( ${Target.Type.Equal[npc]} && ( ${Target.Class.CanCast} || ${Zone.ID}>=300 ) ) { 
/if ( ${Me.Gem[Scryer's Trespass]} && !${spellRecastTimer${Me.Gem[Scryer's Trespass]}} ) /call Cast "Scryer's Trespass" spell 0 CheckForAdds 
/if ( ${Me.Gem[Theft of Thought]} && !${spellRecastTimer${Me.Gem[Theft of Thought]}} ) /call Cast "Theft of Thought" spell 0 CheckForAdds 
} 
/target id ${mobID} 
/if ( ${refreshTime}<20 && ( ${Target.PctHPs}<${mobHPStart} || ${minHP}==100 ) && !${newAdds} && ${Target.LineOfSight} && !${Me.TargetOfTarget.Name.Equal[${Me.Name}]} && !${nukeWaitTimer} && ${nukeMode} && ( ${Me.PctMana}>=${nukeMana} || ${nukeMode}==2 ) && ( ${Target.Type.Equal[NPC]} || ${Target.Type.Equal[pet]} ) ) { 
/if ( !${fightStartTime} ) /varset fightStartTime ${MacroQuest.Running} 
/call Cast "${nuke1}" gem1 0 CheckForAdds 
/if ( ${Macro.Return.Equal[CAST_NOTREADY]} ) { 
/if ( ${Me.Gem[${nuke2}]} ) { 
/call Cast "${nuke2}" gem2 0 CheckForAdds 
} else { 
/call ManaRobe 
} 
} 
/if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_RESISTED]} ) { 
/if ( ${nukeMode}==1 ) { 
/varcalc nukeWaitMod 5*(90 - ${Me.PctMana}) 
} else { 
/varset nukeWaitMod 0 
} 
/if ( ${nukeDelay}>${nukeWaitMod} ) { 
/varset nukeWaitTimer ${nukeDelay} 
} else { 
/varset nukeWaitTimer ${nukeWaitMod} 
} 
} 
} else { 
/call ManaRobe 
} 
} 
/goto :check_add_loop 
:mob_dead 
/call UpdateMobList 
/echo Target Dead! 
/doevents 
/if ( ${useDPS} ) { 
/call DisplayDPS 
} 
/goto :wait_for_target
Sub CheckForAdds 
/if ( ${Me.Casting.ID} ) { 
/doevents gate 
/doevents rageon 
/doevents rageoff 
/doevents uquakey 
/doevents setvar 
/if ( ${castEndTime}>5 ) /doevents chat 
/if ( !${castReturn.Equal[CAST_CANCELLED]} && ${castEndTime} && ${castEndTime}<=5 && ( !${startCastingLoc.Arg[1].Equal[${Me.X}]} || !${startCastingLoc.Arg[2].Equal[${Me.Y}]} ) ) { 
/keypress forward 
/keypress left 
/squelch /zoom ${startCastingLoc} 
} 
/if ( ${useMez} && ${newAdds} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Spawn[${petID}].Type.Equal[NPC]} ) /call Interrupt 
} 
/if ( ${Target.ID}==${mobID} && ${Me.TargetOfTarget.Type.Equal[pc]} && ${Me.TargetOfTarget.Class.Name.Equal[cleric]} && ${Me.TargetOfTarget.PctHPs}<=50 && ${Me.AltAbilityReady[soothing words]} ) { 
/if ( ${Me.TargetOfTarget.ID}==${Group[1].ID} || ${Me.TargetOfTarget.ID}==${Group[2].ID} || ${Me.TargetOfTarget.ID}==${Group[3].ID} || ${Me.TargetOfTarget.ID}==${Group[4].ID} || ${Me.TargetOfTarget.ID}==${Group[5].ID} ) { 
/if ( ${Me.Casting.ID} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Spawn[${petID}].Type.Equal[NPC]} ) /call Interrupt 
/call Cast "soothing words" alt 
} 
} 

/if ( ${useCharm} ) /call CheckPet2 
:check_add_loop 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} && !${petOff} ) { 
/varset addIndex 1 
/varset newAdds 0 
/return 
} 
/if ( ${petCheck} ) { 
/varset addID ${NearestSpawn[${addIndex},npc radius ${minRadius}].ID} 
} else { 
/varset addID ${NearestSpawn[${addIndex},pet radius ${minRadius}].ID} 
} 
/if ( ${addID} ) { 
/if ( ( ${mezTimer${addID}}<=${Math.Calc[${mezDuration}-50]} || !${mezTimer${addID}} ) && ${Spawn[${addID}].Distance3D}<=${minRadius} && ${addID}!=${petID} && ${Spawn[${addID}].LineOfSight} && ${aggroAnim.Find[|${Spawn[${addID}].Animation}|]} && ${mezTimer${addID}}!=-1 && ( ( !${Spawn[${addID}].Master.Type.Equal[PC]} && ${Spawn[${addID}].Type.Equal[pet]} ) || ( ${Spawn[${addID}].Type.Equal[NPC]} && ${addID}!=${Spawn[${mobID}].Master.ID} ) ) ) { 
/call AddToList addList ${addID} 
/call AddToList mobList ${addID} 
/if ( ${Macro.Return.Equal[1]} ) { 
/if ( !${Defined[waitTimer${addID}]} ) /declare waitTimer${addID} timer outer ${engageDelay} 
/echo Add detected! >> ${Spawn[${addID}].DisplayName} << 
} 
/varset newAdds 1 
} 
/varcalc addIndex ${addIndex}+1 
} else { 
/varcalc petCheck !${petCheck} 
/varset addIndex 1 
} 
/return 

Sub CheckPet2 
/if ( ${Zone.ID}!=${currentZone} ) /call Event_Zone 
/if ( ${petOff} && ${Me.Pet.ID} ) { 
/varset petOff 0 
/if ( !${addList.Find[[]} ) /varset newAdds 0 
} 
/if ( ${Spawn[${petID}].Type.Equal[NPC]} && !${petOff} && ${useCharm} && ${petID} ) { 
/echo Pet Off! 
/varset petAttacking false 
/varset newAdds 1 
/varset petOff 1 
/if ( ${useCharm}>1 && ${Me.Casting.ID} && ${useMez} && ${newAdds} && !${Me.Casting.Name.Equal[${mezSpell}]} && !${Me.Casting.Name.Equal[word of morell]} && !${Me.Casting.Name.Equal[howl of tashan]} && !${Me.Casting.Name.Equal[${charmSpell}]} ) /call Interrupt 
/if ( ${useCharm}==1 ) { 
/beep 
/timed 7 /g PET OFF!! snare/malo pls! 
/target id ${petID} 
} 
} 
/return 

Sub CheckPet 
/if ( !${FindItem[${normalOffhand}].ID} && ${InvSlot[offhand].Item.ID} ) /varset normalOffhand ${InvSlot[offhand].Item.Name} 
/if ( ${FindItem[Wand of Destructive Protection].ID} ) { 
/declare AETime float local 
/varcalc AETime (${MacroQuest.Running}-${uquaAETime})%90000 
/if ( ${AETime}>84000 ) { 
/if ( !${Me.Inventory[offhand].Name.Equal[Wand of Destructive Protection]} ) /call EquipItem "Wand of Destructive Protection|offhand" 
} else { 
/if ( ${AETime}>3000 && !${Me.Inventory[offhand].Name.Equal[${normalOffhand}]} ) /call EquipItem "${normalOffhand}|offhand" 
} 
} 
/doevents rageon 
/doevents rageoff 
/declare i int local 
/declare tempID int local 
/call CheckPet2 
/if ( ${petOff} ) { 
/if ( ${useCharm}>1 ) { 
/call Charm ${petID} 
} 
} 
/for i 1 to ${Group} 
/varset tempID ${Group.Member[${i}].Pet.ID} 
/if ( ${tempID} ) { 
/if ( !( ${slowTimer${tempID}}<0 ) ) { 
/if ( ${Defined[mezTimer${tempID}]} ) /deletevar mezTimer${tempID} 
/if ( ${Defined[slowTimer${tempID}]} ) /deletevar slowTimer${tempID} 
/if ( ${Defined[tashTimer${tempID}]} ) /deletevar tashTimer${tempID} 
/declare mezTimer${tempID} int outer -1 
/declare tashTimer${tempID} int outer -1 
/declare slowTimer${tempID} int outer -1 
} 
} 
/next i 
/return 

Sub MezAdds 
/if ( !${useMez} ) /goto :end_mez_adds 
/declare tempID string local 
/declare AEmezzed int local 0 
:mez_adds_loop 
/if ( ${addList.Find[[]} ) { 
/if ( ${addList.Find[[]}>1 ) /varset addList ${addList.Right[-${Math.Calc[${addList.Find[[]}-1]}]} 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} ) /return 
/varset tempID ${addList.Arg[1,[].Left[-1]} 
/if ( !${Spawn[${tempID}].Type.Equal[NPC]} && !${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/if ( ${Defined[mezTimer${tempID}]} ) /deletevar mezTimer${tempID} 
/if ( ${Defined[slowTimer${tempID}]} ) /deletevar slowTimer${tempID} 
/if ( ${Defined[tashTimer${tempID}]} ) /deletevar tashTimer${tempID} 
} else { 
/target id ${tempID} 
/if ( !${AEmezzed} && ${Spawn[${tempID}].NearestSpawn[2,npc radius 30].ID} && ${Spawn[${tempID}].Distance3D}>30 && ${addList.Count[[]}>=2 ) { 
/call Cast "${aeMezSpell}" 
/varset AEmezzed 1 
} 
/target id ${tempID} 
/call Mez 
} 
/call DeleteFromList addList ${tempID} 
/goto :mez_adds_loop 
} 
:end_mez_adds 
/varset newAdds 0 
/return 

Sub DebuffMobs 
/declare i int local 
/declare tempID string local 
/if ( ${mobList.Find[[]} ) { 
/if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]} 
/for i 1 to ${mobList.Count[[]} 
/varset tempID ${mobList.Arg[${i},[].Left[-1]} 
/if ( !${Defined[slowTimer${tempID}]} ) { 
/if ( !${Spawn[${tempID}].Type.Equal[npc]} ) { 
/declare slowTimer${tempID} int outer 0 
} else /if ( ( ( !${waitTimer${tempID}} || ${mezTimer${tempID}}>0 ) && ( ${slowTimer${mobID}} || ${waitTimer${mobID}} ) ) || ${tempID}==${mobID} ) { 
/call UpdateMobList 
/doevents Timer 
/target id ${tempID} 
/if ( !${tashTimer${tempID}} ) /call Tash 
/if ( ${newAdds} ) /return 
/call Slow 
/if ( ${addList.Find[[]} ) /varset newAdds 1 
/if ( ${newAdds} ) /return 
/if ( ${Macro.Return.Equal[CAST_CANCELLED]} ) /return 
/if ( ${newAdds} ) /return 
} 
} 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} ) /return 
/next i 
} 
/return 

Sub Charm(int tempID) 
/declare oldTargetID int local ${Target.ID} 
/target id ${tempID} 
/if ( ${Me.Gem[Word of Morell]} ) { 
/if ( ${Target.Distance3D}>30 ) { 
/face fast nolook 
/keypress forward hold 
/delay 1s ${Target.Distance3D}<=30 
/keypress forward 
/delay 5 !${Me.Moving} 
} 
/if ( ${Target.Distance3D}<=30 ) /call Cast "Word of Morell" gem4 6s CheckForAdds 
} 
/target id ${tempID} 
/if ( ${tashTimer${tempID}}<5500 ) /call Tash 
/target id ${tempID} 
/call Cast "${charmSpell}" gem6 2s CheckForAdds 
/if ( ${Me.Pet.ID} ) { 
/if ( ${Spawn[${oldTargetID}].ID} ) { 
/target id ${oldTargetID} 
} else { 
/squelch /target clear 
} 
} 
/return 

Sub Tash 
/declare tempID int local ${Target.ID} 
/if ( ${useTashFocus} ) /call SwapItem "${tashFocusItem}" ${FindItem[${tashFocusItem}].WornSlot[1]} 
/call Cast "${tashSpell}" gem3 6s 
/if ( !${Defined[tashTimer${tempID}]} ) /declare tashTimer${tempID} timer outer 
/if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) { 
/varset tashTimer${tempID} ${tashDuration} 
} else { 
/varset tashTimer${tempID} 1 
} 
/call SwapItem "${normalMainhand}" mainhand 
/return ${Macro.Return} 

Sub Slow 
/declare tempID int local ${Target.ID} 
/doevents Hit 
/call Cast "${slowSpell}" ${slowType} 6s CheckForAdds 
/if ( !${Defined[slowTimer${tempID}]} ) /declare slowTimer${tempID} timer outer 
/if ( ${Macro.Return.Equal[CAST_IMMUNE]} ) { 
/deletevar slowTimer${tempID} 
/declare slowTimer${tempID} int outer -1 
} else /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) { 
/varset slowTimer${tempID} ${slowDuration} 
} else /if ( ${newAdds} || ${Macro.Return.Equal[CAST_OUTOFMANA]} || ${Macro.Return.Equal[CAST_OUTOFRANGE]} || ${Macro.Return.Equal[CAST_CANNOTSEE]} ) { 
/varset slowTimer${tempID} 50 
} else { 
/varset slowTimer${tempID} 1 
} 
/return ${Macro.Return} 

Sub Mez 
/declare tempID int local ${Target.ID} 
/declare resistCount int local 0 
/if ( ${mezTimer${tempID}}>${Math.Calc[${mezDuration}-50]} ) /return 
:mez_loop 
/tar id ${tempID} 
/if ( ${Target.PctHPs}<99 && ${mezTimer${tempID}} ) { 
/deletevar mezTimer${tempID} 
/declare mezTimer${tempID} int outer -1 
/return ${Macro.Return} 
} 
/if ( !${Spawn[${tempID}].Type.Equal[NPC]} && !${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/call UpdateMobList 
/return 
} 
/if ( !${Defined[mezTimer${tempID}]} ) /declare mezTimer${tempID} timer outer 
/doevents Hit 
/call Cast "${mezSpell}" gem7 3s CheckForAdds 
/if ( ${Macro.Return.Equal[CAST_IMMUNE]} || ${Macro.Return.Equal[CAST_CANCELLED]} ) { 
/deletevar mezTimer${tempID} 
/declare mezTimer${tempID} int outer -1 
} else /if ( ${Macro.Return.Equal[CAST_SUCCESS]} ) { 
/varset mezTimer${tempID} ${mezDuration} 
} else /if ( ${Macro.Return.Equal[CAST_OUTOFMANA]} || ${Macro.Return.Equal[CAST_OUTOFRANGE]} || ${Macro.Return.Equal[CAST_CANNOTSEE]} ) { 
/varset mezTimer${tempID} 50 
} else { 
/if ( ${Macro.Return.Equal[CAST_INTERRUPTED]} ) { 
/if ( ${Me.SpellReady[word of morrel]} ) { 
/call Cast "Word of Morell" gem4 4s 
} 
} 
/if ( ${Macro.Return.Equal[CAST_RESISTED]} ) { 
/varcalc resistCount ${resistCount}+1 
/if ( ${resistCount}==2 && !${tashTimer${addID}} ) /call Tash 
} 
/if ( !${Spawn[${mobID}].Type.Equal[NPC]} && !${Spawn[${mobID}].Master.Type.Equal[NPC]} && ${useMez} ) /return 
/goto :mez_loop 
} 
/return ${Macro.Return} 

Sub Event_Timer(string timerName,int timerValue) 
/if ( !${Defined[${timerName}]} ) /return 
/declare tempID int local 0 
/declare oldTargetID int local ${Target.ID} 
/if ( ${timerName.Left[9].Equal[tashTimer]} ) { 
/varset tempID ${timerName.Right[-9]} 
/if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/target id ${tempID} 
/call Tash 
} else { 
/deletevar ${timerName} 
} 
} else /if ( ${timerName.Left[9].Equal[slowTimer]} ) { 
/varset tempID ${timerName.Right[-9]} 
/if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/target id ${tempID} 
/call Slow 
} else { 
/deletevar ${timerName} 
} 
} else /if ( ${timerName.Left[8].Equal[mezTimer]} ) { 
/varset tempID ${timerName.Right[-8]} 
/if ( ${Spawn[${tempID}].Type.Equal[NPC]} || ${Spawn[${tempID}].Master.Type.Equal[NPC]} ) { 
/target id ${tempID} 
/call Mez 
} else { 
/deletevar ${timerName} 
} 
} else { 
/return ${Macro.Return} 
} 
/if ( ${Target.ID}==${tempID} ) { 
/if ( ${Spawn[${oldTargetID}].ID} ) { 
/target id ${oldTargetID} 
} else { 
/squelch /target clear 
} 
} 
/return ${Macro.Return} 

Sub ClickOffIllusion 
/declare i int local 
/for i 1 to 20 
/if ( ${Me.Buff[${i}].Name.Find[illusion:]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup 
/next i 
/return 

Sub IllusionRanger 
/declare oldChest string local 
/declare oldArms string local 
/declare oldLegs string local 
/declare oldPrimary string local 
/declare oldSecondary string local 
/call ClickOffIllusion 
/call EquipItem "enchanted elven chain tunic" 
/varset oldChest ${Macro.Return} 
/call EquipItem "enchanted elven chainmail leggings" 
/varset oldLegs ${Macro.Return} 
/call EquipItem "ruined heretic longsword" 
/varset oldPrimary ${Macro.Return} 
/call EquipItem "preserved chokidai vocal cords" 
/varset oldSecondary ${Macro.Return} 
/target id ${Me.ID} 
/call Cast "illusion: werewolf" gem4 10s 
/call EquipItem ${oldChest} 
/call EquipItem ${oldLegs} 
/call EquipItem ${oldPrimary} 
/call EquipItem ${oldSecondary} 
/call ClickOffIllusion 
/call Cast "illusion: wood elf" gem4 10s 
/return 

Sub CheckBuffs 
/if ( ${Zone.ID}!=${currentZone} ) /call Event_Zone 

/varset deathFlag ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]} 
/if ( ${deathFlag} ) /goto :dead 
/declare i int local 
/declare oldTarget int local ${Target.ID} 
/declare oldItemName string local 
/declare foodName string local 
/declare oldSlotID int local 
/declare spellName string local 
/declare buffText string local 
/declare targetName string local 
/declare spellName2 string local 
/declare spellType string local 
/declare spellRange int local 118 
/declare tempID int local 
/declare focusList string local Wunshi's Focusing,Focus of Alladnu,Focus of Soul,Talisman of Kragg,Focus of the Seventh,Talisman of Wunshi 
/declare shaman bool local false 
/declare targetType string local 

/doevents Indoors 
/if ( !${Me.Pet.ID} && ${usePet} && !${petOff} && ${Me.CurrentMana}>=900 ) /call SumPet 
/if ( ${Me.Pet.ID} && ${petID}!=${Me.Pet.ID} ) { 
/varset petID ${Me.Pet.ID} 
/if ( ${Defined[mezTimer${petID}]} ) /deletvar mezTimer${petID} 
/if ( ${Defined[slowTimer${petID}]} ) /deletvar slowTimer${petID} 
/declare mezTimer${petID} int outer -1 
/declare slowTimer${petID} int outer -1 
} 
/if ( !${Me.Casting.ID} ) { 
/if ( ${Me.Combat} ) { 
/call SwapItem "${meleeWep}" mainhand 
} else { 
/call SwapItem "${normalMainhand}" mainhand 
} 
} 
/if ( ${Cursor.Name.Equal[Rod of Mystical Transvergance]} ) /autoinventory 
/if ( !${FindItem[Rod of Mystical Transvergance].ID} && ${Spawn[pc ${rodBitch} radius 200].ID} && !${askedForRodTimer} ) { 
;tell ${rodBitch} rod pls! 
/varset askedForRodTimer 5m 
} 
/if ( ${FindItem[Rod of Mystical Transvergance].ID} && !${modRodTimer} && ${Me.PctHPs}>50 && ${Me.PctMana}<=95 ) { 
/call Cast "Rod of Mystical Transvergance" item 
/varset modRodTimer 3100 
} 
/if ( ${checkNamed} ) /call CheckNamed 

/if ( ${Me.Hunger}<5000 && ${useFood} ) { 
/call GetFoodName 
/varset foodName ${Macro.Return} 
/if ( ${Bool[${foodName}]} ) { 
/varset oldSlotID ${FindItem[${foodName}].InvSlot.ID} 
/call SwapItem "${foodName}" "pack8" 
/nomodkey /itemnotify pack8 rightmouseup 
/call SwapItem "${foodName}" "${oldSlotID}" 
} 
} 
/if ( !${autoBuff} ) /goto :skip_buffs 
/if ( ( ${autoBuff}==2 || ${autoBuff}==4 ) && ${Target.ID} ) /return 

/call CheckIniBuffs 

/if ( ${Me.Pet.ID} ) { 
/if ( !${Me.PetBuff[${charmSpell}]} && !${Me.PetBuff[speed of vallon]} && !${Me.PetBuff[speed of salik]} && !${Me.PetBuff[hastening of salik]} && ${Me.Pet.Distance3D}<=120 ) /call AddToQueue "haste,${Me.Pet.Name}" 
/if ( !${Me.PetBuff[Night`s Dark Terror]} && ${Me.Pet.Distance3D}<=120 && ${Me.SpellReady[Night`s Dark Terror]} ) /call AddToQueue "Night`s Dark Terror,${Me.Pet.Name}" 
} 
/if ( ${Me.Buff["Clairvoyance"].Duration}<=5 && ${Me.Buff["Voice of Clairvoyance"].Duration}<=5 ) { 
/if ( !${Me.Buff["Voice of Quellious"].ID} && !${Me.Buff["Tranquility"].ID} ) { 
/if ( ${Me.PctMana}<50 && ${FindItem[Silken Augmenter's Pantaloons].ID} && !${Me.Buff["Clairvoyance"].ID} && !${Me.Buff["Voice of Clairvoyance"].ID} ) { 
/call AddToQueue "c4,${Me.Name}" 
} else { 
/call AddToQueue "c6,${Me.Name}" 
} 
} else /if ( ${Me.PctMana}>=90 && ( ${Me.Book[clairvoyance]} || ${Me.Book[voice of clairvoyance]} ) ) { 
/call AddToQueue "c6,${Me.Name}" 
} 
} 
/if ( ${hasteGroup} ) { 
/for i 1 to ${Group} 
/varset tempID ${Group.Member[${i}].ID} 
/if ( ${tempID} ) { 
/if ( !${Defined[hasteTimer${tempID}]} ) /declare hasteTimer${tempID} timer outer 
/if ( ${Spawn[${tempID}].Type.Equal[pc]} ) { 
/if ( !${hasteTimer${tempID}} ) { 
/if ( ${Group.Member[${i}].Class.PureCaster} ) { 
/deletevar hasteTimer${tempID} 
/declare hasteTimer${tempID} int outer -1 
} else { 
/call AddToQueue "sos,${Group.Member[${i}].Name}" 
/varset hasteTimer${tempID} 62m 
} 
} 
} else /if ( ${Spawn[${tempID}].Type.Equal[corpse]} ) { 
/varset hasteTimer${tempID} 0 
} 
} else /if ( ${Defined[hasteTimer${tempID}]} ) { 
/deletevar hasteTimer${tempID} 
} 
/next i 
} 
/if ( ${Spawn[pc class shaman].ID} ) { 
/if ( ${Raid.Members} ) { 
/if ( ${Spawn[pc guild "${Me.Guild}" shm].ID} ) /varset shaman true 
} else { 
/for i 1 to ${Group} 
/if ( ${Group.Member[${i}].Class.Name.Equal[shaman]} ) /varset shaman true 
/next i 
} 
} 
/if ( ${shaman} ) { 
/if ( ${Me.Buff["${shielding}"].ID} ) /call ClickOffBuff "${shielding}" 
} else { 
/for i 1 to ${focusList.Length} 
/if ( ${Me.Buff[${focusList.Arg[${i},,]}].ID} ) /goto :skip_buffs 
/next i 
/if ( !${Me.Buff[${shielding}].ID} ) /call AddToQueue "${shielding}" 
} 
:skip_buffs 
/if ( !${Me.Mount.ID} && ${useMount} ) /call Cast "${InvSlot[ammo].Item.Name}" item 2s CheckForAdds 
/if ( ${buffQueue.Find[[]} ) { 
/if ( ${buffQueue.Find[[]}>1 ) /varset buffQueue ${buffQueue.Right[-${Math.Calc[${buffQueue.Find[[]}-1]}]} 
/for i 1 to ${buffQueue.Count[[]} 
/varset buffText [${buffQueue.Arg[${i},[]} 
/varset spellName ${buffText.Arg[1,,].Right[-1]} 
/if ( ${spellName.Right[1].Equal["]"]} ) /varset spellName ${spellName.Left[-1]} 
/varset targetName ${buffText.Arg[2,,].Left[-1]} 
/call GetBuffName "${spellName}" 
/varset spellName ${Macro.Return.Arg[1,,]} 
/varset spellType ${Macro.Return.Arg[2,,]} 
/if ( ${spellType.Equal[item]} ) { 
/varset spellName2 ${FindItem[${spellName}].Spell.Name} 
} else { 
/varset spellName2 ${spellName} 
} 
/if ( ${Spell[${spellName2}].TargetType.Equal[Group v2]} ) { 
/varcalc spellRange 1.18*${Spell[${spellName2}].AERange} 
} else { 
/varcalc spellRange 1.18*${Spell[${spellName2}].Range} 
} 
/varset targetType pc 
/if ( !${Spawn[pc ${targetName}].ID} ) /varset targetType pet 
/if ( ${Bool[${spellName}]} ) { 
/if ( ${Me.CurrentMana}>=${Math.Calc[${Spell[${spellName}].Mana}+${Me.ManaRegen}]} || ${spellType.Equal[item]} || ${spellType.Equal[alt]} ) { 
/if ( !${Bool[${targetName}]} ) { 
/call Cast "${spellName}" ${spellType} 4s CheckForAdds 
} else /if ( ${Spawn[${targetType} ${targetName}].ID} && ( ${Spawn[pc ${targetName}].Distance3D}<=${spellRange} || !${spellRange} ) ) { 
/target ${targetType} ${targetName} 
/call Cast "${spellName}" ${spellType} 4s CheckForAdds 
/if ( ${Spawn[${oldTarget}].ID} ) { 
/if ( ${Target.Name.Equal[${targetName}]} ) /target id ${oldTarget} 
} else { 
/squelch /target clear 
} 
} 
/if ( ${Macro.Return.Equal[CAST_SUCCESS]} || ${Macro.Return.Equal[CAST_UNKNOWNSPELL]} || ${Macro.Return.Equal[CAST_NOTARGET]} || ( ${Macro.Return.Equal[CAST_CANCELLED]} && ( !${newAdds} || !${useMez} ) ) ) { 
/call DeleteFromQueue "${buffText}" 
/varcalc i ${i}-1 
} 
} 
} else { 
/call DeleteFromQueue "${buffText}" 
/varcalc i ${i}-1 
} 
/next i 
} 
/return 
:dead 
/declare i int local 
/varset mobList 
/varset addList 
/varset buffQueue 
/varset mobID 0 
/varset petID 0 
/varset useAnchor 0 
/squelch alert clear 6 
/call ClearMobList 
:wait_for_loot 
/varset deathFlag ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]} 
/if ( ${Spawn[corpse radius 100 ${Me.Name}].ID} && ${deathFlag} ) { 
/target mycorpse 
/call LootCorpse 
/delay 5 
/goto :wait_for_loot 
} 
/if ( ${deathFlag} ) { 
/memspellset ${spellSet} 
/echo You're dead! Consenting and waiting for rez... 
/consent guild 
/delay 25 
/consent raid 
/delay 25 
/consent group 
:wait_for_rez 
/doevents 
/delay 1s 
/if ( !${Window[ConfirmationDialogBox].Open} ) /goto :wait_for_rez 
/delay 18s !${Window[SpellBookWnd].Open} 
/echo Yay a rez! 
/target id ${Me.ID} 
/call cast "Clairvoyance" gem4 5s RezBuff 
/call TakeRez 
/delay 5s ${Spawn[corpse radius 100 ${Me.Name}].ID} 
/goto :wait_for_loot 
} 
/return 

Sub RezBuff 
/if ( ${Me.Casting.ID} && ${castEndTime}<=5 ) { 
/varset castReturn CAST_CANCELLED 
/call TakeRez 
} 
/return 

Sub TakeRez 
:wait_for_rez2 
/if ( ${Window[ConfirmationDialogBox].Open} ) { 
/delay 1 
/notify ConfirmationDialogBox Yes_Button leftmouseup 
/goto :wait_for_rez2 
} 
/return 

Sub GetBuffName(string spellName) 
/declare i int local 
/declare buffText string local 
/declare spellType string local 
/if ( !${Me.Gem[4].SpellType.Equal[detrimental]} ) { 
/varset spellType gem4 
} else { 
/varset spellType gem9 
} 
/if ( ${spellName.Equal[gom]} ) /varset spellName Gift of Magic 
/if ( ${spellName.Equal[c1]} ) { 
/if ( ${FindItem[rod of infinite thought].ID} ) { 
/varset spellName rod of infinite thought 
/varset spellType item 
} else { 
/varset spellName clarity 
} 
} 
/if ( ${spellName.Equal[c2]} ) /varset spellName Clarity II 
/if ( ${spellName.Equal[c3]} ) { 
/if ( ${FindItem[Wand of Tranquility].ID} ) { 
/varset spellName Wand of Tranquility 
/varset spellType item 
} else { 
/varset spellName Koadic's Endless Intellect 
} 
} 
/if ( ${spellName.Equal[c4]} ) { 
/if ( ${FindItem[Silken Augmenter's Pantaloons].ID} ) { 
/varset spellName Silken Augmenter's Pantaloons 
/varset spellType item 
} else { 
/varset spellName Tranquility 
} 
} 
/if ( ${spellName.Equal[mgb]} ) { 
/varset spellName Mass Group Buff 
/varset spellType alt 
} 
/if ( ${spellName.Equal[c5]} ) /varset spellName Voice of Quellious 
/if ( ${spellName.Equal[c6]} ) { 
/if ( ${Group} && ${Me.Book[Voice of Clairvoyance]} && ${Me.Buff[Clairvoyance].Duration}<=5 && ${Me.Buff[Voice of Clairvoyance].Duration}<=5 ) { 
/varset spellName Voice of Clairvoyance 
} else { 
/varset spellName Clairvoyance 
} 
} 
/if ( ${spellName.Equal[haste]} ) { 
/if ( ${Me.PctMana}>60 || !${FindItem[Romar's Pantaloons of Visions].ID} ) { 
/varset spellType gem9 
/if ( ${Me.Gem[${groupHasteSpell}]} ) { 
/varset spellName ${groupHasteSpell} 
} else { 
/varset spellName ${singleHasteSpell} 
} 
} else { 
/varset spellName Romar's Pantaloons of Visions 
/varset spellType item 
} 
} 
/if ( ${spellName.Equal[sov]} || ${spellName.Equal[speed of vallon]} || ${spellName.Equal[vallon]} ) { 
/varset spellName Romar's Pantaloons of Visions 
/varset spellType item 
} 
/if ( ${spellName.Equal[shissar]} || ${spellName.Equal[snake]} ) { 
/varset spellName Staff of the Serpent 
/varset spellType item 
} 
/if ( ${spellName.Equal[see invis]} ) { 
/varset spellName bracer of the hidden 
/varset spellType item 
} 
/if ( ${spellName.Equal[mr]} || ${spellName.Equal[grm]} || ${spellName.Equal[gmr]} || ${spellName.Equal[god]} || ${spellName.Equal[magic resist]} ) /varset spellName Guard of Druzzil 
/if ( ${spellName.Equal[lev]} ) /varset spellName Levitation 
/if ( ${spellName.Equal[sos]} ) /varset spellName Speed of Salik 
/if ( ${spellName.Equal[imp invis]} ) /varset spellName Improved Invisibility 
/if ( ${spellName.Equal[invis]} ) /varset spellName Cloud of Indifference 
/if ( ${spellName.Equal[ivu]} ) /varset spellName Invisibility versus Undead 
/if ( ${spellName.Equal[rune]} ) /varset spellName Rune of Zebuxoruk 
/if ( ${spellName.Left[3].Equal[pac]} ) /varset spellName Pacification 
/if ( ${Me.Book[illusion: ${spellName}]} ) /varset spellName illusion: ${spellName} 
/if ( ${spellName.Equal[tash]} ) { 
/varset spellName ${tashSpell} 
/varset spellType gem3 
} 
/if ( ${spellName.Equal[slow]} ) { 
/varset spellName ${slowSpell} 
/varset spellType ${slowType} 
} 
/if ( ${spellName.Equal[mez]} ) { 
/varset spellName ${mezSpell} 
/varset spellType gem7 
} 
/if ( ${spellName.Left[6].Equal[dispel]} ) { 
/if ( ${Me.Gem[recant magic]} ) { 
/varset spellName Recant Magic 
} else { 
/varset spellName ${dispellItem} 
/varset spellType item 
} 
} 
/for i 1 to 5 
/if ( ${spellName.Equal[${buffName${i}}]} ) /varset spellType ${buffType${i}} 
/next i 
/if ( ( ${spellType.Find[gem]} || ${spellType.Equal[spell]} ) && !${Int[${Me.Book[${spellName}]}]} ) { 
/if ( ${FindItem[${spellName}].ID} ) { 
/varset spellType item 
} else /if ( ${Me.AltAbility[${spellName}]} || ${spellName.Equal[${Int[${spellName}]}]} ) { 
/varset spellType alt 
} else { 
/return 
} 
} 
/return ${spellName},${spellType} 

Sub CheckRune(int tempHP) 
/if ( !${Me.Buff["${selfRune}"].ID} && !${Me.Buff["Eldritch Rune"].ID} && ${autoBuff} && ( ${Me.PctHPs}<=${tempHP} || ${Me.PctMana}==100 ) ) { 
/call AddToQueue "${selfRune}" 
} 
/return 

Sub SumPet 
/declare i int local 
/if ( ${Me.AltAbilityReady[persistent minion]} ) /alt activate 176 
/delay 10s !${Me.Casting.ID} 
/delay 5s ${Me.Pet.ID} 
/if ( !${Me.Pet.ID} ) { 
/call cast "${petSpell}" gem4 5s 
} 
/return 

| ======================== EVENTS ======================== 

Sub Event_Chat2(string chatType,string chatSender,string chatText) 
/if ( ${chatText.Equal[camp]} && ${chatType.Equal[tell]} ) { 
/if ( ${Me.Mount.ID} ) /dismount 
/camp desktop 
} 
/if ( ${ignoreList.Find[|${chatSender}|]} || ${chatText.Left[4].Equal[cast]} || !${autoBuff} || ${Spawn[${chatSender}].Type.Equal[NPC]} ) /return 
/if ( !${Defined[buffQueue]} ) /declare buffQueue string outer 
/if ( !${Defined[chatTimer]} ) /declare chatTimer float outer 
/declare chatTime float local ${MacroQuest.Running} 
/declare oldTarget int local ${Target.ID} 
/declare n int local 
/declare spellName string local 
/declare i int local 
/declare j int local 
/declare please bool local 
/declare inGroup bool local false 
/declare tempStr string local /\.,?!() 
/declare tempChar string local 
/declare tempStr2 string local 

/for i 1 to ${tempStr.Length} 
/varset tempChar ${tempStr.Mid[${i},1]} 
:remove_char 
/if ( ${chatText.Find[${tempChar}]} ) { 
/varset chatText ${chatText.Left[${Math.Calc[${chatText.Find[${tempChar}]}-1]}]} ${chatText.Right[-${chatText.Find[${tempChar}]}]} 
/goto :remove_char 
} 
/next i 

/varset n ${chatText.Count[ ]} 

:count_spaces 
/if ( ${chatText.Arg[${Math.Calc[${n}+1]}].Length} ) { 
/varcalc n ${n}+1 
/goto :count_spaces 
} 

/if ( ${chatText.Find[please]} || ${chatText.Find[pls]} || ${chatText.Find[plz]} ) /varset please true 
/if ( ${chatText.Arg[${n}].Find[please]} || ${chatText.Arg[${n}].Find[pls]} || ${chatText.Arg[${n}].Find[plz]} || ${chatText.Arg[${n}].Equal[me]} ) /varcalc n ${n}-1 
/if ( ${Spawn[pc ${chatText.Arg[${n}]}].Name.Left[3].Equal[${chatText.Arg[${n}].Left[3]}]} ) { 
/if ( !${Spawn[pc ${chatText.Arg[${n}]}].Name.Equal[${Me.Name}]} ) /varset chatSender ${Spawn[pc ${chatText.Arg[${n}]}]} 
/varcalc n ${n}-1 
} 

/if ( ${n}==1 && ${chatText.Arg[1].Equal[invite]} && ${GroupLeader.ID}==${Me.ID} ) { 
/tar pc ${chatSender} 
/if ( ${Me.Casting.ID} ) /call WaitCast 
/invite 
} 

/for j 1 to 5 
/if ( ${Group.Member[${j}].Name.Equal[${chatSender}]} ) /varset inGroup true 
/next j 

/if ( !${Spawn[${chatSender}].ID} ) /return 

/for i 1 to ${n} 
/if ( ( ${chatText.Equal[plead]} && !${Spawn[pc ${chatSender}].Class.PureCaster} ) || ${chatText.Arg[${i}].Left[5].Equal[haste]} || ${chatText.Arg[${i}].Left[3].Equal[sov]} || ${chatText.Arg[${i}].Left[5].Equal[speed]} || ${chatText.Arg[${i}].Left[2].Equal[vq]} || ${chatText.Arg[${i}].Left[4].Equal[pant]} || ( ${chatText.Arg[${i}].Left[6].Equal[vallon]} && !${chatText.Find[zek]} ) ) { 
/if ( ${Me.Gem[speed of salik]} && ${Me.PctMana}>50 ) { 
/call AddToQueue "sos,${chatSender}" 
} else { 
/call AddToQueue "sov,${chatSender}" 
} 
} 
/if ( ${chatText.Arg[${i}].Left[3].Equal[VoQ]} || ${chatText.Arg[${i}].Left[2].Equal[c5]} ) { 
/call AddToQueue "c6,${chatSender}" 
} 
/if ( ( ( ${chatText.Equal[plead]} && ${Spawn[pc ${chatSender}].Class.CanCast} ) || ${chatText.Arg[${i}].Left[2].Equal[c6]} || ${chatText.Arg[${i}].Equal[c]} || ${chatText.Arg[${i}].Left[7].Equal[clarity]} || ${chatText.Arg[${i}].Left[8].Equal[clairity]} || ${chatText.Arg[${i}].Left[5].Equal[crack]} ) && !${chatText.Find[i c]} && !${chatSender.Equal[runningbear]} && !${chatText.Find[AE c]} && !${chatText.Find[inc c]} ) { 
/if ( ${chatSender.Equal[vitesse]} ) { 
/chat tell Vitesse die pls! 
} else { 
/call AddToQueue "c6,${chatSender}" 
} 
} 
/if ( ( ( ${chatText.Arg[${i}].Left[3].Equal[god]} || ${chatText.Arg[${i}].Left[4].Equal[druz]} || ${chatText.Arg[${i}].Left[2].Equal[mr]} ) && ( ${please} || ${chatText.Find[can i get]} ) ) || ${chatText.Arg[${i}].Left[3].Equal[gmr]} || ${chatText.Arg[${i}].Left[3].Equal[grm]} || ( ${chatText.Arg[${i}].Left[5].Equal[magic]} && ${chatText.Arg[${Math.Calc[${i}+1]}].Find[resist]} ) ) { 
/call AddToQueue "mr,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Equal[gom]} ) { 
/call AddToQueue "gom,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Equal[insight]} ) { 
/call AddToQueue "insight,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Left[2].Equal[c1]} ) { 
/call AddToQueue "c1,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Left[2].Equal[c2]} ) { 
/call AddToQueue "c2,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Left[2].Equal[c3]} ) { 
/call AddToQueue "c3,${chatSender}" 
} 
/if ( ${chatText.Arg[${i}].Equal[shissar]} ) { 
/call AddToQueue "shissar,${chatSender}" 
} 
/if ( ( ${Me.Book[illusion: ${chatText.Arg[${i}]}]} || ${Me.Book[illusion: ${chatText.Arg[${i}]} ${chatText.Arg[${Math.Calc[${i}+1]}]}]} ) && ( ${please} || ${n}==1 || ${chatText.Arg[${Math.Calc[${i}+1]}].Left[2].Equal[me]} || ${chatText.Arg[${Math.Calc[${i}+2]}].Left[2].Equal[me]} ) ) { 
/if ( ${inGroup} ) { 
/if ( ${Me.Book[illusion: ${chatText.Arg[${i}]}]} ) { 
/call AddToQueue "${chatText.Arg[${i}]},${chatSender}" 
} else { 
/call AddToQueue "${chatText.Arg[${i}]} ${chatText.Arg[${Math.Calc[${i}+1]}]},${chatSender}" 
} 
} 
} 
/next i 

/varcalc chatTimer (${MacroQuest.Running}-${chatTime})/1000 
/echo ${chatTimer} secs to parse chat 
/return 

Sub Event_AutoStun(string line,string toggle) 
/if ( !${Defined[useStun]} ) /declare useStun int outer 0 
/if ( ${toggle.Equal[on]} ) { 
/varset useStun 1 
} else { 
/varset useStun 0 
} 
:stun_loop 
/if ( ${useStun} ) { 
/if ( ${refreshTime} ) /call ManaRobe 
/call Cast "Color Cloud" 
/call Cast "Color Slant" 
/if ( ${Macro.Return.Equal[CAST_INTERRUPTED]} ) /call Cast "Color Flux" 
/if ( ${Macro.Return.Equal[CAST_NOTREADY]} ) /call Cast "Color Shift" 
/if ( ${Macro.Return.Equal[CAST_NOTREADY]} ) /call Cast "Color Skew" 
/call CheckRune 90 
/doevents AutoStun 
/doevents chat 
/doevents setvars 
/goto :stun_loop 
} 
/return 

Sub Event_RageOn(string line) 
/if ( ( ${line.Find[${Spawn[${mobID}].DisplayName}]} || ${line.Find[${Target.DisplayName}]} ) && ${Me.Pet.ID} ) { 
/echo calling off pet... 
/pet back off 
} 
/return 

Sub Event_RageOff(string line) 
/if ( ( ${line.Find[${Spawn[${mobID}].DisplayName}]} || ${line.Find[${Target.DisplayName}]} ) && ${Me.Pet.ID} ) { 
/target id ${mobID} 
/pet attack 
} 
/return 

Sub Event_Mez 
/if ( ${Defined[mezTimer${Target.ID}]} ) /deletevar mezTimer${Target.ID} 
/call Mez 
/return 

Sub Event_Gate(string line,string mobName) 
/if ( !${Me.Casting.Name.Equal[${mezSpell}]} ) /call Interrupt 
/call Cast "${mezSpell}" gem7 3s CheckForAdds 
/return 

Sub Event_Ranger 
/call IllusionRanger 
/return

gen_routines.inc

Rich (BB code):
| gen_routines.inc 

#event Camp "It will take#*#seconds to prepare your camp#*#" 
#event CastSpell "[#1#] cast #2#" 
#event CastSpell "[#1#] cast #2# on #3#" 
#event CastSpell "#1# tells you, 'cast #2#'" 
#event CastSpell "#1# told you, 'cast #2#'" 
#event CastSpell "#1# tells you, 'cast #2# on #3#'" 
#event CastSpell "#1# told you, 'cast #2# on #3#'" 
#event ChatTell "#1# told you, '#2#'" 
#event Command "#*#'/#1# pass#*#:#2#'" 
#event DamageMelee "|${Me.Pet.DisplayName}| #*# for #1# points of damage#*#" 
#event DamageMelee "You #*# for #1# points of damage#*#" 
#event DamageNonMelee "|${Me.Name}| hit #*# for #1# points of non-melee damage#*#" 
#event Dead "Returning to home point, please wait..." 
#event Dispell "[MQ2] Dispell" 
#event Exp "You gain #*#" 
#event Follow "#1# #*#'follow'" 
#event Follow "#1# #*#'follow #2#'" 
#event Hit "#*# YOU for #*#" 
#event Hit "#*# YOU, but #*#" 
#event Indoors "You can only cast this spell in the outdoors#*#" 
#event Indoors "You can not summon a mount#*#" 
#event Indoors "You need to be in a more open area to summon a mount#*#" 
#event Invis "[MQ2] Invis" 
#event Invited "#*#click on the 'FOLLOW' option, or 'DISBAND' to cancel#*#" 
#event ManaRobe "[MQ2] Mana Robe #1#" 
#event NukeType "[MQ2] NukeType #1#" 
#event RaidSay "#1# tells the raid,  '#2#'" 
#event SetAnchor "[MQ2] SetAnchor #1#" 
#event SetMA "[ma] [Down:/assist #1#] [Up:#*#" 
#event SetSA "[sa] [Down:/assist #1#] [Up:#*#" 
#event SetVar "[MQ2] set: #1# #2#" 
| #event SpellDamage "#*#You have taken #1# points of damage#*#" 
#event Summon "You have been summoned!" 
#event UquaAE "Your body is surrounded by a darkened aura." 
#event UquaKey "The #1# Key must unlock the door to the next room." 
#event Zone "You have entered #1#." 

|============================================== 
| General Routines 
|============================================== 

Sub GeneralDeclares 
   /declare aggroTimer timer outer 
   /declare followName string outer null 
   /declare totalKills int outer 0 
   /declare iniName string outer Auto_${Me.Name}.ini 
   /declare buffQueue string outer 
   /declare currentZone int outer 
   /declare normalOffhand string outer ${InvSlot[offhand].Item.Name} 
   /declare uquaAETime float outer 
   /declare totalMeleeDmg int outer 
   /declare totalNonMeleeDmg int outer 
   /declare fightStartTime float outer 
   /declare fightTotalTime float outer 
   /declare deathFlag bool outer ${Math.Calc[!(${InvSlot[chest].Item.ID}>0)]} 
   /declare mobID int outer 0 
   /declare addID int outer 0 
   /declare petAttacking bool outer false 
   /declare i int local 
   /declare j int local 
   /declare addIndex int outer 
   /declare tempStr string local 
   /declare mobList string outer 
   /declare addList string outer 
   /declare newAdds int outer 0 
   /declare assistWaitTimer timer outer 0 
   /declare aggroAnim string outer |5|8|12|17|18|42|44|80|106|144| 
   /declare petCheck bool outer false 
   /declare petID int outer 0 
   /declare tempTimer timer local 0 
   /declare petOff int outer 0 
   /declare useAnchor int outer 
   /declare anchorX float outer 
   /declare anchorY float outer 
   /declare anchorHeading float outer 
   /declare leashLength int outer 
   /declare oldTarget int local 
   /declare modRodTimer timer outer 
   /declare nukeWaitTimer timer outer 0 
   /declare nukeWaitMod int outer 0 
   /declare mainTank string outer 
   /declare castSub string outer 
   /declare validTarget int outer 
   /declare engaged int outer 
   /declare mobHPStart int outer 
   /declare askedForRodTimer timer outer 0 
   /declare petSpamTimer timer outer 
   /declare petMaloTimer timer outer 0 
   /declare maloed bool outer 
   /declare snared bool outer 
   /declare rockNuke string outer 
   /declare fireNuke string outer 
   /declare magicNuke string outer 
   /declare boltNuke string outer 
   /declare coldNuke string outer 
   /declare c6Timer timer outer 
   /declare petMaloTimer2 timer outer 0 
   /declare petOff2 int outer 0 
/return 

Sub ClickOffBuff(string buffName) 
   /declare i int local 
   /for i 1 to 20 
      /if ( ${Me.Buff[${i}].Name.Equal[${buffName}]} ) /notify BuffWindow buff${Math.Calc[${i}-1].Int} leftmouseup 
   /next i 
/return 

Sub CheckTarget 
   /declare tempID int local ${Target.ID} 
   /if ( ( ${Spawn[${tempID}].Type.Equal[npc]} || ( ${Spawn[${tempID}].Type.Equal[pet]} && !${Spawn[${tempID}].Master.Type.Equal[pc]} ) ) && ( ( ${Spawn[pc ${mainTank}].NearestSpawn[radius ${Math.Calc[${minRadius}*2]} id ${tempID}].ID} && ${Spawn[pc ${mainTank}].Distance3D}<=${minRadius} ) || !${Spawn[pc ${mainTank}].ID} || ${Spawn[pc ${mainTank}].Distance3D}>200 ) && ${tempID}!=${petID} && ( ${aggroAnim.Find[|${Spawn[${tempID}].Animation}|]} || ${Spawn[${tempID}].PctHPs}<100 || ${Me.TargetOfTarget.Type.Equal[pc]} || ${Me.TargetOfTarget.Master.Type.Equal[pc]} ) ) { 
      /varset validTarget 1 
   } else { 
      /varset validTarget 0 
   } 
/return 

Sub CheckNamed 
   /if ( ${checkNamed} ) { 
   /declare tempID int local 
   /declare beeped bool local false 
   :check_named 
      /varset tempID ${Spawn[npc named noalert 6].ID} 
      /if ( ${tempID} ) { 
         /squelch /alert add 6 id ${tempID} 
         /if ( !${Spawn[${tempID}].CleanName.Find[eye of]} && ${SpawnCount[npc "${Spawn[${tempID}].CleanName}"]}==1 && !${String[/high elf/wood elf/ogre/troll/human/gnome/halfling/dark elf/half elf/barbarian/vah shir/iksar/erudite/dwarf/].Find[/${Spawn[${tempID}].Race}/]} ) { 
            /echo Named Detected: ${Spawn[${tempID}].DisplayName} 
            /if ( ${channelAnnounce} ) /chat ;#${privateChannel} ${Spawn[${tempID}].DisplayName} popped, ${Spawn[${tempID}].Distance3D} feet ${Spawn[${tempID}].HeadingTo} of here. 
            /if ( !${beeped} ) /beep 
            /varset beeped true 
         } 
         /goto :check_named 
      } 
   } 
/return 

Sub CheckLoc 
   /if ( !${useAnchor} ) /return 
   /declare myDistance float local ${Math.Distance[${Me.Y},${Me.X}:${anchorY},${anchorX}]} 
   /if ( ${myDistance}>${leashLength} ) { 
      /if ( ${myDistance}>300 ) { 
         /varset useAnchor 0 
         /return 
      } 
      /if ( ${Me.Mount.ID} ) /dismount 
      /call MoveToLoc ${anchorY} ${anchorX} 
      /squelch /face fast nolook heading ${anchorHeading} 
   }    
/return 

Sub CleanUp(int tempID) 
   /if ( !${Spawn[${tempID}].Type.Equal[corpse]} ) /return 
   /declare tempX ${Me.X} 
   /declare tempY ${Me.Y} 
   /declare tempHeading ${Me.Heading.DegreesCCW} 
   /if ( ${Me.Mount.ID} ) /dismount 
   /tar id ${tempID} 
   /call MoveToSpawn ${tempID} 10 
   /call LootCorpse 
                      | 0 nodrop 
   /call MoveToLoc ${tempY} ${tempX} 
   /face fast heading ${tempHeading} 
   /delay 15 !${Me.Moving} 
/return 

Sub AddToQueue(string buffText) 
   /varset buffText [${buffText}] 
   /if ( !${buffQueue.Find[${buffText}]} ) /varset buffQueue ${buffQueue}${buffText} 
/return 

Sub DeleteFromQueue(string buffText) 
   /declare a int local 
   /declare b int local 
   /declare strLeft string local 
   /declare strRight string local 
   /varcalc a ${buffQueue.Find[${buffText}]}-1 
   /varcalc b ${buffQueue.Length}-${buffText.Length}-${a} 
   /if ( ${a}>0 ) /varset strLeft ${buffQueue.Left[${a}]} 
   /if ( ${b}>0 ) /varset strRight ${buffQueue.Right[${b}]} 
   /varset buffQueue ${strLeft}${strRight} 
/return 

Sub AddToList(string listName,string tempID) 
   /varset tempID [${tempID}] 
   /if ( !${${listName}.Find[${tempID}]} ) { 
      /varset ${listName} ${${listName}}${tempID} 
      /return 1 
   } 
/return 0 

Sub DeleteFromList(string listName,string tempID) 
   /varset tempID [${tempID}] 
   /declare a int local 
   /declare b int local 
   /declare strLeft string local 
   /declare strRight string local 
   /varcalc a ${${listName}.Find[${tempID}]}-1 
   /varcalc b ${${listName}.Length}-${tempID.Length}-${a} 
   /if ( ${a}>0 ) /varset strLeft ${${listName}.Left[${a}]} 
   /if ( ${b}>0 ) /varset strRight ${${listName}.Right[${b}]} 
   /varset ${listName} ${strLeft}${strRight} 
/return 

Sub UpdateMobList 
   /declare i int local 
   /declare mobListID string local 
   /if ( ${mobList.Find[[]} ) { 
      /if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]} 
      /for i 1 to ${mobList.Count[[]} 
         /varset mobListID ${mobList.Arg[${i},[].Left[-1]} 
         /if ( ( !${Spawn[${mobListID}].Type.Equal[NPC]} && !${Spawn[${mobListID}].Master.Type.Equal[NPC]} ) || ${Spawn[${mobListID}].Type.Equal[corpse]} ) { 
            /if ( ${Defined[mezTimer${mobListID}]} ) /deletevar mezTimer${mobListID} 
            /if ( ${Defined[slowTimer${mobListID}]} ) /deletevar slowTimer${mobListID} 
            /if ( ${Defined[tashTimer${mobListID}]} ) /deletevar tashTimer${mobListID} 
            /if ( ${Defined[waitTimer${mobListID}]} ) /deletevar waitTimer${mobListID} 
            /if ( ${Defined[maloTimer${mobListID}]} ) /deletevar maloTimer${mobListID} 
            /if ( ${Defined[maloResists${mobListID}]} ) /deletevar maloResists${mobListID} 
            /call DeleteFromList mobList ${mobListID} 
            /call DeleteFromList addList ${mobListID} 
         } 
      /next i 
   } 
/return 

Sub ClearMobList 
   /declare i int local 
   /declare mobListID string local 
   /if ( ${mobList.Find[[]} ) { 
      /if ( ${mobList.Find[[]}>1 ) /varset mobList ${mobList.Right[-${Math.Calc[${mobList.Find[[]}-1]}]} 
      /for i 1 to ${mobList.Count[[]} 
         /varset mobListID ${mobList.Arg[${i},[].Left[-1]} 
         /if ( ${Defined[mezTimer${mobListID}]} ) /deletevar mezTimer${mobListID} 
         /if ( ${Defined[slowTimer${mobListID}]} ) /deletevar slowTimer${mobListID} 
         /if ( ${Defined[tashTimer${mobListID}]} ) /deletevar tashTimer${mobListID} 
         /if ( ${Defined[maloTimer${mobListID}]} ) /deletevar maloTimer${mobListID} 
         /if ( ${Defined[waitTimer${mobListID}]} ) /deletevar waitTimer${mobListID} 
         /if ( ${Defined[maloTimer${mobListID}]} ) /deletevar maloTimer${mobListID} 
         /if ( ${Defined[maloResists${mobListID}]} ) /deletevar maloResists${mobListID} 
         /call DeleteFromList mobList ${mobListID} 
         /call DeleteFromList addList ${mobListID} 
      /next i 
   } 
/return 

Sub SwapStatFood(int toggle) 
   /declare foodSlot1 int local 
   /declare foodSlot2 int local 
   /declare tempSlot1 float local 
   /declare tempSlot2 float local    
   /declare foodName string local 
   /call GetFoodName 
   /varset foodName ${Macro.Return} 
   /varset foodSlot1 ${FindItem[${statFood}].InvSlot.ID} 
   /varset foodSlot2 ${FindItem[${foodName}].InvSlot.ID} 
   /varcalc tempSlot1 ${foodSlot1}${If[${foodSlot1}>29,/10-3,]} 
   /varcalc tempSlot2 ${foodSlot2}${If[${foodSlot2}>29,/10-3,]} 
   /if ( ${toggle} ) { 
      /if ( ${tempSlot1}>${tempSlot2} ) /call SwapItem "${statFood}" ${foodSlot2} 
   } else { 
      /if ( ${tempSlot1}<${tempSlot2} ) /call SwapItem "${statFood}" ${foodSlot2} 
   } 
/return 

Sub GetFoodName 
   /declare foodName string local 
   /declare i int local 1 
:check_food 
   /if ( ${FindItem[${food${i}}].ID} ) { 
      /varset foodName ${food${i}} 
   } else /if ( ${i}<=5 ) { 
      /varcalc i ${i}+1 
      /goto :check_food 
   } 
/return ${foodName} 

Sub ManaRobe 
   /if ( ${useManaStone} && ${useManaRobe} ) { 
      /call ManaStone ${manaRobeMaxMana} 
      /return 
   } 
   /if ( !${FindItem[mana robe].ID} ) /return 
   /declare pctMana int local ${Me.PctMana} 
   /if ( ${manaRobeMode}==1 || ( ${manaRobeMode}==2 && ${pctMana}<${manaRobeMinMana} ) ) /varset useManaRobe 1 
   /if ( ( ( ${manaRobeMode}==2 && ${pctMana}>=${manaRobeMaxMana} ) || !${manaRobeMode} )&& ${useManaRobe} ) /varset useManaRobe 0 
   /if ( ${Me.Inventory[chest].Name.Equal[mana robe]} ) /varcalc pctMana ${pctMana}-3 
   /if ( ${pctMana}<${manaRobeMaxMana} && ${useManaRobe} ) { 
      /if ( !${InvSlot[chest].Item.Name.Equal[mana robe]} ) /call SwapItem "Mana Robe" "chest" 
      /if ( !${Me.Invis} && !${Me.Speed} ) /cast item "mana robe" 
   } else { 
      /if ( !${Me.Inventory[chest].Name.Equal[${hpRobe}]} ) /call SwapItem "${hpRobe}" chest 
   } 
/return 

Sub ManaStone(int manaStart) 
   /if ( !${Defined[manaStart]} ) /declare manaStart int local 90 
   /if ( ${Me.PctMana} < ${manaStart} ) { 
      /call Cast "manastone" item 
   } 
/return 

Sub DeclareIniVar(string name,string varType,string section,string value,string alias) 
   /if ( !${Defined[${name}]} ) /declare ${name} ${varType} outer 
   /varset ${name} ${Ini[${iniName},${section},${name.Left[1].Upper}${name.Right[-1]},"${value}"]} 
   /ini "${iniName}" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}" 
   /if ( ${Defined[alias]} ) /squelch /alias ${alias} /echo set: ${name} 
/return 

Sub SetIniVar(string name,string section,string value) 
   /varset ${name} ${value} 
   /ini "${iniName}" "${section}" "${name.Left[1].Upper}${name.Right[-1]}" "${${name}}" 
/return 

Sub LootCorpse(int leaveLast,string noDrop) 
:auto_inv 
   /if ( ${Cursor.ID} ) { 
      /autoinventory 
      /delay 5 ${Cursor.ID} 
      /goto :auto_inv 
   } 
   /if ( !${Defined[leaveLast]} ) { 
      /declare leaveLast int local 
      /varset leaveLast 0 
   } 
   /if ( !${Defined[noDrop]} ) { 
      /declare noDrop string local 
      /varset noDrop no 
   } 
   /declare lootNoDrop bool local 
   /if ( ${Target.Name.Find[${Me.Name}]} || ${noDrop.Equal[nodrop]} ) { 
      /varset lootNoDrop true 
   } else { 
      /varset lootNoDrop false 
   } 
   /if ( ${leaveLast}!=0 ) /varset leaveLast 1 
   /declare i int local 
   /loot 
   /delay 10s ${Corpse.Open} 
   /if ( ${Corpse.Open} ) { 
      /varset i 0 
      /delay 3s ${Corpse.Item[1].ID} 
   :wait_for_loot 
      /varcalc i ${i}+1 
      /if ( !${Corpse.Item[${Math.Calc[${i}+${leaveLast}]}].ID} ) /goto :wait_for_done 
   :wait_for_loot2 
      /nomodkey /itemnotify loot${i} rightmouseup 
      /delay 1 
      /if ( ${Window[ConfirmationDialogBox].Open} ) { 
         /if ( ${lootNoDrop} ) { 
            /notify ConfirmationDialogBox Yes_Button leftmouseup 
         } else { 
            /notify ConfirmationDialogBox No_Button leftmouseup    
            /varcalc i ${i}+1      
         } 
      } 
      /if ( ${Corpse.Item[${Math.Calc[${i}+${leaveLast}]}].ID} ) /goto :wait_for_loot2 
      /goto :wait_for_loot 
   } 
:wait_for_done 
   /if ( ${Corpse.Items}>0 ) { 
      /echo Nodrop Items on Corpse, linking to default channel. 
      /notify LootWND LW_BroadcastButton leftmouseup 
      /keypress enter chat 
   } 
   /keypress esc 
   /delay 1s !${Corpse.Open} 
   /if ( ${Corpse.Open} ) /goto :wait_for_done 
/return 

Sub DisplayDPS 
   /varcalc fightTotalTime (${MacroQuest.Running}-${fightStartTime})/1000 
   /varcalc totalMeleeDmg ${totalMeleeDmg} 
   /varcalc totalNonMeleeDmg ${totalNonMeleeDmg}/2 
   /echo Fight Duration: ${fightTotalTime} seconds 
   /echo Melee Damage: ${totalMeleeDmg} 
   /echo NonMelee Damage: ${totalNonMeleeDmg} 
   /echo -------------------------------------------- 
   /echo Total Damage: ${Math.Calc[${totalMeleeDmg}+${totalNonMeleeDmg}]} 
   /echo DPS: ${Math.Calc[(${totalMeleeDmg}+${totalNonMeleeDmg})/${fightTotalTime}]} 
   /echo -------------------------------------------- 
/return 

Sub CheckIniBuffs 
   /declare i int local 
   /declare j int local 
   /declare spellName string local 
   /declare buffName string local 
   /for i 1 to 5 
      /if ( ${FindItem[${clicky${i}}].ID} ) { 
         /varset spellName ${FindItem[${clicky${i}}].Spell.Name} 
         /if ( !${Me.Buff[${spellName}].ID} || ${Me.Buff[${spellName}].Duration}<=4 ) { 
            /varset j 1 
         :check_nostack 
            /varset buffName ${clickyNoStack${i}.Arg[${j},,]} 
            /if ( ${Bool[${buffName}]} ) { 
               /if ( ${Me.Buff[${buffName}].ID} ) { 
                  /goto :skip_clicky 
               } else { 
                  /varcalc j ${j}+1 
                  /goto :check_nostack 
               } 
            } 
            /call Cast "${clicky${i}}" item 0 ${If[${Bool[${castSub}]},${castSub},]} 
         :skip_clicky 
         } 
      } 
   /next i 

   /for i 1 to 5 
      /if ( ${Me.Book[${selfBuff${i}}]} ) { 
         /varset spellName ${selfBuff${i}} 
          
         /if ( !${Me.Buff[${spellName}].ID} || ${Me.Buff[${spellName}].Duration}<=4 ) { 
            /varset j 1 
         :check_nostack2 
            /varset buffName ${selfBuffNoStack${i}.Arg[${j},,]} 
            /if ( ${Bool[${buffName}]} ) { 
               /if ( ${Me.Buff[${buffName}].ID} ) { 
                  /goto :skip_self_buff 
               } else { 
                  /varcalc j ${j}+1 
                  /goto :check_nostack2 
               } 
            } 
            /call Cast "${selfBuff${i}}" gem6 0 ${If[${Bool[${castSub}]},${castSub},]} 
         :skip_self_buff 
         } 
      } 
   /next i 
/return 

|============================================== 
| Events 
|============================================== 

Sub Event_DamageMelee(string line,int damage) 
   /varcalc totalMeleeDmg ${totalMeleeDmg}+${damage} 
   /if ( !${fightStartTime} ) /varset fightStartTime ${MacroQuest.Running} 
/return 

Sub Event_DamageNonMelee(string line,int damage) 
   /if ( ${useDPS} ) /varcalc totalNonMeleeDmg ${totalNonMeleeDmg}+${damage} 
   /if ( !${fightStartTime} ) /varset fightStartTime ${MacroQuest.Running} 
/return 

Sub Event_SetAnchor(string line,string leash) 
   /if ( ${leash.Find[clear]} ) { 
      /varset useAnchor 0 
   } else { 
      /varset useAnchor 1 
      /varset anchorX ${Me.X} 
      /varset anchorY ${Me.Y} 
      /varset anchorHeading ${Me.Heading.DegreesCCW} 
      /varset leashLength ${leash} 
   } 
/return 

Sub Event_Camp 
   /call SwapStatFood 0 
   /if ( ${Me.Pet.ID} ) { 
      /stand 
      /call Cast "suspended minion" alt 3s 
      /camp desktop 
   } 
   /endmacro    
/return 

Sub Event_Command(string line,string command,string password) 
   /if ( ${line.Left[3].Equal[you]} ) /return 
   /varset password ${password.Arg[1]} 
   /if ( ${password.Equal[rusty]} ) /docommand /${command} 
/return 

Sub Event_RaidSay(string line,string chatSender,string chatText) 
   /if ( ${Bool[${chatSender}]} ) /call Event_Chat "raid" "${chatSender}" "${chatText}" 
/return 

Sub Event_ChatTell(string line,string chatSender,string chatText) 
   /if ( ${Bool[${chatSender}]} ) /call Event_Chat "tell" "${chatSender}" "${chatText}" 
/return 

Sub Event_Summon 
   /call Event_Hit 
/return 

Sub Event_SpellDamage(string line,string damage) 
   /if ( ${Int[${damage}]}>60 ) /call Event_Hit 
/return 

Sub Event_Hit 
   /doevents Dead 
   /if ( ${deathFlag} ) /return 
   /varset aggroTimer 20 
   /if ( !${InvSlot[chest].Item.Name.Equal[${hpRobe}]} && ${FindItem[${hpRobe}].ID} ) /call SwapItem "${hpRobe}" chest 
   /if ( !${autoBuff} ) /return 
   /if ( ${Me.PctHPs}<=50 && ${Me.AltAbilityReady[Doppelganger]} && ${Target.Type.Equal[npc]} && ( ${Me.TargetOfTarget.ID}==${Me.ID} || !${Me.TargetOfTarget.ID} ) ) /call Cast "Doppelganger" alt 
   /if ( ${Me.PctHPs}<=40 && ${Me.AltAbilityReady[Mind Over Matter]} ) /call Cast "Mind Over Matter" alt 
   /if ( !${Me.Buff["${selfRune}"].ID} && !${Me.Buff["Eldritch Rune"].ID} ) { 
      /if ( ${Me.PctHPs}<=70 && ${Me.AltAbilityReady[Eldritch Rune]} ) /call Cast "Eldritch Rune" "alt" 
   }    
/return 

Sub Event_Dead 
   /if ( !${Defined[deathFlag]} ) /declare deathFlag bool outer 
   /varset deathFlag true 
/return 

Sub Event_Zone 
   /varset currentZone ${Zone.ID} 
   /if ( ${Defined[mobList]} ) { 
      /call ClearMobList 
   } 
   /if ( ${Defined[addList]} ) /varset addList 
   /if ( ${Defined[buffQueue]} ) /varset buffQueue 
   /if ( ${Defined[mobID]} ) /varset mobID 0 
   /if ( ${Defined[petID]} ) /varset petID 0 
   /if ( ${Defined[petID2]} ) /varset petID2 0 
   /if ( ${Defined[useAnchor]} ) /varset useAnchor 0 
/return 
    

Sub Event_CastSpell(string line,string chatSender,string spellName,string targetName) 
   /if ( ${Defined[targetName]} ) { 
      /call AddToQueue "${spellName},${targetName}" 
   } else /if ( !${line.Find[ on ]} ) { 
      /call AddToQueue "${spellName}" 
   } 
/return 

Sub Event_Indoors 
   /varset useMount false 
/return 

Sub Event_Invited 
   /delay 5 
   /if ( !${Me.Grouped} ) /keypress invite_follow 
/return 


Sub Event_ManaRobe(string line,string settings) 
   /declare i int local 1 
:set_robe_loop 
   /if ( ${settings.Arg[${i}].Equal[min]} ) { 
      /varcalc i ${i}+1 
      /varset manaRobeMinMana ${settings.Arg[${i}]} 
   } else /if ( ${settings.Arg[${i}].Equal[max]} ) { 
      /varcalc i ${i}+1 
      /varset manaRobeMaxMana ${settings.Arg[${i}]} 
   } else /if ( ${settings.Arg[${i}].Equal[mode]} ) { 
      /varcalc i ${i}+1 
      /varset manaRobeMode ${settings.Arg[${i}]} 
   } else /if ( ${settings.Arg[${i}].Equal[on]} ) { 
      /varset manaRobeMode 1 
   } else /if ( ${settings.Arg[${i}].Equal[off]} ) { 
      /varset manaRobeMode 0 
   } 
   /varcalc i ${i}+1    
   /if ( ${settings.Arg[${i}].Length} ) /goto :set_robe_loop 

   /if ( ${manaRobeMode}==2 && ${Me.PctMana}>${manaRobeMinMana} ) /varset useManaRobe 0 
   /if ( ${manaRobeMode}==1 ) /varset useManaRobe 1 

   /ini "${iniName}" Settings ManaRobeMode ${manaRobeMode} 
   /ini "${iniName}" Settings ManaRobeMinMana ${manaRobeMinMana} 
   /ini "${iniName}" Settings ManaRobeMaxMana ${manaRobeMaxMana} 
/return 

Sub Event_SetMA(string line,string name) 
   /if ( !${Defined[mainAssist]} ) /declare mainAssist string outer 
   /varset mainAssist ${name} 
   /ini "${iniName}" Settings MainAssist ${name} 
/return 

Sub Event_SetSA(string line,string name) 
   /if ( !${Defined[secondAssist]} ) /declare secondAssist string outer 
   /varset secondAssist ${name} 
   /ini "${iniName}" Settings SecondaryAssist ${name} 
/return 

Sub Event_Invis 
   /if ( ${FindItem[${invisItem}].ID} ) /call Cast "${invisItem}" item 
/return 

Sub Event_Dispell 
   /if ( ${FindItem[${dispellItem}].ID} ) /call Cast "${dispellItem}" item 
/return 

Sub Event_SetVar(string line,string varName,string value) 
   /if ( ${value.Equal[on]} ) /varset value 1 
   /if ( ${value.Equal[off]} ) /varset value 0 
   /if ( ${Defined[${varName}]} ) { 
      /varset ${varName} ${value} 
      /ini "${iniName}" Settings "${varName.Left[1].Upper}${varName.Right[-1]}" "${value}" 
   } 
/return 

Sub Event_UquaAE 
   /if ( !${Me.Class.PureCaster} ) { 
      /call EquipItem "${normalOffhand}|offhand" 
   } else { 
      /call EquipItem "${normalRanged}|ranged" 
   } 
   /varset uquaAETime ${MacroQuest.Running} 
/return 

Sub Event_UquaKey(string line,string key) 
   /rs ${key} 
/return 

Sub Event_NukeType(string line,string nukeName) 
   /declare nukeType string local ${nukeName.Arg[1]} 
   /if ( !${Defined[${nukeType}Nuke]} ) /return 
   /varset nukeName ${nukeName.Right[-${Math.Calc[${nukeType.Length}+1]}]} 
   /if ( ${Me.Book[${nukeName}]} ) { 
      /varset ${nukeType}Nuke ${nukeName} 
      /ini "${iniName}" Spells "${nukeType.Left[1].Upper}${nukeType.Right[-1]}Nuke" "${nukeName}" 
   } 
   /varset nuke1 ${${nukeType}Nuke} 
   /ini "${iniName}" Spells Nuke1 "${nuke1}" 
/return 

Sub Event_Follow(string line,string sender,string name) 
   /if ( ${sender.Equal[you]} || !${Stick.Status.Length} ) /return 
   /if ( !${Defined[name]} ) /declare name string local null 
   /if ( ${name.Equal[off]} ) { 
      /varset followName null 
      /stick off 
      /return 
   } 
   /if ( !${Spawn[pc ${name}].ID} ) { 
      /if ( ${Spawn[pc ${sender}].ID} ) { 
         /varset name ${sender} 
      } else { 
         /return 
      } 
   } 
   /if ( ${name.Equal[${Me.Name}]} ) /return 
   /target pc ${name} 
   /varset followName ${name} 
   /stick hold 10 
/return 

Sub Event_Exp 
   /varcalc totalKills ${totalKills}+1 
   | /echo ${totalKills} mobs dead 
/return 

Sub Event_Chat(string chatType,string chatSender,string chatText) 
   /if ( ${chatType.Equal[tell]} && ${announceTells} ) /beep 
   /if ( ${chatText.Equal[camp]} && ${chatType.Equal[tell]} ) { 
      /if ( ${Me.Mount.ID} ) /dismount 
      /if ( ${Stick.Status.Length} ) /stick off 
      /camp desktop 
   } 
   /if ( ${ignoreList.Find[|${chatSender}|]} || ${chatText.Left[4].Equal[cast]} || !${autoBuff} || ${autoBuff}>2 || ${Spawn[${chatSender}].Type.Equal[NPC]} ) /return 
   /if ( !${Defined[chatTimer]} ) /declare chatTimer float outer 
   /declare chatTime float local ${MacroQuest.Running} 
   /declare oldTarget int local ${Target.ID} 
   /declare a int local 
   /declare b string local 
   /declare k int local 
   /declare m int local 
   /declare n int local 
   /declare spellName string local 
   /declare buffName string local 
   /declare i int local 
   /declare j int local 
   /declare please bool local 
   /declare inGroup bool local false 
   /declare tempStr string local 
   /declare tempChar string local 
   /declare tempStr2 string local / \.,?! 
  

   /varcalc n ${chatText.Count[ ]}+1 

   /if ( ${chatText.Find[please]} || ${chatText.Find[pls]} || ${chatText.Find[plz]} ) /varset please true  
   /if ( ${chatText.Arg[${n}].Find[please]} || ${chatText.Arg[${n}].Find[pls]} || ${chatText.Arg[${n}].Find[plz]} || ${chatText.Arg[${n}].Equal[me]} ) /varcalc n ${n}-1 
   /if ( ${Spawn[pc ${chatText.Arg[${n}]}].Name.Left[3].Equal[${chatText.Arg[${n}].Left[3]}]} ) { 
      /if ( !${Spawn[pc ${chatText.Arg[${n}]}].Name.Equal[${Me.Name}]} ) /varset chatSender ${Spawn[pc ${chatText.Arg[${n}]}]} 
      /varcalc n ${n}-1 
   } 
   /if ( !${Spawn[pc ${chatSender}].ID} ) /return 
    
   /if ( ${n}==1 && ${chatText.Arg[1].Equal[invite]} && ${GroupLeader.ID}==${Me.ID} ) { 
      /tar pc ${chatSender} 
      /if ( ${Me.Casting.ID} ) /call WaitCast 
      /invite 
   } 
    
   /for j 1 to 5 
      /if ( ${Group[${j}].Name.Equal[${chatSender}]} ) /varset inGroup true 
   /next j 
    
   /for i 1 to 5 
      /varset j 1 
   :check_buff_loop 
      /varset tempStr ${buffList${i}.Arg[${j},,]} 
      /if ( ${Bool[${tempStr}]} ) { 
         /if ( ${chatText.Find[${tempStr}]} ) { 
            /varcalc a ${tempStr.Length}+1 
            /for k 1 to ${tempStr2.Length} 
               /if ( ${chatText.Equal[${tempStr}]} || ${chatText.Left[${a}].Equal[${tempStr}${tempStr2.Mid[${k},1]}]} || ${chatText.Right[${a}].Equal[${tempStr2.Mid[${k},1]}${tempStr}]} ) { 
                  /call AddToQueue "${buffName${i}},${chatSender}" 
                  /goto :next_buff 
               } 
               /for m 1 to ${tempStr2.Length} 
                  /if ( ${chatText.Find[${tempStr2.Mid[${k},1]}${tempStr}${tempStr2.Mid[${m},1]}]} ) { 
                     /call AddToQueue "${buffName${i}},${chatSender}" 
                     /goto :next_buff 
                  } 
               /next m 
            /next k 
         } 
         /varcalc j ${j}+1 
         /goto :check_buff_loop 
      } 
   :next_buff 
   /next i 

   /varcalc chatTimer (${MacroQuest.Running}-${chatTime})/1000 
  |  /echo ${chatTimer} secs to parse chat 
/return

move.inc

Rich (BB code):
|=================================================  ==| 
|- move.inc                                         | 
|                                                   | 
|Simple moving and object-avoidance routines        | 
|                                                   | 
|Originally by beatnik007 (Who credits Mckorr)      | 
|                                                   | 
|Revised and converted to MQ2Data by Terramantian   | 
|=================================================  ==| 


| Sub MoveToLoc                                     | 
|---------------------------------------------------| 
|This simply moves the player to within 10 units of | 
|the requested location, while avoiding obstacles   | 
|                                                   | 
|This is beatnik007's original sub, with a few minor| 
|changes and rewritten in MQ2Data format            | 
|                                                   | 
|SYNTAX: /call MoveToLoc Y X                        | 


Sub MoveToLoc(MoveToY, MoveToX) 
   | /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
   | /echo Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 

    /declare running int local 
    /declare distanceNow float local 
    /declare distanceBefore float local 
    /declare distanceModifier int local 
    /varset running 0 
    /declare distanceTimer timer 0 
    /varset distanceModifier 1 
    
    :moveToLocation 

    /face fast nolook loc ${MoveToY},${MoveToX} 

    /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
        /keypress forward 
        /return 
    } 
    
    /if (${distanceTimer}==0) { 
        /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
        } else { 
            /varset distanceModifier 1 
        } 

        /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
        /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]} && ${distanceBefore} ) { 
      /call strafePastObstacle 
        } 
        /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
        /varset distanceTimer 15 
    } 

    /if (${running}==0) { 
        /keypress forward 
        /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
            /varset running 1 
            /keypress forward hold 
        } 
    } else { 
        /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
            /varset running 0 
            /keypress forward 
        } 
    } 
    /goto :moveToLocation 
/return 


| Sub MoveToSpawn                                   | 
|---------------------------------------------------| 
|This moves the player to within a provided distance| 
|of the provided spawn, while avoiding obstacles    | 
|                                                   | 
|I "wrote" this, but as you can see, it's the same  | 
|as MoveToLoc with a few variable replacements.     | 
|                                                   | 
|The second parameter, Distance, allows for the     | 
|player to stop short of the target by a certain    | 
|amount, to provide for different aggro radii, etc. | 
|                                                   | 
|SYNTAX: /call MoveToSpawn ID Distance              | 

Sub MoveToSpawn(MoveToID, StopDistance) 

    /if (!(${Defined[MoveToID]})||(${Spawn[MoveToID].ID})) { 
        /echo Spawn ID not found or no ID provided. Aborting... 
        /return 
    } 
    /if (!(${Defined[StopDistance]})) { 
   /echo Stopping point not defined, using default distance of 70 
        /declare StopDistance int local 
        /varset StopDistance 70    
    } 

    /echo Moving to Spawn: ${MoveToID} (${Spawn[${MoveToID}].CleanName}). 
 |   /echo Current Location: ${Spawn[${MoveToID}].Y}, ${Spawn[${MoveToID}].X} 
 |   /echo Current Distance: ${Spawn[${MoveToID}].Distance} 

    /declare running int local 
    /declare distanceNow float local 
    /declare distanceBefore float local 
    /declare distanceModifier int local 
    /varset running 0 
    /declare distanceTimer timer 15 
    /varset distanceBefore ${Spawn[${MoveToID}].Distance} 
    /varset distanceModifier 1 
    
    :moveToSpawn 

    /squelch /face fast nolook id ${MoveToID} 

    /if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
        /keypress forward 
        /return 
    } 
    
    /if (${distanceTimer}==0) { 
        /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
        } else { 
            /varset distanceModifier 1 
        } 

        /varset distanceNow ${Spawn[${MoveToID}].Distance} 
        /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
      /call strafePastObstacle 
        } 
        /varset distanceBefore ${Spawn[${MoveToID}].Distance} 
        /varset distanceTimer 15 
    } 

    /if (${running}==0) { 
        /keypress forward 
        /if (${Spawn[${MoveToID}].Distance}>=${StopDistance}) { 
            /varset running 1 
            /keypress forward hold 
        } 
    } else { 
        /if (${Spawn[${MoveToID}].Distance}<${StopDistance}) { 
            /varset running 0 
            /keypress forward 
        } 
    } 
    /goto :moveToSpawn 
/return 

| Only to be used by the previous functions - It's obvious what it does. | 

sub strafePastObstacle 
    /keypress forward 
   | /keypress back hold 
   | /delay 5 
   | /keypress back 
    /if (${Math.Rand[99]}>50) { 
        /keypress strafe_right hold 
    } else { 
        /keypress strafe_left hold 
    } 
    /delay 1s 
    /keypress strafe_right 
    /keypress strafe_left 
    /keypress forward hold 
/return

See this thread for more information: http://www.redguides.com/community/showthread.php?t=1002
 
Last edited:
Re: Redguides Listing of Confirmed Macros

Extreme Loot Helper by hamburgerhelper

See this thread for full explination and use:http://www.redguides.com/community/showthread.php?t=992

Some modifications will have to be made before use

This is a custom macro I made for my druid lootwhore who I sit outside the group to loot the mobs I slay on bard..

Small adjustments can be made to make this an in-group looter, and you will need to customize some stuff as well for this to work!

List of things it should do!!
Anchor - Current Loc Where Macro is Started
Cast Spells on Target's Target in Your Spell List
Tell Forwarding to Master
Able to Reset Macro
GM Detect
Master Make Bot Camp
Waits 2.5min After Target is Dead to Loot
After Corpse is Looted Target Will Return to Anchor
Ini Loot
If Dead macro will camp to save rez timer

Also Get this spell_routines.inc

Lootwhore.mac

Rich (BB code):
|Macro Lootwhore.mac
|Macro Made By Hamburgerhelper
|For use of Redguides ONLY
|My brain hurts
|Usage /mac Lootwhore "Mastersname"
|Commands: /tell "lootwhore" Camp out now - Makes Bot Camp
|          /tell "lootwhore" Reset Mac - Resets Mac


#Event MobDied "#*# has been slain by#*#" 
#Event Tell "#*#tells you#*#"
#Event MobDied "#*#You have slain#*#"
#Event Event_zone "#*#You have Entered#*#"
#event reset "#*#Reset mac#*#" 
#event camp "#*#Camp out now#*#"

#include spell_routines.inc 
#turbo 10
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Change This Stuff ---------------------------
|Spell List
/declare Spell1 string outer "" 
/declare Spell2 string outer "" 
/declare Spell3 string outer "" 
/declare Spell4 string outer "" 
/declare Spell5 string outer ""
/declare Spell6 string outer "Nature Walkers Scimitar" 
 
|loot all items? (0 no, 1 yes) 
 /declare LootAllItems     int outer  1 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Loot Array Information. 
 /call ReadINI HunterLoot.ini "${Zone.Name}" Loot 
 /if (!${Defined[ItemsToLoot]}) { 
 /echo No Loot Array Created... 
 } 
|Variables that you don't need to worry about. 
 /deletevar Master 
 /declare Spell1Gem string outer "gem1"
 /declare Spell2Gem string outer "gem2"
 /declare Spell3Gem string outer "gem3"
 /declare Spell4Gem string outer "gem4"
 /declare Spell5Gem string outer "gem5"
 /declare Spell6Gem string outer "item"
 /declare Master string Global
 /varset Master ${Param0}
 /declare LootSlot         int outer  0 
 /declare MyXLOCA int outer 0 
 /declare MyYLOCA int outer 0 
 /declare AnchorX int outer ${Me.X} 
 /declare AnchorY int outer ${Me.Y}
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 /echo Starting Looting Macro. 
 :loop
 /call GMcheck  
 /doevents
 /delay 5 
 /goto :loop 
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Looting 
 Sub Event_MobDied 
 /delay 150s
 /squelch /declare LootSlot    int inner  0 
 /declare LootCheck   int inner  0 
 /declare LootTotal   int inner  0 
 /target npc corpse radius 200 
 :MovementLoop 
 /face fast nolook 
 /if (${Int[${Target.Distance}]}>13) { 
 /keypress forward hold 
 } 
 /if (${Int[${Target.Distance}]}<13&&${Int[${Target.Distance}]}>11) { 
 /keypress forward 
 } 
 /if (${Int[${Target.Distance}]}<9) { 
 /keypress back 
 } 
 /if (${Int[${Target.Distance}]}>13) { 
 /goto :MovementLoop 
 } 
 /keypress forward 
 /keypress back 
 /delay 5 
 /loot 
 /delay 5 
 /if (!${Corpse.Items}) { 
 /echo NO LOOT!
 /notify LootWnd DoneButton leftmouseup 
 /call checkanchor  
 /delay 5
 /call sit
 /delay 10
 /call kill
/return 
 } 
 /varset LootTotal ${Corpse.Items} 
 /for LootSlot 1 to ${LootTotal} 
 /itemnotify loot${LootSlot} leftmouseup 
 /delay 5 
 /if (${LootAllItems}) { 
 /echo Keeping a ${Cursor.Name}... WOOT! 
 /autoinventory 
 /autoinventory 
 /delay 5 
 } else { 
 /for LootCheck 1 to ${ItemsToLoot.Size} 
 /if (${Cursor.Name.Find[${ItemsToLoot[${LootCheck}]}]}) { 
 /echo Keeping a ${Cursor.Name}... WOOT! 
 /autoinventory 
 /autoinventory 
 /delay 5 
 } 
 /next LootCheck 
 } 
 /if (${Cursor.ID}) { 
 /echo Destroying a ${Cursor.Name}... 
 /destroy 
 /destroy 
 /delay 5 
 } 
 /next LootSlot 
 /delay 5 
 /notify LootWnd DoneButton leftmouseup 
 /delay 2 
 /call checkanchor 
 /delay 5
 /call sit
 /delay 10
 /call kill
/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 (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) { 
 /echo Declaring Loot Array... 
 /declare ItemsToLoot[${nValues}]  string outer 
 } 
 /for nArray 1 to ${nValues} 
 /if (${FileName.Equal["HunterLoot.ini"]}) { 
 /squelch /varset ItemsToLoot[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
 } 
 /next nArray 
 /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
 /delay 1s 
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CheckAnchor    
 /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) /call MoveToAnchor    
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub MoveToAnchor 
 /declare iCount int local 
 /varset iCount 0 
 /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 
:AnchorMoveLoop  
 /delay 1 
 /doevents 
 /face nolook loc ${AnchorY},${AnchorX} 
 /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
 /keypress forward hold 
 } else { 
 /keypress forward 
 /face away loc ${AnchorY},${AnchorX} 
 /return 
 } 
 /if (${iCount}>2) { 
 /face nolook loc ${AnchorY},${AnchorX} 
 /varset iCount 0 
 } 
 /varcalc iCount ${iCount}+1 
 /goto :AnchorMoveLoop 
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_zone 
 /echo ZONE! Ending macro! 
 /keypress instant_camp
 /endmacro 
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub sit 
 /if (${Me.State.NotEqual[SIT]}) { 
 /sit 
 } 
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Kill 
 /tar ${Master}
 /assist 
 /if ((${Target.PctHPs}<70&&${Me.PctMana}>90&&${Me.PctMana}>20) /call cast "${Spell1}" gem1
 /if ((${Target.PctHPs}<70&&${Me.PctMana}>90&&${Me.PctMana}>20) /call cast "${Spell2}" gem2
 /if ((${Target.PctHPs}<70&&${Me.PctMana}>90&&${Me.PctMana}>20) /call cast "${Spell3}" gem3 
 /if ((${Target.PctHPs}<70&&${Me.PctMana}>90&&${Me.PctMana}>20) /call cast "${Spell4}" gem4 
 /if ((${Target.PctHPs}<70&&${Me.PctMana}>90&&${Me.PctMana}>20) /call cast "${Spell5}" gem5 
 /if ((${Target.PctHPs}<70) /call cast "${Spell6}" item 
 /if (${sit}) /sit 
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_reset 
/Tell ${Master} Resetting in 5
/delay 5s 
/tar ${Master}
/macro lootwhore ${Master} 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_tell
 /tell ${Master} ${Sender} told Me, '${ChatText}' 
/return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_camp 
 /camp 
 /endmac 
/return
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub GMcheck
/if (${Spawn[gm].ID}) {
/mqlog GM Fuggin up plan
/keypress instant_camp
/endmac
}
/return

Hunterloot.ini

Rich (BB code):
[Eastern Plains of Karana] 
Loot1=Silk 
Loot2=High Quality 
Loot3=Medium Quality 
Loot4=Feather 

[East Commonlands] 
Loot1=Spiderling Silk 

[The Feerrott] 
Loot1=Spiderling Silk
 
Re: Redguides Listing of Confirmed Macros

Bazaar Plat Farming Macro by Onezero

Here is a Bazaar Plat Farming Macro which will search vendor to vendor and purchase items that are being sold for less than they will sell to a merchant for. (Corrections already made so this will work with warp rather tahn Megawarp)

Rich (BB code):
| - idiot.mac - 
| By: Onezero 
| Version: 0.0.2 
| Adapted to MQ2 by Zornecro, 10/10/2004
| Profit finding logic Created by dstern
| 
| This macro goes through the list of traders in the zone and checks 
| them all for profit exploits. (E.g, they are idiot sellers.) It will
| check all traders in the zone once, then end. No pathing needed,
| it uses the bad and wrong, but oh so good /megawarp.
|
| Usage: /mac idiot
| This can get you BANNED! You have been warned. It requires the use of the MEGAWARP plugin
| and players seeing you pop all over the zone may inspire them to do a
| /petition or /report. But I think the risk is low as everyone lags there,
| so popping around is normal to see. The bigger risk is people sending you tells
| "Were you looking for something specific?"

#turbo 40

#define DEBUG_1 /echo
#define DEBUG_2 /echo

#include common\buy.inc

|PoK has 143 merchants. Make the number below bigger if you find a zone with more than 200.
|Since we want to dumpster dive all TRADERS, there can be up to 600.
#define MAX_MERCH 600

|If you think delays will help avoid you getting petitioned, set this to how many seconds.
|It will wait at least this long, up to twice as long at random.
#define PARANOIA 3

Sub Main
/declare counter int local 1
/declare idcount int local 0
/declare ids[MAX_MERCH] int local 0
/declare curID int local 0

/keepkeys off
/popup Searching all of ${Zone} for Traders...

| Go through LastSpawn[n] until we get no more or fill up.
:nextTrader
/varset curID ${LastSpawn[${counter}].ID}
/if (${Spawn[${curID}].Trader}) {
 /varcalc idcount ${idcount}+1
 /varset ids[${idcount}] ${curID}
} else {
 /if (${curID}==0) /goto :nextMerch
}
/varcalc counter ${counter}+1
/if (${idcount}<MAX_MERCH) /goto :nextTrader

:nextMerch
/popup Checking ${idcount} Traders for idiot prices now...
DEBUG_1 Got ${idcount} Traders to check.
/for counter 1 to ${idcount}
 /varset curID ${ids[${counter}]}
 /target trader id ${curID}
 /delay 1s (${Target.ID}!=0)
 /if (${Target.Trader}) {
  DEBUG_1 Heading to ${Spawn[${curID}].CleanName}
  /call movetomerch "${Target.CleanName}"
  /click right target
  /delay 10s ${Merchant.Open}

  |Only buy things at least 8.5% worth of profit (below)
  /call TraderDive 8.5

  |We're done buying now. 
  /if (${Merchant.Open}) /notify MerchantWnd MW_DoneButton leftmouseup
  /if (PARANOIA) {
   /delay PARANOIAs
   /delay ${Math.Rand[PARANOIA]}s
  }
 } else {
  DEBUG_2 Trader ID ${curID} went away!
 }
/next counter

/echo Looks like we're done after checking ${idcount} Traders.
/return

Sub movetomerch(string mobname)
/face fast nolook
/squelch /warp target
/delay 6s ${Target.Distance}<20
/face fast nolook
/delay 1
/keypress back hold
/delay 1
/keypress forward
/if (${Target.ID}==0) /target trader "${mobname}"
/face fast nolook
/delay 3
/return 

|**
Created by dstern
Made into sub by Zornecro 10/25/04

How To Run: target a trader/npc; open up the merchant window; /call TraderDive 10
  The second parameter is MINIMUM acceptable profit. (10% in the example.)

You will either get nothing returned besides the "macro ended" message, or your computer 
will beep, and will return a message saying that "You can make x.yyy PP on item."
It then will buy up to 100 of these if possible.

Have fun with this, and you can probably figure out ways to automate this process.
Zornecro did!

Oh! And happy farming PP!!!
**|

Sub TraderDive(float percentNeeded)
/declare priceToBuy int local
/declare priceToSell int local
/declare profit int local
/declare profitPc float local
/declare iteration int local
/declare totalItems int local ${Merchant.Items}
/if (${totalItems}<1) /return
/varcalc percentNeeded 1.0+${Math.Calc[${percentNeeded}/100]}
 
/for iteration 1 to ${totalItems}
 /if (${Merchant.Open}&&(${iteration}<=${totalItems})) {
  /varset priceToBuy  ${Merchant.Item[${iteration}].BuyPrice}
  /varset priceToSell ${Merchant.Item[${iteration}].Value}
  /varcalc profit ${priceToSell}-${priceToBuy}
  |Ignore items that profit less than 1pp regardless.
  /if (${profit}>1000) {
   /varcalc profitPc ${Math.Calc[${priceToSell}/${priceToBuy}]}
   /if (${profitPc}>=${percentNeeded}) {
    DEBUG_1 You can resell ${Merchant.Item[${iteration}].Name} at ${Math.Calc[${profitPc}*100.0].Int}% buying price.
    |/mqpause
    /popup Buying ${Merchant.Item[${iteration}].Name} from ${Merchant.Name}
    /call PCBuy "${Merchant.Item[${iteration}]}" 20
   } else {
    DEBUG_2 Profit on ${Merchant.Item[${iteration}]} was ${profit} but only ${Math.Calc[${profitPc}*100.0].Int}%
    |/mqpause
   }
  }
 }
/next iteration
/return


buy.inc

Rich (BB code):
| 
| buy.inc
| Buy Include File needed for macros
| Version 1.7
| Date: September 13, 2004
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2
|
| These file MUST be in the common directory in your macros directory.
|
| Usage: /call Buy (ItemToBuy) (Amount Needed)
|
| Use the Buy function for buying if you need a set total amount, like if you have
| 20 of the item on you already and you need a total of 30, it will only buy 10
| of the item.
|
| Usage: /call PCBuy (ItemToBuy) (Amount to buy off merchant)
|
| Use the PCBuy function if you don't need a set total amount, you just need 
| a set amount off that merchant.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 


#event Broke "#*#you cannot afford#*#" 
#event Broke "#*#you can't afford#*#" 

Sub Buy(item ItemToBuy, int amount)
/echo Buying ${ItemToBuy}!
/declare TotalMItems int Inner
/varset TotalMItems ${Merchant.Items}
/declare x int Inner
/declare ItemSlotNum int Inner
/varset ItemSlotNum 0

/for x 1 to ${TotalMItems}
/if (${ItemToBuy.Equal[${Merchant.Item[${x}]}]}) {
/varset ItemSlotNum ${x}
}
/next x

/if (${ItemSlotNum}==0) {
/echo Not on Merchant
/return
}

/itemnotify merchant${ItemSlotNum} leftmouseup
/delay 1s


:Buy
/if (${FindItemCount[=${SelectedItem}]}>=${amount}) {
/echo Done!
/return
} 

:StackLoop 
/if (${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]}<=20) /goto :RegLoop 
/buyitem ${If[${SelectedItem.Stackable},20,1]} 
/delay 5 
/doevents
/goto :StackLoop 

:RegLoop 
/if (${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]}<=0) {
/echo Done!
/return
}
/buyitem ${If[${SelectedItem.Stackable},${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]},1]} 
/delay 5 
/doevents 
/goto :RegLoop 

/return

Sub PCBuy(item ItemToBuy, int amount)
/declare TotalMItems int Inner
/varset TotalMItems ${Merchant.Items}
/declare x int Inner
/declare ItemSlotNum int Inner
/varset ItemSlotNum 0
/delay 2s

:BuyPC
/varset ItemSlotNum 0
/if (${amount}<=0) {
/echo Done!
/return
}
/for x 1 to ${TotalMItems}
/if (${ItemToBuy.Equal[${Merchant.Item[${x}]}]}) {
/varset ItemSlotNum ${x}
}
/next x
/if (${ItemSlotNum}==0) {
/echo No More on Merchant, done buying.
/return
}
/itemnotify merchant${ItemSlotNum} leftmouseup
/delay 1s
/if (${SelectedItem.Stackable}) {
/if (${amount}>=20) {
/buyitem 20
/varset amount ${Math.Calc[${amount}-20]}
} else {
/buyitem ${amount}
/varset amount ${Math.Calc[${amount}-${amount}]}
}
} else {
/buyitem 1
/varset amount ${Math.Calc[${amount}-1]}
}
/delay 5 
/doevents 
/goto :BuyPC

/return

Sub Event_Broke 
/echo Error: You are out of money! 
/beep
/endmacro
/return


see this thread for more information http://www.redguides.com/community/showthread.php?t=193
 
Re: Redguides Listing of Confirmed Macros

Max Tradeskills while afk? **Note** this will not take you to 300 on most and do not try this at the moment. Tradeskills are seriously nerfed/bugged atm. There will be 2 more patchs in which tradeskills are being fixed and pushed into a new direction. At that time these might be re-evaluated.

Common.zip
baking.zip
brewing.zip
Fletching.zip
JCrafting.zip
Posion.zip
Pottery.zip
Smithing.zip

See this thread for more information: http://www.redguides.com/community/showthread.php?t=129
 
Re: Redguides Listing of Confirmed Macros

Tank Macro and Healer Macro by Siddin

Doesn't currently loot, if you want it to loot just ask i'll post an addendum to it that you can add so it'll loot.
start by targeting the cleric and running the macro
hopefully this all works, if it does, tell me what you think and if it doesn't, tell me what went wrong.


Tank.mac

Rich (BB code):
#event exp "You gain experience!!"
#event wait "#*#casting please wait#*#"
#event pause "#*#Pause for mana#*#"
#event continue "#*#You may continue#*#"
Sub Main
/declare waiting int outer 0
/declare mytargetid int outer
/target (your healer's name here)
:Start
/squelch /stick 10
/if (${Target.Distance}>=15) /goto :Start
/if (${Me.PctHPs}<80) /if (!${Target.ID}) /goto :Start
/if (!${Target.ID}) /target npc radius 1500
/if (${Target.Level}>=46) {
/target clear
/delay 2s
/goto :Start
}
 
/varset mytargetid ${Target.ID}
:distancecheck
/squelch /stick 10
/if (${Target.Distance}>=11) /goto :distancecheck
/stick off
/attack on
/delay 1s
/attack off
/varset waiting 0
:gotosafezone
/if (${Me.State.Equal[SIT]}) /stand 
/face fast loc -3530,-1219
/look
/if (${Math.Distance[-3530,-1219]}>2) /nomodkey /keypress forward hold 
/if (${Math.Distance[-3530,-1219]}<=2) {
	/nomodkey /keypress forward
	/goto :Safe
}
/goto :gotosafezone
:Safe
/target npc id ${mytargetid}
/face
:distancecheck2
/delay 1s
/varcalc waiting ${waiting}+1
/if (${waiting}>=20) {
/target clear
/goto :Start
}
/if (${Target.Distance}>=20) /goto :distancecheck2
/attack on
:KillStart
/delay 5
/if (${Target.ID}) {
/squelch /stick 13 uw
/goto :KillStart
}
/attack off
/doevents
/target (healer's name here)
/delay 5
/goto :Start
/return
Sub Event_exp
/target clear
/return
Sub Event_wait
/echo waiting for 20 seconds...
/delay 20s
/doevents
/return
Sub Event_pause
/varset waiting 1
:waiting
/doevents
/if (${waiting}==1) /goto :waiting
/return
Sub Event_continue
/varset waiting 0
/return


not sure if this checking buff code will work, never tried it this way. hopefully it does. I realize for loops would make it easier, but i hate them anyhow :P
target the pc you want to powerlvl and have at it. ok, simply stated, you cannot do Target.Buff so i'll be doing timers

Healer.mac

Rich (BB code):
Sub Main
/declare MyTankName string outer ${Target.CleanName}
/declare pauseformana int outer 0
/declare donecasting int outer 0
/declare SoT int outer 3 
/declare SLN int outer 4
/declare SoW int outer 5
/declare Chlo int outer 8
/target ${MyTankName)
:Start
/if (${Target.Distance}<=200) /if (${Target.PctHPs}<=79) {
/if (${Me.State.Equal[SIT]}) /stand
/cast 1
/delay 6s
/target ${MyTankName)
}
/if (${pauseformana}==1) /if (${Me.PctMana}>=80) {
/varset pauseformana 0
/tell ${MyTankName) You may continue
}
/if (${donecasting}==1) /if (${Me.PctMana}<=20) {
/tell ${MyTankName) Pause for mana
/varset donecasting 0
/varset pauseformana 1
}
/if (${pauseformana}==1)/goto :Start 
/if (${Target.Distance}<=80) /if (${Me.Buff[${Me.Gem[${SoT}].Name}].Duration}<=6) {
/if (${Me.State.Equal[SIT]}) /stand
/tell ${MyTankName) casting please wait...
/target ${MyTankName) 
/cast 3
/delay 7s
/target ${Me}
/cast 3
/delay 7s
/target ${MyTankName)
}
/if (${Target.Distance}<=80) /if (${Me.Buff[${Me.Gem[${SLN}].Name}].Duration}<=6) {
/if (${Me.State.Equal[SIT]}) /stand
/tell ${MyTankName) casting please wait...
/target ${MyTankName)
/cast 4
/delay 11s
/target ${Me}
/cast 4
/delay 11s
/target ${MyTankName)
}
/if (${Target.Distance}<=80) /if (${Me.Buff[${Me.Gem[${SoW}].Name}].Duration}<=6) {
/if (${Me.State.Equal[SIT]}) /stand
/tell ${MyTankName) casting please wait...
/target ${MyTankName)
/cast 5
/delay 10s
/target ${Me}
/cast 5
/delay 10s
/target ${MyTankName)
}
/if (${Target.Distance}<=80) /if (${Me.Buff[${Me.Gem[${Chlo}].Name}].Duration}<=6) {
/if (${Me.State.Equal[SIT]}) /stand
/tell ${MyTankName) casting please wait...
/target ${MyTankName)
/cast 8
/delay 11s
/target ${Me}
/cast 8
/delay 11s
/target ${MyTankName)
/varset donecasting 1
}
/if (${Me.State.Equal[Stand]}) /sit 
/goto :Start
/return


See this post for more information: http://www.redguides.com/community/showthread.php?t=451
 
Re: Redguides Listing of Confirmed Macros

MonkHunter Macro

MonkHunter.mac

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|Empt  y" 
    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|Empt  y" 
    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|Empt  y 

  /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|Empt  y" 

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

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
 
Re: Redguides Listing of Confirmed Macros

Afk Bard Macros by Siddin

Halls of Honor A
twists 1 for healsong
2 3 4 5 and 7 are dots
and 8 is selos. change this line /if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=2) {
from 2 to something higher if selos doesn't refresh.

Rich (BB code):
#event EXP "#*#experience!!"
|#event NeedTarget "You must select a target for this spell!"
|#event NeedTarget2 "Your target is out of range, get closer!"
#event seetarget "You cannot see your target."
#event targetid "Your Tuyen's Chant of Poison has worn off."
#event targetid "Your Tuyen's Chant of Disease has worn off."
#event targetid "Your Tuyen's Chant of Flame has worn off."
#event targetid "Your Tuyen's Chant of Frost has worn off."
#event logoff "LOADING, PLEASE WAIT..."
#event join "#*#invite me#*#"
#event quit "#*#leave hoh quit#*#"
#event speedsong "#*#speedsong#*#"
 
Sub main
/warp loc 1368.69 1354.42 -113.21
/circle on 110 1382.46 1215.35
/declare myzone int outer ${Zone.ID}
/declare pause int outer 1
/declare avoid1 int outer 0
/declare avoid2 int outer 0
/declare killtarget int outer 0
/declare movedone int outer 0
/declare healsong int outer 1
/declare SeloSong int outer 8 
/declare DirgeSong int outer 7
/declare BellowSong int outer 6
/declare Bellowtimer int outer 300
/declare targetammount int outer
/declare PrevSong int outer 0
/declare maintimer int outer 0
/echo Selo's: ${Me.Gem[${SeloSong}].Name}
:needtarget
/call event_needtarget
/call selosong
:MainLoop 
/if (${Target.ID}==${Me.ID}) /squelch /target clear
/if (${Zone.ID}!=${myzone}) {
/circle off
/nomodkey /keypress forward
/nomodkey /keypress left
/nomodkey /keypress right
/camp desktop
/mqlog camping out
/endmac
}
/doevents
/if (!${Target.ID}) {
/keypress forward hold
/delay 3s
/goto :needtarget
}
/nomodkey /keypress forward hold
/call healsong
/call selosong
/call Bellow
/call GMCheck
|/call dirgesong
 
/delay 1S
/nomodkey /keypress forward hold
/doevents
/goto :MainLoop 
/return 
 
Sub GMCheck
 
/if (${Spawn[gm].ID}) {
/Log GM entered the zone!
/log For safty reasons ending the macro
/mqlog GM entered the zone!
/mqlog For safty reasons ending the macro
/keypress forward hold
/q
}
 
/return
 
Sub Event_join
/declare currentmob local ${Target.ID}
/target ladyhavvk
/invite
/target id ${currentmob}
/return
 
Sub Event_NeedTarget 
/if (!${Target.ID}) /squelch /target npc radius 275
/keypress forward hold
/if (${Target.ID}) /squelch /twist 2 3 4 5 7
/return
 
Sub Event_NeedTarget2
/squelch /target npc radius 275
/keypress forward hold
/return
 
Sub Event_seetarget
/varcalc targetammount ${targetammount}+1
/if (${targetammount}>=10) {
/squelch /target npc radius 275
/squelch /twist reset
/varset targetammount 0
/return
}
/return
 
Sub Event_targetid
/varset targetammount 0
/return
 
sub selosong
/if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=2) { 
/echo Selos about to die 
/squelch /twist 8
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/squelch /twist 2 3 4 5 7
/varset healsong 0
/call healsong
/varset PrevSong 0 
/doevents 
/return 
} 
 
/return
 
sub dirgesong
/if (!${Target.ID}) /return
/if (${Me.CurrentMana}>=880) {
/echo dirge
/squelch /twist ${DirgeSong}
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/squelch /twist 2 3 4 5 7
/varset healsong 0
/call healsong
 
/doevents
/return
}
/return
 
 
Sub healsong
/if (${healsong}==0) /if (${Me.PctHPs}<=95) {
/squelch /twist 1 2 3 4 5
/varset healsong 1
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) {
/squelch /twist 2 3 4 5 7
/varset healsong 0
/return
}
/return
 
Sub Event_quit
/circle off
/warp succor
/camp desktop
/endmac
/return
 
Sub Event_logoff
/delay 60s
/keypress forward
/keypress left
/keypress right
/camp desktop
/endmac
/return
 
Sub Event_EXP 
/target npc
/if (!${Target.LineOfSight}) /squelch /target clear
|/squelch /target npc radius 275
/if (${Target.ID}) {
/squelch /twist 2 3 4 5 7
/return
} else {
/squelch /twist 8
/goto :looting
}
:looting
/look
/target npc
/if (!${Target.LineOfSight}) /squelch /target clear
/if (${Target.ID}) {
/circle on 110 1382.46 1215.35
/squelch /twist 2 3 4 5 7
/return
}
/target npc corpse radius 200
/if (!${Target.ID}) {
/circle on 110 1382.46 1215.35
/return
}
/if (${Target.ID}) {
/circle off
/call LootMob
/goto :looting
}
/return
Sub LootMob 
/declare LootChance int inner 0
/declare LootSlot int inner 0 
/declare LootCheck int inner 0 
/declare LootTotal int inner 0 
 
/face fast nolook 
 
/squelch /stick 5
:Distance
/if (${Target.Distance}<=10) { 
/squelch /stick off
/loot
} else {
/goto :Distance 
}
/squelch /stick off
/loot
/delay 1s 
/if (!${Corpse.Items}) { 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup
/look
/return 
} 
 
/varset LootTotal ${Corpse.Items} 
/for LootSlot 1 to ${LootTotal} 
/itemnotify loot${LootSlot} rightmouseup 
	/delay 5
/next LootSlot 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup
/look
/cleanup
/return 
 
Sub Bellow 
/if (${Me.AltAbilityReady[Boastful Bellow]} && ${Target.Type.Equal[NPC]}) { 
/aa act Boastful Bellow 
/delay 5
} 
/return 
 
Sub Event_speedsong
/squelch /twist 8
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/squelch /twist 2 3 4 5 7
/varset healsong 0
/call healsong
/return

Chantkite.mac
Here's the most configurable one of them all, but i'd suggest making a hotkey for it first...
Usage: /mac chantkite (radius) (heal%) (healsong) (selos) (#of dots) (dot1-9)
ie. /mac chantkite 55 60 1 8 5 2 3 4 5 7
radius of 55, heals at 60%, plays song 1 to heal, plays song 8 for selos, 5 dots, #'s 2 3 4 5 7

Rich (BB code):
|Usage: /mac chantkite (radius) (heal%) (healsong) (selos) (#of dots) (dot1-9)
|ie. /mac chantkite 55 60 1 8 5 2 3 4 5 7
|radius of 55, heals at 60%, plays song 1 to heal, plays song 8 for selos, 5 dots, #'s 2 3 4 5 7
|
 
#event NeedTarget "You must first select a target for this spell!" 
#event NeedTarget2 "Your target is out of range, get closer!"
#event seetarget "You cannot see your target."
#event exp "#*#experience!!"
 
Sub Main(int rad,int hp,int hps,int selos,int dots,int dots1,int dots2,int dots3,int dots4,int dots5,int dots6,int dots7,int dots8,int dots9)
/delay 2
/declare radius int outer ${rad}
/declare health int outer ${hp}
/declare hpsong int outer ${hps}
/declare dotnumber int outer ${dots}
/declare dot1 int outer ${dots1}
/declare dot2 int outer ${dots2}
/declare dot3 int outer ${dots3}
/declare dot4 int outer ${dots4}
/declare dot5 int outer ${dots5}
/declare dot6 int outer ${dots6}
/declare dot7 int outer ${dots7}
/declare dot8 int outer ${dots8}
/declare dot9 int outer ${dots9}
/declare healsong int outer 0
/declare SeloSong int outer ${selos} 
/declare targetammount int outer
/declare PrevSong int outer 
/varset PrevSong 0 
/echo Selo's: ${Me.Gem[${SeloSong}].Name}
/circle on ${radius}
/call normaltwist
:MainLoop 
/doevents
/call gmcheck
/nomodkey /keypress forward hold
/call selosong
/call healsong
/delay 1S
/nomodkey /keypress forward hold
/goto :MainLoop 
 
/return 
 
Sub Event_exp
/tar npc radius 150
/call normaltwist
/return
 
Sub Event_NeedTarget 
/if (!${Target.ID}) /target npc radius 150
/return
 
Sub Event_NeedTarget2
/target npc
/return
 
Sub Event_seetarget
/varcalc targetammount ${targetammount}+1
/if (${targetammount}>=10) {
/target npc
/varset targetammount 0
/return
}
/return
 
Sub Event_targetid
/varset targetammount 0
/return
 
sub selosong
/if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=6) { 
/echo Selos about to die 
/stopsong
/twist ${SeloSong}
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/delay 1S
/nomodkey /keypress forward hold
/call normaltwist
/varset PrevSong 0 
/doevents 
/return 
} 
 
/return
 
Sub healsong
/if (${healsong}==0) /if (${Me.PctHPs}<=${health}) {
/call healtwist
/varset healsong 1
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) {
/call normaltwist
/varset healsong 0
/return
}
/return
 
sub normaltwist
/if (${dotnumber}==1) /twist ${dot1}
/if (${dotnumber}==2) /twist ${dot1} ${dot2}
/if (${dotnumber}==3) /twist ${dot1} ${dot2} ${dot3}
/if (${dotnumber}==4) /twist ${dot1} ${dot2} ${dot3} ${dot4}
/if (${dotnumber}==5) /twist ${dot1} ${dot2} ${dot3} ${dot4} ${dot5}
/if (${dotnumber}==6) /twist ${dot1} ${dot2} ${dot3} ${dot4} ${dot5} ${dot6}
/if (${dotnumber}==7) /twist ${dot1} ${dot2} ${dot3} ${dot4} ${dot5} ${dot6} ${dot7}
/if (${dotnumber}==8) /twist ${dot1} ${dot2} ${dot3} ${dot4} ${dot5} ${dot6} ${dot7} ${dot8}
/if (${dotnumber}==9) /twist ${dot1} ${dot2} ${dot3} ${dot4} ${dot5} ${dot6} ${dot7} ${dot8} ${dot9}
/return
 
sub healtwist
/if (${dotnumber}==1) /twist ${dot1} ${hpsong}
/if (${dotnumber}==2) /twist ${dot1} ${dot2} ${hpsong}
/if (${dotnumber}==3) /twist ${dot1} ${dot2} ${dot3} ${hpsong}
/if (${dotnumber}>=4) /twist ${dot1} ${dot2} ${dot3} ${dot4} ${hpsong}
/return
 
sub gmcheck
/if (${Spawn[gm].ID}) {
/MQLog GM entered the zone!
/mqlog For safty reasons ending the macro
/echo GM entered the zone!
/echo For safty reasons ending the macro
/endmac
/keypress instant_camp
}
/return


This one twists a different song after the mob hits whatever % hp you declare as a snarepct. you'll definitely want to go through and edit the /twist commands though as they're set up for mine at the moment. i'll go through later and change em prolly, but i might forget. *shrug*

Rich (BB code):
#event NeedTarget "You must first select a target for this spell!" 
#event NeedTarget2 "Your target is out of range, get closer!"
#event seetarget "You cannot see your target."
#event targetid "Your Tuyen's Chant of Poison has worn off."
#event targetid "Your Tuyen's Chant of Disease has worn off."
#event targetid "Your Tuyen's Chant of Flame has worn off."
#event targetid "Your Tuyen's Chant of Frost has worn off."
#event exp "You gain experience!!"
#event camp_check "#*#Camp Check#*#"
#event replay "You target resisted the Largo#*#"
Sub Main(String Selos, String Dirge, String Bellows)
/declare slowsong int outer 0
/declare healsong int outer 0
/declare SeloSong int outer 8 
/declare DirgeSong int outer 7
/declare BellowSong int outer 6
/declare Bellowtimer int outer 300
/declare targetammount int outer
/declare PrevSong int outer 
/varset PrevSong 0 
/echo Selo's: ${Me.Gem[${SeloSong}].Name}
:MainLoop 
/doevents
/nomodkey /keypress forward hold
/if (${Target.PctHPs}<=15) /if (${slowsong}==0) {
/twist 7 2 3 4
/varset slowsong 1
}
/call selosong
|/call dirgesong
|/call bellowsong
/call healsong
		 /delay 1S
/nomodkey /keypress forward hold
/varcalc Bellowtimer ${Bellowtimer}+1
/goto :MainLoop 
/return 
Sub Event_replay
/squelch /twist 7 2 3 4
/return
Sub Event_NeedTarget 
/if (!${Target.ID}) /squelch /target npc radius 100
/return
Sub Event_EXP 
/varset healsong 0
/varset slowsong 0
/declare nexttarget int local
/if (!${Target.ID}) /squelch /target npc radius 100
/twist 2 3 4 5
/if (${Target.ID}) /return
:lootcorpse
/squelch /target npc radius 75
/if (${Target.ID}) {
/twist 2 3 4 5
/circle on -1639.59 2471.09
/keypress forward hold
/return
}
/if (!${Target.ID}) /squelch /target corpse radius 200
/if (!${Target.ID}) /return
/twist 8
/circle off
/call lootcorpse
/goto :lootcorpse
/return
Sub Event_NeedTarget2
/squelch /target npc radius 100
/return
Sub Event_seetarget
/varcalc targetammount ${targetammount}+1
/if (${targetammount}>=10) {
/squelch /target npc radius 100
/varset targetammount 0
/return
}
/return
Sub Event_targetid
/varset targetammount 0
/return
sub selosong
	 /if (${SeloSong}) /if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=6) { 
		 /echo Selos about to die 
/twist 8
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
/if (${slowsong}==1) /twist 7 2 3 4
/if (${slowsong}==0) /twist 2 3 4 5
/nomodkey /keypress forward hold
/varcalc Bellowtimer ${Bellowtimer}+8
		 /varset PrevSong 0 
		 /doevents 
		 /return 
	 } 
/return
sub dirgesong
/if (${Me.CurrentMana}>=880) {
/echo dirge
/twist 7
/varset slowsong 0
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
/twist 2 3 4 5
/varcalc Bellowtimer ${Bellowtimer}+8
/doevents
/return
}
/return
sub bellowsong
/if (${Bellowtimer}>=300) {
/echo bellows
/stopsong
/cast 6
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
/varset Bellowtimer 0
/doevents
/return
}
/return
Sub healsong
/if (${healsong}==0) /if (${Me.PctHPs}<=95) /if (${slowsong}==0) {
/twist 1 2 3 4 5
/varset healsong 1
/return
}
/if (${healsong}==0) /if (${Me.PctHPs}<=95) /if (${slowsong}==1) {
/twist 7 2 3 1
/varset healsong 1
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) /if (${slowsong}==0) {
/twist 2 3 4 5
/varset healsong 0
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) /if (${slowsong}==1) {
/twist 7 2 3 4
/varset healsong 0
/return
}
/return
Sub LootMob 
/declare LootChance int inner 0
/declare LootSlot	int inner 0 
/declare LootCheck int inner 0 
/declare LootTotal int inner 0 
 
/face fast 
 
/keypress forward 
/keypress back 
 
/stick 5
|/delay 5s
:Distance
/if (${Target.Distance}<=10) { 
/stick off
/loot
} else {
/goto :Distance 
}
/stick off
/loot
/delay 1s 
/if (!${Corpse.Items}) { 
	 /echo NO LOOT! Cheap Bastard! 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup 
/cleanup
	 /return 
} 
/varset LootTotal ${Corpse.Items} 
/for LootSlot 1 to ${LootTotal} 
	 /itemnotify loot${LootSlot} leftmouseup 
	 /delay 5
	 /echo Keeping a ${Cursor.Name}... WOOT! 
		 /autoinventory 
		 /delay 5 
		/next LootSlot 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup 
/cleanup
/return 
Sub event_camp_check
/ooc BC
/return

And last but not least on this post, the bard chant+looting macro, again modify any/all /twist commands

Rich (BB code):
| Written by Siddin
|You will need to get mq2twist and mq2moveutils
|from the macroquest2 forums.
 
#event EXP "You gain experience!!"
#event EXP "You gain party experience!!"
#event NeedTarget "You must select a target for this spell!"
#event NeedTarget2 "Your target is out of range, get closer!"
#event seetarget "You cannot see your target."
#event targetid "#*#has worn off."
#event logoff "LOADING, PLEASE WAIT..."
 
Sub main
/declare pause int outer 1
/declare healsong int outer 1
/declare SeloSong int outer 8 
/declare DirgeSong int outer 7
/declare targetammount int outer 0
/echo Selo's: ${Me.Gem[${SeloSong}].Name}
:needtarget
/call event_needtarget
/call selosong
:MainLoop 
/doevents
/if (!${Target.ID}) {
/keypress forward hold
/delay 3s
/goto :needtarget
}
/nomodkey /keypress forward hold
/call healsong
/call selosong
/call GMCheck
/call dirgesong
 
		 /delay 1S
/nomodkey /keypress forward hold
/goto :MainLoop 
:loot
/call event_exp
/goto :pause
/return 
 
Sub GMCheck
 
/if (${Spawn[gm].ID}) {
/Log GM entered the zone!
/log For safty reasons ending the macro
	 /echo GM entered the zone!
	 /echo For safty reasons ending the macro
/circle off
/keypress forward
/twist 6
/delay 3s
/twist 1
	 /q
}
 
/return
 
 
Sub Event_NeedTarget 
/squelch /if (!${Target.ID}) /squelch /target npc radius 140
/keypress forward hold
/if (${Target.ID}) /twist 2 3 4 5
/return
 
Sub Event_NeedTarget2
/squelch /target npc radius 140
/keypress forward hold
/return
 
Sub Event_seetarget
/varcalc targetammount ${targetammount}+1
/if (${targetammount}>=10) {
/squelch /target npc radius 140 
/twist reset
/varset targetammount 0
/return
}
/return
 
Sub Event_targetid
/varset targetammount 0
/return
 
sub selosong
	 /if (${SeloSong}) /if (${Me.Buff[${Me.Gem[${SeloSong}].Name}].Duration}<=4) { 
		 /echo Selos about to die 
/twist 8
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
/twist 2 3 4 5
/varset healsong 0
/call healsong
		/doevents 
		 /return 
	 } 
 
/return
 
sub dirgesong
/if (!${Target.ID}) /return
/if (${Me.CurrentMana}>=880) {
/echo dirge
/twist ${DirgeSong}
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
		 /delay 1S
/nomodkey /keypress forward hold
/twist 2 3 4 5
/varset healsong 0
/call healsong
 
/doevents
/return
}
/return
 
 
Sub healsong
/if (${healsong}==0) /if (${Me.PctHPs}<=95) {
/twist 1 2 3 4 5
/varset healsong 1
/return
}
/if (${healsong}==1) /if (${Me.PctHPs}>=96) {
/twist 2 3 4 5
/varset healsong 0
/return
}
/return
Sub Event_quit
/circle off
/keypress forward
/keypress left
/keypress right
/twist off
:doeventloop
/doevents
/goto :doeventloop
/return
Sub Event_logoff
/delay 60s
/keypress forward
/keypress left
/keypress right
/camp desktop
/endmac
/return
 
Sub Event_EXP 
/twist 8
/squelch /target npc radius 160
/if (${Target.ID}) {
/twist 2 3 4 5
/return
} else {
/twist 8
/goto ;looting
}
:looting
/target npc radius 75
/if (${Target.ID}) {
/twist 2 3 4 5
/goto :endxp
}
/target npc corpse radius 200
/if (!${Target.ID}) /goto :endxp
/if (${Target.ID} {
/circle off
/call LootMob
/goto :looting
}
:endxp
/circle on (xcoords) (ycoords)
/return
 
Sub LootMob 
/declare LootChance int inner 0
/declare LootSlot	int inner 0 
/declare LootCheck int inner 0 
/declare LootTotal int inner 0 
 
/face fast 
 
/keypress forward 
/keypress back 
 
/stick 5
:Distance
/if (${Target.Distance}<=10) { 
/stick off
/loot
} else {
/goto :Distance 
}
/stick off
/loot
/delay 1s 
/if (!${Corpse.Items}) { 
	 /echo NO LOOT! Cheap Bastard! 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup 
/cleanup
	 /return 
} 
 
/varset LootTotal ${Corpse.Items} 
/for LootSlot 1 to ${LootTotal} 
	 /itemnotify loot${LootSlot} leftmouseup 
	 /delay 5
		 /autoinventory 
		 /delay 5 
		/next LootSlot 
/shift /notify InventoryWindow IW_Money1 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money2 leftmouseup
/destroy
/shift /notify InventoryWindow IW_Money3 leftmouseup
/destroy
/notify LootWnd DoneButton leftmouseup 
/cleanup
/return


Swarmkite.mac

Rich (BB code):
#event DropCharm "#*#charm spell#*#"
#event EXP "You have gained group experience!!"
#event EXP "You gain experience!!"

Sub Main
/declare KiteMob int outer 0
/declare Charmed int outer 0
/declare MyTargetID int outer 0
/declare MyPetID int outer 0
/declare InvisPct int outer 35
/declare InvisSong int outer 9
/declare RunSong int outer 8
/declare CharmSong int outer 7
/declare SwamCount int outer 8
/declare StopSwarm int outer 2
/declare ReCharm int outer 0
/declare EXP int outer 0
/declare HealSong int outer 1
/declare HealPct int outer 75
/declare DotOne int outer 2
/declare DotTwo int outer 3
/declare DotThree int outer 4
/declare DotFour int outer 5


:MainLoop
/doevents
/if (${SpawnCount[radius 150]}<=${StopSwarm}) /call WaitForMobs
/nomodkey /keypress forward hold
/if (!${Me.Pet.ID}) /call Charming
/goto :MainLoop
/return

Sub Event_EXP
/varset MyTargetID 0
/varset MyPetID 0
/varset ReCharm 0
/varset EXP 1
/varset KiteMob 0
/varset Charmed 0
/return

Sub Event_DropCharm
/if (${Target.PctHPs}>${InvisPct}) /varset ReCharm 1
/return

Sub WaitingForCharmDrop
:CharmDrop
/if (!${Me.Pet.ID} && ${Target.PctHPs}>=${InvisPct}) /return
/if (${ReCharm}==1 && ${Target.PctHPs}>=${InvisPct}) /return
/doevents
/if (${Target.PctHPs}<=${InvisPct}) {
/squelch /twist ${InvisSong}
/nomodkey /keypress forward hold
/delay 5s
/twist ${DotOne} ${DotTwo} ${DotThree} ${DotFour}
/varset KiteMob 1
/return
}
/goto :CharmDrop
/return

Sub Charmed
/if (${Target.ID}==${Me.Pet.ID}) {
/target id ${MyTargetID} notid ${Me.ID}
/pet attack
/delay 2
/target id ${MyPetID} notid ${Me.ID}
}
/doevents
/return

Sub KiteMob
/target ID ${MyPetID}
/twist ${DotOne} ${DotTwo} ${DotThree} ${DotFour}
:Doevent
/doevents
/if (${KiteMob}==1)/goto :Doevent
/return

Sub WaitForMobs
:WaitForMobs
/nomodkey /keypress forward hold
/doevents
/if (${SpawnCount[radius 150]}>=${SwamCount}) /return
/goto :WaitForMobs
/return

Sub Charming
/target npc radius 150 notid ${Me.ID}
/varset MyPetID ${Target.ID}
/target npc next radius 150 notid ${Me.ID}
/varset MyTargetID ${Target.ID}
/target id ${MyPetID} notid ${Me.ID}
/squelch /twist off
/echo Charming a ${Target.CleanName}
/squelch /twist ${CharmSong}
/delay 4s
/varset ReCharm 0
/call RunSong
/if (!${Me.Pet.ID}) /return
/call Charmed
/call WaitingForCharmDrop
/if (${KiteMob}==1) /call KitingMob
/return

Sub RunSong
/if (${Me.PctHPs}<=${HealPct}) {
/squelch /twist ${RunSong} ${HealSong}
} else {
/squelch /twist ${RunSong}
/nomodkey /keypress forward hold
/delay 4s
}
/return

Sub KitingMob
:kiting
/doevents
/if (${KiteMob}==1) /goto :kiting
/return
 
Re: Redguides Listing of Confirmed Macros

Celestial Essence macro by Siddin

Rich (BB code):
#include move.inc
  Sub Main 
  
  /declare index int local 
  		/declare KeyNames string local ${Ini[Restock2.ini,${Me.Name}]} 
  		/declare ItemName string local 
  		/declare ItemQty int local
  :Start 
  :recheck		
  		/for index 1 to 100 
  			    /if (${KeyNames.Arg[${index},|].Length} > 2) { 
 					 /varset ItemName ${KeyNames.Arg[${index},|]} 
 					 /varset ItemQty ${Ini[Restock2.ini,${Me.Name},"${ItemName}"]} 
 					 /echo Checking: ${ItemName} (${FindItemCount[=${ItemName}]}/${ItemQty}) 
  			 /if (${FindItemCount[=${ItemName}]} > ${ItemQty}) {
  				/ooc Celestial Essence 10p each
  				/delay 600s
  				/goto :recheck 
  				}
 					 /if (${FindItemCount[=${ItemName}]} < ${ItemQty}) /call GoToPOK
  				} 
  		/next index 
  /goto :Start
  /return 
  
  
  
  
  
  Sub GoToPOK
    /echo Going to Plane of Knowledge
  /warp loc 1167.55 -847.07 2.28
  /target banker denton
  /face fast nolook
  /click right target
  /call bankswitch
  /delay 2s
  /cleanup
  /sit
  /delay 30s
  /warp loc 217.64 -233.05 -24.17
  /delay 1s
  /zone nexus
  /delay 30s
  /face fast nolook loc 29.42,-255.60
  /keypress forward hold
  /delay 20s
  /zone poknowledge
  
  
  | POK
  /delay 30s
  /doort pok
  /stick
  /delay 10s
  /target darius gandril
  /warp loc 54.37 1516.39 -124.25
  /delay 5
  /face fast nolook
  /delay 2s
  /stick 10
  /delay 2s
  /click right target
  /delay 2s
  /call restocking
  /stick off
  /delay 2s
  
  /call movetoloc -60.43 1513.25
  /call movetoloc -72.33 1435.96
  :PullMoveLoopw
    /if (${Me.State.Equal[SIT]}) /stand 
    /face nolook loc -114.14,1424.46
    /if (${Math.Distance[-114.14,1424.46]}>2) {
  	/nomodkey /keypress forward hold
  	/nomodkey /keypress USE
    }
    /if (${Math.Distance[-114.14,1424.46]}<=2) {
  	/nomodkey /keypress forward
  	/goto :PullMoveLoopx
    }
    /goto :PullMoveLoopw
    /delay 1s
  
    :PullMoveLoopx
  
  /call movetoloc -114.66 1412.35
  /target Loran Thu`leth
  /call restocking
  /cleanup
  /delay 1s
  /zone nexus
  /delay 30s
  /face fast nolook loc 29.42,-255.60
  /keypress forward hold
  /delay 20s
  /zone bazaar
  /delay 30s
  /warp loc 1167.55 -847.07 2.28
  /call Make CelestialEssence silent-mode=1
  /delay 10s
  /call bagswitchback
  /delay 5s
  /warp loc 1419.85 -961.09 -26.97
  /trad
  /delay 1s
  /notify bazaarWND BZW_Start_Button leftmouseup 
  /return
  
  Sub bankswitch
  /target banker denton
  /click right target
  /delay 5s
  /shift /notify InventoryWindow IW_Money0 leftmouseup 
  /shift /notify BigBankWnd BIGB_Money0 leftmouseup
  /delay 5s
  /notify BigBankWnd BIGB_Money0 leftmouseup
  /delay 5s
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /nomodkey /keypress backspace chat
  /delay 3
  /keypress 1 chat
  /keypress 2 chat
  /keypress 0 chat
  /keypress 0 chat
  /delay 3
  /notify QuantityWnd QTYW_Accept_Button leftmouseup
  /notify InventoryWindow IW_Money0 leftmouseup 
  /delay 3
  /call OpenPacks
  /delay 5s
  /itemnotify pack1 leftmouseup
  /itemnotify bank1 leftmouseup
  /itemnotify pack1 leftmouseup
  /itemnotify pack2 leftmouseup
  /itemnotify bank2 leftmouseup
  /itemnotify pack2 leftmouseup
  /itemnotify pack3 leftmouseup
  /itemnotify bank3 leftmouseup
  /itemnotify pack3 leftmouseup
  /itemnotify pack4 leftmouseup
  /itemnotify bank4 leftmouseup
  /itemnotify pack4 leftmouseup
  /itemnotify pack5 leftmouseup
  /itemnotify bank5 leftmouseup
  /itemnotify pack5 leftmouseup
  /itemnotify pack6 leftmouseup
  /itemnotify bank6 leftmouseup
  /itemnotify pack6 leftmouseup
  /itemnotify pack7 leftmouseup
  /itemnotify bank7 leftmouseup
  /itemnotify pack7 leftmouseup
  /itemnotify pack8 leftmouseup
  /itemnotify bank8 leftmouseup
  /itemnotify pack8 leftmouseup
  /itemnotify pack1 rightmouseup
  /itemnotify bank1 rightmouseup
  /itemnotify pack2 rightmouseup
  /itemnotify bank2 rightmouseup
  /itemnotify pack3 rightmouseup
  /itemnotify bank3 rightmouseup
  /itemnotify pack4 rightmouseup
  /itemnotify bank4 rightmouseup
  /itemnotify pack5 rightmouseup
  /itemnotify bank5 rightmouseup
  /itemnotify pack6 rightmouseup
  /itemnotify bank6 rightmouseup
  /itemnotify pack7 rightmouseup
  /itemnotify bank7 rightmouseup
  /itemnotify pack8 rightmouseup
  /itemnotify bank8 rightmouseup
  /cleanup
  /return
  
  
  
  
  Sub bagswitchback 
  /target banker denton
  /click right target
  /delay 5s
  /shift /notify InventoryWindow IW_Money0 leftmouseup 
  /shift /notify BigBankWnd BIGB_Money0 leftmouseup
  /delay 5s
  /shift /itemnotify in pack1 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack1 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack2 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack3 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack4 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack5 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack6 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 5 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 6 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 7 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 8 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 9 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack7 10 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack8 1 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack8 2 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack8 3 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /shift /itemnotify in pack8 4 leftmouseup
  /notify BigBankWND BIGB_AutoButton LeftMouseUP
  /delay 5s
  /itemnotify pack1 leftmouseup
  /itemnotify bank1 leftmouseup
  /itemnotify pack1 leftmouseup
  /itemnotify pack2 leftmouseup
  /itemnotify bank2 leftmouseup
  /itemnotify pack2 leftmouseup
  /itemnotify pack3 leftmouseup
  /itemnotify bank3 leftmouseup
  /itemnotify pack3 leftmouseup
  /itemnotify pack4 leftmouseup
  /itemnotify bank4 leftmouseup
  /itemnotify pack4 leftmouseup
  /itemnotify pack5 leftmouseup
  /itemnotify bank5 leftmouseup
  /itemnotify pack5 leftmouseup
  /itemnotify pack6 leftmouseup
  /itemnotify bank6 leftmouseup
  /itemnotify pack6 leftmouseup
  /itemnotify pack7 leftmouseup
  /itemnotify bank7 leftmouseup
  /itemnotify pack7 leftmouseup
  /itemnotify pack8 leftmouseup
  /itemnotify bank8 leftmouseup
  /itemnotify pack8 leftmouseup
  /cleanup
  /return
  Sub restocking
  		/if (!${Target.ID} && !${Merchant.Open}) { 
  				/echo Target a merchant! 
  				/endmacro 
  		} 
  		/if (${Target.ID} && !${Merchant.Open}) { 
  				/click right target 
  				/delay 1s 
  		} 
  		/if (${Ini[Restock.ini,${Me.Name}].Length}) /call ProcessIni 
  		/if (${Merchant}) { 
  				/keypress esc 
  				/keypress esc 
  		} 
  		/return 
  		
  Sub ProcessIni 
  		/declare index int local 
  		/declare KeyNames string local ${Ini[Restock.ini,${Me.Name}]} 
  		/declare ItemName string local 
  		/declare ItemQty int local 
  		
  		/for index 1 to 100 
  			    /if (${KeyNames.Arg[${index},|].Length} > 2) { 
 					 /varset ItemName ${KeyNames.Arg[${index},|]} 
 					 /varset ItemQty ${Ini[Restock.ini,${Me.Name},"${ItemName}"]} 
 					 /echo Checking: ${ItemName} (${FindItemCount[=${ItemName}]}/${ItemQty}) 
 					 /if (${FindItemCount[=${ItemName}]} < ${ItemQty}) /call Restock "${ItemName}" ${ItemQty} 
  				} 
  		/next index 
  		/return 
  		
  Sub Restock(ItemName,Qty) 
  		/declare ItemSlot int local 
  
 		/if (${Merchant.Item[=${ItemName}].InvSlot}) /call BuyItems "${ItemName}" ${Qty} 
  		
  		/return 
  
  Sub BuyItems(ItemName,Qty) 
  		/declare StartCash int local ${Me.Cash} 
  		/declare QtyStart int local ${FindItemCount[=${ItemName}]} 
  		/declare QtyNeeded int local 
  		
  		/if (!${Merchant.Open}) { 
 				/echo No Merchant open to buy from 
  				/return 
  		} 
  		
  		/if (${FindItemCount[=${ItemName}]} >= ${Qty}) { 
  			    /echo Already have all the ${ItemName}(s) needed. 
  				/return 
  		} 
  		
  		/itemnotify ${Merchant.Item[=${ItemName}].InvSlot} leftmouseup 
  		
  		/varset QtyNeeded ${Math.Calc[${Qty} - ${FindItemCount[=${ItemName}]}].Int} 
  		:BuyItemLoop0 
  		/doevents 
  		/if (${QtyNeeded} >= 20) { 
 			 /call CheckFunds "${ItemName}" ${Merchant.Item[=${ItemName}].BuyPrice} 20 
 			 /if (${Me.FreeInventory[${Merchant.Item[=${ItemName}].Size}]}) { 
 					 /buyitem 20 
 			 } else {		
 					 /echo No space to buy more ${ItemName}, exiting 
 					 /endmacro 
  				} 
  			    /varset QtyNeeded ${Math.Calc[${QtyNeeded}-20]} 
  		} else { 
 			 /call CheckFunds "${ItemName}" ${Merchant.Item[=${ItemName}].BuyPrice} ${QtyNeeded} 
  				/buyitem 20 
  		} 
  		/delay 1s 
  		/if (${FindItemCount[=${ItemName}]} < ${Qty}) /goto :BuyItemLoop0 
  		
 	 /echo Purchased ${Math.Calc[${Qty} - ${QtyStart}].Int} ${ItemName}(s) for ${Math.Calc[(${StartCash}-${Me.Cash})/1000].Int}pp ${Math.Calc[((${StartCash}-${Me.Cash})/100)%10].Int}gp ${Math.Calc[((${StartCash}-${Me.Cash})/10)%10].Int}sp ${Math.Calc[((${StartCash}-${Me.Cash})%10)].Int}cp 
  		
  		/return 
  
  Sub CheckFunds(ItemName,Price,Qty) 
  		/if (${Me.Cash} < ${Math.Calc[${Price} * ${Qty}]}) { 
 			 /echo Insufficient funds to purchase: ${Qty} x ${ItemName} 
  				/keypress esc 
  				/keypress esc 
  				/endmacro 
  		} 
  		/return 
  
  
  |** 
  	khiTS.mac 
  
  	Author:	 Kaitain Heavy Industries 
  	Date:	   30 Apr 04 
  	Version:	2.2.2.14 
  
  	Description: 
  	Performs tradeskill combines using recipes supplied in an ini file 
  
  	Credits: 
  Inspired by Dont_Know_At_All's Trade Skills macro - The status report idea is completely stolen from him (but rewritten by me) 
      Ini file uses the format created by Diggler (this will eventually being changed to a new format using item id's) 
  
  	Notes: 
  	* Updated to use MQ2DataVars 
      * This is a complete overhaul of the whole macro in addition changing it to work with MQ2Data and MQ2DataVars 
 	* You should be able to simply rename "sub main" to "sub khiTS" if you want to use this as an included file. 
  	* No longer destroys tools or components used to do combines when destroy-results is enabled. 
  	* This is a BIG macro and may be slow as hell on older computers. 
  
     Usage: 
     #include khits.inc 
     . 
     . 
     . 
     /call Make  <recipe_name>  
  
     Example: 
     /call Make khits bits "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0 silent-mode=0 stop-at-skill-level=200" 
     Ported to Inc by Draco 
  **| 
  
  | ***** Tweak this to your computer, if you get a lot of an item in the combine container, increase this number ***** | 
  #define COMBINE_DELAY 3 
  
  | ***** CHANGE THIS TO MATCH YOUR INI FILE NAME IF NECESSARY ***** | 
  #define INIPATH "recipes.ini" 
  
  
  #event SkillTrivial "You can no longer advance your skill from making this item#*#" 
  #event SkillUp "You have become better at #1#! (#2#)" 
  #event SkillFailure "You lacked the skills#*#" 
  #event SkillSuccess "You have fashioned the items together to create something new#*#" 
  #event FullInventory "There was no place to put that#*#" 
  #event CombineError "You cannot combine these items in this container type!" 
  #event HandsFull   "You cannot combine items when your hands are full#*#" 
  
  #chat tell 
  
  #define COMBINE_SUCCESS		 0 
  #define COMBINE_FAILED		 1 
  #define COMBINE_ERROR		 2 
  #define COMBINE_INVENTORY_FULL   3 
  #define COMBINE_TRIVIAL		 4 
  
  #include utils.inc 
  
  | Main entry point 
  sub Make 
  	/echo 
  	/echo ***************************************** 
  	/echo khiTs: Tradeskills running : ${Time} 
  	/echo ***************************************** 
  	/echo 
  
  
  	| Check for no parameters or help 
  	/if (!${Defined[Param0]} || ${Param0.Equal[HELP]}) { 
  		/call displayHelp 
  		/call clearCursor ${iDestroyResults} 
  		/endmacro 
  	} 
  	
  	| container in which the recipe will be made 
  	/declare containerName	  string  local   NOT_SET 
  	
  	| The name of the current component we're getting 
  	/declare currentComp		string  local   NOT_SET 
  	
  	| Make sure we have that recipe in the ini file 
  	/declare recipeCheck		string  local   NOT_SET 
  
  	| Settings (see end of this file for list of settings) 
  	| Stops the macro if someone sends you a tell 
      /declare abortOnTell	    int	 local   0 
  	
  	| How many itmes the user has requested be made 
  	/declare makeThisMany	   int	 local   0 
  	
  	| Display when you succed, get skillups, fail, etc. 
      /declare showStats		  int	 local   0 
  
  	| For looping through containers 
      /declare slotNumber		 int	 local   1 
  	
  
     | Exit and Return Flags added by Draco 
     /declare combineResult int outer 0 
     /declare cleanUpAndExit int outer 0 
     /declare combineErrorCounter int outer 0 
  
  	| Only declare outer variables once, this is in case you use this as an include	
     /if (!${Defined[components]}) { 
  		| Array of components used to make the recipe 
  		/declare components[10]	 string  outer 
  		
  	   | The name of the combination being done, this is used to look up the recipe in the recipe.ini file 
  	   /declare recipeName		 string  outer 
  		
  		| Container in which the recipe will be made 
  	    /declare containerNum	   string  outer   NOT_SET 
  		
  		| The number of components in the recipe 
 	 /declare iCompCount		 int	 outer 0 
  
  		| Flags 
  	    /declare bCombineDone	   bool	outer   FALSE 
  	    /declare bSkillTrivial	  bool	outer   FALSE 
  
  		| Destroys the results of a combine (but not any items used in the combine) 
  	    /declare iDestroyResults	 int	 outer   0 
  
  		| Stops the macro when you can no longer get skillups from doing the combine 
  	    /declare iEndOnTrivial	   int	 outer   0 
  
  		| How many times you've tried a combination 
  	    /declare iSkillAttempts	  int	 outer   0 
  		
  		| How many times it worked 
  	    /declare iSkillSuccess	   int	 outer   0 
  		
  		| How many times it didn't work 
  	    /declare iSkillFailure	   int	 outer   0 
  		
  		| How many skill points you have received 
 	 /declare iSkillUps		 int	 outer 0 
  		
  		| Skill level to stop at 
  	    /declare iStopAtSkillLevel    int	 outer	0 
  
  	   | Keeps MQ window spam to a minimum 
 	 /declare silentMode		 int	 outer 0 
  		
  	   | Output debugging information 
 	 /declare debug			 int outer	0 
  		
  	   | Flag to close tradeskill container when finished 
  	   /declare iCloseContainer	int   outer	1 
  		
  		| The results of what we are making 
  	    /declare sResults		   string  outer 
  		
  		| Skill we are using (i.e. Brewing, Smithing, etc) 
  	    /declare sUsing		    string   outer   NOT_SET 
  	} else { 
 	 | Clean out the last components used, this is in case we have not cleared the variables or are using this as an include 
  		/deletevar components 
  		/declare components[10] 
  	} 
  
  
  	|Get requested recipe's name 
  	/varset recipeName ${Param0} 
  
  	| If there is only one parameter, then there are no options 
  	/if (${Defined[Param1]}) { 
  	   /declare tmp int local 
  	   /declare parms int local ${Macro.Params} 
  	   /declare parmString string local 
  	   /varcalc parms ${parms}-1 
  	  
  	  /for tmp 1 to ${parms} 
  		 /varset parmString ${parmString} ${Param${tmp}} 
  	  /next tmp 
  	  
  		/call parseArguments "abort-on-tell" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset abortOnTell ${Macro.Return} 
  	   } 
  
  		/call parseArguments "destroy-results" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset iDestroyResults ${Macro.Return} 
  	   } 
  
  		/call parseArguments "end-on-trivial" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset iEndOnTrivial ${Macro.Return} 
  	   } 
  
  		/call parseArguments "make-this-many" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset makeThisMany ${Macro.Return} 
  	   } 
  
  		/call parseArguments "show-stats" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset showStats ${Macro.Return} 
  	   } 
  
  		/call parseArguments "stop-at-skill-level" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset iStopAtSkillLevel ${Macro.Return} 
  	   } 
  		
  		/call parseArguments "close-container" "${parmString}" 
  		
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset iCloseContainer ${Macro.Return} 
  	   } 
  		
  		/call parseArguments "debug" "${parmString}" 
  		/if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  		   /varset debug ${Macro.Return} 
  	   } 
  
  		/if (!${debug}) { 
  		   /call parseArguments "silent-mode" "${parmString}" 
  		   /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  			  /varset silentMode ${Macro.Return} 
  		  } 
  	   } else { 
  		  /echo ***** DEBUGGING ON ***** 
  	   } 
  	} 
  
  	| Make sure the recipe file exists (the recipes thing is a fix for a bug in the Ini function) 
  	/varset recipeCheck ${Ini[INIPATH,recipes]} 
  	/if (${recipeCheck.Equal[NULL]}) { 
  		/echo khiTS Error: Recipe file not found 
  		/echo Path = INIPATH 
  		/goto :khiTSreset 
  	} 
  
  	| Make sure this recipe exists in the recipe.ini file 
  	/varset recipeCheck ${Ini[INIPATH,${recipeName}]} 
  	/if (${recipeCheck.Equal[NULL]}) { 
  		/echo khiTS Error: Recipe not found 
  		/echo Recipe name = ${recipeName} 
  		/goto :khiTSreset 
  	} 
  
  	| Get the container name 
  	/varset containerName ${Ini[INIPATH,${recipeName},Cont]} 
  	/if (${containerName.Equal[NULL]}) { 
 		/echo khiTS Error: Error in ini file for this recipe, no container is specified 
  		/echo khiTS	  : Recipe = ${RecipeName} 
  		/goto :khiTSreset 
  	} 
  	
  	| Get the skill we are using 
  	/varset sUsing ${Ini[INIPATH,${recipeName},Skill]} 
  	/if (${sUsing.Equal[NULL]})   /varset sUsing NOT_SET 
  
  	| Get the item we are making 
  	/varset sResults ${Ini[INIPATH,${recipeName},LongName]} 
  	/if (${sResults.Equal[NULL]})   /varset sResults ${recipeName} 
  
  	| Find the combine container number 
  	/if (${containerName.Equal[Enviro]}) { 
  		/if (!${Window[Enviro].Open}) { 
  		    /echo khiTS Error: You must have the enviromental container open to begin 
  			/goto :khiTSreset 
  		} 
  		/varset containerNum e 
  	} else { 
 	 | Not an enviromental container so find the container's pack number, this is how we will refer to it from now on 
  		/varset containerNum ${FindItem[=${containerName}].InvSlot.ID} 
  		/if (${containerNum}) { 
  			/varcalc containerNum ${containerNum}-21 
  			/varset containerNum ${containerNum.Arg[0,.]} 
  		} else { 
  			| Didn't find the container 
  		    /echo khiTS Error: Could not find container in your inventory 
  		    /echo khiTS	  : Contanier name = ${containerName} 
  			/goto :khiTSreset 
  		} 
  	} 
  	
  	| Read the ingredients for the recipe from the ini file		
  	:khiTSReadComponentsLoop 
  	/varset currentComp ${Ini[INIPATH,${recipeName},Comp${iCompCount}]} 
     /if (${currentComp.NotEqual[NULL]}) { 
  		/varcalc iCompCount ${iCompCount}+1 
  		/varset components[${iCompCount}] ${currentComp} 
  		/goto :khiTSReadComponentsLoop 
  	} 
  
  	/call OpenPacks 
  
  	| Remove anything from the cursor if needed 
  	/call clearCursor ${iDestroyResults} 
  
  	| Clear the combine pack 
  	/call cleanPack ${containerNum} 
  	/if (${cleanUpAndExit})   /goto :khiTSreset 
  
     | Let's just do this here rather than through every iteration of combines 
     /declare MAIN_CONTAINER string local 
  	/if (${containerNum.Equal[e]}) { 
  		/varset MAIN_CONTAINER enviro 
  	} else { 
  		/varset MAIN_CONTAINER pack${containerNum} 
  	} 
  	
  	
  	:khiTSCombineLoop 
  		| Delete or Save items depending on settings 
  		/call clearCursor ${iDestroyResults} 
  
  	  /if (!${silentMode})   /echo khiTS: Making ${sResults} - Count = ${iSkillSuccess} 
  
  		| Move ingredients to container 
  		/call addComponents 
  		/if (${cleanUpAndExit})   /goto :khiTSCleanUpMacro 
  
  		| Combine 
  		/varset bCombineDone FALSE 
  		/varcalc iSkillAttempts ${iSkillAttempts}+1 
  		
  		:DoCombineLoop 
  		/combine ${MAIN_CONTAINER} 
  
  		| Need this delay here to make sure the combine is finished 
  		/delay COMBINE_DELAY 
  
 	 | Call these events individually so they do not conflict with a parent macro if this macro is used as an included file 
  		/doevents SkillTrivial 
  		/doevents SkillUp 
  		/doevents SkillFailure 
  		/doevents SkillSuccess 
  		/doevents CombineError 
  		/doevents FullInventory 
  		/doevents tell 
  		/doevents HandsFull 
  	  
  		 /if (${cleanUpAndExit})   /goto :khiTSCleanUpMacro 
  		/if (!${bCombineDone})   /goto :DoCombineLoop 
  
  		/varset combineErrorCounter 0 
  
  		| See if we have made enough 
  	    /if (${makeThisMany} && ${makeThisMany} == ${iSkillSuccess})   /goto :khiTSCleanUpMacro 
  
  		/goto :khiTSCombineLoop 
  
  	| The macro is ending, clean up 
  	:khiTSCleanUpMacro 
  	  | Delete or Save items depending on settings - Just in case 
  	  /call clearCursor ${iDestroyResults} 
  	  /call cleanPack ${containerNum} 
  	  /call DisplayStats 
  	  
  	:khiTSreset 
  	  /if (${iCloseContainer})   /notify ContainerWindow DoneButton leftmouseup 
  	  /call resetKhits 
  
  /return ${combineResult} 
  
  
  Sub resetKhits 
     /deletevar combineResult 
     /deletevar cleanUpAndExit 
     /deletevar combineErrorCounter 
     /deletevar containerNum 
     /deletevar iCompCount 
     /deletevar bCombineDone 
     /deletevar bSkillTrivial 
     /deletevar iDestroyResults 
     /deletevar iEndOnTrivial 
     /deletevar iSkillAttempts 
     /deletevar iSkillSuccess 
     /deletevar iSkillFailure 
     /deletevar iSkillUps 
     /deletevar sResults 
     /deletevar components 
     /deletevar iStopAtSkillLevel 
     /deletevar recipeName 
     /deletevar iCloseContainer 
  /return 
  
  
  
  sub clearCursor(int DestroyResults) 
     /declare saveCount int local 
  
  	:khiTSClearCursorLoop 
  	/delay 2 ${Cursor.ID} 
  
  	| Is there anything on the cursor? 
  	/if (${Cursor.ID}) { 
  		/if (${DestroyResults}) { 
  		    | Make sure the item on the cursor is not something we want to save 
  			/for saveCount 1 to 10 
 			 /if (${components[${saveCount}].Equal[${Cursor.Name}]}) { 
 				 /if (!${silentMode}) /echo -- Saving ${components[${saveCount}]} to inventory 
 					/autoinv 
 				 /goto :khiTSClearCursorLoop 
  				} 
  			/next saveCount 
  
  			| Whatever is on the cursor wasn't in the save list 
  		    /if (!${silentMode})   /echo -- Destroying ${Cursor.Name} 
  			/destroy 
  		} else { 
  			/autoinv 
  		} 
  
  		/goto :khiTSClearCursorLoop 
  	} 
  /return 
  
  
  
  Sub DisplayStats 
  	/echo 
  	/echo khiTS: Stat display 
  	/echo ================================ 
  	/echo Attempts: ${iSkillAttempts} 
  	/echo Successes: ${iSkillSuccess} 
  	/echo Faliures: ${iSkillFailure} 
  	/echo Skill Ups: ${iSkillUps} 
  
  	/if (${Me.Skill[${sUsing}]}) { 
  	   /echo Skill Level: ${Me.Skill[${sUsing}]} 
  	} else { 
  	   /echo Skill Level: Unknown 
  	} 
  /return 
  
  
  
  Sub Event_Chat(string type, string sender, string text) 
  	/if (${String[${abt}].Equal[TRUE]} && ${type.Equal[tell]} ) { 
  		/echo khiTS Event_Chat: Got a tell, pausing. 
  		/if (!${Defined[pauseTimer]}) /declare pauseTimer timer outer 
  		/varset pauseTimer 600 
  	  :TellPause 
  		 /if (${Spawn[gm]}) { 
  		   /if (!${Me.Sitting})   /docommand /sit 
  		   /docommand /camp desktop 
  		   /call mqout "GM in Zone! Logging out" 
  		   /endmacro 
  		 } 
  
  		/if (${pauseTimer<1}) /return 
  		/goto :TellPause 
  		/mqpause 
  	} 
  /return 
  
  
  
  Sub Event_HandsFull 
     /echo khiTS Event_HandsFull Error: Unrecoverable error, ending macro 
     /endmacro 
  /return 
  
  
  
  Sub Event_CombineError 
  	/varcalc combineErrorCounter ${combineErrorCounter}+1 
  	/if (!${silentMode})   /echo khiTS Event_CombineError: ${combineErrorCounter} 
  
  	/endmacro 
  	
  	| *** FIXME *** | 
  	/if (${combineErrorCounter} < 3) { 
  	   /call cleanPack ${containerNum} 
  	   /call clearCursor ${iDestroyResults} 
  	   /varset bCombineDone TRUE 
     } else { 
  	   /varset combineResult COMBINE_ERROR 
  	   /varset cleanUpAndExit 1 
     } 
  /return 
  
  
  
  Sub Event_FullInventory 
  	/echo khiTS Event_FullInventory Error: Your inventory is full, ending macro. 
  	/call DisplayStats 
  	/varset combineResult COMBINE_INVENTORY_FULL 
  	/varset cleanUpAndExit 1 
  /return 
  
  
  
  Sub Event_SkillFailure 
  	/varcalc iSkillFailure ${iSkillFailure}+1 
  	/varset bCombineDone TRUE 
  	/varset combineResult COMBINE_FAILED 
  /return 
  
  
  
  Sub Event_SkillSuccess 
  	/if (${sResults.Equal[${recipeName}]}) { 
  	   /declare MaxWaitCount timer local 100 
  	   :WaitForIt 
  	   /delay 2 ${Cursor.ID} 
  	   /if (!${Cursor.ID} && !${MaxWaitCount} == 0)   /goto :WaitForIt 
  	   /varset sResults ${Cursor.Name} 
  	} 
  
  	/varcalc iSkillSuccess ${iSkillSuccess}+1 
  	/varset bCombineDone TRUE 
  	/varset combineResult COMBINE_SUCCESS 
  /return 
  
  
  
  Sub Event_SkillUp 
     /varset sUsing ${Param1} 
  	/varcalc iSkillUps ${iSkillUps}+1 
  
  	/if (${iStopAtSkillLevel} && ${iStopAtSkillLevel} == ${Param2}) { 
  		/call DisplayStats 
  		/call cleanPack ${containerNum} 
  		/call clearCursor ${iDestroyResults} 
  		/varset cleanUpAndExit 1 
  	} 
  /return 
  
  
  
  Sub Event_SkillTrivial 
  	/if (!${bSkillTrivial}) { 
  		/echo khiTS Event_SkillTrivial: Skill is trivial 
  		/varset bSkillTrivial TRUE 
  	} 
  
  	/if (${iEndOnTrivial}) { 
  		/call DisplayStats 
  		/call cleanPack ${containerNum} 
  		/call clearCursor ${iDestroyResults} 
  		/varset cleanUpAndExit 1 
  	} 
  
  	/varset combineResult COMBINE_TRIVIAL 
  /return 
  
  
  
  sub cleanPack(string PackNumber) 
  	/if (!${silentMode})   /echo khiTS cleanPack: Cleaning out pack: ${PackNumber} 
  	
  	| Used for looping through pack slots 
  	/declare iSlot	  int local 
  	
  	| How many freeslots are in the bag 
  	/declare iCount	 int local 
  
  	/if (${PackNumber.Equal[e]}) { 
  	   /if (!${silentMode})	/echo khiTs cleanPack: Clearing enviro 
  
  		/for iSlot 1 to 10 
  		   /if (${InvSlot[enviro${iSlot}].Item.ID}) { 
  			   /shiftkey /itemnotify enviro${iSlot} leftmouseup 
  			   /call clearCursor ${iDestroyResults} 
  		   } 
  		/next iSlot 
  	} else { 
  	  /if (!${silentMode})   /echo khiTs cleanPack: Cleaning out ${PackNumber} 
  		| Can't empty a non-pack duh! 
  		/if (!${Me.Inventory[Pack${PackNumber}].Container}) { 
  			/echo khiTs cleanPack Error: No pack in slot 
  			/varset cleanUpAndExit 1 
  			/return 
  		} 
  
  		/for iSlot 1 to ${Me.Inventory[Pack${PackNumber}].Container} 
  			| Quit if the pack is empty 
  		    /if (!${Me.Inventory[Pack${PackNumber}].Container})   /return 
  
 		 /if (${debug}) /echo khiTs cleanPack: Clearing Pack: Pack${PackNumber}, Slot:${iSlot}, Item: ${Me.Inventory[Pack${PackNumber}].Item[${iSlot}]} 
  
 			/if (${Me.Inventory[Pack${PackNumber}].Item[${iSlot}].ID}) { 
 			 /varset iCount ${Me.Inventory[Pack${PackNumber}].Items} 
  
 			 /shiftkey /itemnotify in pack${PackNumber} ${iSlot} leftmouseup 
 				/call clearCursor ${iDestroyResults} 
  
 			 | Make sure we aren't just putting it back in the same bag 
 			 /if (${Me.Inventory[Pack${PackNumber}].Items} == ${iCount}) { 
 				 /echo khiTs cleanPack Error: Unable to empty pack 
  				    /varset cleanUpAndExit 1 
 					/return 
  				} 
  			} 
  		/next iSlot 
  	} 
  
  	/if (!${silentMode})   /echo khiTs: Done Cleaning pack 
  /return TRUE 
  
  
  
  Sub addComponents 
  	/declare newLen	  int	  local 
  	/declare compNum	int	  local 
  	/declare componentId	  int	  local 0 
  	/declare combineSlot   int	  local   1 
  
  	/for compNum 1 to ${iCompCount} 
 	 /if (!${silentMode}) /echo -- components[${compNum}] = ${components[${compNum}]} : Length = ${components[${compNum}].Length} 
  		/if (!${components[${compNum}].Length})   /return 
  
  		/varset componentId ${FindItem[=${components[${compNum}]}].InvSlot.ID} 
  		
 		/if (${String[${componentId}].NotEqual[NULL]} && ${componentId} > 0) { 
  		   /call addComponent ${combineSlot} ${componentId} 
  		} else { 
  		   /echo khiTS addComponents Error: You are out of ${components[${compNum}]} 
  		   /varset cleanUpAndExit 1 
  		   /return 
  		} 
  	/next compNum 
  /return 
  
  
  Sub addComponent(int combineSlot, int packSlot) 
     /declare failCount   int	  local   0 
  	
     | Check container to see if it is full 
    | /if (${containerNum.Equal[e]}) { 
   |	 | No way I know of to check enviro containers for space - but I'm ignorant so... 
   |  } else { 
 |	 /if (!${Me.Inventory[pack${containerNum}].Container} - ${Me.Inventory[pack${containerNum}].Items}) { 
   |	    /echo khiTS AddComp Error: Unable to add this item to the container, it is full 
   |		/varset cleanUpAndExit 1 
   |		/return 
   |	 } 
   |  } 
  
     :FindEmptySlot 
     /if (${containerNum.Equal[e]}) { 
  	  /if (${combineSlot} > 10) { 
  		 /echo khiTS AddComp Error: No such slot ${combineSlot} in container 
  		 /varset cleanUpAndExit 1 
  		 /return 
  	  } 
     } else { 
  	  /if (${combineSlot} > ${Me.Inventory[pack${combineSlot}].Container}) { 
  		 /echo khiTS AddComp Error: No such slot ${combineSlot} in container 
  		 /varset cleanUpAndExit 1 
  		 /return 
  	  } 
     } 
  
     | See if there's anything in the slot in which we are trying to put the combine component 
     /if (${containerNum.Equal[e]}) { 
  	  /itemnotify in enviro ${combineSlot} leftmouseup 
  	
  	  | Make sure the cursor is clear, otherwise something was in that slot 
  	  /if (${Cursor.ID}) { 
  		 /itemnotify in enviro ${combineSlot} leftmouseup 
  		 /varcalc combineSlot ${combineSlot}+1 
  		 /goto :FindEmptySlot 
  	  } 
     } else { 
  	  /if (${Me.Inventory[pack${containerNum}].Item[${combineSlot}].ID}) { 
  		 /varcalc combineSlot ${combineSlot}+1 
  		 /varset combineSlot ${String[${combineSlot}].Arg[0,.]} 
  		 /goto :FindEmptySlot 
  	  } 
     } 
  
     :PickUpItem 
     | Slot is empty, so go ahead and put item into it 
     /ctrlkey /itemnotify ${packSlot} leftmouseup 
  
     |Check to see if cursor has multiple a stack. 
     /if (${Cursor.Stack} > 1 && ${failCount} < 3) { 
  	  /autoinv 
  	  /varcalc failCount ${failCount}+1 
  	  /goto :PickUpItem 
     } 
  
     /if (${containerNum.Equal[e]}) { 
  	  /itemnotify in enviro ${combineSlot} leftmouseup 
     } else { 
  	  /itemnotify in pack${containerNum} ${combineSlot} leftmouseup 
     } 
  /return 
  
  
  sub displayHelp 
  	/echo Syntax:   /macro khiTS "<recipe name>" "" 
  	/echo Example:  /macro khiTS "bits" "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0" 
  	/echo - 
  	/echo MAKE SURE THAT 
  	/echo * Recipe.ini is in your macro folder, or INIPATH points to your recipe.ini file 
  	/echo * Inventory is open. 
  	/echo * All your containers are open. 
  	/echo * Nothing crosses over each other, all windows (bags, inventory, buttons) must be free. 
 	/echo * Your windos positions are saved (by closing them and opening them again after they have been moved). 
  	/echo - 
  	/echo Options: 
  	/echo -------- 
  	/echo * show-stats 
  	/echo -- Syntax: show-stats=1|0 
  	/echo -- Example: show-stats=0 
  	/echo -- Shows combine statistics. 
  	/echo -- Set to 1 for show showing stats, 0 to leave out the stats. 
  	/echo -- Default set to 1 (show stats). 
  	/echo - 
  	/echo * destroy-results 
  	/echo -- Syntax: destroy-results=1|0 
  	/echo -- Example: destroy-results=1 
  	/echo -- Tells the macro wether end-result is destroyed or kept. 
  	/echo -- Set to 1 for destroying end-result, 1 to keep end-result. 
  	/echo -- Default set to 0 (keep end-result). 
  	/echo - 
  	/echo * abort-on-tell 
  	/echo -- Syntax: abort-on-tell=1|0 
  	/echo -- Example: abort-on-tell=1 
  	/echo -- Tell the macro wether it should /endmacro when recieving a tell. 
  	/echo -- Set to 1 for ending macro on tells, 0 to ignore tells. 
  	/echo -- Default set to 0 (ignore tells). 
  	/echo - 
  	/echo * end-on-trivial 
  	/echo -- Syntax: end-on-trivial=1|0 
  	/echo -- Example: end-on-trivial=1 
  	/echo -- Tell the macro wether it should stop when recieving a trivial message. 
  	/echo -- Set to 1 for ending macro on trivial, 0 to ignore trivial. 
  	/echo -- Default set to 0 (ignore trivial). 
  	/echo - 
  	/echo * make-this-many 
  	/echo -- Syntax: make-this-many=# 
  	/echo -- Example: make-this-many=100 
  	/echo -- The number of successfull combines you want made (or till no more components are available). 
      /echo -- Set to 0 for unlimited combines (or till no more components are available), or to the wanted amount. 
  	/echo -- Default set to 0 (unlimited). 
  	/echo - 
  	/echo * stop-at-skill-level 
  	/echo -- Syntax: stop-at-skill-level=### 
  	/echo -- Example: stop-at-skill-level=123 
  	/echo -- Tell the macro to stop when a certain skill level is reached. 
  	/echo -- Default set to 0 (do not stop at any skill level) 
  	/echo - 
  	/echo * silent-mode 
  	/echo -- Syntax: silent-mode=1|0 
  	/echo -- Example: silent-mode=1 
  	/echo -- Tell the macro to only output errors 
  	/echo -- Default set to 0 (output everything) 
  	/echo - 
  	/echo * debug 
  	/echo -- Syntax: debug=1|0 
  	/echo -- Example: debug=1 
  	/echo -- Tell the macro to only everything. This also sets silent-mode=0 
  	/echo -- Default set to 0 (do not output debugging information) 
  	/echo - 
  	/echo * close-container 
  	/echo -- Syntax: close-container=1|0 
  	/echo -- Example: close-container=1 
  	/echo -- Tell the macro to close the tradeskill container when finished 
  	/echo -- Default set to 1 
  /return 
   
  
  
  
  utils.inc: 
  
  Code: 
  
  | Generic sub to wait for something 
  | i.e. Cursor.ID, Merchant.Open, etc 
  Sub WaitFor 
     /declare MaxWaitCount timer local 1 
     :WaitForX 
     /echo WaitFor ${Param0} (${${Param0}}) 
     /if (${String[${${Param0}}].Equal[NULL]} && ${MaxWaitCounter} > 0) { 
  	  /delay 1 
  	  /goto :WaitForX 
     } else { 
  	  /delay 5 
  	  /if (${${Param0}})   /return 1 
     } 
  /return 0 
  
  
  Sub OpenPacks 
     /declare slotNumber int local 
  
  	| Open all packs if they aren't already 
  	/for slotNumber 1 to 8 
  		/if (!${Window[Pack${slotNumber}].Open}) { 
  			/itemnotify pack${slotNumber} rightmouseup 
  		} 
  	/next slotNumber 
  /return 
  
  
  Sub OpenBanks 
     /declare slotNumber int local 
  
  	| Open all bank packs if they aren't already 
  	/for slotNumber 1 to 18 
  		/if (!${Window[Bank${slotNumber}].Open}) { 
  		 /if (${slotNumber} < 17) { 
  			/itemnotify bank${slotNumber} rightmouseup 
  		 } else { 
  		    /itemnotify sharedbank${Int[${Math.Calc[${slotNumber}-16]}]} rightmouseup 
  		 } 
  		} 
  	/next slotNumber 
  /return 
  
  
  Sub ClosePacks 
     /declare slotNumber int local 
  
  	| Close all packs if they aren't already 
  	/for slotNumber 1 to 8 
  		/if (${Window[Pack${slotNumber}].Open}) { 
  			/itemnotify pack${slotNumber} rightmouseup 
  		} 
  	/next slotNumber 
  /return 
  
  
  Sub CloseBanks 
     /declare slotNumber int local 
  
     | Open all bank packs if they aren't already 
     /for slotNumber 1 to 18 
  	  /if (${Window[bank${slotNumber}].Open}) { 
  		 /if (${slotNumber} < 17) { 
  			/itemnotify bank${slotNumber} rightmouseup 
  		 } else { 
  		    /itemnotify sharedbank${Int[${Math.Calc[${slotNumber}-16]}]} rightmouseup 
  		 } 
  	  } 
     /next slotNumber 
  /return 
  
  
  | Finds the value of an argument in a parameter string 
  | Use __ in place of spaces 
  sub parseArguments(string sArgument, string sParameters) 
  	/declare iArgNum	int	 local 
  	/declare sArgValue  string  local 
  	
  	/for iArgNum 1 to ${sParameters.Count[=]} 
  	   /if (${sParameters.Arg[${iArgNum}, ].Left[${sArgument.Length}].Equal[${sArgument}]}) { 
  		  |/declare tmp int local ${sArgument.Length} 
  		  |/varcalc tmp (${tmp}+1)*-1 
  		  |/varset sArgValue ${sParameters.Arg[${iArgNum}, ].Right[${tmp}]} 
  		  
 		 /varset sArgValue ${sParameters.Arg[${iArgNum}, ].Right[${Math.Calc[(${sArgument.Length}+1)*-1]}]} 
  		  
  		  /if (${String[${sArgValue.Find[__]}].NotEqual[NULL]}) { 
  			 /declare sepLoop int local 
  			 /declare tmpValue string local ${sArgValue} 
  			 /varset sArgValue 
  
 			 /for sepLoop 1 to ${Math.Calc[${tmpValue.Count[_]}+1]} 
 				/if (${Math.Calc[${sepLoop}%2]}) { 
 				 /varset sArgValue ${sArgValue} ${tmpValue.Token[${sepLoop},_]} 
  				} 
  			 /next sepLoop 
  		  } 
  
  		  /return ${sArgValue} 
  	   } 
  	/next iArgNum 
  /return __NOT_FOUND__ 
   
   
   
  Wed Jul 07, 2004 5:13 pm	   
   
   
   gumper
   
  
  
   
  
  Rank: orc pawn
   
  
  Joined: 10 Jul 2003
   
  
  Posts: 16
   
  
   Post subject:  
     
   
 After reading through all the posts Im still unsure how to use this macro.. I would like to skill up my warriors fletching skills soon and tried powerarrows but it doesnt seem to work, so how exactly do i use this macro to do this for me. I have all the recipes of arrows to get me to 202, but dont know how to plug that into the macro. 
  
  thanks 
   
  Tue Jul 13, 2004 2:54 am	   
   
   
   aChallenged1
   
  
  
   
  
  Rank: a grimling bloodguard
   
  
  Joined: 29 Jun 2004
   
  
  Posts: 916
   
  
   Post subject:  
     
   
 powerarrow would not have worked unless you corrected the errors inserted by a recent change in the BBCode in use here. I left some info there for you, not sure if it will make it work, but it will correct part of the problem. 
   
  Tue Jul 13, 2004 3:25 am	   
   
   
   masacist
   
  
  
   
  
  Rank: orc pawn
   
  
  Joined: 27 Jan 2004
   
  
  Posts: 11
   
  
   Post subject:  
     
   
  ok everythings setup and when i run the macro it says it cannot find the "recipe.ini" file. 
  
  i have placed this file in both the Macro folder and INI folder and still it cannot find it  
  
  anything i'm missing at all guys? 
  
  
  Code: 
  |** 
  khiTS.mac 
  
  Author: Kaitain Heavy Industries 
  Date: 30 Apr 04 
  Version: 2.2.2.14 
  
  Description: 
  Performs tradeskill combines using recipes supplied in an ini file 
  
  Credits: 
  Inspired by Dont_Know_At_All's Trade Skills macro - The status report idea is completely stolen from him (but rewritten by me) 
  Ini file uses the format created by Diggler (this will eventually being changed to a new format using item id's) 
  
  Notes: 
  * Updated to use MQ2DataVars 
  * This is a complete overhaul of the whole macro in addition changing it to work with MQ2Data and MQ2DataVars 
  * You should be able to simply rename "sub main" to "sub khiTS" if you want to use this as an included file. 
  * No longer destroys tools or components used to do combines when destroy-results is enabled. 
  * This is a BIG macro and may be slow as hell on older computers. 
  
  Usage: 
  #include khits.inc 
  . 
  . 
  . 
  /call Make <recipe_name>  
  
  Example: 
  /call Make khits bits "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0 silent-mode=0 stop-at-skill-level=200" 
  Ported to Inc by Draco 
  **| 
  
  | ***** Tweak this to your computer, if you get a lot of an item in the combine container, increase this number ***** | 
  #define COMBINE_DELAY 5 
  
  | ***** CHANGE THIS TO MATCH YOUR INI FILE NAME IF NECESSARY ***** | 
  #define INIPATH "recipe.ini" 
  
  
  #event SkillTrivial "You can no longer advance your skill from making this item#*#" 
  #event SkillUp "You have become better at #1#! (#2#)" 
  #event SkillFailure "You lacked the skills#*#" 
  #event SkillSuccess "You have fashioned the items together to create something new#*#" 
  #event FullInventory "There was no place to put that#*#" 
  #event CombineError "You cannot combine these items in this container type!" 
  #event HandsFull "You cannot combine items when your hands are full#*#" 
  
  #chat tell 
  
  #define COMBINE_SUCCESS 0 
  #define COMBINE_FAILED 1 
  #define COMBINE_ERROR 2 
  #define COMBINE_INVENTORY_FULL 3 
  #define COMBINE_TRIVIAL 4 
  
  #include utils.inc 
  
  | Main entry point 
  Sub Main 
  /echo 
  /echo ***************************************** 
  /echo khiTs: Tradeskills running : ${Time} 
  /echo ***************************************** 
  /echo 
  
  
  | Check for no parameters or help 
  /if (!${Defined[Param0]} || ${Param0.Equal[HELP]}) { 
  /call displayHelp 
  /call clearCursor ${iDestroyResults} 
  /endmacro 
  } 
  
  | container in which the recipe will be made 
  /declare containerName string local NOT_SET 
  
  | The name of the current component we're getting 
  /declare currentComp string local NOT_SET 
  
  | Make sure we have that recipe in the ini file 
  /declare recipeCheck string local NOT_SET 
  
  | Settings (see end of this file for list of settings) 
  | Stops the macro if someone sends you a tell 
  /declare abortOnTell int local 0 
  
  | How many itmes the user has requested be made 
  /declare makeThisMany int local 0 
  
  | Display when you succed, get skillups, fail, etc. 
  /declare showStats int local 0 
  
  | For looping through containers 
  /declare slotNumber int local 1 
  
  
  | Exit and Return Flags added by Draco 
  /declare combineResult int outer 0 
  /declare cleanUpAndExit int outer 0 
  /declare combineErrorCounter int outer 0 
  
  | Only declare outer variables once, this is in case you use this as an include 
  /if (!${Defined[components]}) { 
  | Array of components used to make the recipe 
  /declare components[10] string outer 
  
  | The name of the combination being done, this is used to look up the recipe in the recipe.ini file 
  /declare recipeName string outer 
  
  | Container in which the recipe will be made 
  /declare containerNum string outer NOT_SET 
  
  | The number of components in the recipe 
  /declare iCompCount int outer 0 
  
  | Flags 
  /declare bCombineDone bool outer FALSE 
  /declare bSkillTrivial bool outer FALSE 
  
  | Destroys the results of a combine (but not any items used in the combine) 
  /declare iDestroyResults int outer 0 
  
  | Stops the macro when you can no longer get skillups from doing the combine 
  /declare iEndOnTrivial int outer 0 
  
  | How many times you've tried a combination 
  /declare iSkillAttempts int outer 0 
  
  | How many times it worked 
  /declare iSkillSuccess int outer 0 
  
  | How many times it didn't work 
  /declare iSkillFailure int outer 0 
  
  | How many skill points you have received 
  /declare iSkillUps int outer 0 
  
  | Skill level to stop at 
  /declare iStopAtSkillLevel int outer 0 
  
  | Keeps MQ window spam to a minimum 
  /declare silentMode int outer 0 
  
  | Output debugging information 
  /declare debug int outer 0 
  
  | Flag to close tradeskill container when finished 
  /declare iCloseContainer int outer 1 
  
  | The results of what we are making 
  /declare sResults string outer 
  
  | Skill we are using (i.e. Brewing, Smithing, etc) 
  /declare sUsing string outer NOT_SET 
  } else { 
  | Clean out the last components used, this is in case we have not cleared the variables or are using this as an include 
  /deletevar components 
  /declare components[10] 
  } 
  
  
  |Get requested recipe's name 
  /varset recipeName ${Param0} 
  
  | If there is only one parameter, then there are no options 
  /if (${Defined[Param1]}) { 
  /declare tmp int local 
  /declare parms int local ${Macro.Params} 
  /declare parmString string local 
  /varcalc parms ${parms}-1 
  
  /for tmp 1 to ${parms} 
  /varset parmString ${parmString} ${Param${tmp}} 
  /next tmp 
  
  /call parseArguments "abort-on-tell" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset abortOnTell ${Macro.Return} 
  } 
  
  /call parseArguments "destroy-results" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset iDestroyResults ${Macro.Return} 
  } 
  
  /call parseArguments "end-on-trivial" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset iEndOnTrivial ${Macro.Return} 
  } 
  
  /call parseArguments "make-this-many" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset makeThisMany ${Macro.Return} 
  } 
  
  /call parseArguments "show-stats" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset showStats ${Macro.Return} 
  } 
  
  /call parseArguments "stop-at-skill-level" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset iStopAtSkillLevel ${Macro.Return} 
  } 
  
  /call parseArguments "close-container" "${parmString}" 
  
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset iCloseContainer ${Macro.Return} 
  } 
  
  /call parseArguments "debug" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset debug ${Macro.Return} 
  } 
  
  /if (!${debug}) { 
  /call parseArguments "silent-mode" "${parmString}" 
  /if (${Macro.Return.NotEqual[__NOT_FOUND__]}) { 
  /varset silentMode ${Macro.Return} 
  } 
  } else { 
  /echo ***** DEBUGGING ON ***** 
  } 
  } 
  
  | Make sure the recipe file exists (the recipes thing is a fix for a bug in the Ini function) 
  /varset recipeCheck ${Ini[INIPATH,recipes]} 
  /if (${recipeCheck.Equal[NULL]}) { 
  /echo khiTS Error: Recipe file not found 
  /echo Path = INIPATH 
  /goto :khiTSreset 
  } 
  
  | Make sure this recipe exists in the recipe.ini file 
  /varset recipeCheck ${Ini[INIPATH,${recipeName}]} 
  /if (${recipeCheck.Equal[NULL]}) { 
  /echo khiTS Error: Recipe not found 
  /echo Recipe name = ${recipeName} 
  /goto :khiTSreset 
  } 
  
  | Get the container name 
  /varset containerName ${Ini[INIPATH,${recipeName},Cont]} 
  /if (${containerName.Equal[NULL]}) { 
  /echo khiTS Error: Error in ini file for this recipe, no container is specified 
  /echo khiTS : Recipe = ${RecipeName} 
  /goto :khiTSreset 
  } 
  
  | Get the skill we are using 
  /varset sUsing ${Ini[INIPATH,${recipeName},Skill]} 
  /if (${sUsing.Equal[NULL]}) /varset sUsing NOT_SET 
  
  | Get the item we are making 
  /varset sResults ${Ini[INIPATH,${recipeName},LongName]} 
  /if (${sResults.Equal[NULL]}) /varset sResults ${recipeName} 
  
  | Find the combine container number 
  /if (${containerName.Equal[Enviro]}) { 
  /if (!${Window[Enviro].Open}) { 
  /echo khiTS Error: You must have the enviromental container open to begin 
  /goto :khiTSreset 
  } 
  /varset containerNum e 
  } else { 
  | Not an enviromental container so find the container's pack number, this is how we will refer to it from now on 
  /varset containerNum ${FindItem[=${containerName}].InvSlot.ID} 
  /if (${containerNum}) { 
  /varcalc containerNum ${containerNum}-21 
  /varset containerNum ${containerNum.Arg[0,.]} 
  } else { 
  | Didn't find the container 
  /echo khiTS Error: Could not find container in your inventory 
  /echo khiTS : Contanier name = ${containerName} 
  /goto :khiTSreset 
  } 
  } 
  
  | Read the ingredients for the recipe from the ini file 
  :khiTSReadComponentsLoop 
  /varset currentComp ${Ini[INIPATH,${recipeName},Comp${iCompCount}]} 
  /if (${currentComp.NotEqual[NULL]}) { 
  /varcalc iCompCount ${iCompCount}+1 
  /varset components[${iCompCount}] ${currentComp} 
  /goto :khiTSReadComponentsLoop 
  } 
  
  /call OpenPacks 
  
  | Remove anything from the cursor if needed 
  /call clearCursor ${iDestroyResults} 
  
  | Clear the combine pack 
  /call cleanPack ${containerNum} 
  /if (${cleanUpAndExit}) /goto :khiTSreset 
  
  | Let's just do this here rather than through every iteration of combines 
  /declare MAIN_CONTAINER string local 
  /if (${containerNum.Equal[e]}) { 
  /varset MAIN_CONTAINER enviro 
  } else { 
  /varset MAIN_CONTAINER pack${containerNum} 
  } 
  
  
  :khiTSCombineLoop 
  | Delete or Save items depending on settings 
  /call clearCursor ${iDestroyResults} 
  
  /if (!${silentMode}) /echo khiTS: Making ${sResults} - Count = ${iSkillSuccess} 
  
  | Move ingredients to container 
  /call addComponents 
  /if (${cleanUpAndExit}) /goto :khiTSCleanUpMacro 
  
  | Combine 
  /varset bCombineDone FALSE 
  /varcalc iSkillAttempts ${iSkillAttempts}+1 
  
  :DoCombineLoop 
  /combine ${MAIN_CONTAINER} 
  
  | Need this delay here to make sure the combine is finished 
  /delay COMBINE_DELAY 
  
  | Call these events individually so they do not conflict with a parent macro if this macro is used as an included file 
  /doevents SkillTrivial 
  /doevents SkillUp 
  /doevents SkillFailure 
  /doevents SkillSuccess 
  /doevents CombineError 
  /doevents FullInventory 
  /doevents tell 
  /doevents HandsFull 
  
  /if (${cleanUpAndExit}) /goto :khiTSCleanUpMacro 
  /if (!${bCombineDone}) /goto :DoCombineLoop 
  
  /varset combineErrorCounter 0 
  
  | See if we have made enough 
  /if (${makeThisMany} && ${makeThisMany} == ${iSkillSuccess}) /goto :khiTSCleanUpMacro 
  
  /goto :khiTSCombineLoop 
  
  | The macro is ending, clean up 
  :khiTSCleanUpMacro 
  | Delete or Save items depending on settings - Just in case 
  /call clearCursor ${iDestroyResults} 
  /call cleanPack ${containerNum} 
  /call DisplayStats 
  
  :khiTSreset 
  /if (${iCloseContainer}) /notify ContainerWindow DoneButton leftmouseup 
  /call resetKhits 
  
  /return ${combineResult} 
  
  
  Sub resetKhits 
  /deletevar combineResult 
  /deletevar cleanUpAndExit 
  /deletevar combineErrorCounter 
  /deletevar containerNum 
  /deletevar iCompCount 
  /deletevar bCombineDone 
  /deletevar bSkillTrivial 
  /deletevar iDestroyResults 
  /deletevar iEndOnTrivial 
  /deletevar iSkillAttempts 
  /deletevar iSkillSuccess 
  /deletevar iSkillFailure 
  /deletevar iSkillUps 
  /deletevar sResults 
  /deletevar components 
  /deletevar iStopAtSkillLevel 
  /deletevar recipeName 
  /deletevar iCloseContainer 
  /return 
  
  
  
  sub clearCursor(int DestroyResults) 
  /declare saveCount int local 
  
  :khiTSClearCursorLoop 
  /delay 2 ${Cursor.ID} 
  
  | Is there anything on the cursor? 
  /if (${Cursor.ID}) { 
  /if (${DestroyResults}) { 
  | Make sure the item on the cursor is not something we want to save 
  /for saveCount 1 to 10 
  /if (${components[${saveCount}].Equal[${Cursor.Name}]}) { 
  /if (!${silentMode}) /echo -- Saving ${components[${saveCount}]} to inventory 
  /autoinv 
  /goto :khiTSClearCursorLoop 
  } 
  /next saveCount 
  
  | Whatever is on the cursor wasn't in the save list 
  /if (!${silentMode}) /echo -- Destroying ${Cursor.Name} 
  /destroy 
  } else { 
  /autoinv 
  } 
  
  /goto :khiTSClearCursorLoop 
  } 
  /return 
  
  
  
  Sub DisplayStats 
  /echo 
  /echo khiTS: Stat display 
  /echo ================================ 
  /echo Attempts: ${iSkillAttempts} 
  /echo Successes: ${iSkillSuccess} 
  /echo Faliures: ${iSkillFailure} 
  /echo Skill Ups: ${iSkillUps} 
  
  /if (${Me.Skill[${sUsing}]}) { 
  /echo Skill Level: ${Me.Skill[${sUsing}]} 
  } else { 
  /echo Skill Level: Unknown 
  } 
  /return 
  
  
  
  Sub Event_Chat(string type, string sender, string text) 
  /if (${String[${abt}].Equal[TRUE]} && ${type.Equal[tell]} ) { 
  /echo khiTS Event_Chat: Got a tell, pausing. 
  /if (!${Defined[pauseTimer]}) /declare pauseTimer timer outer 
  /varset pauseTimer 600 
  :TellPause 
  /if (${Spawn[gm]}) { 
  /if (!${Me.Sitting}) /docommand /sit 
  /docommand /camp desktop 
  /call mqout "GM in Zone! Logging out" 
  /endmacro 
  } 
  
  /if (${pauseTimer<1}) /return 
  /goto :TellPause 
  /mqpause 
  } 
  /return 
  
  
  
  Sub Event_HandsFull 
  /echo khiTS Event_HandsFull Error: Unrecoverable error, ending macro 
  /endmacro 
  /return 
  
  
  
  Sub Event_CombineError 
  /varcalc combineErrorCounter ${combineErrorCounter}+1 
  /if (!${silentMode}) /echo khiTS Event_CombineError: ${combineErrorCounter} 
  
  /endmacro 
  
  | *** FIXME *** | 
  /if (${combineErrorCounter} < 3) { 
  /call cleanPack ${containerNum} 
  /call clearCursor ${iDestroyResults} 
  /varset bCombineDone TRUE 
  } else { 
  /varset combineResult COMBINE_ERROR 
  /varset cleanUpAndExit 1 
  } 
  /return 
  
  
  
  Sub Event_FullInventory 
  /echo khiTS Event_FullInventory Error: Your inventory is full, ending macro. 
  /call DisplayStats 
  /varset combineResult COMBINE_INVENTORY_FULL 
  /varset cleanUpAndExit 1 
  /return 
  
  
  
  Sub Event_SkillFailure 
  /varcalc iSkillFailure ${iSkillFailure}+1 
  /varset bCombineDone TRUE 
  /varset combineResult COMBINE_FAILED 
  /return 
  
  
  
  Sub Event_SkillSuccess 
  /if (${sResults.Equal[${recipeName}]}) { 
  /declare MaxWaitCount timer local 100 
  :WaitForIt 
  /delay 2 ${Cursor.ID} 
  /if (!${Cursor.ID} && !${MaxWaitCount} == 0) /goto :WaitForIt 
  /varset sResults ${Cursor.Name} 
  } 
  
  /varcalc iSkillSuccess ${iSkillSuccess}+1 
  /varset bCombineDone TRUE 
  /varset combineResult COMBINE_SUCCESS 
  /return 
  
  
  
  Sub Event_SkillUp 
  /varset sUsing ${Param1} 
  /varcalc iSkillUps ${iSkillUps}+1 
  
  /if (${iStopAtSkillLevel} && ${iStopAtSkillLevel} == ${Param2}) { 
  /call DisplayStats 
  /call cleanPack ${containerNum} 
  /call clearCursor ${iDestroyResults} 
  /varset cleanUpAndExit 1 
  } 
  /return 
  
  
  
  Sub Event_SkillTrivial 
  /if (!${bSkillTrivial}) { 
  /echo khiTS Event_SkillTrivial: Skill is trivial 
  /varset bSkillTrivial TRUE 
  } 
  
  /if (${iEndOnTrivial}) { 
  /call DisplayStats 
  /call cleanPack ${containerNum} 
  /call clearCursor ${iDestroyResults} 
  /varset cleanUpAndExit 1 
  } 
  
  /varset combineResult COMBINE_TRIVIAL 
  /return 
  
  
  
  sub cleanPack(string PackNumber) 
  /if (!${silentMode}) /echo khiTS cleanPack: Cleaning out pack: ${PackNumber} 
  
  | Used for looping through pack slots 
  /declare iSlot int local 
  
  | How many freeslots are in the bag 
  /declare iCount int local 
  
  /if (${PackNumber.Equal[e]}) { 
  /if (!${silentMode}) /echo khiTs cleanPack: Clearing enviro 
  
  /for iSlot 1 to 10 
  /if (${InvSlot[enviro${iSlot}].Item.ID}) { 
  /shiftkey /itemnotify enviro${iSlot} leftmouseup 
  /call clearCursor ${iDestroyResults} 
  } 
  /next iSlot 
  } else { 
  /if (!${silentMode}) /echo khiTs cleanPack: Cleaning out ${PackNumber} 
  | Can't empty a non-pack duh! 
  /if (!${Me.Inventory[Pack${PackNumber}].Container}) { 
  /echo khiTs cleanPack Error: No pack in slot 
  /varset cleanUpAndExit 1 
  /return 
  } 
  
  /for iSlot 1 to ${Me.Inventory[Pack${PackNumber}].Container} 
  | Quit if the pack is empty 
  /if (!${Me.Inventory[Pack${PackNumber}].Container}) /return 
  
 /if (${debug}) /echo khiTs cleanPack: Clearing Pack: Pack${PackNumber}, Slot:${iSlot}, Item: ${Me.Inventory[Pack${PackNumber}].Item[${iSlot}]} 
  
  /if (${Me.Inventory[Pack${PackNumber}].Item[${iSlot}].ID}) { 
  /varset iCount ${Me.Inventory[Pack${PackNumber}].Items} 
  
  /shiftkey /itemnotify in pack${PackNumber} ${iSlot} leftmouseup 
  /call clearCursor ${iDestroyResults} 
  
  | Make sure we aren't just putting it back in the same bag 
  /if (${Me.Inventory[Pack${PackNumber}].Items} == ${iCount}) { 
  /echo khiTs cleanPack Error: Unable to empty pack 
  /varset cleanUpAndExit 1 
  /return 
  } 
  } 
  /next iSlot 
  } 
  
  /if (!${silentMode}) /echo khiTs: Done Cleaning pack 
  /return TRUE 
  
  
  
  Sub addComponents 
  /declare newLen int local 
  /declare compNum int local 
  /declare componentId int local 0 
  /declare combineSlot int local 1 
  
  /for compNum 1 to ${iCompCount} 
  /if (!${silentMode}) /echo -- components[${compNum}] = ${components[${compNum}]} : Length = ${components[${compNum}].Length} 
  /if (!${components[${compNum}].Length}) /return 
  
  /varset componentId ${FindItem[=${components[${compNum}]}].InvSlot.ID} 
  
  /if (${String[${componentId}].NotEqual[NULL]} && ${componentId} > 0) { 
  /call addComponent ${combineSlot} ${componentId} 
  } else { 
  /echo khiTS addComponents Error: You are out of ${components[${compNum}]} 
  /varset cleanUpAndExit 1 
  /return 
  } 
  /next compNum 
  /return 
  
  
  Sub addComponent(int combineSlot, int packSlot) 
  /declare failCount int local 0 
  
  | Check container to see if it is full 
  /if (${containerNum.Equal[e]}) { 
  | No way I know of to check enviro containers for space - but I'm ignorant so... 
  } else { 
  /if (!${Me.Inventory[pack${containerNum}].Container} - ${Me.Inventory[pack${containerNum}].Items}) { 
  /echo khiTS AddComp Error: Unable to add this item to the container, it is full 
  /varset cleanUpAndExit 1 
  /return 
  } 
  } 
  
  :FindEmptySlot 
  /if (${containerNum.Equal[e]}) { 
  /if (${combineSlot} > 10) { 
  /echo khiTS AddComp Error: No such slot ${combineSlot} in container 
  /varset cleanUpAndExit 1 
  /return 
  } 
  } else { 
  /if (${combineSlot} > ${Me.Inventory[pack${combineSlot}].Container}) { 
  /echo khiTS AddComp Error: No such slot ${combineSlot} in container 
  /varset cleanUpAndExit 1 
  /return 
  } 
  } 
  
  | See if there's anything in the slot in which we are trying to put the combine component 
  /if (${containerNum.Equal[e]}) { 
  /itemnotify in enviro ${combineSlot} leftmouseup 
  
  | Make sure the cursor is clear, otherwise something was in that slot 
  /if (${Cursor.ID}) { 
  /itemnotify in enviro ${combineSlot} leftmouseup 
  /varcalc combineSlot ${combineSlot}+1 
  /goto :FindEmptySlot 
  } 
  } else { 
  /if (${Me.Inventory[pack${containerNum}].Item[${combineSlot}].ID}) { 
  /varcalc combineSlot ${combineSlot}+1 
  /varset combineSlot ${String[${combineSlot}].Arg[0,.]} 
  /goto :FindEmptySlot 
  } 
  } 
  
  :PickUpItem 
  | Slot is empty, so go ahead and put item into it 
  /ctrlkey /itemnotify ${packSlot} leftmouseup 
  
  |Check to see if cursor has multiple a stack. 
  /if (${Cursor.Stack} > 1 && ${failCount} < 3) { 
  /autoinv 
  /varcalc failCount ${failCount}+1 
  /goto :PickUpItem 
  } 
  
  /if (${containerNum.Equal[e]}) { 
  /itemnotify in enviro ${combineSlot} leftmouseup 
  } else { 
  /itemnotify in pack${containerNum} ${combineSlot} leftmouseup 
  } 
  /return 
  
  
  sub displayHelp 
  /echo Syntax: /macro khiTS "<recipe name>" "" 
  /echo Example: /macro khiTS "bits" "show-stats=0 destroy=0 abort-on-tell=0 end-on-trivial=0" 
  /echo - 
  /echo MAKE SURE THAT 
  /echo * Recipe.ini is in your macro folder, or INIPATH points to your recipe.ini file 
  /echo * Inventory is open. 
  /echo * All your containers are open. 
  /echo * Nothing crosses over each other, all windows (bags, inventory, buttons) must be free. 
  /echo * Your windos positions are saved (by closing them and opening them again after they have been moved). 
  /echo - 
  /echo Options: 
  /echo -------- 
  /echo * show-stats 
  /echo -- Syntax: show-stats=1|0 
  /echo -- Example: show-stats=0 
  /echo -- Shows combine statistics. 
  /echo -- Set to 1 for show showing stats, 0 to leave out the stats. 
  /echo -- Default set to 1 (show stats). 
  /echo - 
  /echo * destroy-results 
  /echo -- Syntax: destroy-results=1|0 
  /echo -- Example: destroy-results=1 
  /echo -- Tells the macro wether end-result is destroyed or kept. 
  /echo -- Set to 1 for destroying end-result, 1 to keep end-result. 
  /echo -- Default set to 0 (keep end-result). 
  /echo - 
  /echo * abort-on-tell 
  /echo -- Syntax: abort-on-tell=1|0 
  /echo -- Example: abort-on-tell=1 
  /echo -- Tell the macro wether it should /endmacro when recieving a tell. 
  /echo -- Set to 1 for ending macro on tells, 0 to ignore tells. 
  /echo -- Default set to 0 (ignore tells). 
  /echo - 
  /echo * end-on-trivial 
  /echo -- Syntax: end-on-trivial=1|0 
  /echo -- Example: end-on-trivial=1 
  /echo -- Tell the macro wether it should stop when recieving a trivial message. 
  /echo -- Set to 1 for ending macro on trivial, 0 to ignore trivial. 
  /echo -- Default set to 0 (ignore trivial). 
  /echo - 
  /echo * make-this-many 
  /echo -- Syntax: make-this-many=# 
  /echo -- Example: make-this-many=100 
  /echo -- The number of successfull combines you want made (or till no more components are available). 
  /echo -- Set to 0 for unlimited combines (or till no more components are available), or to the wanted amount. 
  /echo -- Default set to 0 (unlimited). 
  /echo - 
  /echo * stop-at-skill-level 
  /echo -- Syntax: stop-at-skill-level=### 
  /echo -- Example: stop-at-skill-level=123 
  /echo -- Tell the macro to stop when a certain skill level is reached. 
  /echo -- Default set to 0 (do not stop at any skill level) 
  /echo - 
  /echo * silent-mode 
  /echo -- Syntax: silent-mode=1|0 
  /echo -- Example: silent-mode=1 
  /echo -- Tell the macro to only output errors 
  /echo -- Default set to 0 (output everything) 
  /echo - 
  /echo * debug 
  /echo -- Syntax: debug=1|0 
  /echo -- Example: debug=1 
  /echo -- Tell the macro to only everything. This also sets silent-mode=0 
  /echo -- Default set to 0 (do not output debugging information) 
  /echo - 
  /echo * close-container 
  /echo -- Syntax: close-container=1|0 
  /echo -- Example: close-container=1 
  /echo -- Tell the macro to close the tradeskill container when finished 
  /echo -- Default set to 1 
  /return

restock2.ini

Rich (BB code):
[Character name]
Celestial Essence=100

restock.ini

Rich (BB code):
[character name]
The Scent of Marr=660
Celestial Solvent=660

recipe.ini

Rich (BB code):
[Recipes]
Test=True

[Accuracy]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Blue Vervain Bulb
Comp2=Fenugreek

[acorn]
Cont=Enviro
Comp0=Misty Acorn
Comp1=Water Flask

[AcornOil]
Cont=Enviro
Comp0=Misty Acorn
Comp1=Water Flask

[acryliabits]
Cont=Enviro
Comp0=Small Piece Of Acrylia
Comp1=Small Piece Of Acrylia
Comp2=Water Flask

[acryliasheet]
Cont=Enviro
Comp0=Block Of Acrylia Ore
Comp1=Smithy Hammer
Comp2=Water Flask

[Adrenaline]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Dhea

[Adr]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Dhea

[Adroitness]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Blue Vervain Bulb
Comp2=Sage Leaf

[advancedpoisonvial]
Cont=Enviro
Comp0=High Quality Firing Sheet
Comp1=Unfired Advanced Poison Vial

[advancedpropulsionunit]
Cont=Enviro
Comp0=Coiled Spring
Comp1=Firewater
Comp2=Saltpeter
Comp3=Tinkered Catapult

[Ale]
Cont=Enviro
Comp0=Barley
Comp1=Cask
Comp2=Malt
Comp3=Water Flask

[Ant]
Cont=Medicine Bag
Comp0=Celandine Herb
Comp1=Sumbul

[Antibody]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Maidenhair Fern
Comp2=Mullein

[AntiWeight]
Cont=Medicine Bag
Comp0=Hydrangea
Comp1=Sumbul

[ApricotMarmalade]
Cont=spit
Comp0=Frosting
Comp1=Frosting
Comp2=Frosting
Comp3=Fruit

[aqualung]
Cont=Enviro
Comp0=Fine Coral Mesh
Comp1=Fresh Fish
Comp2=Gnomish Bolts
Comp3=Metal Rod
Comp4=Metal Twine
Comp5=Silk Lined Steel Helm

[AquaticHaunt]
Cont=Medicine Bag
Comp0=Hydrangea
Comp1=Jatamasi

[Arrow102Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[Arrow36Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Medium Groove Nocks
Comp3=Several Round Cut Fletchings

[Arrow46Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Parabolic Cut Fletchings

[Arrow56Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Several Round Cut Fletchings
Comp3=Small Groove Nocks

[Arrow68Triv]
Cont=Fletching Kit
Comp0=Bundled Bone Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[Arrow82Triv]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Shield Cut Fletchings

[arrowz]
Cont=Planar Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Ceramic Arrow Vanes

[artisanseal]
Cont=Enviro
Comp0=Mounted Black Sapphire
Comp1=Mounted Blue Diamond
Comp2=Mounted Diamond
Comp3=Mounted Jacinth
Comp4=Small Block Of Clay
Comp5=Vial Of Purified Mana
Comp6=Water Flask

[ashafts]
Cont=Enviro
Comp0=Arrow Shaft Mold
Comp1=Small Brick Of Acrylia Ore
Comp2=Water Flask

[AshenDye]
Cont=Enviro
Comp0=Ashweed
Comp1=Water Flask

[Assailing]
Cont=Medicine Bag
Comp0=Bugbane
Comp1=Cyclop's Eye

[BA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Sage Leaf
Comp2=Sumbul

[BA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Elderberry
Comp2=Sage Leaf

[BA3]
Cont=Medicine Bag
Comp0=Briar Thistle
Comp1=Figwort
Comp2=Sage Leaf

[BA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Briar Thistle
Comp2=Clover
Comp3=Dhea
Comp4=Sage Leaf

[baas]
Cont=Enviro
Comp0=Arrow Shaft Mold
Comp1=Small Brick Of Acrylia Ore
Comp2=Water Flask

[BandedGorget]
Cont=Enviro
Comp0=Gorget Mold
Comp1=Sheet Metal
Comp2=Water Flask

[BandedHelm]
Cont=Enviro
Comp0=Helm Mold
Comp1=Sheet Metal
Comp2=Sheet Metal
Comp3=Water Flask

[BandedMail]
Cont=Enviro
Comp0=Mail Sectional Mold
Comp1=Sheet Metal
Comp2=Sheet Metal
Comp3=Sheet Metal
Comp4=Water Flask

[Barbarian]
Cont=Medicine Bag
Comp0=Barbarian Meat
Comp1=Wormwood

[baseprototype]
Cont=Enviro
Comp0=Grease
Comp1=Pinion
Comp2=Steel Ball Bearing
Comp3=Steel Casing

[BDP]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Jar Of Acid

[BearCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Bear

[bearfilletcream]
Cont=Enviro
Comp0=Creamy Fennel Sauce
Comp1=Filleted Bear

[BearFillets]
Cont=spit
Comp0=Bear Meat
Comp1=Filleting Knife

[bits]
Cont=Enviro
Comp0=Small Piece Of Ore
Comp1=Small Piece Of Ore
Comp2=Water Flask

[bdust]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Imbued Emerald
Comp2=Jar Of Acid

[BlockMQOre]
Cont=Enviro
Comp0=Large Brick Of Medium Quality Ore
Comp1=Large Brick Of Medium Quality Ore
Comp2=Large Brick Of Medium Quality Ore
Comp3=Water Flask

[bluediamondpowder]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Jar Of Acid

[boarchops]
Cont=Collapsible Spit
Comp0=Boar Meat
Comp1=Garnish
Comp2=Spices

[bogjuice]
Cont=Enviro
Comp0=Bottle
Comp1=Snake Scales
Comp2=Water Flask

[BoneField]
Cont=Medicine Bag
Comp0=Heliotrope
Comp1=Sandlewood

[Bracelet]
Cont=Kit
Comp0=System.collections.arraylist
Comp1=System.collections.arraylist

[BreadedStormSalmon]
Cont=Collapsible Spit
Comp0=Bread Crumbs
Comp1=Garnish
Comp2=Jug Of Sauces
Comp3=Storm Salmon

[BreathlessMist]
Cont=Medicine Bag
Comp0=A Cork
Comp1=Cave Algea
Comp2=Empty Vial
Comp3=Oakmoss
Comp4=Sage Leaf
Comp5=Woundwart

[brick]
Cont=Enviro
Comp0=Brick
Comp1=Brick
Comp2=Water Flask

[bucket]
Cont=Enviro
Comp0=Bucket Mold
Comp1=Metal Bits
Comp2=Metal Bits
Comp3=Water Flask

[C1WHA]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Medium Groove Nocks
Comp3=Several Round Cut Fletchings

[C1WS]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Large Groove Nocks
Comp2=Several Round Cut Fletchings
Comp3=Silver Tipperd Arrowheads

[C1WSA]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Large Groove Nocks
Comp2=Several Round Cut Fletchings
Comp3=Silver Tipped Arrowheads

[C2SSA]
Cont=Planar Fletching Kit
Comp0=Bundled Steel Arrow Shafts
Comp1=Several Parabolic Cut Fletchings
Comp2=Silver Tipped Arrowheads
Comp3=Small Groove Nocks

[C2WPA]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Several Parabolic Cut Fletchings
Comp3=Small Groove Nocks

[C4BHA]
Cont=Fletching Kit
Comp0=Bundled Bone Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Medium Groove Nocks
Comp3=Set Of Wooden Arrow Vanes

[c5wp]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Bone Arrow Vanes

[C6sta]
Cont=Collapsible Fletching Kit
Comp0=Bundled Wooded Arrow Shafts
Comp1=Medium Groove Nocks
Comp2=Set Of Ceramic Arrow Vanes
Comp3=Silver Tiped Arrowheads

[C6WP]
Cont=Fletching Kit
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Ceramic Arrow Vanes

[CA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Benzoin
Comp2=Sumbul

[CA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Benzoin
Comp2=Elderberry

[CA3]
Cont=Medicine Bag
Comp0=Benzoin
Comp1=Briar Thistle
Comp2=Figwort

[CA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Benzoin
Comp2=Briar Thistle
Comp3=Clover
Comp4=Dhea

[CalcifiedSteelBracer]
Cont=Enviro
Comp0=Bone Temper
Comp1=Medium Quality Folded Sheet Metal
Comp2=Plate Bracer Mold
Comp3=Smithy Hammer
Comp4=Superb Leather Padding
Comp5=Water Flask

[cdrb]
Cont=Enviro
Comp0=Darkwood Bow Staff
Comp1=Silk String
Comp2=Whittling Blade

[CelestialEss]
Cont=Collapsible Mortar And Pestle
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[celestialessance]
Cont=Collapsible Mortar And Pestle
Comp0=Celestial Solvent
Comp1=Words Of The Ethereal

[CelestialEssence]
Cont=Mixing Bowl
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[Cess]
Cont=Mixing Bowl
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[ctemp]
Cont=enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water

[celestialtemp]
Cont=Enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water

[celestialtemper]
Cont=Enviro
Comp0=Blue Diamond Powder
Comp1=Purified Water

[CEPrex]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Tears Of Prexus

[ceramic]
Cont=Fletching Kit
Comp0=Bundled Ceramic Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[CERathe]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Essence Of Rathe

[CERo]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Essence Of Ro

[CERZ]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Glove Of Rallos Zek

[CEs]
Cont=pestle
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[cessence]
Cont=Enviro
Comp0=Celestial Solvent
Comp1=The Scent Of Marr

[CEXeg]
Cont=pestle
Comp0=Celestial Solvent
Comp1=Wing Of Xegony

[CharmingDeceit]
Cont=Medicine Bag
Comp0=Mugwart
Comp1=Undead Froglok Tongue

[Cheese]
Cont=Mixing Bowl
Comp0=Bottle Of Milk
Comp1=Bottle Of Milk
Comp2=Dairy Spoon
Comp3=Rennet

[class1-102]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Hooked Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-135]
Cont=Enviro
Comp0=Bundled Ceramic Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-16]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-182]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Large Groove Nocks
Comp2=Several Round Cut Fletchings
Comp3=Silver Tipped Arrowheads

[class1-36]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Medium Groove Nocks
Comp3=Several Round Cut Fletchings

[class1-56]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Several Round Cut Fletchings
Comp3=Small Groove Nocks

[class1-68]
Cont=Enviro
Comp0=Bundled Bone Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[class3-82]
Cont=Enviro
Comp0=Bundled Bone Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Shield Cut Fletchings

[class4-122]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Wooden Arrow Vanes

[class5-162]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Bone Arrow Vanes

[class6-202]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Set Of Ceramic Arrow Vanes

[CLining]
Cont=Enviro
Comp0=Quality Firing Sheet
Comp1=Unfired Ceramic Lining

[ClumpOfDough]
Cont=Collapsible Mixing Bowl
Comp0=Basilisk Eggs
Comp1=Bottle Of Milk
Comp2=Cup Of Flour

[CodOil]
Cont=Brew Barrel
Comp0=Cobalt Cod
Comp1=Water Flask

[Cohesion]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Fenugreek
Comp2=Sage Leaf

[Cold]
Cont=Medicine Bag
Comp0=Allspice
Comp1=Birthwart
Comp2=Blue Vervain Bulb

[Concealment]
Cont=Medicine Bag
Comp0=Burdock Root
Comp1=Empty Vial
Comp2=Mystic Ash
Comp3=Swamp Vine

[Concentration]
Cont=Medicine Bag
Comp0=Violet Tri-tube
Comp1=Yerbhimba

[cookingdevice]
Cont=Enviro
Comp0=Blue Diamond
Comp1=Branch Of Sylvan Oak
Comp2=Cogs
Comp3=Gears
Comp4=Grease
Comp5=Sprockets

[Corpal]
Cont=Medicine Bag
Comp0=Evil Eye Eyestalk
Comp1=Horehound

[Cream]
Cont=mixing
Comp0=Benzoin
Comp1=Bottle Of Milk
Comp2=Bottle Of Milk
Comp3=Dairy Spoon

[CreamyFennel]
Cont=mixing
Comp0=Cream
Comp1=Cup Of Flour
Comp2=Fennel

[csa]
Cont=Enviro
Comp0=Chunk Of Condensed Shadow
Comp1=File
Comp2=Water Flask

[curedmask]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Mask Pattern
Comp2=Silk Swatch

[CuredSilkMask]
Cont=Planar Sewing Kit
Comp0=Heady Kiola
Comp1=Mask Pattern
Comp2=Silk Swatch

[DA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Birthwart
Comp2=Sumbul

[DA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Birthwart
Comp2=Elderberry

[DA3]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Briar Thistle
Comp2=Figwort

[DA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Birthwart
Comp2=Briar Thistle
Comp3=Clover
Comp4=Dhea

[dairyspoon]
Cont=Enviro
Comp0=Metal Bits
Comp1=Metal Bits
Comp2=Scaler Mold
Comp3=Water Flask

[DarkElf]
Cont=Medicine Bag
Comp0=Dark Elf Parts
Comp1=Wormwood

[darkwoodbow]
Cont=Enviro
Comp0=Darkwood Bow Staff
Comp1=Hemp Twine
Comp2=Standard Bow Cam
Comp3=Standard Bow Cam

[DBKaladimC]
Cont=Enviro
Comp0=Fermenting Dust
Comp1=Kaladim Constitutional
Comp2=Kaladim Constitutional
Comp3=Purified Water

[DEndurance]
Cont=Medicine Bag
Comp0=Beltherium Bark
Comp1=Blade Leaf

[dish]
Cont=Enviro
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lining
Comp2=Large Block Of Clay
Comp3=Water Flask

[dough]
Cont=mixing
Comp0=egg
Comp1=flour
Comp2=milk

[Dristilate]
Cont=Medicine Bag
Comp0=A Chant Rock
Comp1=Firiona Drixie Dust
Comp2=Stoneleer Emerald Plume

[Dulsehound]
Cont=Medicine Bag
Comp0=Balm Leaves
Comp1=Hill Giant Toes

[dustemerald]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Imbued Emerald
Comp2=Jar Of Acid

[Dwarf]
Cont=Medicine Bag
Comp0=Dwarf Meat
Comp1=Wormwood

[DWFur]
Cont=Vale Sewing Kit
Comp0=Embroidering Needle
Comp1=Patch Of Dire Wolf Fur
Comp2=Patch Of Dire Wolf Fur
Comp3=Patch Of Dire Wolf Fur

[DWPatch]
Cont=Vale Sewing Kit
Comp0=Embroidering Needle
Comp1=Tuft Of Dire Wolf Fur
Comp2=Tuft Of Dire Wolf Fur
Comp3=Tuft Of Dire Wolf Fur

[dye]
Cont=Enviro
Comp0=Plant Shoot
Comp1=Water Flask

[DyeVial]
Cont=Enviro
Comp0=Quality Firing Sheet
Comp1=Unfired Dye Vial

[eamber]
Cont=Planar Jeweler's Kit
Comp0=Amber
Comp1=Electrum Bar

[ehs]
Cont=Enviro
Comp0=Elm Bow Staff
Comp1=Metal Bits
Comp2=Shears Mold
Comp3=Water Flask

[ElmShears]
Cont=Enviro
Comp0=Elm Bow Staff
Comp1=Metal Bits
Comp2=Shears Mold
Comp3=Water Flask

[emal]
Cont=Planar Jeweler's Kit
Comp0=Electrum Bar
Comp1=Malachite

[ENeedle]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Metal Bits
Comp2=Needle Mold
Comp3=Water Flask

[Erudite]
Cont=Medicine Bag
Comp0=Erudite Meat
Comp1=Wormwood

[Ethira]
Cont=Medicine Bag
Comp0=Hyssop
Comp1=Lady's Mantle

[evbits]
Cont=Enviro
Comp0=Coldain Velium Temper
Comp1=Small Piece Of Velium
Comp2=Small Piece Of Velium
Comp3=Spell: Enchant Velium

[fayshak]
Cont=Enviro
Comp0=Cask
Comp1=Dwarven Ale
Comp2=Elven Wine
Comp3=Gnomish Spirits
Comp4=Mead

[FermentedYarrow]
Cont=Brew Barrel
Comp0=Water Flask
Comp1=Yarrow

[Fetid Essence]
Cont=Brew Barrel
Comp0=Fishing Grubs
Comp1=Water Flask

[fetidessence]
Cont=Enviro
Comp0=Fishing Grubs
Comp1=Water Flask

[file]
Cont=Enviro
Comp0=File Mold
Comp1=Metal Bits
Comp2=Water Flask

[filletbear]
Cont=Enviro
Comp0=Bear Meat
Comp1=Filleting Knife

[fire]
Cont=Enviro
Comp0=firing
Comp1=unfired

[Fish Rolls]
Cont=Spit
Comp0=Bat Wing
Comp1=Fresh Fish

[fishrolls]
Cont=Enviro
Comp0=Bat Wing
Comp1=Fresh Fish

[fishwine]
Cont=Enviro
Comp0=Bottle
Comp1=Fresh Fish
Comp2=Grapes
Comp3=Water Flask

[flamelesslantern]
Cont=Enviro
Comp0=Firewater
Comp1=Large Lantern
Comp2=Metal Twine

[FleetingLanguor]
Cont=Medicine Bag
Comp0=Burdock Root
Comp1=White Wolf Skin

[fletch]
Cont=Enviro
Comp0=Bundled Wooden Arrow Shafts
Comp1=Medium Groove Nocks
Comp2=Set Of Cermaic Arrow Vanes
Comp3=Silver Tipped Arrowheads

[fletting knife]
Cont=Enviro
Comp0=Metal Bits
Comp1=Metal Bits
Comp2=Metal Bits
Comp3=Scaler Mold
Comp4=Water Flask

[FPBracer]
Cont=Enviro
Comp0=Leather Padding
Comp1=Medium Quality Folded Sheet Metal
Comp2=Plate Bracer Mold
Comp3=Smithy Hammer
Comp4=Water Flask

[Frost]
Cont=Medicine Bag
Comp0=Heliotrope
Comp1=Oakmoss

[FrostEssence]
Cont=Enviro
Comp0=Frost Turnip
Comp1=Water Flask

[FrostInsurgency]
Cont=Medicine Bag
Comp0=Bistort
Comp1=Polar Bear Skin

[GAccuracy]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Fenugreek
Comp2=Valerian Bulb

[GAdroitness]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GAntibody]
Cont=Medicine Bag
Comp0=Maidenhair Fern
Comp1=Mullein
Comp2=Valerian Bulb

[Gate]
Cont=Medicine Bag
Comp0=Heliotrope
Comp1=Heliotrope
Comp2=Heliotrope

[gator]
Cont=Collapsible Mixing Bowl
Comp0=Gator Meat
Comp1=Jar Of Acid
Comp2=Mandrake Root

[gcarn]
Cont=Planar Jeweler's Kit
Comp0=Carnelian
Comp1=Gold Bar

[GCohesion]
Cont=Medicine Bag
Comp0=Fenugreek
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GCold]
Cont=Medicine Bag
Comp0=Allspice
Comp1=Birthwart
Comp2=Valerian Bulb

[GConcentration]
Cont=Medicine Bag
Comp0=Duskglow Vine
Comp1=Violet Tri-tube

[GHeat]
Cont=Medicine Bag
Comp0=Benzoin
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GiantHalibutSteak]
Cont=Enviro
Comp0=Giant Halibut
Comp1=Jug Of Sauces

[gmal]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Malachite

[GMInfusion]
Cont=Medicine Bag
Comp0=Sickle Leaf
Comp1=Yerbhimba

[GNegation]
Cont=Medicine Bag
Comp0=Mercury
Comp1=Mystic Ash
Comp2=Mystic Ash

[Gnome]
Cont=Medicine Bag
Comp0=Gnome Meat
Comp1=Wormwood

[GnomishBoils]
Cont=Medicine Bag
Comp0=Bat Fur
Comp1=Eyebright

[GNull]
Cont=Medicine Bag
Comp0=Fenugreek
Comp1=Mandrake Root
Comp2=Valerian Bulb

[GoldBlackPearl]
Cont=Planar Jeweler's Kit
Comp0=Black Pearl
Comp1=Gold Bar

[GoldFireEmerald]
Cont=Planar Jeweler's Kit
Comp0=Fire Emerald
Comp1=Gold Bar

[GoldFireOpal]
Cont=Planar Jeweler's Kit
Comp0=Fire Opal
Comp1=Gold Bar

[GoldRuby]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Ruby

[GoldSapphire]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Sapphire

[goldstaramulet]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Star Rose Quartz

[GoldStarRuby]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Star Ruby

[gopal]
Cont=Planar Jeweler's Kit
Comp0=Gold Bar
Comp1=Opal

[GorgingToxin]
Cont=Medicine Bag
Comp0=Boneset
Comp1=Giant Wasp Venom Sac

[GPower]
Cont=Medicine Bag
Comp0=Fenugreek
Comp1=Lucerne
Comp2=Valerian Bulb

[GPurity]
Cont=Medicine Bag
Comp0=Lucerne
Comp1=Night Shade
Comp2=Valerian Bulb

[GraveyardDust]
Cont=Medicine Bag
Comp0=Dragonwart
Comp1=Fire Giant Toes

[GRejuvenation]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Lucerne
Comp2=Sage Leaf

[grobb]
Cont=Enviro
Comp0=Cask
Comp1=Cork
Comp2=Corking Device
Comp3=Liquidised Gator
Comp4=Liquidised Rat
Comp5=Liquidised Snake
Comp6=Malt
Comp7=Soda Water

[GrobbLM]
Cont=Brew Barrel
Comp0=Cask
Comp1=Cork
Comp2=Corking Device
Comp3=Liquidised Gator
Comp4=Liquidised Rat
Comp5=Liquidised Snake
Comp6=Malt
Comp7=Soda Water

[GrobbMeat]
Cont=Enviro
Comp0=Cask
Comp1=Cork
Comp2=Corking Device
Comp3=Liquidised Gator
Comp4=Liquidised Rat
Comp5=Liquidised Snake
Comp6=Malt
Comp7=Soda Water

[GStability]
Cont=Medicine Bag
Comp0=Lucerne
Comp1=Sage Leaf
Comp2=Valerian Bulb

[GTRibbon]
Cont=Collapsible Sewing Kit
Comp0=Elm Handled Shears
Comp1=Gold Ribbon
Comp2=Jaggedpine Dye

[Gukta]
Cont=Medicine Bag
Comp0=Froglok Blood
Comp1=Wormwood

[Gulon]
Cont=Medicine Bag
Comp0=Figwort
Comp1=Lightstone

[GVigor]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Lucerne
Comp2=Valerian Bulb

[GWRibbon]
Cont=Planar Sewing Kit
Comp0=Gold Ribbon
Comp1=Hickory Handled Shears
Comp2=Steam Dye

[HalasMeatPies]
Cont=Enviro
Comp0=Bear Fillet In Cream
Comp1=Clump Of Dough
Comp2=Clump Of Dough
Comp3=Lion Fillet In Cream
Comp4=Mammoth Fillet In Cream
Comp5=Pie Tin
Comp6=Sage Leaf
Comp7=Wolf Fillet In Cream

[HalfElf]
Cont=Medicine Bag
Comp0=Half Elf Meat
Comp1=Wormwood

[Halfling]
Cont=Medicine Bag
Comp0=Halfling Parts
Comp1=Wormwood

[handbear]
Cont=Collapsible Sewing Kit
Comp0=Backpack Pattern
Comp1=High Quality Bear Skin

[handrock]
Cont=Collapsible Sewing Kit
Comp0=Backpack Pattern
Comp1=High Quality Rockhopper Hide

[harrowhead]
Cont=Enviro
Comp0=File
Comp1=Small Brick Of Ore
Comp2=Small Brick Of Ore
Comp3=Small Brick Of Ore
Comp4=Water Flask

[HawkEye]
Cont=Medicine Bag
Comp0=Star Reach Clover
Comp1=Tri-fern Leaf

[heady]
Cont=Enviro
Comp0=Bottle
Comp1=Packet Of Kiola Sap
Comp2=Packet Of Kiola Sap
Comp3=Water Flask

[HeadyK]
Cont=Enviro
Comp0=Bottle
Comp1=Packet Of Kiola Sap
Comp2=Packet Of Kiola Sap
Comp3=Water Flask

[Heat]
Cont=Medicine Bag
Comp0=Benzoin
Comp1=Blue Vervain Bulb
Comp2=Sage Leaf

[Herosandwitch]
Cont=Enviro
Comp0=Dressing
Comp1=Hero Parts
Comp2=Loaf Of Bread
Comp3=Smoked Hero Parts
Comp4=Spiced Hero Parts
Comp5=Vegetables

[HighElf]
Cont=Medicine Bag
Comp0=High Elf Parts
Comp1=Wormwood

[HightoMedHopperHide]
Cont=Planar Sewing Kit
Comp0=High Quality Rockhopper Hide
Comp1=Skinning Knife

[HQRings]
Cont=Enviro
Comp0=File
Comp1=Large Brick Of High Quality Ore
Comp2=Water Flask

[HQSealedVial]
Cont=Enviro
Comp0=High Quality Cat Pelt
Comp1=Sealed Vial Sketch
Comp2=Small Block Of Clay
Comp3=Water Flask

[Human]
Cont=Medicine Bag
Comp0=Human Parts
Comp1=Wormwood

[Iksar]
Cont=Medicine Bag
Comp0=Iksar Meat
Comp1=Wormwood

[infusedPT]
Cont=Enviro
Comp0=Celestial Temper
Comp1=Platinum Thread

[ipt]
Cont=Enviro
Comp0=Celestial Temper
Comp1=Platinum Thread



[JaggedpineDye]
Cont=Enviro
Comp0=Plant Shoot
Comp1=Water Flask

[jasperGE]
Cont=Jeweler's Kit
Comp0=Gold Bar
Comp1=Jasper

[JordMeatPie]
Cont=Collapsible Spit
Comp0=Clump Of Dough
Comp1=Jord Meat
Comp2=Pie Tin

[JumjumCake]
Cont=spit
Comp0=Cake Round
Comp1=Clump Of Dough
Comp2=Frosting
Comp3=Jumjum Stalk
Comp4=Winter Chocolate

[JumjumSalad]
Cont=mixing
Comp0=Fennel
Comp1=Jumjum Stalk
Comp2=Lettuce
Comp3=Vegetables

[JumjumSpicedBeer]
Cont=Enviro
Comp0=Barley
Comp1=Bottle
Comp2=Hops
Comp3=Jumjum Stalk
Comp4=Spices
Comp5=Water Flask

[JusticeFruitPie]
Cont=Collapsible Spit
Comp0=Celestial Essence
Comp1=Celestial Essence
Comp2=Clump Of Dough
Comp3=Frosting
Comp4=Justice Fruit
Comp5=Muffin Tin

[KaladimC]
Cont=Brew Barrel
Comp0=A Strange Dark Fungus
Comp1=Bottle
Comp2=Celestial Essence
Comp3=Cork
Comp4=Corking Device
Comp5=Fermented Yarrow
Comp6=Soda Water
Comp7=Underfoot Mushroom

[KilvaFlame]
Cont=Medicine Bag
Comp0=Clover
Comp1=Clubmoss
Comp2=Jatamasi

[KilvaFlesh]
Cont=Medicine Bag
Comp0=Clubmoss
Comp1=Jatamasi

[Kithar]
Cont=Medicine Bag
Comp0=Echinacea
Comp1=Lady's Mantle

[lantern]
Cont=Enviro
Comp0=Bottle
Comp1=Lantern Casing Mold
Comp2=Metal Bits
Comp3=Water Flask

[laqopal]
Cont=Collapsible Jeweler's Kit
Comp0=Jar Of Lacquer
Comp1=Opal

[large]
Cont=Enviro
Comp0=Glass Shard
Comp1=Large Block Of Clay
Comp2=Large Bowl Sketch
Comp3=Water Flask

[largemqore]
Cont=Enviro
Comp0=Small Brick Of Medium Quality Ore
Comp1=Small Brick Of Medium Quality Ore
Comp2=Small Brick Of Medium Quality Ore
Comp3=Water Flask

[lbco]
Cont=Enviro
Comp0=Large Brick Of Acrylia Ore
Comp1=Smithing Chisel

[leatherfoot]
Cont=Vale Sewing Kit
Comp0=Acorn Oil
Comp1=Infused Platinum Thread
Comp2=Infused Platinum Thread
Comp3=Infused Platinum Thread
Comp4=Woven Dire Wolf Fur
Comp5=Woven Dire Wolf Fur
Comp6=Woven Dire Wolf Fur
Comp7=Woven Dire Wolf Fur

[LeatherPaddingBear]
Cont=Planar Sewing Kit
Comp0=Low Quality Bear Skin
Comp1=Silk Thread

[LeatherPaddingCat]
Cont=Planar Sewing Kit
Comp0=Low Quality Cat Pelt
Comp1=Silk Thread

[LeatherPaddingHopper]
Cont=Planar Sewing Kit
Comp0=Low Quality Rockhopper Hide
Comp1=Shade Silk Thread

[Lining]
Cont=Enviro
Comp0=System.collections.arraylist
Comp1=System.collections.arraylist
Comp2=System.collections.arraylist

[LionCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Lion

[LionFillets]
Cont=spit
Comp0=Filleting Knife
Comp1=Lion Meat

[LOETunic]
Cont=Enviro
Comp0=Chainmail Tunic Pattern
Comp1=Electrum Bar
Comp2=High Quality Metal Rings
Comp3=High Quality Metal Rings
Comp4=High Quality Metal Rings
Comp5=Smithy Hammer
Comp6=Water Flask

[LowQBear]
Cont=Planar Sewing Kit
Comp0=Medium Quality Bear Skin
Comp1=Quiver Pattern

[LowQCat]
Cont=Planar Sewing Kit
Comp0=Medium Quality Cat Pelt
Comp1=Skinning Knife

[LowQWolf]
Cont=Planar Sewing Kit
Comp0=Medium Quality Wolf Skin
Comp1=Skinning Knife

[LRejuvenation]
Cont=Medicine Bag
Comp0=Lucerne
Comp1=Sage Leaf
Comp2=Yarrow

[MammothCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Mammoth

[mammothfillets]
Cont=Enviro
Comp0=Filleting Knife
Comp1=Mammoth Meat

[mantle]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Shoulderpad Pattern
Comp5=Silk Swatch
Comp6=Vial Of Viscous Mana

[MAptitude]
Cont=Medicine Bag
Comp0=Duskglow Vine
Comp1=Yerbhimba

[MarmaladeSandwich]
Cont=mixing
Comp0=Apricot Marmalade
Comp1=Loaf Of Bread

[MatureCheese]
Cont=mixing
Comp0=Bottle Of Milk
Comp1=Bottle Of Milk
Comp2=Dairy Spoon
Comp3=Rennet

[mbits]
Cont=Enviro
Comp0=Small Piece Of Ore
Comp1=Small Piece Of Ore
Comp2=Water Flask

[Mead]
Cont=Enviro
Comp0=Cask
Comp1=Hops
Comp2=Malt
Comp3=Yeast

[mechlockpick]
Cont=Enviro
Comp0=Gears
Comp1=Lockpicks
Comp2=Rat Ears
Comp3=Sprockets

[medium]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Medium Bowl Sketch
Comp2=Water Flask

[medium quality sheets of metal]
Cont=Enviro
Comp0=Block Of Medium Quality Ore
Comp1=Smithy Hammer
Comp2=Water Flask

[MedQBear]
Cont=Large Sewing Kit
Comp0=High Quality Bear Skin
Comp1=Skinning Knife

[MedQCat]
Cont=Large Sewing Kit
Comp0=High Quality Cat Pelt
Comp1=Skinning Knife

[MedQWolf]
Cont=Large Sewing Kit
Comp0=High Quality Wolf Skin
Comp1=Skinning Knife

[MedtoLowHopperHide]
Cont=Planar Sewing Kit
Comp0=Medium Quality Rockhopper Hide
Comp1=Skinning Knife

[melt]
Cont=Enviro
Comp0=Bear Meat
Comp1=Cheese
Comp2=Loaf Of Bread
Comp3=Non-stick Frying Pan

[MInfusion]
Cont=Medicine Bag
Comp0=Sickle Leaf
Comp1=Sickle Leaf

[mini]
Cont=Enviro
Comp0=Cask
Comp1=Malt
Comp2=Malt
Comp3=Malt
Comp4=Short Beer
Comp5=Short Beer
Comp6=Water Flask
Comp7=Water Flask
Comp8=Yeast

[MinoBrew]
Cont=Enviro
Comp0=Cask
Comp1=Malt
Comp2=Malt
Comp3=Malt
Comp4=Short Beer
Comp5=Short Beer
Comp6=Water Flask
Comp7=Water Flask
Comp8=Yeast

[Minotar heros brew]
Cont=Brew Barrel
Comp0=Cask
Comp1=Malt
Comp2=Malt
Comp3=Malt
Comp4=Short Beer
Comp5=Short Beer
Comp6=Water Flask
Comp7=Water Flask
Comp8=Yeast

[mistletemp]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Elven Wine
Comp2=Mistletoe

[MistWolf]
Cont=Medicine Bag
Comp0=A Cork
Comp1=Bistort
Comp2=Empty Vial
Comp3=Saprophytic Moss
Comp4=Wolf Blood
Comp5=Wolf Blood
Comp6=Woundwart

[MistyThicketPicnic]
Cont=Enviro
Comp0=Jumjum Salad
Comp1=Jumjum Spiced Beer
Comp2=Marmalade Sandwich
Comp3=Mature Cheese
Comp4=Picnic Basket
Comp5=Royal Mints
Comp6=Slice Of Jumjum Cake
Comp7=Slice Of Jumjum Cake

[mountbd]
Cont=Planar Jeweler's Kit
Comp0=Blue Diamond
Comp1=Velium Bar
Comp2=Velium Bar

[mountdiamond]
Cont=Planar Jeweler's Kit
Comp0=Diamond
Comp1=Velium Bar
Comp2=Velium Bar

[mountjacinth]
Cont=Planar Jeweler's Kit
Comp0=Jacinth
Comp1=Velium Bar
Comp2=Velium Bar

[mountsap]
Cont=Planar Jeweler's Kit
Comp0=Black Sapphire
Comp1=Velium Bar
Comp2=Velium Bar

[MQoreconvert]
Cont=Enviro
Comp0=Small Brick Of Medium Quality Ore
Comp1=Small Brick Of Medium Quality Ore
Comp2=Small Brick Of Medium Quality Ore
Comp3=Water Flask

[MQSealedVial]
Cont=Enviro
Comp0=Medium Quality Cat Pelt
Comp1=Sealed Vial Sketch
Comp2=Small Block Of Clay
Comp3=Water Flask

[MQSheet]
Cont=Enviro
Comp0=Block Of Medium Quality Ore
Comp1=Smithy Hammer
Comp2=Water Flask

[mrings]
Cont=Enviro
Comp0=File
Comp1=Large Brick Of Ore
Comp2=Water Flask

[Null]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Fenugreek
Comp2=Mandrake Root

[OCCoif]
Cont=Enviro
Comp0=Chainmail Coif Pattern
Comp1=High Quality Metal Rings
Comp2=High Quality Metal Rings
Comp3=Silver Bar
Comp4=Smithy Hammer
Comp5=Water Flask

[OCTunic]
Cont=Enviro
Comp0=Chainmail Tunic Pattern
Comp1=High Quality Metal Rings
Comp2=High Quality Metal Rings
Comp3=High Quality Metal Rings
Comp4=Silver Bar
Comp5=Smithy Hammer
Comp6=Water Flask

[Ogre]
Cont=Medicine Bag
Comp0=Ogre Meat
Comp1=Wormwood

[Ol' Tujim's Fierce Brew]
Cont=Barrel
Comp0=Barley
Comp1=Cask
Comp2=Hops
Comp3=Malt
Comp4=Yeast

[OltujimsFB]
Cont=Enviro
Comp0=Barley
Comp1=Cask
Comp2=Hops
Comp3=Malt
Comp4=Yeast

[OpalSlush]
Cont=Medicine Bag
Comp0=Gorge Moss
Comp1=Pouch Of Dust
Comp2=Sponge Mushroom

[opalstein]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Ceramic Lining Sketch
Comp2=Lacquered Opal
Comp3=Large Block Of Magic Clay
Comp4=Sculpting Tools
Comp5=Water Flask

[PA1]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Night Shade
Comp2=Sumbul

[PA2]
Cont=Medicine Bag
Comp0=Aloe
Comp1=Elderberry
Comp2=Night Shade

[PA3]
Cont=Medicine Bag
Comp0=Briar Thistle
Comp1=Figwort
Comp2=Night Shade

[PA4]
Cont=Medicine Bag
Comp0=Agrimony
Comp1=Briar Thistle
Comp2=Clover
Comp3=Dhea
Comp4=Night Shade

[PatchworkCloakCat]
Cont=Large Sewing Kit
Comp0=Cloak Pattern
Comp1=Ruined Cat Pelt

[pattymelt]
Cont=Enviro
Comp0=Bear Meat
Comp1=Cheese
Comp2=Loaf Of Bread
Comp3=Non-stick Frying Pan

[PBRibbon]
Cont=Enviro
Comp0=Ashen Dye
Comp1=Elm Handled Shears
Comp2=Platinum Ribbon

[PDye]
Cont=Enviro
Comp0=Glaze Lacquer
Comp1=Prism Shard

[perpetualairpump]
Cont=Enviro
Comp0=Coiled Spring
Comp1=Cured Leather Tubing
Comp2=Gears
Comp3=Steel Ball Bearing
Comp4=Vial Of Gases

[perpetualsteampump]
Cont=Enviro
Comp0=Coiled Spring
Comp1=Cured Leather Tubing
Comp2=Gears
Comp3=Steel Ball Bearing
Comp4=Water Flask

[picnic]
Cont=Collapsible Sewing Kit
Comp0=Steel Boning
Comp1=Woven Mandrake

[PicnicBasket]
Cont=Large Sewing Kit
Comp0=Steel Boning
Comp1=Woven Mandrake

[planarsteelbolts]
Cont=Enviro
Comp0=Brick Of Immaculate Steel
Comp1=Cam Parts Mold
Comp2=File

[planarwindbolts]
Cont=Enviro
Comp0=Cam Parts Mold
Comp1=Chunk Of Wind Metal
Comp2=File

[platjasper]
Cont=Planar Jeweler's Kit
Comp0=Jasper
Comp1=Platinum Bar

[PlatLapis]
Cont=Planar Jeweler's Kit
Comp0=Lapis Lazuli
Comp1=Platinum Bar

[PlatMala]
Cont=Planar Jeweler's Kit
Comp0=Malachite
Comp1=Platinum Bar

[PoTE]
Cont=Medicine Bag
Comp0=Faerie Wing
Comp1=Yebamante

[Power]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Fenugreek
Comp2=Lucerne

[poweredgloves]
Cont=Enviro
Comp0=Firewater
Comp1=Gears
Comp2=Metal Twine
Comp3=Sprockets
Comp4=Steel Lined Gloves

[PTRibbon]
Cont=Enviro
Comp0=Elm Handled Shears
Comp1=Jaggedpine Dye
Comp2=Platinum Ribbon

[purifiedwater]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Water Flask
Comp2=Water Flask

[Purity]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Lucerne
Comp2=Night Shade

[Purwater]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Water Flask
Comp2=Water Flask

[pvial]
Cont=Enviro
Comp0=High Quality Firing Sheet
Comp1=Unfired Poison Vial

[PWRibbon]
Cont=Planar Sewing Kit
Comp0=Elm Handled Shears
Comp1=Platinum Ribbon
Comp2=Steam Dye

[QeynosAT]
Cont=Brew Barrel
Comp0=Bayle's Delight
Comp1=Celestial Essence
Comp2=Cream
Comp3=Eucalyptus Leaf
Comp4=Flask
Comp5=Tea Leaves
Comp6=Water

[QoK]
Cont=Medicine Bag
Comp0=Erudition Vine
Comp1=Tanaan Ginko

[Quiver]
Cont=Planar Sewing Kit
Comp0=High Quality Cat Pelt
Comp1=Quiver Pattern

[rat]
Cont=Collapsible Mixing Bowl
Comp0=Jar Of Acid
Comp1=Mandrake Root
Comp2=Rat Meat

[regruameat]
Cont=Enviro
Comp0=Crab Cracker
Comp1=Regrua Claws

[Rejuvenation]
Cont=Medicine Bag
Comp0=Figwort
Comp1=Lucerne
Comp2=Sage Leaf

[roseplatring]
Cont=Planar Jeweler's Kit
Comp0=Platinum Bar
Comp1=Star Rose Quartz

[RoyalMints]
Cont=mixing
Comp0=Eucalyptus Leaf
Comp1=Frosting

[SacredTunareSilk]
Cont=Large Sewing Kit
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Silk Swatch

[STSilk]
Cont=Large Sewing Kit
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Silk Swatch

[sbco]
Cont=Enviro
Comp0=Small Piece Of Acrylia
Comp1=Small Piece Of Acrylia
Comp2=Small Piece Of Acrylia
Comp3=Water Flask

[sblockclay]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Water Flask

[scarn]
Cont=Planar Jeweler's Kit
Comp0=Carnelian
Comp1=Silver Bar

[Serpent]
Cont=Medicine Bag
Comp0=Eucalyptus Leaf
Comp1=Fennel

[ShadeSilkThread]
Cont=Planar Sewing Kit
Comp0=Shadeling Silk
Comp1=Shadeling Silk

[Shadeweaver]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Figwort
Comp2=Heliotrope

[shadowheads]
Cont=Enviro
Comp0=Chunk Of Condensed Shadow
Comp1=File
Comp2=Water Flask

[sheetmetal]
Cont=Enviro
Comp0=Small Brick Of Ore
Comp1=Small Brick Of Ore
Comp2=Water Flask

[shortale]
Cont=Enviro
Comp0=Barley
Comp1=Cask
Comp2=Hops
Comp3=Water Flask

[Shumar]
Cont=Medicine Bag
Comp0=Horehound
Comp1=Vampire Dust

[sickleblade]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Curved Blade Mold
Comp3=Emerald
Comp4=Mistletoe Temper
Comp5=Sheet Metal
Comp6=Smithy Hammer

[sicklehilt]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Hilt Mold
Comp3=Mistletoe Temper
Comp4=Ruby
Comp5=Sheet Metal
Comp6=Smithy Hammer

[sicklepommel]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Mistletoe Temper
Comp3=Pommel Mold
Comp4=Sapphire
Comp5=Sheet Metal
Comp6=Smithy Hammer

[SilkBandage]
Cont=Vale Sewing Kit
Comp0=Silk Thread
Comp1=Silk Thread

[SilkCord]
Cont=Planar Sewing Kit
Comp0=Silk Thread
Comp1=Silk Thread
Comp2=Silk Thread

[SilkGLoves]
Cont=Large Sewing Kit
Comp0=Glove Pattern
Comp1=Silk Swatch

[SilkSwatch]
Cont=Large Sewing Kit
Comp0=Spider Silk
Comp1=Spider Silk

[SilkThread]
Cont=Planar Sewing Kit
Comp0=Spiderling Silk
Comp1=Spiderling Silk

[SimpleBelt]
Cont=Large Sewing Kit
Comp0=Simple Belt Pattern
Comp1=Yard Of Rough Cloth

[Skullale]
Cont=Enviro
Comp0=Cyclops Skull
Comp1=Short Beer
Comp2=Spices
Comp3=Vinegar

[smal]
Cont=Planar Jeweler's Kit
Comp0=Malachite
Comp1=Silver Bar

[Smith248Triv]
Cont=Enviro
Comp0=Banded Boot Mold
Comp1=Humming Luclinite Mallet
Comp2=Humming Orb
Comp3=Swirling Shadows
Comp4=Swirling Shadows
Comp5=Vah Shir Anvil
Comp6=Water Flask

[smokehero]
Cont=Enviro
Comp0=Hero Parts
Comp1=Smoker
Comp2=Spices

[snake]
Cont=Collapsible Mixing Bowl
Comp0=Jar Of Acid
Comp1=Mandrake Root
Comp2=Snake Meat

[soda]
Cont=Enviro
Comp0=Soda
Comp1=Water Flask

[SolsticeRobe]
Cont=Enviro
Comp0=Embroidering Needle
Comp1=Gem Studded Chain
Comp2=Sacred Tunare Silk
Comp3=Sacred Tunare Silk
Comp4=Sacred Tunare Silk
Comp5=Tunic Pattern

[SRobe]
Cont=Large Sewing Kit
Comp0=Embroidering Needle
Comp1=Gem Studded Chain
Comp2=Sacred Tunare Silk
Comp3=Sacred Tunare Silk
Comp4=Sacred Tunare Silk
Comp5=Tunic Pattern


[Soluan]
Cont=Medicine Bag
Comp0=Vetiver Root
Comp1=Werewolf Pelt

[SoR]
Cont=Medicine Bag
Comp0=Fire Drake Scale
Comp1=Vox's Dust

[SoulIncorp]
Cont=Medicine Bag
Comp0=Feather
Comp1=Stinging Nettle

[SOW]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Fenugreek
Comp2=Wolf Blood

[spicehero]
Cont=Enviro
Comp0=Hero Parts
Comp1=Jug Of Sauces
Comp2=Spices
Comp3=Vinegar

[SpiritShield]
Cont=Medicine Bag
Comp0=Clover
Comp1=Clubmoss
Comp2=Sumbul

[SpiritShift]
Cont=Medicine Bag
Comp0=Mercury
Comp1=Mystic Ash
Comp2=Sumbul

[spoon]
Cont=Enviro
Comp0=Metal Bits
Comp1=Metal Bits
Comp2=Scaler Mold
Comp3=Water Flask

[Spurn]
Cont=Medicine Bag
Comp0=Reucoat Herb
Comp1=Zombie Skin

[spyglass]
Cont=Enviro
Comp0=Bottle
Comp1=Collapsible Fishing Pole
Comp2=Metal Rod
Comp3=Metal Twine
Comp4=Reflective Shard

[srobe]
Cont=Collapsible Sewing Kit
Comp0=Embroidering Needle
Comp1=Gem Studded Chain
Comp2=Sacred Tunare Silk
Comp3=Sacred Tunare Silk
Comp4=Sacred Tunare Silk
Comp5=Tunic Pattern

[ssilk]
Cont=Large Sewing Kit
Comp0=Spiderling Silk
Comp1=Spiderling Silk

[STAA]
Cont=Planar Fletching Kit
Comp0=Bundled Acrylia Arrow Shafts
Comp1=Condensed Shadow Arrowheads
Comp2=Several Shield Cut Fletchings
Comp3=Small Groove Nocks

[Stability]
Cont=Medicine Bag
Comp0=Blue Vervain Bulb
Comp1=Lucerne
Comp2=Sage Leaf

[stalkingprobe]
Cont=Enviro
Comp0=Bottle
Comp1=Firewater
Comp2=Gears
Comp3=Gears
Comp4=Metal Rod

[standardbowcam]
Cont=Enviro
Comp0=Gears
Comp1=Gnomish Bolts
Comp2=Grease

[starroseneck]
Cont=Planar Jeweler's Kit
Comp0=Enchanted Electrum Bar
Comp1=Star Rose Quartz

[Steel]
Cont=Enviro
Comp0=File
Comp1=Small Brick Of Ore
Comp2=Water Flask

[SteelBoning]
Cont=Enviro
Comp0=File
Comp1=Small Brick Of Ore
Comp2=Water Flask

[steelpa]
Cont=Fletching Kit
Comp0=Bundled Steel Arrow Shafts
Comp1=Field Point Arrowheads
Comp2=Large Groove Nocks
Comp3=Several Round Cut Fletchings

[StingingWort]
Cont=Medicine Bag
Comp0=Balm Leaves
Comp1=Ice Giant Toes

[StormSalmonFilet]
Cont=Collapsible Spit
Comp0=Jug Of Sauces
Comp1=Storm Salmon

[Studded]
Cont=Planar Jeweler's Kit
Comp0=Emerald
Comp1=Ruby
Comp2=Sapphire
Comp3=Worked Silver Chain

[StudMaskBear]
Cont=Large Sewing Kit
Comp0=Mask Pattern
Comp1=Medium Quality Bear Skin
Comp2=Studs

[StudMaskCat]
Cont=Large Sewing Kit
Comp0=Mask Pattern
Comp1=Medium Quality Cat Pelt
Comp2=Studs

[StudMaskWolf]
Cont=Large Sewing Kit
Comp0=Mask Pattern
Comp1=Medium Quality Wolf Skin
Comp2=Studs

[studs]
Cont=Enviro
Comp0=File
Comp1=Metal Bits
Comp2=Metal Bits
Comp3=Metal Bits
Comp4=Water Flask

[SurefallRTJ]
Cont=Brew Barrel
Comp0=Air-sealed Arador
Comp1=Celestial Essence
Comp2=Surefall Sap

[Swamp]
Cont=Medicine Bag
Comp0=Bladderwrack
Comp1=Heliotrope

[SwirlingLiquid]
Cont=Medicine Bag
Comp0=Dristilate
Comp1=Opal Slush

[telescopiceyepatch]
Cont=Enviro
Comp0=Gnomish Bolts
Comp1=Low Quality Dire Wolf Fur
Comp2=Reflective Shard
Comp3=Velium Lens

[Test]
Cont=Test
Comp0=Test
Comp1=Test

[thermalcloak]
Cont=Enviro
Comp0=Firewater
Comp1=Metal Rod
Comp2=Tattered Gnomish Cloak

[tinkeredcatapult]
Cont=Enviro
Comp0=Firewater
Comp1=Gears
Comp2=Metal Twine
Comp3=Shaped Ashwood Recurve Bow
Comp4=Sprockets

[Titan]
Cont=Medicine Bag
Comp0=Maliak Leaf
Comp1=Tri-fern Leaf

[TMercury]
Cont=Medicine Bag
Comp0=Comfrey
Comp1=Mercury

[topazear]
Cont=Enviro
Comp0=Gold Bar
Comp1=Topaz

[Troll]
Cont=Medicine Bag
Comp0=Troll Parts
Comp1=Wormwood

[Tunare]
Cont=Enviro
Comp0=Blessed Dust Of Tunare
Comp1=Celestial Essence
Comp2=Silk Swatch

[Turtle]
Cont=Medicine Bag
Comp0=Clubmoss
Comp1=Sumbul

[ucd]
Cont=Enviro
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lingin
Comp2=Large Block Of Clay
Comp3=Water Flask

[ucl]
Cont=Pottery Wheel
Comp0=Ceramic Lining Sketch
Comp1=Small Block Of Clay
Comp2=Water Flask

[UCWB]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Lacquered Opal
Comp2=Sculpting Tools
Comp3=Small Block Of Clay
Comp4=Vial Of Cloudy Mana
Comp5=Water Flask

[UFCass]
Cont=Enviro
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lining
Comp2=Large Block Of Clay
Comp3=Water Flask

[UFCLining]
Cont=Enviro
Comp0=Ceramic Lining Sketch
Comp1=Small Block Of Clay
Comp2=Water Flask

[UFMedBowl]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Medium Bowl Sketch
Comp2=Water Flask

[UFMedJar]
Cont=Enviro
Comp0=Block Of Clay
Comp1=Medium Jar Sketch
Comp2=Water Flask

[UndeadRecourse]
Cont=Medicine Bag
Comp0=Damlana
Comp1=Warbone Chips

[Unfired Casserole Dish]
Cont=Pottery Wheel
Comp0=Casserole Dish Sketch
Comp1=Ceramic Lining
Comp2=Large Block Of Clay
Comp3=Water Flask

[Unfired Small Container]
Cont=Pottery Wheel,
Comp0=Block Of Clay
Comp1=Small Jar Sketch
Comp2=Water Flask

[unfirelargebowl]
Cont=Enviro
Comp0=Glass Shard
Comp1=Large Block Of Clay
Comp2=Large Bowl Sketch
Comp3=Water Flask

[UnlifeAwareness]
Cont=Medicine Bag
Comp0=Elderberry
Comp1=Fennel

[unplanarstein]
Cont=Enviro
Comp0=Block Of Tanaan Clay
Comp1=Ceramic Lining Sketch
Comp2=Sculpting Tools
Comp3=Tainted Planar Essence
Comp4=Water Flask

[uvial]
Cont=Enviro
Comp0=Low Quality Wolf Skin
Comp1=Small Block Of Clay
Comp2=Vial Sketch
Comp3=Water Flask

[VahShir]
Cont=Medicine Bag
Comp0=Vah Shir Meat
Comp1=Wormwood

[Vampire]
Cont=Medicine Bag
Comp0=Feverfew
Comp1=Griffon Feathers

[VannToeStew]
Cont=Collapsible Spit
Comp0=Bottle Of Milk
Comp1=Spices
Comp2=Vann Toes

[veliumbits]
Cont=Enviro
Comp0=Coldain Velium Temper
Comp1=Small Piece Of Velium
Comp2=Small Piece Of Velium

[veliumsheet]
Cont=Enviro
Comp0=Block Of Velium
Comp1=Coldain Velium Temper
Comp2=Velium Smithy Hammer

[veliumstuds]
Cont=Enviro
Comp0=Coldain Velium Temper
Comp1=File
Comp2=Velium Bits
Comp3=Velium Bits
Comp4=Velium Bits

[veltemper]
Cont=Enviro
Comp0=Celestial Essence
Comp1=Celestial Essence
Comp2=Celestial Essence
Comp3=Celestial Essence
Comp4=Coldain Heater

[VialPDye]
Cont=Enviro
Comp0=Dye Vial
Comp1=Prismatic Dye

[Vigor]
Cont=Medicine Bag
Comp0=Birthwart
Comp1=Blue Vervain Bulb
Comp2=Lucerne

[voil]
Cont=Enviro
Comp0=Vegetables
Comp1=Water Flask

[Vox]
Cont=Medicine Bag
Comp0=Froglok Leg
Comp1=Sea Spirit

[WeightlessMist]
Cont=Medicine Bag
Comp0=A Cork
Comp1=Birthwart
Comp2=Comfrey
Comp3=Deep Cavern Fungus
Comp4=Empty Vial
Comp5=Figwort
Comp6=Hydrangea

[WF]
Cont=Spit
Comp0=Filleting Knife
Comp1=Wolf Meat

[WinterChocolate]
Cont=mixing
Comp0=Brownie Parts
Comp1=Frosting
Comp2=Frosting

[WolfCreamFillet]
Cont=spit
Comp0=Creamy Fennel Sauce
Comp1=Filleted Wolf

[WolvesBlood]
Cont=Medicine Bag
Comp0=High Quality Wolf Skin
Comp1=Sticklewart

[WoodElf]
Cont=Medicine Bag
Comp0=Wood Elf Parts
Comp1=Wormwood

[worked]
Cont=Enviro
Comp0=Enchanted Silver Bar
Comp1=Metal Bits
Comp2=Water Flask

[woven]
Cont=Collapsible Sewing Kit
Comp0=Mandrake Root
Comp1=Mandrake Root

[WovenMandrake]
Cont=Large Sewing Kit
Comp0=Mandrake Root
Comp1=Mandrake Root

[Wrackbane]
Cont=Medicine Bag
Comp0=Mammoth Meat
Comp1=Woundwart

[WuMantle]
Cont=Planar Sewing Kit
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Shoulderpad Pattern
Comp5=Silk Swatch
Comp6=Vial Of Viscous Mana

[wupants]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Pant Pattern
Comp5=Silk Swatch
Comp6=Silk Swatch
Comp7=Silk Swatch
Comp8=Vial Of Viscous Mana

[WuSleeve]
Cont=Planar Sewing Kit
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Silk Swatch
Comp5=Silk Swatch
Comp6=Sleeve Pattern
Comp7=Vial Of Viscous Mana

[WuTunic]
Cont=Enviro
Comp0=Heady Kiola
Comp1=Heady Kiola
Comp2=Heady Kiola
Comp3=Heady Kiola
Comp4=Silk Swatch
Comp5=Silk Swatch
Comp6=Silk Swatch
Comp7=Tunic Pattern
Comp8=Vial Of Viscous Mana

[YewLeafTannin]
Cont=Brew Barrel
Comp0=Water Flask
Comp1=Yew Leaf

utils.inc

Rich (BB code):
| Generic sub to wait for something
| i.e. Cursor.ID, Merchant.Open, etc
Sub WaitFor
/declare MaxWaitCount timer local 1
:WaitForX
/echo WaitFor ${Param0} (${${Param0}})
/if (${String[${${Param0}}].Equal[NULL]} && ${MaxWaitCounter} > 0) {
     /delay 1
     /goto :WaitForX
} else {
     /delay 5
     /if (${${Param0}}) /return 1
}
/return 0


Sub OpenPacks
/declare slotNumber int local

    | Open all packs if they aren't already
    /for slotNumber 1 to 8
        /if (!${Window[Pack${slotNumber}].Open}) {
            /itemnotify pack${slotNumber} rightmouseup
        }
    /next slotNumber
/return


Sub OpenBanks
/declare slotNumber int local

    | Open all bank packs if they aren't already
    /for slotNumber 1 to 18
        /if (!${Window[Bank${slotNumber}].Open}) {
         /if (${slotNumber} < 17) {
            /itemnotify bank${slotNumber} rightmouseup
         } else {
         /itemnotify sharedbank${Int[${Math.Calc[${slotNumber}-16]}]} rightmouseup
         }
        }
    /next slotNumber
/return


Sub ClosePacks
/declare slotNumber int local

    | Close all packs if they aren't already
    /for slotNumber 1 to 8
        /if (${Window[Pack${slotNumber}].Open}) {
            /itemnotify pack${slotNumber} rightmouseup
        }
    /next slotNumber
/return


Sub CloseBanks
/declare slotNumber int local

| Open all bank packs if they aren't already
/for slotNumber 1 to 18
     /if (${Window[bank${slotNumber}].Open}) {
         /if (${slotNumber} < 17) {
            /itemnotify bank${slotNumber} rightmouseup
         } else {
         /itemnotify sharedbank${Int[${Math.Calc[${slotNumber}-16]}]} rightmouseup
         }
     }
/next slotNumber
/return


| Finds the value of an argument in a parameter string
| Use __ in place of spaces
sub parseArguments(string sArgument, string sParameters)
    /declare iArgNum    int     local
    /declare sArgValue string local
    
    /for iArgNum 1 to ${sParameters.Count[=]}
     /if (${sParameters.Arg[${iArgNum}, ].Left[${sArgument.Length}].Equal[${sArgument}]}) {
         |/declare tmp int local ${sArgument.Length}
         |/varcalc tmp (${tmp}+1)*-1
         |/varset sArgValue ${sParameters.Arg[${iArgNum}, ].Right[${tmp}]}
        
         /varset sArgValue ${sParameters.Arg[${iArgNum}, ].Right[${Math.Calc[(${sArgument.Length}+1)*-1]}]}
        
         /if (${String[${sArgValue.Find[__]}].NotEqual[NULL]}) {
             /declare sepLoop int local
             /declare tmpValue string local ${sArgValue}
             /varset sArgValue

             /for sepLoop 1 to ${Math.Calc[${tmpValue.Count[_]}+1]}
                /if (${Math.Calc[${sepLoop}%2]}) {
                 /varset sArgValue ${sArgValue} ${tmpValue.Token[${sepLoop},_]}
                }
             /next sepLoop
         }

         /return ${sArgValue}
     }
    /next iArgNum
/return __NOT_FOUND__

move.inc

Rich (BB code):
|
| move.inc
|
|Advanced moving and object-avoidance routines
|
|Originally by beatnik007 (Who credits Mckorr)
|
|Revised and converted to MQ2Data by Terramantian
|
|Signifagant and on-going Improvments by EQBot_Man 8.9.04
| Added /call MoveToSpawnName
| This will take a partial name and a distance and reliably target and move
| to the nearest spawn of that name
| Added code to get you to stop a lot closer than 10 units. You should stop almost
| right at the location you want when using MoveToLoc
| Sometimes you would get stuck at a door and if you were macroing unattended
| you would continue to strafe for hours making it obvious you were
| macroing. Added code that if the strafe function is called more
| than 10 times in 60 sec to /quit you out
| Have added lots of little checks including NULL targets and corpse checks and a lot
| of little things that I can't remember now but I needed to add due to rare
| circumstances of the subroutines failing to do what they were desigend to do.
|
| Subroutines:
| Sub MoveToLoc
| Moves you to a specified xy loc
| Sub MoveToSpawn
| Moved you to a specified ID number(pretty pointless)
| Sub MoveToSpawnName
| Moves you to the nearest spawn given a partial or full name
|
|=================================================  ==|


| Sub MoveToLoc |
|---------------------------------------------------|
|This simply moves the player to within 1 unit of |
|the requested location, while avoiding obstacles |
| |
|This is beatnik007's original sub, with a few minor|
|changes and rewritten in MQ2Data format |
| |
|SYNTAX: /call MoveToLoc Y X |


Sub MoveToLoc(MoveToY, MoveToX)
/echo Moving to Location: ${MoveToY}, ${MoveToX}.
/echo Distance: ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/declare FailureTimer timer local 0
/declare StrafeFailure int local
/declare running int local
/declare MaxSpeed int local
/declare StopDistance int local
/declare distanceNow float local
/declare distanceBefore float local
/declare distanceModifier int local
/varset running 0
/declare distanceTimer timer 15
/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/varset distanceModifier 1
/varset MaxSpeed 0
:moveToLocation

/if (${Me.Speed}>=${MaxSpeed}) /varset MaxSpeed ${Me.Speed}
/if (${MaxSpeed}<=166) {
/varset StopDistance 3
} else {
/varset StopDistance 10
}

/face fast nolook loc ${MoveToY},${MoveToX}

/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<${StopDistance}) {
/keypress forward
/return
}

/if (${distanceTimer}==0) {
/if (${Me.Sneaking}) {
/varset distanceModifier 2
} else {
/varset distanceModifier 1
}

/varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
/if (${FailureTimer}==0) {
/varset StrafeFailure 0
/varset FailureTimer 600
}
/if (${FailureTimer}>0) {
/varset StrafeFailure ${Math.Calc[${StrafeFailure} + 1]}
}
/if (${StrafeFailure}>=10 && ${FailureTimer}>0) {
/keypress forward
/keypress back hold
/delay 5
/keypress back
/afk Be back later, leave a message
/echo Your movement failed more than 10 times in 30 seconds and most likely looked macroed. Ending macro. . .
/endmacro
/quit
}
/call strafePastObstacle ${StrafeFailure}
}

/varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
/varset distanceTimer 15
}

/if (${running}==0) {
/keypress forward
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>${StopDistance}) {
/varset running 1
/keypress forward hold
}
} else {
/if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<${StopDistance}) {
/varset running 0
/keypress forward
}
}
/goto :moveToLocation
/return


| Sub MoveToSpawn |
|---------------------------------------------------|
|This moves the player to within a provided distance|
|of the provided spawn, while avoiding obstacles |
| |
|I "wrote" this, but as you can see, it's the same |
|as MoveToLoc with a few variable replacements. |
| |
|The second parameter, Distance, allows for the |
|player to stop short of the target by a certain |
|amount, to provide for different aggro radii, etc. |
| |
|SYNTAX: /call MoveToSpawn ID Distance |

Sub MoveToSpawn(MoveToID, StopDistance)


/if (!(${Defined[MoveToID]})||(${Spawn[MoveToID].ID})) {
/echo Spawn ID not found or no ID provided. Aborting...
/return
}
/if (!(${Defined[StopDistance]})) {
/echo Stopping point not defined, using default distance of 70
/declare StopDistance int local
/varset StopDistance 70
}
/echo Moving to Spawn: ${MoveToID} (${Spawn[${MoveToID}].CleanName}).
/echo Current Location: ${Spawn[${MoveToID}].Y}, ${Spawn[${MoveToID}].X}
/echo Current Distance: ${Spawn[${MoveToID}].Distance}
/declare FailureTimer timer local 0
/declare StrafeFailure int local
/declare running int local
/declare distanceNow float local
/declare distanceBefore float local
/declare distanceModifier int local
/varset running 0
/declare distanceTimer timer 15
/varset distanceBefore ${Spawn[${MoveToID}].Distance}
/varset distanceModifier 1

:moveToSpawn

/squelch /face fast nolook id ${MoveToID}

/if (${Spawn[${MoveToID}].Distance}<${StopDistance}) {
/keypress forward
/return
}

/if (${distanceTimer}==0) {
/if (${Me.Sneaking}) {
/varset distanceModifier 2
} else {
/varset distanceModifier 1
}

/varset distanceNow ${Spawn[${MoveToID}].Distance}
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
/if (${FailureTimer}==0) {
/varset StrafeFailure 0
/varset FailureTimer 600
}
/if (${FailureTimer}>0) {
/varset StrafeFailure ${Math.Calc[${StrafeFailure} + 1]}
}
/if (${StrafeFailure}>=10 && ${FailureTimer}>0) {
/keypress forward
/keypress back hold
/delay 5
/keypress back
/sit
/afk Be back later, leave a message
/echo Your movement failed more than 10 times in 30 seconds and most likely looked macroed. Ending macro. . .
/endmacro
/quit
}
/call strafePastObstacle ${StrafeFailure}
}
/varset distanceBefore ${Spawn[${MoveToID}].Distance}
/varset distanceTimer 15
}

/if (${running}==0) {
/keypress forward
/if (${Spawn[${MoveToID}].Distance}>=${StopDistance}) {
/varset running 1
/keypress forward hold
}
} else {
/if (${Spawn[${MoveToID}].Distance}<${StopDistance}) {
/varset running 0
/keypress forward
}
}
/goto :moveToSpawn
/return


| Sub MoveToSpawnName |
|---------------------------------------------------|
|This moves the player to within a provided distance|
|of the provided spawn, while avoiding obstacles |
| |
|I "wrote" this, but as you can see, it's the same |
|as MoveToLoc with a few variable replacements. |
| |
|The second parameter, Distance, allows for the |
|player to stop short of the target by a certain |
|amount, to provide for different aggro radii, or to|
|attack. |
| |
|SYNTAX: /call MoveToSpawnName Name Distance |
| Does take partial names: |
| /call MoveToSpawnName skel 9 |
| to move you to the nearest skeleton |
| |
| I use this for farming bone chips and silks |

Sub MoveToSpawnName(Name, StopDistance)
/keypress esc
/target ${Name} npc
/delay 2
/if (${String[${Target}].Find["NULL"]}) /return
/if (${String[${Target}].Find["corpse"]}) /return
/if (!${Target.ID}) {
/echo Name not found or no name provided. Aborting...
/return
}
/if (!(${Defined[StopDistance]})) {
/echo Stopping point not defined, using default distance of 70
/declare StopDistance int local
/varset StopDistance 70
}
/echo Moving to Spawn: ${Target.CleanName}.
/declare FailureTimer timer local 0
/declare StrafeFailure int local
/declare running int local
/declare distanceNow float local
/declare distanceBefore float local
/declare distanceModifier int local
/varset running 0
/declare distanceTimer timer 15
/varset distanceBefore ${Target.Distance}
/varset distanceModifier 1

:moveToSpawn
/if (${String[${Target}].Find["NULL"]}) /return
/face fast predict

/if (${Target.Distance}<${StopDistance}) {
/keypress forward
/return
}

/if (${distanceTimer}==0) {
/if (${Me.Sneaking}) {
/varset distanceModifier 2
} else {
/varset distanceModifier 1
}

/varset distanceNow ${Target.Distance}
/if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
/if (${FailureTimer}==0) {
/varset StrafeFailure 0
/varset FailureTimer 600
}
/if (${FailureTimer}>0) {
/varset StrafeFailure ${Math.Calc[${StrafeFailure} + 1]}
}
/if (${StrafeFailure}>=10 && ${FailureTimer}>0) {
/keypress forward
/keypress back hold
/delay 5
/keypress back
/sit
/afk Be back later, leave a message
/echo Your movement failed more than 10 times in 30 seconds and most likely looked macroed. Ending macro. . .
/endmacro
/quit
}
/call strafePastObstacle ${StrafeFailure}
}
/varset distanceBefore ${Target.Distance}
/varset distanceTimer 15
}

/if (${running}==0) {
/keypress forward
/if (${Target.Distance}>=${StopDistance}) {
/varset running 1
/keypress forward hold
}
} else {
/if (${Target.Distance}<${StopDistance}) {
/varset running 0
/keypress forward
}
}
/goto :moveToSpawn
/return

| Only to be used by the previous functions - It's obvious what it does. |

sub strafePastObstacle(Number)
/keypress forward
/keypress back hold
/delay ${Math.Calc[${Number}*3/2+4]}
/keypress back
/if (!${Me.State.Equal["STAND"]}) /stand
/if (${Math.Rand[99]}>50) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay ${Math.Calc[${Number}*4+5]}
/keypress strafe_right
/keypress strafe_left
/keypress forward hold
/return

Sub Turn(THeadingY,THeadingX)
/declare PHeading outer 0
/declare THeading outer 0
/declare Bearing outer 0
/declare IsTurning outer 0
/declare TurnKey outer NULL

:TurnLoop
/delay 0
/if (${Me.Sitting}) /sit off
/varset PHeading ${Me.Heading.Degrees}
/if (${Defined[THeadingX]}) {
/varset THeading ${Heading[${THeadingY},${THeadingX}].Degrees}
} else {
/varset THeading ${Target.HeadingTo.Degrees}
}

/varset Bearing ${Math.Calc[(${PHeading}-${THeading}+540)%360-180]}

/if (${Bearing}>=-7 && ${Bearing}<=7) {
/if (${String[${TurnKey}].NotEqual[NULL]}) /keypress ${TurnKey}
/face heading ${Heading[${THeading}].Degrees} nolook
/return
} else /if (${Bearing}>=-180 && ${Bearing}>=7) {
/if (${String[${TurnKey}].NotEqual
}) /varset TurnKey LEFT } else /if (${Bearing}<=180 && ${Bearing}<=7) { /if (${String[${TurnKey}].NotEqual
}) /varset TurnKey RIGHT } /if (!${IsTurning}) { /keypress ${TurnKey} hold /varset IsTurning 1 } /goto :TurnLoop /return​
 
Re: Redguides Listing of Confirmed Macros

Shaman slow/heal/dot by Siddin

warning its just a TAD messy atm.
and for the basics of what it does. if you uncomment the healloop part it'll quinessence and patch heal. otherwise it just casts malos, then slow. if those land i have it also casting Crippling Spasm, Blood of Saryrn, Pained Memory, and then Quiescence on myself. you can of course change these spells to any you want. its not very user friendly as you have to go in and edit the spells in the right places *shrug* but this was mainly made to box a shammy that my friend usually plays.


Rich (BB code):
#include spell_routines.inc
#event exp "#*#party experience#*#"
Sub Main
/declare HOTtime timer outer 0
/declare M_Assist string outer ${Target.CleanName}
/declare SlowSpell string outer "Turgur's Insects"
/declare HoTSpell string outer Quiescence
/declare Slowed int outer 0
/declare M_Assist_ID int outer ${Target.ID}
/declare healspell string outer "Yoppa's Mending"
/declare Malos int outer 0
/declare MaloSpell string outer "Malos"
/declare Crippled int outer 0
:Start
/doevents
/target ${M_Assist}
/if (!${Target.ID}) /goto :Start
|/call Heal_Loop
/call Malo_Loop
/call Slow_Loop
|/call Spasm_Loop
/goto :Start
/return
Sub Heal_Loop
/if (!${Me.LineOfSight}) /return
/if (${Target.PctHPs} <= 75 && ${HOTtime}==0 && ${Target.ID}==${M_Assist_ID}) {
/g Casting ${HoTSpell} on ${Target.CleanName}
/call cast ${HoTSpell}
/varset HOTtime 30s
}
/if (${Target.PctHPs} <= 50 && ${HOTtime}>=1 && ${HOTtime}<=250 && ${Target.ID}==${M_Assist_ID}) {
/g Casting ${healspell} on ${Target.CleanName}
/call cast ${healspell}
}
/return
Sub Malo_Loop
/if (!${Target.ID}) /return
/if (${Malos} == 1) /return
/assist ${M_Assist}
/delay 5
/if (${Target.Type.Equal[PC]}) /return
/if (${Target.Type.Equal[Corpse]}) {
/squelch /target clear
/return
}
/if (!${Target.LineOfSight} || ${Target.Type.Equal[PC]}) /return
/if (${Target.Distance}>=200) /return
/pet attack
/if (${Malo}==0) /g ***Casting ${MaloSpell} on ${Target.CleanName}***
:MaloLoop2
/if (${Malo}==0) /call cast ${MaloSpell}
/if (${Malo}==0) /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) {
/g ***${MaloSpell} Interrupted, Casting Again***
/delay 8s
/goto :MaloLoop2
}
/if (${Malo}==0) /if (${Macro.Return.Equal["CAST_RESISTED"]}) {
/g ***${Target.CleanName} RESISTED ${MaloSpell}! Trying again ASAP 
/delay 8s
/return
}
/if (${Malo}==0) /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
/g ***${MaloSpell} landed on ${Target.CleanName}***
/varset Malos 1 
/return
}
/return
Sub Slow_Loop
/if (!${Target.ID}) /return
/if (${Slowed} == 1) /return
/if (${Malos} == 0) /return
 
/if (${Target.Type.Equal[Corpse]}) {
/squelch /target clear
/return
}
/if (!${Target.LineOfSight} || ${Target.Type.Equal[PC]}) /return
/g ***Slowing ${Target.CleanName}***
:SlowLoop2
/call cast ${SlowSpell}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) {
/g ***Slow Interrupted, Casting Again***
/delay 3s
/goto :SlowLoop2
}
/if (${Macro.Return.Equal["CAST_RESISTED"]}) {
/g ***${Target.CleanName} RESISTED Slow! Trying again ASAP 
/delay 8s
/return
}
/if (${Macro.Return.Equal["CAST_IMMUNE"]}) { 
/g ***${Target.CleanName} Is IMMUNE To Slow!***
/varset Slowed 1
/return
}
/if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
/g ***${Target.CleanName} Is SLOWED!***
/varset Slowed 1 
/call cast "Crippling Spasm"
/call cast "Blood of Saryrn"
/call cast "Pained Memory"
/target ${Me}
/call cast "Quiescence"
/if (${Me.AltAbilityReady[47]} && ${Me.CurrentMana} < ${Math.Calc[${Me.MaxMana}-1000]} && ${Me.MaxHPs} > 
2424) /alt activate 47
/return
}
/return
 
sub event_exp
/varset Slowed 0
/varset Malos 0
/varset Crippled 0 
/return
 
Re: Redguides Listing of Confirmed Macros

Ranger Macro help..

http://www.redguides.com/community/showthread.php?t=2513

A few days ago someone posted about a ranger macro. and i directed them to the arch.mac on the mq fourms. well it made me out to be an ass , cause that has not been updated in the longest time. Here is the the code of the arch.mac. which i have found to be the best ranger macro around.

This has been updated to be working Fully (atleast as far as i can tell)

Arch.mac
Code:
|** arch.mac Auto-Archery 
 Version 2.5        May 30, 2005 
 by loadingpleasewait ,Updated By Riddlerr **| 
#chat group 
#chat tell 

#include Spell_Routines.inc 
#turbo 40 
#Event exp                 "#*#experience!#*#" 
#Event reroot              "#*#Roots spell has worn off#*#" 
#Event Casting             "#*#You begin casting#*#" 
#Event Death               "You died#*#" 
#Event Death               "You have been slain by #*#!" 
#Event Zoned               "You have entered#*#" 
#Event EarthCall           "#*#slowed by the embracing earth#*#" 
#Event GotHit              "#*#YOU, but#*#" 
#Event GotHit              "#*#YOU for #*#" 
#Event Enraged             "#*#|${Target.CleanName}| has become ENRAGED#*#" 
#Event NLEnraged           "#*#|${Target.CleanName}| is no longer enraged#*#" 

#Event SetForage           "[MQ2] SetForage#*#" 
#Event SetSelfBuff         "[MQ2] SetSelfBuff#*#" 
#Event SetSnare            "[MQ2] SetSnare#*#" 
#Event SetTaunt            "[MQ2] SetTaunt#*#" 
#Event SetVerbose          "[MQ2] SetVerbose#*#" 
#Event SetRoot             "[MQ2] SetRoot#*#" 
#Event SetAutoAssist       "[MQ2] SetAutoAssist#*#" 
#Event SetAssistDistance   "[MQ2] SetAssistDistance#*#" 
#Event SetTankName         "[MQ2] SetTankName#*#" 
#Event AddSelfBuff         "[MQ2] AddSelfBuff#*#" 
#Event RemSelfBuff         "[MQ2] RemSelfBuff#*#" 
#Event DisplayHelp         "[MQ2] DisplayHelp#*#" 
#Event ArchStatus          "[MQ2] ArchStatus#*#" 
#Event SetNoArch           "[MQ2] SetNoArch#*#" 
#Event SetTargetSpells     "[MQ2] SetTSpells#*#" 
#Event LootMyCorpse        "[MQ2] LootMyCorpse#*#" 
#Event Harmony             "[MQ2] DoHarmony#*#" 
#Event AutoJolt            "[MQ2] SetJolt#*#" 
#Event PatchHeal           "[MQ2] SetPatchHeal#*#" 
#Event HealPct             "[MQ2] SetHealPct#*#" 
#Event ItemSet             "[MQ2] ItemSet#*#" 
#Event ItemBounce          "[MQ2] ItemBounce#*#" 
#Event ItemCast            "[MQ2] ItemCast#*#" 
#Event StopFight           "[MQ2] StopFighting!#*#" 
#Event SetDD1              "[MQ2] SetDD1#*#" 
#Event SetDD2              "[MQ2] SetDD2#*#" 

Sub Main 
   /echo Auto-Arch Macro Loading. 
   /declare j int outer 
   /declare g int outer 
   /declare Version outer 0 
   /declare autoassist bool outer FALSE 
   /declare noInvis int outer 1 
   /declare tankname string outer "Unknown" 
   /declare assistdistance outer 60 
   /declare healgrouppct outer 20 
   /declare PctToAssist outer 95 
   /declare noarch bool outer FALSE 
   /declare verbose bool outer FALSE 
   /declare targetspells bool outer FALSE 
   /declare foragetoggle bool outer FALSE 
   /declare waitforage bool outer FALSE 
   /declare invset outer 0 
   /declare notset outer -1 
   /declare sitstatus bool outer FALSE 
   /declare snaretoggle bool outer FALSE 
   /declare taunttoggle bool outer FALSE 
   /declare roottoggle bool outer FALSE 
   /declare needsnare outer 0 
   /declare immunetosnare bool outer FALSE 
   /declare LDExp float outer ${Me.PctGroupLeaderExp} 
   /declare AAExp float outer ${Me.PctAAExp} 
   /declare Exp float outer ${Me.PctExp} 
   /declare battle bool outer FALSE 
   /declare selfbuff bool outer FALSE 
   /declare autojolt bool outer FALSE 
   /declare diedBeforeZone bool outer FALSE 
   /declare useMU bool outer FALSE 
   /declare stickonnoarch bool outer FALSE 
   /declare rangerslowed bool outer FALSE 
   /declare leaveSlot string outer 
   /declare patchheal bool outer FALSE 
   /declare Healspell string outer "none" 
   /declare spellname string outer "none" 
   /declare triggername string outer "none" 
   /declare rootspell string outer "Earthen Roots" 
   /declare snarespell string outer "Ensnare" 
   /declare joltspell string outer "Cinder Jolt" 
   /declare targetarray[4] string outer 
   /declare ialias string outer None 
   /declare doIclick bool outer FALSE 
   /declare bouncenum int outer 1 
   /declare ibounce string outer None 
   /declare itemspellname string outer None 
   /declare isEnraged bool outer FALSE 
   /declare dd1 bool outer FALSE 
   /declare dd2 bool outer FALSE 
   /declare needdd1 bool outer TRUE 
   /declare needdd2 bool outer TRUE 
   /declare ddspell1 string outer "none" 
   /declare ddspell2 string outer "none" 
   /declare dir int outer 
   /declare behindTarget bool outer FALSE 
   /declare stopfighting bool outer FALSE 
   /declare eqassistonoff bool outer TRUE 

/if (${Ini[ArchSettings.ini,Version,ArchMacVersion].NotEqual[NULL]}) /varset Version ${Ini[ArchSettings.ini,Version,ArchMacVersion]} 
/if (${Stick.Status.Length}) { 
    /varset useMU TRUE 
    /echo ** MQ2MoveUtils FOUND AutoMovement AVAILABLE) 
  } else { 
    /varset useMU FALSE 
    /echo ** MQ2MoveUtils NOT FOUND AutoMovement UNAVAILABLE 
  } 
/if (!${Version.Equal[2.4]}) { 
      /echo Loading Aliases 
      /delay 1s 
   /squelch /alias /setforage /echo SetForage 
   /squelch /alias /setselfbuff /echo SetSelfBuff 
   /squelch /alias /setsnare /echo SetSnare 
   /squelch /alias /settaunt /echo SetTaunt 
   /squelch /alias /setverbose /echo SetVerbose 
   /squelch /alias /setroot /echo SetRoot 
   /squelch /alias /setnoarch /echo SetNoArch 
   /squelch /alias /setautoassist /echo SetAutoAssist 
   /squelch /alias /setassistdistance /echo SetAssistDistance 
   /squelch /alias /settankname /echo SetTankName 
   /squelch /alias /addselfbuff /echo AddSelfBuff 
   /squelch /alias /remselfbuff /echo RemSelfBuff 
   /squelch /alias /archhelp /echo DisplayHelp 
   /squelch /alias /archstatus /echo ArchStatus 
   /squelch /alias /lootmycorpse /echo LootMyCorpse 
   /squelch /alias /settspells /echo SetTSpells 
   /squelch /alias /harmony /echo DoHarmony 
   /squelch /alias /setjolt /echo SetJolt 
   /squelch /alias /setpatchheal /echo SetPatchHeal 
   /squelch /alias /sethealpct /echo SetHealPct 
   /squelch /alias /iset /echo ItemSet 
   /squelch /alias /ibounce /echo ItemBounce 
   /squelch /alias /iclick /echo ItemCast 
   /squelch /alias /stopfight /echo StopFighting! 
   /squelch /alias /setdd1 /echo SetDD1 
   /squelch /alias /setdd2 /echo SetDD2 
    
      /echo Aliases Loaded, play on! 
   } else { 
      /echo Aliases Up To Date, Finished Loading 
   } 
   /echo Type /ArchHelp for assistance 
    
/ini "ArchSettings.ini" "Version" "ArchMacVersion" "2.4" 

  /if (${Ini[ArchSettings.ini,General,HealSpell].NotEqual[NULL]}) /varset Healspell ${Ini[ArchSettings.ini,General,HealSpell]} 
  /if (${Ini[ArchSettings.ini,General,PatchHeal].NotEqual[NULL]}) /varset patchheal ${Ini[ArchSettings.ini,General,PatchHeal]} 
  /if (${Ini[ArchSettings.ini,General,JoltSpell].NotEqual[NULL]}) /varset joltspell ${Ini[ArchSettings.ini,General,JoltSpell]} 
  /if (${Ini[ArchSettings.ini,General,AutoJolt].NotEqual[NULL]}) /varset autojolt ${Ini[ArchSettings.ini,General,AutoJolt]} 
  /if (${Ini[ArchSettings.ini,General,RootSpell].NotEqual[NULL]}) /varset rootspell ${Ini[ArchSettings.ini,General,RootSpell]} 
  /if (${Ini[ArchSettings.ini,General,SnareSpell].NotEqual[NULL]}) /varset snarespell ${Ini[ArchSettings.ini,General,SnareSpell]} 
  /if (${Ini[ArchSettings.ini,General,AutoTaunt].NotEqual[NULL]}) /varset taunttoggle ${Ini[ArchSettings.ini,General,AutoTaunt]} 
  /if (${Ini[ArchSettings.ini,General,AutoForage].NotEqual[NULL]}) /varset foragetoggle ${Ini[ArchSettings.ini,General,AutoForage]} 
  /if (${Ini[ArchSettings.ini,General,AutoReRoot].NotEqual[NULL]}) /varset roottoggle ${Ini[ArchSettings.ini,General,AutoReRoot]} 
  /if (${Ini[ArchSettings.ini,General,Verbosity].NotEqual[NULL]}) /varset verbose ${Ini[ArchSettings.ini,General,Verbosity]} 
  /if (${Ini[ArchSettings.ini,General,NoArchery].NotEqual[NULL]}) /varset noarch ${Ini[ArchSettings.ini,General,NoArchery]} 
  /if (${Ini[ArchSettings.ini,General,StickOnNoArchery].NotEqual[NULL]}) /varset stickonnoarch ${Ini[ArchSettings.ini,General,StickOnNoArchery]} 
  /if (${Ini[ArchSettings.ini,General,SelfBuffing].NotEqual[NULL]}) /varset selfbuff ${Ini[ArchSettings.ini,General,SelfBuffing]} 
  /if (${Ini[ArchSettings.ini,General,TargetSpells].NotEqual[NULL]}) /varset targetspells ${Ini[ArchSettings.ini,General,TargetSpells]} 
  /if (${Ini[ArchSettings.ini,General,AutoAssist].NotEqual[NULL]}) /varset autoassist ${Ini[ArchSettings.ini,General,AutoAssist]} 
  /if (${Ini[ArchSettings.ini,General,TankToAssist].NotEqual[NULL]}) /varset tankname ${Ini[ArchSettings.ini,General,TankToAssist]} 
  /if (${Ini[ArchSettings.ini,General,AssistDistance].NotEqual[NULL]}) /varset assistdistance ${Ini[ArchSettings.ini,General,AssistDistance]} 
  /if (${Ini[ArchSettings.ini,General,PctHPsToAssist].NotEqual[NULL]}) /varset PctToAssist ${Ini[ArchSettings.ini,General,PctHPsToAssist]} 
  /if (${Ini[ArchSettings.ini,General,EQAssistOnOff].NotEqual[NULL]}) /varset eqassistonoff ${Ini[ArchSettings.ini,General,EQAssistOnOff]} 
  /if (${Ini[ArchSettings.ini,General,AutoSnare].NotEqual[NULL]}) /varset snaretoggle ${Ini[ArchSettings.ini,General,AutoSnare]} 
  /if (${Ini[ArchSettings.ini,General,DDSpell1].NotEqual[NULL]}) /varset ddspell1 ${Ini[ArchSettings.ini,General,DDSpell1]} 
  /if (${Ini[ArchSettings.ini,General,AutoDD1].NotEqual[NULL]}) /varset dd1 ${Ini[ArchSettings.ini,General,AutoDD1]} 
  /if (${Ini[ArchSettings.ini,General,DDSpell2].NotEqual[NULL]}) /varset ddspell2 ${Ini[ArchSettings.ini,General,DDSpell2]} 
  /if (${Ini[ArchSettings.ini,General,AutoDD2].NotEqual[NULL]}) /varset dd2 ${Ini[ArchSettings.ini,General,AutoDD2]} 
  /if (${snaretoggle}) { 
         /varset needsnare 1 
         /varset immunetosnare FALSE 
         } 

/for j 0 to 7 
  /if (${Defined[Param${j}]}) { 
     /if (${Param${j}.Equal[snare]}) { 
         /echo "Auto-Snare enabled" 
         /varset snaretoggle TRUE 
         /varset needsnare 1 
         /varset immunetosnare FALSE 
         /ini "ArchSettings.ini" "General" "AutoSnare" "${snaretoggle}" 
         } 
      /if (${Param${j}.Equal[taunt]}) { 
         /echo "Auto-Taunt enabled" 
         /varset taunttoggle TRUE 
         /ini "ArchSettings.ini" "General" "AutoTaunt" "${taunttoggle}" 
         } 
      /if (${Param${j}.Equal[forage]}) { 
         /echo "Auto-Forage enabled" 
         /varset foragetoggle TRUE 
         /ini "ArchSettings.ini" "General" "AutoForage" "${foragetoggle}" 
         } 
      /if (${Param${j}.Equal[root]}) { 
         /echo "Auto-ReRoot enabled" 
         /varset roottoggle TRUE 
         /ini "ArchSettings.ini" "General" "AutoReRoot" "${roottoggle}" 
         } 
      /if (${Param${j}.Equal[verbose]}) { 
         /echo "Group Anounce enabled" 
         /varset verbose TRUE 
         /ini "ArchSettings.ini" "General" "Verbosity" "${verbose}" 
         } 
      /if (${Param${j}.Equal[noarch]}) { 
         /echo "Auto-Arch macro will not Auto-Arch.. go figure?!?" 
         /varset noarch TRUE 
         /ini "ArchSettings.ini" "General" "NoArchery" "${noarch}" 
         } 
      /if (${Param${j}.Equal[selfbuff]}) { 
         /echo "SelfBuffing enabled" 
         /varset selfbuff TRUE 
         /ini "ArchSettings.ini" "General" "SelfBuffing" "${selfbuff}" 
         } 
      /if (${Param${j}.Equal[autoassist]}) { 
         /echo "Auto-Assist enabled" 
    /if (${eqassistonoff}) /assist on  
         /varset autoassist TRUE 
         /ini "ArchSettings.ini" "General" "AutoAssist" "${autoassist}" 
         /if (!${Target.ID} || ${Target.Type.NotEqual[PC]}) { 
            /echo You need to target your assist, and make sure its a player character! 
            /endmacro 
         } else { 
         /varset tankname ${Target.CleanName} 
         /ini "ArchSettings.ini" "General" "TankToAssist" "${tankname}" 
         /echo Assist set to ${tankname} 
         /if (${eqassistonoff}) /assist off 
         /ini "ArchSettings.ini" "General" "AssistDistance" "${assistdistance}"  
            } 
         } 
   } 
/next j 

      /if (!${Ini[ArchSettings.ini,SelfBuffs,SelfBuff1].Length}) { 
         /for j 1 to 10 
         /ini "ArchSettings.ini" "SelfBuffs" "SelfBuff${j}" "NoBuffListed" 
         /next j 
      } 

      /if (!${Ini[ArchSettings.ini,TargetBuffs,TargetBuff1].Length}) { 
         /for j 1 to 8 
         /ini "ArchSettings.ini" "TargetBuffs" "TBuffTriggerWord${j}" "NoTriggerListed" 
         /ini "ArchSettings.ini" "TargetBuffs" "TargetBuff${j}" "NoBuffListed" 
         /next j 
      } 

      /if (!${Ini[ArchSettings.ini,AssistSpells,AssistSpell1].Length}) { 
         /for j 1 to 8 
         /ini "ArchSettings.ini" "AssistSpells" "ASpellTriggerWord${j}" "NoTriggerListed" 
         /ini "ArchSettings.ini" "AssistSpells" "AssistSpell${j}" "NoSpellListed" 
         /next j 
      } 
/if (${autojolt}) /memspell 5 "${joltspell}" 
/if (${patchheal}) /memspell 8 "${Healspell}" 

:mainloop 
/if (${autoassist}) { 
   /assist ${tankname} 
      /if (${Target.Type.NotEqual[PC]} && ${Target.Distance}<${assistdistance} && !${Target.Type.Equal[Corpse]} && !${Target.Type.Equal[PET]} && ${Target.PctHPs}<${PctToAssist}) { 
         /if (${Me.Sitting}) { 
            /stand 
            /varset sitstatus TRUE 
         } 
         /call Archery 
      } 
/delay 5 
} 
   /if (${Me.Combat} && ${Target.ID} && ${Target.CleanName.NotEqual[${Me.Name}]}) /call Archery 
         /if ((${foragetoggle}) && (${Me.AbilityReady[Forage]})) /call forage 
         /doevents 
         /if (${selfbuff} && !${Me.Invis}) /call LazyRanger 

     |- If we're not hiding or moving, check clicky maintained spells 
     /if (${Me.Moving} || ${clicktimer} || ${Me.Invis}) /goto :DoneItemChecks 
     /varset j 1 
     :ItemCheckLoop 
     /varset ialias ${Ini[ArchSettings.ini].Arg[${j},|]} 
     /if (${ialias.NotEqual[NULL]}) { 
       |- Obtained an itemalias from the ArchSettings.ini file 
       |- We supposed to keep this spell up? 
       /if (${Ini[ArchSettings.ini,${ialias},KeepUp].Equal[FALSE]}) /goto :NextItem 
       |- Scan the item's bounce list for the active bouncers 
       /varset bouncenum 1 
       /varset doIclick TRUE 
       :BounceCheckLoop 
       /varset ibounce ${Ini[ArchSettings.ini,${ialias},BounceOff${bouncenum}]} 
       /if (${ibounce.NotEqual[NULL]}) { 
         /if (${ibounce.Equal[${Me.Buff[${ibounce}]}]}) /varset doIclick FALSE 
       } else /goto :DoneBounceChecks 
       /varcalc bouncenum ${bouncenum}+1 
       /goto :BounceCheckLoop 
       :DoneBounceChecks 
       |- By now we won't click the item if a bouncer spell is on us 
       |- Just have to check to see if the existing buff is on too 
       /varset itemspellname ${FindItem[${Ini[ArchSettings.ini,${ialias},FullName]}].Spell} 
       /if (${itemspellname.Equal[${Me.Buff[${itemspellname}]}]}) /varset doIclick FALSE 
       |- Finally, do it if we should 
       /if (${doIclick}) /docommand /iclick ${ialias} 
       |- Did we fail to find that previous item? (i.e. Dead and naked at bind point!) 
       /if (${clicktimer}) /goto :DoneItemChecks 
       :NextItem 
       /varcalc j ${j}+1 
     } else /goto :DoneItemChecks 
     /goto :ItemCheckLoop 
     :DoneItemChecks 

/goto :mainloop 
/return 

Sub Archery 
  /attack off 
  /varset battle TRUE 
  /varset targetarray[1] ${Target.CleanName} 
  /varset targetarray[2] ${Target.Level} 
  /varset targetarray[3] ${Target.Name} 
  /varset targetarray[4] ${Target.ID} 
    
   /echo Fighting a ${targetarray[2]} ${targetarray[1]} 
  /face nolook 
  :CloserAF    
  /if (${Me.Combat}) /attack off 
/if (${Target.Distance}>30 && ${Me.RangedReady} && !${noarch} && ${Target.LineOfSight} && ${Target.Animation}!=32 && ${Target.Animation}!=110) /ranged 
    /if (${noarch} && ${useMU} && ${stickonnoarch} && ${Stick.Status.Equal[OFF]}) { 
       /if (${Me.Underwater}) { 
         /squelch /stick 60% behind uw 
       } else { 
         /squelch /stick 60% behind 
       } 
     } 
         /if (${dd1}) /call DD1 
         /if (${dd2}) /call DD2 
         /if (${patchheal}) /call healer 
         /if (${foragetoggle} && ${Me.AbilityReady[Forage]}) /call forage 
         /if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}<150 && !${Target.LineOfSight}) /popup Can't Snare, Need Line Of SIGHT!! 
         /if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}<150 && ${Target.LineOfSight}) { 
         /Popup Attempting To Snare ${Target.CleanName}... 
         /if (${String[${snarespell}].Equal[Entrap]}) { 
            /call Cast "Entrap" Alt 
         } else { 
            /call Cast ${snarespell} gem4 10s 
         } 
         /delay 5 
         /doevents 
               /if (${String[${castReturn}].Equal[CAST_IMMUNE]}) {                
                     /varset needsnare 0 
                     /varset immunetosnare TRUE 
                     /popup Immune To Snare! 
                     /if (${verbose}) /gsay %t is Immune to snare 
                  } 
               /if (${String[${castReturn}].Equal[CAST_RESISTED]}) { 
                  /varset needsnare 1 
                  /popup Snare Resisted! 
               } 
               /if (${String[${castReturn}].Equal[CAST_SUCCESS]} && !${immunetosnare}) { 
                  /if (${verbose}) /gsay %t has successfully been snared 
                  /varset needsnare 0 
                  /popup Snare Success!!  
               } 
         } 
    /if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}>150) { 
      /popup "Too Far Away For Auto-Snare, GET CLOSER!!" 
      /delay 2 
   } 
    /doevents 
    /if (${Target.Distance}<15) /call closecombat 
    /if (${Target.ID}!=${targetarray[4]}) /goto :EndAF 
    /doevents 
    /if (!${Target.ID}) /goto :EndAF 
     /doevents 
   /if (${stopfighting}) /goto :StopFight 
|         /if (${selfbuff}) /call LazyRanger 
    /goto :CloserAF 
:EndAF 
    /echo a ${targetarray[2]} ${targetarray[1]} is dead 
:StopFight 
/if (${stopfighting}) { 
   /varset stopfighting FALSE 
   /Popup AutoArch/Attack on ${targetarray[1]} is now OFF 
   /if (${useMU}) /stick off 
   /attack off 
   /varset autoassist FALSE 
   /echo AutoAssist is now OFF!! 
} 
    /if (${snaretoggle}) { 
      /varset needsnare 1 
      /varset immunetosnare FALSE 
   } 
    /keypress Num_5 
       /if (${sitstatus}) { 
      /sit 
      /varset sitstatus FALSE 
   } 
         /if (${dd1}) /varset needdd1 TRUE 
         /if (${dd2}) /varset needdd2 TRUE 
   /varset battle FALSE 
   /if (${noarch} && ${useMU} && ${stickonnoarch} && ${Stick.Status.Equal[ON]}) /stick off 
   /varset rangerslowed FALSE 
  /varset isEnraged FALSE 
/return 

Sub closecombat 
   /popup Within Melee Range! CloseCombat Initiated!! 
   /attack on 
   :stillclose 
            /if (${foragetoggle} && ${Me.AbilityReady[Forage]}) { 
               /attack off 
               /delay 5 
            /call forage 
            /attack on 
         } 
         /if (${dd1}) /call DD1 
         /if (${dd2}) /call DD2 
      /if (${patchheal}) /call healer 
      /if (${Target.Distance}<${Target.MaxRangeTo} && ${Me.AbilityReady["Disarm"]}) /doability "Disarm" 
      /if (${Target.Distance}<${Target.MaxRangeTo} && ${Me.AbilityReady["Kick"]}) /doability "Kick" 
      /if (${taunttoggle} && ${Target.Distance}<${Target.MaxRangeTo} && ${Me.AbilityReady["Taunt"]}) /doability "Taunt" 
      /doevents 
         /if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}<150 && !${Target.LineOfSight}) /popup Can't Snare, Need Line Of SIGHT!! 
         /if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}<150 && ${Target.LineOfSight}) { 
         /Popup Attempting To Snare ${Target.CleanName}... 
         /if (${String[${snarespell}].Equal[Entrap]}) { 
            /if (!${Me.AltAbilityReady[entrap]}) /goto :waitforentrap 
            /call Cast "Entrap" Alt 
         } else { 
            /call Cast ${snarespell} gem4 10s 
         } 
         /delay 5 
         /doevents 
               /if (${String[${castReturn}].Equal[CAST_IMMUNE]}) {                
                     /varset needsnare 0 
                     /varset immunetosnare TRUE 
                     /popup Immune To Snare! 
                     /if (${verbose}) /gsay %t is Immune to snare 
                  } 
               /if (${String[${castReturn}].Equal[CAST_RESISTED]}) { 
                  /varset needsnare 1 
                  /popup Snare Resisted! 
               } 
               /if (${String[${castReturn}].Equal[CAST_SUCCESS]} && !${immunetosnare}) { 
                  /if (${verbose}) /gsay %t has successfully been snared 
                  /varset needsnare 0 
                  /popup Snare Success!!  
               } 
         } 
    /if (${snaretoggle} && ${needsnare}==1 && ${Target.PctHPs}<60 && ${Target.Distance}>150) { 
      /popup "Too Far Away For Auto-Snare, GET CLOSER!!" 
      /delay 2 
   } 
   :waitforentrap 
   /if (${isEnraged} && ${Target.ID} && !${Me.Combat}) { 
     /call Check_Behind 
     /varset behindTarget ${Macro.Return} 
     /if (${Target.ID} && ${behindTarget}) { 
       /attack on 
       /echo ** Attack re-started (No Enrage Risk): ${Target.CleanName} 
     }  
   } 
     /if (${isEnraged} && ${Target.ID}) { 
       /call Check_Behind 
       /varset behindTarget ${Macro.Return} 
       /if (${Target.ID} && !${behindTarget}) { 
         /attack off 
         /echo ** Attack ceased (Enrage Risk): ${Target.CleanName} 
       }  
     } 
/if (${stopfighting}) { 
/attack off 
/return 
} 
    /if (${Target.Distance}<${Target.MaxRangeTo} && ${Target.ID} && ${Target.ID}==${targetarray[4]} && ${Target.CleanName.NotEqual[${Me.Name}]}) /goto :stillclose 
    /attack off 
   /return 

Sub DD1 
   /if (${needdd1} && ${Target.PctHPs}<70 && ${Target.LineOfSight} && ${Target.Animation}!=32) { 
      /call cast "${ddspell1}" gem1 5s 
      /varset needdd1 FALSE 
   } 
   /return 

Sub Event_SetDD1(string Line) 
  /if (${Line.Arg[3].Length}) { 
   /varset ddspell1 ${Line.Arg[3]} 
  /ini "ArchSettings.ini" "General" "DDSpell1" "${ddspell1}" 
} else { 
   /if (${dd1}) { 
    /varset dd1 FALSE 
    /echo ** Auto-DD @70% is now OFF! 
  } else { 
    /varset dd1 TRUE 
    /echo ** Auto-DD @70% is now ON! 
  } 
} 
  /echo ** DDSpell #1 == ${ddspell1} 
   /ini "ArchSettings.ini" "General" "AutoDD1" "${dd1}" 
/return 

Sub DD2 
   /if (${needdd2} && ${Target.PctHPs}<30 && ${Target.LineOfSight} && ${Target.Animation}!=32) { 
      /call cast "${ddspell2}" gem3 5s 
      /varset needdd2 FALSE 
   } 
   /return 

Sub Event_SetDD2(string Line) 
  /if (${Line.Arg[3].Length}) { 
   /varset ddspell2 ${Line.Arg[3]} 
  /ini "ArchSettings.ini" "General" "DDSpell2" "${ddspell2}" 
} else { 
   /if (${dd2}) { 
    /varset dd2 FALSE 
    /echo ** Auto-DD @30% is now OFF! 
  } else { 
    /varset dd2 TRUE 
    /echo ** Auto-DD @30% is now ON! 
  } 
} 
  /echo ** DDSpell #2 == ${ddspell2} 
   /ini "ArchSettings.ini" "General" "AutoDD2" "${dd2}" 
/return 

Sub Check_Behind 
  /declare behindIt FALSE 
  |- Are we behind our target? 
  /for j -1 to 1 
    /varcalc dir (${Target.Heading.Clock}+${j})%12 
    /if (${dir}<1) /varcalc dir ${dir}+12 
    /if (${dir}>12) /varcalc dir ${dir}-12 
    /if (${dir} == ${Me.Heading.Clock}) /varset behindIt TRUE 
  /next j    
/return ${behindIt} 

Sub Event_exp 
  /echo ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%) 
  /popup ** XP-Delta: REG (${Math.Calc[${Me.PctExp}-${Exp}]}%), AA (${Math.Calc[${Me.PctAAExp}-${AAExp}]}%), LDR (${Math.Calc[${Me.PctGroupLeaderExp}-${LDExp}]}%) 
  /varset LDExp ${Me.PctGroupLeaderExp} 
  /varset AAExp ${Me.PctAAExp} 
  /varset Exp ${Me.PctExp} 
/return 


Sub event_reroot 
      /if (${roottoggle}) { 
         /target npc ${targetarray[3]} 
         :tryagain 
         /call Cast "${rootspell}" gem2 10s 
         /doevents 
         /if (${String[${castReturn}].Equal[CAST_RESIST]}) /goto :tryagain 
      } 
/return 

sub event_GotHit 
    /if (${autojolt} && ${Me.SpellReady[${joltspell}]}) { 
      /popup Agro Detected, Casting Jolt! 
      /call cast "${joltspell}" gem5 5s 
} 
    /if (${noarch} && ${useMU} && ${stickonnoarch} && ${Stick.MoveBehind}) { 
       /if (${Me.Underwater}) { 
         /squelch /stick 60% uw 
       } else { 
         /squelch /stick 60% 
       } 
     } 
/return 

sub Event_Casting 
   :checkcast 
    /delay 1 
    /if (${Me.Casting.ID}) /goto :checkcast 
/return 

sub forage 
   /delay 3 
   /if (${Me.Sitting}) { 
      /stand 
      /varset sitstatus TRUE 
   } 
   /if (${Me.Ducking}) /stand 
    
  :WaitLoop 
   /if (${Me.Casting.ID}) { 
      /delay 1 
      /goto :WaitLoop 
   } else { 
   /doability Forage 
   /doevents 
   } 
        
   /call destroyornot 
   /if (${sitstatus}) { 
      /sit 
      /varset sitstatus FALSE 
   } 
/return 

sub Event_waitforage 
   /if (${foragetoggle}) /varset waitforage TRUE 
/return 

sub destroyornot 
      :Keep 
   /delay 5 
   /if (!${Cursor.ID}) /return 
   /varset invset ${Ini[ArchSettings.ini,ForageList,${Cursor.Name},${notse  t}]} 
   /if (${invset}==${notset}) { 
      /ini "ArchSettings.ini" "ForageList" "${Cursor.Name}" "1" 
      /varset invset 1 
      } 
   /if (${invset}==1) { 
      /echo Found ${Math.Calc[${FindItemCount[${Cursor.Name}]}+1].Int} ${Cursor.Name}'s so far! 
      /popup Found ${Math.Calc[${FindItemCount[${Cursor.Name}]}+1].Int} ${Cursor.Name}'s so far! 
      /mqlog Found ${Math.Calc[${FindItemCount[${Cursor.Name}]}+1].Int} ${Cursor.Name}'s so far! 
      /autoinv 
      /if (${Cursor.ID}) /goto :Keep 
      } else { 
      /popup "${Cursor.Name} Destroyed!" 
      /mqlog "${Cursor.Name} Destroyed!" 
      /destroy 
      /if (${Cursor.ID}) /goto :Keep 
      } 
/return 

Sub Event_SetForage 
  /if (${foragetoggle}) { 
    /varset foragetoggle FALSE 
    /echo ** Auto-Forage is now OFF! 
  } else { 
    /varset foragetoggle TRUE 
    /echo ** Auto-Forage is now ON! 
  } 
   /ini "ArchSettings.ini" "General" "AutoForage" "${foragetoggle}" 
/return 
            
Sub Event_SetSelfBuff        
  /if (${selfbuff}) { 
    /varset selfbuff FALSE 
    /echo ** Self Buffing is now OFF! 
  } else { 
    /varset selfbuff TRUE 
    /echo ** Self Buffing is now ON! 
  } 
   /ini "ArchSettings.ini" "General" "SelfBuffing" "${selfbuff}" 
/return 

Sub Event_SetSnare(string Line) 
  /if (${Line.Arg[3].Length}) { 
   /varset snarespell ${Line.Arg[3]} 
  /ini "ArchSettings.ini" "General" "SnareSpell" "${snarespell}" 
} else { 
   /if (${snaretoggle}) { 
    /varset snaretoggle FALSE 
    /echo ** Auto-Snare is now OFF! 
  } else { 
    /varset snaretoggle TRUE 
    /echo ** Auto-Snare is now ON! 
  } 
} 
  /echo ** SnareSpell == ${snarespell} 
   /ini "ArchSettings.ini" "General" "AutoSnare" "${snaretoggle}" 
/return 

Sub Event_AutoJolt(string Line) 
  /if (${Line.Arg[3].Length}) { 
   /varset joltspell ${Line.Arg[3]} 
  /ini "ArchSettings.ini" "General" "JoltSpell" "${joltspell}" 
} else { 
   /if (${autojolt}) { 
    /varset autojolt FALSE 
    /echo ** Auto-Jolt is now OFF! 
  } else { 
    /varset autojolt TRUE 
    /echo ** Auto-Jolt is now ON! 
    /memspell 5 "${joltspell}" 
  } 
} 
  /echo ** JoltSpell == ${joltspell} 
   /ini "ArchSettings.ini" "General" "AutoJolt" "${autojolt}" 
/return 
            
Sub Event_SetTaunt            
  /if (${taunttoggle}) { 
    /varset taunttoggle FALSE 
    /echo ** Auto-Taunt is now OFF! 
  } else { 
    /varset taunttoggle TRUE 
    /echo ** Auto-Taunt is now ON! 
  } 
   /ini "ArchSettings.ini" "General" "AutoTaunt" "${taunttoggle}" 
/return 

Sub Event_SetVerbose 
  /if (${verbose}) { 
    /varset verbose FALSE 
    /echo ** Verbosity is now OFF! 
  } else { 
    /varset verbose TRUE 
    /echo ** Verbosity is now ON! 
  } 
   /ini "ArchSettings.ini" "General" "Verbosity" "${verbose}" 
/return 

Sub Event_SetNoArch(string Line) 
/if (${Line.Arg[3].Equal[stick]}) { 
  /if (!${useMU}) { 
   /echo Sorry, MQ2MoveUtils UNAVAILABLE, go get the plugin!! 
} else { 
   /if (${stickonnoarch}) { 
    /varset stickonnoarch FALSE 
    /echo ** /stick on NoArch Melee is now OFF! 
  } else { 
    /varset stickonnoarch TRUE 
    /echo ** /stick on NoArch Melee is now ON! 
  } 
} 
} else { 
  /if (${noarch}) { 
    /varset noarch FALSE 
    /echo ** Archery is now ON! 
  } else { 
    /varset noarch TRUE 
    /echo ** Archery is now OFF! 
  } 
} 
   /ini "ArchSettings.ini" "General" "NoArchery" "${noarch}" 
   /ini "ArchSettings.ini" "General" "StickOnNoArchery" "${stickonnoarch}" 
/return 
          
Sub Event_SetRoot(string Line) 
  /if (${Line.Arg[3].Length}) { 
   /varset rootspell ${Line.Arg[3]} 
  /ini "ArchSettings.ini" "General" "RootSpell" "${rootspell}" 
} else { 
   /if (${roottoggle}) { 
    /varset roottoggle FALSE 
    /echo ** Auto-ReRoot is now OFF! 
  } else { 
    /varset roottoggle TRUE 
    /echo ** Auto-ReRoot is now ON! 
  } 
} 
  /echo ** RootSpell == ${rootspell} 
   /ini "ArchSettings.ini" "General" "AutoReRoot" "${roottoggle}" 
/return 
            
Sub Event_SetAutoAssist(string Line) 
/if (${Line.Arg[3].Length}) { 
   /varset PctToAssist ${Line.Arg[3]} 
   /echo ** HP% to Assist = ${PctToAssist} 
   /ini "ArchSettings.ini" "General" "PctHPsToAssist" "${PctToAssist}" 
} else { 
  /if (${autoassist}) { 
    /varset autoassist FALSE 
    /echo ** AutoAssist is now OFF! 
    /if (${eqassistonoff}) /squelch /assist on 
  } else { 
    /varset autoassist TRUE 
    /echo ** AutoAssist is now ON! 
    /if (${eqassistonoff}) /squelch /assist off 
  } 
} 
    /ini "ArchSettings.ini" "General" "AutoAssist" "${autoassist}" 
/return 
      
Sub Event_SetAssistDistance(string Line) 
  /if (${Line.Arg[3].Length}) /varset assistdistance ${Line.Arg[3]} 
   /echo ** New AssistDistance == ${assistdistance} 
    /ini "ArchSettings.ini" "General" "AssistDistance" "${assistdistance}" 
/return 

Sub Event_SetTankName(string Line) 
  /if (${Line.Arg[3].Length}) /varset tankname ${Line.Arg[3]} 
   /echo ** New TankName == ${tankname} 
    /ini "ArchSettings.ini" "General" "TankToAssist" "${tankname}" 
/return 

Sub Event_SetTargetSpells 
  /if (${targetspells}) { 
    /varset targetspells FALSE 
    /echo ** TargetSpells are now OFF! 
  } else { 
    /varset targetspells TRUE 
    /echo ** TargetSpells are now ON! 
  } 
   /ini "ArchSettings.ini" "General" "TargetSpells" "${targetspells}" 
/return 

Sub Event_Death 
   /varset diedBeforeZone TRUE 
   /delay 5s 
   /consent group 
   /delay 3s 
   /consent raid 
/return 

Sub Event_Zoned 
  /echo ** Zoned... Setting Autoassist to OFF! 
  /varset autoassist FALSE 
  /if (${eqassistonoff}) /squelch /assist on 
  /ini "ArchSettings.ini" "General" "AutoAssist" "${autoassist}" 
/if (${diedBeforeZone}) { 
   /echo ** YOU DIED.. Setting AutoSelfBuff to OFF! 
   /varset selfbuff FALSE 
   /ini "ArchSettings.ini" "General" "SelfBuffing" "${selfbuff}" 
   /varset diedBeforeZone FALSE 
   } 
/return 

Sub LazyRanger 

|====[Self Buffs]======================================== 

/for j 1 to 8 
/doevents 
/if (!${selfbuff}) /goto :FallOut 
      /varset spellname "${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}]}" 
        /if (${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}].NotEqual[NoBuffListed]}) { 
            /if (!${Me.Buff[${spellname}].ID}) { 
               /if (${Me.Sitting}) { 
               /stand 
               /varset sitstatus TRUE 
            } 
            /target ${Me} 
            /call Cast ${spellname} gem6 ${Math.Calc[${Spell[${spellname}].MyCastTime}+${Spell[${spellname}].RecastTime}+5].Int}s 
            /if (${sitstatus} && !${battle}) { 
               /sit 
               /varset sitstatus FALSE 
   } 
} 
      } 
/next j 
    /if (${battle}) /target ${targetarray[3]} 
    /doevents 
    :Fallout 
/return 

Sub Event_AddSelfBuff(string Line) 
  /if (${Line.Arg[3].Length}) { 
    /for j 1 to 20 
      /if (${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}].Equal[NoBuffListed]}) { 
        /ini "ArchSettings.ini" "SelfBuffs" "SelfBuff${j}" "${Line.Arg[3]}" 
        /echo ** ${Line.Arg[3]} added as a SelfBuff. 
        /goto :FallOut 
      } 
    /next j 
    /echo ** Self Buff slots all filled! Get rid of some! 
  } else { 
    /echo ** Huh? 
  } 
  :FallOut 
/return 

Sub Event_RemSelfBuff(string Line) 
  /if (${Line.Arg[3].Length}) { 
    /for j 1 to 20 
      /if (${Ini[ArchSettings.ini,SelfBuffs,SelfBuff${j}].Equal[${Line.Arg[3]}]}) { 
        /ini "ArchSettings.ini" "SelfBuffs" "SelfBuff${j}" "NoBuffListed" 
        /echo ** ${Line.Arg[3]} removed as a SelfBuff. 
        /goto :FallOut 
      } 
    /next j 
    /echo ** Can't find ${Line.Arg[3]} in SelfBuff list! 
  } else { 
    /echo ** Huh? 
  } 
  :FallOut 
/return 

Sub Event_Chat(ChatType,Sender,ChatText) 
      /if (!${targetspells}) /return 
|====[Target Buffs]======================================== 
/for j 1 to 8 
         /if (!${Ini[ArchSettings.ini,TargetBuffs,TargetBuff${j}].Equal[NoBuffListed]}) { 
         /varset triggername "${Ini[ArchSettings.ini,TargetBuffs,TBuffTriggerWord${j}]}" 
         /varset spellname "${Ini[ArchSettings.ini,TargetBuffs,TargetBuff${j}]}" 
         /if ( ${ChatText.Find[${triggername}]} ) { 
                  /if (${targetspells}) { 
                     /target ${Sender} 
                     /delay 2s 
                     /call cast ${spellname} gem6 ${Math.Calc[${Spell[${spellname}].MyCastTime}+${Spell[${spellname}].RecastTime}+5].Int}s 
                     /if (${verbose}) /tell ${Sender} inc ${triggername} 
               } 
            } 
         } 
/next j 

|====[Assist Buffs]======================================== 
/for j 1 to 8 
      /if (!${Ini[ArchSettings.ini,AssistSpells,AssistSpell${j}].Equal[NoSpellListed]}) { 
         /varset triggername "${Ini[ArchSettings.ini,AssistSpell,ASpellTriggerWord${j}  ]}" 
         /varset spellname "${Ini[ArchSettings.ini,AssistSpells,AssistSpell${j}]}" 
         /if ( ${ChatText.Find[${triggername}]} ) { 
               /assist ${Sender} 
               /delay 2s 
               /call cast ${spellname} gem6 ${Math.Calc[${Spell[${spellname}].MyCastTime}+${Spell[${spellname}].RecastTime}+5].Int}s 
               /if (${verbose}) /tell ${Sender} Inc ${spellname]} on %T. 
            } 
         } 
/next j 
    /if (${battle}) /target ${targetarray[3]} 
/return 

Sub Event_Harmony(string Line) 
   /declare spawnnum int local 1 
   /declare targ int local 0 
   /declare range int local 20 
   /if (${Line.Arg[3].Length}) /varset range ${Line.Arg[3]} 
   |Auto-harmonies mobs within a certain range of your target 
   |Directions: have a mob targeted, run the snippet, 
   |by the end of the code all of the mobs should be harmonied and your 
   |target ready to pull. 
   /echo ** Begining to HARMONY everything within a range of ${range} around ${Target.Name}. 
   /popup ** Begining to HARMONY everything within a range of ${range} around ${Target.Name}. 
   /varset targ ${Target.ID} 
   /varset spawnnum 1 
   :harmonyLoop 
      /if ( ${Spawn[${targ}].NearestSpawn[${spawnnum}, npc radius ${range}].ID} ) { 
      /target ${Spawn[${targ}].NearestSpawn[${spawnnum}, npc radius ${range}]} 
      /call Cast "Harmony of Nature" gem7 10s 
      /delay 55 
      /varset spawnnum ${Math.Calc[${spawnnum}+1]} 
      /echo incremented, retargeting ${targ} 
      /goto :harmonyLoop 
   } 
   /target id ${targ} 
   /echo ** Harmony Complete.. Go Ahead and Pull..  
   /popup ** Harmony Complete.. Go Ahead and Pull..  
/return 

Sub Event_LootMyCorpse(string Line) 
   /if (${Line.Arg[3].Length}) /varset leaveSlot ${Line.Arg[3]} 
   /declare lootTotal int local 0 
   /declare lootSlot int local 0 
   /declare skippedCount int local 0 
   /declare wornSlotNumber int local 0 
   /target mycorpse 

   /if (${Target.Type.NotEqual[CORPSE]}) { 
      /echo ** Can't target my corpse. 
      /return 
   } 
   /corpse 
   /delay 1s 
   /loot 
   /delay 1s 
   /if (${Me.State.NotEqual[BIND]}) { 
      /echo ** Error in getting onto corpse! Aborting. 
      /return 
   } 

   :lootLag 
   /varset lootTotal ${Corpse.Items}    
   /delay 2 
   /if (${lootTotal}!=${Corpse.Items}) { 
      /goto :lootLag 
   } 

   :doAgain 
   /for lootSlot 1 to ${lootTotal} 
      /if (${leaveSlot.Length}) { 
         /for wornSlotNumber 1 to ${Corpse.Item[${lootSlot}].WornSlots} 
            /if (${Corpse.Item[${lootSlot}].WornSlot[${wornSlotNumber}]} == ${InvSlot[${leaveSlot}].ID}) { 
               /varcalc skippedCount (${skippedCount} + 1) 
               /next lootSlot 
            } 
         /next wornSlotNumber 
      } 

      :lootItem 
      /if (${Corpse.Item[${lootSlot}].ID}) { 
         /itemnotify loot${lootSlot} rightmouseup 
         /delay 2 
         /goto :lootItem 
      } 
      /delay 2 
   /next lootSlot 
   /if (${Corpse.Items} > ${skippedCount}) /goto :doAgain 
   /delay 5 
   /echo ** Done looting my corpse. 
   /notify LootWnd DoneButton leftmouseup 
   /varset leaveSlot 
/return 

sub Event_EarthCall 
   /if (${verbose} && !${rangerslowed}) /gsay Ranger Slow Landed.. Hope it helps.. 
   /varset rangerslowed TRUE 
   /return 

Sub Event_PatchHeal(string Line) 
  /if (${Line.Arg[3].Length}) { 
   /varset Healspell ${Line.Arg[3]} 
  /ini "ArchSettings.ini" "General" "HealSpell" "${Healspell}" 
} else { 
   /if (${patchheal}) { 
    /varset patchheal FALSE 
    /echo ** PatchHealing is now OFF! 
  } else { 
    /varset patchheal TRUE 
    /echo ** PatchHealing is now ON! 
    /memspell 8 "${Healspell}" 
  } 
} 
  /echo ** HealSpell == ${Healspell} 
   /ini "ArchSettings.ini" "General" "PatchHeal" "${patchheal}" 
/return 

Sub Event_HealPct(string Line) 
  /if (${Line.Arg[3].Length}) /varset healgrouppct ${Line.Arg[3]} 
   /echo ** New GroupHealPct == ${healgrouppct} 
    /ini "ArchSettings.ini" "General" "HealPct" "${healgrouppct}" 
/return 

Sub Healer 
/varset spellname ${Healspell} 
               /for g 1 to ${Group} 
               /if (${Group[${g}].ID} && ${Group[${g}].PctHPs}<${healgrouppct}) { 
               /target PC ${Group[${g}]} 
               /if (${verbose}) /g Inc ${Healspell} to %t 
               /call cast ${spellname} gem8 ${Math.Calc[${Spell[${spellname}].MyCastTime}+${Spell[${spellname}].RecastTime}+5].Int}s 
               /keypress esc 
               /if (${battle}==1) /target ${targetarray[3]}    
         } 
         /next g 
            /for g 1 to ${Group} 
               /if (${Group[${g}].Pet.ID} && ${Group[${g}].Pet.PctHPs}<${healgrouppct}) { 
               /target Pet ${Group[${g}].Pet} 
               /if (${verbose}) /g Inc ${Healspell} to %t 
               /call cast ${spellname} gem8 ${Math.Calc[${Spell[${spellname}].MyCastTime}+${Spell[${spellname}].RecastTime}+5].Int}s 
               /keypress esc 
               /if (${battle}==1) /target ${targetarray[3]}    
               } 
            /next g 
               /if (${Me.PctHPs}<${healgrouppct}) { 
               /target ${Me} 
               /if (${verbose}) /g Inc ${Healspell} to %t 
               /call cast ${spellname} gem8 ${Math.Calc[${Spell[${spellname}].MyCastTime}+${Spell[${spellname}].RecastTime}+5].Int}s 
               /keypress esc 
               /if (${battle}==1) /target ${targetarray[3]} 
            }              
/return 

Sub Event_ItemSet(string Line) 
  |- Sanity check parameters 
  /if (!${Line.Arg[5].Length} || ${Line.Arg[6].Length}) { 
    /echo ** Improper use of /iset 
    /echo -- /iset <itemalias> keepup|nokeepup <"Item Name"> 
    /echo -- For example: 
    /echo -- /iset gobby keepup "Shrunken Goblin Skull Earring" 
    /return 
  } 
  /ini "ArchSettings.ini" "${Line.Arg[3]}" "FullName" "${Line.Arg[5]}"  
  /ini "ArchSettings.ini" "${Line.Arg[3]}" "KeepUp" "${If[${Line.Arg[4].Equal[keepup]},TRUE,FALSE]}" 
  /echo ** ${Line.Arg[5]} (KeepUp=${If[${Line.Arg[4].Equal[keepup]},TRUE,FALSE]}) updated in INI! 
/return 

Sub Event_ItemBounce(string Line) 
  |- Sanity check parameters 
  /if (!${Line.Arg[4].Length}) { 
    /echo ** Improper use of /ibounce 
    /echo -- /ibounce <itemalias> "Some Spell Name" 
    /echo -- For example: 
    /echo -- /ibounce gobby "Strength of Tunare" 
    /return 
  } 
  |- Look for that item's section, return if non-existent 
  /if (!${Ini[ArchSettings.ini,${Line.Arg[3]}].Length}) { 
    /echo ** [${Line.Arg[3]}] not in INI file! 
    /return 
  } 
  |- Find the next available BounceOff key number and store the spell 
  /declare bindex int local 1 
  :CheckNextKey 
  /if (${Ini[ArchSettings.ini,${Line.Arg[3]},BounceOff${bindex}].Length}) { 
    |- This one is in use... 
    /varcalc bindex ${bindex}+1 
    /goto :CheckNextKey 
  } else { 
    |- This one not defined (yet).  Good. 
    /ini "ArchSettings.ini" "${Line.Arg[3]}" "BounceOff${bindex}" "${Line.Arg[4]}"  
    /echo ** Added "${Line.Arg[4]}" to [${Line.Arg[3]}]'s bounce list 
  } 
/return 

Sub Event_ItemCast(string Line) 
  |- Sanity check parameter 
  /if (!${Line.Arg[3].Length}) { 
    /echo ** Improper use of /icast 
    /echo -- /icast <itemalias> 
    /echo -- For example: 
    /echo -- /icast gobby 
    /return 
  } 
  |- Look for that item's section, return if non-existent 
  /if (!${Ini[ArchSettings.ini,${Line.Arg[3]}].Length}) { 
    /echo ** [${Line.Arg[3]}] not in INI file! 
    /return 
  } 
  /declare fullname string local ${Ini[ArchSettings.ini,${Line.Arg[3]},FullName]} 
  |- Is it in a Bag? 
  /echo ** Attempting to use: ${fullname} 
  /if (${FindItem[${fullname}].InvSlot.Pack}) { 
    :OpenPack 
    /if (!${Window[${FindItem[${fullname}].InvSlot.Pack.Name}].Open}) { 
      /itemnotify ${FindItem[${fullname}].InvSlot.Pack.Name} rightmouseup 
      /delay 2 
      /goto :OpenPack 
    } 
    /declare camefrom ${FindItem[${fullname}].InvSlot} 
    :GrabItem 
    /if (!${Cursor.ID}) { 
      /itemnotify ${InvSlot[${camefrom}]} leftmouseup 
      /delay 2 
      /goto :GrabItem 
    } 
    /declare clickyID int local ${Cursor.ID} 
    /declare wornat int local ${Cursor.WornSlot[1]} 
    :SwapFirst 
    /if (${Cursor.ID}==${clickyID}) { 
      /itemnotify ${InvSlot[${wornat}]} leftmouseup 
      /delay 2 
      /goto :SwapFirst 
    } 
    |- Click it 
    /delay 2 
    /echo ** Clicking: ${fullname} 
    /declare previousID ${Cursor.ID} 
    /itemnotify ${InvSlot[${wornat}]} rightmouseup 
    :SwapAgain 
    /if (${Cursor.ID}==${previousID}) { 
      /itemnotify ${InvSlot[${wornat}]} leftmouseup 
      /delay 2 
      /goto :SwapAgain 
    } 
    |- Put it back 
    :PutItBack 
    /if (${Cursor.ID}==${clickyID}) { 
      /itemnotify ${InvSlot[${camefrom}]} leftmouseup 
      /delay 2 
      /goto :PutItBack 
    } 
    :SummonedCheck 
    /if (${Cursor.ID}) { 
      |- Something was summoned 
      /autoinv 
      /delay 2 
      /goto :SummonedCheck 
    }    
    :ClosePack 
    /if (${Window[${InvSlot[${camefrom}].Pack.Name}].Open}) { 
      /itemnotify ${InvSlot[${camefrom}].Pack.Name} rightmouseup 
      /delay 2 
      /goto :ClosePack 
    } 
  } else { 
    |- Just click it 
    /if (${FindItem[${fullname}].InvSlot}) { 
      /echo ** Clicking: ${fullname} 
      /itemnotify ${FindItem[${fullname}].InvSlot} rightmouseup 
      /delay 2 
    } else { 
      /echo ** "${fullname}" not found! 
    } 
  } 
  :CastLoop 
  /delay 1 
  /if (${Me.Casting.ID}) /goto :CastLoop 
/return 

Sub Event_Enraged 
  /echo Enrage detected! Target: ${Target.CleanName} 
  /varset isEnraged TRUE 
/return 

Sub Event_NLEnraged 
  /echo Enrage done! Target: ${Target.CleanName} 
  /varset isEnraged FALSE 
  /if (${Target.ID} && ${battle}) /attack on 
/return 

Sub Event_StopFight 
/varset stopfighting TRUE 
/return 

sub Event_DisplayHelp 
   /echo -=Arch.Mac Help=- 
   /echo /SetSnare <SnareSpell> Toggles AutoSnare off/on or sets the snare spell 
   /echo /SetRoot <RootSpell> Toggles AutoReRoot off/on or sets the root spell 
   /echo /SetJolt <JoltSpell> Toggles AutoJolt off/on or sets the jolt spell 
   /echo /SetDD1 <DD1 Spell> Toggles AutoDD at 70% off/on or sets the DD1 spell 
   /echo /SetDD2 <DD2 Spell> Toggles AutoDD at 30% off/on or sets the DD2 spell 
   /echo /SetPatchHeal <HealSpell> Toggles PatchHealing off/on or sets the heal spell 
   /echo /SetHealPct <#> Sets the % when to patch heal 
   /echo /SetTaunt Toggles AutoTaunt off/on 
   /echo /SetForage Toggles AutoForage off/on 
   /echo /SetVerbose Toggles Verbosity off/on 
   /echo /SetSelfBuff Toggles SelfBuffing off/on 
   /echo /AddSelfBuff <BuffName> Adds a SelfBuff 
   /echo /RemSelfBuff <BuffName> Removes a SelfBuff 
   /echo /SetTSpells Toggles Targeted spells on tell on/off 
   /echo /SetAutoAssist <HP%> Toggles AutoAssist off/on with #% HP at which to Assist 
   /echo /SetTankName <TankName> Sets the TankName to AutoAssist 
   /echo /SetAssistdistance <distance> Sets the distance to target to start attacking 
   /echo /SetNoArch <stick> Turns Archery off/on if MQ2MoveUtils, <stick> will stick on the Target. 
   /echo /LootMyCorpse <ItemSlot> Loots your corpse except for <itemslot> if specified 
   /echo /Harmony <range> Harmonies all spawns within <range> of your target. 
   /echo /iset <itemalias> keepup|nokeepup <"Item Name"> - Item settings    
   /echo /ibounce <itemalias> <"Spell Name"> - Add bounce-off spell 
   /echo /iclick <itemalias> - Click cast item defined in <itemalias> 
   /echo /stopfight Stop Attacking Current Target 
   /echo /ArchHelp Shows this dialog 
   /echo /ArchStatus Shows Current Status 
/return 

sub Event_ArchStatus 
   /echo -=Arch.Mac Status=- 
   /echo AutoSnare: ${snaretoggle}, SnareSpell: ${snarespell} 
   /echo AutoReRoot: ${roottoggle}, RootSpell: ${rootspell} 
   /echo AutoDD 70%: ${dd1}, DDSpell1: ${ddspell1} 
   /echo AutoDD 30%: ${dd2}, DDSpell2: ${ddspell2} 
   /echo AutoJolt: ${autojolt}, JoltSpell: ${joltspell} 
   /echo PatchHeal: ${patchheal}, HealSpell: ${Healspell}, HealPct: ${healgrouppct} 
   /echo AutoTaunt: ${taunttoggle} 
   /echo AutoForage: ${foragetoggle} 
   /echo Verbosity: ${verbose} 
   /echo NoArchery: ${noarch} StickOnNoArchery: ${stickonnoarch} 
   /echo AutoSelfBuff: ${selfbuff} 
   /echo TargetSpells: ${targetspells} 
   /echo AutoAssist: ${autoassist}, TankName: ${tankname}, AssistDistance: ${assistdistance}, HPsToAssist: ${PctToAssist} 
   /echo Status Complete.... 
/return


Commands
Rich (BB code):
AVAILABLE COMMANDS: 
/SetSnare <SnareSpell>           Toggles AutoSnare off/on or sets the snare spell 
/SetRoot <RootSpell>             Toggles AutoReRoot off/on or sets the root spell 
/SetJolt <JoltSpell>             Toggles AutoJolt off/on or sets the jolt spell 
/SetDD1 <DD1 Spell>              Toggles AutoDD at 70% off/on or sets the DD1 spell. 
/SetDD2 <DD2 Spell>              Toggles AutoDD at 30% off/on or sets the DD2 spell. 
/SetPatchHeal <HealSpell>        Toggles PatchHealing off/on or sets the heal spell 
/SetHealPct <#>                  Sets the % when to patch heal 
/SetTaunt                        Toggles AutoTaunt off/on 
/SetForage                       Toggles AutoForage off/on 
/SetVerbose                      Toggles Verbosity off/on 
/SetTSpells                      Toggles Targeted spells on tell off/on 
/SetSelfBuff                     Toggles SelfBuffing off/on 
/AddSelfBuff <BuffName>          Adds a SelfBuff 
/RemSelfBuff <BuffName>          Removes a SelfBuff 
/SetAutoAssist <HP%>             Toggles AutoAssist off/on and %HPs the target needs to be under before assisting. 
/SetTankName <TankName>          Sets the TankName to AutoAssist 
/SetAssistdistance <#>           Sets the distance to target to start attacking 
/SetNoArch <stick>               Turns Archery off/on, if MQ2MoveUtils ENABLED, <stick> will stick on the Target. 
/LootMyCorpse <ItemSlot>         Loots your corpse except for <itemslot> if specified 
/Harmony <range>                 Harmonies all spawns within <range> of your target. 
/stopfight                       Stop Attacking Current Target 
/ArchHelp                        Shows this dialog 
/ArchStatus                      Shows Current Status 
===[ Clicky Item Commands ]==================================================  === 
/iset <itemalias> keepup|nokeepup <"Item Name"> - Item settings 
/ibounce <itemalias> <"Spell Name"> - Add bounce-off spell 
/iclick <itemalias> - Click cast item defined in <itemalias>
 
Re: Redguides Listing of Confirmed Macros

Puller/Healer Mod

http://www.redguides.com/community/showthread.php?t=2783

Submitted by Alatyami

which macro's I use for my Cleric/Warrior Macro so here it is.

Only two bugs that I have encountered are:

1. It likes to target beyond the Z limit when it can't find anything close.
2. The auto-loot doesn't handle NO DROP confirmation windows.

These are complete ripps/mods.

I have been using these two combos for a while to PL my warrior to catch up to my cleric, thus the cleric is setup to use /tell verses /gsay. I have found this to be more effecient as I can use the healer.mac in a group when I two box. I simply assign my warrior as the main tank so he only gets the tells. Additionally, I added the more advanced XP Tracking to both macros.

I will split this post into three posts. This one will have the includes that you can added to your own custom/ripped macros.

The macros require the following:

o Working Copy of MacroQuest 2
o spell_routines.inc
o AutoLooter.inc
o Exp_Tracking.inc
o Puller.mac
o Healer.mac
o PullLoot.ini

spell_routines.inc
Rich (BB code):
|      spellRecastTime1-9 - How much time left till that spell is back up
|
|=================================================  ==================================================  ===================
|  EquipItem:  An easier way to equip items you have in bags ( useful for weapons or focus items )
|              slot name is optional. If not given, it will equip it in the first possible spot
|
|    Usage:
|        /call EquipItem "item name|slotname"
|
|        Returns: "old item name|slotname"
|    Examples:
|
|    To Equip Sharp Ended Broken Lever when you have Serpent of Vindication equiped:
|        /call EquipItem "Sharp Ended Broken Lever"
|    It will return "Staff of Vindication|mainhand"
|    To reequip the original item, you can save the return in a variable, and then use it later like this:
|       /varset oldPrimary ${Macro.Return}
|       | ... do stuff here with your new item equiped
|       /call EquipItem ${oldPrimary}
|
|=================================================  ==================================================  ===================
|  SwapItem:  a subroutine which is used in the Cast sub itself. You don't need to do this to cast an item in a bag
|             but you can call it in your macro to SwapItems (such as weapons or focus items)
|    Usage:
|        /call SwapItem "item name" slotname|slotID
|    Examples:
|
|    To swap Darkblade of the Warlord to your main hand:
|        /call SwapItem "Darkblade of the Warlord" mainhand
|
|    To swap stat food in one bag with other food in another bag:
|        /call SwapItem "Bristlebanes Party Platter" ${FindItem[halas 10lb meat pie].InvSlot}
|
|=================================================  ==================================================  ===================
|  Cast: the main subroutine that casts spells or items for you
|     Usage:
|        /call Cast "spellname|itemname|AAname|AA#" [item|alt|gem#] [give up time][s|m] [custom subroutine name]
|     Examples:
|
|     To cast Howl of Tashan and mem it in slot 3 if not memmed:
|       /call Cast "Howl of Tashan" gem3
|
|     To cast Arcane Rune and keep trying for 7 seconds, in case of interrupts.
|       /call Cast "Arcane Rune" gem5 7s
|
|     To click Grim Aura earring that's in a bag:
|       /call Cast "Shrunken Goblin Skull Earring" item
|
|     To use AA ability Eldritch Rune:
|       /call Cast "Eldritch Rune" alt
|         or
|       /call Cast "173" alt
|
|     To call a subroutine that interrupts CH if target gets healed before it lands:
|       /call Cast "Complete Healing" gem1 0 CheckHP
|     Then in your macro have somewhere:
|       Sub CheckHP
|          /if ( ${Target.PctHPs}>=80 ) /call Interrupt
|       /return
|
| Returns these values:
|----------------------+----------------------------------------------------------------------+
| CAST_CANCELLED       | Spell was cancelled by ducking (either manually or because mob died) |
| CAST_CANNOTSEE       | You can't see your target                                            |
| CAST_IMMUNE          | Target is immune to this spell                                       |
| CAST_INTERRUPTED     | Casting was interrupted and exceeded the given time limit            |
| CAST_INVIS           | You were invis, and noInvis is set to true                           |
| CAST_NOTARGET        | You don't have a target selected for this spell                      |
| CAST_NOTMEMMED       | Spell is not memmed and you gem to mem was not specified             |
| CAST_NOTREADY        | AA ability or spell is not ready yet                                 |
| CAST_OUTOFMANA       | You don't have enough mana for this spell!                           |
| CAST_OUTOFRANGE      | Target is out of range                                               |
| CAST_RESISTED        | Your spell was resisted!                                             |
| CAST_SUCCESS         | Your spell was cast successfully! (yay)                              |
| CAST_UNKNOWNSPELL    | Spell/Item/Ability was not found                                     |
|----------------------+----------------------------------------------------------------------+

#event BeginCast "You begin casting#*#"
#event Collapse "Your gate is too unstable, and collapses.#*#"
#event FDFail "#1# has fallen to the ground.#*#"
#event Fizzle "Your spell fizzles#*#"
#event Immune "Your target is immune to changes in its attack speed#*#"
#event Immune "Your target is immune to changes in its run speed#*#"
#event Immune "Your target cannot be mesmerized#*#"
#event Interrupt "Your casting has been interrupted#*#"
#event Interrupt "Your spell is interrupted#*#"
#event NoHold "Your spell did not take hold#*#"
#event NoLOS "You cannot see your target.#*#"
#event NoTarget "You must first select a target for this spell!#*#"
#event NotReady "Spell recast time not yet met.#*#"
#event OutOfMana "Insufficient Mana to cast this spell!#*#"
#event OutOfRange "Your target is out of range, get closer!#*#"
#event Recover "You haven't recovered yet...#*#"
#event Recover "Spell recovery time not yet met#*#"
#event Resisted "Your target resisted the #1# spell#*#"
#event Resisted2 "You resist the #1# spell#*#"
#event Standing "You must be standing to cast a spell#*#"
#event Stunned "You are stunned#*#"
#event Stunned "You can't cast spells while stunned!#*#"
#event Stunned "You *CANNOT* cast spells, you have been silenced!#*#"


Sub Cast(string spellName,string spellType,timer giveUpTimer,string mySub)
   /declare castTime float local
   /if ( ${spellType.Equal[item]} ) {
      /varset castTime ${FindItem[${spellName}].CastTime}
   } else /if ( ${spellType.Equal[alt]} ) {
      /varset castTime ${AltAbility[${spellName}].Spell.MyCastTime}
   } else {
      /varset castTime ${Spell[${spellName}].MyCastTime}
   }
   /if ( ${Me.Invis} && ${noInvis} ) {
      /return
   }
   :wait_for_stop
   /if ( !${Defined[spellType]} ) /declare spellType string local spell
   /if ( ${Me.Casting.ID} ) {
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :wait_for_stop
   }
   /if ( ${Me.Speed} ) {
   :wait_for_stop2
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /if ( ${Me.Moving} && ${castTime}>0.1 ) /goto :wait_for_stop2
   }
   /if ( !${Defined[giveUpTimer]} ) /declare giveUpTimer timer local 0
   /if ( !${Defined[spellRecastTime1]} ) {
      /if ( !${Defined[noInterrupt]} ) /declare noInterrupt int outer 0
      /declare moveBack bool outer false
      /declare selfResist int outer
      /declare selfResistSpell string outer
      /declare castEndTime timer outer
      /declare refreshTime timer outer 0
      /declare itemRefreshTime float outer 0
      /declare startCastingLoc string outer
      /declare i int local
      /declare castReturn string outer
      /declare spellNotHold string outer
      /delay 5
      /for i 1 to 9
         /declare spellRecastTime${i} timer outer
         /if ( ${Me.SpellReady[${i}]} ) {
            /varset spellRecastTime${i} 0
         } else {
            /varcalc spellRecastTime${i} 10*${Me.Gem[${i}].RecastTime}
         }
      /next i
   }
   /varset spellNotHold 0
   /varset selfResist 0
   /declare delayTime timer local
   /declare swapItemBack bool local false
   /declare slotName int local
   /declare oldItemName string local
   /declare slotID int local
   /declare oldSlotID int local
   /declare spellID int local
   /declare charges int local

   /if ( ${Window[SpellBookWnd].Open} ) /keypress spellbook
   /if ( ${Me.Ducking} ) /keypress duck
   /if ( !${Me.Standing} ) /stand

   /doevents Recover
   /doevents BeginCast
   /doevents Fizzle
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents OutOfMana
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents Collapse
   /doevents NoTarget
   /doevents NotReady
   /varset castReturn CAST_SUCCESS

      /if ( ${spellType.Equal[item]} ) /goto :cast_item
   /if ( ${spellType.Equal[alt]} ) /goto :cast_alt

:cast_spell
   /if ( !${Int[${Me.Book[${spellName}]}]} ) {
      /echo Spell: "${spellName}" was not found in your book
      /return CAST_UNKNOWNSPELL
   }
   /if ( !${Me.Gem[${spellName}]} ) {
   :mem_spell
      /if ( ${Cursor.ID} ) {
         /autoinventory
         /delay 5
         /goto :mem_spell
      }
      /if ( ${spellType.Left[3].Equal[gem]} ) {
         /memspell ${spellType.Right[1]} "${spellName}"
      } else {
         /return CAST_NOTMEMMED
      }
      /delay 6s ${Me.Gem[${spellName}]}
      /if ( !${Me.Gem[${spellName}]} ) {
         /echo Spell mem interrupted...
         /return CAST_INTERRUPTED
      }
      :wait_for_mem

      /delay 15s ${Me.SpellReady[${spellName}]}
      /if ( !${Me.SpellReady[${spellName}]} ) {
         /if ( ${giveUpTimer} ) /goto :wait_for_mem
         /return CAST_NOTREADY
      }
   }
   /varset spellType spell
   /if ( ${spellName.Find[illusion: ]} && ${Me.AltAbilityReady[project illusion]} ) /call Cast "project illusion" alt

   /varset giveUpTimer ${giveUpTimer.OriginalValue}
   /declare recoverWaitTime timer local 30

:cast_spell_loop
:wait_for_spell
   /if ( ${Me.SpellReady[${spellName}]} ) {
      /varset spellRecastTime${Me.Gem[${spellName}]} 0
      /goto :skip_delay
   }
   /if ( ${spellRecastTime${Me.Gem[${spellName}]}}  ) {
      /if ( !${giveUpTimer} ) /return CAST_NOTREADY
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :wait_for_spell
   }
   /if ( !${refreshTime} ) /goto :skip_delay
:wait_on_refresh
   /if ( ${Me.SpellReady[${spellName}]} ) /varset refreshTime 0
   /if ( ${refreshTime}>0 ) {
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :wait_on_refresh
   }
   /varcalc delayTime 10*(1.5-${Spell[${spellName}].MyCastTime})
:cast_delay_loop
   /if ( ${delayTime}>0 ) {
      /if ( ${Defined[mySub]} ) /call ${mySub}
      /goto :cast_delay_loop
   }
:skip_delay
   /varset startCastingLoc ${Me.X} ${Me.Y} ${Me.Z}
   /cast "${spellName}"

   /if ( ${Me.Casting.ID} ) {
      /varset spellID ${Me.Casting.ID}
      /varcalc castEndTime ${Me.Casting.MyCastTime}*10
      /if ( ${castEndTime}<${Math.Calc[${Me.Casting.CastTime}*5]} ) /varcalc castEndTime ${Me.Casting.CastTime}*5
      /echo Casting: ${Me.Casting.Name}${If[!${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]}
   }

   /varset moveBack false

   /call WaitCast ${mySub}

   /if ( ${moveBack} ) {
      /keypress back hold
      /delay 4
      /keypress back
      /delay 15 !${Me.Moving}
   }

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) {
      /echo Spell was cancelled...
      /return CAST_CANCELLED
   }

   /doevents Recover
   /doevents BeginCast
   /doevents Fizzle
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents OutOfMana
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents Collapse
   /doevents NoTarget
   /doevents NotReady

   /if ( !${spellID} ) /varset spellID ${Spell[${spellName}].ID}
   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) {
      /if ( ${castReturn.Equal[CAST_NOTREADY]} ) /return CAST_NOTREADY
      /if ( ${castReturn.Equal[CAST_FIZZLE]} ) {
         /echo Spell Fizzled. Recasting...
         /goto :cast_spell_loop
      }
      /if ( ${castReturn.Equal[CAST_RECOVER]} ) {
         /if ( !${recoverWaitTime} ) {
            /varcalc spellRecastTime${Me.Gem[${spellName}]} 10*${Spell[${spellID}].RecastTime}
            /if ( !${giveUpTimer} ) /return CAST_NOTREADY
         }
         /goto :cast_spell_loop
      }
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_spell_loop
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) {
         /if ( ${Me.Stunned} ) {
            /delay 3s !${Me.Stunned}
         } else {
            /delay 7
         }
         /goto :cast_spell_loop
      }
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) {
         /if ( ${giveUpTimer} ) {
            /echo Spell was interrupted. Recasting...
            /goto :cast_spell_loop
         }
         /echo Spell was interrupted...
         /return CAST_INTERRUPTED
      }
   }
   /if ( !${castReturn.Equal[CAST_CANNOTSEE]} && !${castReturn.Equal[CAST_OUTOFRANGE]} && !${castReturn.Equal[CAST_OUTOFMANA]} && !${castReturn.Equal[CAST_NOTARGET]} ) {
      /varcalc refreshTime 10*${Spell[${spellID}].RecoveryTime}
      /varcalc spellRecastTime${Me.Gem[${spellName}]} 10*${Spell[${spellID}].RecastTime}
   }
   /if ( ${castReturn.Equal[CAST_COLLAPSE]} ) {
      /varset giveUpTimer 200
      /goto :cast_spell_loop
   }
/return ${castReturn}


:cast_item
   /if ( !${FindItem[${spellName}].InvSlot} ) {
      /echo Cannot find item: ${spellName}
      /return CAST_UNKNOWNSPELL
   }
   /if ( ${FindItem[${spellName}].InvSlot}>21 ) {
      /varset swapItemBack true
      /if ( ${FindItem[${spellName}].WornSlot[1]} && ${FindItem[${spellName}].EffectType.Find[worn]} ) {
         /varset slotName ${FindItem[${spellName}].WornSlot[1]}
      } else /if ( ${FindItem[${spellName}].InvSlot}>29 ) {
         /varset slotName 29
      } else {
         /varset slotName ${FindItem[${spellName}].InvSlot}
      }
      /varset slotID ${InvSlot[${slotName}].ID}
      /varset oldSlotID ${FindItem[${spellName}].InvSlot.ID}
      /varset oldItemName ${InvSlot[${slotID}].Item.Name}
      /call SwapItem "${spellName}" ${slotID}
   }
:cast_item_loop
:wait_item_loop
   /if ( ${itemRefreshTime} > ${MacroQuest.Running} ) {
      /delay 1
      /goto :wait_item_loop
   }
   /varset itemRefreshTime ${Math.Calc[${MacroQuest.Running}+000]}
   /varset charges ${FindItem[${spellName}].Charges}
   /varset startCastingLoc ${Me.X} ${Me.Y} ${Me.Z}
   /cast item "${spellName}"
   /if ( ${Me.Casting.ID} ) {
      /varcalc castEndTime ${FindItem[${spellName}].CastTime}*10
      /echo Casting: ${FindItem[${spellName}].Spell.Name}${If[!${FindItem[${spellName}].Spell.TargetType.Equal[PB AE]} && !${FindItem[${spellName}].Spell.TargetType.Equal[self]} && ${Target.ID}, on >> ${Target.CleanName} <<,]}
   }
   /if ( ${charges}>0 ) /delay 1s ${FindItem[${spellName}].Charges}!=${charges}

   /call WaitCast ${mySub}

   /if ( ${swapItemBack} ) {
      /if ( ${FindItem[${spellName}].ID} ) {
         /call SwapItem "${spellName}" ${oldSlotID}
      } else /if ( ${FindItem[${oldItemName}].ID} ) {
         /call SwapItem "${oldItemName}" ${slotID}
      }
      /if ( ${Cursor.Container} ) /autoinventory
   }

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) {
      /echo Spell was cancelled...
      /return CAST_CANCELLED
   }

   /doevents BeginCast
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents Collapse
   /doevents NoTarget
   /doevents NotReady

   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) {
      /if ( ${castReturn.Equal[CAST_NOTREADY]} ) /return CAST_NOTREADY
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_item
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) {
         /if ( ${Me.Stunned} ) {
            /delay 3s !${Me.Stunned}
         } else {
            /delay 7
         }
         /goto :cast_item
      }
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) {
         /if ( ${giveUpTimer} ) {
            /echo Spell was interrupted. Recasting...
            /goto :cast_item
         }
         /echo Spell was interrupted...
         /return CAST_INTERRUPTED
      }
   }
   /if ( ${castReturn.Equal[CAST_COLLAPSE]} ) {
      /varset giveUpTimer 200
      /goto :cast_item
   }
/return ${castReturn}


:cast_alt
   /if ( !${Me.AltAbilityReady[${spellName}]} ) /return CAST_NOTREADY
   /echo Using AA Ability: ${AltAbility[${spellName}].Name}
   /alt activate ${AltAbility[${spellName}].ID}
   /if ( ${AltAbility[${spellName}].Spell.MyCastTime}>=0.5 ) /delay 1s ${Me.Casting.ID}
   /call WaitCast ${mySub}

   /if ( ${castReturn.Equal[CAST_CANCELLED]} ) {
      /echo Spell was cancelled...
      /return CAST_CANCELLED
   }

   /doevents BeginCast
   /doevents Interrupt
   /doevents Standing
   /doevents FDFail
   /doevents OutOfRange
   /doevents NoLOS
   /doevents Resisted2
   /doevents Resisted
   /doevents Immune
   /doevents Stunned
   /doevents NoTarget

   /if ( !${castReturn.Equal[CAST_SUCCESS]} ) {
      /if ( ${castReturn.Equal[CAST_RESTART]} ) /goto :cast_alt
      /if ( ${castReturn.Equal[CAST_STUNNED]} ) {
         /if ( ${Me.Stunned} ) {
            /delay 3s !${Me.Stunned}
         } else {
            /delay 7
         }
         /goto :cast_alt
      }
      /if ( ${castReturn.Equal[CAST_INTERRUPTED]} ) {
         /if ( ${giveUpTimer} ) {
            /echo Spell was interrupted. Recasting...
            /goto :cast_alt
         }
         /echo Spell was interrupted...
         /return CAST_INTERRUPTED
      }
   }
/return ${castReturn}


Sub EquipItem(string WhatWhere)
   /declare DestName string local
   /declare ItemName string local ${String[${WhatWhere}].Arg[1,|]}
   /declare SlotName string local ${String[${WhatWhere}].Arg[2,|]}
   /if (${SlotName.Equal[NULL]}) /varset SlotName ${InvSlot[${FindItem[=${ItemName}].WornSlot[1]}].Name}
   /if (${FindItem[=${ItemName}].InvSlot}<22 || !${FindItem[=${ItemName}].WornSlot[${SlotName}]}) /return
   /if (!${InvSlot[${SlotName}].Item.Name.Equal[NULL]}) /varset DestName "${InvSlot[${SlotName}].Item.Name}|${SlotName}"
   /call SwapItem "${ItemName}" "${SlotName}"
/return ${DestName}

| Sub EquipItem(string itemName,string slotName)
   /if ( !${Defined[slotName]} ) /declare slotName string local ${FindItem[${itemName}].WornSlot[1]}
   /declare oldItem string local ${Me.Inventory[${slotName}].Name}
   /call SwapItem "${itemName}" ${slotName}
/return "${oldItem}" ${slotName}

Sub SwapItem(string itemName,string slotName)
   /if ( ${InvSlot[${slotName}].Item.Name.Equal[${itemName}]} ) /return
   /declare slotID int local
   /declare oldSlotID int local
   /declare oldItem string local
   /declare i int local
   /varset slotID ${InvSlot[${slotName}].ID}           | slotID = slot you're swapping item to
   /varset oldSlotID ${FindItem[${itemName}].InvSlot.ID} | oldSlotID = slot the item was originally in
   /varset oldItem ${InvSlot[${slotName}].Item.Name}     | oldItem = name of item in the slot you're swapping WITH
   /if ( !${slotID} ) {
      /echo Invalid slot name: ${slotName}
      /return
   }
   /if ( !${oldSlotID} ) {
      /echo Could not find item ${itemName}
      /return
   }
:auto_inv
   /if ( ${Cursor.ID} && !${Cursor.Name.Equal[${itemName}]} ) {
      /if ( ${Cursor.Container} ) {
         /for i 1 to 8
            /if ( !${InvSlot[pack${i}].Item.Container} ) {
               /nomodkey /itemnotify pack${i} leftmouseup
            }
         /next i
      } else {
         /autoinventory
      }
      /goto :auto_inv
   }


:pick_up_item
 | if the item is in a bag and it's not open, then open it!
   /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup

 | if the slot you're putting it in is inside a bag and it's not open, then open it!
   /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup

 | ok.. pick up the item now!
   /squelch /nomodkey /shiftkey /itemnotify ${InvSlot[${oldSlotID}]} leftmouseup

 | if item isn't on your cursor, try again!
   /if ( !${Cursor.Name.Equal[${itemName}]} ) {
      /if ( ${Cursor.ID} && !${Cursor.Container} ) /autoinventory
      /goto :pick_up_item
   }
:exchange_items
   /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup
   /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup

 | put the item in the new slot, and pick up whatever item was there
   /squelch /nomodkey /shiftkey /itemnotify ${slotID} leftmouseup

 | if it didnt get exchanged, try again!
   /if ( ${Cursor.ID} && !${Cursor.Name.Equal[${oldItem}]} && !${Cursor.Name.Equal[${itemName}]} && !${Cursor.Container} ) /autoinventory
   /if ( !${InvSlot[${slotID}].Item.Name.Equal[${itemName}]} ) /goto :exchange_items
:drop_item
   /if ( !${Cursor.Container} || ( ${InvSlot[${oldSlotID}]}<30 && ${InvSlot[${oldSlotID}]}>=22 ) ) {
      /if ( ${InvSlot[${oldSlotID}].Pack} && !${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup
      /if ( ${InvSlot[${slotID}].Pack} && !${Window[${InvSlot[${slotID}].Pack.Name}].Open} ) /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup
      /squelch /nomodkey /itemnotify ${oldSlotID} leftmouseup
      /if ( ${Cursor.ID} ) {
         /if ( !${Cursor.Name.Equal[${oldItem}]} ) /autoinventory
         /goto :drop_item
      }
   }
:close_pack
   /if ( ${InvSlot[${oldSlotID}].Pack} && ${Window[${InvSlot[${oldSlotID}].Pack.Name}].Open} && ( ${Cursor.Name.Equal[${itemName}]} || ${FindItem[${itemName}].ID} ) ) {
      /squelch /nomodkey /itemnotify ${InvSlot[${oldSlotID}].Pack} rightmouseup
      /goto :close_pack
   }
   /if ( ${InvSlot[${slotID}].Pack} && ${Window[${InvSlot[${slotID}].Pack.Name}].Open} && ( ${Cursor.Name.Equal[${itemName}]} || ${FindItem[${itemName}].ID} ) ) {
      /squelch /nomodkey /itemnotify ${InvSlot[${slotID}].Pack} rightmouseup
      /goto :close_pack
   }
/return

Sub Interrupt
   /if ( ${Me.Mount.ID} ) /dismount
   /stopcast
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_CANCELLED
/return ${Macro.Return}


Sub WaitCast(string mySub)
   /declare currentTarget int local ${Target.ID}
   /declare currentTargetType string local ${Target.Type}
:wait_cast_loop
   /if ( ${Bool[${mySub}]} ) /call ${mySub}
   /if ( ${Me.Casting.ID} ) {
      /if ( ${currentTarget} && !${Spawn[${currentTarget}].Type.Equal[${currentTargetType}]} ) {
         /if ( !${Me.Casting.TargetType.Equal[PB AE]} && !${Me.Casting.TargetType.Equal[self]} && !${moveBack} && ( !${Me.Mount.ID} || !${noInterrupt} ) ) {
            /if ( !${Me.Mount.ID} || ${castEndTime}>70 ) {
               /call Interrupt
            } else /if ( ${Me.Casting.RecastTime}>3 ) {
               /varset castReturn CAST_CANCELLED
               /keypress forward hold
               /delay 6
               /keypress forward
               /varset moveBack true
            }
         }
      }
      /if ( ${Me.State.Equal[DUCK]} ) /varset castReturn CAST_CANCELLED
      /delay 1
      /goto :wait_cast_loop
   }
/return

Sub Event_Fizzle
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_FIZZLE
/return

Sub Event_Resisted(string line,string name)
   /if ( ${selfResist} && ${name.Equal[${selfResistSpell}]} ) {
      /varset selfResist 0
      /return
   }
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESISTED
/return

Sub Event_Resisted2(string line,string name)
   /if ( ${Defined[selfResist]} ) {
      /varset selfResist 1
      /varset selfResistSpell ${name}
   }
/return

Sub Event_Interrupt
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_INTERRUPTED
/return

Sub Event_Recover
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RECOVER
/return

Sub Event_Immune
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_IMMUNE
/return

Sub Event_Stunned
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_STUNNED
/return

Sub Event_NoLOS
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_CANNOTSEE
/return

Sub Event_Standing
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_RESTART
/return

Sub Event_Collapse
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_COLLAPSE
/return

Sub Event_OutOfMana
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_OUTOFMANA
/return

Sub Event_OutOfRange
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_OUTOFRANGE
/return

Sub Event_NoTarget
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_NOTARGET
/return

Sub Event_NotReady
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_NOTREADY
/return

Sub Event_NoHold
   /if ( ${Defined[spellNotHold]} ) /varset spellNotHold 1
/return

Sub Event_BeginCast
   /if ( ${Defined[castReturn]} ) /varset castReturn CAST_SUCCESS
/return

Sub Event_FDFail(string line,string name)
   /if ( ${name.Equal[${Me.Name}]} && ${Defined[castReturn]} ) {
      /if ( !${Me.Standing} ) /stand
      /varset castReturn CAST_RESTART
   }
/return


AutoLooter.inc
Rich (BB code):
|AutoLooter.inc

Sub AutoLoot
  /declare slot int local 1
  /declare NumberItems int local 0
  /declare CorpseCut int local 0

  /echo Looting corpse
  /target corpse
  /loot
  /delay 2s
  /varset NumberItems ${Corpse.Items}
  /if (${NumberItems}>0) {
    /varcalc CorpseCut ${Target.CleanName.Find['s corpse]}-1
    /for slot 1 to ${NumberItems}
      /nomodkey /itemnotify loot${slot} leftmouseup
      /delay 3s
      :LagFix
        /call HandleItem
        /autoinventory
        /delay 3s
        /if (${Cursor.ID}) /goto :LagFix
    /next slot
  }
  /nomodkey /notify LootWnd DoneButton leftmouseup
  /delay 2s
  /if (${Target.ID}) /target clear
  /delay 2s

/return


sub HandleItem
   /echo Found ${Cursor.Name}
   /declare ItemSetting int local
   /declare NotFound int local

   /varset NotFound -1

   | Look up this item in the INI file
   /varset ItemSetting ${Ini[PullLoot.ini,KeepList,${Cursor.Name},${NotFound}]}

   /delay 1s

   | If the item isn't in the .ini file then add it.
   /if (${ItemSetting}==${NotFound}) {
      /ini "PullLoot.ini" "KeepList" "${Cursor.Name}" "1"
      /varset ItemSetting 1
   }

   | If we're keeping this item then stash it in our bags.
   | Otherwise, just destroy it.
   /if (${ItemSetting}==1) {
      :LootIt
      /autoinventory
      /delay 2s
      /if (${Cursor.ID}) /goto :LootIt
   } else {
      /destroy
   }
/return


Exp_Tracking.inc
Rich (BB code):
|**********************
Exp_Tracking.inc
Version 2.0

This include will track your exp in various forms.
You can track Total Exp Gained, Total AA Exp Gained, Total Run Time, Exp Gained Per Minute,
AA Exp Gained Per Minute, Aproximate Time Till Ding, and Aproximate Time Till AA Ding.
Some of this came from the current "perfect xptracker" macro however I wanted to display
more usefull information.

To use simply /call ExpPrep during a part of your macro that is only called once.
Then /call ExpTrack at any moment you wish to check your exp stats.
***********************|


Sub ExpPrep

   /declare Exper               float  outer ${Me.PctExp}
   /declare AAExp               float  outer ${Me.PctAAExp}
   /declare TotalAAExp          float  outer  0.00
   /declare TotalExp            float  outer  0.00


|*************************************************  ********************
Edit these values as you see fit. If you set to 1 the information will
show each call. Set to 0 and it will not show.
**************************************************  ********************|

||Show Total Exp Gained?||
   /declare ShowTEG       bool   outer TRUE

||Show Total AA Exp Gained?||
   /declare ShowTAAEG     bool   outer TRUE

||Show Total Run Time?||
   /declare ShowTRT       bool   outer TRUE

||Show Exp Gained Per Minute?||
   /declare ShowEGPM      bool   outer TRUE

||Show AA Exp Gained Per Minute?||
   /declare ShowAAEGPM    bool   outer TRUE

||Show Aproximate Time Till Ding?||
   /declare ShowATTD      bool   outer TRUE

||Show Aproximate Time Till AA Ding?||
   /declare ShowATTAAD    bool   outer TRUE

/return

Sub ExpTrack

  /if (${Me.PctAAExp}>=${AAExp}) {
   /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]}
  } else {
   /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}+100]}
  }
  /if (${Me.PctExp}>=${Exper}) {
   /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]}
  } else {
   /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}+100]}
  }
      /varcalc TotalAAExp ${TotalAAExp}+${AAExp}
      /varcalc TotalExp ${TotalExp}+${Exper}

   /echo ***************************************
   /if (${ShowTEG}) /echo Total Gained: ${Exper}% / ${AAExp}%
   /if (${ShowTEG}) /echo Total Exp Gained: ${TotalExp}% / ${TotalAAExp}%
   /if (${ShowTRT}) /echo Total Running Time: ${Math.Calc[${Macro.RunTime}/60]} minutes
   /if (${ShowEGPM}) /echo Exp Gained Per Minute: ${Math.Calc[${TotalExp}/${Math.Calc[${Macro.RunTime}/60]}]} / ${Math.Calc[${TotalAAExp}/${Math.Calc[${Macro.RunTime}/60]}]}
   /if (${ShowATTD}) {
      /if (${TotalExp}==0) {
         /echo Aprox Time till Ding: Forever!!
      } else {
         /echo Aprox Time till Ding: ${Math.Calc[${Math.Calc[${Math.Calc[${Macro.RunTime}/60]}/${TotalExp}]}*${Math.Calc[100-${Me.PctExp}]}]} minutes
      }
   }
   /if (${ShowATTAAD}) {
      /if (${TotalAAExp}==0) {
         /echo Aprox Time till AA Ding: Forever!!
      } else {
         /echo Aprox Time till AA Ding: ${Math.Calc[${Math.Calc[${Math.Calc[${Macro.RunTime}/60]}/${TotalAAExp}]}*${Math.Calc[100-${Me.PctAAExp}]}]} minutes
      }
   }
   /echo ***************************************
   /varset Exper ${Me.PctExp}
   /varset AAExp ${Me.PctAAExp}

/return


As for the warrior, I ripped the Pull.mac and then spliced it with a Loot.ini and the advanced xp tracker. I can confirm that it diffinitely camps you out when a GM enters the zone. The idea for the Loot.ini came from yafm.mac


Puller.mac
Rich (BB code):
| Puller Macro
| Puller.mac
| Author      : Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter
| Version     : v3 2004-12-16 5:50pm PST
| Useage      : /macro pull
| Description : This macro will run your character around Pulling any mobs.
|      This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
| : Ripped section Jdelpheki
|      Modified for pull to area where Macro is started.  I have been using this
|      2 level 45's Cleric Running genbot and Warrior running Pull2.  Ran for 4 hours
|      Max with one cleric death. Needs Throwing weapon or arch support too
|      Needs Genbot to announce its getting hit or get a new cleric script
| : Ripped section hakcenter
|      Pulls Any Mobs within radius (regardless of level)
|      No Mob Array Required
|      Looting Added
|      *Looting -stuck on corpse bug fixed-
|      Loot Table Array Support
|      *Puller runs to pull spot after mob looting is finished
|      *Removed Target Fail Counters
|      *Checks for mobs every 30seconds, 1second 50radius checks
|      *Reformated
|      *On zoning(death whatever), quits everquest
|      *Added more checks
|
|      2004-12-11
|
|      Added some squelching, always looking for mobs within range, 5 distance intervals
|      Jacked Item Coding from Rogue Helper
|      Fixed UI locking up
|      Fixed Long Buff Casts
|      Added Disarm to the Special Combat abilities
|
|      2004-12-16
|      Revamped Close mob checking to 0.1second 100radius squelched
|      Revamped Item casting to check for local mobs during.. and interupt if mob is near 100radius
|      Removed mass escaping.. cause its retarded
|      Fixed cool errors when accidently pushing esc while on a mob
|      Fixed cool errors when accidently pushing esc while pulling a mob
|      Added 1second before first item cast, incase item is worn... you get interupted cause its too fast
|
|------------------------------------------------------------------------------------

#turbo 10
#include AutoLooter.inc
#include Exp_Tracking.inc
#Event Slain "#*# slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"

Sub Main

   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  150
   |------------------------------------------------------------
   |How far is the fast movement range?
   |------------------------------------------------------------
   /declare RV_FastRange        int outer  10
   |------------------------------------------------------------
   |How far is the maximum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMax         int outer  7
   |------------------------------------------------------------
   |How far is the minimum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMin         int outer  8
   |------------------------------------------------------------
   |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  100

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /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_ObstacleCount    int outer  0
   /declare RV_hitcount         int outer  0
   /declare RV_healcheck        int outer  0
   /declare RT_MyXLOC           int outer  ${Me.X}
   /declare RT_MyyLOC           int outer  ${Me.Y}

   /declare lastevent string outer None
   /declare CheckBuffs int outer 0
   /declare i int outer
   /declare ialias string outer None
   /declare doIclick bool outer FALSE
   /declare bouncenum int outer 1
   /declare ibounce string outer None
   /declare itemspellname string outer None
   /declare clicktimer timer outer 0
   /squelch /alias /iset /echo ItemSet
   /squelch /alias /ibounce /echo ItemBounce
   /squelch /alias /iclick /echo ItemCast

   /varset CheckBuffs 1
   /call ExpPrep
   :Start
      /doevents
      /call GMCheck
      /call GetTarget
      /if (${RV_HasTarget}) /call Pull
      /if (${RV_HasTarget}) /call CombatSub
      /call ResetSub
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /goto :Start
/return

|--------------------------------------------------------------------------------
|SUB: GMCheck
|--------------------------------------------------------------------------------
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: AquireTarget
|--------------------------------------------------------------------------------
Sub GetTarget
   /doevents
   /declare SpawnTimer         int local
   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub       int local
   /echo Looking for Close Range Mobs
   :Acquire
      /doevents
      /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 5
      /squelch /target radius ${RV_CurrentRadius} npc
      /varset RV_MyTargetID ${Target.ID}
      /varset RV_MyTargetDead 0
      /if (${Target.ID}) {
         /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.Name}
         /echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]}
         /return
      }

      /next RV_CurrentRadius
      /goto :Acquire
/return

|--------------------------------------------------------------------------------
|SUB: Pull
|--------------------------------------------------------------------------------
Sub Pull
   /doevents
   /echo Pulling Mob
   /declare TargDist float local
   :PullLoop
      /doevents
      /if (!${Me.Combat}) /attack on
      /call MoveToMob
      /if (!${Target.ID}) /return
      /face fast
      /if (${Target.PctHPs}==100) /goto :PullLoop
      /if (${Target.PctHPs}<21) /return
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /if (!${Target.ID}) /return
      /face fast
   :Engage
      /varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
      /if ( ${TargDist}<30 ) /return
      /delay 1s
      /goto :Engage
/return

|--------------------------------------------------------------------------------
|SUB: MovetoMob
|--------------------------------------------------------------------------------
Sub MoveToMob
   /doevents
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
   :MovementLoop
      /doevents
      /if (!${Target.ID}) /return
      /face fast
      /varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
      /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_ObstacleCount}>=15) {
         /call CheckObstacle
         /goto :Movementloop
      }
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop
/return

|--------------------------------------------------------------------------------
|SUB: MoveToLocation
|--------------------------------------------------------------------------------
Sub MoveToLoc(MoveToY, MoveToX)
   /doevents
   /declare running int local
   /declare distanceNow float local
   /declare distanceBefore float local
   /declare distanceModifier int local
   /declare distanceTimer timer 15
   /varset running 0
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
   /varset distanceModifier 1
   /echo Moving to Location: ${MoveToY}, ${MoveToX}.
   /echo Distance: ${distanceBefore}
   :moveToLocation
      /doevents
      /face fast nolook loc ${MoveToY},${MoveToX}
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
         /keypress forward
         /return
      }
      /if (${distanceTimer}==0) {
         /if (${Me.Sneaking}) {
            /varset distanceModifier 2
         } else {
            /varset distanceModifier 1
         }
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
         /call HitObstacle
         }
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /varset distanceTimer 15
      }
      /if (${running}==0) {
         /keypress forward
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
               /varset running 1
               /keypress forward hold
            }
      } else {
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
            /varset running 0
            /keypress forward
         }
      }
      /goto :moveToLocation
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleCheck
|--------------------------------------------------------------------------------
Sub CheckObstacle
   /doevents
   /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_ObstacleCount 0
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleAvoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[2]}) {
      /keypress strafe_right hold
   } else {
      /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
   /doevents
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /echo Attacking Mob NOW!
   :CombatLoop
      /if (!${Me.Combat}) /attack on
      /if (!${Target.ID}) /return
      /call MoveToMob
      /call SpecialIT
      /if (!${RV_TargetDead}) /goto :CombatLoop
      /doevents
/return

|--------------------------------------------------------------------------------
|SUB: SpecialCombat
|--------------------------------------------------------------------------------
Sub SpecialIt
   /doevents
   /declare TempID    int inner  0
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Kick]}) {
      /doability "Kick"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Disarm]}) {
      /doability "Disarm"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) {
      /doability "Taunt"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) {
      /doability "Bash"
   }
/return

|--------------------------------------------------------------------------------
|SUB: Slain
|--------------------------------------------------------------------------------

Sub Event_Slain
   /varset RV_TargetDead 1
   /varset RV_Fighting 0
   /attack off
   /call ExpTrack
   /target clear
   /keypress forward
   /keypress back
   /squelch /target radius 30 corpse
   /face fast
   /if (${RV_HasTarget}) /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
  /echo Zoned
  /delay 60s
  /quit
  /endmacro

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob
   /doevents
   /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
   /doevents
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
/return


PullLoot.ini example
Rich (BB code):
[default]
MaxSave=100
[KeepList]
Roots=0
Rat Meat=1
Snake Scales=1
Rat Whiskers=1
Snake Egg=1
Bat Wing=1

On the PullLoot.ini since I used the idea behind yafm it autopopulates.

0 = Destroy
1 = Keep


And now for the Cleric. I have a low 60's cleric, but the only tweaks here were the adv xp tracking and using tells verses /gsay. You can change it by simply doing a find/replace on /tell ${tankname} and replace it with /gsay or /1 what ever communications you want to happen.

Healer.mac
Rich (BB code):
#include spell_routines.inc
#include Exp_Tracking.inc
#event Exp "You gain#*#"
#Chat Chat
#Chat tell

Sub Main

|------------READ THIS SECTION AND EDIT IF NEEDED-----------|
   /call ExpPrep
   /declare mychannel string outer plingrocks
   /declare autohealmode int outer 3
   /declare healspell string outer Complete Healing
   /declare healspellrange int outer 100
   /declare patchheal string outer Ethereal Light
   /declare patchhealrange int outer 200
   /declare hotspell string outer Celestial Elixir
   /declare hotspellrange int outer 100
   /declare daspell string outer Divine Barrier
   /declare yaulpspell string outer Yaulp V
   /declare usegroupheal int outer 1
   /declare groupheal string outer Word of Restoration
   /declare grouphealrange int outer 70
   /declare usedivarb int outer 1
   /declare healafterdivarb int outer 0
   /declare announce int outer 1
   /declare autosit int outer 1
   /declare distancetosit int outer 40
   /declare autointerrupt int outer 1
   /declare onlyhealfd int outer 1
   /declare interrupt2healself int outer 1
   /declare interrupt2healselfhp int outer 50
   /declare noInvis int outer 1
   /declare defaultstophealpoint int outer 80
   /declare acbuff string outer Ward of Valiance
   /declare longhpbuff string outer Conviction
   /declare singlesymbuff string outer Symbol of Balikor
   /declare groupsymbuff string outer NULL
   /declare spellhastebuff string outer Blessing of Reverence
   /declare rgcspell string outer Remove Greater Curse
   /declare healpetmode int outer 2
   /declare pethealpoint int outer 65
   /declare manatohealpet int outer 25
   /declare pethealspell string outer Complete Healing
   /declare pethealspellrange int outer 100
   /declare nukeone string outer Judgement
   /declare nuketwo string outer Order
   /declare stunone string outer Sound of Divinity
   /declare stuntwo string outer Shock of Wonder

|** Tweak Heals Here - tankhealpoint is for War/Pal/SK other
than MT, casterhotpoint and casterpatchpoint refer to
wiz/mag/enc/dru, necshmpatchpoint refers to necros and
shamans, defaultpatchpoint refers to all other classes.   **|

   /declare selfhealpoint int outer 70
   /declare dacastpoint int outer 29
   /declare divarbpoint int outer 25
   /declare interrupt2divarb int outer 12
   /declare tankhealpoint int outer 65
   /declare casterhotpoint int outer 85
   /declare casterpatchpoint int outer 60
   /declare necshmpatchpoint int outer 60
   /declare defaultpatchpoint int outer 70

|**---------------------TrickyDA Config---------------------|
The following are HP buffs cleric will click off, in order,
to get above 40% HP and avoid low HP aggro. Clr will then
click off DA and resume duties, beg new buffs, etc. To
enable, set trickyda to 1, 0 will disable
|---------------------------------------------------------**|
   /declare trickyda int outer 1

   /if (${trickyda}==1) {
      /declare intcount int outer 0
      /declare trickybuff[20] string outer
      /varset trickybuff[1] Ageolism
      /varset trickybuff[2] Hand of Virtue
      /varset trickybuff[3] Conviction
      /varset trickybuff[4] Hand of Conviction
      /varset trickybuff[5] Focus of Soul
      /varset trickybuff[6] Focus of the Seventh
      /varset trickybuff[7] Wunshi's Focusing
      /varset trickybuff[8] Talisman of Wunshi
      /varset trickybuff[9] Protection of the 9
      /varset trickybuff[10] Blessing of the Nine
      /varset trickybuff[11] Steeloak Skin
      /varset trickybuff[12] Blessing of Steeloak
      /varset trickybuff[13] Symbol of Kazad
      /varset trickybuff[14] Kazad`s Mark
      /varset trickybuff[15] Symbol of Balikor
      /varset trickybuff[16] Balikor's Mark
      /varset trickybuff[17] Brell's Stalwart Shield
      /varset trickybuff[18] Brell's Brawny Bulwark
      /varset trickybuff[19] Spiritual Vigor
      /varset trickybuff[20] Spiritual Vitality
   }
|-------------------End TrickyDA Config---------------------|


|------------------------END EDITING------------------------|

   /declare healpct int outer 60
   /declare tankname string outer ${Target}
   /declare tanknameid int outer
   /declare tankclass string outer
   /declare minorhurt int outer 0
   /declare majorhurt int outer 0
   /declare worsthurt string outer NULL
   /declare worsthurtid int outer
   /declare worsthp int outer 100
   /declare worstclass string outer NULL
   /declare gmember int outer
   /declare nohotforua string outer NULL
   /declare nohotforub string outer NULL
   /declare nohotforuc string outer NULL
   /declare nohotforud string outer NULL
   /declare rodwait int outer 0
   /declare following int outer 0
   /declare follname string outer NULL
   /declare pallycount int outer 0
   /declare stophealpoint int outer ${defaultstophealpoint}
   /declare buffbeg int outer 0
   /declare oomspam int outer 1
   /declare lomspam int outer 1
   /declare duckspam int outer 1
   /declare duckfdspam int outer 1
   /declare duckselfspam int outer 1
   /declare nomtspam int outer 1
   /declare ghealhurtcount int outer 0
   /declare divarboor int outer 0
   /declare aetime int outer 0

  |---- /join ${mychannel}


   /if (!${Target.ID}) {
      /echo Target the Tank when you run this macro to designate him as MT
      /end
   } else {
      /varset tanknameid ${Target.ID}
      /varset tankclass ${Target.Class.Name}
   }

   /if (${Defined[Param0]}) {
      /varset healpct ${Param0}
   } else /echo No Heal% specified, defaulting to 60%

   /if (!${Defined[Param1]}) {
      /echo Usage: /mac AFCleric % healspell
      /echo Example: /mac AFCleric 40 Complete Heal
      /echo Defaulting to ${healspell} at ${healpct}%
   } else {
      /if (!${Defined[Param2]}) {
         /varset healspell ${Param1}
      } else /if (!${Defined[Param3]}) {
         /varset healspell ${Param1} ${Param2}
      } else /if (!${Defined[Param4]}) {
         /varset healspell ${Param1} ${Param2} ${Param3}
      } else {
         /varset healspell ${Param1} ${Param2} ${Param3} ${Param4}
      }
   }

   /echo AFCleric Active, running in Autohealmode ${autohealmode}
   /echo Casting ${healspell} on ${tankname} at ${healpct}% HP
   /tell ${tankname} ${Me.PctMana}m
   /if (${autohealmode}==0) /echo ONLY ${tankname} will be healed
   /if (${autohealmode}==1) /echo ONLY ${tankname} and myself will be healed
   /if (${autohealmode}==2) /echo ${tankname}, myself and my group will be healed
   /if (${autohealmode}==3) /echo ${tankname} and myself will be healed before the rest of the group

   :tankwatchloop

   /if (${String[${Spawn[${tanknameid}]}].NotEqual[${tankname}]}) /varset tanknameid 0
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) {
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID}
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid}
      }
      /if (${SpawnCount[${tankname} ${tankclass}]}>1) {
         /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
            /beep
            /varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID}
            /echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro
         } else {
            /beep
            /echo Need to restart macro to correctly identify the MT
         }
      }
   }
   /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) {
      /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) {
         /varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID}
         /echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro
      }
   }
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) {
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
      }
   }
   /if (!${Spawn[${tanknameid}].ID}) {
      /if (${nomtspam}==1) {
         /e Warning No Designated MT is available
         /timed 300 /varset nomtspam 1
         /varset nomtspam 0
      }
   }
   /if ((${Me.PctMana}<=50)&&(${announce}==1)&&(${lomspam}==1)) {
      /tell Groth ${Me.PctMana}m
      /varset lomspam 0
      /timed 300 /varset lomspam 1
   }
   /if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) {
      /tell Groth oom
      /varset oomspam 0
      /timed 300 /varset oomspam 1
      /call MedTime
   }
   /if (${GameState.Equal[CHARSELECT]}) /end
   /if (${Target.ID}==${tanknameid}) {
      /varset stophealpoint ${Math.Calc[${healpct}*1.1]}
      /if ((${Target.Distance}<=${patchhealrange})&&(${Target.PctHPs}<=${Math.Calc[0.7*${healpct}]})&&(${Target.PctHPs}>=1)) {
         /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
      /if ((${Target.Distance}<=${healspellrange})&&(${Target.PctHPs}<=${healpct})&&(${Target.PctHPs}>=${Math.Calc[0.7*${healpct}]})) {
         /if (${announce}==1) /tell Groth (${healspell}) --- %T ---
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
        /if (${announce}==1) /tell Groth ${Me.PctMana}
      }
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
   }
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand
   }
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) {
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand
   }
   /if (${autohealmode}==0) {
      /call CheckEvents
      /goto :tankwatchloop
   }
   /if ((${autohealmode}>=1)&&(${Me.PctHPs}<=${selfhealpoint})) /call Healself
   /if (${autohealmode}>=2) {
      /if ((${Target.PctHPs}>${healpct})||(${Target.Distance}>${healspellrange})||(${Target.PctHPs}<=1)||(!${Target.ID})||(${Target.ID}!=${tanknameid}  )) {
         /call Healgroup
      }
   }
   /if ((${autohealmode}<2)&&(${Me.PctHPs}>${selfhealpoint})&&(${Me.PctMana}<=98)) /call MedTime
   /call CheckEvents
   /goto :tankwatchloop
/return


Sub Healself
   /if (${Me.PctHPs}>${selfhealpoint}) /return
   /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
   /if ((!${Target.ID})||(${Target.PctHPs}>=${Math.Calc[1.1*${healpct}]})||(${Target.PctHPs}<=1)||(${Target.ID}!=${tanknameid})) {
      /if ((${Me.PctHPs}<=${selfhealpoint})&&(${Me.PctHPs}>${dacastpoint})) {
         /target myself
         /delay 6 ${Target.Name.Equal[${Me}]}
         /if (${Target.Name.Equal[${Me}]}) {
            /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
            /call Cast "${patchheal}" gem2 1s CheckHP
            /delay 15 ${Me.SpellReady[${patchheal}]}
         }
      }
      /if ((${Me.PctHPs}<=${dacastpoint})&&(${Me.SpellReady[${daspell}]})) {
         /if (${announce}==1) /tell Groth Casting DA!! <<WARNING>> DA!! No Heals for 18 SECONDS
         :retryda
         /call Cast "${daspell}"
         /delay 1
         /if ((!${Me.Buff[${daspell}].ID})&&(${Me.SpellReady[${daspell}]})) /goto :retryda
         /if ((${trickyda}==1)&&(${Me.Buff[${daspell}].ID})) /call TrickyDA
         :dawait
         /if (${Me.Buff[${daspell}].ID}) {
            /delay 1s !${Me.Buff[${daspell}].ID}
            /varset stophealpoint ${defaultstophealpoint}
            /call CheckEvents
            /goto :dawait
         }
      }
   }
   /if (${Me.PctHPs}<=${Math.Calc[${selfhealpoint}*0.7]}) {
      /target myself
      /delay 6 ${Target.Name.Equal[${Me}]}
      /if (${Target.Name.Equal[${Me}]}) {
         /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
         /varset stophealpoint ${Math.Calc[${selfhealpoint}+5]}
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
      }
   }
   /varset stophealpoint ${defaultstophealpoint}
/return


Sub Healgroup
   :healgroup
   /varset worsthurt NULL
   /varset worsthp 100
   /varset worstclass NULL
   /varset minorhurt 0
   /varset majorhurt 0
   /varset ghealhurtcount 0
   /for gmember 0 to ${Group}
      /if (${onlyhealfd}==0) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if (${Group.Member[${gmember}].PctHPs}<=${worsthp}) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
         }
      }
      /if (${onlyhealfd}==1) {
         /if (${Group.Member[${gmember}].Distance}<=${patchhealrange}) {
            /if ((${Group.Member[${gmember}].Class.Name.NotEqual[Monk]})&&(${Group.Member[${gmember}].Class.Name.NotEqual[Necromancer]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
               /varset worsthurt ${Group.Member[${gmember}].Name}
               /varset worsthurtid ${Group.Member[${gmember}].ID}
               /varset worsthp ${Group.Member[${gmember}].PctHPs}
               /varset worstclass ${Group.Member[${gmember}].Class.Name}
            }
            /if ((${Group.Member[${gmember}].Class.Name.Equal[Monk]})||(${Group.Member[${gmember}].Class.Name.Equal[Necromancer]})) {
               /if ((${Group.Member[${gmember}].State.Equal[feign]})&&(${Group.Member[${gmember}].PctHPs}<=${worsthp})) {
                  /varset worsthurt ${Group.Member[${gmember}].Name}
                  /varset worsthurtid ${Group.Member[${gmember}].ID}
                  /varset worsthp ${Group.Member[${gmember}].PctHPs}
                  /varset worstclass ${Group.Member[${gmember}].Class.Name}
               }
            }
         }
      }
      /if ((${Group.Member[${gmember}].Distance}<=${grouphealrange})&&(${Group.Member[${gmember}].PctHPs}<=85)) /varcalc ghealhurtcount ${ghealhurtcount}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=85)&&(${Group.Member[${gmember}].PctHPs}>=60)) /varcalc minorhurt ${minorhurt}+1
      /if ((${Group.Member[${gmember}].PctHPs}<=60)&&(${Group.Member[${gmember}].PctHPs}>=1)) /varcalc majorhurt ${majorhurt}+1
   /next gmember
   /if (${autohealmode}==3) {
      /if ((!${Target.ID})||(${Target.Name.NotEqual[${tankname}]})) /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
         /if ((${Target.ID}==${tanknameid})&&(${Target.PctHPs}<=${healpct})&&(${Target.Distance}<=${healspellrange})) /return
      }
      /if (${Me.PctHPs}<=${selfhealpoint}) /return
   }
   /if ((${majorhurt}==0)&&(${minorhurt}==0)) {
      /if (${Spawn[${tanknameid}].ID}) {
         /target id ${tanknameid}
         /delay 6 ${Target.ID}==${tanknameid}
         /delay 1
      }
      /if (((${Target.ID}==${tanknameid})&&(${Target.PctHPs}>${healpct}))||(!${Spawn[${tanknameid}].ID})||(${Spawn[${tanknameid}].Type.Equal[corpse]})) {
         /if ((${healpetmode}>0)&&(${Me.PctMana}>=${manatohealpet})) /call HealPet
         /if (${Me.PctMana}<=98) /call MedTime
      }
      /call CheckEvents
      /return
   }
   /if ((${usedivarb}==1)&&(${worsthp}<=${divarbpoint})&&(${Me.AltAbilityReady[divine arbitration]})) /call Divarbcast
   /if ((${Math.Calc[${majorhurt}+${minorhurt}]}>=3)&&(${usegroupheal}==1)) {
      /if (${announce}==1) /tell Groth Inc Grp Heal, get close
      /call Cast "${groupheal}" gem4 1s
      /delay 15 ${Me.SpellReady[${groupheal}]}
      /call CheckEvents
      /return
   }
   /if (${worsthurtid}==${tanknameid}) /return
   /if (${worsthurtid}==${Me.ID}) {
      /call Healself
      /call CheckEvents
      /return
   }
   /if ((${String[${worstclass}].Equal[Warrior]})||(${String[${worstclass}].Equal[Paladin]})||(${String[${worstclass}].Equal[Shadow Knight]})) {
      /if ((${worsthp}<=${tankhealpoint})&&(${worsthp}>=${Math.Calc[0.7*${tankhealpoint}]})&&(${majorhurt}<=1)&&(${minorhurt}<=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /tell Groth ((${healspell}) --- %T ---
        /if (${announce}==1) /tell Groth ${Me.PctMana}
         /call Cast "${healspell}" gem1 1s CheckHP
         /delay 15 ${Me.SpellReady[${healspell}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if (${worsthp}<=${tankhealpoint}) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
         /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${tankhealpoint}+5]}
         /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
   } else /if ((${String[${worstclass}].Equal[Magician]})||(${String[${worstclass}].Equal[Wizard]})||(${String[${worstclass}].Equal[Enchanter]})||(${String[${worstclass}].Equal[Druid]})) {
      /if ((${worsthp}<=${casterhotpoint})&&(${worsthp}>${casterpatchpoint})) {
         /if ((${String[${worsthurt}].Equal[${nohotforua}]})||(${String[${worsthurt}].Equal[${nohotforub}]})||(${String[${worsthurt}].Equal[${nohotforuc}]})||(${String[${worsthurt}].Equal[${nohotforud}]})) /return
         /if (${String[${nohotforua}].Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
            /varset nohotforua ${Target.Name}
            /if (${announce}==1) /tell Groth (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforua NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${String[${nohotforub}].Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforub ${Target.Name}
            /if (${announce}==1) /tell Groth (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforub NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${String[${nohotforuc}].Equal[NULL]}) {
            /target id${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforuc ${Target.Name}
            /if (${announce}==1) /tell Groth (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforuc NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         } else /if (${String[${nohotforud}].Equal[NULL]}) {
            /target id ${worsthurtid}
       /delay 5 ${Target.ID}==${worsthurtid}
       /if (!${Target.ID}) /return
            /if (${Target.ID}!=${worsthurtid}) /return
       /varset nohotforud ${Target.Name}
            /if (${announce}==1) /tell Groth (${hotspell}) --- %T ---
            /varset stophealpoint ${Math.Calc[${casterhotpoint}+5]}
            /call Cast "${hotspell}" gem3 1s CheckHP
            /timed 200 /varset nohotforud NULL
            /delay 15 ${Me.SpellReady[${hotspell}]}
         }
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /return
      }
      /if ((${worsthp}<=${casterpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
    /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 1s CheckHP
         /varset stophealpoint ${defaultstophealpoint}
         /call CheckEvents
         /delay 15 ${Me.SpellReady[${patchheal}]}
         /return
      }
      /varset stophealpoint ${defaultstophealpoint}
   } else /if ((${String[${worstclass}].Equal[Necromancer]})||(${String[${worstclass}].Equal[Shaman]})) {
      /if ((${worsthp}<=${necshmpatchpoint})&&(${worsthp}>=1)) {
         /target id ${worsthurtid}
    /delay 5 ${Target.ID}==${worsthurtid}
    /if (!${Target.ID}) /return
         /if (${Target.ID}!=${worsthurtid}) /return
         /varset stophealpoint ${Math.Calc[${necshmpatchpoint}+5]}
         /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
    /call Cast "${patchheal}" gem2 1s CheckHP
    /varset stophealpoint ${defaultstophealpoint}
    /call CheckEvents
    /delay 15 ${Me.SpellReady[${patchheal}]}
    /return
      }
   } else /if ((${worsthp}<=${defaultpatchpoint})&&(${worsthp}>=1)) {
      /target id ${worsthurtid}
      /delay 5 ${Target.ID}==${worsthurtid}
      /if (!${Target.ID}) /return
      /if (${Target.ID}!=${worsthurtid}) /return
      /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
      /varset stophealpoint ${Math.Calc[${defaultpatchpoint}+5]}
      /call Cast "${patchheal}" gem2 1s CheckHP
      /varset stophealpoint ${defaultstophealpoint}
      /call CheckEvents
      /delay 15 ${Me.SpellReady[${patchheal}]}
      /return
   }
   /varset stophealpoint ${defaultstophealpoint}
   /if ((${healpetmode}==2)&&(${Me.PctMana}>${manatohealpet})) /call HealPet
/return


Sub Divarbcast
   /varset divarboor 0
   /for gmember 0 to ${Group}
      /if (${Group.Member[${gmember}].Distance}>200) /varcalc divarboor ${divarboor}+1
   /next gmember
   /if (${Math.Calc[${Group}-${divarboor}]}>=2) {
      /if (${announce}==1) /tell Groth Inc Divine Arbitration
      /call Cast "Divine Arbitration" alt 2s
      /if ((${healafterdivarb}==1)&&(${Me.PctMana}>40)) {
         /if (${announce}==1) /tell Groth Inc Grp Heal, get close
         /call Cast "${groupheal}" gem4 2s
         /delay 15 ${Me.SpellReady[${groupheal}]}
      }
   }
/return


Sub HealPet
   /varset worsthurt NULL
   /varset worsthp 100
   /for gmember 0 to ${Group}
      /if (${Group.Member[${gmember}].Pet.ID}) {
         /if (${Group.Member[${gmember}].Pet.Distance}<=${pethealspellrange}) {
            /if ((${Group.Member[${gmember}].Pet.PctHPs}<=${worsthp})&&(${Group.Member[${gmember}].Pet.PctHPs}<=${pethealpoint})) {
               /varset worsthurt ${Group.Member[${gmember}].Pet.Name}
               /varset worsthurtid ${Group.Member[${gmember}].Pet.ID}
               /varset worsthp ${Group.Member[${gmember}].Pet.PctHPs}
            }
         }
      }
   /next gmember
   /if (${String[${worsthurt}].NotEqual[NULL]}) {
      /target id ${worsthurtid}
      /delay 5 ${Target.ID}==${worsthurtid}
      /if (!${Target.ID}) /return
      /if (${Target.ID}!=${worsthurtid}) /return
      /delay 3
      /if (${Target.PctHPs}<=${pethealpoint}) {
         /if (${announce}==1) /tell Groth (${pethealspell}) --- %T ---
         /varset stophealpoint ${Math.Calc[${pethealpoint}+5]}
         /call Cast "${pethealspell}" spell 1s CheckHP
         /varset stophealpoint ${defaultstophealpoint}
         /delay 15 ${Me.SpellReady[${pethealspell}]}
      }
   }
/return


Sub CheckEvents
   /delay 1
   /doevents Exp
   /doevents Chat
   /doevents tell
   /doevents flush
/return


Sub MedTime
   :oomwait
   /call CheckEvents
   /If ((${FindItem["Rod of Mystical Transvergance"].InvSlot})&&(${Me.PctMana}<=70)&&(${Me.PctHPs}>=98)&&(${rodwait}==0)) {
      /call Cast "Rod of Mystical Transvergance" item
      /varset rodwait 1
      /timed 3000 /varset rodwait 0
   }
   /if ((${autosit}==1)&&(${Me.PctMana}<=98)&&(!${Me.Casting.ID})) {
      /if ((${Bool[${Me.Standing}]})&&(${NearestSpawn[NPC].Distance}>=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${distancetosit}]})&&(${Me.PctHPs}>90)) /sit
      /if ((${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})&&(${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]})) /stand
   }
   /if ((${Bool[${Me.Standing}]})&&(${autosit}==2)&&(${Me.PctMana}<=98)&&(${Me.PctHPs}>90)&&(!${Me.Casting.ID})) /sit
   /if ((${Bool[${Me.Sitting}]})&&(${autosit}>=1)&&(${Me.PctMana}>98)&&(!${Window[SpellBookWnd].Open})) /stand
   /if ((${Bool[${Me.Standing}]})&&(!${Me.Mount.ID})&&(${Me.SpellReady[${yaulpspell}]})&&(!${Me.Buff[${yaulpspell}].ID})) {
      /if ((!${Me.Buff[Vallon].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Strength of Tunare].ID})) /call Cast "${yaulpspell}"
   }
   /if (${buffbeg}==1) /call Buffbeg
   /if (${Me.PctHPs}<=${selfhealpoint}) /return
   /if (${Me.PctMana}<=8) /goto :oomwait
/return


Sub CheckHP
   /if (!${Window[CastingWindow].Open}) /return
   /if ((${autointerrupt}>=1)&&(${Target.PctHPs}>=${stophealpoint})) {
      /if ((${announce}==1)&&(${duckspam}==1)) {

         /e Ducking heal on ${Target.Name}
         /varset duckspam 0
         /timed 60 /varset duckspam 1
      }
      /call Interrupt
      /return
   }
   /if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) {
      /if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) {
         /call Interrupt
         /call Divarbcast
         /return
      }
      /if ((${announce}==1)&&(${duckselfspam}==1)) {

         /e Ducking heal on ${Target} so I can heal myself
         /varset duckselfspam 0
         /timed 60 /varset duckselfspam 1
      }
      /call Interrupt
      /return
   }
   /if (${onlyhealfd}==1) {
      /if ((${Target.Class.Name.Equal[Necromancer]})||(${Target.Class.Name.Equal[Monk]})) {
         /if (${Target.State.NotEqual[feign]}) {
            /if ((${announce}==1)&&(${duckfdspam}==1)) {

               /e Ducking heal on ${Target.Name} because he isn't staying FD
               /varset duckfdspam 0
               /timed 40 /varset duckfdspam 1
            }
            /call Interrupt
            /return
         }
      }
   }
   /if ((${usedivarb}==1)&&(${Target.PctHPs}<=${divarbpoint})&&(${Target.Distance}<=200)&&(${Me.AltAbilityReady[Divine Arbitration]})&&(${castEndTime}>=${interrupt2divarb})) {
      /for gmember 0 to ${Group}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /call Interrupt
            /call Divarbcast
            /return
         }
      /next gmember
   }
/return


Sub TrickyDA
   /for intcount 1 to 20
      /if ((${Me.PctHPs}<40)&&(${Me.Buff[${trickybuff[${intcount}]}].ID})) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${trickybuff[${intcount}]}].ID}-1].Int} leftmouseup
   /next intcount
   /if (${Me.Buff[${daspell}].ID}) {
      :waitalittle
      /delay 1s ${Me.Buff[${daspell}].Duration}<2
      /if (${Me.Buff[${daspell}].Duration}>=2) /goto :waitalittle
   }
   /varset buffbeg 1
   /call Buffbeg
/return


Sub Buffbeg
   /if (${buffbeg}==0) /return
   /echo Begging for buffs now
   /if ((!${Me.Buff[Voice of Quellious].ID})&&(!${Me.Buff[Tranquility].ID})&&(!${Me.Buff[Koadic's Endless Intellect].ID})&&(!${Me.Buff[Clairvoyance].ID})&&(!${Me.Buff[Voice of Clairvoyance].ID})) {
      /if (${String[${NearestSpawn[PC guild enchanter]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild enchanter].Distance}<=100) {
         /tell Groth ${NearestSpawn[PC guild enchanter]} need C plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Enchanter available for C5
   }
   /if ((!${Me.Buff[Protection of the Nine].ID})&&(!${Me.Buff[Blessing of the Nine].ID})&&(!${Me.Buff[Steeloak Skin].ID})&&(!${Me.Buff[Blessing of Steeloak].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${String[${NearestSpawn[PC guild druid]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild druid].Distance}<=100) {
         /tell Groth ${NearestSpawn[PC guild druid]} need dru crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Druid available for DRU crack
   }
   /if ((!${Me.Buff[Spiritual Dominion].ID})&&(!${Me.Buff[Spiritual Ascendance].ID})) {
      /if (${String[${NearestSpawn[PC guild beastlord]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild beastlord].Distance}<=100) {
         /tell Groth ${NearestSpawn[PC guild beastlord]} need bst crack plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Beastlord available for BST crack
   }
   /if ((!${Me.Buff[Kazad`s Mark].ID})&&(!${Me.Buff[Symbol of Kazad].ID})&&(!${Me.Buff[Symbol of Balikor].ID})&&(!${Me.Buff[Balikor's Mark].ID})&&(!${Me.Buff[Virtue].ID})&&(!${Me.Buff[Hand of Virtue].ID})&&(!${Me.Buff[Conviction].ID})&&(!${Me.Buff[Hand of Conviction].ID})) {
      /if (${String[${NearestSpawn[PC guild cleric]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild cleric].Distance}<=100) {
         /tell Groth ${NearestSpawn[PC guild cleric]} need sym plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Cleric available for Symbol
   }
   /if ((!${Me.Buff[Brell's Stalwart Shield].ID})&&(!${Me.Buff[Brell's Brawny Bulwark].ID})&&(!${Me.Buff[Spiritual Vigor].ID})&&(!${Me.Buff[Spiritual Vitality].ID})) {
      /if (${String[${NearestSpawn[PC guild paladin]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild paladin].Distance}<=100) {
         /tell Groth ${NearestSpawn[PC guild paladin]} need BSS plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Paladin available for BSS
   }
   /if ((!${Me.Buff[Shield of Maelin].ID})&&(!${Me.Buff[Focus of the Seventh].ID})&&(!${Me.Buff[Focus of Soul].ID})&&(!${Me.Buff[Wunshi's Focusing].ID})&&(!${Me.Buff[Talisman of Wunshi].ID})) {
      /if (${String[${NearestSpawn[PC guild shaman]}].NotEqual[NULL]}) /if (${NearestSpawn[PC guild shaman].Distance}<=100) {
         /tell Groth ${NearestSpawn[PC guild shaman]} need focus plz
         /delay 20
         /if (${Me.Buff[${daspell}].ID}) /notify BuffWindow Buff${Math.Calc[${Me.Buff[${daspell}].ID}-1].Int} leftmouseup
      } else /e No guild Shaman available for Focus
   }
   /varset buffbeg 0
/return


Sub FindExactPC(string name)
   /declare nameid int local
   /declare counter int local 1
   :FindNext
   /if (!${NearestSpawn[${counter}, pc ${name}].ID}) /return NOT_FOUND
   /varset nameid ${NearestSpawn[${counter}, pc ${name}].ID}
   /if (${Spawn[${nameid}].CleanName.Equal[${name}]}) {
      /target id ${nameid}
      /delay 1s ${Target.ID}==${nameid}
      /if (${Target.ID}==${nameid}) /return TARGET_SUCCESS
   }
   /varcalc counter ${counter}+1
   /if (${NearestSpawn[${counter}, pc ${name}].ID}) /goto :FindNext
/return NOT_FOUND


Sub Event_Chat(string ChatType,string Sender,string ChatText)
   /if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})) /return
   /if (!${Spawn[${Sender}].ID}) {
      /e ${Sender} is not in the zone
      /return
   }
   /if (${ChatText.Equal[Follow me]}) {
      /delay 5
      /if (!${Spawn[${Sender}].ID}) {
         /e ${Sender} is not in zone for me to follow!
         /return
      }
      /varset follname ${Sender}
      /varset following 1
      :targetfoll
      /target pc ${follname}
      /delay 1s ${Target.Name.Equal[${follname}]}
      /if (${Target.Name.Equal[${follname}]}) {
         /goto :Loop
      } else /goto :targetfoll
      :Loop
      /face fast
      /if (${Target.Distance}>10) /keypress forward hold
      /if (${Target.Distance}<9) /keypress back
      /if (!${Target.ID}) /varset following 0
      /call CheckEvents
      /if ((${Target.Name.Equal[${follname}]})&&(${following}>0)) {
         /goto :Loop
      } else {
         /keypress forward
         /keypress back
      }
   }
   /if (${ChatText.Equal[End follow]}) {
      /varset following 0
      /keypress forward
      /keypress back
      /timed 50 /face pc ${follname}
   }
   /if (${ChatText.Equal[Gbuff now!]}) {
      /varset pallycount 0
      /target myself
      /call Cast "${acbuff}" gem6 7s
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      /for gmember 1 to ${Group}
         /target id ${Group.Member[${gmember}].ID}
         /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${acbuff}" gem5 7s
            /if (${Target.Class.Name.Equal[Paladin]}) {
               /call Cast "${longhpbuff}" gem4 10s
               /varcalc pallycount ${pallycount}+1
            }
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
            }
         }
      /next gmember
      /if ((${Math.Calc[${Group}-${pallycount}]}>=2)&&(${String[${groupsymbuff}].NotEqual[NULL]})) /call Cast "${groupsymbuff}" gem5 10s
      /if ((${Math.Calc[${Group}-${pallycount}]}<2)||(${String[${groupsymbuff}].Equal[NULL]})) {
         /for gmember 0 to ${Group}
            /target id ${Group.Member[${gmember}].ID}
            /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
            /if (${Target.Class.Name.NotEqual[Paladin]}) /call Cast "${singlesymbuff}" gem5 7s
         /next gmember
      }
   }
   /if (${ChatText.Equal[BoR now!]}) {
      /target myself
      /delay 5 ${Target.Name.Equal[${Me}]}
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      /for gmember 1 to ${Group}
         /target id ${Group.Member[${gmember}].ID}
         /delay 1s ${Target.ID}==${Group.Member[${gmember}].ID}
         /if (${Target.ID}==${Group.Member[${gmember}].ID}) {
            /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
               /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
               /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
            }
         }
      /next gmember
   }
   /if (${ChatText.Equal[nuke]}) {
      /if (${Me.PctMana}<30) {
         /chat #${mychannel} Cleric Mana ${Me.PctMana}%, holding on nukes!
      } else {
         /assist ${Sender}
         /delay 5
         /if (${Target.Type.NotEqual[NPC]}) {
            /assist ${Sender}
            /delay 5 ${Target.Type.Equal[NPC]}
         }
         /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
            /if (${Me.SpellReady[${nukeone}]}) {
               /if (${announce}==1) /tell Groth %T shal feel the wrath of Brell! (${nukeone})
               /call Cast "${nukeone}" spell 3s
            } else /if (${Me.SpellReady[${nuketwo}]}) {
               /if (${announce}==1) /tell Groth %T shal feel the wrath of Brell! (${nuketwo})
               /call Cast "${nuketwo}" spell 3s
            } else /chat #${mychannel} nukes not ready
            /if (${Me.PctMana}<=60) /chat #${mychannel} FYI Cleric Mana ${Me.PctMana}%
         } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
      }
   }
   /if (${ChatText.Equal[stun]}) {
      /assist ${Sender}
      /delay 5
      /if (${Target.Type.NotEqual[NPC]}) {
         /assist ${Sender}
         /delay 5 ${Target.Type.Equal[NPC]}
      }
      /if ((${Target.Type.Equal[NPC]})&&(${Target.PctHPs}<=90)) {
         /if (${Me.SpellReady[${stunone}]}) {
            /if (${announce}==1) /tell Groth Casting ${stunone} on %T
            /call Cast "${stunone}" spell 3s
         } else /if (${Me.SpellReady[${stuntwo}]}) {
            /if (${announce}==1) /tell Groth Casting ${stuntwo} on %T
            /call Cast "${stuntwo}" spell 3s
         } else /chat #${mychannel} stuns not ready
      } else /chat #${mychannel} wrong target (${Target.Type} at ${Target.PctHPs}% HP)
   }
   /if (${ChatText.Equal[buffme]}) {
      /call FindExactPC ${Sender}
      /if (${String[${Macro.Return}].NotEqual[TARGET_SUCCESS]}) /return
      /if (${Target.Class.Name.Equal[Paladin]}) {
         /call Cast "${longhpbuff}" gem4 10s
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
         /return
      }
      /if ((${Target.Class.Name.NotEqual[Warrior]})&&(${Target.Class.Name.NotEqual[Monk]})&&(${Target.Class.Name.NotEqual[Rogue]})&&(${Target.Class.Name.NotEqual[Berserker]})&&(${Target.Class.Name.NotEqual[Bard]})) {
         /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
         /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
      }
      /call Cast "${acbuff}" gem6 7s
      /call Cast "${singlesymbuff}" gem5 7s
   }
   /if ((${ChatText.Equal[patch me]})||(${ChatText.Equal[heal]})||(${ChatText.Equal[heal me]})||(${ChatText.Equal[heal plz]})||(${ChatText.Equal[heal me plz]})||(${ChatText.Equal[need heal]})) {
      /call FindExactPC ${Sender}
      /if (${String[${Macro.Return}].NotEqual[TARGET_SUCCESS]}) /return
      /if (${Target.Distance}<=${patchhealrange}) {
         /if (${announce}==1) /tell Groth (${patchheal}) --- %T ---
         /call Cast "${patchheal}" gem2 2s
         /delay 15 ${Me.SpellReady[${patchheal}]}
      } else /tell Groth ${Sender} your OOR
   }
   /if ((${ChatText.Equal[sym]})||(${ChatText.Equal[wog]})||(${ChatText.Equal[V]})||(${ChatText.Equal[bor]})||(${ChatText.Equal[rgc]})||(${ChatText.Equal[hot me]})||(${ChatText.Equal[ch me]})||(${ChatText.Equal[pb]})) {
      /if (${Spawn[pc ${Sender}].Distance}>250) /return
      /call FindExactPC ${Sender}
      /if (${String[${Macro.Return}].NotEqual[TARGET_SUCCESS]}) /return
   }
   /if (${ChatText.Equal[sym]}) /call Cast "${singlesymbuff}" gem5 7s
   /if (${ChatText.Equal[wog]}) /call Cast "${acbuff}" gem6 7s
   /if (${ChatText.Equal[V]}) /call Cast "${longhpbuff}" gem4 10s
   /if (${ChatText.Equal[bor]}) {
      /if (${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "Breastplate of Vengeful Fury" item
      /if (!${FindItem[Breastplate of Vengeful Fury].ID}) /call Cast "${spellhastebuff}" gem8 5s
   }
   /if (${ChatText.Equal[rgc]}) {
      /if (${FindItem[Blackflame Sphere].ID}) {
         /call Cast "Blackflame Sphere" item
      } else /if (${FindItem[Wand of Casual Blessings].ID}) {
         /call Cast "Wand of Casual Blessings" item
      } else /call Cast "${rgcspell}" gem8 5s
   }
   /if (${ChatText.Equal[buff pet]}) {
      /target ${Spawn[pc ${Sender}].Pet}
      /delay 8
      /target ${Spawn[pc ${Sender}].Pet}
      /call Cast "${acbuff}" gem6 7s
      /call Cast "${singlesymbuff}" gem5 7s
   }
   /if (${ChatText.Equal[da pet]}) {
      /target ${Spawn[pc ${Sender}].Pet}
      /delay 6
      /target ${Spawn[pc ${Sender}].Pet}
      /if (${Me.AltAbilityReady[39]}) /if (${String[${Target.Name}].Equal[${Spawn[pc ${Sender}].Pet.Name}]}) {
         /call Cast "39" alt
      } else {
         /chat #${mychannel} Bestow Divine Aura is not ready, or Target (%T) OOR or wrong target
      }
   }
   /if (${ChatText.Equal[pb]}) /call Cast "Pure Blood" gem6 10s
   /if (${ChatText.Equal[hot me]}) {
      /if (${Target.Distance}<=${hotspellrange}) {
         /if (${announce}==1) /tell Groth (${hotspell}) --- %T ---
         /call Cast "${hotspell}" gem2 2s
         /delay 15 ${Me.SpellReady[${hotspell}]}
      } else /tell Groth ${Sender} your OOR
   }
   /if (${ChatText.Equal[ch me]}) {
      /if (${Target.Distance}<=100) {
         /if (${announce}==1) /tell Groth (Complete Heal) --- %T --- 10 secs
         /call Cast "Complete Healing" gem2 5s
         /tell Groth ${Me.PctMana}m
         /delay 15 ${Me.SpellReady[${hotspell}]}
      } else /tell Groth ${Sender} your OOR
   }
   /if (${ChatText.Equal[mana check]}) /chat #${mychannel} Cleric Mana ${Me.PctMana}%
   /if (${ChatText.Equal[slowcamp]}) {
      /if (${Me.Standing}) /sit
      /delay 5m ${Me.PctMana}>=98
      /camp
      /end
   }
/return

Sub Event_Exp
   /call ExpTrack
/return

And if you have a higher level cleric you might want to edit the spell listed in the declares.
 
Re: Redguides Listing of Confirmed Macros

AFK Powerlevel Macro by Lep18


http://www.redguides.com/community/showthread.php?t=4628

Powerlevel.mac is a macro I created for my druid to powerlevel my beastlord in forgotten halls. It's great for those of us without bards What it does is:

Cast heal at certain percent:

-change /if (${Target.PctHPs}<55) to the percent you want to heal at.
-change /cast 6 to whichever spell gem you have heal mem'ed to (1-9)

Refresh buffs:

-Change the buff names to whichever spells/buffs you have

Gate if you get to a certain percent hps or go oom (this feature was added incase beastlord crashed and mobs started attacking the druid.):

-change /if (${Me.PctHPs}<10) /gate to what percent you want to gate at.

Change all of the newb101's to the person you are pling and all of the druid101's to your powerleveler.

Rich (BB code):
|powerlevel.mac by lep18, heal code taken from healtarget.mac by Macrofest (Thanks Macrofest!)

#turbo 40

#include spellcast.inc
#chat tell

#event thorns "#*#Your Shield of Bracken spell has worn off of newb101#1#"
#event regen "#*#Your Replenishment spell has worn off of newb101#1#"
#event skin "#*#Your Protection of the Nine spell has worn off of newb101#1#"
#event oak "#*#Your skin loses its oaken resilience#*#"
#event motf "#*#Your features return to normal#*#"
#event might "#*#Your Nature's Might spell has worn off of newb101#1#"
#event gate "#*#You have insufficient mana to cast this spell#1#"
#chat tell

Sub Main

:loop
/doevents
/if (${Me.PctHPs}<10) /gate
/if (${Me.Casting.ID}) /goto :loop
/target pc newb101

/if (${Target.PctHPs}<55) {
/goto :heal
} else {
/goto :loop
}


:heal
/doevents
/cast 6
/doevents
/doevents
/if (${Me.Standing} && !${Me.Mount.ID}) /sit
}
/goto :loop

Sub Event_Thorns


   /target pc newb101
   /call cast "Shield of Bracken"
   /return

Sub Event_regen

   /target pc newb101
   /call cast "Replenishment"
   /return

Sub Event_might


   /target pc newb101
   /call cast "Nature's Might"
   /return

Sub Event_skin

   /target pc newb101
   /call cast "Protection of the Nine"
   /return

Sub Event_oak

   /target druid101
   /call cast "Steeloak Skin"
   /return

Sub Event_motf

   /target druid101
   /call cast "Mask of the Forest"
   /return 

Sub Event_gate

   /gate
   /endmacro

Sub Event_Chat(string ChatType,string Sender,string ChatText)

/if (${ChatText.Equal["Needarez"]}) {
/if (${Naked}==0) {
/delay 10
/tell ${Sender} Nothanks
        }
/if (${Naked}==1) { 
/delay 10                   
/tell ${Sender} Sure
/call wait4rez
 }
}

/if (${ChatText.Equal["camp"]}) {
/dismount
/sit
/camp
}

/if (${ChatText.Equal["invite"]}) {
/target ${Sender}
/delay 1s
/invite
/delay 1s
/keypress esc
}
/return

This code was used in correlation to a hunter macro on my beastlord which i found at macroquest2.com . Here is a similar one i found:

http://www.macroquest2.com/phpBB2/viewtopic.php?t=7135&highlight=hunter

I know my macro isnt the most advanced out there, but its simple and does what I want it to do!! Hope this helps someone
 
Re: Redguides Listing of Confirmed Macros

AFK Taskmaster by Alatyami Edit: Major Revision! No more /warp or /zone!

see THIS POST FOR FURTHER

The macro is currently setup for:
Lookout Below
Edit: Mystic Ring

After posting my original AutoTask macro, ASSWEASEL taught me some good stuff, and as per requested removed as much /warp and /zone as possible.

Edit: Included in this newer version is AdvPath.inc, read the AdvPath.txt that the creator wrote. I have included the entire AdvPath so that you can create and expand the macro. This macro is easy to update. I kept my original logic, however, since Sony has been nice to forget that they removed the wait time, I removed the delay. This is a pure macro, no plugins required, although mQ2DoCrack helps out alot to prevent the mobs from stunning you.

Additionally, a new feature is selecting a task when there is only one task available. I have tested this macro running for 16 hours straight, without complication.

Requirements:
AutoTask.mac (included in post/zip)
AutoTask.ini (included in zip)
AdvPath.inc (included in Zip)
Exp_Tracking.inc (MacroQuest2 site/Zip)

AdvTask.mac
Rich (BB code):
  | Advanced Taskmaster
 | Author: Alatyami, The Calendar Guy @ RedGuides.com
 | Thanks to the authors of AdvPath and Exp_Tracking!
 | Last Modified: September 29, 2005
 | Usage: /mac advtask
 |------------------------------------------------------------------------------|
 | Advanced Taskmaster is a major upgrade to my previous mac called AutoTask.mac
 | This version is a pure macro, no /warp or /zone, although you can mod it to
 | to use it. Simply drop all the files from the zip into your /Macros folder
 | and rake in the AA!
 | Edit the AdvTask.ini for the valid task list. Use the AdvPath.txt to create
 | your own custom paths.
 |------------------------------------------------------------------------------|
 | Modification Notes
 |    * Removed /warp /zone
 |    * Traded move.inc for advpath.inc
 |    * Removed the 20 minute dlay between tasks
 |------------------------------------------------------------------------------|
 
 #turbo 10
 
 #include advpath.inc
 #include Exp_Tracking.inc
 
 #event PlayFile "[MQ2] playfile #1#"
 #Event Zoned "You have entered#*#"
 
 Sub Main
   |OPTION: Set your Taskmaster
   /declare TaskNPC string outer Marana
   |OPTION: Set your task narrative
   /declare TaskRequest string outer Do you have any tasks?
 
   |Leave these alone ...
   /squelch /alias /startrec /echo record
   /squelch /alias /stoprec  /echo stop
   /squelch /alias /playfile /echo playfile
   /ini "AdvTask.ini" "${Zone}" "${MyTasks}"
   /declare CurrentTask1 string outer
   /declare CurrentTask2 string outer
   /declare CurrentTask3 string outer
   /declare TaskSetting int outer 0
   /declare ValidTask string outer
   /declare Zn int outer
   /call ExpPrep
   /call InitAPFVars 1 15 20
 
 :asktaskmaster
   /call AdvPathPoll
   /delay 5
   /doevents flush
   /varset TaskSetting 0
   /call GMCheck
   /target ${TaskNPC}
   /say ${TaskRequest}
   /delay 2s
 
   |- Select the task window to set varaibles
   /notify TaskSelectWnd TaskList leftmouseup
 
   /varset CurrentTask1 ${Window[TaskSelectWnd].Child[TaskList].List[1]}
   /varset CurrentTask2 ${Window[TaskSelectWnd].Child[TaskList].List[2]}
   /varset CurrentTask3 ${Window[TaskSelectWnd].Child[TaskList].List[3]}
 
   /if (${TaskSetting}==0) {
     |- Check the first available task listselect
     /notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask1}]}
     /notify TaskSelectWnd TaskList leftmouse ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask1}]}
     /varset TaskSetting ${Ini[AdvTask.ini,${Zone},${Window[TaskSelectWnd].Child[TaskList].List[1]},${notFound}]}
     /echo INI Check: ${Window[TaskSelectWnd].Child[TaskList].List[1,1]} = ${TaskSetting}
     /delay 1s
     /if (${TaskSetting}==1) {
       /notify TaskSelectWnd AcceptButton leftmouseup
       /varset ValidTask ${CurrentTask1}
       /call LoadTask
     }
     /delay 1s
   }
   /if (${TaskSetting}==0) {
       |- Check the Second available task listselect
       /notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask2}]}
       /notify TaskSelectWnd TaskList leftmouse ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask2}]}
       /varset TaskSetting ${Ini[AdvTask.ini,${Zone},${Window[TaskSelectWnd].Child[TaskList].List[2]},${notFound}]}
       /echo INI Check: ${Window[TaskSelectWnd].Child[TaskList].List[2,1]} = ${TaskSetting}
       /delay 1s
     /if (${TaskSetting}==1) {
       /notify TaskSelectWnd AcceptButton leftmouseup
       /varset ValidTask ${CurrentTask2}
       /call LoadTask
     }
       /delay 1s
   }
   /if (${TaskSetting}==0) {
     |- Check the first available task listselect
     /notify TaskSelectWnd TaskList listselect ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask3}]}
     /notify TaskSelectWnd TaskList leftmouse ${Window[TaskSelectWnd].Child[TaskList].List[=${CurrentTask3}]}
     /varset TaskSetting ${Ini[AdvTask.ini,${Zone},${Window[TaskSelectWnd].Child[TaskList].List[3]},${notFound}]}
     /echo INI Check: ${Window[TaskSelectWnd].Child[TaskList].List[3,1]} = ${TaskSetting}
     /delay 1s
     /if (${TaskSetting}==1) {
       /notify TaskSelectWnd AcceptButton leftmouseup
       /varset ValidTask ${CurrentTask3}
       /call LoadTask
     }
     /delay 1s
   }
   /notify TaskSelectWnd DeclineButton leftmouseup
   /delay 9s
   /goto :asktaskmaster
   /exit
 /return
 
 Sub Event_PlayFile(string Line, string PathFile)
   /call PlayFunction "${PathFile} 1 nf nopp noz"
   /call WaitTilThere
 /return
 
 Sub WaitTilThere
   :LoopTilThere
   /if (${PathingFlag}==1) {
     /call AdvPathPoll
     /delay 1
     /doevents
     /goto :LoopTilThere
   }
 /return
 
 sub LoadTask
   /echo Loading: ${ValidTask}
   /if (${ValidTask.Equal[Lookout Below]}) /call LookoutBelow
   /if (${ValidTask.Equal[Mystic Ring]}) /call MysticRing
 /return
 
 sub Zoner
   /delay 60
 :stillzoning
   /doevents
   /if (${Zn}!=1) /goto :stillzoning
   /varset Zn 0
   /delay 5s
 /return
 
 sub Event_Zoned
   /call GMCheck
   /varset Zn 1
 /return
 
 sub GMCheck
   /if (${Bool[${Spawn[gm].ID}]}) {
     /echo A GM or Guide has been detected.  Waiting for five minutes to check again ...
     /delay 300s
     /call GMCheck
   }
 /return
 
 Sub LookoutBelow
   |BuffCheck: get SoW and SuperCamo
   /echo Starting Lookout Below
   /playfile marana2kc
   /doevents
   /keypress forward hold
   /call zoner
   /playfile kcsetup
   /doevents
   /playfile kclookoutbelow
   /doevents
   /keypress forward hold
   /call Zoner
   /playfile KC2Teleport
   /doevents
   /call cast Gate
   /delay 10s
   /playfile Marana2FV
   /doevents
   /keypress forward hold
   /call Zoner
   /playfile FV2Telligron
   /doevents
   /delay 1s
   /target Telligron
   /doevents
   /delay 1s
   /hail
   /delay 1s
   /call ExpTrack
   /delay 2s
   /call cast Gate
   /delay 10s
   /echo Finished Lookout Below.
 /return
 
 Sub MysticRing
   |BuffCheck: get SoW and SuperCamo
   /echo Starting Mystic Ring
   /playfile marana2kc
   /doevents
   /keypress forward hold
   /call zoner
   /playfile kcsetup
   /doevents
   /playfile kcmysticring
   /doevents
   /keypress forward hold
   /call Zoner
   /playfile KC2druidring
   /doevents
   /call cast Gate
   /delay 10s
   /playfile Marana2FV
   /doevents
   /keypress forward hold
   /call Zoner
   /playfile FV2socaldoor
   /doevents
   /delay 1s
   /target Socaldoor
   /delay 1s
   /hail
   /delay 1s
   /call ExpTrack
   /delay 2s
   /call cast Gate
   /delay 10s
   /echo Finished Mystic Ring.
 /return
 
Re: Redguides Listing of Confirmed Macros

Forgotten Halls Subordinate Macro by ~Moonspell See THIS THREAD FOR MORE

I wrote this macro a couple of months ago right when the AFK Forgotten Halls macro came out for bards. This was the first macro I ever wrote, so I'm sure there are plenty of better ways to accomplish what this macro does, and if someone would point them out to me, I'd like to learn from it and incorporate it.

This macro is designed to zone in to Forgotten Halls with a bard to assist with killing. The macro will automatically zone into Forgotten Halls when you enter Nedaria's Landing. It will warp you to the assist location then assist your bard and start using a ranged attack on the mob. Please understand that I wrote this for my Berserker (who is now lvl 66 thanks to the FH macro). With that in mind, the macro will make the Zerker throw axes/do Rage Volley until he runs out of axes. At that point he will summon more axes and go back to killing til he runs out of axe components. If he runs out of components, the zerker will just do Rage Volley until the end of the expo.

This macro can easily be edited to work with any class that can use a ranged weapon. I've had friends use it on their monks to click their Dusty Soriz Worker's Pouch and throw Shissar Fangs, or Warriors and other bow wielders use the Bloody Ancille's Pouch to summon arrows to shoot. There are quite a few options available for all the different classes of toons.

Any feedback on this would be much appreciated.

Rich (BB code):
 |Forgotten Halls Subordinate Macro
|Written by Moonspell for Redguides.com

|This macro is supposed to have your berserker
|assist a target and throw axes at it.  It will 
|automatically summon more axes if you run out
|and end the macro if you are out of axe components.

|Additionally, it'll warp you to the proper starting
|spot, face you in the right direction, then commence
|tossing axes.  If your HP gets too low, it will warp 
|you away and allow you to meditate back to health.

|Setup:  Get invited to your group and get an expo.  
|Zone into Nedaria's Landing, run the macro, then
|type "/echo you have entered nedaria's landing"
|without the quotation marks.  This should cause your toon
|to warp to the starting npc and zone you into the instance.

|Hotbar configuration.
|Slot 1: Summon Axe Combat Ability
|Slot 2: Ranged Attack
|Slot 3: Potion Belt Two Hotkey
|Slot 4: Rage Volley/Destroyer's Volley

|Be sure to change all instances of bardsName
|with the name of the toon you would like
|the character who is running this macro
|to assist.

|Some of the lines are borrowed from
|the Forgotten Halls AFK bard macro
|and have been edited by me.
|This macro can easily be edited
|to be used by any class that can
|throw items or use a bow.  Just get
|an arrow/thrown weapon summing item
|and you're good to go.

#turbo
#event getexpo "#*#You have entered nedaria's landing#*#"
#event kill "#*#You gain party experience#*#"
#event zone "#*#You have entered The Forgotten Halls#*#"
#event noammo "#*#You do not have a ranged weapon equipped#*#"
#event nocomp "#*#Balanced Axe Components#*#"
#event died "#*#You have entered the Plane of Knowledge#*#"

Sub Main
|We are waiting for the hotkey to start the macro
	/echo <<< Forgotten Halls Subordinate Macro Initiated >>>
	/echo <<< By Moonspell for Redguides.com >>>
	:waitforit
	/doevents
	/doevents
	/goto :waitforit
/return

Sub event_getexpo
	/target Nideno Eliagy
	/warp target
	/delay 2s
	/warp loc 1544 -665 94
	/face loc 1540, -675
	/look 0
	/doortarget
	/delay 1s
	/sit
	/delay 65s
	/click left
	/delay 1s
	/keypress u
	/delay 1s
	/click left
	/delay 1s
	/click left
	/delay 1s
	/keypress u
	/delay 1s
	/click left
	/delay 1s
	/click left
	:waiting
		/doevents
		/doevents
		/goto :waiting
	/return

Sub event_zone
	/delay 90s
	/face heading 90
	/delay 4s
	/warp loc -597.71 93.81 1.93
	/delay 2s
	/target bardsName
	/delay 2s
	/assist bardsName
	/delay 2s
	/call killloop
/return

Sub killloop
	:begin
	/keypress 2
	/keypress 4
	/delay 2s
	/assist bardsName
	/doevents
	/if (${Target.Distance}>220) /keypress esc 
	/if (${Me.PctHPs}<=30) /call succor
	/doevents
	/delay 10
	/goto :begin
/return

Sub event_kill
	/delay 10s
	/call killloop

Sub succor
	/warp loc 245 -33 0
	/delay 2s
	/keypress 3
	/delay 2s
	/sit
	:loopheal
	/if (${Me.PctHPs}>80) {
	/stand
	/face heading 90
	/warp loc -597.71 93.81 1.93
	/delay 2s
	/assist bardsName
	/delay 2s
	/keypress 2
/return
}
/delay 60
/goto :loopheal
/return

Sub event_noammo
	/keypress 1
	/delay 4s
	/autoinventory
	/delay 5s
	/keypress 1
	/delay 4s
	/autoinventory
	/delay 5s
	/keypress 1
	/delay 4s
	/autoinventory
	/delay 5s
	/keypress 1
	/delay 4s
	/autoinventory
	/delay 5s
	/keypress 1
	/delay 4s
	/autoinventory
	/delay 5s
/return

Sub event_nocomp
	/echo You can't make more axes!
	/echo Go buy more in PoK!
	/echo <<< Switching to Gimp Zerker Mode >>>
	/delay 2s
	/goto gimpZerker
/return

Sub gimpZerker
	:beginGimp
	/keypress 4
	/delay 2s
	/assist bardsName
	/doevents
	/if (${Target.Distance}>220) /keypress esc 
	/if (${Me.PctHPs}<=30) /call succor
	/doevents
	/delay 10
	/goto :beginGimp
/return


Sub event_died
	/echo Bring out yer dead! *clang*
	/echo Bring out yer dead! *clang*
	/echo Bring out yer dead! *clang*
	/echo <<< Terminating Macro >>>
	/delay 6s
	/camp desktop
	/delay 60s
	/end
/return
 
Re: Redguides Listing of Confirmed Macros

Sumraid and Shrinkraid Macros by Mochila See THIS THREAD FOR MORE

These macros assume you have MQ2Size and MQ2Sumcorpse. They will only target raid members and the shrinkraid is especially useful, making everyone less than gnome height, and only you can see the size difference. Usuage is
/mac shrinkraid
/mac sumraid

Sumraid.mac
Rich (BB code):
 |Sumraid.mac


Sub Main

  /declare Raidlist[72] string outer NULL
  /declare raidnumb int outer 1
  /declare numbinraid int outer 0
 
  /varset numbinraid ${Raid.Members}

:loop
   /if (${raidnumb}<${numbinraid} || ${raidnumb}==${numbinraid}) {     
     /varset Raidlist[${raidnumb}] ${Raid.Member[${raidnumb}]}
   /target ${Raidlist[${raidnumb}]} PC
   /delay 3
   /docommand /sum
   /delay 5
   /varcalc raidnumb ${raidnumb}+1
   /goto :loop
   /if (${raidnumb}>${numbinraid}) {
   /target clear
   /delay 2
   /echo Done dragging the raid.
}

/return


Shrinkraid.mac
Rich (BB code):
 |shrinkraid.mac


Sub Main

  /declare Raidlist[72] string outer NULL
  /declare raidnumb int outer 1
  /declare numbinraid int outer 0
 
  /varset numbinraid ${Raid.Members}

:loop
   /if (${raidnumb}<${numbinraid} || ${raidnumb}==${numbinraid}) {     
     /varset Raidlist[${raidnumb}] ${Raid.Member[${raidnumb}]}
   /target ${Raidlist[${raidnumb}]} PC
   /delay 3
   /docommand /size 2
   /delay 5

      /if (${Target.Pet.Name.NotEqual[NULL]}) {
         /target ${Target.Pet}
         /delay 3
         /docommand /size 1
         /delay 5
      }

     /varcalc raidnumb ${raidnumb}+1
   /goto :loop
   }

   /if (${raidnumb}>${numbinraid}) {
   /target clear
   /delay 2
   /echo Done shrinking the raid.
}

/return
 
Re: Redguides Listing of Confirmed Macros

Corpse Recovery Helper Macro by Moonspell See THIS THREAD FOR MORE

A few nights ago our guild wiped to Arch Magus Vangl adds after AMV in Anguish and the only person to live was a monk. Our guild was about ready to let the loot rot when I told our guild leader that I could get back to Anguish and start the CR.

Bodies were scattered everywhere so I took two minutes and wrote a really simple macro to get all of the bodies back in camp without the use of a rogue. I figured since it was helpful for me I'd post it here for you all. Hopefully this helps someone.

Rich (BB code):
 | Instant Raid Wipe Corpse Recovery
| A simple Moonspell creation for
| redguides.com

| This plugin requires the plugin
| mq2csum.

#turbo
#event startCR "#*#Get Bodies#*#"

sub Main
/echo <<<< Instant CR Macro Running >>>>
/delay 1
/echo Type "Get Bodies" to commence your CR.
/delay 1
/echo Type /end when you have all the bodies.

:loopy
/doevents
/goto :loopy

sub event_startCR
:recoveryLoop
/tar corpse next
/sum
/goto :recoveryLoop
 
Re: Redguides Listing of Confirmed Macros

New Reworked FHbard - FHhealer - FHPet- FHloot by armysoldier SEE THIS THREAD FOR MORE AND UPDATES

PLS RE c/p the MACROS .. Code changes

8 OCT 05 time of this edit

8-)


First you will make your own advpath files

you need 3

nideno2eldros <----Obvious

move2rock <-- path from elderos to the rock .. i suggest go behind the rock away from corpses

move2sweetspot <-- pop in FH to your own sweet spot in rat room

use this code letmein posted to record your paths

Rich (BB code):
 |--/startrec name_of_pathfile begins the record process.
|--/stoprec stops recording
|--/playfile name_of_saved_pathfile will replay it for you for testing purposes.

#event PlayFile "[MQ2] playfile #1#"

#include advpath.inc

Sub Main
  /call InitAPFVars 1 15 20
  /squelch /alias /startrec /echo record
  /squelch /alias /stoprec  /echo stop
  /squelch /alias /playfile /echo playfile
  :Main_Loop
  /call AdvPathPoll
  /delay 5
  /doevents
  /goto :Main_Loop
/return

Sub WaitTilThere
  :LoopTilThere
  /if (${PathingFlag}==1) {
    /call AdvPathPoll
    /delay 1
    /doevents
    /goto :LoopTilThere
  }
/return

Sub Event_PlayFile(string Line, string PathFile)
  /call PlayFunction "${PathFile} 1 nf nopp noz"
  /call WaitTilThere
/return

/echo startrec nideno2eldros

walk you path ... and i suggest walk ...

then do the same for the other 2



FHBARD.mac

notice remark lines.. there are some things you can edit

other is not working atm .. i have tried and am still trying a few things.. its just something fun ..

also will add boastful bellow and Exultant bellow soon

EDIT : Removed /if (${Me.PctHPs}<=30) /call succor from kill sub

Rich (BB code):
 | Macro FHBARD
| Re-created by Armysoldier
| Modified code from Letmein Fhbard -
|                    Hamburgerhelper - Lootwhore
|                    Redbot - target
| 
| Special thanks to Letmein - kicked me in the head when i needed it .. 8-)
|
|
| Ensure the 3 path files have been created
| and spelling is exact to include capitol letters
|
| Nideno2Eldros     move2rock    move2Sweetspot
|
| usage /mac fhbard
|
|-- CTRL-G (Goto lines)
|-- 94 - 103 EDIT TOON NAMES
|-- 154 - Faded memories set to Keypress 0 
|-- 166 - /twist 2 3 4 5 6 7
#turbo  
#Event NL "#*#entered Nedaria#*#" 
#Event FH "#*#entered The Forgotten Halls#*#"
|Remember to set this to your bind location
#Event Died "#*#entered Guild Lobby#*#"

#Include advpath.inc  
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main  
/call InitAPFVars 1 15 20
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:loopstart 
/doevents  
/call GMCheck
/delay 10  
/goto :loopstart  
/return  

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Nedaria's Landing
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_NL  
 /twist off  
 /delay 5
 /doevents flush
 /twist 2
 /disband
 /call PlayFunction "nideno2eldros 1 cf nopp noz"
 /call WaitTilThere
 /target Eldros_Danmor
 /delay 2
 /say Interested in Visiting
 /delay 15
 /keypress esc
 /keypress esc
 /keypress esc
 /keypress esc
 /doevents flush
 /call PlayFunction "move2rock 1 cf nopp noz"
 /call WaitTilThere
 /target Nideno_Eliagy
 /delay 10
 /say Forgotten Halls
 /delay 2
 /doortarget
 /face
 /delay 2s
|obviously you need to find where the stone ends up on your screen and put |in the correct screen locs
 /click left 400 50
 /click left 400 100
 /click left 400 150
 /click left 425 200
 /click left 450 250
 /return 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Forgotten Halls
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_FH
 /twist off    
 /delay 5
 /doevents flush
 /keypress home
 /call PlayFunction "move2sweetspot 1 cf nopp noz"
 /call WaitTilThere
 /docrack nostun on
 /delay 3
 /docrack noencumber on
 /delay 3
 /docrack nomeleepushback on
 /delay 3
 /face heading 45
 /circle on 23 -600 160
 /delay 10s
 /dzadd toon1
 /dzadd toon2
 /dzadd toon3
 /dzadd toon4
 /invite toon1
 /invite toon2
 /invite toon3
 /invite toon4
 /delay 30s
 /makeleader toon1
 /call sing
 /call kill
 /return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Wait Till there - movement wait
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sub WaitTilThere
 :LoopTilThere
 /if (${PathingFlag}==1) {
 /call AdvPathPoll
 /delay 0
 /doevents
 /goto :LoopTilThere
 }
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Died - Take a Guess
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_died    
 /1 I died Damn it
 /camp desktop
 /end
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Kill - Target part
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Kill
   :TargetLoop
       /call GMCheck
       /doevents
       /if (${Target.Level}>67) /tar npc next 
       /if (${Target.Distance}>220) /keypress esc  
       /if (${Target.ID}==FALSE) /tar NPC radius 220  
       /delay 10
   /goto :TargetLoop
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|GM CHECK
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub GMCheck  
 /if (${Spawn[gm].ID}) {  
 /echo Gm detected  
 /beep 
 /beep 
 /beep  
 /keypress 0
|--- Fading memories on bard
 /endmac 
 /unload 
 /q
}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Sing - What are you gonna twist?
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Sing
   /twist 2 3 4 5 6 7
|-------  Dot<->DoT Heal
   /return



FHHealer

Rich (BB code):
 |Macro FHhealer
|Re-created by Armysoldier
|
|
|Usage /mac FHhealer "Mastersname"
|
|SPELLS: 1 = HOT
|        6 = PET Hammer
|        7 = DS - Clerics have reverse DS 
|        8 = DD nuke

#Event NL "#*#entered Nedaria#*#"
#Event FH "#*#entered The Forgotten Halls#*#"
#Event kill "#*#lunges at you#*#"
#Event Died "#*#You have entered Guild Lobby#*#"
|--------------------------------^^^^^^^^^^^^^^^
|------------------   Edit to where you are bound
#Event Invite "#*#invites you#*#"


#Include advpath.inc 
#include spell_routines.inc 
#turbo 10

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /call InitAPFVars 1 15 20
 /deletevar Master 
 /declare Master string Global
 /varset Master ${Param0}
 /echo Starting Healer Assist Macro.
 /echo Master Set to ${Master} 
 :loop
 /call GMcheck  
 /doevents
 /delay 5s
 /goto :loop 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Nedaria's Landing
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_NL  
 /disband
 /dzremove ${Me}
 /doevents flush
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Sub Invite
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_Invite 
 :WaitForInviteToInstance
 /delay 1s
 /if (!${Window[ConfirmationDialogBox].Open}) /goto :WaitForInviteToInstance
 /delay 1s  
 | 2) Click YES
 /notify ConfirmationDialogBox Yes_Button leftmouseup 
 /doevents flush
 /delay 5s
 /invite
 /delay 5s
 /keypress esc
 /keypress esc
 /call PlayFunction "move2rock 1 cf nopp noz"
 /call WaitTilThere
 /delay 5s
 /doortarget
 /face
 /delay 2s
 /click left 400 50
 /click left 400 100
 /click left 400 150
 /click left 425 200
 /click left 450 250
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Forgotten Halls
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_FH
    /docrack nostun on
    /docrack noencumber on
    /doevents
    /call PlayFunction "move2Sweetspot 1 cf nopp noz"
    /call WaitTilThere
    /sit
/return   

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Kill - assist and kill part
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_Kill
 /target ${Master}
 /delay 15s
 /cast 1

|--Delay .. then HOT on master... 
 /delay 5s
 /doevents flush
 /squelch /target clear
 /delay 5s
 /call Health

|--Health check on master before nuke time
 /assist ${Master}
 /delay 2s ${Target.ID}
 /if (!${Target.ID}) {
 /echo [${Time}] NO Target...
 /return
 }
:CAST_DS
 /delay 1
 /if (${Target.PctHPs} > 80) /goto :CAST_DS
 /cast 7
 /delay 10s
:CAST_PET
 /delay 1
 /if (${Target.PctHPs} > 60) /goto :CAST_PET
 /cast 6
 /pet attack
 /pet taunt off
 /delay 10s
 /sit on
:CAST_DD
 /delay 1
 /if (${Target.PctHPs} > 50) /goto :CAST_DD
 /cast 8
 /delay 15s
:CAST_DD1
 /call Health
 /assist Master
:CAST_DD2
 /delay 1
 /if (${Target.PctHPs} > 30) /goto :CAST_DD2
 /cast 8
 /delay 15s
 /sit on
 /call Health
 /assist Master
:CAST_DD3
 /delay 1
 /if (${Target.PctHPs} > 20) /goto :CAST_DD3
 /cast 8
 /delay 15s
 /sit on
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Died - Take a Guess
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_died    
 /camp desktop
 /end
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|GM CHECK
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub GMCheck  
 /if (${Spawn[gm].ID}) {  
 /echo Gm detected  
 /beep 
 /beep 
 /beep  
 /endmac 
 /unload 
 /q
}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Wait Till there - movement wait
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sub WaitTilThere
 :LoopTilThere
 /if (${PathingFlag}==1) {
 /call AdvPathPoll
 /delay 0
 /doevents
 /goto :LoopTilThere
 }
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Health - health check on master
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Sub Health 
 /target Master
 /if (${Target.PctHPs} < 80) /cast 1
 /delay 8s
 /if (${Target.PctHPs} < 60) /cast 2
 /delay 8s
 /return



FHPet

Changes are in RED

Rich (BB code):
 |Macro FHPet
|Re-created by Armysoldier
|
|
|Usage /mac FHPet "Mastersname"
|
|SPELLS:1-2 = sum food and drink
|           3-5 = DD or DoT spells
|              6 = PET
|              7 = Pet Haste 
|              8 = DS Spell

#Event NL "#*#entered Nedaria#*#"
#Event FH "#*#entered The Forgotten Halls#*#"
#Event kill "#*#lunges at you#*#"
#Event Died "#*#You have entered Plane of Knowledge#*#"
|--------------------------------^^^^^^^^^^^^^^^
|------------------   Edit to where you are bound
#Event Invite "#*#invites you#*#" 


#Include advpath.inc 
#include spell_routines.inc 
#turbo 10

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /call InitAPFVars 1 15 20
 /deletevar Master 
 /declare Master string Global
 /varset Master ${Param0}
 /echo Starting PET DPS Assist Macro.
 /echo Master Set to ${Master} 
 :loop
 /call GMcheck  
 /doevents
 /delay 5s
 /goto :loop 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Nedaria's Landing
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_NL
 /disband
 /dzremove ${Me} 
 /pet get lost 
 /doevents flush
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Sub Invite
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_Invite 
 :WaitForInviteToInstance
 /delay 1s
 /if (!${Window[ConfirmationDialogBox].Open}) /goto :WaitForInviteToInstance
 /delay 1s  
 | 2) Click YES
 /notify ConfirmationDialogBox Yes_Button leftmouseup 
 /doevents flush
 /delay 5s
 /invite
 /delay 5s
 /keypress esc
 /keypress esc
 /call PlayFunction "move2rock 1 cf nopp noz"
 /call WaitTilThere
 /delay 5s
 /doortarget
 /face
 /delay 2s
 /click left 400 50
 /click left 400 100
 /click left 400 150
 /click left 425 200
 /click left 450 250
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Forgotten Halls
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_FH
    /docrack nostun on
    /docrack noencumber on
    /doevents
    /call PlayFunction "move2Sweetspot 1 cf nopp noz"
    /call WaitTilThere
    /sit
/return  
 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Kill - assist and kill part
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_Kill
 /doevents flush
 /delay 5s
 /squelch /target clear
 /delay 1
 /target ${Me.Pet}
 /if (!${Target.ID}) {
 /cast 6
 /delay 12s
}
 /cast 7
 /delay 10s
 /target ${Master}
 /cast 8
 /delay 10s
 /assist ${Master}
 /delay 2s ${Target.ID}
 /if (!${Target.ID}) {
 /echo [${Time}] NO Target...
 /return
 }
/cast 1
/delay 7s
/autoinventory
/cast 2
/delay 7s
/autoinventory
:CAST_PET
 /delay 1
 /if (${Target.PctHPs} > 80) /goto :CAST_PET
 /pet attack
 /pet taunt off
 /delay 5s
 /sit on
:CAST_DD
 /delay 1
 /if (${Target.PctHPs} > 77) /goto :CAST_DD
 /cast 3
 /delay 10s
:CAST_DD1
 /delay 1
 /if (${Target.PctHPs} > 75) /goto :CAST_DD1
 /cast 4
 /delay 10s
 /sit on
:CAST_DD2
 /delay 1
 /if (${Target.PctHPs} > 60) /goto :CAST_DD2
 /cast 5
 /delay 10s
 /sit on
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Died - Take a Guess
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_died    
 /camp desktop
 /end
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|GM CHECK
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub GMCheck  
 /if (${Spawn[gm].ID}) {  
 /echo Gm detected  
 /beep 
 /beep 
 /beep  
 /endmac 
 /unload 
 /q
}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Wait Till there - movement wait
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sub WaitTilThere
 :LoopTilThere
 /if (${PathingFlag}==1) {
 /call AdvPathPoll
 /delay 0
 /doevents
 /goto :LoopTilThere
 }
 /return



FHLoot

Rich (BB code):
 |Macro FHloot
|Re-created by Armysoldier
|
|modified Macro Lootwhore.mac 
|Made By Hamburgerhelper
|
|
|Usage /mac FHloot
|

#Event NL "#*#entered Nedaria#*#"
#Event FH "#*#entered The Forgotten Halls#*#"
#Event kill "#*#lunges at you#*#"
#Event Died "#*#You have entered Guild Lobby#*#"
|--------------------------------^^^^^^^^^^^^^^^
|------------------   Edit to where you are bound
#Event MobDied "#*# has been slain by#*#"
#Event Invite "#*#invites you#*#" 

#Include advpath.inc 
#include spell_routines.inc 
#turbo 10

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Main 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|loot all items? (0 no, 1 yes) 
 /declare LootAllItems     int outer  1 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Loot Array Information. 
    /declare MyXLOCA int outer 0 
    /declare MyYLOCA int outer 0 
    /declare AnchorX int outer 161 
    /declare AnchorY int outer -597
 /call ReadINI HunterLoot.ini "${Zone.Name}" Loot 
 /if (!${Defined[ItemsToLoot]}) { 
 /echo No Loot Array Created... 
 } 
|Variables that you don't need to worry about. 
 /declare LootSlot         int outer  0 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 /call InitAPFVars 1 15 20

 /echo Starting Looter Assist Macro.

 :loop
 /call GMcheck  
 /doevents
 /delay 5s
 /goto :loop 
/return 
 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Nedaria's Landing
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_NL  
  /disband
  /dzremove ${Me}
 /doevents flush
 /delay 15s
 /doevents    
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Sub Invite
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 sub event_Invite 
 :WaitForInviteToInstance
 /delay 1s
 /if (!${Window[ConfirmationDialogBox].Open}) /goto :WaitForInviteToInstance
 /delay 1s  
 | 2) Click YES
 /notify ConfirmationDialogBox Yes_Button leftmouseup 
 /doevents flush
 /delay 5s
 /invite
 /delay 5s
 /keypress esc
 /keypress esc
 /call PlayFunction "move2rock 1 cf nopp noz"
 /call WaitTilThere
 /delay 5s
 /doortarget
 /face
 /delay 2s
 /click left 400 50
 /click left 400 100
 /click left 400 150
 /click left 425 200
 /click left 450 250
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| You ENTER Forgotten Halls
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_FH
    /docrack nostun on
    /docrack noencumber on
    /doevents
    /call PlayFunction "move2Sweetspot 1 cf nopp noz"
    /call WaitTilThere
    :movetocenter
     /face nolook loc -597,161
     /if (${Math.Distance[1585,-594]}>2) /nomodkey /keypress forward hold 
     /if (${Math.Distance[1585,-594]}<=2) {
     /nomodkey /keypress forward
     /goto :centered
}
     /goto :movetocenter
     :centered
    /sit
/return  
 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Event Died - Take a Guess
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub event_died    
 /camp desktop
 /end
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Camp - Bard died
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub Event_camp
   /tar a harindu
   /warp target
   /say ready to leave
   /delay 15s 
   /sit  
   /camp desk  
   /endmac 
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|GM CHECK
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub GMCheck  
 /if (${Spawn[gm].ID}) {  
 /echo Gm detected  
 /beep 
 /beep 
 /beep  
 /endmac 
 /unload 
 /q
}
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub Wait Till there - movement wait
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sub WaitTilThere
 :LoopTilThere
 /if (${PathingFlag}==1) {
 /call AdvPathPoll
 /delay 0
 /doevents
 /goto :LoopTilThere
 }
 /return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Looting 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sub Event_MobDied 
 /delay 5s
 /squelch /declare LootSlot    int inner  0 
 /declare LootCheck   int inner  0 
 /declare LootTotal   int inner  0 
 /target npc corpse radius 200 
 :MovementLoop 
 /face fast nolook 
 /if (${Int[${Target.Distance}]}>13) { 
 /keypress forward hold 
 } 
 /if (${Int[${Target.Distance}]}<13&&${Int[${Target.Distance}]}>11) { 
 /keypress forward 
 } 
 /if (${Int[${Target.Distance}]}<9) { 
 /keypress back 
 } 
 /if (${Int[${Target.Distance}]}>13) { 
 /goto :MovementLoop 
 } 
 /keypress forward 
 /keypress back 
 /delay 5 
 /loot 
 /delay 5 
 /if (!${Corpse.Items}) { 
 /echo NO LOOT!
 /notify LootWnd DoneButton leftmouseup 
 /call checkanchor  
 /delay 5
 /call sit
 /delay 10
/return 
 } 
 /varset LootTotal ${Corpse.Items} 
 /for LootSlot 1 to ${LootTotal} 
 /itemnotify loot${LootSlot} leftmouseup 
 /delay 5 
 /if (${LootAllItems}) { 
 /echo Keeping a ${Cursor.Name}... WOOT! 
 /autoinventory 
 /autoinventory 
 /delay 5 
 } else { 
 /for LootCheck 1 to ${ItemsToLoot.Size} 
 /if (${Cursor.Name.Find[${ItemsToLoot[${LootCheck}]}]}) { 
 /echo Keeping a ${Cursor.Name}... WOOT! 
 /autoinventory 
 /autoinventory 
 /delay 5 
 } 
 /next LootCheck 
 } 
 /if (${Cursor.ID}) { 
 /echo Destroying a ${Cursor.Name}... 
 /destroy 
 /destroy 
 /delay 5 
 } 
 /next LootSlot 
 /delay 5 
 /notify LootWnd DoneButton leftmouseup 
 /delay 2 
 /call checkanchor 
 /delay 5
 /call sit
 /delay 10

/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 (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) { 
 /echo Declaring Loot Array... 
 /declare ItemsToLoot[${nValues}]  string outer 
 } 
 /for nArray 1 to ${nValues} 
 /if (${FileName.Equal["HunterLoot.ini"]}) { 
 /squelch /varset ItemsToLoot[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
 } 
 /next nArray 
 /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
 /delay 1s 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Checking Anchor 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CheckAnchor    
 /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) /call MoveToAnchor    
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Move to anchor 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub MoveToAnchor 
 /declare iCount int local 
 /varset iCount 0 
 /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 
:AnchorMoveLoop  
 /delay 1 
 /doevents 
 /face nolook loc ${AnchorY},${AnchorX} 
 /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
 /keypress forward hold 
 } else { 
 /keypress forward 
 /face away loc ${AnchorY},${AnchorX} 
 /return 
 } 
 /if (${iCount}>2) { 
 /face nolook loc ${AnchorY},${AnchorX} 
 /varset iCount 0 
 } 
 /varcalc iCount ${iCount}+1 
 /goto :AnchorMoveLoop 
/return
 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: check sit .. and sit 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub sit 
 /if (${Me.State.NotEqual[SIT]}) { 
 /sit 
 } 
/return

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|Sub succor - Healer not doing his job ... whats new
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub succor
   /tar a harindu
   /warp target
   /say ready to leave
   /delay 15s
   /call PlayFunction "move2rock 1 cf nopp noz"
   /call WaitTilThere
   /doortarget
   /face
   /keypress forward
   /keypress u
   /keypress u
   /delay 15s
/return


healer and pet can be made into looters by

add

Rich (BB code):
 #Event MobDied "#*# has been slain by#*#"



under the events

and add these subs at the end

Rich (BB code):
 |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Looting 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Sub Event_MobDied 
 /delay 5s
 /squelch /declare LootSlot    int inner  0 
 /declare LootCheck   int inner  0 
 /declare LootTotal   int inner  0 
 /target npc corpse radius 200 
 :MovementLoop 
 /face fast nolook 
 /if (${Int[${Target.Distance}]}>13) { 
 /keypress forward hold 
 } 
 /if (${Int[${Target.Distance}]}<13&&${Int[${Target.Distance}]}>11) { 
 /keypress forward 
 } 
 /if (${Int[${Target.Distance}]}<9) { 
 /keypress back 
 } 
 /if (${Int[${Target.Distance}]}>13) { 
 /goto :MovementLoop 
 } 
 /keypress forward 
 /keypress back 
 /delay 5 
 /loot 
 /delay 5 
 /if (!${Corpse.Items}) { 
 /echo NO LOOT!
 /notify LootWnd DoneButton leftmouseup 
 /call checkanchor  
 /delay 5
 /call sit
 /delay 10
/return 
 } 
 /varset LootTotal ${Corpse.Items} 
 /for LootSlot 1 to ${LootTotal} 
 /itemnotify loot${LootSlot} leftmouseup 
 /delay 5 
 /if (${LootAllItems}) { 
 /echo Keeping a ${Cursor.Name}... WOOT! 
 /autoinventory 
 /autoinventory 
 /delay 5 
 } else { 
 /for LootCheck 1 to ${ItemsToLoot.Size} 
 /if (${Cursor.Name.Find[${ItemsToLoot[${LootCheck}]}]}) { 
 /echo Keeping a ${Cursor.Name}... WOOT! 
 /autoinventory 
 /autoinventory 
 /delay 5 
 } 
 /next LootCheck 
 } 
 /if (${Cursor.ID}) { 
 /echo Destroying a ${Cursor.Name}... 
 /destroy 
 /destroy 
 /delay 5 
 } 
 /next LootSlot 
 /delay 5 
 /notify LootWnd DoneButton leftmouseup 
 /delay 2 
 /call checkanchor 
 /delay 5
 /call sit
 /delay 10

/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 (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) { 
 /echo Declaring Loot Array... 
 /declare ItemsToLoot[${nValues}]  string outer 
 } 
 /for nArray 1 to ${nValues} 
 /if (${FileName.Equal["HunterLoot.ini"]}) { 
 /squelch /varset ItemsToLoot[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
 } 
 /next nArray 
 /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
 /delay 1s 
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Checking Anchor 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub CheckAnchor    
 /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) /call MoveToAnchor    
/return 

|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: Move to anchor 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sub MoveToAnchor 
 /declare iCount int local 
 /varset iCount 0 
 /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 
:AnchorMoveLoop  
 /delay 1 
 /doevents 
 /face nolook loc ${AnchorY},${AnchorX} 
 /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
 /keypress forward hold 
 } else { 
 /keypress forward 
 /face away loc ${AnchorY},${AnchorX} 
 /return 
 } 
 /if (${iCount}>2) { 
 /face nolook loc ${AnchorY},${AnchorX} 
 /varset iCount 0 
 } 
 /varcalc iCount ${iCount}+1 
 /goto :AnchorMoveLoop 
/return
 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|SUB: check sit .. and sit 
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sub sit 
 /if (${Me.State.NotEqual[SIT]}) { 
 /sit 
 } 
/return
 
Redguides Listing of Confirmed Macros (Archive Ending 10/10/05)
Status
Not open for further replies.

Users who are viewing this thread

Back
Top
Cart