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

help with a macro (1 Viewer)

VillageIdiot

Member
Joined
Dec 14, 2006
RedCents
291¢
I Start this Macro and all it does is cast the call of bones spell and buff my pet. Then nothing. It just sits there. I am a total newb with macros and no idea why this doesn't work. Any help would be very much appreciated.

Thanks




Rich (BB code):
Necrokite.mac 
|By: Terramantian 
| 
|Simple auto-pulling and kiting macro for a necromancer. 


#turbo 
#include spell_routines.inc 
#include move.inc 

#define PetSpell "Malignant Dead" 
#define PetHaste "Augment Death" 
#define SnareDOT "Dooming Darkness" 
#define DamageDOT "Chilling Embrace" 
#define Lifetap "Drain Spirit" 
#define LichSpell "Call of Bones" 

#event Hit "#*#YOU for#*#" 

Sub Main 
   /declare HomeX int outer ${Me.X} 
   /declare HomeY int outer ${Me.Y} 
   /declare PetHastT timer outer 
   /declare SnareT timer outer 
   /declare DamageT timer outer 
   /declare MOB int outer 
   /declare EndX int outer 
   /declare EndY int outer 
   /declare PetAttacking bool outer 

   /if ((${String[${Me.Heading}].Equal[N]}) || (${String[${Me.Heading}].Equal[NNW]}) || (${String[${Me.Heading}].Equal[NNE]})) { 
      /varset EndY ${Math.Calc[${Me.Y} + 350]} 
      /varset EndX ${Me.X} 
   } else /if (${String[${Me.Heading}].Equal[NE]}) { 
      /varset EndY ${Math.Calc[${Me.Y} + 240]} 
      /varset EndX ${Math.Calc[${Me.X} - 240]} 
   } else /if ((${String[${Me.Heading}].Equal[E]}) || (${String[${Me.Heading}].Equal[ENE]}) || (${String[${Me.Heading}].Equal[ESE]})) { 
      /varset EndY ${Me.Y} 
      /varset EndX ${Math.Calc[${Me.X} - 350]} 
   } else /if (${String[${Me.Heading}].Equal[SE]}) { 
      /varset EndY ${Math.Calc[${Me.Y} - 240]} 
      /varset EndX ${Math.Calc[${Me.X} - 240]} 
   } else /if ((${String[${Me.Heading}].Equal}) || (${String[${Me.Heading}].Equal[SSW]}) || (${String[${Me.Heading}].Equal[SSE]})) { 
      /varset EndY ${Math.Calc[${Me.Y} - 350]} 
      /varset EndX ${Me.X} 
   } else /if (${String[${Me.Heading}].Equal[SW]}) { 
      /varset EndY ${Math.Calc[${Me.Y} - 240]} 
      /varset EndX ${Math.Calc[${Me.X} + 240]} 
   } else /if ((${String[${Me.Heading}].Equal[W]}) || (${String[${Me.Heading}].Equal[WNW]}) || (${String[${Me.Heading}].Equal[WSW]})){ 
      /varset EndY ${Me.Y} 
      /varset EndX ${Math.Calc[${Me.X} + 350]} 
   } else /if (${String[${Me.Heading}].Equal[NW]}) { 
      /varset EndY ${Math.Calc[${Me.Y} - 240]} 
      /varset EndX ${Math.Calc[${Me.X} + 240]} 
   }      

   /call Initialize 

   :Loop 
    
   /call PullMob 
   /call KiteMob 
   /varset PetAttacking 0 
|   /call LootMob 
   /call Downtime 
   /goto :Loop 
    
/return 

Sub Initialize 
   /if (!${Me.Pet.ID}) /call Cast "PetSpell" 
   /pet guard here 
   /pet taunt 
   /call Cast "PetHaste" 
   /varset PetHastT ${Math.Calc[${Spell[PetHaste].Duration} * 6]}s 
   /call Cast "LichSpell" 
   :MedCheck 
   /if (${Me.PctMana} < 70) { 
      /if (!${Me.Sitting}) /sit 
      /delay 1m (${Me.PctMana} > 80) 
      /goto :MedCheck 
   } 
/return 


