Add /if to damage shield piece

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

Moderator: MacroQuest Developers

Still_a_newb
orc pawn
orc pawn
Posts: 27
Joined: Sun Apr 25, 2004 9:36 pm

Add /if to damage shield piece

Post by Still_a_newb » Sun May 23, 2004 1:41 am

Something to add to my damage shield timing cast

A /if so that if the MA is not a ranger it will continue to the casting....

Code: Select all

/if (${DSTimer}<=0) {
  /delay 5
  /target ${assist}
  /delay 5
  /if (${Target.Distance}<=149) {
    /echo Casting Damage Shield on %t
    /if (${String[${Me.State}].Equal[SIT]}) {
      /stand
      /delay 1s
    }
    /call cast "Flameshield of Ro"
    /doevents
    /varset DSTimer 7m
    /assist ${assist}
  }
}

Somthing like....

Code: Select all

/if (!${Target.Class}.Equal[Ranger])
OR???

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Sun May 23, 2004 3:16 am

I'd do something like this:

Code: Select all

/if (!${DSTimer} && ${Target.Distance}<=149 && ${Target.Class.Name.NotEqual[Ranger]}) {
  /target ${assist}
  /echo Casting Damage Shield on ${Target.CleanName}
  /if (${Me.Sitting}) /stand
  /call cast "Flameshield of Ro"
  /varset DSTimer 7m
  /assist ${assist}
  }
  /doevents

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sun May 23, 2004 4:32 am

Code: Select all

/if (!${DSTimer} && ${Target.Distance}<=149 && ${Target.Class.Name.NotEqual[Ranger]}) {
is just fine as

Code: Select all

/if (!${DSTimer} && ${Target.Distance}<=149 && ${Target.Class.NotEqual[Ranger]}) {
since the To String of the class type is the same as Name