Guest User

Untitled

a guest
Jul 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. #include spell_routines.inc
  2.  
  3. Sub Main
  4. |CHANGE THESE!!!!
  5. /declare FastHeal string outer "fastheal1"
  6. /declare HoTHeal string outer "hot1"
  7. /declare MainHeal string outer "heal1"
  8. /declare Invuln string outer "invulnspellhere"
  9. /declare FastHealPct int outer 30
  10. /declare HotPct int outer 80
  11. /declare MainHealPct int outer 50
  12. /declare OhShitPct int outer 30
  13. /declare MedPct int outer 30
  14. /declare MedTil int outer 90
  15.  
  16.  
  17. |Don't worry about these
  18. /declare TankID int outer 0
  19. /declare TankHoT timer outer 0
  20. /declare HoTTimers[6] timer outer 0
  21.  
  22. /echo Cleric Mac started, here we go!
  23.  
  24.  
  25. /if (!${Target.ID}) {
  26. /echo No target at the start of the mac, just healing the group
  27. } else {
  28. /varset TankID ${Target.ID}
  29. }
  30.  
  31. :mainloop
  32. /if (${Me.PctHPs}==0 || ${Me.State.Equal[HOVER]}) /endmac
  33. /if (${TankID}!=0) /call TankCheck
  34. /call GroupCheck
  35. /call OhShitCheck
  36. /call MedCheck
  37. /if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID}) /sit
  38. /goto :mainloop
  39. /return
  40.  
  41. Sub TankCheck
  42. |Sadly we do have to target the tank if he isn't in the group to check his HP
  43. /if (${Target.ID}!=${TankID}) /call Target ${TankID}
  44. /if (${Target.PctHPs}<=${FastHealPct}) /call Cast "${FastHeal}"
  45. /if (${Target.PctHPs}<=${HotPct} && !${TankHoT}) {
  46. /call Cast "${HotHeal}"
  47. /if (${Return.Equal[CAST_SUCCESS]}) /varset TankHoT ${Me.Book[${Me.Book[${HotHeal}]].Duration.TotalSeconds}s
  48. }
  49. /if (${Target.PctHPs}<=${MainHealPct}) /call Cast "${MainHeal}"
  50. /return
  51.  
  52. Sub GroupCheck
  53. /declare i int local 0
  54. |For loops rock!
  55. /for i 0 to ${Group.Members}
  56. |If group member i is the tank, or they aren't in the zone or they are more than 200 units away, skip them
  57. |If you want to check the tank in between every other group member uncomment the line below this
  58. |/if (${TankID}!=0) /call TankCheck
  59. /if (${Group.Member[${i}].ID}==${TankID}|| !${Group.Member[${i}].ID} || ${Group.Member[${i}].Distance}>200) /next i
  60. /if (${Group.Member[${i}].PctHPs}<=${FastHealPct}) {
  61. /call Target ${Group.Member[${i}].ID}
  62. /call Cast "${FastHeal}"
  63. }
  64. /if (${Group.Member[${i}].PctHPs}<=${HotPct} && !${HoTTimers[${i}]}) {
  65. /call Target ${Group.Member[${i}].ID}
  66. /call Cast "${HotHeal}"
  67. |If the heal was successful set a timer so we don't spam the hot on them
  68. /if (${Return.Equal[CAST_SUCCESS]}) /varset HoTTimers[${i}+1] ${Me.Book[${Me.Book[${HotHeal}]].Duration.TotalSeconds}s
  69. }
  70. /if (${Group.Member[${i}].PctHPs}<=${MainHealPct}) {
  71. /call Target ${Group.Member[${i}].ID}
  72. /call Cast "${MainHeal}"
  73. }
  74. /next i
  75. /return
  76.  
  77. Sub Target(int id)
  78. :GetTarget
  79. /target ID ${id}
  80. /delay 5 ${Target.ID} ==${id}
  81. /if ${Target.ID}!=${id} && ${Spawn[ID ${id}].ID} /goto :GetTarget
  82. /return
  83.  
  84. Sub OhShitCheck
  85. /if (${Me.PctHPs}<=${OhShitPct})
  86. {
  87. /if (${Me.Casting.ID})
  88. {
  89. /call Interrupt
  90. /delay 1s !${Me.Casting.ID}
  91. }
  92. /group OH SHIT HELP ME!!!
  93. /cast ${Invuln}
  94. /beep
  95. |This really should be more complex than waiting 10 seconds before continuing but
  96. |I'm trying to keep it simple let me know if you want to know what you should do
  97. /delay 10s
  98. }
  99. /return
  100.  
  101. Sub MedCheck
  102. /beep
  103. /gsay I need to med please...
  104. /echo MED DUMBASS
  105. |Usually here I would still check to see if any one needs heals
  106. |But since healing is all this script does...
  107. :MedLoop
  108. /if (${Me.Standing} && !${Me.Moving} && !${Me.Casting.ID} && !${Me.Mount.ID}) /sit
  109. /delay 1s ${Me.PctMana}>${MedTil}
  110. /if (${Me.PctMana}<${MedTil}) /goto :MedLoop
  111. /echo Done medding
  112. /gsay Ready to go!
  113. /return
Add Comment
Please, Sign In to add comment