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.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

561

Saturday, April 14th 2012, 7:27pm

My guess is some other skill above it is interfering. Check the values to make sure and/or run the macro with the skill debugging option to see what it is attempting to use.

On another note, I noticed that in both setups (W/Wd and Wd/W) you create a skill list and if you have an enemy targeted, trash this list with another. Is this intentional? If so, a slightly better approach would be to put the first list in an if of it's own checking to see if you don't have an enemy selected. This way you aren't creating a list just to trash it immediately after. If not intentional, then change the second skill list to set Skill2 =... This will allow the first part to still exist.
2013... The year from hell....

562

Saturday, April 14th 2012, 8:39pm

ok, it was unintentional and i changed that thanks. Now im not too sure on how to run the macro with the skill debugging option. is there a certain command line used before /run KillSequence like /run DebugKillSequence?
Reni ~ HolySaints~ ßouncyßallzz -70w/70wd/67s ~ Playing w/wd before the warrior trend started. Bigballzz 61p/50k/40s only because p/s owns all in SW.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

563

Saturday, April 14th 2012, 10:19pm

Make the first argument to KillSequence be "debugskills", this will have it show you the skill lists as DIYCE sees them.

Example:

Source code

1
/run KillSequence("debugskills")


You can find the other debug options near the end of the KillSequence function.
2013... The year from hell....

564

Sunday, April 15th 2012, 3:37am

P/W Battlemonk

Not sure if there will be anyone interrested in this but heres my final and working diyce setup for my battle monk.Its far from a perfect one but i think its not to bad.

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
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,
                    }
                    
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, 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
                
        -- Class: Priest/Warrior
         if mainClass == "AUGUR" and subClass == "WARRIOR" then

local PetExists = UnitExists("playerpet")
local petname = UnitName("playerpet")
local pethealth = PctH("playerpet")
local petbuffs = BuffList("playerpet")
local petAttackActive = false


--Potions and Buffs
Skill = {
{ name = "Magic Barrier",             use = ((pctEB1 >= .05) and (not pbuffs['Magic Barrier'])) },
{ name = "Blessed Spring Water",      use = ((pctEB1 >= .05) and (not pbuffs['Blessed Spring Water'])) },
{ name = "Grace of Life",             use = (not pbuffs['Grace of Life']) },
{ name = "Amplified Attack",          use = (not pbuffs['Amplified Attack']) },
{ name = "Battle Monk Stance",        use = (not pbuffs['Battle Monk Stance']) },
{ name = "Power Build-Up",            use = (not pbuffs['Power Build-Up']) },

-- Self Heals
{ name = "Regenerate", use = ((phealth <= .85) and (not pbuffs['Regenerate'])) },
{ name = "Urgent Heal", use = (phealth <= .55) },
{ name = "Heal", use = (phealth <= .40) },
{ name = "Holy Aura", use = (phealth <= .30) },
{ name = "Soul Source", use = (phealth <= .25) },

-- Target Heals
{ name = "Regenerate", use = (friendly and (thealth <= .80) and (not tbuffs['Regenerate'])) },
{ name = "Urgent Heal", use = (friendly and (thealth <= .55)) },
}

-- Combat
if enemy then

