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.

281

Sunday, December 11th 2011, 5:57am

Ok, I tried really really hard not to have to post here, but I simply give up. No matter what I do, I break the addon.

I dowloaded the version in the OP. Loaded it up and tested it. Since my class combo is not in the file, all the addon would do is target the nearest enemy.

So I go in, do my thing to add my s/m section. Looks identical to the other sections, I save, I log back in, and then nothing. Literally nothing. It no longer targets anything and I am receiving zero errors.

So I go back in, tweak it, change it, fiddle with it, etc etc. Log in, nothing..

Reverted to original in case I some how messed something up, log in, and its targeting again. Rinse and repeat 2703 times, and here I am.

I have been back and forth in this thread trying to find my answer, google didn't help either. I have tried several variations of the other scout codes posted in here, and none of them work either. My macro is obviously correct if it is trying to do something before I make changes to the file.. and it is obviously something I am doing myself to break it entirely.

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
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: 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: Scout/Mage
            elseif mainClass == "RANGER" and subClass == "MAGE" then
    

                if enemy then
                Skill = {
					{ name = "Vampire Arrows",                  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 added my section to the end just before the comments stating don't add past this point, making sure to have the "elseif"
Out of utter frustration I had stripped my code down to only 1 spell, in a last ditch effort before I threw my computer through the wall. I had tried copy/pasting the other class combos already in the file, and changing absolutely only what needed to be changed, and it still wouldn't do anything, no targeting, and no errors.

I truly hope someone is able to help me.. I just don't get it.
All I want is a macro to push that will cast my prefered spells... lol

My priority list is:

Frost Arrow
Vampire Arrows
Lightning
Fireball
Wind Arrow(s) --Can't remember which it is, and game is closed down
Shot


Thank you if you take the time to read my babbling, and thank you even more if you are willing to try and help. Feel free to ask any questions necessary.

282

Sunday, December 11th 2011, 7:35am

Quoted from "krssrb;492450"

Hello TheRedShore,

here is your problem,
you use probobly in game macro

Source code

1
/run KillSequence("","2")
that's only for arg1 and gota2, but you have in lua file arg1, gota2, healpot, manapot, foodslot

Source code

1
function KillSequence(arg1, goat2, healthpot, manapot, foodslot)
So, or change this line like this

Source code

1
function KillSequence(arg1, goat2)
and use your old macro, then you will not use pots and food buy diyce.

Or you can add numbers of slots where are your pots and food in diyce and in your ingame macro.
something like this

Source code

1
2
3
4
5
6
7
 if (goat2 == "0") then
            Skill =  {
                { name = "Combat Master",                      use = ((not pbuffs['Combat Master'])) },
                { name = "Action: 62 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion number
                { name = "Action: 44"..healthpot,          use = (phealth <= .70) },
                { name = "Action: 45"..manapot,            use = (pctEB2 <= .40) },
                     }
and change your in game macro, something like this

Source code

1
/run KillSequence("","2","44","45","62)
I gues it will help you, it worked for me ;)


Thank you very much for the reply krssrb

Quoted from "ghostwolf82;492466"

Haven't really been keeping tabs on this thread, but since I checked it out really fast, figured I would add this much... This is incorrect info. The DIYCE will determine based on the macro what arguments (args) to use, not the other way around. You can have as many args in the function as you want, but until they are called with the macro, they lie dormant and do nothing. As for what the problem is, I am not sure, as I am no longer working on any addons at all for this game. When their support was pulled, my support has been pulled too.


Dang, will just have to keep playing with it.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

283

Sunday, December 11th 2011, 10:00am

@Ikesbaby,

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
            Skill =  {
                { name = "Frost Arrow",                      use = ((not pbuffs['Frost Arrow'])) },
                { name = "Action: 69 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion
                     }
            
            Skill2 = {
                { name = "Vampire Arrows",                     use = (true) },
                { name = "Piercing Arrow",                     use = (true) },
                { name = "Reflected Shot",                    use = (true) },
                { name = "Weak Spot",                          use = (true) },
                { name = "Combo Shot",                         use = (true) },
                { name = "Shot",                               use = (true) },
                { name = "Deadly Poison Bite",                 use = (true) },
                     }
What I have for my ScoutRogue.

Adding Focus Conditions might help with Wind Arrow if you choose to have it there.

In the case of a Scout, it would be something like this:

Source code

1
                { name = "Wind Arrow",                               use = ((EnergyBar1 > 20 )) },

hangman04

Savage Warrior

Posts: 113

Location: Romania

Mood: Smile

  • Send private message

284

Sunday, December 11th 2011, 3:40pm

Quoted from "XariRoM;492329"

this might work better for you:

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
function ChkBuffCount(tgt,buffname,BuffID,buffcount)
    local cnt = 1
    local buffcmd = UnitBuff
    local buffcounter = 0

    if UnitCanAttack("player",tgt) then
        buffcmd = UnitDebuff
    end
    local buff, _, _, ID = buffcmd(tgt,cnt)

    while buff ~= nil do
        if string.gsub(buff, "(%()(.)(%))", "%2") == buffname
            or ID == BuffID then
            buffcounter = buffcounter + 1        
        end
        cnt = cnt + 1
        buff = buffcmd(tgt,cnt)
        
        if buffcounter >= buffcount then
            return true
        end
    end    
end
and

Source code

1
2
3
4
5
                if enemy then
                Skill2 = {                
                    { name = "Tactical Attack",   use = ((EnergyBar1 >= 15) and (ChkBuffCount("target",_,500081,2))) },
                        }                        
                end    


Tyvm Xari!

285

Sunday, December 11th 2011, 7:58pm

Quoted from "mrmisterwaa;492499"

@Ikesbaby,

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
            Skill =  {
                { name = "Frost Arrow",                      use = ((not pbuffs['Frost Arrow'])) },
                { name = "Action: 69 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion
                     }
            
            Skill2 = {
                { name = "Vampire Arrows",                     use = (true) },
                { name = "Piercing Arrow",                     use = (true) },
                { name = "Reflected Shot",                    use = (true) },
                { name = "Weak Spot",                          use = (true) },
                { name = "Combo Shot",                         use = (true) },
                { name = "Shot",                               use = (true) },
                { name = "Deadly Poison Bite",                 use = (true) },
                     }
What I have for my ScoutRogue.



Thank you for trying to assist me mrmisterwaa. Unfortunately that did not solve my problems. But luckily I have located the errors. (They were hiding under an addon button... LAME.) Anyways, the error is:

\DIYCE\CustomFunctions.lua [string '?']:238: 'end' expected (to close 'function' at 154) near 'elseif'
My estimation based on that error is that I need another 'end' somewhere. My LUA knowledge is very minute however. I only changed exactly what was needed. On top of that, I simply replaced one of the combos that were already there, to make sure that the ends and all that were correct. (To clarify, I also changed the section that in the script for my class combo.) But alas, as soon as I enter the game it throws an error and does nothing at all. I started from scratch with a fresh copy of the CustomFunctions.lua several times, they always worked before I changed anything, by work I mean no errors and targeted an enemy when the macro was pressed.
But as soon as I touch it, I break it, lol. Oh, after adding in the bit of code you gave me, I used a syntax checker, and everything checked out according to it..

Anyways, here is the code I have now..

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
 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: Scout/Mage
            if mainClass == "RANGER" and subClass == "MAGE" then
                local SurpriseAttack = GetActionUsable(14)
    
            --Potions and Buffs
            Skill =  {
                { name = "Frost Arrow",                      use = ((not pbuffs['Frost Arrow'])) },
                --{ name = "Action: 69 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion
                     }
            
            Skill2 = {
                { name = "Vampire Arrows",                     use = (true) },
                --{ name = "Piercing Arrow",                     use = (true) },
                --{ name = "Reflected Shot",                    use = (true) },
                --{ name = "Weak Spot",                          use = (true) },
                --{ name = "Combo Shot",                         use = (true) },
                { name = "Shot",                               use = (true) },
                --{ name = "Deadly Poison Bite",                 use = (true) },
                     }
                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
                
            --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 
As you can see, I simply just commented out the spells that didn't apply to me, I did not add anything for the fear of breaking it.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

286

Sunday, December 11th 2011, 11:03pm

@Ikesbaby - You are too nice for me to not reply upon reading your problem. Had you been any less so, and this reply would not have been written. Curse you for being so polite! lol jk. Anyways, the error comes from a missing line in your code. Right above Skill2 you need to have "if enemy then". That will solve all of your problems. Because you took that out, you basically have an extra "end", which closes out the KillSequence function early. (Easily missed if you are not using Notepad++, also easily missed by someone new to all this.)

Here is what you will need for your KillSequence:

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
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: Scout/Mage
            if mainClass == "RANGER" and subClass == "MAGE" then
                local SurpriseAttack = GetActionUsable(14)
    
            --Potions and Buffs
            Skill =  {
                { name = "Frost Arrow",                      use = ((not pbuffs['Frost Arrow'])) },
                --{ name = "Action: 69 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion
                     }
            if enemy then
            Skill2 = {
                { name = "Vampire Arrows",                     use = (true) },
                { name = "Lightning",                            use = (pctEB1 >= .05) },
                { name = "Fireball",                            use = (pctEB1 >= .05) },
                { name = "Shot",                               use = (true) },
                     }
                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
Again, thank you for being so polite. Not seen most times from someone so frustrated with this addon. Also, as you move along the game, you will probably move away from using fireball, and probably only use lightening in certain times. In low levels those skills will help you increase your dps, and hold enemies in place, eventually however those same skills will slow your dps rotation down and you will most likely do what my S/P is doing for a rotation and become vampire arrows, shot, shot, dead.

287

Monday, December 12th 2011, 12:43am

@Ghostwolf. I think I have fallen in love!!! Everything works as it is supposed to now. Thank you ever so much. I am shocked that I missed that silly line. I had stared at it for so long over the past 24 hrs or so.
Also, thank you incredibly for the tip on my dps rotation, I have played for a while, but still consider myself quite the newb. I will definitely keep your tip in mind!

PS: You are totally awesome!!! :D :D

288

Tuesday, December 13th 2011, 12:06pm

I have a problem, that is probably not related to DIYCE at all, but it does appear only using DIYCE...

I use the "normal" Ammo Check/reload Code given here.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
             --Ammo Check and Equip
                if GetCountInBagByName("Runic Thorn") > 0 then
                    UseItemByName("Runic Thorn")
                    return true
                end
                if GetInventoryItemDurable("player", 9) == 0 
                    and GetTime() - arrowTime > 2 then
                        if (not RWB) then
                            UseAction(SlotRWB)
                            return
                        end
                    UseEquipmentItem(10)
                    arrowTime = GetTime()
                    return true
                end
            if (not MNB) then
                    UseAction(SlotMNB)
                    return
                end




This was working fine until suddenly not working at all. ("Item does not exist").
I searched for the reason and found my runewar-bow gone. in it's place was (in my arcane transmutator!) another (green) catapult. Error came when trying to use the actionslot with the runewarbow to equip it.

I didn't even think twice about writing to support for help - only a lot of effort and no result (we cannot comprehend/reconstruct/retrace... whatever they say in english ...)
So I got myself another runewar-bow and done.

...so I thought...

Now, after arming the bow, the error "item does not exist" appears when trying to use the bow to generate some arrows
(it's the "UseEquipmentItem(10)" - line).

Funny thing:
1) manually clicking on the bow after being equipped by DIYCE: Arrows are produced.
2) typing /script UseEquipmentItem(10) in the chatwindow after equipping the bow with DIYCE: Arrows are produced
using the bow in any way manually or with a macro: Arrows are produced. Only with DIYCE, this *'&%/$ error appears, no Arrows are produced.

3) after producing the arrows, DIYCE works fine: it equips the Arrows and works without a flaw...

It definitely is solely the line UseEquipmentItem(10) - which works fine outside DIYCE and has worked for me fine inside as well so far.
There have been no changes in DIYCE-code, there are no errors other than the "item does not exists" and all other lines in the code work well.

I'm quite sure I'm missing something here - but what ???
Anybody any idea ?

Johanjoker

Beginner

Posts: 16

Location: New York

Occupation: Student

  • Send private message

289

Tuesday, December 13th 2011, 10:41pm

[LEFT]can someone tell me why this doesnt work[/LEFT]

Quoted


function MageWarden (arg1, arg2, arg3)
[LEFT]local Skill = {}

local i = 0
[LEFT]local mana = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")[/LEFT]
[/LEFT]



[LEFT]if string.find(arg2, "instant")then
[LEFT]i=i+1; Skill = { name = "Earth Groaning Wind Blade", use = not friendly }
i=i+1; Skill[i] = { name = "Earth Surge", use = not friendly }
i=i+1; Skill[i] = { name = "Fireball", use = not friendly }
end [/LEFT]
[/LEFT]


[LEFT]if string.find(arg2, "buff")then
i=i+1; Skill[i] = { name = "Briar Shield", use = and string.find(pbuff, not "Briar Shield") }
i=i+1; Skill[i] = { name = "Earth Scepter", use = and string.find(pbuff, not "Earth Scepter") }
end[/LEFT]

[LEFT]MyCombat(Skill,arg1)

end[/LEFT]
[img][/img]

[LEFT]Risenglory M/w/wd 70/67/58[/LEFT]
[LEFT]Reni-heretic[/LEFT]
[LEFT]R.I.P Convocation Guild T_T[/LEFT]
[LEFT]R.I.P My dps[/LEFT]


290

Wednesday, December 14th 2011, 1:03am

love the new diyce 2.0,
i got everything working fine, but have a few problems, so i will be taking this off topic from others


i just got my hands on a sweet VN rage cape, so i was wondering how do i write a code for the new diyce 2.0 to swap my cape to the vn rage cape, use the skill then swap back
and is it possible to be able to use it during battle when i run out of rage, since the cooldown for the skill is only 1 minute,

if anyone have any clue or idea how i can implement this into my warriors rotation i be glad to hear, or is it just easier to write it out on a simple gear swap cast skill rotation with the ingame macro

but anyways,

:mad:RAGE ON:mad:

291

Wednesday, December 14th 2011, 9:02am

Quoted from "Johanjoker;493163"

[LEFT]can someone tell me why this doesnt work[/LEFT]


Because it's DIYCE 1.0

Johanjoker

Beginner

Posts: 16

Location: New York

Occupation: Student

  • Send private message

292

Wednesday, December 14th 2011, 5:17pm

Quoted from "Muinimula;493307"

Because it's DIYCE 1.0

????
[img][/img]

[LEFT]Risenglory M/w/wd 70/67/58[/LEFT]
[LEFT]Reni-heretic[/LEFT]
[LEFT]R.I.P Convocation Guild T_T[/LEFT]
[LEFT]R.I.P My dps[/LEFT]


ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

293

Wednesday, December 14th 2011, 6:13pm

He is saying this is the thread for DIYCE version 2, while your code is for DIYCE version 1.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

294

Wednesday, December 14th 2011, 10:27pm

Quoted from "choujiaki;493205"

love the new diyce 2.0,
i got everything working fine, but have a few problems, so i will be taking this off topic from others


i just got my hands on a sweet VN rage cape, so i was wondering how do i write a code for the new diyce 2.0 to swap my cape to the vn rage cape, use the skill then swap back
and is it possible to be able to use it during battle when i run out of rage, since the cooldown for the skill is only 1 minute,

if anyone have any clue or idea how i can implement this into my warriors rotation i be glad to hear, or is it just easier to write it out on a simple gear swap cast skill rotation with the ingame macro

but anyways,

:mad:RAGE ON:mad:


Mmm ...

What you can try is something a long the lines of Rune War Bow macros for DIYCE.

Switch it the RWB # with the slot for the Cape.

Set it to swap when your Rage hits < 5 and swap back to your other cape.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

295

Saturday, December 17th 2011, 6:48pm

A friend of mine has asked for my Warden script, and I am having troubles getting to email servers right now, so I am posting it here. (The toon this was used for is not past the level 50 mark, and therefore does not have the 45 or 50 elites in either script.)

Some of the warden code is taken from a post by Drake, credit for the summoning of the warden pets goes to him.

Rogue/Warden:

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
--Class: Rogue/Warden
            elseif mainClass == "THIEF" and subClass == "WARDEN" then
                --Timers for this class
                    CreateDIYCETimer("SSBleed", 8.8) --Change the value between 6 -> 7.5 depending on your lag.
                    CreateDIYCETimer("LBBleed", 8.8) --Change the value between 7 ->  8.5 depending on your lag.
                    CreateDIYCETimer("BBCritBonus", 20) --Timer for Bloodthirsty Blade Crit Bonus Effect
                    CreateDIYCETimer("PotWSBonus", 20) --Timer for Power of the Wood Spirit Damage Bonus Effect

            --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,            use = (phealth <= .70) },
                { name = "Action: "..manapot,            use = (pctEB2 <= .40) },
                { name = "Briar Shield",                use = ((not pbuffs['Briar Shield']) or (pbuffs['Briar Shield'].time <= 45))},
                { name = "Poison",                        use = (not combat) and ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45))},
                { name = "Action: "..speedpot,            use = (not pbuffs['Unbridled Enthusiasm']) },
                { name = "Action: "..foodslot,            use = (not pbuffs['Spicy Meatsauce Burrito']) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Premeditation",                use = (not combat) and boss and (EnergyBar1 >= 50) and (not pbuffs['Premeditiation']) },
                    { name = "Informer",                    use = boss },
                    { name = "Fervent Attack",                use = boss },
                    { name = "Savage Power",                use = boss },
                    { name = "Assassins Rage",                use = boss },
                    { name = "Weak Point Strike",            use = (pctEB2 >= .1) },
                    { name = "Bloodthirsty Blade",            use = (pctEB2 >= .1),    timer = "BBCritBonus"  },
                    { name = "Power of the Wood Spirit",    use = (pctEB2 >= .1),    timer = "PotWSBonus"  },
                    { 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 = "Wound Attack",                use = (EnergyBar1 >= 35) and (tbuffs[620313]) and (tbuffs[620314]) },
                    { name = "Low Blow",                    use = (EnergyBar1 >= 30) and (tbuffs[620313]) and (not tbuffs[620314]),    timer = "LBBleed" },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) and (not tbuffs[620313]),    timer = "SSBleed" },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) },
                    { name = "Power of the Wood Spirit",    use = (pctEB2 >= .1) },
                    { name = "Attack",                        use = (thealth == 1) },                    
                            }
                end
         
