• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Looking for necro macros (1 Viewer)

Thirdphaze

New member
Joined
Jan 22, 2005
RedCents
Looking for necro macros and possiable some guides that could go with these macros like a way to earn AA well afk and earn exp i am currently a level 54 Necromancer with flagged access to sol ro BoT PoStorms and PoV so if that helps but yea im looking for like a exp/aa macro that i can run afk kinda like the bard macro which i will be using in the near future to make a super bard lol.
 
I highly doubt that's possible. Playing a necro solo is an iffy area as far as good exp zones go. I'm sure one could be made, but you would probably have to get someone to make it for you since I've never seen any. And if you do get it made, you shouldn't expect it to work with the same efficiency as the afk bard macro.

Now...what you really should be asking is for a macro to use to duo with your bard while both are afk. That is certainly doable and would enhance your aa earning rate.

Even still, both of those would have to be written. The second doesnt sound like it'd be too hard. It probably could be taken from an existing macro and edited to work how you want it.
 
They're possible, but they require warp. What level are you?

edit: oh, 54. I'll learn to read someday.
 
Last edited:
Really cool, i got a 70 necro (that im selling to xfer to bards =P) but it would be nice if this worked well. Maybe we can make one made for us in PoFire, that would be a killer XP macro =P
 
Ranik, id like the macro if you have it, mine is 70 necro w/475+ AA's so im sure i can handle it (5Khp/6700mana-unbuffed). I just cant see how it will work to be honest =P
 
I'm new to these forums but from what i'd hear this would be a great macro to have. If anyone could post a Forgotten Halls Macro it would be sweet


Thanks
 
here you go, works with /warp
and uses your epic for snare

Rich (BB code):
| necrokite.mac
|Load warp by typing /plugin mq2warp before running the macro
| Useage : /macro necrokite
| Description : This macro will root dot mobs of
| The Forgotten Halls. It assumes you have an instance
| and are inside already..also Don't make a pet before lauching the macro...
| just DONT MAKE PETS
| | mandrack February 05 re-optimization, works flawlessly so far.
|------------------------------------------------------------------------------
#turbo 40
#define MY_PARTNER GAMEGUIDEONLINE
#define MIN_MOB_LVL 61
#define MAX_MOB_LVL 65

#define CAST_SUCCESS 0
#define CAST_OUTOFRANGE 1
#define CAST_CANNOTSEE 2
#define CAST_RETRY 3
#define CAST_IN_PROGRESS 4
#define CAST_ABORT -1

#define DELAY "/noparse /call Delay"

#define ROOT_SPELL "Petrifying Earth"
#define SPLURT_SPELL "Dark Nightmare"
#define HEAT_DOT "Pyre of Mori"
#define DISEASE_DOT "Chaos Plague"
#define POISON_DOT "Blood of Thule"
#event Exp "#*#party experience!!"
#event Exp2 "You gain experience!!"
#event Invited "#1# invites you to join a group."
#event Blocked "The wa!n not summon a mount#*#"
#event NoLich "You can not change into this form while on a mount."
#event OOR "You are too far away to loot that corpse."
#event Retry "Your spell fizzles!"
#event Retry "Your spell is interrupted."
#event Retry "You haven't recovered yet..."
#event Retry "Spell recovery time not yet met."
#event Retry "Your target resisted the #*#"
#event Abort "Insufficient Mana to cast this spell!"
#event OutOfRange "Your target is out of range, get closer!"
#event NoLOS "You cannot see your target."
|#event Stunned "You can't cast spells while stunned!"
|#event Stunned "You are stunned!"
#event Standing "You must be standing to cast a spell."
#event Standing "|${Me.CleanName}| has fallen to the ground."
#event Retry "Your gate is too unstable, and collapses."
#event Abort "Your target is immune to changes in its attack speed."
#event Retry "You are too distracted to cast a spell now!"
#event Zoned "You have entered #*#"
#event PetAggro "Your pet is the focus of something's attention."
#event RootGone "Your Petrifying Earth spell has worn off."
#event DOT1Gone "Your Dark Nightmare spell has worn off."
#event DOT2Gone "Your Pyre of Mori spell has worn off."
#event DOT3Gone "Your Chaos Plague spell has worn off."
#event DOT4Gone "Your Blood of Thule spell has worn off."
#event Skullcapgone "Your Morternum spell has worn off."
#event fear "Your fear spell has worn off."
#event Snaregone "The shadows release #*#The shadows release your mind. mind."
#event ImHit "|${Target.CleanName}|#*# YOU for#*#"
#event Skinhit "|${Target.CleanName}|#*# YOU, but YOUR magical skin absorbs the blow!"
#event Miss1 "|${Target.CleanName}|#*# YOU, but misses!"

|-- The normal debug - for normal play.
| Enable: "/echo", Disable: "/squelch /echo"
#define DEBUG_1 /echo
|-- Deeper debugging - enable when trying to find bugs.
#define DEBUG_2 "/echo"
|--  The Deepest debugging - will spam a lot.
#define DEBUG_3 "/echo"

|-- Destroys Silver if you have more than the given amount! 0=disable
#define DESTROY_SILVER_IF_ABOVE 1
|-- Destroys Copper if you have more than the given amount! 0=disable
#define DESTROY_COPPER_IF_ABOVE 1

|-- At what range do we send in pet?
#define INITIALIZE_ATTACK_RANGE 100

|-- What pet do we want?
#define PET_SPELL "Lost Soul"
|-- Favorite gem spot for the pet (1-8)
#define PET_GEM 6
|-- How far off should the pet be before we summon it?
#define MAX_PET_RANGE_BEFORE_SUMMON 800
#define SUMMON_SPELL "Ribbon of Empathy"
#define SUMMON_GEM item

| Change SPLURT_GEM to 0 if you lack it.
#define SPLURT_GEM 1
#define HEAT_DOT_GEM 3
#define DISEASE_DOT_GEM 5
#define POISON_DOT_GEM 7
#define ROOT_GEM 8
|-- Name of fear spell
#define FEAR_SPELL "Trepidation"
|-- Favorite gem spot for the fear (1-8)
#define FEAR_GEM 3