Skill2 = {
                  
                    { name = "Ascending Dragon Strike",      use = (EnergyBar2 >= 30) },
                    { name = "Slash",                        use = (EnergyBar2 >= 26), timer = "SSBleed" },
                    { name = "Explosion of Fighting Spirit", use = ((not friendly) and (combat)) },
                    { 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

565

Tuesday, April 17th 2012, 4:26pm

Quoted from "Peryl;524983"

Make the first argument to KillSequence be "debugskills", this will have it show you the skill lists as DIYCE sees them.

Example:

Source code

1
/run KillSequence("debugskills")


You can find the other debug options near the end of the KillSequence function.


Ok peryl,

After running the debug skill with diyce, and seeing the true/false skills pop up, what is happening is after my rage is gone, all skills are reporting false regardless of whether or not i have mana. (talking on my W/WD layout) This is the way the fight went in SC the other night,

Buffed up, popped rage pot, charged in, did rotation 2 times, and after rage was gone, kept receiving "Skill Requirement Error Insufficient Rage" and it wouldn't spam PotWS, which is my spamable skill. Starting with 10k mana and at the time i noticed it not working, my MP bar said i had 5120mp. But all skills were coming back as a false statement. So I'm kinda lost on what I should check now. Any help would be greatly appreciated.

Thanks again.
Reni ~ HolySaints~ ßouncyßallzz -70w/70wd/67s ~ Playing w/wd before the warrior trend started. Bigballzz 61p/50k/40s only because p/s owns all in SW.

566

Tuesday, April 17th 2012, 5:52pm

Quoted from "Suzaku;525011"

Not sure if there will be anyone interrested in this but heres my final and working diyce setup for my battle monk.Its far from a perfect one but i think its not to bad.

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
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,
                    }
                    
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, 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
                
        -- Class: Priest/Warrior
         if mainClass == "AUGUR" and subClass == "WARRIOR" then

local PetExists = UnitExists("playerpet")
local petname = UnitName("playerpet")
local pethealth = PctH("playerpet")
local petbuffs = BuffList("playerpet")
local petAttackActive = false


--Potions and Buffs
Skill = {
{ name = "Magic Barrier",             use = ((pctEB1 >= .05) and (not pbuffs['Magic Barrier'])) },
{ name = "Blessed Spring Water",      use = ((pctEB1 >= .05) and (not pbuffs['Blessed Spring Water'])) },
{ name = "Grace of Life",             use = (not pbuffs['Grace of Life']) },
{ name = "Amplified Attack",          use = (not pbuffs['Amplified Attack']) },
{ name = "Battle Monk Stance",        use = (not pbuffs['Battle Monk Stance']) },
{ name = "Power Build-Up",            use = (not pbuffs['Power Build-Up']) },

-- Self Heals
{ name = "Regenerate", use = ((phealth <= .85) and (not pbuffs['Regenerate'])) },
{ name = "Urgent Heal", use = (phealth <= .55) },
{ name = "Heal", use = (phealth <= .40) },
{ name = "Holy Aura", use = (phealth <= .30) },
{ name = "Soul Source", use = (phealth <= .25) },

-- Target Heals
{ name = "Regenerate", use = (friendly and (thealth <= .80) and (not tbuffs['Regenerate'])) },
{ name = "Urgent Heal", use = (friendly and (thealth <= .55)) },
}

-- Combat
if enemy then

Skill2 = {
                  
                    { name = "Ascending Dragon Strike",      use = (EnergyBar2 >= 30) },
                    { name = "Slash",                        use = (EnergyBar2 >= 26), timer = "SSBleed" },
                    { name = "Explosion of Fighting Spirit", use = ((not friendly) and (combat)) },
                    { 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


I would love to be able to use this addon. But I haven't had the time to sit down and make it work. But looking at your code. I am not seeing why---or where you get annihilation, king bug shock, etc. What are those or where do they come from??

I would like to press 1/2 keys and actually get stuff done.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

567

Tuesday, April 17th 2012, 11:37pm

@blitzclub06

Quoted from "blitzclub06;525537"

...what is happening is after my rage is gone, all skills are reporting false regardless of whether or not i have mana. (talking on my W/WD layout)
...
Buffed up, popped rage pot, charged in, did rotation 2 times, and after rage was gone, kept receiving "Skill Requirement Error Insufficient Rage" and it wouldn't spam PotWS, which is my spamable skill. Starting with 10k mana and at the time i noticed it not working, my MP bar said i had 5120mp. But all skills were coming back as a false statement. So I'm kinda lost on what I should check now. Any help would be greatly appreciated.


Very strange. I really can't see what would be causing this other than the game itself not reporting rage/mana properly. As a little test, when this happens try running this macro to see what it reports:

Source code

1
/run DEFAULT_CHAT_FRAME:AddMessage("Energy1:"..UnitMana("player").."  Energy2:"..UnitSkill("player"))

The UnitMana() and UnitSkill() functions are effectively what DIYCE is using in the code to get your current energy values.


@Gannameade

Quoted from "Gannameade;525591"

I am not seeing why---or where you get annihilation, king bug shock, etc. What are those or where do they come from??

Unless I'm mistaken, what you are looking at there is the silence list. It is used as the list of spells that can be silenced, and therefore are spells that would be cast by enemies. You would of course require a class that is capable of silencing. See the code in the first post for an example of using this for a Warrior/Mage.
2013... The year from hell....

568

Wednesday, April 18th 2012, 12:02am

Hey guys, does anyone have a mage/warrior diyce, has it been done?

569

Wednesday, April 18th 2012, 4:06am

I'm in the process of reworking my M/R function and I'm running into a bit of a road block on one small but anoying issue.

As any M/R knows, Shadow Protection doesn't play nice with... well... anything. I'm trying to group my function so that when I cast my long cooldowns, Shadow Protection is automatically cancelled.0

In the old DIYCE you could just write a line that said: CancelBuff(buffname)

Issue is that I can figure out how to get DIYCE 2.0 to simply cancel a buff if it is up

I have the code in my DIYCE.lua

EDIT: Removed bad code - See here

My issue is that I don't know what I need to put in my Custom function to activate it... here is what I would use if I knew how (the obviously wrong line is comment out).

EDIT: Removed bad code - See here

Anyone know the proper way to do this?
-- Stagger - Osha - Eyeofthetempest --

M/R/W 72/52/51
Formerly M/D/S, M/R/D (The search for decent DPS in a post GCD RoM continues)

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

570

Wednesday, April 18th 2012, 11:50am

Quoted from "Stagg3r;525888"

My issue is that I don't know what I need to put in my Custom function to activate it... here is what I would use if I knew how (the obviously wrong line is comment out).

Anyone know the proper way to do this?

The code was never originally setup for doing this so you'll need to modify the DIYCE code.

Off the top of my head, here's one possible modification (untested).

First, we need to define a way for DIYCE to call a function, so open DIYCE.lua and in the MyCombat function, add an elseif clause to detect our new "Function:" method like this:

Source code

1
2
3
4
5
6
    elseif string.find(Skill[x].name, "Function:") then
        action = string.gsub(Skill[x].name, "(Function:)( *)(.*)", "%3")
        if action and type(_G[action]) == "function" then
            _G[action](unpack((Skill[x].params or {})))
            return true
        end


To use the above, you would define your skill line like this (using your CancelBuff line):

Source code

1
    {name = "Function: CancelBuff",  use = (pbuffs['Shadow Protection']),  params = {"Shadow Protection"} },


The "Function:" part should now allow DIYCE to call the given named Lua function (must be globally accessible), and the new params entry in the skill list is a table with all the parameters you want to pass to this function.
2013... The year from hell....

571

Wednesday, April 18th 2012, 5:58pm

Quoted from "Peryl;525938"

The code was never originally setup for doing this so you'll need to modify the DIYCE code.

Off the top of my head, here's one possible modification (untested).

First, we need to define a way for DIYCE to call a function, so open DIYCE.lua and in the MyCombat function, add an elseif clause to detect our new "Function:" method like this:

Source code

1
2
3
4
5
6
elseif string.find(Skill[x].name, "Function:") then
action = string.gsub(Skill[x].name, "(Function:)( *)(.*)", "%3")
if action and type(_G[action]) == "function" then
_G[action](unpack((Skill[x].params or {})))
return true
end


To use the above, you would define your skill line like this (using your CancelBuff line):

Source code

1
{name = "Function: CancelBuff", use = (pbuffs['Shadow Protection']), params = {"Shadow Protection"} },


The "Function:" part should now allow DIYCE to call the given named Lua function (must be globally accessible), and the new params entry in the skill list is a table with all the parameters you want to pass to this function.



Ahhh to be a code Genius! It works perfecty!

Well.... Seems only fare to share the results given that everything I have done has been with the help of this board (directly and indirectly). I have removed some functions for classes I used to play but have dropped for others. M/D, D/M were the functions I had tweaked the most. Technically, you could have one function for every comby in DIYCE but it gets hard to find the one you are trying to work on. In any event, they can be found in my previous posts.

Last thing before I get to the code is that I still have a few functions that need some work. I just added the Wd/S (wardenscout - Warden/Scout) that was posted in an alternate thread. I have not made any mods to this yet. I also need to create a M/W (magewarrior - Mage/Warrior) function. I have not seen one of these around here so I'll have create one from my M/R template. I have also removed the priest fairy sequence from my functions becuse all of my present toons are Elves and it just takes up space. Lastly, please forgive the multiple formats for the class listings below. I'm trying to make it a bit easier to find these combos with search (which is a PITA due to standard abbreviations being to short to search).

So the main functions you will find here are:
M/R (magerogue - Mage/Rogue)
W/M (warriormage - Warrior/Mage)
W/Wd (warriorwarden - Warrior/Warden) -> Stock function available on this thread
Wd/W (wardenwarrior - Warden/Warrior)
W/R (warriorrogue - Warrior/Rogue)
R/M (roguemage - Rogue/Mage)


DIYCE.lua

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
-- DIY Combat Engine version 2.2
local g_skill  = {}
local g_lastaction = ""
-- Holds the created timers
local DIYCE_Timers = {}
function Msg(outstr,a1,a2,a3)
    DEFAULT_CHAT_FRAME:AddMessage(tostring(outstr),a1,a2,a3)
end
function ReadSkills()
    g_skill = {}
    local skillname,slot
    for page = 1,4 do
        slot = 1
        skillname = GetSkillDetail(page,slot)
        repeat
            local a1,a2,a3,a4,a5,a6,a7,a8,skillusable = GetSkillDetail(page,slot)
            if skillusable then
                g_skill[skillname] = { ['page'] = page, ['slot'] = slot }
            end
            slot = slot + 1
            skillname = GetSkillDetail(page,slot)
        until skillname == nil
    end
end
-- Read Skills on Log-In/Class Change/Level-Up
        local DIYCE_EventFrame = CreateUIComponent("Frame","DIYCE_EventFrame","UIParent")
        DIYCE_EventFrame:SetScripts("OnUpdate", [=[ DIYCE_TimerUpdate(elapsedTime) ]=] )
            DIYCE_EventFrame:SetScripts("OnEvent", [=[ 
                    if event == 'PLAYER_SKILLED_CHANGED' then
                        ReadSkills()
                        end
                    ]=] )
            DIYCE_EventFrame:RegisterEvent("PLAYER_SKILLED_CHANGED")
function PctH(tgt)
    return (UnitHealth(tgt)/UnitMaxHealth(tgt))
end
function PctM(tgt)
    return (UnitMana(tgt)/UnitMaxMana(tgt))
end
function PctS(tgt)
    return (UnitSkill(tgt)/UnitMaxSkill(tgt))
end
function CancelBuff(buffname)
    local i = 1
    local buff = UnitBuff("player",i)
    while buff ~= nil do
        if buff == buffname then
            CancelPlayerBuff(i)
            return true
        end
        i = i + 1
        buff = UnitBuff("player",i)
    end
    return false
end
function BuffList(tgt)
    local list = {}
    local buffcmd = UnitBuff
    local infocmd = UnitBuffLeftTime
    if UnitCanAttack("player",tgt) then
        buffcmd = UnitDebuff
        infocmd = UnitDebuffLeftTime
    end
    -- There is a max of 100 buffs/debuffs per unit apparently
    for i = 1,100 do
        local buff, _, stackSize, ID = buffcmd(tgt, i)
        local timeRemaining = infocmd(tgt,i)
        if buff then
            -- Ad to list by name
            list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining or 0, id = ID }
            -- We also list by ID in case two different buffs/debuffs have the same name.
            list[ID] = {stack = stackSize, time = timeRemaining or 0, name = buff:gsub("(%()(.)(%))", "%2") }
        else
            break
        end
    end
    return list
end
function CD(skillname)
    local firstskill = GetSkillDetail(2,1)
    if (g_skill[firstskill] == nil) or (g_skill[firstskill].page ~= 2) then
        ReadSkills()
    end
    if g_skill[skillname] ~= nil then
        local tt,cd = GetSkillCooldown(g_skill[skillname].page,g_skill[skillname].slot)
        return cd <= 0.4
    elseif skillname == nil then
        return false
    else
        Msg("Skill not available: "..skillname)        --Comment this line out if you do not wish to recieve this error message.
        return
    end
end
function MyCombat(Skill, arg1)
    local spell_name = UnitCastingTime("player")
    local talktome = ((arg1 == "v1") or (arg1 == "v2"))
    local action,actioncd,actiondef,actioncnt
    
    if spell_name ~= nil then
        if (arg1 == "v2") then Msg("- ['..spell_name..']", 0, 1, 1) end
        return true
    end
    for x,tbl in ipairs(Skill) do
        
    local useit = type(Skill[x].use) ~= "function" and Skill[x].use or (type(Skill[x].use) == "function" and Skill[x].use() or false)
        if useit then
            if string.find(Skill[x].name, "Action:") then
                action = tonumber((string.gsub(Skill[x].name, "(Action:)( *)(%d+)(.*)", "%3")))
                _1,actioncd = GetActionCooldown(action)
                actiondef,_1,actioncnt = GetActionInfo(action)
                if GetActionUsable(action) and (actioncd == 0) and (actiondef ~= nil) and (actioncnt > 0) then
                    if talktome then Msg("- "..Skill[x].name) end
                    UseAction(action)
                    return true
                end
            elseif string.find(Skill[x].name, "Custom:") then
                action = string.gsub(Skill[x].name, "(Custom:)( *)(.*)", "%3")
                if CustomAction(action) then
                    return true
                end
   elseif string.find(Skill[x].name, "Function:") then
                action = string.gsub(Skill[x].name, "(Function:)( *)(.*)", "%3")
                if action and type(_G[action]) == "function" then
                   _G[action](unpack((Skill[x].params or {})))
                   return true
    end
            elseif string.find(Skill[x].name, "Item:") then
                action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
                if talktome then Msg("- "..Skill[x].name) end
                UseItemByName(action)
                return true
            elseif (Skill[x].ignoretimer or GetDIYCETimerValue(Skill[x].timer) == 0) and CD(Skill[x].name) then
                if talktome then Msg("- "..Skill[x].name) end
                CastSpellByName(Skill[x].name)
                StartDIYCETimer(Skill[x].timer)
                return true
            elseif string.find(Skill[x].name, "Pet Skill:") then
                action = string.gsub(Skill[x].name, "(Pet Skill:)( *)(%d+)(.*)", "%3")
                    UsePetAction(action)
                if (arg1 == "v2") then Msg(Skill[x].name.." has been fully processed") end
                return true
            end
   
        end
    end
    if (arg1 == "v2") then Msg("- [IDLE]", 0, 1, 1) end
    
    return false
end
--[[ Timer Update function ]]--
-- Tick down any active timers
function DIYCE_TimerUpdate(elapsed)
    for k,v in pairs(DIYCE_Timers) do
        v.timeLeft = v.timeLeft - elapsed
        if v.timeLeft < 0 then
            v.timeLeft = 0
        end
    end
end
--[[ Create a named timer ]]--
-- if the named timer already exists, this does nothing.
function CreateDIYCETimer(timerName, waitTime)
    if not DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName] = { timeLeft = 0, waitTime = waitTime }
    end
end
--[[ Set/reset waitTimer of an existing timer ]]--
-- if the timer doesn't exist, this does nothing
function SetDIYCETimerDelay(timerName, waitTime)
    if DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName].waitTime = waitTime
    end