Warden/Rogue:

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
            --Class: Warden/Rogue
            elseif mainClass == "WARDEN" and subClass == "THIEF" then
                local SpiritOfTheOakActive = UnitExists("pet") and (UnitName("pet") == "Spirit of the Oak")
                local OakWalkerActive = UnitExists("pet") and (UnitName("pet") == "Oak Walker")
          
            --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,                    use = (phealth <= .70) },
                { name = "Action: "..manapot,                    use = (pctEB2 <= .40) },
                { name = "Briar Shield",                        use = ((not pbuffs['Briar Shield']) or (pbuffs['Briar Shield'].time <= 45))},
                { name = "Action: "..speedpot,                    use = (not pbuffs['Unbridled Enthusiasm']) },
                { name = "Action: "..foodslot,                    use = (not pbuffs['Spicy Meatsauce Burrito']) },
                { name = "Summon Spirit of the Oak",            use = (not pbuffs['Heart of the Oak']) and (not SpiritOfTheOakActive) },
                { name = "Heart of the Oak",                    use = SpiritOfTheOakActive and (not pbuffs['Heart of the Oak']) },
                { name = "Summon Oak Walker",                    use = (pbuffs['Heart of the Oak']) and (not OakWalkerActive) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Savage Power",                    use = boss },
                    { name = "Achilles' Heel Strike",            use = (EnergyBar2 >= 30) },
                    { name = "Gravel Attack",                    use = (EnergyBar2 >= 30) },
                    { name = "Shadowstab",                        use = (EnergyBar2 >= 20) },
                    { name = "Power of the Wood Spirit",        use = (pctEB1 >= .1) },
                    { name = "Attack",                            use = (thealth == 1) },                
                            }
                end

