Public Macros I Learned Varset Timers (simple caster mac)
Reply
I Learned Varset Timers (simple caster mac)
#Credit goes to Fantum409 for I used some code from his cleric mac that I use daily:)

#Credit goes to Dreos for helping me with the|| ${Sender.Right[-2].Left[-1]}||
part of my chat Sub and helping me understand varset timers

#Credit also goes to anyone who has answered a question of mine, or who will in the future:)

This mac really helped me figure out varset timers and how to apply them. It's simple yes but I have just started my boxing career as well as my obsessive desire to learn the macro language. I hope this will help someone just starting out like I am and though I don't know much, I will try to help if I can.

Macro
More +


#turbo 40

#Chat Chat
#Chat Tell

#event ImDead "You have been slain by#*#"
#event Zoned "LOADING, PLEASE WAIT..."


Sub Main
/declare mychannel string outer group
/declare OrbWait timer outer 0m
/declare LowMana timer outer 0m
/declare ReadyOrb timer outer 0m


   /echo MageLoop Active
   
    /join ${mychannel}
:mainloop

 /if (${Me.PctMana}<=30) /call ManaCheck
 
 /if (${Me.PctMana}<=10) /call ManaRefill
   
 /if ( ${Me.Pet.ID} ) /call PetBuff

 /if ( ${OrbWait}==0 ) /call ReadyO

   /call CheckEvents
   /delay 5
   /goto :mainloop
/return

Sub PetBuff

 /if ( !${Me.PetBuff[Elemental Fury]} ) /Casting "Elemental Fury"

/return  
   

Sub CheckEvents
 
   /doevents
   /doevents flush
/return

 

Sub Event_Chat(string ChatType,string Sender,string ChatText)
 /varset Sender ${Sender.Right[-2].Left[-1]}
   /if ((!${ChatType.Equal[${mychannel}]})&&(!${ChatType.Equal[TELL]})) /return
   /if (!${Spawn[${Sender}].ID}) {
      /g ${Sender} is not in the zone
     /return
    }
   
    /if (${ChatText.Equal[nuke]}) {
      /if (${Me.PctMana}<20) {
     /g Gemowi Mana ${Me.PctMana}%, holding on nukes!
      } else {
         /assist ${Sender}
         /delay 5
         /if (${Target.Type.NotEqual[NPC]}) {
            /assist ${Sender}
            /delay 5 ${Target.Type.Equal[NPC]}
         }
         /if (${Target.Type.Equal[NPC]})  {
            /if (${Me.SpellReady[Ancient: Nova Strike]}) {
                /g Casting Ancient: Nova Strike on %T
               /Casting "Ancient: Nova Strike" -recast|3
           } else  {/g wrong target (${Target.Type}) }
         }
       }
      }
   /return
   
Sub ManaRefill
   :oomwait
   /call CheckEvents
   /If ( ${Me.PctMana}<=10 && ${OrbWait}==0 ) {
      /g casting Orb o spirits...
      /Casting "Orb of Spirits" Ammo 15s
      /varset OrbWait 5m      
   }
   
   /if (${Me.PctMana}<=8) /goto :oomwait
/return    

Sub ManaCheck
  /if ( ${Me.PctMana}<=30 && ${LowMana}==0 ) {
    /g MAGE mana is at ${Me.PctMana}%
    /varset LowMana 30s
  }
/return

Sub ReadyO

/if ( ${OrbWait}==0 && ${ReadyOrb}==0) {
    /g MAGE Orb of Spirits is Ready  
    /varset ReadyOrb 5m
  }
/return  




Sub Event_ImDead
    /echo ENDING MACRO. WE DIED!
    /endmacro
/return

Sub Event_Zoned
    /echo ENDING MACRO. We Zoned.
    /endmacro
/return

_________________
I am Hapu
Sat Jan 16, 2016 9:06 am
Public Macros I Learned Varset Timers (simple caster mac)
Reply