end
--[[ Delete named timer ]]--
-- if the timer doesn't exist, this does nothing
-- Not really needed, but added for completeness
function DeleteDIYCETimer(timerName)
    if DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName] = nil
    end
end
--[[ Get a timer's current time ]]--
-- if the timer doesn't exist, this returns 0
function GetDIYCETimerValue(timerName)
    if timerName then
        return DIYCE_Timers[timerName] and DIYCE_Timers[timerName].timeLeft or 0
    end
    return 0
end
--[[ Starts a timer ticking down ]]--
-- if timer doesn't exist, this does nothing
function StartDIYCETimer(timerName)
    if timerName and DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName].timeLeft = DIYCE_Timers[timerName].waitTime
    end
end
function CustomAction(action)
    if CD(action) then
        if IsShiftKeyDown() then Msg("- "..action) end
        g_lastaction = action
        CastSpellByName(action)
        return true
    else
        return false
    end
end
function BuffTimeLeft(tgt, buffname)
    local cnt = 1
    local buff = UnitBuff(tgt,cnt)
    while buff ~= nil do
        if string.find(buff,buffname) then
            return UnitBuffLeftTime(tgt,cnt)
        end
        cnt = cnt + 1
        buff = UnitBuff(tgt,cnt)
    end
    return 0
end
function BuffParty(arg1,arg2)
--    arg1 = Quickbar slot # for targetable, instant-cast buff without a cooldown (eg. Amp Attack) for range checking.
--    arg2 = buff expiration time cutoff (in seconds) for refreshing buffs, default is 45 seconds.
    local selfbuffs = { "Soul Bond", "Enhanced Armor", "Holy Seal" }
    local groupbuffs = { "Grace of Life", "Amplified Attack", "Angel's Blessing", "Essence of Magic", "Magic Barrier", "Blessed Spring Water", "Fire Ward", "Savage Blessing", "Concentration Prayer", "Shadow Fury"  }
    local buffrefresh = arg2 or 45           -- Refresh buff time (seconds)
    local spell = UnitCastingTime("player")  -- Spell being cast?
    local vocal = IsShiftKeyDown()           -- Generate feedback if Shift key held
    if (spell ~= nil) then
        return
    end
    if vocal then Msg("- Checking self buffs on "..UnitName("player")) end
    for i,buff in ipairs(selfbuffs) do
        if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("player",buff) <= buffrefresh) then
            if vocal then Msg("- Casting "..buff.." on "..UnitName("player")) end
            TargetUnit("player")
            CastSpellByName(buff)
            return
        end
    end
    if vocal then Msg("- Checking group buffs on "..UnitName("player")) end
    for i,buff in ipairs(groupbuffs) do
        if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("player",buff) <= buffrefresh) then
            if vocal then Msg("- Casting "..buff.." on "..UnitName("player")) end
            TargetUnit("player")
            CastSpellByName(buff)
            return
        end
    end
    for num=1,GetNumPartyMembers()-1 do
        TargetUnit("party"..num)
        if GetActionUsable(arg1) and (UnitHealth("party"..num) > 0) then
            if vocal then Msg("- Checking group buffs on "..UnitName("party"..num)) end
            for i,buff in ipairs(groupbuffs) do
                if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("target",buff) <= buffrefresh) then
                    if UnitIsUnit("target","party"..num) then
                        if vocal then Msg("- Casting "..buff.." on "..UnitName("target")) end
                        CastSpellByName(buff)
                        return
                    else
                        if vocal then Msg("- Error: "..UnitName("target").." != "..UnitName("party"..num)) end
                    end
                end
            end
        else
            if vocal then Msg("- Player "..UnitName("party"..num).." out of range or dead.") end
        end
    end
    if vocal then Msg("- Nothing to do.") end
