hi guys, need help on Chrotation macro

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

mauroxx
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 31, 2005 5:23 am

hi guys, need help on Chrotation macro

Post by mauroxx » Mon Jan 31, 2005 5:36 am

Hello all, since i always box a cleric on raids i d need a really simple macro for Ch rotation + quick heal.

I have cecked a lot of autocleric, AFcleric, generalbot etc.... but i need way simpified version.... been trying to compile it myself but i always get ton of errors, any help is appreciated.

This is what i would need

XXXcleric tells the raid: Casting CH on *maintank* next *myclericname*

/mac chrot.mac (maintank) (delayafterpreviouscleric) (allow duck to quickheal) (%quickheal)

where delay is like 25 for 2,5seconds
where (allow duck....) is 1 for yes: if *maintank* health is below *%quickheal) duck CH and cast pious remedy telling raid: Ducking CH... Pious remedy *maintank*
and 0 is for not allowing quickheal

uhm... i forgot... instant recast if fizzle

this would rock....

any help is really appreciated


Mauroxx

mauroxx
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 31, 2005 5:23 am

well worked hard today ...

Post by mauroxx » Mon Jan 31, 2005 10:33 am

i did this today, still not tryed since servers down, anyone can take a look and tell me if they see any error plz? (note: it is my first macro)

Code: Select all

#Include spell_routines.inc 
#Chat Chat 
#Chat tell
#turbo 

|Spells used to heal and info on cleric
/declare healspell string outer Complete Healing
/declare fasthealspell string outer Pious Remedy
/declare hotspell string outer Pious Elisir
/declare nextcleric string outer
/declare mynumber int outer
/declare autohealmode int outer 0
/declare interrupt2healself int outer 1
/declare interrupt2healselfhp int outer 30

|default options
/declare CHdly int outer 30 
/declare allowquickheal int outer 0
/declare autosit int outer 0
/declare announce int outer 1 

/declare tankname string outer ${Target} 
/declare tanknameid int outer 
/declare tankclass string outer
/declare lowhealth int outer 25
/declare oomspam int outer 1 
/declare lomspam int outer 1 
/declare duckspam int outer 1 
/declare duckfdspam int outer 1 
/declare duckselfspam int outer 1 
/declare nomtspam int outer 1 


Sub Main 



/if (!${Target.ID}) { 
      /echo Target the Tank when you run this macro to designate him as MT 
      /end 
   } else { 
      /varset tanknameid ${Target.ID}
   } 

   /if (${Defined[Param0]}) {    
      /varset CHdly ${Param0} 
   } else /echo No CHchain delay specified, defaulting to 3s 
    
   /if (!${Defined[Param1]}) {    
      /echo Usage: /mac CHchain (delay) (1|0) (nextclericname) (myclericnumber)
      /echo Example: /mac CHchain 30 1 Allakhazam 5
      /echo Defaulting CH chain to ${CHdly} and NOT ALLOWING to duck and quick heal when tank arrives to 25% life 
   } else {     
      /varset allowquickheal ${Param1}
      /echo Setting CH chain to ${CHdly} and ALLOWING to duck and quick heal when tank arrives to 25% life
      }
   /if (!${Defined[Param2]}) {
      /varset nextclericname ${Me.Name}
      /echo You are the only healer.
   } else {
      /varset nextclericname ${param2}
      /echo ${param2} is the cleric that will heal ${tankname}
   }
   /if (!${Defined[Param3]}) {
      /varset mynumber 1
   } else {
      /varset nmynumber ${param3}
      /echo I am the (${param3}) cleric in CH chain
   }
/echo CH chain started.
/echo Casting ${healspell} on ${tankname} with ${CHdly} delay.

|beginning of the cycle to ceck raidchat

