RootDot.mac - Shaman

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

icehouse33
orc pawn
orc pawn
Posts: 12
Joined: Mon Dec 15, 2003 8:34 am

RootDot.mac - Shaman

Post by icehouse33 » Sat Apr 24, 2004 4:27 am

Been using this for some time, note all the required spells, aa's and items.
This is NOT an AFK script, using AARoot requires that you remain involved with Mob postioning.

enjoy!

Code: Select all

|
| - rootdot.mac
|
| written by: icehouse33
| Version: 2.1.0
| date: 24 April 2004
| --MQData Ready--
|
| useage: once you have your mob targeted run the macro it should kill it with root and dots
|
| AA's used: VP3 and Canni5
|
| Spells Used: Malos, Malosinia, Malicious Decay, Quiescence, Petrifying Earth
|              Breath of Ultor, Bane, Blood of Saryrn, Cannibalize IV
|
| Items Used: Shaman Epic
|
| Spelllist1 has Malos and Malicious Decay
| Spelllist2 swaps Malos and Malicious Decay for Canni4 and Malosinia
|
| Notes: The delay (12 sec) before AARoot goes off gives me time to postion myself and face 
|        the direction I desire to PUSH the mob where I want.
|        Regarding Timers 10 = 1s, 60 = 1m

#event rootoff "Your Virulent Paralysis spell has worn off."
#event Resist "Your target resisted the " 
#event Fizzle "Your spell fizzles!"
#event NoLOS "You cannot see your target." 
#event Recover "You haven't recovered yet..." 
#event Recover "Spell recovery time not yet met." 
#event Slain "You have slain "
| #include turn.inc 

Sub Main
| perform checks to be sure we are ready
   /if (${String[${Target.Type}].NotEqual[NPC]}) {
      /echo You must select a NPC target!
      /beep
      /return
   }
   /if (${Me.PctMana}<87) {
      /echo Mana is below 87% please med more and try again
      /beep
      /return
   }
   /if (${Me.PctHPs}<85) {
      /echo HP are below 85% please heal more and try again
      /beep
      /return
   }
   /if (${Target.Distance}>199) {
      /echo you must be under 200 feet to start macro
      /beep
      /return
   }

| Setup 
   /zapvars
   /declare SpellList1 global
   /declare SpellList2 global
   /declare AA_Root global
   /declare AA_Canni global
   /declare SN_DDot global
   /declare SN_MDot global
   /declare SN_PDot global
   /declare SN_MRDebuff1 global
   /declare SN_MRDebuff2 global
   /declare SN_DRDebuff global
   /declare SN_HotHeal global
   /declare SN_Canni4 global
   /declare SN_Root global
   /declare IN_Epic global
   /declare RecastSpell global
   /declare MobID global
   /declare AAExp global

   /declare DDotTimer timer
   /declare MDotTimer timer
   /declare PDotTimer timer
   /declare AARootTimer timer
   /declare CanniAATimer timer
   /declare Canni4Timer timer
   /declare EpicTimer timer
   /declare HotHealTimer timer
   
   /declare SN_CurrentSpell global
   /declare iRandom global
   /declare AARootBeep global

   /varset SpellList1 "soloa"
   /varset SpellList2 "solob"
   /varset AA_Root 171
   /varset AA_Canni 47
   /varset SN_DDot "Breath of Ultor"
   /varset SN_MDot "Bane"
   /varset SN_PDot "Blood of Saryrn"
   /varset SN_MRDebuff1 "Malos"
   /varset SN_MRDebuff2 "Malosinia"
   /varset SN_DRDebuff "Malicious Decay"
   /varset SN_HotHeal "Quiescence"
   /varset SN_Canni4 "Cannibalize IV"
   /varset SN_Root "Petrifying Earth"
   /varset IN_Epic "Spear of Fate"
   /varset RecastSpell 0

|
| Timer References 
|   DDotTimer 156s
|   MDotTimer 30s
|   PDotTimer 42s
|   EpicTimer 84s
|   CanniAATimer 3m
|

   /varset AARootTimer 120s
   /varset CanniAATimer 90s
   /varset Canni4Timer 4s
   /varset HotHealTimer 24s

   /varset MobID $(Target.ID}
   /varset AAExp ${Me.AAExp}

| Check to see if VP is ready?
| Unknown if this can be checked.

   /if (${Me.Sitting}) { 
      /stand 
   } 

| Load SpellList1
   /if (!${Me.Gem[@SN_MRDebuff1]}) {
      /memspellset @SpellList1
   } else /if (!${Me.Gem[@SN_DRDebuff]}) { 
      /memspellset @SpellList1
      }
   }