end


CustomFunctions.lua


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
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,
  ['Merging Rune']  = true, --Jacklin Sardo
  ['Heavy Shelling']  = true, --Juggler Apprentice in Grafu
  ['Dark Healing']    = true, --Mini-boss in Sardo
     }
function KillSequence(arg1, goat2, 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(61) -- # 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 <= .03 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
        
-- Class: Mage/Rogue
-- DIYCE 2.2
if mainClass == "MAGE" and subClass == "THIEF" then
--goat2: 0 = BossBuffs/long, 1 = Standard Buffs, 2 = Ranged
-- Boss Buffs
if (goat2 == "0") then
            Skill =  {
    { name = "Fang Ritual",               use = ((not pbuffs['Fang Ritual']) or (pbuffs['Fang Ritual'].time <= 45)) },
                { name = "Action: 47",                use = (not pbuffs['Unbridled Enthusiasm']) and not (pbuffs['Thunder Force']) },
    { name  = "Function: CancelBuff",     use = (pbuffs['Shadow Protection']),  params = {"Shadow Protection"} },                  
                { name = "Fire Ward",                 use = ((not pbuffs['Fire Ward']) or (pbuffs['Fire Ward'].time <= 45)) },
                { name = "Action: 16",                use = ((not pbuffs['Hero Magic Medicine']) or (pbuffs['Hero Magic Medicine'].time <= 30)) },
                { name = "Action: 17",                use = ((not pbuffs['Grassland Mix']) or (pbuffs['Grassland Mix'].time <= 30)) },
                { name = "Energy Influx",             use = (not pbuffs['Energy Influx']) },
                { name = "Electrostatic Charge",      use = (not pbuffs['Electrostatic Charge']) },
                { name = "Energy Well",               use = (not pbuffs['Energy Well']) },
    { name = "Action: 56",                use = (boss and not pbuffs['Moti Blended Sausage']) },
    { name = "Action: 55",                use = (boss and not pbuffs['Ancient Spirit Water']) },
    { name = "Action: 54",                use = (boss and not pbuffs['Arcane Potion']) },    
                { name = "Elemental Catalysis",       use = (boss and not tbuffs['Elemental Catalysis']) },
                { name = "Intensification",           use = (boss and not tbuffs['Intensification']) },
                    }
   
   
-- Buffs
  elseif (goat2 == "1") then
            Skill =  {
                { name = "Fang Ritual",               use = ((not pbuffs['Fang Ritual']) or (pbuffs['Fang Ritual'].time <= 45)) },
                { name = "Action: 47",                use = (not pbuffs['Unbridled Enthusiasm']) and not (pbuffs['Thunder Force']) }, 
                { name = "Shadow Protection",         use = ((not pbuffs['Ancient Spirit Water']) and (not pbuffs['Shadow Protection']) and (not pbuffs['Wizard Medicine'])) },                  
                { name = "Fire Ward",                 use = (not pbuffs['Fire Ward']) },
                { name = "Energy Influx",             use = (not pbuffs['Energy Influx']) },
                { name = "Electrostatic Charge",      use = (not pbuffs['Electrostatic Charge']) },
                { name = "Energy Well",               use = (not pbuffs['Energy Well']) },
                    }
            end
-- Ranged Attack
  if ((enemy) and (goat2 == "2")) then
            Skill2 = {
                --{ name = "Action: "..healthpot,         use = (phealth <= .50) },
                --{ name = "Action: "..manapot,           use = ((pctEB1  <= .50) and (phealth >= .40)) }, -- only mana pot if decent  health
    { name = "Silence",                     use = (silenceThis) },
    --{ name = "Electric Bolt",               use = (boss and not tbuffs['Electric Flow']) },
                { name = "Distract",                    use = (phealth <= .50) },
                { name = "Action: 69",                  use = (boss and (phealth <= .80)) }, --Unharmed ISS
    { name = "Elemental Weakness",          use = (boss and not tbuffs['Elemental Weakness']) },
    { name = "Kiss of the Vampire",         use = ((pbuffs['Elemental Catalysis']) or (pbuffs['Ancient Spirit Water'])) },
    --{ name = "Demoralize",                  use = ((pbuffs['Elemental Catalysis']) or (pbuffs['Ancient Spirit Water'])) },
    { name = "Flame",                       use = ((pbuffs['Elemental Catalysis']) or (pbuffs['Ancient Spirit Water'])) },
                { name = "Shadow Protection",           use = ((not pbuffs['Ancient Spirit Water']) and (not pbuffs['Shadow Protection']) and (not pbuffs['Wizard Medicine'])) },
    { name = "Action: 54",                  use = (boss and (not pbuffs['Arcane Potion']) and (not pbuffs['Ancient Spirit Water'])) }, 
                { name = "Fireball",                    use = (true) },
                { name = "Demoralize",                  use = (not tbuffs['Demoralize']) },
                { name = "Lightning",                   use = (not tbuffs['Lightning']) },
                { name = "Kiss of the Vampire",         use = (not tbuffs['Kiss of the Vampire']) },
                { name = "Cursed Fangs",                use = (EnergyBar2 >= 30) },
                { name = "Discharge",                   use = (combat and melee) },
    { name = "Flame",                       use = (boss or tbuffs['Elemental Weakness']) },
    { name = "Phoenix",                     use = (combat and melee) },
    { name = "Meteor Shower",               use = (true) },
                { name = "Plasma Arrow",                use = (not pbuffs['Charged']) },
                        }
                end    
    
-- Class: Warrior/Mage
            elseif 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 = "Fireball",                    use = (true) },
                    { 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: Warrior/warden
 elseif mainClass == "WARRIOR" and subClass == "WARDEN" then
 
   --Timers for this class
 CreateDIYCETimer("SSBleed", 6.5) 
 --Change the value between 6 -> 7.5 depending on your lag.
 --Potions and Buffs
Skill = {
{ name = "Briar Shield",       use = (pctEB2 >= .15) and ((not pbuffs['Briar Shield']) or (pbuffs['Briar Shield'].time <= 45)) },
{ name = "Battle Creed",       use = (pctEB2 >= .15) and ((not pbuffs['Battle Creed']) or (pbuffs['Battle Creed'].time <= 45)) },
{ name = "Survival Instinct",      use = (phealth <= .49) },
}
--Combat
if enemy then
Skill = {
{ name = "Elven Amulet",       use = (EnergyBar2 >= 150) and (phealth <= .4) },
{ name = "Defensive Formation",     use = (EnergyBar1 >= 25) and (phealth <= .30) }, 
{ name = "Savage Whirlwind",      use = (EnergyBar2 >= 240) },
{ name = "Tactical Attack",                    use = ((tbuffs[500081]) and (EnergyBar1 >= 16)) },
{ name = "Attack Weakener",      use = (EnergyBar2 >= 280) and (tbuffs['Vulnerable']) },
{ name = "Open Flank",        use = (EnergyBar1 >= 10) and (tbuffs['Vulnerable']) },
{ name = "Probing Attack",       use = (EnergyBar1 >= 15) },
{ name = "Slash",                               use = (EnergyBar1 >= 26), timer = "SSBleed", ignoretimer = (pbuffs['Aggressiveness']) },
{ name = "Enraged",                             use = ((EnergyBar1 < 25) and (boss or elite)) },
{ name = "Power of the Wood Spirit",    use = (EnergyBar2 >= 114) },
}
end
 
     
--Class: Warden/Warrior
            elseif mainClass == "WARDEN" and subClass == "WARRIOR" then
            
            --Potions and Buffs
            Skill = {
                { name = "Briar Shield",                  use = (EnergyBar1 >= 200) and ((not pbuffs['Briar Shield']) or (pbuffs['Briar Shield'].time <= 45)) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                { name = "Damage Transfer",                  use = (  phealth <= .25                                    )},    
                { name = "Elven Amulet",                     use = (  phealth <= .35                                    )},
                { name = "Energy Absorb",                    use = (  boss                                              )},                
                { name = "Enraged",                          use = (  EnergyBar2 <= 20                                  )},
    { name = "Charged Chop",                     use = ( (not combat) and (boss or elite)      )},
                { name = "Pulse Mastery",                    use = ( (EnergyBar2 >= 20) and tbuffs['Beast Sigil']       )},
                { name = "Beast Chop",                       use = ( (EnergyBar2 >= 20)                                 )},
                { name = "Double Chop",                      use = ( (EnergyBar1 >= 100)                                )}, 
                { name = "Will Attack",                      use = (  EnergyBar1 >= 200                                    )},
                { name = "Slash",                            use = (  EnergyBar2 >= 25                                    )},
                { name = "Power of the Wood Spirit",         use = (  EnergyBar1 >= 200                                    )},
                { name = "Attack",                           use =    true                                          }                   
                            }
                end
 
--Class: Warrior/Rogue
            elseif mainClass == "WARRIOR" and subClass == "THIEF" then
            
            --Potions and Buffs-- Potions
            
            
   Skill = {   
    { name = "Action: 48",                use = (phealth <= .50) },
                { name = "Action: 43",                    use = (not pbuffs['Unbridled Enthusiasm']) and not (pbuffs['Thunder Force']) },
                { name = "Action: 44",                    use = (not pbuffs['Clear Thought']) and not (pbuffs['Strong Stimulant']) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                { name = "Survival Instinct",                use = (  phealth <= .49                                                                                        )},
                { name = "Enraged",                          use = (  EnergyBar1 <= 20                                                                                         )},
                { name = "Splitting Chop",                   use = ( (EnergyBar1 >= 15) and tbuffs['Weakened']                                                                )},
                { name = "Open Flank",                       use = ( (EnergyBar1 >= 10) and tbuffs['Vulnerable'] and not tbuffs['Shattered Armor'] and CD("Splitting Chop") )},
                { name = "Keen Attack",                      use = ( (EnergyBar2 >= 20) and tbuffs['Vulnerable']                                                             )},
                { name = "Open Flank",                       use = ( (EnergyBar1 >= 10) and tbuffs['Vulnerable'] and CD("Splitting Chop")                                     )},
                { name = "Probing Attack",                   use = ( (EnergyBar1 >= 20)                                                                                       )},
                { name = "Blood Dance",                      use = (  phealth >= .85                                                                                           )},
                { name = "Slash",                            use = (  EnergyBar1 >= 25                                                                                           )}, 
                { name = "Shadowstab",                       use = (  EnergyBar2 >= 20                                                                                           )},
                { name = "Attack",                           use =    true                                                                                                         },                 
                            }
                end
--Class: Rogue/Mage
 -- DIYCE 2.2
   elseif mainClass == "THIEF" and subClass == "MAGE" then
--goat2: 0 = BossBuffs/long, 1 = Standard Buffs, 2 = Ranged
            
-- Boss Buffs
if (goat2 == "0") then
            Skill =  {
                { name = "Action: 47",                  use = (not pbuffs['Unbridled Enthusiasm']) and not (pbuffs['Thunder Force']) },                 
                { name = "Fire Ward",                    use = ((not pbuffs['Fire Ward']) or (pbuffs['Fire Ward'].time <= 45)) },
                --{ name = "Action: 16",                 use = (not pbuffs['Hero Potion']) },
                --{ name = "Action: 17",              use = (not pbuffs['Grassland Mix']) },
    { name = "Informer",                     use = boss },
                { name = "Intensification",             use = (boss and not tbuffs['Intensification']) },
    { name = "Fervent Attack",               use = boss },
    --{ name = "Action: 56",                 use = (boss and not pbuffs['Moti Blended Sausage']) },
    --{ name = "Action: 55",                 use = (boss and not pbuffs['Ancient Spirit Water']) },
    { name = "Create Opportunity",          use = ((boss or elite) and not pbuffs['Create Opportunity']) },
                { name = "Assassins Rage",               use = boss },
                    }
   
   
-- Short Buff and Traps
  elseif (goat2 == "1") then
            Skill =  {
                { name = "Poison",                      use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 20)) },
                { name = "Action: 43",                  use = (not pbuffs['Unbridled Enthusiasm']) and not (pbuffs['Thunder Force']) }, 
                { name = "Action: 44",                  use = (not pbuffs['Clear Thought']) and not (pbuffs['Strong Stimulant']) },                  
                { name = "Fire Ward",                    use = ((not pbuffs['Fire Ward']) or (pbuffs['Fire Ward'].time <= 45)) },
                { name = "Premeditation",               use = (not combat) and (EnergyBar1 >= 50) and not pbuffs['Premeditation'] },   
                { name = "Poison Trap",                 use = true },    
                { name = "Paralyzing Trap",            use = true },   
                { name = "Booby Trap",                   use = true },
     }
            end
   
-- Ranged Attack
  if ((enemy) and (goat2 == "2")) then
            Skill2 = {
    { name = "Silence",                      use = (silenceThis) },
    { name = "Evasion",                     use = (phealth <= .70) },
    { name = "Sprint",                      use = (phealth <= .25) },
    { name = "Vanish",                       use = combat and (phealth <= .20) },
                --{ name = "Shadow Step",                  use = (not combat) and (boss or elite) and (EnergyBar1 >= 50) },
    { name = "Sneak Attack",                 use = (not combat) and (boss or elite) and (EnergyBar1 >= 20) and behind },
    { name = "Shadow Step",                  use = (not combat) and (EnergyBar1 >= 50) },
                { name = "Blind Spot",                   use = (EnergyBar1 >= 20) and behind },
    { name = "Lightning",                    use = (not tbuffs['Lightning']) }, 
                { name = "Magic Breaker",                use = (boss or elite) }, 
    { name = "Fireball",                     use = (true) },
    { name = "Poison Flame",                 use = (not tbuffs['Poison Flame']) },
                { name = "Trap Master",                  use = (boss or elite) },
                { name = "Wound Attack",                 use = (EnergyBar1 >= 35) and tbuffs['Grievous Wound'] },
                { name = "Low Blow",                     use = (EnergyBar1 >= 30) and tbuffs['Bleed'] },
    { name = "Shadowstab",                   use = (EnergyBar1 >= 20) },
                --{ name = "Combo Throw",                  use = (true) },
                --{ name = "Throw",                        use = (true) },
                { name = "Attack",                       use = (thealth == 1) },
                        }
                end    
    
-- Class: Warden/Scout
-- DIYCE 2.0
        elseif mainClass == "WARDEN" and subClass == "RANGER" then
        local PetExists = UnitExists("playerpet")
        local petname = UnitName("playerpet")
        local pethealth = PctH("playerpet")
        local petAttackActive = false
        
        if (PetExists and UnitExists("pettarget") and UnitCanAttack("player","pettarget") and combat) then
            petAttackActive = true
        end
    --  Cancel Blood Arrows out of combat or at less than 40% health, without invoking the GCD.    
        if friendly or (not UnitExists("target")) or tdead or (phealth <= .40) and (pbuffs['Blood Arrow']) then 
            CancelBuff("Blood Arrow")
        end
    -- Potions
            Skill = {
                { name = "Action: "..healthpot,           use = (phealth <= .60) },
                { name = "Action: "..manapot,             use = ((pctEB1  <= .50) and (phealth >= .40)) }, -- only mana pot if decent  health
                { name = "Elven Prayer",                   use = ((pethealth <= .70) and PetExists) },
    -- Buffs
                { name = "Briar Shield",                  use = (not pbuffs['Briar Shield']) },
                { name = "Protection of Nature",         use = (not pbuffs['Protection of Nature']) },
    -- Pet
                { name = "Summon Spirit of the Oak",     use = ((not  PetExists) and (not pbuffs['Heart of the Oak']) and (not combat)) },
                { name = "Summon Spirit of the Oak",     use =  ((PetExists) and (not string.find(petname,"Spirit of the Oak")) and (not  pbuffs['Heart of the Oak']) and (not combat)) } ,
        -- Cheaper to Recast weak pet than to heal        
                { name = "Summon Spirit of the Oak",     use =  ((pethealth <= .25) and (PetExists) and (not pbuffs['Heart of the  Oak'])) },
        -- Hold Shift to Absorb Spirit of the Oak to Tank 
                { name = "Heart of the Oak",             use =  (IsShiftKeyDown() and (not combat) and (PetExists) and  (string.find(petname,"Spirit of the Oak")) and (not pbuffs['Heart of the  Oak'])) },
            }
    -- Combat
            if enemy then
            Skill2 = {
            -- the following is my pet's basic attack command, and it is  listed first in order to use it as a combat opener and help ensure that  the pet gets first aggro, making aggro management easier.
                { name = "Pet Skill: 6 (Pet Attack)",     use = ((not petAttackActive) and (not tdead) and PetExists) },
            -- Make sure pet is assisting me.
                { name = "Pet Skill: 6 (Pet Attack)",     use =  ((petAttackActive) and (not UnitIsUnit( "playerpettarget",  "playertarget" )) and PetExists) }, 
            --  Use Throat Attack on detect enemy spell cast.                
                { name = "Throat Attack",                use = (melee  and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) >  0.5) and pctEB1 >= 15) },
                { name = "Damage Transfer",                use =  (PetExists and combat and (pctEB1 <= .50) and (not pbuffs['Energy  Absorb'])) },
                { name = "Energy Absorb",               use = (combat  and (pctEB1 <= .50) and (not pbuffs['Energy Absorb'])) },
                { name = "Blood Arrow",                    use =  ((phealth >= .80) and party and combat and (not pbuffs['Blood  Arrow'])) },
                { name = "Savage Power",                   use = (combat and (not pbuffs['Savage Power'])) },
                { name = "Elven Amulet",                   use = (combat  and (UnitIsUnit( "targettarget", "player" )) and (not pbuffs['Elven  Amulet'])) },
                { name = "Vampire Arrows",                 use = ((EnergyBar2 >= 40) and (not tbuffs['Vampire Arrows'])) },
                { name = "Anti-Magic Arrow",             use = (true) },
                { name = "Shot",                         use = (combat) },
                { name = "Wrist Attack",                  use = ((melee)  and (not tbuffs['Wrist Attack']) and (EnergyBar2 >= 50)) },
                { name = "Thorny Vines",                 use = ((pctEB1  >= .05) and melee and (not tbuffs['Thorny Vines'])) },
                { name = "Power of the Wood Spirit",     use = (melee) },
                { name = "Untamable",                     use = ((EnergyBar2 >= 60) and melee) },
                { name = "Cross Chop",                     use = (melee) },
                { name = "Charged Chop",                 use = (melee) },
                { name = "Frantic Briar",                 use = (melee) },
            }
        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 == "MAGE" 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 ~= "MAGE" then     --Let all other classes auto target.
  if (not LockedOn) or (not enemy) then
   TargetNearestEnemy()
   return
  end
 end