|-- How low on health should the pet be before we heal it (noncombat)
#define HEAL_PET_BELOW_PCT 70
|-- Name of pet healing spell
#define HEAL_PET_SPELL "Shadowbond"
|-- Favorite gem spot for the petheal (1-8)
#define HEAL_PET_GEM 7
#define PET_HASTE "Glyph of Darkness"
#define PET_HASTE_GEM 6
#define LICH_SPELL "Seduction of Saryrn"
#define LICH_GEM 8
#define LIFE_DOT "Demi Lich Skullcap"
#define LIFE_DOT_GEM item
#define ROD_NAME "Summoned: Modulating Rod"
#define SNARE_DOT "Scythe of the shadowed soul"
#define SNARE_DOT_GEM item
|-- If your health gets below this lvl start /beep'ing and FD
#define ALARM_HEALTH_BELOW_PCT 40

|What is our feign death spell of choice? (Requires it be already mem'd, memorizing before feigning = death)
#define FEIGN_SPELL "Death Peace"
#define FEIGN_GEM 4

|-- What is the minimum mana I should have, wait if below
#define MIN_MANA_BEFORE_MEDITATE 90

|--How many waypoints exist on the kiting path.
#define WP_SIZE 37
#define Y_COORD 1
#define X_COORD 2
#define Z_COORD 3

|----------------------------------------------------------------------------
|SUB: Main - Declarations and Initialization
|----------------------------------------------------------------------------
Sub Main
  /declare Exper float outer
  /declare AAExp float outer
  /declare LDRExp float outer

  /varset Exper ${Me.PctExp}
  /varset AAExp ${Me.PctAAExp}
  /varset LDRExp ${Me.PctGroupLeaderExp}

  /declare reroot bool outer TRUE
  /declare redot1 bool outer TRUE
  /declare redot2 bool outer TRUE
  /declare redot3 bool outer TRUE
  /declare reskull bool outer TRUE
  /declare dangerFlag bool outer
  /declare spellName string outer
  /declare Initialized bool outer FALSE
  /declare weZoned bool outer FALSE
  /declare wayBlocked bool outer FALSE
  /declare mountFlag bool outer TRUE
  /declare result int outer
  /declare startingPP int outer ${Me.Platinum}
  /declare startingXP int outer ${Me.Exp}
  /declare wpY float outer
  /declare wpX float outer
  /declare wpZ float outer
  /declare waypoint[WP_SIZE,3] int outer
  /varset waypoint[1,Y_COORD] -598
  /varset waypoint[1,X_COORD] 101
  /varset waypoint[1,Z_COORD] 4
  /varset waypoint[2,Y_COORD] -596
  /varset waypoint[2,X_COORD] 108
  /varset waypoint[2,Z_COORD] 4
  /varset waypoint[3,Y_COORD] -597
  /varset waypoint[3,X_COORD] -40
  /varset waypoint[3,Z_COORD] 4
  /varset waypoint[4,Y_COORD] -556
  /varset waypoint[4,X_COORD] -50
  /varset waypoint[4,Z_COORD] 4
  /varset waypoint[5,Y_COORD] -556
  /varset waypoint[5,X_COORD] -160
  /varset waypoint[5,Z_COORD] 4
  /varset waypoint[6,Y_COORD] -473
  /varset waypoint[6,X_COORD] -41
  /varset waypoint[6,Z_COORD] 4
  /varset waypoint[7,Y_COORD] -398
  /varset waypoint[7,X_COORD] -45
  /varset waypoint[7,Z_COORD] 4
  /varset waypoint[8,Y_COORD] -402
  /varset waypoint[8,X_COORD] 1
  /varset waypoint[8,Z_COORD] 4
  /varset waypoint[9,Y_COORD] -329
  /varset waypoint[9,X_COORD] 0
  /varset waypoint[9,Z_COORD] 13
  /varset waypoint[10,Y_COORD] -596
  /varset waypoint[10,X_COORD] 157
  /varset waypoint[10,Z_COORD] 2
  /varset waypoint[11,Y_COORD] -600
  /varset waypoint[11,X_COORD] 198
  /varset waypoint[11,Z_COORD] 4
  /varset waypoint[12,Y_COORD] -721
  /varset waypoint[12,X_COORD] 45
  /varset waypoint[12,Z_COORD] -10
  /varset waypoint[13,Y_COORD] -664
  /varset waypoint[13,X_COORD] 45
  /varset waypoint[13,Z_COORD] -4
  /varset waypoint[14,Y_COORD] -635
  /varset waypoint[14,X_COORD] 45
  /varset waypoint[14,Z_COORD] 4
  /varset waypoint[15,Y_COORD] -814
  /varset waypoint[15,X_COORD] 45
  /varset waypoint[15,Z_COORD] -10
  /varset waypoint[16,Y_COORD] -814
  /varset waypoint[16,X_COORD] 190
  /varset waypoint[16,Z_COORD] -11
  /varset waypoint[17,Y_COORD] -814
  /varset waypoint[17,X_COORD] 335
  /varset waypoint[17,Z_COORD] -10
  /varset waypoint[18,Y_COORD] -814
  /varset waypoint[18,X_COORD] 488
  /varset waypoint[18,Z_COORD] -35
  /varset waypoint[19,Y_COORD] -473
  /varset waypoint[19,X_COORD] -6
  /varset waypoint[19,Z_COORD] 4
  /varset waypoint[20,Y_COORD] -473
  /varset waypoint[20,X_COORD] 20
  /varset waypoint[20,Z_COORD] -2
  /varset waypoint[21,Y_COORD] -473
  /varset waypoint[21,X_COORD] 56
  /varset waypoint[21,Z_COORD] -10
  /varset waypoint[22,Y_COORD] -473
  /varset waypoint[22,X_COORD] 135
  /varset waypoint[22,Z_COORD] -11
  /varset waypoint[23,Y_COORD] -405
  /varset waypoint[23,X_COORD] 135
  /varset waypoint[23,Z_COORD] -11
  /varset waypoint[24,Y_COORD] -405
  /varset waypoint[24,X_COORD] 93
  /varset waypoint[24,Z_COORD] -11
  /varset waypoint[25,Y_COORD] -290
  /varset waypoint[25,X_COORD] 93
  /varset waypoint[25,Z_COORD] -11
  /varset waypoint[26,Y_COORD] -290
  /varset waypoint[26,X_COORD] 183
  /varset waypoint[26,Z_COORD] -11
  /varset waypoint[27,Y_COORD] -290
  /varset waypoint[27,X_COORD] 275
  /varset waypoint[27,Z_COORD] -11
  /varset waypoint[28,Y_COORD] -409
  /varset waypoint[28,X_COORD] 275
  /varset waypoint[28,Z_COORD] -11
  /varset waypoint[29,Y_COORD] -397
  /varset waypoint[29,X_COORD] -40
  /varset waypoint[29,Z_COORD] 4
  /varset waypoint[30,Y_COORD] -397
  /varset waypoint[30,X_COORD] 0
  /varset waypoint[30,Z_COORD] 4
  /varset waypoint[31,Y_COORD] -337
  /varset waypoint[31,X_COORD] 1
  /varset waypoint[31,Z_COORD] 12
  /varset waypoint[32,Y_COORD] -235
  /varset waypoint[32,X_COORD] 0
  /varset waypoint[32,Z_COORD] 20
  /varset waypoint[33,Y_COORD] -167
  /varset waypoint[33,X_COORD] 0
  /varset waypoint[33,Z_COORD] 20
  /varset waypoint[34,Y_COORD] -127
  /varset waypoint[34,X_COORD] 0
  /varset waypoint[34,Z_COORD] 14
  /varset waypoint[35,Y_COORD] -86
  /varset waypoint[35,X_COORD] 0
  /varset waypoint[35,Z_COORD] 4
  /varset waypoint[36,Y_COORD] 4
  /varset waypoint[36,X_COORD] 0
  /varset waypoint[36,Z_COORD] -6
  /varset waypoint[37,Y_COORD] 53
  /varset waypoint[37,X_COORD] 0
  /varset waypoint[37,Z_COORD] 4

  |Buffs to be kept up on self (max 15) - "Buff" or "Buff|GemSlot"
  /declare MyBuffs[2] string outer
/varset MyBuffs[1] "Shadow Guard|7"
/varset MyBuffs[2] "Force Shield|4"


  DEBUG_1 Starting macro
  |Group of locked target data
  /declare TargetName string outer
  /declare TargetID int outer
  /declare fightTimer timer outer

  /call MainSub
  DEBUG_1 Exited normally!
/return


|----------------------------------------------------------------------------
|SUB: MainSub - The main sub
|----------------------------------------------------------------------------
Sub MainSub
  |The main loop. After an attack we go here to acquire a new target
  /cleanup
  /if (${Zone.Name.Left[9].NotEqual[Forgotten]}) /varset weZoned TRUE
  /varset Initialized TRUE
:NewTarget
  /varset TargetID
  /if (${Corpse.Open}) {
      /notify LootWnd DoneButton leftmouseup
      /cleanup
  }
  /call AlwaysCheck
  /if (${Macro.Return}) /return

  /call DowntimeWork
  /if (${Macro.Return}==0) /goto :NewTarget

  /call AcquireTarget
  /if (${Macro.Return}) /goto :NewTarget

  ||| This is new code for Root Rot with Warp |||
  /call BackOffFromTarget 60
  /if (${Target.Distance}>INITIALIZE_ATTACK_RANGE) /goto :NewTarget

  /if (${Spell[HEAT_DOT_GEM].Name.NotEqual[HEAT_DOT]}) {
      /memspellset dots
      /delay 1m ${Window[SpellBookWnd]}==FALSE
  }
  /doevents flush
  /varset reroot TRUE
  /varset redot1 TRUE
  /varset redot2 TRUE
  /varset redot3 TRUE
  /varset reskull TRUE
  /call BackOffFromTarget 60
:fartAround

DELAY 1 ${Target.ID}!=0&&${Target.Type.Equal[NPC]}
  /doevents
  /call AlwaysCheck
  /if (${Macro.Return}) /goto :NewTarget

  /if (${reroot} && ${Target.PctHPs}>1) {
   /call BackOffFromTarget 60    
/call MyCast "ROOT_SPELL" ROOT_GEM
      /call BackOffFromTarget 60
/varset reroot
      /varset dangerFlag
      /goto :fartAround
  } else /if (${redot1} && ${Target.PctHPs}>1) {
/call BackOffFromTarget 60
/call MyCast "SNARE_DOT" SNARE_DOT_GEM
/if (${Target.PctHPs}>16) /call MyCast "SPLURT_SPELL" SPLURT_GEM
         /varset redot1
  } else /if (${redot2} && ${Target.PctHPs}>1) {
      /call BackOffFromTarget 60
/call MyCast "HEAT_DOT" HEAT_DOT_GEM
       /call BackOffFromTarget 60
/call MyCast "ROOT_SPELL" ROOT_GEM
/varset redot2
  } else /if (${redot3} && ${Target.PctHPs}>25) {
/call BackOffFromTarget 60       
/call MyCast "DISEASE_DOT" DISEASE_DOT_GEM
      /varset redot3
  } else /if (${reskull} && ${Target.PctHPs}>1) {
/call MyCast "ROOT_SPELL" ROOT_GEM
/call SwapItem "Demi Lich Skullcap" Head       
/call BackOffFromTarget 60
/call MyCast "LIFE_DOT" LIFE_DOT_GEM
/call SwapItem "Deathcaller's Skullcap" head
      
/varset reskull
  } else /if (${Target.ID} && ${reroot}) {
      /call BackOffFromTarget 60
      /pet attack
  }
  /call AlwaysCheck
  /if (${Macro.Return}) /goto :NewTarget

  /if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
      /call Mount
      /goto :fartAround
  }
  /call AlwaysCheck
  /if (${Zone.Name.Find[forgotten]}!=NULL && ${Macro.Return}==0) /call DoTheLooting
  /varset TargetID
  /goto :NewTarget