296

Tuesday, December 20th 2011, 6:45am

Quoted from "CROMI80;481314"

[LEFT] --Begin Player Skill Sequences

--Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT,
--Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
--Class: Scout/Warden
if mainClass == "RANGER" and subClass == "WARDEN" then

--Potions and Buffs
Skill = {
{ name = "Frost Arrow", use = (not pbuffs("Frost Arrow")) },
{ name = "Briar Shield", use = (not pbuffs("Briar Shield")) },
{ name = "Entling Offering", use = (not pbuffs("Entling Offering")) },
--Combat & PVE
if enemy and (mode == "PvE") then
Skill2 = {
{ name = "Snipe", use = (pbuffs("Hidden Peril")) },
{ name = "Combo Shot", use = (CD("Combo Shot")) },
{ name = "Autoshot", use = (not ASon) },
{ name = "Vampire Arrows", use = (CD("Vampire Arrows") and (EnergyBar1 >= 30)) },
{ name = "Thorn Arrow", use = (CD("Torn Arrow")) },
{ name = "Hidden Peril", use = (CD("Hidden Peril") and (EnergyBar1 >= 30)) },
{ name = "Reflected Shot", use = (CD("Reflected Shot")) },
{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) },
{ name = "Wind Arrows", use = ((CD("Wind Arrows")) and (EnergyBar1 >= 55)) },
{ name = "Shoot", use = (CD("Shoot")) },
}
--Combat & PVP
elseif enemy and (mode == "PvP") then
Skill2 = {
{ name = "Detection", use = (not pbuffs("Detection")) },
{ name = "Snipe", use = (pbuffs("Hidden Peril")) },
{ name = "Autoshot", use = (not ASon) },
{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) },
{ name = "Reflected Shot", use = (CD("Reflected Shot")) },
{ name = "Vampire Arrows", use = (CD("Vampire Arrows")) },
{ name = "Thorn Arrow", use = (CD("Torn Arrow")) },
{ name = "Hidden Peril", use = (CD("Hidden Peril") and (EnergyBar1 >= 30)) },
{ name = "Combo Shot", use = (CD("Combo Shot")) },
{ name = "Wind Arrows", use = ((CD("Wind Arrows")) and (EnergyBar1 >= 35)) },
}
end
i got this error message [string'?']:4: '=' expected near 'that'[/LEFT]