end


Don't forget that you have to change your Player and target status to reflect your interface. Also you will need to change any Action locations (Pots and such) to match your interface. I'll try to update this as I fill in the other classes.


UPDATE:
04/21/12

Mage/Rogue
  • Corrected some buff names.
  • Added Arcane Potion to Boss Buff rotation.
  • Added timers on long term buffs so that they will be recast if there are 30 second or less remaining on the buffs.
  • Tweaked Distract and Unharmed HP trigger points


Rogue/Mage -- Fully reworked

  • Changed to a "goat" system similar to M/R (boss, normal buffs & traps, attack)
  • After standard pre-combat buffing, the "goat == "1"" sequence will lay traps as they are available (good for farming)
-- Stagger - Osha - Eyeofthetempest --

M/R/W 72/52/51
Formerly M/D/S, M/R/D (The search for decent DPS in a post GCD RoM continues)

572

Wednesday, April 18th 2012, 7:35pm

Nothing to see here... reserved for future use 0.o
-- Stagger - Osha - Eyeofthetempest --

M/R/W 72/52/51
Formerly M/D/S, M/R/D (The search for decent DPS in a post GCD RoM continues)

573

Wednesday, April 25th 2012, 5:04am

I've been away for a while and was wondering what happened to the PartyHealer DIYCE? I know I had it loaded way back but I cannot find it on my machine or any info regarding it on the forums. Anyone give me a heads up as to what happened? Or anyone still have the code?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