/return

| AlwaysCheck - health, aggro, zone, etc. ALSO CALLED FROM EVENTS.
| "/call AlwaysCheck nocast" to never perform casting (eg event calls)
| 0=no problem; 1=panic
Sub AlwaysCheck(string casting)
  /doevents Zoned
  /if (${Cursor.ID}) /autoinventory
  /if (${Me.PctHPs}<ALARM_HEALTH_BELOW_PCT) {
      /call NoLich
      /if (${Me.PctHPs}<=20) {
          /keypress instant_camp
          /endmacro
      }
      /if (${Spawn[${TargetID}].Type.Equal[NPC]} && ${Zone.Name.Find[forgotten]}!=0) {
          /call BailOut
          /return 1
      }
  }
  /if (${Me.PctMana}>90 || ${Me.PctHPs}<50) /call NoLich
  /if (${casting.Equal[nocast]}==FALSE) {
      /if (!${dangerFlag} && ${Me.Pet.ID}!=0 && ${Me.PetBuff[PET_HASTE]}==0) /call MyCast "PET_HASTE" PET_HASTE_GEM
      /if (${Me.PctMana}<90 && ${Me.Buff[LICH_SPELL].ID}==NULL && ${Me.PctHPs}>50) /call MyCast "LICH_SPELL" LICH_GEM
      /if (${FindItem[ROD_NAME].ID}!=0) /cast item "ROD_NAME"
  }
  /if (${Initialized} && ${weZoned}) {
      /declare zoneDelay timer 3m
      /varset weZoned FALSE
      /varset wayBlocked FALSE
      /doevents flush
      /if (${Zone.Name.Find[forgotten]}==NULL) {
          /if (${Zone.Name.Find[nedaria]}==NULL) {
:quit
              /dismount
              /camp desktop
              /endmacro
          }
:zoneIn
          /warp -670 1543 96
          /keypress back
          /keypress forward
          /delay 1
          /sit
          /if (${Me.PctHPs}<=50) {
              /popup Waiting for health>99%...
              /delay 5m ${Me.PctHPs}>99
          }
          /face fast loc 1543,-670
:zoning
          /delay 1s
          /click left 400 300
          /delay 5
          /click left 500 400
          /delay 5
          /click left 600 500
          /doevents Zoned
          /doevents Blocked
          /delay 1s ${weZoned}||${wayBlocked}
          /if (${wayBlocked}) /goto :quit

          /if (${weZoned}==FALSE && ${zoneDelay.Value}>0) /goto :zoning

          /if (${Zone.Name.Find[forgotten]}==NULL) /goto :quit

          /if (${Zone.Name.Find[knowledge]}!=0) /goto :quit

          /varset Initialized TRUE
          /return 1
      }
  }