:loadlist1
   /if (${Me.Sitting}) {
      /delay 1
      /goto :loadlist1
   }

| Mob must be in Range to start Macro correctly (less than 200)
| AARoot pushes mob direction I AM FACING about 30-40

| Pull Mob (MDecay - DR Reduced)
   /call CastSpell "@SN_DRDebuff"

| AARoot Mob (AARoot is Disease based)
   /alt activate "@AA_Root"
   /varset AARootTimer 2m
   /varset AARootBeep 0
   /call PauseFace

| Check Range
   /call CheckRange "68" "98"

| Debuff (Malos)
   /call CastSpell "@SN_MRDebuff1"

| Load SpellList2
   /memspellset @SpellList2
:loadlist2
   /if (${Me.Sitting}) {
      /delay 1
      /goto :loadlist2
   }

| Debuff (Malosinia)
   /call CastSpell "@SN_MRDebuff2"

   /varset DDotTimer 1s
   /varset MDotTimer 2s
   /varset PDotTimer 3s
   /varset EpicTimer 4s

:KillLoop
   /doevents
   /if (@AARootTimer<=140) {
      /if (@AARootBeep==0) {
         /beep
         /popup Reroot soon!
         /varset AARootBeep 1
      }
   } 
   /if (@AARootTimer<=1) {
      /if (${Target.PctHPs}<=4) {
         /call CastSpell "@SN_Root"
         /varset AARootTimer 24s
         /varset AARootBeep 0
         /goto :KillLoop
      }
      /call CheckMoving
      /alt activate "@AA_Root"
      /echo AARoot :: Root: @AARootTimer  Cann5: @CanniAATimer  Epic: @EpicTimer  D/M/P @DDotTimer @MDotTimer @PDotTimer
      /varset AARootTimer 2m
      /varset AARootBeep 0
      /call PauseFace
      /call CheckRange "68" "98"
   } else /if (@AARootTimer>120) {
      /if (@DDotTimer<=1) {
         /if (${Target.PctHPs}>=18) {
            /call CastSpell "@SN_DDot"
         }
         /varset DDotTimer 155s
         /goto :KillLoop
      }
      /if (@MDotTimer<=1) {
         /call CastSpell "@SN_MDot"
         /varset MDotTimer 29s
         /goto :KillLoop
      }
      /if (@PDotTimer<=1) {
         /if (${Target.PctHPs}>=8) {
            /call CastSpell "@SN_PDot"
         }
         /varset PDotTimer 41s
         /goto :KillLoop
      }
      /if (@EpicTimer<=1) {
         /call CheckMoving   
         /varset SN_CurrentSpell "@IN_Epic"
         /cast item "@IN_Epic"
         /echo EpicDot :: Root: @AARootTimer  Cann5: @CanniAATimer  Epic: @EpicTimer  D/M/P @DDotTimer @MDotTimer @PDotTimer
      :EpicWaitCast 
         /if (${Me.Casting.ID}) { 
            /delay 1 
            /goto :EpicWaitCast 
         } 
         /varset EpicTimer 78s
         /goto :KillLoop
      }
      /call CheckCanni
      /call CheckHealth
   }
   /if (${String[${Target.State}].Equal[DEAD]}) {
      /echo Mob Deaded.. gratz
      /beep
      /return
   }
   /goto :KillLoop
/return

| ------------------------------------------
Sub CheckMoving
:MovingLoop
   /delay 3
   /if (${Me.Moving}) { 
      /keypress up
      /keypress down
      /goto :MovingLoop
   }    
/return

| ------------------------------------------
Sub CheckHealth
   /if (@HotHealTimer<=1) {
      /if (${Me.PctHPs}<=66) {
         /echo Healing ...
         /target myself
         /call CastSpell "@SN_HotHeal"
         /varset HotHealTimer 24s
         /target id @MobID
      }
   }
/return

| ------------------------------------------
Sub CheckCanni
   /if (@CanniAATimer<=1) {
      /if (${Me.PctMana}<72) { 
         /if (${Me.PctHPs}>=70) { 
            /if (${Me.CurrentHPs}>2400) { 
               /call CheckMoving
               /alt activate "@AA_Canni" 
               /echo Canni5 :: Root: @AARootTimer  Cann5: @CanniAATimer  Epic: @EpicTimer  D/M/P @DDotTimer @MDotTimer @PDotTimer
               /delay 2
               /varset CanniAATimer 3m
               /varset Canni4Timer 3s 
               /return 
            } 
         } 
      } 
   } 
   /if (@Canni4Timer<=1) { 
      /if (${Me.PctMana}<92) { 
         /if (${Me.PctHPs}>=40) { 
            /call CastSpell "@SN_Canni4" 
         } 
      } 
   } 
