Help with Macro

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

Longstone
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sun Oct 10, 2004 3:06 pm

Help with Macro

Post by Longstone » Wed Dec 08, 2004 3:07 pm

I'm using gonemental21's version of the Beastlord Assist Macro. The problem I'm having is when I try to slow, or nuke if my max or min distance is triggered I move, rather I'm casting or not. Obviously that's a bad thing. I've been trying to modify the code so that:

a) I'll only nuke or slow while in combat
b) while casting won't move even if my min/max distance is triggered.

Having no background in coding I was refering to his "Healthcheck" portion of the macro:

Code: Select all

Sub Healthcheck
   /if (!${DoHeal}) /return
   /if (${Me.Casting.ID}) /return
   /if (${Me.Moving}) /return
   /if (${Me.PctHPs}<=90) {
      /if (${Me.Combat}) {
         /if (!${Target.ID}) {
            /delay 5s
            /cast "${HealThing}"
         }
      }
   }
/return
Since I don't move while I'm healing myself I figured the answer has to be there.

This is the current macro.

Nuke:

Code: Select all

Sub Nuke
   /if (${Me.PctMana} > ${Nuketill}) {
      /Call Cast "Frost Spear" gem7
      /delay 15
      } else {
      /return
      }
/return
Slow:

Code: Select all

:Slow_Loop

   /if (${MobSlowed}== TRUE) /return   
   /if (${Target.PctHPs}<=${CombatAt}) {
      /if (${Me.CurrentMana}<${Spell[${SpellSlow}].Mana}) {
         /gsay Shid ! I don't have mana to Slow %T
      } else {
         /call Cast ${SpellSlow} gem1 6s
         /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Slow_Loop
         /if (${Macro.Return.Equal["CAST_IMMUNE"]}) {
            /gsay *** %T is IMMUNE to my slow !
         
            /varset MobSlowed TRUE
         }
         /if (${Macro.Return.Equal["CAST_RESISTED"]}) {
            /if (!${FastSlow}) {
               /gsay *** %T RESISTED slow ! Trying again asap
                /goto :Slow_Loop
             }
            /varset MobSlowed TRUE
          }
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
            /gsay *** %T is SLOWED
            /varset MobSlowed TRUE
          }

      }
   }
/return
Thanks for the help.

JP5
a lesser mummy
a lesser mummy
Posts: 70
Joined: Tue Jul 06, 2004 10:32 pm

Post by JP5 » Wed Dec 08, 2004 3:37 pm

Code: Select all

Sub Nuke 
   /if (${Me.PctMana} > ${Nuketill}) { 
      /Call Cast "Frost Spear" gem7 
      /delay 15 
      } else { 
      /return 
      } 
/return

Code: Select all

|Alteration
Sub Nuke
/if (${Me.PctMana}<${Nuketill} || ${Me.Moving}) /return

/call cast "Frost Spear" gem7
/delay 15
/return

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Dec 08, 2004 3:41 pm

Code: Select all

:Slow_Loop 

   /if (${MobSlowed}== TRUE) /return    
   /if (!${Me.Combat}) /return
   /if (${Me.Moving}) /return
   /if (${Target.PctHPs}<=${CombatAt}) { 
      /if (${Me.CurrentMana}<${Spell[${SpellSlow}].Mana}) { 
         /gsay Shid ! I don't have mana to Slow %T 
      } else { 
         /call Cast ${SpellSlow} gem1 6s 
         /if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Slow_Loop 
         /if (${Macro.Return.Equal["CAST_IMMUNE"]}) { 
            /gsay *** %T is IMMUNE to my slow ! 
          
            /varset MobSlowed TRUE 
         } 
         /if (${Macro.Return.Equal["CAST_RESISTED"]}) { 
            /if (!${FastSlow}) { 
               /gsay *** %T RESISTED slow ! Trying again asap 
                /goto :Slow_Loop 
             } 
            /varset MobSlowed TRUE 
          } 
         /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
            /gsay *** %T is SLOWED 
            /varset MobSlowed TRUE 
          } 

      } 
   } 
/return
My own attack spell code . . .

Code: Select all

Sub Attack_Spells
  /if (${Me.Moving}) /return
  /if (${Me.Casting.ID}) /return
  /if (${Me.PctMana}<15) /return 
  /if (${Target.PctHPs}>90) /return
  /if (${Target.PctHPs}<10) /return
  /if (${Me.Gem[Aura of Pain]}>0 && ${Me.Combat}) {
    /call cast "Aura of Pain"
  }
/return
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

Longstone
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sun Oct 10, 2004 3:06 pm

Post by Longstone » Wed Dec 08, 2004 5:16 pm

Thank you Both