/return 0

Sub NoLich
  /declare slot int local
  /varcalc slot ${Me.Buff[LICH_SPELL].ID}-1
  /if (${slot}>=0) /notify BuffWindow Buff${slot} leftmouseup
/return

Sub BailOut
  /dismount
  /attack off
  /warp succor
  /delay 1
  /target npc a_harindi_guide
  |/warp -30 -827 -11
  /warp t
  /delay 2
  /face fast nolook
  /varset fightTimer 15s
:panic
  /say I am ready to leave!
  /delay 1
  /doevents Zoned
  /delay 5 ${weZoned}
  /if (${Me.PctHPs}<=20) {
      /keypress instant_camp
      /return
  }
  /if (${Zone.Name.Find[forgotten]}) {
      /keypress left
      /delay 1
      /keypress right
      /if (${Target.ID}) {
          /face fast nolook
      } else {
          /return
      }
      /if (${fightTimer.Value}>0) /goto :panic
      /keypress instant_camp
  }
/return

|----------------------------------------------------------------------------
|SUB: MainAttack - Handles the kiting/killing
|----------------------------------------------------------------------------
Sub MainAttack
:attackAgain
  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /doevents
  /target id ${TargetID}
  DELAY 1
  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /goto :looties

  /call AlwaysCheck
  /if (${Macro.Return}) /return

  /if (${Target.ID}==${Me.Pet.ID}) {
      /assist
      DELAY 3 ${Target.ID}!=${Me.Pet.ID}
  }
  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /goto :looties

  /if (${Me.PctHPs}>ALARM_HEALTH_BELOW_PCT && ${Me.Buff[LICH_SPELL].ID}==NULL) {
      DEBUG_3 Me.Buff[LICH_SPELL].ID==${Me.Buff[LICH_SPELL].ID}
      /call MyCast "LICH_SPELL" LICH_GEM
  }
  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /goto :looties

  /face
  /if (${Target.Distance}>INITIALIZE_ATTACK_RANGE) /call WarpCloser
  /if (${Me.Sitting}==FALSE && ${Me.Mount.ID}==0) /call Mount
  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /goto :looties

  /if (${fightTimer.Value}==0 && ${Target.PctHPs}>20) {
      /call DoTheFear
      /call MyCast "LIFE_DOT" LIFE_DOT_GEM
  }
  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /goto :looties

  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /if (${Target.ID}>0 && ${Target.Type.NotEqual[Corpse]}) /goto :attackAgain

:looties
  /call AlwaysCheck
  /if (${Zone.Name.Find[forgotten]}==NULL || ${Macro.Return}) /return

  /call DoTheLooting
  /varset TargetID
/return

|----------------------------------------------------------------------------
|SUB: DowntimeWork - Between fight rebuffs, etc.
|----------------------------------------------------------------------------
Sub DowntimeWork
  | Check if we are low on mana or health. Heal or sit down if low
  /call CheckMana
  /if ( ${Macro.Return}==0 ) /return 0
  DEBUG_2 1. Mana Checked

  | Make sure all buffs on self are up
  /call MaintainSelfBuffs
  /if ( ${Macro.Return}==0 ) /return 0
  DEBUG_2 4. Buffs Checked

  /call AlwaysCheck
  /if (${Macro.Return}) /return 0

  /memspellset dots
  /delay 1m ${Window[SpellBookWnd]}==FALSE
/return 1

|----------------------------------------------------------------------------
|SUB: AcquireTarget - Finding a target 0=success; 1=n/a
|----------------------------------------------------------------------------
Sub AcquireTarget
  /declare s int local
  /declare lvl int local
  /declare spn int local
  /squelch /target clear
  /varset TargetID
  /varset TargetName
:scan
  /varcalc s ${s}+1
  /varset spn ${LastSpawn[${s}].ID}
  /if (${spn}==0) /goto :acquired

  /if ((${Spawn[${spn}].CleanName.Find[squeaking]} || ${Spawn[${spn}].CleanName.Find[squeaking]} || ${Spawn[${spn}].CleanName.Find[reject]}) && ${Spawn[${spn}].Type.Equal[Corpse]}==FALSE && ${Spawn[${spn}].Level}>=MIN_MOB_LVL && ${Spawn[${spn}].Level}<=MAX_MOB_LVL && ${Spawn[${spn}].Level}>${lvl}) {
      /if (${Spawn[${spn}].Y}<=-265 && ${Spawn[${spn}].Y}>=-429 && ${Spawn[${spn}].X}>=74 && ${Spawn[${spn}].X}<=298 && ${Spawn[${spn}].Level}>=47) {
          DEBUG_1 Ignoring mob in add area: ${Spawn[${spn}].CleanName}(L${Spawn[${spn}].Level})
      } else {
          /varset lvl ${Spawn[${spn}].Level}
          /varset TargetID ${Spawn[${spn}].ID}
      }
  }