Sub PullMob 
   :PullBegin 

   /doevents 
   /varset MOB ${Spawn[nopcnear 400 npc range ${Math.Calc[${Me.Level} * .75]} ${Me.Level} radius 1000].ID} 
   :TarLoop 
   /if ((${Spawn[id ${MOB}].PctHPs} < 100) || (!${String[${Spawn[${MOB}].Type}].Compare["Pet"]})) {    
      /varset MOB ${Spawn[nopcnear 400 npc id ${MOB} range ${Math.Calc[${Me.Level} * .75]} ${Me.Level} radius 1000 next].ID}  
      /goto :TarLoop 
   } 
   /call MoveToSpawn ${MOB} 120 
   /target id ${MOB} 
   /assist 
   /delay 1s 
   /doevents 
   /if ((${Target.ID} != ${MOB}) && (${Target.ID} != ${Me.ID})) { 
      /call MoveToLoc ${HomeY} ${HomeX} 
      /goto :PullBegin 
   } 
   /if (${Target.PctHPs} < 100) /goto :PullBegin 

   /doevents 

   /call Cast "SnareDOT" 
   /if (!${Macro.Return.Equal[CAST_SUCCESS]}) { 
      /call Cast "Feign Death" 
      /delay 3m (${Target.Distance} > 100) 
      /call MoveToLoc ${HomeY} ${HomeX} 
      /goto :PullBegin 
   } 
   /varset SnareT ${Math.Calc[${Spell[SnareDOT].Duration} * 6]}s 
   /call MoveToLocF ${HomeY} ${HomeX} 150 
/return 

Sub KiteMob 
  

   :KiteLoop 
   /doevents 
   /call MoveToLocF ${EndY} ${EndX} 200 
   /if (!${Target.ID}) /return 
   /doevents 
   /if (${SnareT} <= 200) { 
      /call Cast "SnareDOT" 6s 
      /if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset SnareT ${Math.Calc[${Spell[SnareDOT].Duration} * 6]}s 
   } 
   /if (${SnareT} == 0) { 
      /echo Snare DOT is not on... FDing and pausing 
      /call Cast "Feign Death" 10s 
      /if (${Me.Buff[LichSpell].ID}) /notify BuffWindow Buff${Int[${Math.Calc[${Me.Buff[LichSpell].ID}-1]}]} leftmouseup 
      /mqpause 
   } 
   /if ((${Target.Distance} > ${Math.Calc[${Target.Speed} / 4 * ${Spell[Lifetap].MyCastTime}]}) && (${Me.PctHPs} < 80)) { 
      /call Cast "Lifetap" 
   } 
   /if ((${Target.Distance} > ${Math.Calc[${Target.Speed} / 4 * ${Spell[DamageDOT].MyCastTime}]}) && (${DamageT} <= 150)) { 
      /call Cast "DamageDOT" 
      /if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset DamageT ${Math.Calc[${Spell[DamageDOT].Duration}* 6]}s 
   } 
   /if ((!${PetAttacking}) && (${Target.PctHPs} < 50)) { 
      /pet attack 
      /varset PetAttacking 1 
   } 
   /delay 10s (${Target.Distance} <= 50) 
   /face fast nolook 
   /if (!${Target.ID}) /return 

   /keypress strafe_right hold 
   /delay 20 
   /keypress strafe_right 
   /call MoveToLocF ${HomeY} ${HomeX} 200 
   /if (!${Target.ID}) /return 
   /doevents 
   /if (${SnareT} <= 200) { 
      /call Cast "SnareDOT" 12s 
      /if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset SnareT ${Math.Calc[${Spell[SnareDOT].Duration} * 6]}s 
   } 
   /if (${SnareT} == 0) { 
      /echo Snare DOT is not on... FDing and pausing 
      /call Cast "Feign Death" 10s 
      /if (${Me.Buff[LichSpell].ID}) /notify BuffWindow Buff${Int[${Math.Calc[${Me.Buff[LichSpell].ID}-1]}]} leftmouseup 
      /mqpause 
   } 
   /if ((${Target.Distance} > ${Math.Calc[${Target.Speed} / 4 * ${Spell[Lifetap].MyCastTime}]}) && (${Me.PctHPs} < 80)) { 
      /call Cast "Lifetap" 
   } 
   /if ((${Target.Distance} > ${Math.Calc[${Target.Speed} / 4 * ${Spell[DamageDOT].MyCastTime}]}) && (${DamageT} <= 150)) { 
      /call Cast "DamageDOT" 
      /if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset DamageT ${Math.Calc[${Spell[DamageDOT].Duration}* 6]}s 
   } 
   /if ((!${PetAttacking}) && (${Target.PctHPs} < 50)) { 
      /pet attack 
      /varset PetAttacking 1 
   } 
   /delay 10s (${Target.Distance} <= 50) 
   /face fast nolook 
   /if (!${Target.ID}) /return 

   /keypress strafe_right hold 
   /delay 15 
   /keypress strafe_right 
   /if (!${Target.ID}) /return 
   /doevents 
   /goto :KiteLoop 