:chchainloop
   /if ((${ChatText.Equal[$(Me.Name) next]})||(${ChatText.Equal[next $(Me.Name)]})){
   /delay ${CHdly}
   /if (${String[${Spawn[${tanknameid}]}].NotEqual[${tankname}]}) /varset tanknameid 0 
   /if (!${Spawn[${tanknameid}].ID}) /if (${Spawn[${tankname}].ID}) { 
      /if (${SpawnCount[${tankname} ${tankclass}]}==1) { 
         /varset tanknameid ${Spawn[${tankname} ${tankclass}].ID} 
         /echo ${Spawn[${tankname} ${tankclass}].Name} is the designated MT and has ID# ${tanknameid} 
      } 
      /if (${SpawnCount[${tankname} ${tankclass}]}>1) { 
         /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) { 
            /beep 
            /varset tanknameid ${Spawn[pc ${tankname} ${tankclass}].ID} 
            /echo Defaulting to PC ${Spawn[pc ${tankname} ${tankclass}].Name} as MT. If incorrect, please restart macro 
         } else { 
            /beep 
            /echo Need to restart macro to correctly identify the MT 
         } 
      } 
   } 
   /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.Equal[Corpse]}) { 
      /if (${SpawnCount[pc ${tankname} ${tankclass}]}==1) { 
         /varset tanknameid ${Spawn[pc ${tankname ${tankclass}}].ID} 
         /echo ${Spawn[pc ${tankname} ${tankclass}].Name} is MT and has ID# ${tanknameid}. If incorrect, please restart macro 
      } 
   } 
   /if ((!${Target.ID})||(${Target.ID}!=${tanknameid})) { 
      /if (${Spawn[${tanknameid}].ID}) /if (${Spawn[${tanknameid}].Type.NotEqual[Corpse]}) { 
         /target id ${tanknameid} 
         /delay 6 ${Target.ID}==${tanknameid} 
      } 
   } 
   /if (!${Spawn[${tanknameid}].ID}) { 
      /if (${nomtspam}==1) { 
         /e Warning No Designated MT is available 
         /timed 300 /varset nomtspam 1 
         /varset nomtspam 0 
      } 
   } 
   /if ((${Me.PctMana}<=20)&&(${announce}==1)&&(${lomspam}==1)) { 
      /rs ${Me.PctMana} % mana 
      /varset lomspam 0 
      /timed 300 /varset lomspam 1 
   } 
   /if ((${Me.PctMana}<=7)&&(${announce}==1)&&(${oomspam}==1)) { 
      /rs OOM skip me 
      /varset oomspam 0 
      /timed 300 /varset oomspam 1 
      /call MedTime 
   } 
    

|end of varioust ceck.... real healing now
   
   /if (${Target.Distance}<=${healspellrange}) { 
      /if (${announce}==1) /rs Casting ${healspell} on %T next ${nextcleric} (${mynumber})
         /call Cast "${healspell}" gem9 2s Lowhpheal  
      } 
      /call CheckEvents 
   } 
   /if ((${autosit}>=1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) { 
      /if ((${Me.PctMana}>98)||(${Me.PctHPs}<=90)) /stand 
   } 
   /if ((${autosit}==1)&&(${Bool[${Me.Sitting}]})&&(!${Window[SpellBookWnd].Open})) { 
      /if (${NearestSpawn[NPC].Distance}<=${Math.Calc[${NearestSpawn[NPC].MaxRange}+${Math.Calc[${distancetosit}/3]}]}) /stand 
   } 
   /if (${autohealmode}==0) { 
      /call CheckEvents 
      /goto :chchainloop
   } else {
   /if ((${autohealmode}>=1)&&(${Me.PctHPs}<=40)) /call Healself
   }    
   /goto :chchainloop
/return


Sub Lowhpheal 
   /if (!${Window[CastingWindow].Open}) /return 
   /if ((${allowquickheal}>=1)&&(${Target.PctHPs}<=${lowhealth})) { 
      /if ((${announce}==1)&&(${duckspam}==1)) { 
         /e Ducking heal on ${Target.Name} 
         /call Healself
	 /varset duckspam 0 
         /timed 60 /varset duckspam 1 
      } 
      /call Interrupt 
      /return 
   } 
   /if ((${interrupt2healself}==1)&&(${Target.Name.NotEqual[${Me}]})&&(${Me.PctHPs}<${interrupt2healselfhp})) { 
      /if ((${usedivarb}==1)&&(${Me.PctHPs}<=${divarbpoint})&&(${Me.AltAbilityReady[Divine Arbitration]})) { 
         /call Interrupt 
         /call Divarbcast
	 /rs Interrupted for Divine Arbitration, SKIP me, ${nextclericname} CH now 
         /return 
      } 
      /if ((${announce}==1)&&(${duckselfspam}==1)) { 
         /rs Ducking heal on %T, need to heal myself, SKIP me, ${nextclericname} CH now 
         /e Ducking heal on ${Target}, need to heal myself, SKIP me, ${nextclericname} CH now
         /varset duckselfspam 0 
         /timed 60 /varset duckselfspam 1 
      } 
      /call Interrupt 
      /return 
   } 
  }