/goto :scan

:acquired
  /if (${TargetID}) {
      /target id ${TargetID}
      DELAY 2 ${Target.ID}!=0
      /if (${Target.CleanName.Find[${Me.CleanName}]}) {
          DEBUG_1 WTF? I got targeted!
          /return 1
      }
      /varset TargetID ${Target.ID}
      /varset TargetName ${Target.CleanName}
      /popup ${TargetName} (L${Target.Level})
      DEBUG_1 ${TargetName} (L${Target.Level})
      /return 0
  }
  DEBUG_3 AcquireTarget FAILED!
  /popup Waiting for mobs in range MIN_MOB_LVL-MAX_MOB_LVL...
  /call Mount
  /delay 5s
/return 1

| Find the closest WP in line-of-sight to our target
Sub FindWP
  /declare wp int local
  /declare Y int local
  /declare X int local
  /declare Z int local
  /declare dist float local 10000
  /varset wpY
  /varset wpX
  /varset wpZ
  /for wp 1 to WP_SIZE
      /varset Y ${waypoint[${wp},Y_COORD]}
      /varset X ${waypoint[${wp},X_COORD]}
      /varset Z ${waypoint[${wp},Z_COORD]}
      /if (${LineOfSight[${Y},${X},${Z}:${Target.Y},${Target.X},${Target.Z}]} && ${Math.Distance[${Y},${X},${Z}:${Target.Y},${Target.X},${Target.Z}]}<${dist}) {
          /varset wpY ${Y}
          /varset wpX ${X}
          /varset wpZ ${Z}
          /varset dist ${Math.Distance[${Y},${X},${Z}:${Target.Y},${Target.X},${Target.Z}]}
      }
  /next wp
/return


|warp closer to target, via WP if mob, or direct otherwise.
Sub WarpCloser
  /call AlwaysCheck nocast
  /if (${Macro.Return}) /return

  /if (${Target.ID}==0 || ${Target.ID}==${Me.ID}) {
      /target id ${TargetID}
      DELAY 2 ${Target.ID}>0
  }
  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /return

  /if (${Target.Type.Equal[Pet]}) {
      /warp t
  } else {
      /if (${Me.Pet.ID}) /warp ${Me.Pet.X} ${Me.Pet.Y} ${Me.Pet.Z}
  }
  DELAY 1
  /if (${Target.ID}) /face fast nolook
/return

|warp away from target, via most distant WP
Sub WarpDistant
  /call AlwaysCheck nocast
  /if (${Macro.Return}) /return

  /if (${Target.ID}==0 || ${Target.ID}==${Me.ID}) {
      /target id ${TargetID}
      DELAY 2 ${Target.ID}>0
  }
  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) /return

  /declare wp int
  /declare Y float
  /declare X float
  /declare Z float
  /declare dist float
  /for wp 1 to WP_SIZE
      /varset Y ${waypoint[${wp},Y_COORD]}
      /varset X ${waypoint[${wp},X_COORD]}
      /varset Z ${waypoint[${wp},Z_COORD]}
      /if (${Math.Distance[${Y},${X},${Z}:${Target.Y},${Target.X},${Target.Z}]}>${dist}) {
          /varset wpY ${Y}
          /varset wpX ${X}
          /varset wpZ ${Z}
          /varset dist ${Math.Distance[${Y},${X},${Z}:${Target.Y},${Target.X},${Target.Z}]}
      }
  /next wp
  /if (${wpY}!=0||${wpX}!=0||${wpZ}!=0) /warp ${wpX} ${wpY} ${wpZ}
  DELAY 1
  /if (${Target.ID}) /face fast nolook
/return

| DO NOT CALL DELAY FROM EVENTS!
| Parameters: delay timer setting + early exit condition
Sub Delay(string delayTime, string exitCond)
  /declare tmr timer local ${delayTime}
:moreDelay
  /call AlwaysCheck nocast
  /if (${tmr.Value}==0) /return

  /if (${exitCond}) {
      |DEBUG_3 Early exit on condition: ${exitCond.Right[-1]}
      /return
  }
  /if (${Me.PctHPs}<ALARM_HEALTH_BELOW_PCT) {
      DEBUG_1 Delay abort, ${tmr.Value} ticks left, LOW HEALTH!
      /return
  }
  /delay 1 ${exitCond}
  |/if (${Math.Calc[${tmr.Value}%10].Int}==0) DEBUG_3 /delay ${tmr.Value} ${exitCond.Right[-1]}:${exitCond}
  /doevents Skinhit
  /doevents Miss1
  /doevents ImHit
  /doevents Retry
  /doevents Abort
  /doevents OutOfRange
  /doevents NoLOS
  /doevents Standing
  /doevents OOR
  /doevents Zoned
  /doevents PetAggro
  /doevents NoMount
  /doevents NoLich
 | /doevents Stunned
  /doevents RootGone
  /doevents DOT1Gone
  /doevents DOT2Gone
  /doevents DOT3Gone
  /doevents Snaregone
  /doevents Skullcapgone
  /if (${Target.Type.Equal[NPC]}) /face
  /goto :moreDelay
/return

Sub MyCast(string spname, string gname)
  /if (${Zone.Name.Find[forgotten]}==NULL) /return

  /if (${Corpse.Open}) /notify LootWnd DoneButton leftmouseup
  /varset spellName ${spname}
  /call DoCast ${gname}
  /doevents
  /if (${Target.ID}!=${TargetID} && ${TargetID}!=0) {
      /target id ${TargetID}
      DELAY 3 ${Target.ID}==${TargetID}
  }
  /if (${Target.Type.Equal[NPC]}) /face fast
/return

| Cast something with status return and event processing
| assumes outer variable spellName and TargetID
Sub DoCast(string gem)
  /declare castX float local ${Me.X}
  /declare castY float local ${Me.Y}
  /declare castZ float local ${Me.Z}
  /declare castTime int
  /declare tartype string local ${Spell[${spellName}].TargetType}
  /if (${gem.Equal[item]}) /varset tartype ${FindItem[=${spellName}].Spell.TargetType}
