Page 1 of 1

Need help with my macro please

Posted: Thu Apr 29, 2004 10:51 pm
by Still_a_newb
After new patch, my macro has seized to function, can somone help convert it?

Code: Select all

#Event exp "You gain party experience!!"
#Event malosuccess "looks very uncomfortable."
#Event maloresist "Your target resisted the Malosinia spell."
#Event cast "You begin casting"
#Event rageon "has become ENRAGED"
#Event rageoff "is no longer enraged"
#Event burnout "Your pet's Burnout V spell has worn off."
#Event nuke1 "Nuke 1"
#event nuke2 "Nuke 2"

Sub Main(assist)
/declare assist global
/echo Assisting @assist

/declare sentpet global
/varset sentpet 0

/declare MaloCast global
/varset MaloCast 0

/declare BoltCast global
/varset BoltCast 0

/declare BoltCastB global
/varset BoltCastB 0

/declare DSTimer timer
/varset DSTimer 0

/declare BurnOut global
/varset BurnOut 0

/declare NukeAmount global
/varset NukeAmount 1

:MainLoop
/assist @assist
/call BuffCheck
/newif (${String[@DSTimer].Equal[0]}) {
  /delay 2
  /target @assist
  /delay 2
  /newif (${Target.Distance}<=149) {
    /echo Casting Damage Shield on %t
    /newif (${String[${Me.State}].Equal[SIT]}) {
      /stand
      /delay 1s
    }
    /cast "Flameshield of Ro"
    /delay 5
    /doevents
    /varset DSTimer 7m
    /assist @assist
  }
}
/newif (${String[@BurnOut].Equal[0]}) {
  /echo Casting Burnout V
  /newif (${String[${Me.State}].Equal[SIT]}) {
    /stand
    /delay 1s
  }
  /delay 3s
  /cast "Burnout V"
  /delay 5
  /doevents
  /varset BurnOut 1
}
/call ManaCheck
/newif (${Target.ID} && ${Target.PctHPs}<=96) {
  /newif (${String[${Target.Type}].Equal[NPC]}) {
    /newif (@sentpet==0) {
      /pet attack
      /varset sentpet 1
      /echo Pet Sent
    }
      /newif (@MaloCast==0) {
        /newif (${String[${Me.State}].Equal[SIT]}) {
          /stand
          /delay 1s
        }
        /cast "Malosinia"
        /varset MaloCast 1
        /echo Casting ${Me.Casting} on the bizatch!!!
        /doevents
      }
    }
  }
  /newif (${Target.PctHPs}<=75 && ${Target.PctHPs}>=50 && ${String[${Target.Type}].Equal[NPC]}) {
    /newif (@BoltCast==0) {
      /newif (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /cast "Firebolt of Tallon"
      /varset BoltCast 1
      /echo Nuking the bizatch with ${Me.Casting} !!!
      /doevents
    }
  }
  
  /newif (${Target.PctHPs}<=40 && ${Target.PctHPs}>=20 && ${String[@NukeAmount].Equal[2]}) {
    /newif (@BoltCastB==0) {
      /newif (${String[${Me.State}].Equal[SIT]}) {
        /stand
        /delay 1s
      }
      /cast "Firebolt of Tallon"
      /varset BoltCastB 1
      /echo Nuking the bizatch with ${Me.Casting} for the second time!!!
      /doevents
    }
  }
  
}
/doevents
/goto :MainLoop
/return

Sub Event_exp
  /varset sentpet 0
  /varset MaloCast 0
  /varset BoltCast 0
  /varset BoltCastB 0
  /echo That bizatch is dead!!! Resetting Variables!!
/return

Sub Event_malosuccess
  /gsay %t feels Malosinia.
/return

Sub Event_maloresist
  /varset MaloCast 0
  /echo Malosinia resisted, trying again
  /delay 2s
  /delay 3
/return

Sub ManaCheck
  /newif (${Me.PctMana}>=20) {
    /return
  }
/echo Only sending pet untill I get 80 mana
/gsay LoM...sitting through a few.
:NoManaLoop
/newif (${Me.PctMana}>=80) {
  /return
}
/assist @assist
/newif (${Target.ID} && ${Target.PctHPs}<=96) {
  /newif (${String[${Target.Type}].Equal[NPC]}) {
    /newif (@sentpet==0) {
      /pet attack
      /varset sentpet 1
      /echo Pet Sent
    }
  }
}
/doevents
/goto :NoManaLoop
/return

Sub Event_cast
  :CastWait
  /newif (!${String[${Me.Casting}].Equal[NULL]}) {
    /goto :CastWait
  }
  /delay 5
  /sit
  /delay 2s
/return

Sub Event_rageon
  /echo %t is enraged. Backing pet off.
  /pet back off
/return

Sub Event_rageoff
  /doevents flush
  /echo %t is no longer enraged. Sending pet.
  /pet attack
/return

Sub BuffCheck
  /newif (!${Me.Buff[Elemental Draw Recourse].ID}) {
    /echo Casting Elemental Draw
    /cast "Elemental Draw"
    /delay 5
    /doevents
  }
  /newif (!${Me.Buff[Shield of Maelin].ID}) {
    /echo Casting Shield of Maelin
    /cast "Shield of Maelin"
    /delay 5
    /doevents
  }
  /newif (!${Me.Buff[Xegony's Phantasmal Guard].ID}) {
    /echo Casting Xegony's Phantasmal Guard
    /cast "Xegony's Phantasmal Guard"
    /delay 5
    /doevents
  }
/return

Sub Event_burnout
  /echo Casting Burnout V
  /newif (${String[${Me.State}].Equal[SIT]}) {
    /stand
    /delay 1s
  }
  /cast "Burnout V"
  /doevents
/return

Sub Event_nuke1
  /varset NukeAmount 1
  /echo Nuking Once Per Fight
/return

Sub Event_Nuke2
  /varset NukeAmount 2
  /echo Nuking Twice Per Fight
/return

Posted: Thu Apr 29, 2004 11:08 pm
by s16z
All your /newif need to become /if.
You don't need to convert Target.Type or Me.State to a string, it is a string.
Anything that is @xxx needs to become ${xxx}.
Change all the 'global' to 'outer'.
Don't conver Me.Casting to a string, just check us it as is (${Me.Casting}) means you are casting, (!${Me.Casting}) means you aren't casting.

Posted: Thu Apr 29, 2004 11:12 pm
by Still_a_newb
thanks