/return 


Sub Downtime 

   /call MoveToLoc ${HomeY} ${HomeX} 
   /if (!${Me.Pet.ID}) { 
      /call Cast "PetSpell" 
      /pet guard here 
      /pet taunt 
   } 
   /call Cast "LichSpell" 
   :MedCheck 
   /if (${Me.PctHPs} < 70) { 
      /if (${Me.Buff[LichSpell].ID}) /notify BuffWindow Buff${Int[${Math.Calc[${Me.Buff[LichSpell].ID}-1]}]} leftmouseup 
   } 
   /if (${Me.PctMana} < 70) { 
      /if (!${Me.Sitting}) /sit 
      /doevents 
      /delay 300 (${Me.PctMana} > 80) 
      /goto :MedCheck 
   } 
   /call Cast "LichSpell" 
   /if (${PetHastT} < 300) { 
      /call Cast "PetHaste" 
      /varset PetHastT ${Math.Calc[${Spell[PetHaste].Duration} * 6]}s 
   } 
   /doevents 

/return 


| Sub MoveToLoc   F                                 | 
|---------------------------------------------------| 
|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            | 
|                                                   | 
|                                                   | 
|F is for Follow. designed for pulling or kiting,   | 
|If the mob's distance exceeds Distance, it will 
|pause and wait for the mob to catch up. 
| 
|SYNTAX: /call MoveToLocF Y X Distance              | 


Sub MoveToLocF(MoveToY, MoveToX, FDistance) 

    /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 
        } 
    } 
    /if (${Target.Distance} > ${FDistance}) { 
        /keypress forward 
        /delay 5s (${Target.Distance} < ${Math.Calc[${FDistance} * .75]}) 
        /if (${running}) /keypress forward hold 
    } 
    /if (${Me.PctHPs} < 30) { 
        /echo Low health on pull, FDING 
        /call Cast "Feign Death" 
        /if (${Me.Buff[LichSpell].ID}) /notify BuffWindow Buff${Int[${Math.Calc[${Me.Buff[LichSpell].ID}-1]}]} leftmouseup 
        /mqpause 
    } 
    /goto :moveToLocation 
/return 

Sub Event_Hit 

  /if (!${PetAttacking}) /pet back off 
  /if (${Me.PctHPs} < 30) { 
     /echo Low health, FDING 
     /call Cast "Feign Death" 
     /if (${Me.Buff[LichSpell].ID}) /notify BuffWindow Buff${Int[${Math.Calc[${Me.Buff[LichSpell].ID}-1]}]} leftmouseup 
     /mqpause 
  } 
/return 
 
Well, at a first glance, you aren't using the variables that you defined up top.
Rich (BB code):
Sub Initialize 
   /if (!${Me.Pet.ID}) /call Cast "${PetSpell}" 
   /pet guard here 
   /pet taunt 
   /call Cast "${PetHaste}" 
   /varset PetHastT ${Math.Calc[${Spell[${PetHaste}].Duration} * 6]}s 
   /call Cast "${LichSpell}" 
   :MedCheck 
   /if (${Me.PctMana} < 70) { 
      /if (!${Me.Sitting}) /sit 
      /delay 1m (${Me.PctMana} > 80) 
      /goto :MedCheck 
   } 
/return

Also, you use the ${String} TLO way way WAY too much. It was removed from the source by the MQ2 devs for exactly that reason.

For instance, look:
${Me.Heading.ShortName.Equal[N]} works more efficiently than ${Stringqso[fvbsovbs}

The same applies to !${String[${Spawn[${MOB}].Type}].Compare["Pet"]}

All of that said, you need to go back to where ever you got that macro and ask the original author for help. That is an oooold macro, to use so many strings, etc.
 
help with a macro

Users who are viewing this thread

Back
Top