574

Wednesday, April 25th 2012, 5:30am

Doesn't appear to be on Curse/CurseForge any more. Many posts got deleted in the forum restructuring here, and Curse/CurseForge have removed many older abandoned projects.

So someone will need to post their version. Might also want to check the EU forums in case you can find a version over there.
2013... The year from hell....

575

Wednesday, April 25th 2012, 5:56am

Thanks for the quick reply Peryl. I'll take a look at EU forums.

Posts: 86

Location: Dominating in 3vs3, 6vs6 and siege.

Occupation: Network Administrator for a local NBC T.V. station.

  • Send private message

576

Wednesday, April 25th 2012, 6:56pm

Has anyone played around with "GetPlayerAbility" function yet? It appears that you can get players physical and magical damage, attack power, defense figures, etc. Make a check against the results, then use a skill according to the results?

Perfect for popping certain defense skills if you have a player with high patt selected or a magical defense skill if you have a mage with high matt, etc.

Posts: 86

Location: Dominating in 3vs3, 6vs6 and siege.

Occupation: Network Administrator for a local NBC T.V. station.

  • Send private message

577

Wednesday, April 25th 2012, 6:58pm

Interesting, I just came across this API: GetPlayerDirection. Is it possible to make a check against yourself to determine if your behind a target? Peryl?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

