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

Target and attack. Question on code (1 Viewer)

letmein

New member
Joined
Aug 10, 2005
RedCents
Hey guys, can someone alittle more experienced with the coding take a look at this event?

I want to put a necro in the DZ with my bard.
Necro will run lootwhore, and I want to add this to my current lootwhore macro.

Essentially, what I want it to do is assist the bard, check to see if the mob's hitpoints are below 80% (so pet doesn't steal aggro from bard) then send in pet if below 80%

Next, I want to cast a DoT ONCE only on the mob when he hits 50% life.

I already know the check will keep casting the dot everytime it checks and the mob is below 50%. I don't know the code to say, only cast it once.

Thanks for the help guys.

Sub TargetAtk
/assist TOONNAME
/if (${Target.PctHPs}<80
/pet attack
/if (${Target.PctHPs}<60
| DOT Mob
/cast 1

/return
 
Set a bool flag to true when you cast the dot. Just make sure to reset it to false every time you acquire a new target.

Rich (BB code):
/if ((${Target.PctHPs}<60)&&!${Dotted}) {
   /cast DOT
   /varset Dotted TRUE
}

-CodeCaster
 
Codecaster,

Thanks for the help. So the following:

Rich (BB code):
 Sub TargetAtk
 /assist TOONNAME
 /if ((${Target.PctHPs}<80)&&!${PetAttacking}) {
   /pet attack
   /varset PetAttacking TRUE
}
 /if ((${Target.PctHPs}<60)&&!${Dotted}) {
   /cast 1
   /varset Dotted TRUE
}
 /return

Should assist bard, check to see if bards target is below 80%
If below 80%, send pet to attack. But only once. Meaning, the next check it won't /pet attack again correct? And the same thing with the dot portion?
Will check to see if the mob is below 60%, if it is cast a dot. But only once?

Thanks again.
 
Rich (BB code):
  Sub TargetAtk
 /assist TOONNAME
 /if (${Target.PctHPs}<80 && !${PetAttacking}) {
   /pet attack
   /varset PetAttacking TRUE
 } else {
 /if (${turnedon} && ${Target.PctHPs}>80) {
   /varset PetAttacking FALSE
   }
 }
 /if (${Target.PctHPs}<60 && !${Dotted}) {
   /cast 1
   /varset Dotted TRUE
 } else {
 /if (${turnedon} && ${Target.PctHPs}>60) {
   /varset Dotted FALSE
   }
}
 /return

How's this look guys? Also, How do I only get the DOT event to occur once? Seems to me even with this, the next check and he will cast again because of the first if statement. Is there a "run once" type of command?

Thanks again for all your help.
 
Target and attack. Question on code

Users who are viewing this thread

Back
Top