/return 

| ------------------------------------------
Sub CheckRange(RangeMin,RangeMax)
:backuploop
   /doevents   
   /if (${Target.Distance}<@RangeMin) {
      /keypress down hold
      /goto :backuploop
   }
   /if (${Target.Distance}>=@RangeMin) {
       /keypress down
   }
:moveuploop
   /doevents
   /if (${Target.Distance}>@RangeMax) {
      /keypress up hold
      /goto :moveuploop
   }
   /if (${Target.Distance}<=@RangeMax) {
      /keypress up
   }   
   /delay 1s
/return

| ------------------------------------------
Sub CastSpell(SpellName)
   /varset SN_CurrentSpell "@SpellName"
:castloop
   /doevents
   /call CheckMoving  
   /if (!${Me.SpellReady["@SpellName"]}) /goto :castloop
   /delay 5
   /varset RecastSpell 0
   /echo @SpellName :: Root: @AARootTimer  Cann5: @CanniAATimer  Epic: @EpicTimer  D/M/P @DDotTimer @MDotTimer @PDotTimer
   /cast "@SpellName"
:WaitCast 
   /if (${Me.Casting.ID}) { 
      /delay 1 
      /goto :WaitCast 
   } 
   /doevents Fizzle
   /doevents Recover
   /doevents Resist
   /if (@RecastSpell==1) /goto :castloop 
   /varset RecastSpell 0
   /varset Canni4Timer 3s
/return

| ------------------------------------------
Sub PauseFace
|  purpose is to make facing mob appear more human by making the pauses a little random
|  now uses turn.inc 
   /declare iDelayA local
   /declare iDelayB local

   /varset iDelayA ${Math.Calc[(${Math.Rand[3]})+3]}
   /varset iDelayB ${Math.Calc[(${Math.Rand[2]})+1]} 
   /varset iDelayB ${Math.Calc[(7-@iDelayA)-@iDelayB]} 

   /delay ${Math.Calc[@iDelayA*10]} 
|   /call turn <--- gotta fix turn.inc for MQData
   /face
   /delay ${Math.Calc[@iDelayB*10]} 
/return

| ------------------------------------------
Sub Event_Resist
   /if (${String["@SN_CurrentSpell"].Equal["@SN_MDot"]}) {
      /varset MDotTimer 22s
   }
   /if (${String["@SN_CurrentSpell"].Equal["@SN_DDot"]}) {
      /varset DDotTimer 6s
   }   
   /if (${String["@SN_CurrentSpell"].Equal["@SN_PDot"]}) {
      /varset PDotTimer 6s
   }
   /if (${String["@SN_CurrentSpell"].Equal["@SN_MRDebuff2"]}) {
      /varset RecastSpell 1
   }
   /if (${String["@SN_CurrentSpell"].Equal["@IN_Epic"]}) {
      /varset EpicTimer 6s
   }
   /if (${String["@SN_CurrentSpell"].Equal["@SN_Root"]}) {
      /beep
      /varset RecastSpell 1
   }
/return

| ------------------------------------------
Sub Event_rootoff
|           still need code if root drops
   /beep
   /echo Root is off!
/return

| ------------------------------------------
Sub Event_Fizzle
   /delay 1 
   /varset RecastSpell 1 
/return

| ------------------------------------------
Sub Event_NoLOS
   /echo Can not See Target!!!!!
   /beep
|   /call turn
   /face
   /call CheckRange "62" "74"
/return

| ------------------------------------------
Sub Event_Recover
   /delay 1
   /echo Recover Event Triggered.....
   /varset RecastSpell 1
/return

| ------------------------------------------
Sub Event_Slain
   /varset AAExp ${Math.Calc[${Me.AAExp}-@AAExp]} 
   /echo Mob Killed .. gratz!  AAExp earned: @AAExp
   /endmac
/return
Last edited by icehouse33 on Sun Apr 25, 2004 10:01 pm, edited 1 time in total.

Preocts
a snow griffon
a snow griffon
Posts: 312
Joined: Thu Jan 29, 2004 1:02 pm

Post by Preocts » Sat Apr 24, 2004 7:21 am

Flexable, covers most situations, and informative. I like it. :)