this thing dont work

can someone help me with a legit/working DIYCE with ingame macro ready?
ive looked through every single page of this thread and did not find anything that actually works.
HELP PLS!!

hangman04

Savage Warrior

Posts: 113

Location: Romania

Mood: Smile

  • Send private message

297

Tuesday, December 20th 2011, 4:31pm

Hey, ghost or mrmisterwaa, can you please post or pm the function required for the timer/fake cd check, cause the posted version (2.2) isn't updated yet. Ty!

298

Tuesday, December 20th 2011, 10:52pm

Quoted from "Chucknrz;495244"

this thing dont work

can someone help me with a legit/working DIYCE with ingame macro ready?
ive looked through every single page of this thread and did not find anything that actually works.
HELP PLS!!

Well... it works for most people here.
First of all: which Error do you get ?
Second: post your whole code, don't just quote someone else's code.
Third: Describe what you do (so we could probably point you to your error). Describe where you put the code. Describe, what works, and what not (and don't you dare to write "nothing" for an answer to this point...).
Use exactly the code from the opening post. use /run KillSequence() for a macro. that should work.

and last, but not least: You probably have DIYCE 1.0 in your addon folder and are now trying to get this code working with that... that won't do. Remove DIYCE 1.0, copy DIYCE 2.0.
Don't just look at the pages in this thread: read them. helps enormous !

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

299

Wednesday, December 21st 2011, 11:01pm

Quoted from "hangman04;495333"

Hey, ghost or mrmisterwaa, can you please post or pm the function required for the timer/fake cd check, cause the posted version (2.2) isn't updated yet. Ty!


You can either scroll back a couple pages and see how Peryl did it.

Or you can go to my signature and get the modified version of Ghostwolf's with the fake CD addition.

eguner

Beginner

Posts: 15

Location: Türkiye

  • Send private message

300

Friday, December 23rd 2011, 8:49am

Source code

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


i dont understand how this line works, can anyone help me please?