/return


Sub Healself 
   /if (${Me.PctHPs}>55) /return 
   /target myself 
   /delay 6 ${Target.Name.Equal[${Me}]} 
     /if (${Target.Name.Equal[${Me}]}) { 
      /if (${announce}==1) 
            /call Cast "${patchheal}" gem2 1s Lowhpheal 
            /rs Ducking CH on %T, ${fasthealspell} on %T 
            /delay 15 ${Me.SpellReady[${fasthealspell}]} 
         } 
      } 
      /if ((${Me.PctHPs}<=20&&(${Me.SpellReady[${daspell}]})) { 
         /if (${announce}==1) /rs Casting DA!! <<WARNING>> DA!! No Heals for 18 SECONDS SKIP ME (${mynumber}
         :retryda 
         /call Cast "${daspell}" 
         /delay 1 
         /if ((!${Me.Buff[${daspell}].ID})&&(${Me.SpellReady[${daspell}]})) /goto :retryda 
         :dawait 
         /if (${Me.Buff[${daspell}].ID}) { 
            /delay 1s !${Me.Buff[${daspell}].ID} 
            /call CheckEvents 
            /goto :dawait 
         } 
      }            
   } 
   /if (${Me.PctHPs}<=55) { 
      /target myself 
      /delay 6 ${Target.Name.Equal[${Me}]} 
      /if (${Target.Name.Equal[${Me}]}) { 
         /if (${announce}==1) /rs Casting ${fasthealspell} on %T 
         /call Cast "${fasthealspell}" gem2 1s Lowhpheal 
         /delay 15 ${Me.SpellReady[${patchheal}]} 
      } 
   } 
/return 
 
Sub CheckEvents 
   /delay 1 
   /doevents Chat 
   /doevents tell 
   /doevents flush 
/return 


/echo ending 
/endmacro
if i did many noobish errors is cause i m noob at all... plz dont flame lol... at least i tryed to write it

Mauroxx

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

Post by fearless » Mon Jan 31, 2005 10:47 am

Code: Select all

Pious Elisir
Also, you have this:

Code: Select all

#Chat Chat
#Chat tell 

/call CheckEvents

Sub CheckEvents
   /delay 1
   /doevents Chat
   /doevents tell
   /doevents flush
/return 
But you have nothing that handles any chat events. I am not sure if that is just a remnant or not, but from what I can see it is extra.
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]

mauroxx
orc pawn
orc pawn
Posts: 24
Joined: Mon Jan 31, 2005 5:23 am

this cecks chat

Post by mauroxx » Mon Jan 31, 2005 11:03 am

Code: Select all

|beginning of the cycle to ceck raidchat 

:chchainloop 
   /if ((${ChatText.Equal[$(Me.Name) next]})||(${ChatText.Equal[next $(Me.Name)]})){ 
   /delay ${CHdly} 
it should ceck raidchat and see when cleric before you calls you in raidchannel... then u wait the delay you need in chain and finally start cecking target to heal etc...

correct me if i m wrong... btw:

Code: Select all

Sub CheckEvents 
   /delay 1 
   /doevents Chat 
   /doevents tell 
   /doevents flush 
/return 
and

Code: Select all

#Chat Chat 
#Chat tell 
are the same thing?

Mauroxx

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

Post by fearless » Mon Jan 31, 2005 11:23 am

My bad, didn't see that part of chchainloop.

And no, those aren't the same thing.
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]