-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpriest.lua
More file actions
851 lines (735 loc) · 33.3 KB
/
Copy pathpriest.lua
File metadata and controls
851 lines (735 loc) · 33.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
ConRO.Priest = {};
ConRO.Priest.CheckTalents = function()
end
ConRO.Priest.CheckPvPTalents = function()
end
local ConRO_Priest, ids = ...;
local Ability, Buff, Debuff, PvPTalent = _, _, _, _;
function ConRO:EnableRotationModule(mode)
mode = mode or 0;
self.ModuleOnEnable = ConRO.Priest.CheckTalents;
self.ModuleOnEnable = ConRO.Priest.CheckPvPTalents;
ConRO_AtonementButton:Hide();
ConRO_RaidAtonementButton:Hide();
if mode == 0 then
self.Description = "Priest [No Specialization Under 10]";
self.NextSpell = ConRO.Priest.Disabled;
self.NextDef = ConRO.Priest.Disabled;
self.ToggleHealer();
end;
if mode == 1 then
self.Description = "Priest [Discipline - Healer]";
if ConRO.db.profile._Spec_1_Enabled then
Ability, Buff, Debuff, PvPTalent = ids.discipline.ability, ids.discipline.buff, ids.discipline.debuff, ids.discipline.pvp_talent;
self.NextSpell = ConRO.Priest.Discipline;
self.NextDef = ConRO.Priest.DisciplineDef;
self.ToggleDamage();
ConROButtonFrame:SetAlpha(1);
ConRO_ShowAtonement();
ConROWindow:SetAlpha(ConRO.db.profile.transparencyWindow);
ConROWindow2:SetAlpha(ConRO.db.profile.transparencyWindow);
ConROWindow3:SetAlpha(ConRO.db.profile.transparencyWindow);
ConRODefenseWindow:SetAlpha(ConRO.db.profile.transparencyWindow);
else
self.NextSpell = ConRO.Priest.Disabled;
self.NextDef = ConRO.Priest.Disabled;
self.ToggleHealer();
ConROWindow:SetAlpha(0);
ConROWindow2:SetAlpha(0);
ConROWindow3:SetAlpha(0);
ConRODefenseWindow:SetAlpha(0);
end
end;
if mode == 2 then
self.Description = "Priest [Holy - Healer]";
if ConRO.db.profile._Spec_2_Enabled then
Ability, Buff, Debuff, PvPTalent = ids.holy.ability, ids.holy.buff, ids.holy.debuff, ids.holy.pvp_talent;
self.NextSpell = ConRO.Priest.Holy;
self.NextDef = ConRO.Priest.HolyDef;
self.ToggleHealer();
ConROWindow:SetAlpha(ConRO.db.profile.transparencyWindow);
ConROWindow2:SetAlpha(ConRO.db.profile.transparencyWindow);
ConROWindow3:SetAlpha(ConRO.db.profile.transparencyWindow);
ConRODefenseWindow:SetAlpha(ConRO.db.profile.transparencyWindow);
else
self.NextSpell = ConRO.Priest.Disabled;
self.NextDef = ConRO.Priest.Disabled;
self.ToggleHealer();
ConROWindow:SetAlpha(0);
ConROWindow2:SetAlpha(0);
ConROWindow3:SetAlpha(0);
ConRODefenseWindow:SetAlpha(0);
end
end;
if mode == 3 then
self.Description = "Priest [Shadow - Caster]";
if ConRO.db.profile._Spec_3_Enabled then
Ability, Buff, Debuff, PvPTalent = ids.shadow.ability, ids.shadow.buff, ids.shadow.debuff, ids.shadow.pvp_talent;
self.NextSpell = ConRO.Priest.Shadow;
self.NextDef = ConRO.Priest.ShadowDef;
self.ToggleDamage();
ConROWindow:SetAlpha(ConRO.db.profile.transparencyWindow);
ConROWindow2:SetAlpha(ConRO.db.profile.transparencyWindow);
ConROWindow3:SetAlpha(ConRO.db.profile.transparencyWindow);
ConRODefenseWindow:SetAlpha(ConRO.db.profile.transparencyWindow);
else
self.NextSpell = ConRO.Priest.Disabled;
self.NextDef = ConRO.Priest.Disabled;
self.ToggleHealer();
ConROWindow:SetAlpha(0);
ConROWindow2:SetAlpha(0);
ConROWindow3:SetAlpha(0);
ConRODefenseWindow:SetAlpha(0);
end
end;
self:RegisterEvent('UNIT_SPELLCAST_SUCCEEDED');
self.lastSpellId = 0;
end
function ConRO:EnableDefenseModule(mode)
end
function ConRO:UNIT_SPELLCAST_SUCCEEDED(event, unitID, lineID, spellID)
if unitID == 'player' then
self.lastSpellId = spellID;
end
end
function ConRO.Priest.Disabled(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedSpells)
wipe(ConRO.SuggestedDefSpells)
return nil;
end
--Info
local _Player_Level = UnitLevel("player");
local _Player_Percent_Health = ConRO:PercentHealth('player');
local _is_PvP = ConRO:IsPvP();
local _in_combat = UnitAffectingCombat('player');
local _party_size = GetNumGroupMembers();
local _is_PC = UnitPlayerControlled("target");
local _is_Enemy = ConRO:TarHostile();
local _Target_Health = UnitHealth('target');
local _Target_Percent_Health = ConRO:PercentHealth('target');
--Resources
local _Mana, _Mana_Max, _Mana_Percent = ConRO:PlayerPower('Mana');
local _Insanity = ConRO:PlayerPower('Insanity');
--Conditions
local _Queue = 0;
local _is_moving = ConRO:PlayerSpeed();
local _enemies_in_melee, _target_in_melee = ConRO:Targets("Melee");
local _enemies_in_10yrds, _target_in_10yrds = ConRO:Targets("10");
local _enemies_in_25yrds, _target_in_25yrds = ConRO:Targets("25");
local _enemies_in_40yrds, _target_in_40yrds = ConRO:Targets("40");
local can_execute = _Target_Percent_Health < 20;
--Racials
local _AncestralCall, _AncestralCall_RDY = _, _;
local _ArcanePulse, _ArcanePulse_RDY = _, _;
local _Berserking, _Berserking_RDY = _, _;
local _ArcaneTorrent, _ArcaneTorrent_RDY = _, _;
local HeroSpec, Racial = ids.hero_spec, ids.racial;
function ConRO:Stats()
_Player_Level = UnitLevel("player");
_Player_Percent_Health = ConRO:PercentHealth('player');
_is_PvP = ConRO:IsPvP();
_in_combat = UnitAffectingCombat('player');
_party_size = GetNumGroupMembers();
_is_PC = UnitPlayerControlled("target");
_is_Enemy = ConRO:TarHostile();
_Target_Health = UnitHealth('target');
_Target_Percent_Health = ConRO:PercentHealth('target');
_Mana, _Mana_Max, _Mana_Percent = ConRO:PlayerPower('Mana');
_Insanity = ConRO:PlayerPower('Insanity');
_Queue = 0;
_is_moving = ConRO:PlayerSpeed();
_enemies_in_melee, _target_in_melee = ConRO:Targets("Melee");
_enemies_in_10yrds, _target_in_10yrds = ConRO:Targets("10");
_enemies_in_25yrds, _target_in_25yrds = ConRO:Targets("25");
_enemies_in_40yrds, _target_in_40yrds = ConRO:Targets("40");
can_execute = _Target_Percent_Health < 20;
_AncestralCall, _AncestralCall_RDY = ConRO:AbilityReady(Racial.AncestralCall, timeShift);
_ArcanePulse, _ArcanePulse_RDY = ConRO:AbilityReady(Racial.ArcanePulse, timeShift);
_Berserking, _Berserking_RDY = ConRO:AbilityReady(Racial.Berserking, timeShift);
_ArcaneTorrent, _ArcaneTorrent_RDY = ConRO:AbilityReady(Racial.ArcaneTorrent, timeShift);
end
function ConRO.Priest.Discipline(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedSpells);
ConRO:Stats();
--Abilities
local _AngelicFeather, _AngelicFeather_RDY = ConRO:AbilityReady(Ability.AngelicFeather, timeShift);
local _DispelMagic, _DispelMagic_RDY = ConRO:AbilityReady(Ability.DispelMagic, timeShift);
local _DivineStar, _DivineStar_RDY = ConRO:AbilityReady(Ability.DivineStar, timeShift);
local _Evangelism, _Evangelism_RDY, _Evangelism_CD = ConRO:AbilityReady(Ability.Evangelism, timeShift);
local _Halo, _Halo_RDY = ConRO:AbilityReady(Ability.Halo, timeShift);
local _MindBlast, _MindBlast_RDY = ConRO:AbilityReady(Ability.MindBlast, timeShift);
local _EntropicRift_ACTIVE = ConRO:Totem(Buff.EntropicRift);
local _Penance, _Penance_RDY = ConRO:AbilityReady(Ability.Penance, timeShift);
local _PowerInfusion, _PowerInfusion_RDY = ConRO:AbilityReady(Ability.PowerInfusion, timeShift);
local _PowerWordBarrier, _PowerWordBarrier_RDY = ConRO:AbilityReady(Ability.PowerWordBarrier, timeShift);
local _PowerWordFortitude, _PowerWordFortitude_RDY = ConRO:AbilityReady(Ability.PowerWordFortitude, timeShift);
local _PowerWordShield, _PowerWordShield_RDY = ConRO:AbilityReady(Ability.PowerWordShield, timeShift);
local _PowerWordRadiance, _PowerWordRadiance_RDY = ConRO:AbilityReady(Ability.PowerWordRadiance, timeShift);
local _PowerWordRadiance_CHARGES = ConRO:SpellCharges(_PowerWordRadiance);
local _Atonement_BUFF = ConRO:UnitAura(Buff.Atonement, timeShift, 'target', 'HELPFUL');
local _Atonement_COUNT = ConRO:GroupBuffCount(Buff.Atonement);
local _Atonement_THRESHOLD = ConRO_AtonementBox:GetNumber();
local _PsychicScream, _PsychicScream_RDY = ConRO:AbilityReady(Ability.PsychicScream, timeShift);
local _ShadowWordDeath, _ShadowWordDeath_RDY = ConRO:AbilityReady(Ability.ShadowWordDeath, timeShift);
local _ShadowWordPain, _ShadowWordPain_RDY = ConRO:AbilityReady(Ability.ShadowWordPain, timeShift);
local _ShadowWordPain_DEBUFF = ConRO:TargetAura(Debuff.ShadowWordPain, timeShift + 3);
local _PoweroftheDarkSide_BUFF = ConRO:Aura(Buff.PoweroftheDarkSide, timeShift);
local _Shadowfiend, _Shadowfiend_RDY = ConRO:AbilityReady(Ability.Shadowfiend, timeShift);
local _Shadowfiend_ACTIVE = ConRO:Totem(_Shadowfiend);
local _ShadowCovenant_BUFF = ConRO:Aura(Buff.ShadowCovenant, timeShift);
local _Smite, _Smite_RDY = ConRO:AbilityReady(Ability.Smite, timeShift);
if _ShadowCovenant_BUFF then
_DivineStar, _DivineStar_RDY = ConRO:AbilityReady(Ability.DivineStarSC, timeShift);
_Halo, _Halo_RDY = ConRO:AbilityReady(Ability.HaloSC, timeShift);
_Penance, _Penance_RDY = ConRO:AbilityReady(Ability.DarkReprimand, timeShift);
end
if tChosen[Ability.Mindbender.talentID] then
_Shadowfiend, _Shadowfiend_RDY = ConRO:AbilityReady(Ability.Mindbender, timeShift);
_Shadowfiend_ACTIVE = ConRO:Totem(_Shadowfiend);
end
if ConRO:HeroSpec(HeroSpec.Voidweaver) and tChosen[Ability.Voidwraith.talentID] then
_Shadowfiend, _Shadowfiend_RDY = ConRO:AbilityReady(Ability.Voidwraith, timeShift);
_Shadowfiend_ACTIVE = ConRO:Totem(_Shadowfiend);
end
if ConRO:HeroSpec(HeroSpec.Voidweaver) and tChosen[Ability.VoidBlast.talentID] and _EntropicRift_ACTIVE then
_Smite, _Smite_RDY = ConRO:AbilityReady(Ability.VoidBlast, timeShift);
end
ConRO:Atonements(_Atonement_COUNT);
--Indicators
ConRO:AbilityInterrupt(_PsychicScream, _PsychicScream_RDY and ((ConRO:Interrupt() and _target_in_melee) or (_target_in_melee and ConRO:TarYou())));
ConRO:AbilityPurge(_DispelMagic, _DispelMagic_RDY and ConRO:Purgable());
ConRO:AbilityPurge(_ArcaneTorrent, _ArcaneTorrent_RDY and _target_in_melee and ConRO:Purgable());
ConRO:AbilityMovement(_AngelicFeather, _AngelicFeather_RDY);
ConRO:AbilityBurst(_Shadowfiend, _Shadowfiend_RDY and ConRO:BurstMode(_Shadowfiend));
ConRO:AbilityBurst(_PowerInfusion, _PowerInfusion_RDY and ConRO:BurstMode(_PowerInfusion));
ConRO:AbilityBurst(_Evangelism, _Evangelism_RDY and ((ConRO:IsSolo() and _Atonement_COUNT == 1) or ((ConRO:InParty() or ConRO:InRaid()) and _Atonement_COUNT < _Atonement_THRESHOLD)));
ConRO:AbilityRaidBuffs(_PowerWordFortitude, _PowerWordFortitude_RDY and not ConRO:RaidBuff(Buff.PowerWordFortitude));
ConRO:AbilityRaidBuffs(_PowerWordShield, _PowerWordShield_RDY and ((ConRO:InParty() or ConRO:InRaid()) and _Atonement_COUNT < _Atonement_THRESHOLD));
ConRO:AbilityRaidBuffs(_PowerWordRadiance, _PowerWordRadiance_RDY and not _Shadowfiend_RDY and not _MindBlast_RDY and((ConRO:InParty() or ConRO:InRaid()) and _Atonement_COUNT < _Atonement_THRESHOLD));
--Warnings
ConRO:Warnings("Refresh Atonement!", _in_combat and _is_Enemy and ((ConRO:InParty() or ConRO:InRaid()) and _Atonement_COUNT < _Atonement_THRESHOLD));
--Rotations
repeat
while(true) do
if _ShadowWordPain_RDY and not _ShadowWordPain_DEBUFF then
tinsert(ConRO.SuggestedSpells, _ShadowWordPain);
_ShadowWordPain_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
if _Shadowfiend_RDY and ConRO:FullMode(_Shadowfiend) then
tinsert(ConRO.SuggestedSpells, _Shadowfiend);
_Shadowfiend_RDY = false;
_Queue = _Queue + 1;
break;
end
if _MindBlast_RDY and currentSpell ~= _MindBlast then
tinsert(ConRO.SuggestedSpells, _MindBlast);
_MindBlast_RDY = false;
_Queue = _Queue + 1;
break;
end
if _Penance_RDY then
tinsert(ConRO.SuggestedSpells, _Penance);
_Penance_RDY = false;
_Queue = _Queue + 1;
break;
end
if _ShadowWordDeath_RDY and (can_execute or (tChosen[Ability.InescapableTorment.talentID] and _Shadowfiend_ACTIVE)) then
tinsert(ConRO.SuggestedSpells, _ShadowWordDeath);
_ShadowWordDeath_RDY = false;
_Queue = _Queue + 1;
break;
end
if _DivineStar_RDY then
tinsert(ConRO.SuggestedSpells, _DivineStar);
_DivineStar_RDY = false;
_Queue = _Queue + 1;
break;
end
if _Halo_RDY and currentSpell ~= _Halo then
tinsert(ConRO.SuggestedSpells, _Halo);
_Halo_RDY = false;
_Queue = _Queue + 1;
break;
end
if _Smite_RDY then
tinsert(ConRO.SuggestedSpells, _Smite);
_Queue = _Queue + 1;
break;
end
tinsert(ConRO.SuggestedSpells, 289603); --Waiting Spell Icon
_Queue = _Queue + 3;
break;
end
until _Queue >= 3;
return nil;
end
function ConRO.Priest.DisciplineDef(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedDefSpells);
ConRO:Stats();
--Abilities
local _DesperatePrayer, _DesperatePrayer_RDY = ConRO:AbilityReady(Ability.DesperatePrayer, timeShift);
local _Fade, _Fade_RDY = ConRO:AbilityReady(Ability.Fade, timeShift);
local _PainSuppression, _PainSuppression_RDY = ConRO:AbilityReady(Ability.PainSuppression, timeShift);
local _PowerWordLife, _PowerWordLife_RDY = ConRO:AbilityReady(Ability.PowerWordLife, timeShift);
local _PowerWordShield, _PowerWordShield_RDY = ConRO:AbilityReady(Ability.PowerWordShield, timeShift);
local _Atonement_BUFF = ConRO:UnitAura(Buff.Atonement, timeShift, 'player', 'HELPFUL');
--Rotations
if ConRO:IsSolo() and not _Atonement_BUFF then
if _PowerWordShield_RDY and _Player_Percent_Health < 95 then
tinsert(ConRO.SuggestedDefSpells, _PowerWordShield);
end
end
if _PainSuppression_RDY and not _is_Enemy and _Target_Percent_Health <= 50 then
tinsert(ConRO.SuggestedDefSpells, _PainSuppression);
end
if _DesperatePrayer_RDY and _Player_Percent_Health <= 50 then
tinsert(ConRO.SuggestedDefSpells, _DesperatePrayer);
end
if _Fade_RDY and not ConRO:IsSolo() and (ConRO:TarYou() or _enemies_in_melee >= 1) then
tinsert(ConRO.SuggestedDefSpells, _Fade);
end
return nil;
end
function ConRO.Priest.Holy(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedSpells);
ConRO:Stats();
--Abilities
local _AngelicFeather, _AngelicFeather_RDY = ConRO:AbilityReady(Ability.AngelicFeather, timeShift);
local _Apotheosis, _Apotheosis_RDY = ConRO:AbilityReady(Ability.Apotheosis, timeShift);
local _DispelMagic, _DispelMagic_RDY = ConRO:AbilityReady(Ability.DispelMagic, timeShift);
local _DivineHymn, _DivineHymn_RDY = ConRO:AbilityReady(Ability.DivineHymn, timeShift);
local _DivineStar, _DivineStar_RDY = ConRO:AbilityReady(Ability.DivineStar, timeShift);
local _Halo, _Halo_RDY = ConRO:AbilityReady(Ability.Halo, timeShift);
local _HolyFire, _HolyFire_RDY = ConRO:AbilityReady(Ability.HolyFire, timeShift);
local _HolyNova, _HolyNova_RDY = ConRO:AbilityReady(Ability.HolyNova, timeShift);
local _HolyWordChastise, _HolyWordChastise_RDY = ConRO:AbilityReady(Ability.HolyWordChastise, timeShift);
local _PowerWordFortitude, _PowerWordFortitude_RDY = ConRO:AbilityReady(Ability.PowerWordFortitude, timeShift);
local _PsychicScream, _PsychicScream_RDY = ConRO:AbilityReady(Ability.PsychicScream, timeShift);
local _ShadowWordPain, _ShadowWordPain_RDY = ConRO:AbilityReady(Ability.ShadowWordPain, timeShift);
local _ShadowWordPain_DEBUFF = ConRO:TargetAura(Debuff.ShadowWordPain, timeShift + 3);
local _Smite, _Smite_RDY = ConRO:AbilityReady(Ability.Smite, timeShift);
--Indicators
ConRO:AbilityInterrupt(_PsychicScream, _PsychicScream_RDY and ((ConRO:Interrupt() and _target_in_melee) or (_target_in_melee and ConRO:TarYou())));
ConRO:AbilityPurge(_DispelMagic, _DispelMagic_RDY and ConRO:Purgable())
ConRO:AbilityPurge(_ArcaneTorrent, _ArcaneTorrent_RDY and _target_in_melee and ConRO:Purgable());
ConRO:AbilityMovement(_AngelicFeather, _AngelicFeather_RDY);
ConRO:AbilityRaidBuffs(_PowerWordFortitude, _PowerWordFortitude_RDY and not ConRO:RaidBuff(Buff.PowerWordFortitude));
ConRO:AbilityBurst(_DivineHymn, _DivineHymn_RDY and _in_combat);
ConRO:AbilityBurst(_Apotheosis, _Apotheosis_RDY and _in_combat);
--Warnings
--Rotations
if _is_Enemy then
repeat
while(true) do
if _HolyFire_RDY and currentSpell ~= _HolyFire then
tinsert(ConRO.SuggestedSpells, _HolyFire);
_HolyFire_RDY = false;
_Queue = _Queue + 1;
break;
end
if _HolyWordChastise_RDY then
tinsert(ConRO.SuggestedSpells, _HolyWordChastise);
_HolyWordChastise_RDY = false;
_Queue = _Queue + 1;
break;
end
if _DivineStar_RDY then
tinsert(ConRO.SuggestedSpells, _DivineStar);
_DivineStar_RDY = false;
_Queue = _Queue + 1;
break;
end
if _Halo_RDY and currentSpell ~= _Halo then
tinsert(ConRO.SuggestedSpells, _Halo);
_Halo_RDY = false;
_Queue = _Queue + 1;
break;
end
if _ShadowWordPain_RDY and not _ShadowWordPain_DEBUFF then
tinsert(ConRO.SuggestedSpells, _ShadowWordPain);
_ShadowWordPain_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
if _Smite_RDY then
tinsert(ConRO.SuggestedSpells, _Smite);
_Queue = _Queue + 3;
break;
end
tinsert(ConRO.SuggestedSpells, 289603); --Waiting Spell Icon
_Queue = _Queue + 3;
break;
end
until _Queue >= 3;
end
return nil;
end
function ConRO.Priest.HolyDef(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedDefSpells);
ConRO:Stats();
--Abilities
local _GuardianSpirit, _GuardianSpirit_RDY = ConRO:AbilityReady(Ability.GuardianSpirit, timeShift);
local _DesperatePrayer, _DesperatePrayer_RDY = ConRO:AbilityReady(Ability.DesperatePrayer, timeShift);
local _PowerWordLife, _PowerWordLife_RDY = ConRO:AbilityReady(Ability.PowerWordLife, timeShift);
local _PowerWordShield, _PowerWordShield_RDY = ConRO:AbilityReady(Ability.PowerWordShield, timeShift);
local _PowerWordShield_BUFF = ConRO:Aura(Buff.PowerWordShield, timeShift);
local _Fade, _Fade_RDY = ConRO:AbilityReady(Ability.Fade, timeShift);
--Rotations
if _PowerWordLife_RDY and _Player_Percent_Health <= 35 then
tinsert(ConRO.SuggestedDefSpells, _PowerWordLife);
end
if _GuardianSpirit_RDY and _Target_Percent_Health <= 25 and not _is_Enemy then
tinsert(ConRO.SuggestedDefSpells, _GuardianSpirit);
end
if _DesperatePrayer_RDY and _Player_Percent_Health <= 50 then
tinsert(ConRO.SuggestedDefSpells, _DesperatePrayer);
end
if _Fade_RDY and not ConRO:IsSolo() and (ConRO:TarYou() or _enemies_in_melee >= 1) then
tinsert(ConRO.SuggestedDefSpells, _Fade);
end
if _PowerWordShield_RDY and not _PowerWordShield_BUFF then
tinsert(ConRO.SuggestedDefSpells, _PowerWordShield);
end
return nil;
end
function ConRO.Priest.Shadow(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedSpells);
ConRO:Stats();
--Abilities
local _DarkAscension, _DarkAscension_RDY = ConRO:AbilityReady(Ability.DarkAscension, timeShift);
local _DarkAscension_BUFF = ConRO:Aura(Buff.DarkAscension, timeShift);
local _DevouringPlague, _DevouringPlague_RDY = ConRO:AbilityReady(Ability.DevouringPlague, timeShift);
local _DevouringPlague_DEBUFF, _, _DevouringPlague_DUR = ConRO:TargetAura(Debuff.DevouringPlague, timeShift);
local _DispelMagic, _DispelMagic_RDY = ConRO:AbilityReady(Ability.DispelMagic, timeShift);
local _DivineStar, _DivineStar_RDY = ConRO:AbilityReady(Ability.DivineStar, timeShift);
local _Halo, _Halo_RDY = ConRO:AbilityReady(Ability.Halo, timeShift);
local _MindBlast, _MindBlast_RDY = ConRO:AbilityReady(Ability.MindBlast, timeShift);
local _MindBlast_CHARGE, _MindBlast_MCHARGE, _MindBlast_CHARGECD = ConRO:SpellCharges(_MindBlast);
local _MindDevourer_BUFF = ConRO:Aura(Buff.MindDevourer, timeShift);
local _MindFlay, _MindFlay_RDY = ConRO:AbilityReady(Ability.MindFlay, timeShift);
local _MindFlayInsanity, _MindFlayInsanity_RDY = ConRO:AbilityReady(Ability.MindFlayInsanity, timeShift);
local _MindFlayInsanity_BUFF = ConRO:Aura(Buff.MindFlayInsanity, timeShift);
local _PowerInfusion, _PowerInfusion_RDY = ConRO:AbilityReady(Ability.PowerInfusion, timeShift);
local _PowerWordFortitude, _PowerWordFortitude_RDY = ConRO:AbilityReady(Ability.PowerWordFortitude, timeShift);
local _PowerWordShield, _PowerWordShield_RDY = ConRO:AbilityReady(Ability.PowerWordShield, timeShift);
local _PsychicHorror, _PsychicHorror_RDY = ConRO:AbilityReady(Ability.PsychicHorror, timeShift);
local _PsychicScream, _PsychicScream_RDY = ConRO:AbilityReady(Ability.PsychicScream, timeShift);
local _Shadowfiend, _Shadowfiend_RDY = ConRO:AbilityReady(Ability.Shadowfiend, timeShift);
local _Shadowfiend_ACTIVE = ConRO:Totem(_Shadowfiend);
local _Silence, _Silence_RDY = ConRO:AbilityReady(Ability.Silence, timeShift);
local _ShadowCrash, _ShadowCrash_RDY, _ShadowCrash_CD = ConRO:AbilityReady(Ability.ShadowCrash, timeShift);
local shadow_crash_CHARGE = ConRO:SpellCharges(_ShadowCrash);
local _ShadowWordDeath, _ShadowWordDeath_RDY = ConRO:AbilityReady(Ability.ShadowWordDeath, timeShift);
local _ShadowWordDeath_CHARGE, _ShadowWordDeath_MCHARGE = ConRO:SpellCharges(_ShadowWordDeath);
local _ShadowWordPain, _ShadowWordPain_RDY = ConRO:AbilityReady(Ability.ShadowWordPain, timeShift);
local _ShadowWordPain_DEBUFF, _, _ShadowWordPain_DUR = ConRO:TargetAura(Debuff.ShadowWordPain, timeShift)
local _Shadowform, _Shadowform_RDY = ConRO:AbilityReady(Ability.Shadowform, timeShift);
local _Shadowform_FORM = ConRO:Form(Buff.Shadowform);
local _VoidBolt, _VoidBolt_RDY = ConRO:AbilityReady(Ability.VoidBolt, timeShift);
local _VoidEruption, _VoidEruption_RDY = ConRO:AbilityReady(Ability.VoidEruption, timeShift);
local _Voidform_BUFF, _, _Voidform_DUR = ConRO:Aura(Buff.Voidform, timeShift);
local _Voidform_FORM = ConRO:Form(Buff.Voidform);
local void_volley, void_volley_RDY = ConRO:AbilityReady(Ability.void_volley, timeShift)
local void_volley_BUFF = ConRO:Aura(Buff.void_volley, timeShift)
local _VampiricTouch, _VampiricTouch_RDY = ConRO:AbilityReady(Ability.VampiricTouch, timeShift);
local _VampiricTouch_DEBUFF, _, _VampiricTouch_DUR = ConRO:TargetAura(Debuff.VampiricTouch, timeShift);
local _VoidTorrent, _VoidTorrent_RDY = ConRO:AbilityReady(Ability.VoidTorrent, timeShift);
local _EntropicRift_ACTIVE = ConRO:Totem(Buff.EntropicRift);
--Conditions
local _DevouringPlague_COST = 50;
if _MindDevourer_BUFF then
_DevouringPlague_COST = 0;
elseif tChosen[Ability.MindsEye.talentID] then
_DevouringPlague_COST = 45;
elseif tChosen[Ability.DistortedReality.talentID] then
_DevouringPlague_COST = 55;
end
if tChosen[Ability.ShadowCrashDest.talentID] then
_ShadowCrash, _ShadowCrash_RDY, _ShadowCrash_CD = ConRO:AbilityReady(Ability.ShadowCrashDest, timeShift)
shadow_crash_CHARGE = ConRO:SpellCharges(_ShadowCrash)
end
if tChosen[Ability.Mindbender.talentID] then
_Shadowfiend, _Shadowfiend_RDY = ConRO:AbilityReady(Ability.Mindbender, timeShift);
_Shadowfiend_ACTIVE = ConRO:Totem(_Shadowfiend);
end
if ConRO:HeroSpec(HeroSpec.Voidweaver) and tChosen[Ability.Voidwraith.talentID] then
_Shadowfiend, _Shadowfiend_RDY = ConRO:AbilityReady(Ability.Voidwraith, timeShift);
_Shadowfiend_ACTIVE = ConRO:Totem(_Shadowfiend);
end
if ConRO:HeroSpec(HeroSpec.Voidweaver) and tChosen[Ability.VoidBlast.talentID] and _EntropicRift_ACTIVE then
_MindBlast, _MindBlast_RDY = ConRO:AbilityReady(Ability.VoidBlast, timeShift);
end
if currentSpell == _MindBlast then
_MindBlast_CHARGE = _MindBlast_CHARGE - 1;
end
if tChosen[Ability.Deathspeaker.talentID] then
can_execute = _Target_Percent_Health < 35
end
--Indicators
ConRO:AbilityInterrupt(_Silence, _Silence_RDY and ConRO:Interrupt());
ConRO:AbilityInterrupt(_PsychicHorror, _PsychicHorror_RDY and (ConRO:Interrupt() and not _Silence_RDY and _is_PC and _is_Enemy));
ConRO:AbilityInterrupt(_PsychicScream, _PsychicScream_RDY and ((ConRO:Interrupt() and not _Silence_RDY and _target_in_melee) or (_target_in_melee and ConRO:TarYou())) and _is_PC and _is_Enemy);
ConRO:AbilityPurge(_DispelMagic, _DispelMagic_RDY and ConRO:Purgable());
ConRO:AbilityPurge(_ArcaneTorrent, _ArcaneTorrent_RDY and _target_in_melee and ConRO:Purgable());
ConRO:AbilityMovement(_PowerWordShield, _PowerWordShield_RDY and tChosen[Ability.BodyandSoul.talentID]);
ConRO:AbilityRaidBuffs(_PowerWordFortitude, _PowerWordFortitude_RDY and not ConRO:RaidBuff(Buff.PowerWordFortitude));
ConRO:AbilityBurst(_VoidEruption, _VoidEruption_RDY and not _Voidform_BUFF and ConRO:BurstMode(_VoidEruption));
ConRO:AbilityBurst(_PowerInfusion, _PowerInfusion_RDY and not _Voidform_BUFF and _Insanity >= 40 and ConRO:BurstMode(_PowerInfusion));
ConRO:AbilityBurst(_VoidTorrent, _VoidTorrent_RDY and not _Voidform_BUFF and _VampiricTouch_DEBUFF and _ShadowWordPain_DEBUFF and ConRO:BurstMode(_VoidTorrent));
ConRO:AbilityBurst(_ShadowCrash, _ShadowCrash_RDY and (not _VampiricTouch_DEBUFF or _VampiricTouch_DUR <= 3));
ConRO:AbilityBurst(_Shadowfiend, _Shadowfiend_RDY and ConRO:BurstMode(_Shadowfiend));
--Warnings
--Rotations
repeat
while(true) do
if _Shadowform_RDY and not _Shadowform_FORM and not _Voidform_BUFF and not _Voidform_FORM then
tinsert(ConRO.SuggestedSpells, _Shadowform)
_Shadowform_FORM = true
_Queue = _Queue + 1
break
end
if not _in_combat then
if _Halo_RDY and ConRO:HeroSpec(HeroSpec.Archon) and tChosen[Ability.PowerSurge.talentID] and currentSpell ~= _Halo then
tinsert(ConRO.SuggestedSpells, _Halo)
_Halo_RDY = false
_Insanity = _Insanity + 10
_Queue = _Queue + 1
break
end
if _ShadowCrash_RDY and not _VampiricTouch_DEBUFF and currentSpell ~= _VampiricTouch and ConRO.lastSpellId ~= _ShadowCrash then
tinsert(ConRO.SuggestedSpells, _ShadowCrash)
_ShadowCrash_RDY = false
shadow_crash_CHARGE = shadow_crash_CHARGE - 1
_VampiricTouch_DEBUFF = true
_Queue = _Queue + 1
break
end
if _VampiricTouch_RDY and not _VampiricTouch_DEBUFF and currentSpell ~= _VampiricTouch and ConRO.lastSpellId ~= _ShadowCrash then
tinsert(ConRO.SuggestedSpells, _VampiricTouch);
_VampiricTouch_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
if _ShadowWordPain_RDY and not _ShadowWordPain_DEBUFF and not tChosen[Ability.Misery.talentID] then
tinsert(ConRO.SuggestedSpells, _ShadowWordPain);
_ShadowWordPain_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
if _Shadowfiend_RDY and ConRO:FullMode(_Shadowfiend) then
tinsert(ConRO.SuggestedSpells, _Shadowfiend);
_Shadowfiend_RDY = false;
_Queue = _Queue + 1;
break;
end
end
if select(2, ConRO:EndChannel()) == _MindFlayInsanity and select(1, ConRO:EndChannel()) > 1 then
tinsert(ConRO.SuggestedSpells, _MindFlayInsanity);
_Queue = _Queue + 3;
break;
end
if _ShadowCrash_RDY and not _VampiricTouch_DEBUFF and currentSpell ~= _VampiricTouch and ConRO.lastSpellId ~= _ShadowCrash then
tinsert(ConRO.SuggestedSpells, _ShadowCrash)
_ShadowCrash_RDY = false
shadow_crash_CHARGE = shadow_crash_CHARGE - 1
_VampiricTouch_DEBUFF = true
_Queue = _Queue + 1
break
end
if _VampiricTouch_RDY and not _VampiricTouch_DEBUFF and currentSpell ~= _VampiricTouch and ConRO.lastSpellId ~= _ShadowCrash then
tinsert(ConRO.SuggestedSpells, _VampiricTouch);
_VampiricTouch_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
if _ShadowWordPain_RDY and not _ShadowWordPain_DEBUFF and not tChosen[Ability.Misery.talentID] then
tinsert(ConRO.SuggestedSpells, _ShadowWordPain);
_ShadowWordPain_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
if _Shadowfiend_RDY and ConRO:FullMode(_Shadowfiend) then
tinsert(ConRO.SuggestedSpells, _Shadowfiend);
_Shadowfiend_RDY = false;
_Queue = _Queue + 1;
break;
end
if _Halo_RDY and ConRO:HeroSpec(HeroSpec.Archon) and tChosen[Ability.PowerSurge.talentID] and currentSpell ~= _Halo then
tinsert(ConRO.SuggestedSpells, _Halo);
_Halo_RDY = false;
_Insanity = _Insanity + 10;
_Queue = _Queue + 1;
break;
end
if _VoidEruption_RDY and currentSpell ~= _VoidEruption and not _Voidform_BUFF and ConRO:FullMode(_VoidEruption) then
tinsert(ConRO.SuggestedSpells, _VoidEruption);
_VoidEruption_RDY = false;
_Voidform_BUFF = true;
_Queue = _Queue + 1;
break;
end
if _DarkAscension_RDY and currentSpell ~= _DarkAscension and ConRO:FullMode(_DarkAscension) then
tinsert(ConRO.SuggestedSpells, _DarkAscension);
_DarkAscension_RDY = false;
_Queue = _Queue + 1;
break;
end
if _PowerInfusion_RDY and (_DarkAscension_BUFF or _Voidform_BUFF or currentSpell == _DarkAscension or currentSpell == _VoidEruption) and ConRO:FullMode(_PowerInfusion) then
tinsert(ConRO.SuggestedSpells, _PowerInfusion);
_PowerInfusion_RDY = false;
_Queue = _Queue + 1;
break;
end
if _VoidBolt_RDY and (_Voidform_BUFF or _Voidform_FORM) then
tinsert(ConRO.SuggestedSpells, _VoidBolt);
_VoidBolt_RDY = false;
_Queue = _Queue + 1;
break;
end
if _DevouringPlague_RDY and ((not _DevouringPlague_DEBUFF) or (_DevouringPlague_DUR <= 1) or (_Insanity > 90) or _MindDevourer_BUFF) then
tinsert(ConRO.SuggestedSpells, _DevouringPlague);
if not _MindDevourer_BUFF then
_Insanity = _Insanity - _DevouringPlague_COST;
end
_MindDevourer_BUFF = false;
_DevouringPlague_DEBUFF = true;
_DevouringPlague_DUR = 7;
_Queue = _Queue + 1;
break;
end
if _VoidTorrent_RDY and (_DevouringPlague_DEBUFF and _DevouringPlague_DUR >= 3.5) and ConRO:FullMode(_VoidTorrent) then
tinsert(ConRO.SuggestedSpells, _VoidTorrent);
_VoidTorrent_RDY = false;
_Insanity = _Insanity + 24;
_Queue = _Queue + 1;
break;
end
if _MindFlayInsanity_RDY and _MindFlayInsanity_BUFF and _DevouringPlague_DEBUFF then
tinsert(ConRO.SuggestedSpells, _MindFlayInsanity);
_MindFlayInsanity_RDY = false;
_MindFlayInsanity_BUFF = false;
_Insanity = _Insanity + 12;
_Queue = _Queue + 1;
break;
end
if _MindBlast_RDY and _MindBlast_CHARGE >= 1 then
tinsert(ConRO.SuggestedSpells, _MindBlast);
_MindBlast_CHARGE = _MindBlast_CHARGE - 1;
_Insanity = _Insanity + 6;
_Queue = _Queue + 1;
break;
end
if void_volley_RDY and void_volley_BUFF then
tinsert(ConRO.SuggestedSpells, void_volley)
void_volley_BUFF = false
_Insanity = _Insanity + 10
_Queue = _Queue + 1
break
end
if _DevouringPlague_RDY and _Insanity >= _DevouringPlague_COST and _Voidform_BUFF and _Voidform_DUR <= 2.5 then
tinsert(ConRO.SuggestedSpells, _DevouringPlague);
_Insanity = _Insanity - _DevouringPlague_COST;
_Queue = _Queue + 1;
break;
end
if _ShadowCrash_RDY and shadow_crash_CHARGE >= 2 and ConRO.lastSpellId ~= _ShadowCrash then
tinsert(ConRO.SuggestedSpells, _ShadowCrash)
_ShadowCrash_RDY = false
shadow_crash_CHARGE = shadow_crash_CHARGE - 1
_VampiricTouch_DEBUFF = true
_Queue = _Queue + 1
break
end
if _ShadowWordDeath_RDY and _ShadowWordDeath_CHARGE >= 1 and (can_execute or (_Shadowfiend_ACTIVE and tChosen[Ability.InescapableTorment.talentID])) then
tinsert(ConRO.SuggestedSpells, _ShadowWordDeath);
_ShadowWordDeath_RDY = false;
_ShadowWordDeath_CHARGE = _ShadowWordDeath_CHARGE - 1;
_Deathspeaker_BUFF = false;
_Queue = _Queue + 1;
break;
end
if _Halo_RDY and currentSpell ~= _Halo then
tinsert(ConRO.SuggestedSpells, _Halo);
_Halo_RDY = false;
_Insanity = _Insanity + 10;
_Queue = _Queue + 1;
break;
end
if _MindFlay_RDY and not _is_moving then
tinsert(ConRO.SuggestedSpells, _MindFlay);
_Insanity = _Insanity + 12;
_Queue = _Queue + 3;
break;
end
if _DivineStar_RDY then
tinsert(ConRO.SuggestedSpells, _DivineStar);
_DivineStar_RDY = false;
_Insanity = _Insanity + 6;
_Queue = _Queue + 1;
break;
end
if _ShadowWordDeath_RDY and _ShadowWordDeath_CHARGE >= 1 then
tinsert(ConRO.SuggestedSpells, _ShadowWordDeath);
_ShadowWordDeath_RDY = false;
_ShadowWordDeath_CHARGE = _ShadowWordDeath_CHARGE - 1;
_Deathspeaker_BUFF = false;
_Queue = _Queue + 1;
break;
end
if _ShadowCrash_RDY and ConRO.lastSpellId ~= _ShadowCrash then
tinsert(ConRO.SuggestedSpells, _ShadowCrash)
_ShadowCrash_RDY = false
shadow_crash_CHARGE = shadow_crash_CHARGE - 1
_VampiricTouch_DEBUFF = true
_Queue = _Queue + 1
break
end
if _ShadowWordPain_RDY then
tinsert(ConRO.SuggestedSpells, _ShadowWordPain);
_ShadowWordPain_DEBUFF = true;
_Queue = _Queue + 1;
break;
end
tinsert(ConRO.SuggestedSpells, 289603); --Waiting Spell Icon
_Queue = _Queue + 3;
break;
end
until _Queue >= 3;
return nil;
end
function ConRO.Priest.ShadowDef(_, timeShift, currentSpell, gcd, tChosen, pvpChosen)
wipe(ConRO.SuggestedDefSpells);
ConRO:Stats();
--Abilities
local _DesperatePrayer, _DesperatePrayer_RDY = ConRO:AbilityReady(Ability.DesperatePrayer, timeShift);
local _Dispersion, _Dispersion_RDY = ConRO:AbilityReady(Ability.Dispersion, timeShift);
local _Fade, _Fade_RDY = ConRO:AbilityReady(Ability.Fade, timeShift);
local _PowerWordLife, _PowerWordLife_RDY = ConRO:AbilityReady(Ability.PowerWordLife, timeShift);
local _PowerWordShield, _PowerWordShield_RDY = ConRO:AbilityReady(Ability.PowerWordShield, timeShift);
local _PowerWordShield_BUFF = ConRO:Aura(Buff.PowerWordShield, timeShift);
local _VampiricEmbrace, _VampiricEmbrace_RDY = ConRO:AbilityReady(Ability.VampiricEmbrace, timeShift);
--Indicators
--Warnings
--Rotations
if _PowerWordLife_RDY and _Player_Percent_Health <= 35 then
tinsert(ConRO.SuggestedDefSpells, _PowerWordLife);
end
if _DesperatePrayer_RDY and _Player_Percent_Health <= 50 then
tinsert(ConRO.SuggestedDefSpells, _DesperatePrayer);
end
if _VampiricEmbrace_RDY and _Player_Percent_Health <= 75 then
tinsert(ConRO.SuggestedDefSpells, _VampiricEmbrace);
end
if _Dispersion_RDY and _Player_Percent_Health <= 40 then
tinsert(ConRO.SuggestedDefSpells, _Dispersion);
end
if _Fade_RDY and not ConRO:IsSolo() and (ConRO:TarYou() or _enemies_in_melee >= 1) then
tinsert(ConRO.SuggestedDefSpells, _Fade);
end
if _PowerWordShield_RDY and not _PowerWordShield_BUFF then
tinsert(ConRO.SuggestedDefSpells, _PowerWordShield);
end
return nil;
end