578

Wednesday, April 25th 2012, 11:01pm

Quoted from "ItIsFinished22;527324"

Has anyone played around with "GetPlayerAbility" function yet? It appears that you can get players physical and magical damage, attack power, defense figures, etc. Make a check against the results, then use a skill according to the results?

Perfect for popping certain defense skills if you have a player with high patt selected or a magical defense skill if you have a mage with high matt, etc.

I never had the need to check that function so I can't say what it does. As I don't have the game installed anymore, I can't check its usage among the standard UI code.


Quoted from "ItIsFinished22;527325"

Interesting, I just came across this API: GetPlayerDirection. Is it possible to make a check against yourself to determine if your behind a target? Peryl?

I've seen that one before, and tried using it specifically to see if it could be used for checking your target facing. Unfortunately, that function doesn't appear to return anything useful. It always returns the same value no matter your facing or your target's facing or whatever.

Shame really, would have been quite useful for many situations but it appears to have been disabled.
2013... The year from hell....

Posts: 86

Location: Dominating in 3vs3, 6vs6 and siege.

Occupation: Network Administrator for a local NBC T.V. station.

  • Send private message

579

Wednesday, April 25th 2012, 11:42pm

Quoted from "Peryl;527379"

I never had the need to check that function so I can't say what it does. As I don't have the game installed anymore, I can't check its usage among the standard UI code.


What would be the proper syntax to test this API? According to ROM WIKI it gives this example:

Source code

1
local num_attrib_value, num_enchanted_value, num_percentage_value = GetPlayerAbility("MELEE_ATTACK");


I can test it out when I get home from work.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

580

Thursday, April 26th 2012, 12:30am

Quoted from "ItIsFinished22;527392"

What would be the proper syntax to test this API? According to ROM WIKI it gives this example:

Source code

1
local num_attrib_value, num_enchanted_value, num_percentage_value = GetPlayerAbility("MELEE_ATTACK");


I can test it out when I get home from work.


That would be the proper way then. The description on the RoMWiki explains what each value represents.

Note that since you never give a unit type to check, this function appears to only give the ability values for yourself. So it doesn't appear to be able to verify your target's values.

Anyway, if you just want a quicky macro to test it, try:

Source code

1
2
/run a,b,c=GetPlayerAbility("MELEE_ATTACK")
/run DEFAULT_CHAT_FRAME:AddMessage("My melee values are: "..a..", "..b..", "..c)
2013... The year from hell....