:recast
  /if (${tartype.Equal[Pet]} && ${Target.ID}!=${Me.Pet.ID}) {
      /if (${Me.Pet.ID}==0) /return
      /target id ${Me.Pet.ID}
      /delay 1
  } else /if (${tartype.Equal[Self]} && ${Target.ID}!=${Me.ID}) {
      /target myself
      /delay 1
  } else /if (${Target.Type.Equal[NPC]} && ${Target.ID}!=${TargetID}) {
      /target id ${TargetID}
      /delay 1
  }
  /if (${Target.Type.Equal[NPC]} && ${Target.PctHPs}<8) {
      DEBUG_3 Confusing/low health target (${Target.PctHPs}%)
      /return
  }
  /if (${Target.ID}==0 || ${Target.Type.Equal[Corpse]}) {
      DEBUG_3 Target${Target.CleanName}(${Target.ID}) Dead?
      /return
  }
  /if (${Target.ID}!=${Me.ID}) {
      /face fast
      /if (!${LineOfSight[${Me.Y},${Me.X},${Me.Z}:${Target.Y},${Target.X},${Target.Z}]}) {
          /if (${dangerFlag} && ${reroot}) {
              /call BackOffFromTarget 60
              /delay 1
          } else {
              /call WarpCloser
              /delay 1
          }
      }
  }
  /if (${gem.Equal[item]}) {
      DEBUG_2 Casting ${spellName}:${gem}>${Target.CleanName}
      /cast item "${spellName}"
  } else {
      /if (${Me.Gem[${spellName}]}==NULL) {
          /memspell ${gem} "${spellName}"
          DEBUG_3 book:${Window[SpellBookWnd]}; ${spellName}:${Me.SpellReady[${spellName}]}
          /delay 10s ${Window[SpellBookWnd]}==FALSE
          DELAY 15s ${Me.SpellReady[${spellName}]}
      } else {
          DEBUG_3 ${spellName}:${Me.SpellReady[${spellName}]}
          /if (!${Me.SpellReady[${spellName}]}) {
              DELAY 15s ${Me.SpellReady[${spellName}]}
          }
      }
      DEBUG_2 Casting ${spellName}:${gem}>${Target.CleanName}
      /cast "${spellName}"
  }
  /varset result CAST_IN_PROGRESS
  DELAY 2
  /doevents
  /if (${result}==CAST_IN_PROGRESS && ${Me.Casting.ID}==0) /goto :recast

  /if (!${dangerFlag}) {
      DELAY 30s ${Me.Casting.ID}==NULL
      /delay 1
      /doevents
  } else {
      /delay 1
      /varset castX ${Me.X}
      /varset castY ${Me.Y}
      /varset castZ ${Me.Z}
      /if (${reroot} && ${Target.Type.Equal[NPC]}) {
          /delay 4
          /call WarpDistant
      }
      /varcalc castTime ${Math.Calc[${Me.Casting.MyCastTime}*10].Int}-19
      | Hard code 9s delay for item, assume it is skullcap.
      /if (${gem.Equal[item]}) /varset castTime 100
      /delay ${castTime} ${Me.Casting.ID}==0
      /warp ${castX} ${castY} ${castZ}
      /face fast nolook
      /delay 3s ${Me.Casting.ID}==0
      /delay 1
      /doevents
      /if (${reroot} && ${Target.Type.Equal[NPC]}) {
          /call WarpDistant
      } else {
          /call BackOffFromTarget 60
      }
  }
  /if (${result}==CAST_IN_PROGRESS) /varset result CAST_SUCCESS
  DEBUG_3 Casting of ${spellName} complete, result=${result}
  /if (${result}==CAST_OUTOFRANGE || ${result}==CAST_CANNOTSEE) {
      /if (!${dangerFlag} || !${reroot}) /call WarpCloser
      /goto :recast
  } else /if (${result}==CAST_RETRY) {
      /if (!${Me.SpellReady[${spellName}]}) {
       /varcalc result ${Spell[${spellName}].RecoveryTime}*10
          DELAY ${result} ${Me.SpellReady[${spellName}]}
      }
      /goto :recast
  }
/return

Sub Mount
  /if (${mountFlag}) {
      /if (${InvSlot[ammo].Item.Name.Find[Drum]}!=NULL && ${Me.Buff[Summon Drogmor].ID}==0) {
          /cast item "${InvSlot[ammo].Item.Name}"
      } else /if (${InvSlot[ammo].Item.Name.Find[Bridle]}!=NULL && ${Me.Buff[Summon Horse].ID}==0) {
          /cast item "${InvSlot[ammo].Item.Name}"
      } else {
          /if (!${Me.Sitting}) /sit
      }
  } else {
      /if (!${Me.Sitting}) /sit
  }
/return

|----------------------------------------------------------------------------
|SUB: CheckMana 0= need more med; 1=mana ok
| Now with histeresis - exit condition is above entry condition.
|----------------------------------------------------------------------------
Sub CheckMana
  /declare exitMana int local
  /declare exitHealth int local
  /varcalc exitMana MIN_MANA_BEFORE_MEDITATE+80
  /varcalc exitHealth ALARM_HEALTH_BELOW_PCT+70
  |Meditate?
  /if (${Me.PctMana}<MIN_MANA_BEFORE_MEDITATE || ${Me.PctHPs}<ALARM_HEALTH_BELOW_PCT) {
      DEBUG_1 Meditating.
      /popup Meditating...
      /call Mount
      /declare i int local
      /if ( ${Target.ID} ) /squelch /target clear
      /for i 1 to 10
          DELAY 1s
          /if ( ${Target.ID} ) /return 1
      /next i
      /if ( ${Me.PctMana}<${exitMana} || ${Me.PctHPs}<${exitHealth} ) /return 0
      DEBUG_2 Mana/health OK now.
  }
/return 1

|----------------------------------------------------------------------------
|SUB: MaintainSelfBuffs - Keep buffs up
| 0=still buffing; 1=all done
|----------------------------------------------------------------------------
Sub MaintainSelfBuffs
  /declare iCount int local
  /declare t string local
  /for iCount 1 to ${MyBuffs.Size}
      /call SplitString tmp_tmp ${MyBuffs[${iCount}]} "|"
      /varset t ${Me.Buff[${tmp_tmp[1]}]}
      /if ( ${t.Equal[NULL]} ) {
          /if ( !${Target.ID}!=${Me.ID} ) {
              /echo buffing
              /target myself
              DELAY 1
          }
          |Cast with gemselection or default
          /if ( ${tmp_tmp.Size}>1 ) {
              DEBUG_3 Attempting to cast "${tmp_tmp[1]}" ${tmp_tmp[2]}
              /call MyCast "${tmp_tmp[1]}" ${tmp_tmp[2]}
          } else {
              DEBUG_3 Attempting to cast "${tmp_tmp[1]}"
              /call MyCast "${tmp_tmp[1]}" 8
          }
          |Return to top - so we dont keep buffing if being attacked
          /return 0
      }
  /next iCount
