You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

881

Thursday, January 3rd 2013, 7:37pm

Thanks for clarifying!

hmm so there is a way to implement the in-game codes into the diyce codes?

like my in-game macro is like:

Source code

1
2
3
4
5
/use Item #1
/wait .2
/cast Skill
/wait .2
/use Item #2


if there's a way, how would we go about doing the above coding with diyce? could we use the timer function for the /wait part?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

882

Friday, January 4th 2013, 5:39am

Can't be done even with the timers since you would need to hit the DIYCE macro three times to fire off each item/skill.

In effect there are two things blocking this type of usage. First a macro cannot call another macro and second, most frame events (including the ones needed for doing timers) are blocked from casting skills and using items. Again, this is done on purpose.
2013... The year from hell....

883

Saturday, January 5th 2013, 12:31am

I have two skills on my champ/priest that are really starting to bother me. They do an AoE dmg but it is a melee strike but as long as you have a target, it will fire off the skill and waste it. Because if the melee strike doesn't land, the heal will not fire, and the other ability will not cure status effects. I do not know why the game code allows these skills to fire even when target is not in range.... So now that I ranted a bit..... Is there a way I can put in a restriction so that the skill will not be used unless within a range of 50?

I am sure it can be done with

Source code

1
use = melee }, 
but I am not sure how to establish GetActionUsable just for that class combo and not mess up what I am using for for another combo.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

884

Saturday, January 5th 2013, 1:14am

Quoted from "Gilderoi;583603"

I have two skills on my champ/priest that are really starting to bother me. They do an AoE dmg but it is a melee strike but as long as you have a target, it will fire off the skill and waste it. Because if the melee strike doesn't land, the heal will not fire, and the other ability will not cure status effects. I do not know why the game code allows these skills to fire even when target is not in range.... So now that I ranted a bit..... Is there a way I can put in a restriction so that the skill will not be used unless within a range of 50?

I am sure it can be done with

Source code

1
use = melee }, 
but I am not sure how to establish GetActionUsable just for that class combo and not mess up what I am using for for another combo.


If you look at my section of R/S (and the variables I use). You will see that you can add a melee-check (or two melee-checks depending on how far you want it to be cast).

Find a skill that has a range of 50 put it into this part of the code.

Source code

1
    local melee = GetActionUsable(2) -- # is your melee range spell slot number


Add "melee" as a condition to activating that skill and you are done.

885

Saturday, January 5th 2013, 9:41pm

Im a w/m and this worked fine with the 60 elite. Meaning High Voltage stayed at 3 and Electrical Rage hits only when the high voltage is about to expire.

{ name = "Electrical Rage", use = ((EnergyBar1 >= 15) and (boss) and (not pbuffs['High Voltage I']) and (not pbuffs['High Voltage II']) and (not pbuffs['High Voltage III'])) },
{ name = "Electrical Rage", use = ((EnergyBar1 >= 15) and (boss) and (pbuffs['High Voltage I']) or (pbuffs['High Voltage II'])) },
{ name = "Electrical Rage", use = ((EnergyBar1 >= 15) and (pbuffs['High Voltage III']) and (pbuffs['High Voltage III'].time <= 3.3) and (not tDead)) },

But after I got the 70 elite skill, and High Voltage is now stackable, the above routine doesn't work anymore. Can anyone knowledgable pls let me know how to change this so that the High Voltage can be seen as stackable and the Electrical Rage will hit only when High Voltage is about to expire.

tnx in advance for any assist.

886

Monday, January 7th 2013, 1:58am

Quoted from "mrmisterwaa;583607"

If you look at my section of R/S (and the variables I use). You will see that you can add a melee-check (or two melee-checks depending on how far you want it to be cast).

Find a skill that has a range of 50 put it into this part of the code.

Source code

1
    local melee = GetActionUsable(2) -- # is your melee range spell slot number


Add "melee" as a condition to activating that skill and you are done.


Ok so i changed things a bit but now it is acting all funny.