/return 1

| Back off from current target so many units.
| Finds first line of sight on a horizontal, vertical, or
| diagonals that are at least as distant as desired.
Sub BackOffFromTarget(float dist)
  /declare by float local ${Target.Y}
  /declare bx float local ${Target.X}
  /varcalc by ${by}-${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varset by ${Target.Y}
  /varcalc bx ${bx}-${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varcalc by ${by}+${dist}
  /varset bx ${Target.X}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varset by ${Target.Y}
  /varcalc bx ${bx}+${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varcalc by ${by}+${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varcalc by ${Target.Y}-${dist}
  /varcalc bx ${Target.X}-${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varcalc by ${Target.Y}+${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /varcalc by ${Target.Y}-${dist}
  /varcalc bx ${Target.X}+${dist}
  /if (${LineOfSight[${by},${bx},${Target.Z}:${Target.Y},${Target.X},${Target.Z}]}) /goto :backoff

  /face fast
  /keypress forward
  /delay 3s ${Target.Distance}>=${dist}
  /keypress forward
  /face fast
  /return
:backoff
  /warp ${bx} ${by} ${Target.Z}
  /delay 1
  /if (${Target.ID}) /face fast nolook
/return

|----------------------------------------------------------------------------
|SUB: DoTheLooting
|----------------------------------------------------------------------------
Sub DoTheLooting
  /if (!${Defined[looted]}) /declare looted bool outer
  /target id ${TargetID}
  DELAY 1
  DEBUG_1 Going to loot
  DEBUG_3 DoTheLooting Target: ${Target.CleanName}, ID:${Target.ID}
  /warp t
  DELAY 1
  /loot
  /varset looted FALSE
  DELAY 6s (${Corpse.Open}&&${looted})
  /call LootMob
  /notify LootWnd DoneButton leftmouseup
  DELAY 1
  /doevents
  /declare xp int local
  /declare pp int local
  /declare level float local ${Me.Level}
  /varcalc level ${level}+${Math.Calc[${Me.Exp}/330.0].Milli}
  /varcalc xp ${Me.Exp}-${startingXP}
  /if (${xp}<0) /varcalc xp ${xp}+330
  /varcalc pp ${Me.Platinum}-${startingPP}
  /popup L${level.Milli}, XP up ${Math.Calc[${xp}/3.3]}% - PP up ${pp}
  DEBUG_1 L${level.Milli}, XP up ${Math.Calc[${xp}/3.3]}% - PP up ${pp}
  DELAY 5s
/return

|----------------------------------------------------------------------------
|SUB: LootMob
|----------------------------------------------------------------------------
Sub LootMob
  /if (!${Target.ID}) {
      /target npc corpse
      DELAY 1s ${Target.ID}>0
  }
  /loot
  DELAY 1s ${Corpse.Open}
  /cleanup
/return

|----------------------------------------------------------------------------
|SUB: SplitString - A generic string splitter.
|----------------------------------------------------------------------------
Sub SplitString(string varname, string inputstring, string splitter)
  /declare i int local
  /declare stringcnt int local

  |The normal splitter. Splitter string is just 1 in length.
  /if (${splitter.Length}==1) {
      /varcalc stringcnt ${inputstring.Count["${splitter}"]} + 1
      /if (!${Defined[${varname}]}) {
          /declare ${varname}[${stringcnt}] string outer
      } else {
          /deletevar ${varname}
          /declare ${varname}[${stringcnt}] string outer
      }
      /for i 1 to ${stringcnt}
          /varset ${varname}[${i}] ${inputstring.Token[${i},"${splitter}"]}
      /next i
  }
/return

|----------------------------------------------------------------------------
|SUB: DestroyCopper - Destroy all the copper
|----------------------------------------------------------------------------
Sub DestroyCopper
  /squelch /windowstate InventoryWindow open
  /shift /notify InventoryWindow IW_Money3 leftmouseup
  /delay 1s ${Cursor.ID}>0
  /destroy
  /cleanup
/return

|----------------------------------------------------------------------------
|SUB: DestroySilver - Destroy all the silver
|----------------------------------------------------------------------------
Sub DestroySilver
  /squelch /windowstate InventoryWindow open
  /shift /notify InventoryWindow IW_Money2 leftmouseup
  /delay 1s ${Cursor.ID}>0
  /destroy
  /cleanup
/return

|----------------------------------------------------------------------------
|SUB: DoTheFear - Fear target
|----------------------------------------------------------------------------
Sub DoTheFear
  /if ( ${Me.PctMana}>10 && ${Target.Type.Equal[NPC]} && ${Target.PctHPs}>24) {
      /call MyCast "FEAR_SPELL" FEAR_GEM
      /varset fightTimer 31s
  }
/return

Sub Event_fear
  DEBUG_2 Fear me!
  /call DoTheFear
/return

Sub Event_Miss1
  /echo misses
  /call AlwaysCheck nocast
  /if (${Macro.Return}) {
      /varset result CAST_ABORT
      /return
  }
  /if (${Me.Casting.ID}!=0) /return
  /delay 1
/call BackOffFromTarget 90
/return

Sub Event_Skinhit
  /echo skinhit
  /call AlwaysCheck nocast
  /if (${Macro.Return}) {
      /varset result CAST_ABORT
      /return
  }
  /if (${Me.Casting.ID}!=0) /return
/delay 1   
/call BackOffFromTarget 90
/return

Sub Event_ImHit
  /Echo i m hit
  /call AlwaysCheck nocast
  /if (${Macro.Return}) {
      /varset result CAST_ABORT
      /return
  }
  /if (${Me.Casting.ID}!=0) /return
  /delay 1
/call BackOffFromTarget 80
/return

Sub Event_Retry
  /delay 2
  /varset result CAST_RETRY
/return

Sub Event_Abort
  /varset result CAST_ABORT
/return

Sub Event_OutOfRange
  /varset result CAST_OUTOFRANGE
/return

Sub Event_NoLOS
  /varset result CAST_CANNOTSEE
/return

Sub Event_Standing
  /stand
  /varset result CAST_RETRY
/return

Sub Event_OOR
  /warp t
  /delay 2
  /loot
  /delay 3
  /delay 3s ${Corpse.Open}
  /doevents OOR
/return

Sub Event_Blocked
  /varset wayBlocked TRUE
/return

Sub Event_Zoned
  /varset weZoned TRUE
/call BackOffFromTarget 60
/return

Sub Event_PetAggro
  /target id ${Me.Pet.ID}
  /warp t
  /delay 1
  /assist
  /delay 1
/return

Sub Event_NoMount
  /varset mountFlag FALSE
/return

Sub Event_NoLich
  /varset mountFlag FALSE
  /dismount
/return

Sub Event_Stunned
:gdStunned
  /call AlwaysCheck nocast
  /if (${Macro.Return}) {
      /varset result CAST_ABORT
      /return
  }
  /delay 1
  /if (${Me.Stunned}) /goto :gdStunned

  /varset result CAST_RETRY
/return

Sub Event_Invited(heard,string who)
  /if (${who.Equal[MY_PARTNER]}) {
      /invite
  } else {
      /disband
  }
/return

|----------------------------------------------------------------------------
|SUB: Root Gone
|----------------------------------------------------------------------------
Sub Event_RootGone
  DEBUG_2 Root gone.
  /varset reroot TRUE
  /varset dangerFlag TRUE
/return

|----------------------------------------------------------------------------
|SUB: DOT1Gone
|----------------------------------------------------------------------------
Sub Event_DOT1Gone
  DEBUG_2 SPLURT_DOT gone.
  /varset redot1 TRUE
/return

|----------------------------------------------------------------------------
|SUB: DOT2Gone
|----------------------------------------------------------------------------
Sub Event_DOT2Gone
  DEBUG_2 HEAT_DOT gone.
  /varset redot2 TRUE
/return

|----------------------------------------------------------------------------
|SUB: DOT3Gone
|----------------------------------------------------------------------------
Sub Event_DOT3Gone
  DEBUG_2 DISEASE_DOT gone.
  /varset redot3 TRUE
/return

|----------------------------------------------------------------------------
|SUB: SKULLCAPGONE
|----------------------------------------------------------------------------
Sub Event_Skullcapgone
  DEBUG_2 LIFE_DOT gone.
  /varset reskull TRUE
/return

Sub Event_Snaregone
DEBUG_2 Root gone.
  /varset reroot TRUE
  /varset dangerFlag TRUE
/return

Sub Event_Exp
  /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]}
  /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]}
  /varset LDRExp ${Math.Calc[${Me.PctGroupLeaderExp}-${LDRExp}]}
  /echo EXP: ${Exper} (${Me.PctExp}%) - AAXP: ${AAExp} (${Me.PctAAExp}%) - LDRXP: ${LDRExp} (${Me.PctGroupLeaderExp})
  /popup ${Exper} (${Me.PctExp}%) - AAXP: ${AAExp} (${Me.PctAAExp}%) - LDRXP: ${LDRExp} (${Me.PctGroupLeaderExp})
  /varset Exper ${Me.PctExp}
  /varset AAExp ${Me.PctAAExp}
  /varset LDRExp ${Me.PctGroupLeaderExp}
/return

Sub Event_Exp2
  /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]}
  /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]}
  /varset LDRExp ${Math.Calc[${Me.PctGroupLeaderExp}-${LDRExp}]}
  /echo EXP: ${Exper} (${Me.PctExp}%) - AAXP: ${AAExp} (${Me.PctAAExp}%)
  /popup ${Exper} (${Me.PctExp}%) - AAXP: ${AAExp} (${Me.PctAAExp}%)
  /varset Exper ${Me.PctExp}
  /varset AAExp ${Me.PctAAExp}
  /varset LDRExp ${Me.PctGroupLeaderExp}
/return

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
 
pfft... i dont have my epic :)
although this seems a little "iffy" b/c i dont really want my main account to be banned hehe.. have you tried this ? and if so where did you find it most sucessful?
*looks like a lot of work put into it, very nice and thanks again (time to improve it if you dont mind :) )
 
get a bard :P i already made a macro that uses a shaman to help kill everything, it should be easy enough to transfer it to a necro since all it really does is waits till there are only a couple of mobs left on the bard before sending in the pet. The pet is automatically set to notaunt and just runs behind giving extra dps while the shaman sits there and leeches xp :)
If you still need a necro macro I can try and write one for you, just not too sure how well it would do since i don't have a necro to test it with.
 
Last edited:
Mantecore, I have been trying your Necrokite macro in the Forgotten Halls this afternoon, and it has a few bugs. Upon zoning in and starting the macro, it casts the buffs ok, detects that it needs to med, casts SoS and summons a Drogmor and meds OK. Then it acquires a target, but doesn't warp. It appears to be a syntax error with the warp command, but I can't find it. I did find a few "/warp t"'s which won't work, needs to be "/warp Target". Also, I found a few "/warp Y X Z" statements. They won't work either. Needs to be "/warp loc Y X Z". I changed those also, but no go. I still get the same usuage error. Can't test beyond this, so don't know about the rest of the macro.
 
There seem to be a few problems with some of the declares, remember you need to define whether its a local, inner, or outer variable every time you declare one.
If i had a necro i'd do some troubleshooting, but unfortunately i don't and i can't troubleshoot much without actually running the macro.
 
Damnit im having trouble getting for 1. - ReInstalling (already Compiled) MQ2, if you could throw me the exact link it would make wonders for me.
Also, my Bard is like 32 (from starting this at 30) And im not sure how to keep him lvling, where exactly to go. Since im on a pritty populated server, its not easy hehe...
Any suggestions on that? (i think im gona try and do DSP as others say, although i get a few adds that will not stay stuck on me, rather just run away after they go low health, so im open to suggestions *places that i dont need to use snare in the twist* for faster and better results :) )
 
well, first we're going to need to wait on word from the devs over in the mq2 department to check if any structs have changed, if not a new eqgame.h was already posted, but untill the devs check up on it i'm not going to compile or use mq2.
 
Looking for necro macros

Users who are viewing this thread

Back
Top