Source code

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
--Class: Champion/Priest
            elseif mainClass == "PSYRON" and subClass == "AUGUR" then
                local melee = GetActionUsable(2)
            
            --Potions and Buffs
            Skill = {
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Urgent Heal",                   use = (phealth <= .65) and (pctEB2 >= .05) },
                { name = "Rune Energy Influx",            use = (phealth <= .75) and (EnergyBar1 >= 10) },
                { name = "Action: 14",                    use = (phealth <= .60) },
                { name = "Action: 13",                    use = (phealth <= .70) and (not pbuffs['Spirit Herb']) },
                { name = "Action: 34",                    use = (pctEB2 <= .50)  and (not pbuffs['Rune Energy Consecration']) },
                { name = "Action: 33",                    use = (pctEB2 <= .70) and (not pbuffs['Elemental Spirit Stone'])  and (not pbuffs['Rune Energy Consecration']) },
                { name = "Magic Barrier",                 use = (pctEB2 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
                { name = "Blessed Spring Water",          use = (pctEB2 >= .05) and (not pbuffs['Blessed Spring Water']) },
                { name = "Forge",                         use = (not pbuffs['Forge']) },
                { name = "Action: 16",                    use = (not pbuffs['Unimaginable Salad']) },
                { name = "Action: 37",                    use = (not pbuffs['Scarlet Love']) },
                { name = "Action: 38",                    use = (not pbuffs['Clear Thought']) },
                    }
                            
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Vacuum Wave",                 use = (silenceThis) and (EnergyBar1 >= 40) },
                    { name = "Rune Pulse",                  use = (not combat) },
                    { name = "Rune Pulse",                  use = (pbuffs['Chain Drive']) },
                    { name = "Fearless Blow",               use = (EnergyBar1 >= 20) and (thealth <= .30) },
                    { name = "Energy Influx Strike",        use = (EnergyBar1 >= 25) and (tbuffs['Electrocution']) },
                    { name = "Electrocution",               use = (EnergyBar1 >= 20) and (not tbuffs['Electrocution']) },
                    { name = "Holy Aura",                   use = (pctEB2 >= .02) and (boss or elite or enemy) and (not pbuffs['Holy Aura']) },
                    { name = "Rune Growth",                 use = (boss or elite or enemy) and (not pbuffs['Rune Growth']) },
                    { name = "Rune Energy Consecration",    use = (pctEB2 <= .60) and ((EnergyBar1 >= 10) and (pctEB2 >= .02)) and (boss or elite or enemy) },
                    { name = "Light Pulse",                 use = (pctEB2 >= .05) and melee },
                    { name = "Holy Attack",                 use = (pctEB2 >= .05) and melee },
                    { name = "Suicide Advance",             use = (pctEB2 >= .05) and boss and party },
                    { name = "Heavy Bash",                  use = (EnergyBar1 >= 20) and (not tbuffs['Heavy Bash'] or tbuffs['Heavy Bash'].stack < 3) },
                    { name = "Shock Strike",                use = (EnergyBar1 >= 20) },
                    { name = "Kinetic Burn",                use = (EnergyBar1 >= 30) },
                    { name = "Imprisonment Pulse",          use = (EnergyBar1 >= 30) },
                    { name = "Attack",                      use = (thealth == 1) },
                            }
                end    


Now it will not fire the abilities I have marked for use= melee. I put v1 in the macro and the list shows it wants to use the abilities but they won't fire and a different move is used. I also tried to do this on my warden for frantic briar but now it too will not fire at all. So what could be going wrong?

In this code I set GetActuionUsable to the slot 2 with Heavy Bash and on my warden I made it slot 4 for my Blade of Protection. Both have a range of 50. So I do not understand why the skills will no longer be used at all. Thats not much better than having them accidentally fire while out of range.

Wow, I took my champ to HoS last night and when I hit my macro, he buffed but then just stood there. I don't know what is wrong but I can only think to fix the problem I will have to remove the melee check. But that doesn't seem to be right. I have the attack line in the code so if nothing else i should be doing normal attacks, but he stands there doing nothing. Can anyone see what is going on with my coding to see where the issue lies?

887

Monday, January 7th 2013, 2:02am

Hey!
Could anyone tell me if there is a DIYCE for Mage/Priest or Mage/Warrior here in this thread. I looked through all 89 pages now. Couldnt find a single one. Am I missing something or am I doing something wrong in the search? If there is one, could anyone here please link me to that page or site.
Thanks in advance.
- B

888

Wednesday, January 9th 2013, 11:16pm

The point of DIYCE is to make your own code. Someone may share theirs with you but mostly you should work on how to set it up yourself as to work how you play your toon, not how someone else plays theirs.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

889

Wednesday, January 9th 2013, 11:48pm

Quoted from "Gilderoi;583746"

Ok so i changed things a bit but now it is acting all funny.

...snip...

Now it will not fire the abilities I have marked for use= melee.

...snip...

I don't know what is wrong but I can only think to fix the problem I will have to remove the melee check. But that doesn't seem to be right. I have the attack line in the code so if nothing else i should be doing normal attacks, but he stands there doing nothing. Can anyone see what is going on with my coding to see where the issue lies?

Sorry for the delay in response, been busy with that FuzzyDIYCE thing :D

Anyway, the basic problem you encountered appears to be caused by something called variable scoping (well at first glance anyway).

When you declare a variable as local (as you do for your melee variable), where you declare it actually becomes important. Currently you have this (with edits for length):

Source code

1
2
            elseif mainClass == "PSYRON" and subClass == "AUGUR" then
                local melee = GetActionUsable(2)

But you use that variable later inside another if statement. It is likely that the melee variable is, as far as Lua is concerned at that point, non-existant and therefore nil. In Lua terms, a value of nil is considered false and hence why those skills do not fire.

To fix, remove the word local from in front of the variable declaration (so now it is merely setting the variable), and at the top of the KillSequence function, add this to the list of local variable declarations (doesn't matter much where).

Source code

1
    local melee

This then declares melee to be local to the entire function, but you'll set its value later.

Hope this helps.
2013... The year from hell....

890

Friday, January 11th 2013, 1:27am

Ok that was a little confusing.

Source code

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
function KillSequence(arg1, mode, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--healthpot = # of actionbar slot for health potions
--manapot = # of actionbar slot for mana potions
--foodslot = # of actionbar slot for food (add more args for more foodslots if needed)

    local Skill = {}
    local Skill2 = {}
    local i = 0
    
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
    local EnergyBar1 = UnitMana("player")
    local EnergyBar2 = UnitSkill("player")
    local pctEB1 = PctM("player")
    local pctEB2 = PctS("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    local behind = (not UnitIsUnit("player", "targettarget"))
    local melee = GetActionUsable(13) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(14)  -- # is your Autoshot slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
    

There is already a local in the start of the code. Do I need to remove the GetActionUsable from that, then under the champ/priest elseif put melee = GetActionUsable(2) ?

Source code

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
function KillSequence(arg1, mode, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--healthpot = # of actionbar slot for health potions
--manapot = # of actionbar slot for mana potions
--foodslot = # of actionbar slot for food (add more args for more foodslots if needed)

    local Skill = {}
    local Skill2 = {}
    local i = 0
    
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
    local EnergyBar1 = UnitMana("player")
    local EnergyBar2 = UnitSkill("player")
    local pctEB1 = PctM("player")
    local pctEB2 = PctS("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    local behind = (not UnitIsUnit("player", "targettarget"))
    local melee 
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(14)  -- # is your Autoshot slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
    

Source code

1
2
elseif mainClass == "PSYRON" and subClass == "AUGUR" then
                melee = GetActionUsable(25)


I actually changed the check to 25 which is my slot for holy attack since like an idiot I didn't realize it was a range 50. Could have sworn I'd seen it fire out of range but didn't pay close enough attention. Also thought maybe since slot two was a skill using rage, using it to melee check a mana skill might cause issues.

I just don't know what to do about that first local melee because as default it was set at 13 but depending on what class I play, 13 could be anything....

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

891

Friday, January 11th 2013, 1:46am

Can you post the entire function, there may be something else interfering since from what I've seen so far, it should work.
2013... The year from hell....

892

Friday, January 11th 2013, 2:25am

You want my entire lau code? Cause I just tested the change and it still would not work and it even left me just standing there doing nothing from time to time. Seems like if the fight lasts more than two or three attacks, it will stall and even drop normal attack. He will literally drop his hammer to his side and just stand there.... O_O So I am going to undo the changes and see if you can see something else....

Source code

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
local WHITE = "|cffffffff"
local SILVER = "|cffc0c0c0"
local GREEN = "|cff00ff00"
local LTBLUE = "|cffa0a0ff"

function DIYCE_DebugSkills(skillList)
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Skill List:")
    
    for i,v in ipairs(skillList) do
        DEFAULT_CHAT_FRAME:AddMessage(SILVER.."  ['..WHITE..i..SILVER..']: "..LTBLUE.."" "..WHITE..v.name..LTBLUE..""  use = "..WHITE..(v.use and "true" or "false"))
    end

    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end

function DIYCE_DebugBuffList(buffList)
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Buff List:")
    
    for k,v in pairs(buffList) do
        -- We ignore numbered entries because both the ID and name 
        -- are stored in the list. This avoids doubling the output.
        if type(k) ~= "number" then
            DEFAULT_CHAT_FRAME:AddMessage(SILVER.."  ['..WHITE..k..SILVER..']:  "..LTBLUE.."id: "..WHITE..v.id..LTBLUE.."  stack: "..WHITE..v.stack..LTBLUE.."  time: "..WHITE..v.time)
        end
    end
    
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")    
end

local silenceList = {
        ['Annihilation']     = true,
        ['King Bug Shock']     = true,
        ['Mana Rift']         = true,
        ['Dream of Gold']     = true,
        ['Flame']             = true,
        ['Flame Spell']     = true,
        ['Wave Bomb']         = true,
        ['Silence']         = true,
        ['Recover']         = true,
        ['Restore Life']     = true,
        ['Heal']             = true,
        ['Curing Shot']     = true,
        ['Leaves of Fire']     = true,
        ['Urgent Heal']     = true,
        ['Heavy Shelling']  = true,
        ['Dark Healing']    = true,
                    }
                    
function PriestFairySequence(arg1)
    local Skill = {}
    local Skill2 = {}
    local i = 0
    local FairyExists = UnitExists("playerpet")
    local FairyBuffs = BuffList("playerpet")
    local combat = GetPlayerCombatState()

    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )

    --Summon Fairy
    if (not FairyExists) and (not combat) then
        if mainClass == "AUGUR" then
            if subClass == "THIEF" then
                Skill = {
                    { name = "Shadow Fairy",            use = true },
                        }
            elseif subClass == "RANGER" then
                Skill = {
                    { name = "Water Fairy",                use = true },
                        }
            elseif subClass == "MAGE" then
                Skill = {
                    { name = "Wind Fairy",                use = true },
                        }            
            elseif subClass == "KNIGHT" then
                Skill = {
                    { name = "Light Fairy",                use = true },
                        }            
            elseif subClass == "WARRIOR" then
                Skill = {
                    { name = "Fire Fairy",                use = true },
                        }
            end
        end
    end    
    
    --Cast Halo
    if FairyExists then
        if mainClass == "AUGUR" then
            if subClass == "THIEF" then
                if (not FairyBuffs[503459]) then
                    if (arg1 == "v1") then
                        Msg("- Activating Halo", 0, 1, 1)
                    end
                    Skill = {
                        { name = "Pet Skill: 6 (Wraith Halo)",    use = true },
                            }
                end
            elseif subClass == "RANGER" then
                if (not FairyBuffs[503457]) then
                    if (arg1 == "v1") then
                        Msg("- Activating Halo", 0, 1, 1)
                    end
                    Skill = {
                        { name = "Pet Skill: 6 (Frost Halo)",    use = true },
                            }
                end
            elseif subClass == "MAGE" then
                if (not FairyBuffs[503461]) then
                    if (arg1 == "v1") then
                        Msg("- Activating Halo", 0, 1, 1)
                    end
                    Skill = {
                        { name = "Pet Skill: 6 (Windrider Halo)",    use = true },
                            }
                end
            elseif subClass == "KNIGHT" then
                if (not FairyBuffs[503507]) then
                    if (arg1 == "v1") then
                        Msg("- Activating Halo", 0, 1, 1)
                    end
                    Skill = {
                        { name = "Pet Skill: 6 (Devotion Halo)",    use = true },
                            }
                end
            elseif subClass == "WARRIOR" then
                if (not FairyBuffs[503455]) then
                    if (arg1 == "v1") then
                        Msg("- Activating Halo", 0, 1, 1)
                    end
                    Skill = {
                        { name = "Pet Skill: 6 (Accuracy Halo)",    use = true },
                            }
                end
            end
        
            --Cast Conceal
        if (not MyCombat(Skill, arg1)) then
            if (not FairyBuffs[503753]) then
                if (arg1 == "v1") then
                    Msg("- Activating Conceal", 0, 1, 1)
                end
                Skill2 = {
                    { name = "Pet Skill: 7 (Conceal)",    use = true },
                        }
            end
        end
        end
    end
    
    if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
end
                        
function KillSequence(arg1, mode, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--healthpot = # of actionbar slot for health potions
--manapot = # of actionbar slot for mana potions
--foodslot = # of actionbar slot for food (add more args for more foodslots if needed)

    local Skill = {}
    local Skill2 = {}
    local i = 0
    
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
    local EnergyBar1 = UnitMana("player")
    local EnergyBar2 = UnitSkill("player")
    local pctEB1 = PctM("player")
    local pctEB2 = PctS("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    local behind = (not UnitIsUnit("player", "targettarget"))
    local melee = GetActionUsable(13) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(14)  -- # is your Autoshot slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
    
    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )

    --Silence Logic
    local tSpell,tTime,tElapsed = UnitCastingTime("target")
    local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)
    
    --Potion Checks
    healthpot = healthpot or 0
    manapot = manapot or 0
    
    --Equipment and Pet Protection
    if phealth <= .04 then
            --SwapEquipmentItem()        --Note: Remove the first double dash to re-enable equipment protection.
        for i=1,6 do
            if (IsPetSummoned(i) == true) then
                ReturnPet(i);
            end
        end        
    end
        
    --Check for level 1 mobs, if it is, drop target and acquire a new one.
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetUnit("")
        return
    end
    
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        --Champion = PSYRON, Warlock = HARPSYN
        
        -- Class: Warrior/Mage
            if mainClass == "WARRIOR" and subClass == "MAGE" then
                local SurpriseAttack = GetActionUsable(14)
    
            --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,            use = (phealth <= .70) },
                { name = "Survival Instinct",              use = (phealth <= .30) and combat },
                { name = "Sense of Danger",                use = (phealth <= .30) and combat },
                { name = "Action: "..manapot,              use = (pctEB2 <= .40) },
                { name = "Action: "..Healslot,             use = (phealth < .70) and (not combat) and (not party) },
                { name = "Action: "..HoTslot,              use = (phealth < .80) and (not party) },
                { name = "Intensification",                use = (pctEB2 >= .05) and (not pbuffs['Intensification']) and boss and enemy },
                { name = "Aggressiveness",                 use = boss and enemy },
                { name = "Electric Attack",                use = (pctEB2 >= .05) and ((not pbuffs['Electric Attack']) or (pbuffs['Electric Attack'].time <= 45)) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Silence",                    use = (silenceThis) },
                    { name = "Surprise Attack",            use = SurpriseAttack },
                    { name = "Enraged",                    use = (EnergyBar1 <= 30) and (boss or elite) },
                    { name = "Electrical Rage",            use = (EnergyBar1 >= 15) and (pctEB2 >=.05) and (not pbuffs['High Voltage III']) },
                    { name = "Thunder Sword",              use = (pctEB2 >= .05) },
                    { name = "Lightning's Touch",          use = (pctEB2 >= .05) },
                    { name = "Attack",                     use = (thealth == 1) },
                        }
                end

        --Class: Rogue/Priest
            elseif mainClass == "THIEF" and subClass == "AUGUR" then
            
            --Potions and Buffs
            Skill = {
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Action: "..healthpot,           use = (phealth <= .70) },
                { name = "Action: "..manapot,             use = (pctEB2 <= .40) },
                { name = "Magic Barrier",                 use = (pctEB2 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
                { name = "Quickness Aura",                use = (pctEB2 >= .05) and ((not pbuffs['Quickness Aura']) or (pbuffs['Quickness Aura'].time <= 45)) },
                { name = "Poison",                        use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45))},
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Premeditation",                use = (not combat) and boss and (EnergyBar1 >= 50) },
                    { name = "Slowing Poison",               use = boss },
                    { name = "Informer",                     use = boss },
                    { name = "Fervent Attack",               use = boss },
                    { name = "Assassins Rage",               use = boss },
                    { name = "Kick",                         use = (pctEB2 >= .05) },
                    { name = "Sneak Attack",                 use = (EnergyBar1 >= 20) and boss and behind and party },
                    { name = "Blind Spot Attack",            use = (EnergyBar1 >= 20) and boss and behind and party },
                    { name = "Shadowstab",                   use = (EnergyBar1 >= 20) and (not tbuffs[620313]) },
                    { name = "Low Blow",                     use = (EnergyBar1 >= 30) and (tbuffs[620313]) and (not tbuffs[500704]) },
                    { name = "Wound Attack",                 use = (EnergyBar1 >= 35) },
                    { name = "Shadowstab",                   use = (EnergyBar1 >= 20) },
                    { name = "Attack",                       use = (thealth == 1) },                    
                            }
                end
                
        --Class: Warden/Druid
            elseif mainClass == "WARDEN" and subClass == "DRUID" then
                
            
            --Potions and Buffs
            Skill = {
                { name = "Action: 35",                   use = ((phealth <= .60) and (pctEB1 <= .60)) },
                { name = "Action: 14",                   use = (phealth <= .60) },
                { name = "Action: 13",                   use = (phealth <= .65) },
                { name = "Action: 12",                   use = (phealth <= .70) and (not pbuffs['Mysterious Herb']) },
                { name = "Recover",                      use = (phealth <= .65) and (pctEB1 >= .05) },
                { name = "Action: 34",                   use = (pctEB1 <= .40) },
                { name = "Action: 33",                   use = (pctEB1 <= .60) },
                { name = "Action: 32",                   use = (pctEB1 <= .60) and (not pbuffs['Mysterious Magic Stone']) },
                { name = "Savage Blessing",              use = (pctEB1 >= .05) and (not pbuffs['Savage Blessing']) },
                { name = "Briar Shield",                 use = (pctEB1 >= .05) and (not pbuffs['Briar Shield']) },
                { name = "Earth Spirit Essence",         use = (pctEB1 >= .05) and (not pbuffs['Earth Spirit Essence']) },
                { name = "Protection of Nature",         use = (pctEB1 >= .05) and (not pbuffs['Protection of Nature']) },
                { name = "Action: 24",                   use = (pctEB1 >= .05) and (not pbuffs['Companion']) },
                { name = "Action: 15",                   use = (not pbuffs['Unimaginable Salad']) },
                { name = "Action: 36",                   use = (not pbuffs['Grassland Mix']) },
                { name = "Action: 61",                   use = (not pbuffs['Honey Cake']) },
                { name = "Action: 57",                   use = (not pbuffs['Hero Magic Medicine']) },
                { name = "Action: 17",                   use = (not pbuffs['Scarlet Love']) },
                { name = "Action: 38",                   use = (not pbuffs['Clear Thought']) },
                { name = "Action: 16",                   use = (not pbuffs['Magic Fruit Pie']) },
                { name = "Action: 58",                   use = (not pbuffs['Embrace of the Muse']) },
                { name = "Heart of the Oak",             use = (pctEB1 >= .05) },
                    }
                            
            --Combat
                if enemy and (mode == "single") then
                Skill2 = {
                    { name = "Action: 18",                  use = (not pbuffs['Pungent Vileness']) and party },
                    { name = "Cross Chop",                  use = (pctEB1 >= .05) },
                    { name = "Thorn Sigil",                 use = (pctEB1 >= .05) },
                    { name = "Charged Chop",                use = (pctEB1 >= .05) },
                    { name = "Blade of Protection",         use = (pctEB1 >= .05) },
                    { name = "Damage Transfer",             use = (pctEB1 >= .05) and (phealth <= .90) },
                    { name = "Savage Power",                use = (pctEB1 >= .10) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Connection']) },
                    { name = "Energy Absorb",               use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Connection']) },
                    { name = "Power of the Oak",            use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Connection']) },
                    { name = "Elven Guidance",              use = (pctEB1 <= .70) and (pctEB1 >= .05) },
                    { name = "Elven Prayer",                use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) },
                    { name = "Elven Amulet",                use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Mother Earth's Protection']) },
                    { name = "Mother Earth's Protection",   use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Explosion of Power",          use = (pctEB1 >= .10) and (boss or elite or enemy) },
                    { name = "Thorny Vines",                use = (pctEB1 >= .05) },
                    { name = "Frantic Briar",               use = (pctEB1 >= .05) },
                    { name = "Pet Skill: 7",                use = true },
                            }
                elseif enemy and (mode == "multiple") then
                Skill2 = {
                    { name = "Action: 18",                  use = (not pbuffs['Pungent Vileness']) and party },
                    { name = "Cross Chop",                  use = (pctEB1 >= .05) },
                    { name = "Thorn Sigil",                 use = (pctEB1 >= .05) },
                    { name = "Power of the Wood Spirit",    use = (pctEB1 >= .05) },
                    { name = "Damage Transfer",             use = (pctEB1 >= .05) and (phealth <= .90) },
                    { name = "Blade of Protection",         use = (pctEB1 >= .05) },
                    { name = "Frantic Briar",               use = (pctEB1 >= .05) },
                    { name = "Savage Power",                use = (pctEB1 >= .10) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Connection']) },
                    { name = "Energy Absorb",               use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Connection']) },
                    { name = "Power of the Oak",            use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Connection']) },
                    { name = "Elven Guidance",              use = (pctEB1 <= .70) and (pctEB1 >= .05) },
                    { name = "Elven Prayer",                use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) },
                    { name = "Elven Amulet",                use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Mother Earth's Protection']) },
                    { name = "Mother Earth's Protection",   use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Explosion of Power",          use = (pctEB1 >= .10) },
                    { name = "Thorny Vines",                use = (pctEB1 >= .05) },
                    { name = "Pet Skill: 7",                use = true },
                            }            
                elseif enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Action: 44",                  use = (pctEB1 >= .05) and (not pbuffs['Tranquil Wave']) },
                    { name = "Cross Chop",                  use = (pctEB1 >= .05) },
                    { name = "Charged Chop",                use = (pctEB1 >= .05) },
                    { name = "Blade of Protection",         use = (pctEB1 >= .05) },
                    { name = "Damage Transfer",             use = (pctEB1 >= .05) and (phealth <= .90) },
                    { name = "Savage Power",                use = (pctEB1 >= .10) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Connection']) },
                    { name = "Energy Absorb",               use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Connection']) },
                    { name = "Power of the Oak",            use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Connection']) },
                    { name = "Elven Guidance",              use = (pctEB1 <= .70) and (pctEB1 >= .05) },
                    { name = "Elven Prayer",                use = (pctEB1 >= .10) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) },
                    { name = "Elven Amulet",                use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Mother Earth's Protection']) },
                    { name = "Mother Earth's Protection",   use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Explosion of Power",          use = (pctEB1 >= .10) },
                    { name = "Thorny Vines",                use = (pctEB1 >= .05) },
                    { name = "Frantic Briar",               use = (pctEB1 >= .05) },
                    { name = "Pet Skill: 7",                use = true },
                            }
                end    
                
        --Class: Druid/Warden
            elseif mainClass == "DRUID" and subClass == "WARDEN" then

            --Potions and Buffs
            Skill = {
                { name = "Action: 36",                    use = (phealth <= .50) and (pctEB1 <= .50) },
                { name = "Action: 15",                    use = (phealth <= .20) },
                { name = "Action: 13",                    use = (phealth <= .45) and (not pbuffs['Herbs of Omnipotence']) },
                { name = "Action: 35",                    use = (pctEB1 <= .70) },
                { name = "Action: 33",                    use = (pctEB1 <= .75) and (not pbuffs['Elemental Stone of Omnipotence']) },
                { name = "Action: 30",                    use = (not pbuffs['Nature's Power'] or pbuffs['Nature's Power'].stack < 2) },
                { name = "Essence Extraction",            use = (pctEB1 >= .10) and (not pbuffs['Nature's Power'] or pbuffs['Nature's Power'].stack < 4) },
                { name = "Mother Earth's Fountain",       use = (phealth <= .45) and (pctEB1 >= .05) },
                { name = "Blossoming Life",               use = (phealth <= .90) and (pctEB1 >= .05) and (not pbuffs['Blossoming Life']) },
                { name = "Recover",                       use = (phealth <= .65) and (pctEB1 >= .05) and (not pbuffs['Recover']) },
                { name = "Restore Life",                  use = (phealth <= .50) and (pctEB1 >= .05) },
                { name = "Savage Blessing",               use = (pctEB1 >= .05) and (not pbuffs['Savage Blessing']) },
                { name = "Grace of the Forest",           use = (pctEB1 >= .05) and (not pbuffs['Grace of the Forest']) },
                { name = "Mysterious Grace",              use = (pctEB1 >= .05) and (not pbuffs['Mysterious Grace']) },
                { name = "Briar Shield",                  use = (pctEB1 >= .05) and (not pbuffs['Briar Shield']) },
                { name = "Concentration Prayer",          use = (pctEB1 >= .05) and (not pbuffs['Concentration Prayer']) },
                { name = "Action: 16",                    use = (not pbuffs['Cheese Fishcake']) },
                { name = "Action: 18",                    use = (not pbuffs['Clear Thought']) },
                { name = "Action: 38",                    use = (not pbuffs['Scarlet Love']) },
                { name = "Action: 61",                    use = (not pbuffs['Embrace of the Muse']) },
                { name = "Action: 62",                    use = (not pbuffs['Magic Fruit Pie']) },
                    }
            
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Binding Silence",               use = (silenceThis) and (pctEB1 >= .05) },
                    { name = "Withering Seed",                use = (pctEB1 >= .05) and (boss or elite or enemy) and (not tbuffs['Withering Seed']) },
                    { name = "Weakening Seed",                use = (pctEB1 >= .05) and (boss or elite or enemy) and (not tbuffs['Weakening Seed']) },
                    { name = "Action: 29",                    use = (pctEB1 >= .05) and (boss or elite or enemy) and (not tbuffs['Blinding Seeds']) },
                    { name = "Charged Chop",                  use = (pctEB1 >= .05) },
                    { name = "Unity with Mother Earth",       use = (pctEB1 >= .05) and (boss or elite or enemy) },
                    { name = "Rock Protection",               use = (pctEB1 >= .05) and (phealth <= .90) and (not pbuffs['Mother Earth's Protection']) and (not pbuffs['Elven Amulet']) },
                    { name = "Mother Earth's Protection",     use = (pctEB1 >= .05) and (phealth <= .90) and (not pbuffs['Rock Protection']) and (not pbuffs['Elven Amulet']) },
                    { name = "Elven Amulet",                  use = (pctEB1 >= .05) and (phealth <= .90) and (not pbuffs['Mother Earth's Protection']) and (not pbuffs['Rock Protection']) },
                    { name = "Briar Entwinement",             use = (pctEB1 >= .05) and (not tbuffs['Briar Entwinement']) },
                    { name = "Earth Pulse",                   use = (pctEB1 >= .05) },
                    { name = "Mother Nature's Wrath",         use = (pctEB1 >= .05) and (not tbuffs['Mother Earth's Wrath']) },
                    { name = "Rockslide",                     use = (pctEB1 >= .05) and (not tbuffs['Rockslide']) },
                    { name = "Earth Arrow",                   use = (pctEB1 >= .05) },
                            }
                    end
                    
        --Class: Champion/Priest
            elseif mainClass == "PSYRON" and subClass == "AUGUR" then
                local melee = GetActionUsable(25)
            
            --Potions and Buffs
            Skill = {
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Urgent Heal",                   use = (phealth <= .65) and (pctEB2 >= .05) },
                { name = "Rune Energy Influx",            use = (phealth <= .75) and (EnergyBar1 >= 10) },
                { name = "Action: 14",                    use = (phealth <= .60) },
                { name = "Action: 13",                    use = (phealth <= .70) and (not pbuffs['Spirit Herb']) },
                { name = "Action: 34",                    use = (pctEB2 <= .50)  and (not pbuffs['Rune Energy Consecration']) },
                { name = "Action: 33",                    use = (pctEB2 <= .70) and (not pbuffs['Elemental Spirit Stone'])  and (not pbuffs['Rune Energy Consecration']) },
                { name = "Magic Barrier",                 use = (pctEB2 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
                { name = "Blessed Spring Water",          use = (pctEB2 >= .05) and (not pbuffs['Blessed Spring Water']) },
                { name = "Forge",                         use = (not pbuffs['Forge']) },
                { name = "Action: 16",                    use = (not pbuffs['Unimaginable Salad']) },
                { name = "Action: 37",                    use = (not pbuffs['Scarlet Love']) },
                { name = "Action: 38",                    use = (not pbuffs['Clear Thought']) },
                    }
                            
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Vacuum Wave",                 use = (silenceThis) and (EnergyBar1 >= 40) },
                    { name = "Rune Pulse",                  use = (not combat) },
                    { name = "Rune Pulse",                  use = (pbuffs['Chain Drive']) },
                    { name = "Fearless Blow",               use = (EnergyBar1 >= 20) and (thealth <= .30) },
                    { name = "Energy Influx Strike",        use = (EnergyBar1 >= 25) and (tbuffs['Electrocution']) },
                    { name = "Electrocution",               use = (EnergyBar1 >= 20) and (not tbuffs['Electrocution']) },
                    { name = "Holy Aura",                   use = (pctEB2 >= .02) and (boss or elite or enemy) and (not pbuffs['Holy Aura']) },
                    { name = "Rune Growth",                 use = (boss or elite or enemy) and (not pbuffs['Rune Growth']) },
                    { name = "Rune Energy Consecration",    use = (pctEB2 <= .60) and ((EnergyBar1 >= 10) and (pctEB2 >= .02)) and (boss or elite or enemy) },
                    { name = "Light Pulse",                 use = (pctEB2 >= .05) and melee },
                    { name = "Holy Attack",                 use = (pctEB2 >= .05) },
                    { name = "Suicide Advance",             use = (pctEB2 >= .05) and boss and party },
                    { name = "Heavy Bash",                  use = (EnergyBar1 >= 20) and (not tbuffs['Heavy Bash'] or tbuffs['Heavy Bash'].stack < 3) },
                    { name = "Shock Strike",                use = (EnergyBar1 >= 20) },
                    { name = "Kinetic Burn",                use = (EnergyBar1 >= 30) },
                    { name = "Imprisonment Pulse",          use = (EnergyBar1 >= 30) },
                    { name = "Attack",                      use = (thealth == 1) },
                            }
                end            
            
        --Class: Priest/Champion
            elseif mainClass == "AUGUR" and subClass == "PSYRON" then
            
            --Potions and Buffs
            Skill = {
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB1 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Heart Rune Energy",             use = (phealth <= .75) and (EnergyBar2 >= 20) },
                { name = "Urgent Heal",                   use = (phealth <= .65) and (pctEB1 >= .05) },
                { name = "Diamond Light Activation",      use = (pctEB1 <= .65) and (EnergyBar2 >= 30) },
                { name = "Action: 14",                    use = (phealth <= .60) },
                { name = "Action: 13",                    use = (phealth <= .70) and (not pbuffs['Potent Regeneration Mixture']) },
                { name = "Action: 34",                    use = (pctEB1 <= .60) },
                { name = "Action: 33",                    use = (pctEB1 <= .70) and (not pbuffs['Potent Crystal Mana Medicine']) },
                { name = "Magic Barrier",                 use = (pctEB1 >= .05) and ((not pbuffs['Magic Barrier']) or (pbuffs['Magic Barrier'].time <= 45)) },
                { name = "Grace of Life",                 use = (pctEB1 >= .05) and ((not pbuffs['Grace of Life']) or (pbuffs['Grace of Life'].time <= 45)) },
                { name = "Amplified Attack",              use = (pctEB1 >= .05) and ((not pbuffs['Amplified Attack']) or (pbuffs['Amplified Attack'].time <= 45)) },
                { name = "Blessed Spring Water",          use = (pctEB1 >= .05) and ((not pbuffs['Blessed Spring Water']) or (pbuffs['Blessed Spring Water'].time <= 45)) },
                { name = "Wave Armor",                    use = (pctEB1 >= .05) and (not pbuffs['Wave Armor']) },
                { name = "Action: 17",                    use = (not pbuffs['Cheese Fishcake']) },
                { name = "Action: 18",                    use = (not pbuffs['Clear Thought']) },
                    }
                    
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Holy Aura",                   use = (pctEB1 >= .02) and (boss or elite) and (not pbuffs['Holy Aura']) },
                    { name = "Ice Fog",                     use = (pctEB1 >= .05) and (not combat) },
                    { name = "Bone Chill",                  use = (pctEB1 >= .05) and (not tbuffs['Bone Chill']) },
                    { name = "Rune Footstep",              use = (EnergyBar1 >= 20) and (not tbuffs['Rune Footstep']) and party },
                    { name = "Energy Influx Strike",        use = (EnergyBar2 >= 25) and (tbuffs['Electrocution']) },
                    { name = "Electrocution",               use = (EnergyBar2 >= 20) and (not tbuffs['Electrocution']) },
                    { name = "Heavy Bash",                  use = (EnergyBar2 >= 20) and (not tbuffs['Heavy Bash'] or tbuffs['Heavy Bash'].stack < 3) },
                    { name = "Shock Strike",                use = (EnergyBar2 >= 20) },
                    { name = "Rising Tide",                 use = (pctEB1 >= .05) },
                    { name = "Chain of Light",              use = (EnergyBar2 <= 20) and (pctEB1 >= .10) },
                            }
                end    

        --Class: Warlock/Champion
            elseif mainClass == "HARPSYN" and subClass == "PSYRON" then
            
            --Potions and Buffs
            Skill = {
                { name = "Action: 35",                   use = (phealth <= .60) },
                { name = "Action: 34",                   use = (phealth <= .70) and (not pbuffs['Potent Regeneration Mixture']) },
                { name = "Action: 17",                   use = (not pbuffs['Cheese Fishcake']) },
                { name = "Action: 18",                   use = (not pbuffs['Clear Thought']) },
                { name = "Saces' Fury",                  use = (EnergyBar2 >= 10) and (not pbuffs['Saces' Fury']) },
                { name = "Mind Rune",                    use = (EnergyBar1 >= 15) and (not pbuffs['Mind Rune']) },
                { name = "Sublimation Weave Curse",      use = (EnergyBar1 >= 50) and (not pbuffs['Sublimation Weave Curse']) },
                    }
                    
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Rune Energy Devotion",       use = party },
                    { name = "Perplexed",                  use = (EnergyBar1 >= 25) and (not combat) and (not boss) },
                    { name = "Weakening Weave Curse",      use = (EnergyBar1 >= 20) and (not tbuffs['Weakened']) },
                    { name = "Soul Pain",                  use = (EnergyBar1 >= 15) and (not tbuffs['Soul Pain']) },
                    { name = "Perception Extraction",      use = (EnergyBar1 >= 15) and (not tbuffs['Perception Extraction']) },
                    { name = "Electrocution",              use = (EnergyBar2 >= 20) and (not tbuffs['Electrocution']) },
                    { name = "Soul Trauma",                use = (EnergyBar1 >= 25) and (tbuffs['Weakened']) },
                    { name = "Warp Charge",                use = (EnergyBar1 >= 30) and (tbuffs['Weakened']) },
                    { name = "Surge of Malice",            use = (EnergyBar1 >= 20) and (tbuffs['Weakened']) },
                    { name = "Puzzlement",                 use = (EnergyBar1 >= 20) },
                    { name = "Heart Collection Strike",    use = true },
                    { name = "Psychic Arrows",             use = (EnergyBar1 >= 20) },
                            }
                end    
        
        --Class: Warden/Rogue
            elseif mainClass == "WARDEN" and subClass == "THIEF" then
            
            --Potions and Buffs
            Skill = {
                { name = "Action: 15",                   use = (phealth <= .60) },
                { name = "Action: 14",                   use = (phealth <= .65) },
                { name = "Action: 13",                   use = (phealth <= .70) and (not pbuffs['Infinite Herb']) },
                { name = "Action: 35",                   use = (pctEB1 <= .50) },
                { name = "Action: 33",                   use = (pctEB1 <= .70) and (not pbuffs['Infinite Elemental Stone']) },
                { name = "Briar Shield",                 use = (pctEB1 >= .05) and (not pbuffs['Briar Shield']) },
                { name = "Heart of the Oak",             use = (pctEB1 >= .05) },
                { name = "Action: 42",                   use = (pctEB1 >= .05) and (not pbuffs['Tranquil Wave']) },
                { name = "Protection of Nature",         use = (pctEB1 >= .05) and (not pbuffs['Protection of Nature']) },
                { name = "Elven Guidance",               use = (pctEB1 <= .70) and (pctEB1 >= .05) },
                { name = "Action: 16",                   use = (not pbuffs['Spicy Meatsauce Burrito']) },
                    }
                            
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Cross Chop",                  use = (pctEB1 >= .05) },
                    { name = "Power of the Wood Spirit",    use = (pctEB1 >= .05) and (thealth <= .30) },
                    { name = "Charged Chop",                use = (pctEB1 >= .05) },
                    { name = "Savage Power",                use = (pctEB1 >= .05) and (boss or elite) and (not pbuffs['Power of the Oak']) and (not pbuffs['Energy Absorb']) },
                    { name = "Power of the Oak",            use = (pctEB1 >= .05) and (boss or elite) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) },
                    { name = "Energy Absorb",               use = (pctEB1 >= .05) and (boss or elite) and (not pbuffs['Savage Power']) and (not pbuffs['Power of the Oak']) },
                    { name = "Elven Amulet",                use = (pctEB1 >= .05) and (phealth <= .90) },
                    { name = "Explosion of Power",          use = (pctEB1 >= .05) and (boss or elite or enemy) },
                    { name = "Together",                    use = (EnergyBar2 >= 50) and (boss or elite or enemy) },
                    { name = "Thorny Vines",                use = (pctEB1 >= .05) },
                    { name = "Gravel Attack",               use = (EnergyBar2 >= 30) },
                    { name = "Achilles' Heel Strike",       use = (EnergyBar2 >= 30) },
                    { name = "Throw",                       use = true },
                    { name = "Frantic Briar",               use = (pctEB1 >= .05) },
                            }            
                end    
            
            --Class: Rogue/Warden
            elseif mainClass == "THIEF" and subClass == "WARDEN" then
            
            --Potions and Buffs
            Skill = {
                { name = "Briar Shield",                  use = (pctEB2 >= .05) and (not pbuffs['Briar Shield']) },
                { name = "Action: 37",                    use = ((phealth <= .70) and (pctEB2 <= .70)) },
                { name = "Action: 14",                    use = (phealth <= .70) and (not pbuffs['Spirit Herb']) },
                { name = "Action: 16",                    use = (phealth <= .65) },
                { name = "Action: 36",                    use = (pctEB2 <= .80) },
                { name = "Action: 34",                    use = (pctEB2 <= .40) and (not pbuffs['Elemental Spirit Stone']) },
                { name = "Wound Patch",                   use = (EnergyBar1 >= 50) and (not pbuffs['Wound Patch']) },
                { name = "Poison",                        use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45)) },
                { name = "Action: 17",                    use = (not pbuffs['Spicy Meatsauce Burrito']) },
                    }
                    
            --Combat
                if enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Premeditation",                use = (not combat) and (boss or elite or enemy) and (EnergyBar1 >= 50) },
                    { name = "Evasion",                      use = (boss or elite or enemy) },
                    { name = "Informer",                     use = (boss or elite or enemy) },
                    { name = "Fervent Attack",               use = (boss or elite or enemy) },
                    { name = "Assassins Rage",               use = (boss or elite or enemy) },
                    { name = "Savage Power",                 use = (pctEB2 >= .05) and (boss or elite or enemy) },
                    { name = "Elven Amulet",                 use = (pctEB2 >= .05) and (phealth <= .90) },
                    { name = "Phantom Blade",                use = (pctEB2 >= .05) and (boss or elite or enemy) },
                    { name = "Charged Chop",                 use = (pctEB2 >= .05) },
                    { name = "Blind Spot",                   use = (EnergyBar1 >= 25) and boss and behind and party },
                    { name = "Shadowstab",                   use = (EnergyBar1 >= 20) and (not tbuffs['Bleed']) },
                    { name = "Low Blow",                     use = (EnergyBar1 >= 30) and (tbuffs['Bleed']) and (not tbuffs['Grievous Wound']) },
                    { name = "Wound Attack",                 use = (EnergyBar1 >= 35) },
                    { name = "Bloodthirsty Blade",           use = (pctEB2 >= .05) },
                    { name = "Weak Point Strike",            use = (pctEB2 >= .05) },
                    { name = "Combo Throw",                  use = true },
                    { name = "Attack",                       use = (thealth == 1) },                    
                            }
                end
            
            --Class: Warden/Warrior
            elseif mainClass == "WARDEN" and subClass == "WARRIOR" then
            
            --Potions and Buffs
            Skill = {
                { name = "Action: 15",                   use = (phealth <= .60) },
                { name = "Action: 14",                   use = (phealth <= .65) },
                { name = "Action: 13",                   use = (phealth <= .70) and (not pbuffs['Spirit Herb']) },
                { name = "Action: 35",                   use = (pctEB1 <= .50) },
                { name = "Action: 33",                   use = (pctEB1 <= .70) and (not pbuffs['Elemental Spirit Stone']) },
                { name = "Briar Shield",                 use = (pctEB1 >= .05) and (not pbuffs['Briar Shield']) },
                { name = "Heart of the Oak",             use = (pctEB1 >= .05) and (not pbuffs['Immortal Power']) },
                { name = "Immortal Power",               use = (pctEB1 >= .05) and (not pbuffs['Heart of the Oak']) },
                { name = "Protection of Nature",         use = (pctEB1 >= .05) and (not pbuffs['Protection of Nature']) },
                { name = "Elven Guidance",               use = (pctEB1 <= .70) and (pctEB1 >= .05) },
                { name = "Action: 16",                   use = (not pbuffs['Caviar Sandwich']) },
                { name = "Enraged",                      use = (EnergyBar2 <=30) },
                    }
                            
            --Combat
                if enemy and (mode == "single") then
                Skill2 = {
                    { name = "Cross Chop",                  use = (pctEB1 >= .05) },
                    { name = "Ire",                         use = (pctEB1 >= .05) and party and (boss or elite) and behind },
                    { name = "Charged Chop",                use = (pctEB1 >= .05) },
                    { name = "Pulse Mastery",               use = (EnergyBar2 >= 20) and (tbuffs['Beast Sigil']) },
                    { name = "Savage Power",                use = (pctEB1 >= .10) and (boss or elite or enemy) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Berserk']) },
                    { name = "Energy Absorb",               use = (pctEB1 >= .10) and (boss or elite or enemy) and (not pbuffs['Savage Power']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Berserk']) },
                    { name = "Power of the Oak",            use = (pctEB1 >= .10) and (boss or elite or enemy) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Berserk']) },
                    { name = "Berserk",                     use = (EnergyBar2 >= 25) and (boss or elite or enemy) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) },
                    { name = "Elven Amulet",                use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Defensive Formation']) },
                    { name = "Defensive Formation",         use = (EnergyBar2 >= 25) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Explosion of Power",          use = (pctEB1 >= .10) and (boss or elite or enemy) },
                    { name = "Beast Chop",                  use = (EnergyBar2 >= 20) },
                    { name = "Double Chop",                 use = (pctEB1 >= .05) },
                    { name = "Frantic Briar",               use = (pctEB1 >= .05) },
                    { name = "Slash",                       use = (EnergyBar2 >= 25) and (not tbuffs['Bleed']) },
                    { name = "Thorny Vines",                use = (pctEB1 >= .05) },
                            }
                elseif enemy and (mode == "multiple") then
                Skill2 = {
                    { name = "Cross Chop",                  use = (pctEB1 >= .05) },
                    { name = "Ire",                         use = (pctEB1 >= .05) and party and (boss or elite) and behind },
                    { name = "Power of the Wood Spirit",    use = (pctEB1 >= .05) },
                    { name = "Pulse Mastery",               use = (EnergyBar2 >= 20) and (tbuffs['Beast Sigil']) },
                    { name = "Savage Power",                use = (pctEB1 >= .10) and (boss or elite or enemy) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Berserk']) },
                    { name = "Energy Absorb",               use = (pctEB1 >= .10) and (boss or elite or enemy) and (not pbuffs['Savage Power']) and (not pbuffs['Power of the Oak']) and (not pbuffs['Berserk']) },
                    { name = "Power of the Oak",            use = (pctEB1 >= .10) and (boss or elite or enemy) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Berserk']) },
                    { name = "Berserk",                     use = (EnergyBar2 >= 25) and (boss or elite or enemy) and (not pbuffs['Savage Power']) and (not pbuffs['Energy Absorb']) and (not pbuffs['Power of the Oak']) },
                    { name = "Elven Amulet",                use = (pctEB1 >= .10) and (phealth <= .90) and (not pbuffs['Defensive Formation']) },
                    { name = "Defensive Formation",         use = (EnergyBar2 >= 25) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Explosion of Power",          use = (pctEB1 >= .10) and (boss or elite or enemy) },
                    { name = "Frantic Briar",               use = (pctEB1 >= .05) },
                    { name = "Whirlwind",                   use = (EnergyBar2 >= 50) },
                    { name = "Beast Chop",                  use = (EnergyBar2 >= 20) },
                    { name = "Double Chop",                 use = (pctEB1 >= .05) },
                    { name = "Slash",                       use = (EnergyBar2 >= 25) and (not tbuffs['Bleed']) },
                    { name = "Thorny Vines",                use = (pctEB1 >= .05) },
                            }            
                end
            
            -- Class: Warrior/Warden
            elseif mainClass == "WARRIOR" and subClass == "WARDEN" then
                local SurpriseAttack = GetActionUsable(3)
    
            --Potions and Buffs
            Skill = {
                { name = "Briar Shield",                   use = (pctEB2 >= .05) and (not pbuffs['Briar Shield']) },
                { name = "Action: 36",                     use = ((phealth <= .80) and (pctEB2 <= .80)) },
                { name = "Action: 15",                     use = (phealth <= .80) },
                { name = "Action: 13",                     use = (phealth <= .70) and (not pbuffs['Spirit Herb']) },
                { name = "Action: 35",                     use = (pctEB2 <= .80) },
                { name = "Action: 33",                     use = (pctEB2 <= .40) and (not pbuffs['Elemental Spirit Stone']) },
                { name = "Survival Instinct",              use = (phealth <= .30) and combat },
                { name = "Aggressiveness",                 use = boss and enemy },
                { name = "Action: 16",                     use = (not pbuffs['Caviar Sandwich']) },
                    }
                    
            --Combat
                if enemy and (mode == "single") then
                Skill2 = {
                    { name = "Surprise Attack",            use = SurpriseAttack },
                    { name = "Charged Chop",               use = (pctEB2 >= .05) },
                    { name = "Enraged",                    use = (EnergyBar1 <= 30) and (boss or elite) },
                    { name = "Frenzy",                     use = (boss or elite or enemy) and (not pbuffs['Berserk']) and (not pbuffs['Savage Power']) },
                    { name = "Savage Power",               use = (EnergyBar2 >= 200) and (boss or elite or enemy) and (not pbuffs['Frenzy']) and (not pbuffs['Berserk']) },
                    { name = "Berserk",                    use = (EnergyBar1 >= 25) and (boss or elite or enemy) and (not pbuffs['Frenzy']) and (not pbuffs['Saveage Power']) },
                    { name = "Defensive Formation",        use = (EnergyBar1 >= 25) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Elven Amulet",               use = (EnergyBar2 >= 150) and (phealth <= .90) and (not pbuffs['Defensive Formation']) },
                    { name = "Attack Weakener",            use = (pctEB2 >= .05) and (tbuffs['Vulnerable']) },
                    { name = "Thunder",                    use = (EnergyBar1 >= 15) and (tbuffs['Weakened']) },
                    { name = "Open Flank",                 use = (EnergyBar1 >= 10) and (tbuffs['Vulnerable']) },
                    { name = "Savage Whirlwind",           use = (pctEB2 >= .05) },
                    { name = "Slash",                      use = (EnergyBar1 >= 25) and (not tbuffs['Bleed']) },
                    { name = "Probing Attack",             use = (EnergyBar1 >= .20) and (not tbuffs['Vulnerable']) },
                    { name = "Attack",                     use = (thealth == 1) },
                        }
                elseif enemy and (mode == "multiple") then
                Skill2 = {
                    { name = "Surprise Attack",            use = SurpriseAttack },
                    { name = "Power of the Wood Spirit",   use = (pctEB2 >= .05) },
                    { name = "Enraged",                    use = (EnergyBar1 <= 30) and (boss or elite or enemy) },
                    { name = "Group Taunt",                use = party and (boss or elite) and behind },
                    { name = "Taunt",                      use = party and (boss or elite) and behind },
                    { name = "Frenzy",                     use = (boss or elite or enemy) and (not pbuffs['Berserk']) and (not pbuffs['Savage Power']) },
                    { name = "Savage Power",               use = (EnergyBar2 >= 200) and (boss or elite or enemy) and (not pbuffs['Frenzy']) and (not pbuffs['Berserk']) },
                    { name = "Berserk",                    use = (EnergyBar1 >= 25) and (boss or elite or enemy) and (not pbuffs['Frenzy']) and (not pbuffs['Saveage Power']) },
                    { name = "Defensive Formation",        use = (EnergyBar1 >= 25) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Elven Amulet",               use = (EnergyBar2 >= 150) and (phealth <= .90) and (not pbuffs['Defensive Formation']) },
                    { name = "Whirlwind",                  use = (EnergyBar1 >= 50) },
                    { name = "Shout",                      use = (EnergyBar1 >= 30) },
                    { name = "Blasting Cyclone",           use = (EnergyBar1 >= 35) },
                    { name = "Air Tremor",                 use = (pctEB2 >= .05) },
                    { name = "Attack Weakener",            use = (pctEB2 >= .05) and (tbuffs['Vulnerable']) },
                    { name = "Thunder",                    use = (EnergyBar1 >= 15) and (tbuffs['Weakened']) },
                    { name = "Open Flank",                 use = (EnergyBar1 >= 10) and (tbuffs['Vulnerable']) },
                    { name = "Savage Whirlwind",           use = (pctEB2 >= .05) },
                    { name = "Slash",                      use = (EnergyBar1 >= 25) and (not tbuffs['Bleed']) },
                    { name = "Probing Attack",             use = (EnergyBar1 >= .20) and (not tbuffs['Vulnerable']) },
                    { name = "Attack",                     use = (thealth == 1) },
                        }
                elseif enemy and (mode == "DPS") then
                Skill2 = {
                    { name = "Battle Creed",               use = (EnergyBar2 >= 30) and (not pbuffs['Battle Creed']) },
                    { name = "Surprise Attack",            use = SurpriseAttack },
                    { name = "Charged Chop",               use = (pctEB2 >= .05) },
                    { name = "Enraged",                    use = (EnergyBar1 <= 30) and (boss or elite or enemy) },
                    { name = "Frenzy",                     use = (boss or elite or enemy) and (not pbuffs['Berserk']) and (not pbuffs['Savage Power']) },
                    { name = "Savage Power",               use = (EnergyBar2 >= 200) and (boss or elite or enemy) and (not pbuffs['Frenzy']) and (not pbuffs['Berserk']) },
                    { name = "Berserk",                    use = (EnergyBar1 >= 25) and (boss or elite or enemy) and (not pbuffs['Frenzy']) and (not pbuffs['Saveage Power']) },
                    { name = "Defensive Formation",        use = (EnergyBar1 >= 25) and (phealth <= .90) and (not pbuffs['Elven Amulet']) },
                    { name = "Elven Amulet",               use = (EnergyBar2 >= 150) and (phealth <= .90) and (not pbuffs['Defensive Formation']) },
                    { name = "Attack Weakener",            use = (pctEB2 >= .05) and (tbuffs['Vulnerable']) },
                    { name = "Thunder",                    use = (EnergyBar1 >= 15) and (tbuffs['Weakened']) },
                    { name = "Open Flank",                 use = (EnergyBar1 >= 10) and (tbuffs['Vulnerable']) },
                    { name = "Savage Whirlwind",           use = (pctEB2 >= .05) },
                    { name = "Slash",                      use = (EnergyBar1 >= 25) and (not tbuffs['Bleed']) },
                    { name = "Probing Attack",             use = (EnergyBar1 >= .20) and (not tbuffs['Vulnerable']) },
                    { name = "Attack",                     use = (thealth == 1) },
                        }        
                end
            
            --ADD MORE CLASS COMBOS HERE. 
            --USE AN "ELSEIF" TO CONTINUE WITH MORE CLASS COMBOS.
            --THE NEXT "END" STATEMENT IS THE END OF THE CLASS COMBOS STATEMENTS.
            --DO NOT POST BELOW THE FOLLOWING "END" STATEMENT!
            end
    --End Player Skill Sequences
    
    if (arg1=="debugskills") then        --Used for printing the skill table, and true/false usability
        DIYCE_DebugSkills(Skill)
        DIYCE_DebugSkills(Skill2)
    elseif (arg1=="debugpbuffs") then    --Used for printing your buff names, and buffID
        DIYCE_DebugBuffList(pbuffs)
    elseif (arg1=="debugtbuffs") then    --Used for printing target buff names, and buffID
        DIYCE_DebugBuffList(tbuffs)
    elseif (arg1=="debugall") then        --Used for printing all of the above at the same time
        DIYCE_DebugSkills(Skill)
        DIYCE_DebugSkills(Skill2)
        DIYCE_DebugBuffList(pbuffs)
        DIYCE_DebugBuffList(tbuffs)
    end
    
    if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
        
    --Select Next Enemy
    if (tDead) then
        TargetUnit("")
        return
    end
    if mainClass == "RANGER" and (not party) then        --To keep scouts from pulling mobs without meaning to.
        if (not LockedOn) or (not enemy) then
            TargetNearestEnemy()
            return
        end
    elseif mainClass ~= "RANGER" then                    --Let all other classes auto target.
        if (not LockedOn) or (not enemy) then
            TargetNearestEnemy()
            return
        end
    end
end


Hmm as I was looking at this, I noticed there wasn't a SupriseAttack in the function list. Yet when I put a local for it on my w/wrdn combo it works just fine. So what if I were to pull the local melee from the function list and just leave it under the class combo as with supriseattack? But I am thinking something else is going on within the champ/priest combo. I seem to remember even before adding the melee check, I would have trouble staying in attack mode. I was doing the cart event outside Dalanis and when one bandit would die, from time to time I would actually have to manually click his next target to put him into combat.

Amberwave

Intermediate

Posts: 369

Location: Chicagoland

  • Send private message

893

Friday, January 11th 2013, 2:41am

The problem with Champion/Priest is that they do not have a spamable, range 50 skill, which is what "local melee" has always used. Using Heavy Bash is the best shot, but if you do not have rage, you will fail the melee check. You could use Holy Attack as a melee check if you do not actually use the skill, as it has a 20 sec cool down. I tried just using attack as the melee check, but it always seems to be available, so that does not work. So currently I have no melee check for my Ch/P. I do not see where you Divine Vengence, I got Divine Vengeance to work by creating

local DV = GetActionUsable(23) --location of Divine Vengeance

and using Divine Vengeance as its own melee check.

{ name = "Divine Vengeance", use = ((EnergyBar1 >= 15) and (DV)) },

894

Friday, January 11th 2013, 3:58am

Quoted from "Amberwave;584183"

The problem with Champion/Priest is that they do not have a spamable, range 50 skill, which is what "local melee" has always used. Using Heavy Bash is the best shot, but if you do not have rage, you will fail the melee check. You could use Holy Attack as a melee check if you do not actually use the skill, as it has a 20 sec cool down. I tried just using attack as the melee check, but it always seems to be available, so that does not work. So currently I have no melee check for my Ch/P. I do not see where you Divine Vengence, I got Divine Vengeance to work by creating

local DV = GetActionUsable(23) --location of Divine Vengeance

and using Divine Vengeance as its own melee check.

{ name = "Divine Vengeance", use = ((EnergyBar1 >= 15) and (DV)) },


Since I have tanking on wrdn/w and wrdn/d I went with a more out and out DPS for my champ/p so I don't use shield form as the moves it uses and how it changes the moves I use for DPS, trades attack for aggro.


So that's the problem... When I don't have rage I am being pulled from attack because its all coming up false... Same for when I switched it to melee check on Holy Attack because it is on cool down... Looks like though I want it on high priority, to actually use it I will have to drop it lower on the list. OK. Well actually with such a CD on Holy Attack, that's not going to help either... I guess I am just going to have to be more aware of where I am when I hit the macro.

895

Friday, January 18th 2013, 1:04am

So speaking with Mr. Paz about diyce a couple days ago, he brought up an interesting point about zone ID checks, target class checks, etc in locals being ran with each press of the diyce button, which ups the time the function takes to execute the next skill.

Would it be possible to remove these locals:

Source code

1
2
3
4
local zoneid = (GetZoneID() % 1000)
    local pvp = (zoneid == 402)
    local arena = ((zoneid == 440) or (zoneid == 442) or (zoneid == 443))
    local TrgtMainClass, TrgtSecClass = UnitClassToken("target")

(theres more, but thats the jist of it)

and have them run only when a specific class combo is chosen? For example, if I have a w/m diyce, which I only use for PvE, I rather not have diyce run any zone ID checks or class target checks because it is irrelevent to the w/m function itself.

From what I understand, lua executes whatever is read first, so if a local is mentioned after the function that utilizes it, it doesnt get ran?

Basically, I'm asking if its possible to make a PvE-only section in the Player Skill Sequences section, apart from a "PvP-only" section, so the irrelevant PvP locals aren't ran during PvE.

Ravesden, D/S/Wd 80/75/62
Retired. Click siggy for old RoM vids, among other things.

896

Friday, January 18th 2013, 1:34am

I don't think the zone checks work. In PvP phirous pots cannot be used so in zone check that should come up, yet if your code uses phirous pots to heal or regain mana you can get into a locked up state as the item is not allowed. I hate when I forget to move my pots when i enter arena or siege.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

897

Friday, January 18th 2013, 4:02am

Quoted from "Ravesden;585370"

So speaking with Mr. Paz about diyce a couple days ago, he brought up an interesting point about zone ID checks, target class checks, etc in locals being ran with each press of the diyce button, which ups the time the function takes to execute the next skill.

Would it be possible to remove these locals
...snip...
and have them run only when a specific class combo is chosen?
...snip...
Basically, I'm asking if its possible to make a PvE-only section in the Player Skill Sequences section, apart from a "PvP-only" section, so the irrelevant PvP locals aren't ran during PvE.

Yes you can. In fact you have several choices for doing this (with more or less work for you).

Probably your easiest choice is to copy/paste the entire KillSequence() function and rename this second copy to something else. Then you can do any and all changes you want to this new function without affecting the other. To use it, change the macro to run this new function instead of KillSequence (which is still available for your other characters).
2013... The year from hell....

898

Thursday, January 24th 2013, 7:39am

I just started hitting an issue and I am not sure how to get around it. On my Warlock/Champion I use a skill called Shield of Solid Mind. When this buff is activated, it causes a debuff. The debuff keeps the skill from being cast within a certain time. Since the time on the debuff was the time on the buff itself I tried,

Source code

1
 { name = "Shield of Solid Mind",      use = (not pbuffs['Shield of Solid Mind']) },
But I started to notice something. At times the buff would drop if I am hit too hard and its absorption is used up so DIYCE will try to cast it again and again and again but can't due to the debuff. So then I tried,

Source code

1
 { name = "Shield of Solid Mind",      use = (not pbuffs['Mind Condensation']) },
Since this is the debuff, DIYCE isn't reading it in the buff list and still continues to try to cast the shield. I know there is a similar priest shield that works like this skill and there is a trick in the code to keep it from trying to cast within a certain time frame. Would that work here?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

899

Thursday, January 24th 2013, 2:13pm

Quoted from "Gilderoi;586090"

I just started hitting an issue and I am not sure how to get around it. On my Warlock/Champion I use a skill called Shield of Solid Mind. When this buff is activated, it causes a debuff. The debuff keeps the skill from being cast within a certain time.
...snip...
But I started to notice something. At times the buff would drop if I am hit too hard and its absorption is used up so DIYCE will try to cast it again and again and again but can't due to the debuff. So then I tried,

Source code

1
{ name = "Shield of Solid Mind",      use = (not pbuffs['Mind Condensation']) },

Since this is the debuff, DIYCE isn't reading it in the buff list and still continues to try to cast the shield.

The debuff doesn't show up in the player buffs because ... well it's the player buffs.

Try using pdebuffs instead, though that may or may not be available depending on the DIYCE variant you are using. First look through all the local definitions at the top of the KillSequence() function. If there is a pdebuff (or something similar) and/or there is a call to DebuffList then you should be good to go. If not, then look through this thread for the changes needed to add it in.
2013... The year from hell....

900

Friday, January 25th 2013, 1:14am

Thanks. I forgot all about that function even after we talked about using it to work in druid cures.