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.

141

Thursday, November 10th 2011, 8:16pm

Ghostwolf check the 2.2 diyce.lua. Mine came up with an error on

Source code

1
 -function BuffParty(arg1,arg2)
Expecting "-" near "-". So i took out the "-"

Source code

1
 function BuffParty(arg1,arg2) 
back in business. Did it kick up an error on yours? if not why on mine?

Plus i added in Othersbuffs.

Source code

1
     local othersbuffs = { "Holy Protection" } 

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
     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
            if vocal then Msg("- Checking others buffs on "..UnitName("party"..num)) end
            for i,buff in ipairs(othersbuffs) 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 
Crap... hold up on othersbuffs. it was working lastnight and now i party with my GF and its not working.

Wow! It would help if i am in K/P mode to cast Holy protection. Ok all is good works fine.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

142

Thursday, November 10th 2011, 8:58pm

Quoted from "Skodziro;482130"

ABugCather displays such information:
[string'?']:169: attempt to call global 'PctM' (a nil value).

but if I delete this line of diyce error occurs in the next line and concerns ("local PCTs pctEB2 = (" player ")") but again when I delete this line passes to the next error command.

Can you post the files DIYCE.lua and DIYCE.toc? I think there might be something wrong in one of those files.
2013... The year from hell....

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

143

Thursday, November 10th 2011, 9:00pm

Quoted from "lordmohg;482138"

Ghostwolf check the 2.2 diyce.lua. Mine came up with an error on

Source code

1
 -function BuffParty(arg1,arg2)
Expecting "-" near "-".

Fixed. Thanks for pointing that out!

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

144

Thursday, November 10th 2011, 9:05pm

@freym - Really not sure why it is doing that to you. Your code appears to be the same as what I use for that skill, and mine works fine with no issues. Check your code against the one I posted for S/Wd to see if maybe I've done something different.

@Skodziro - line 169 of the second set of code doesn't exist, and the first section you posted line 169 is blank. What have you not posted that is causing this error? (A blank line and a non-existant line can not cause errors.)

145

Thursday, November 10th 2011, 9:06pm

diyce.toc

Source code

1
2
DIYCE.lua
CustomFunctions.lua

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
-- DIY Combat Engine version 2.2

local g_skill  = {}
local g_lastaction = ""

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("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, id = ID }
            -- We also list by ID in case two different buffs/debuffs have the same name.
            list[ID] = {stack = stackSize, time = timeRemaining, 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, "Item:") then
				action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
				if talktome then Msg("- "..Skill[x].name) end
				UseItemByName(action)
				return true
			elseif CD(Skill[x].name) then
				if talktome then Msg("- "..Skill[x].name) end
				CastSpellByName(Skill[x].name)
				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

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

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

146

Thursday, November 10th 2011, 9:25pm

@Skodziro:

Source code

1
-function BuffParty(arg1,arg2)

Here's your problem! This is the same problem that Lordmohg just pointed out and now fixed by Ghostwolf. Just remove the dash (-) at the start of this line.
2013... The year from hell....

147

Thursday, November 10th 2011, 9:31pm

Checking skill inhibition

im not sure if this possible but is there a way to check if skill entered inhibition to active its effect?

For example:
Elite skill of r/w "Decay" http://www.runesdatabase.com/skill/493017/decay
Can be used when Poisonous. It causes (DMG0) main hand weapon DPS + (FixDMG0) x Dexterity physical damage and increases your Critical Physical Hit Rate by 20...168.8* and Critical Physical Damage by 1...13%**. Effective for 12 seconds.
(After the effect has ended it cannot be triggered again for 20 seconds.)

What i wan is diyce to check if skill in this condition "(After the effect has ended it cannot be triggered again for 20 seconds.)" before using it

There is no debuff/buff when skill in that condition but im pretty sure there is a way in game mechanics to know it

148

Friday, November 11th 2011, 1:44am

I have a question with regard to:

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
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)
        -- 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



or why, after using the macro (/ run DIYCE_DebugBuffList (pbuffs)) in the chat command appears only BuffList ......... and nothing more no name or id buff.


And the second question is whether it is able to read Polish characters diyce as: (&#261;, &#281;, &#322; ... etc), with 1.4 diyce was not a problem.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

149

Friday, November 11th 2011, 4:57am

Quoted from "Skodziro;482228"

I have a question with regard to:

...snip...

or why, after using the macro (/ run DIYCE_DebugBuffList (pbuffs)) in the chat command appears only BuffList ......... and nothing more no name or id buff.

This is because the variable pbuffs only exists for the function KillSequence (it is declared local inside that function). Therefore, outside that function, as in a macro, pbuffs doesn't exist and therefore is considered nil.

Since DIYCE_DebugBuffList isn't receiving a list of buffs, it has nothing to display. Hence you get the header and footer but no list.

If you want to try it from a macro, do this instead:

Source code

1
/run DIYCE_DebugBuffList(BuffList("player"))


Quoted from "Skodziro;482228"

And the second question is whether it is able to read Polish characters diyce as: (&#261;, &#281;, &#322; ... etc), with 1.4 diyce was not a problem.

I don't think it will be a problem, but I'm not 100% sure. There is an old thread somewhere that talks about using EU characters with Lua, so you might want to hunt for it.
2013... The year from hell....

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

150

Friday, November 11th 2011, 5:06am

Quoted from "karol891;482168"

im not sure if this possible but is there a way to check if skill entered inhibition to active its effect?

For example:
Elite skill of r/w "Decay" http://www.runesdatabase.com/skill/493017/decay
Can be used when Poisonous. It causes (DMG0) main hand weapon DPS + (FixDMG0) x Dexterity physical damage and increases your Critical Physical Hit Rate by 20...168.8* and Critical Physical Damage by 1...13%**. Effective for 12 seconds.
(After the effect has ended it cannot be triggered again for 20 seconds.)

What i wan is diyce to check if skill in this condition "(After the effect has ended it cannot be triggered again for 20 seconds.)" before using it

There is no debuff/buff when skill in that condition but im pretty sure there is a way in game mechanics to know it


Do you get a cooldown timer on the elite skill's action bar? If so, you can probably get the cooldown with GetExtraActionCooldown() (or one of the variants depending on which bar it put the elite skill on, I don't actually play RoM anymore so I'm not sure.)
2013... The year from hell....

151

Friday, November 11th 2011, 5:59am

Quoted from "Peryl;482273"

Do you get a cooldown timer on the elite skill's action bar? If so, you can probably get the cooldown with GetExtraActionCooldown() (or one of the variants depending on which bar it put the elite skill on, I don't actually play RoM anymore so I'm not sure.)


Sadly there is no clue/hint , action bar only showing skill's cooldown which is 4sec for Decay.

152

Friday, November 11th 2011, 8:02am

I am having issues with my code, and i can't find where the problem lies.
Here is my DICE.lua and customfunctions.lua and macro that I use.

When i am solo on K/P P/K or M/D or D/M everything works just fine as intended. When i join a group with my other characters... I run 4 accounts sometimes to PL my GF and mom and friend odd things happen.
1. M/D does nothing but buff.
2. D/M does nothing but buff.
3. K/P works, except won't loot... UseSkill(1,1)
4. P/K Buffs and heals won't kill. or constantly casts Wave Armor.
5. When i change to KillSequence(debugall) it lists skills and pbuffs and tbuffs, but does not list skills2.

Again i want to say solo everything works fine. its in a group that i have issues.

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
-- DIY Combat Engine version 2.2

local g_skill  = {}
local g_lastaction = ""

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("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, id = ID }
            -- We also list by ID in case two different buffs/debuffs have the same name.
            list[ID] = {stack = stackSize, time = timeRemaining, 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, "Item:") then
                action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
                if talktome then Msg("- "..Skill[x].name) end
                UseItemByName(action)
                return true
            elseif CD(Skill[x].name) then
                if talktome then Msg("- "..Skill[x].name) end
                CastSpellByName(Skill[x].name)
                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

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 othersbuffs = { "Holy Protection" }
    
    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
            if vocal then Msg("- Checking others buffs on "..UnitName("party"..num)) end
            for i,buff in ipairs(othersbuffs) 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 
Custom Functions.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
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
 -- DIYCE 2.1
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)) and not combat 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: Knight/Priest
    -- DIYCE 2.1
            elseif mainClass == "KNIGHT" and subClass == "AUGUR" then

                local shield = true
                if GetEquipSlotInfo(17) == nil then
                    shield = false
                end
    
        --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,        use = (phealth <= .40) },
                { name = "Action: "..manapot,        use = ((pctEB1 <= .50) and (phealth >= .40)) }, -- only mana pot if decent health
                { name = "Magic Barrier",            use = (pctEB1 >= .05 and (not pbuffs['Magic Barrier'])) },
                { name = "Holy Seal",                use = (pctEB1 >= .05 and (not pbuffs['Holy Seal'])) },
                { name = "Enhanced Armor",            use = (pctEB1 >= .05 and (not pbuffs['Enhanced Armor'])) },
                { name = "Blessed Spring Water",    use = (pctEB1 >= .05 and (not pbuffs['Blessed Spring Water'])) },

        -- Heals
                { name = "Holy Shield",                use = (phealth <= .20) },
                { name = "Holy Illumination",          use = (combat and (phealth <= .75) and (not pbuffs['Holy Illumination'])) },
                { name = "Holy Aura",                use = (phealth <= .30) },
                { name = "Resolution",                use = (combat and (phealth <= .65)) },
                { name = "Urgent Heal",                use = (phealth <= .65) },
                { name = "Regenerate",                use = ((phealth <= .90) and (not pbuffs['Regenerate'])) },
                }

        -- Combat
                if enemy then
                Skill2 = {
                { name = "Shield of Valor",         use = ((phealth <= .8) and shield) },
                { name = "Shield of Discipline",    use = (silenceThis and shield) },
                { name = "Shield of Atonement",     use = (combat and shield and (not tbuffs['Restrained'])) },
                { name = "Rising Tide",                use = ((not melee) and (thealth >= .99)) }, -- To Pull with
                { name = "Mana Return",               use = (tbuffs['Holy Seals 3']) and (pctEB1 <= .70) },
                { name = "Threaten",                  use = (tbuffs['Holy Seals 3']) and (not tbuffs['Threaten']) },
                { name = "Hatred Strike",             use = (combat and party) },-- Agro Multiplier if in party only
                { name = "Disarmament",                use = ((UnitLevel("target") >= (UnitLevel("player") - 10)) and (boss or elite) and ((not tbuffs['Disarmament IV']) or (tbuffs['Disarmament IV'].time <= 3))) }, -- stack to 4
                { name = "Whirlwind Shield",           use = (melee and shield and pctEB1 >= .2 ) },
                { name = "Charge",                    use = (combat and not tbuffs['Charge'] and (tspell ~= nil) or not melee)}, -- charge spellcasters
                { name = "Holy Light's Fury",         use = (pctEB1 >= .2 ) and not tbuffs['Holy Light's Fury'] }, -- Knight/Priest 15 Elite
                { name = "Holy Smite",                use = (pctEB1 >= .2 ) and tbuffs['Holy Light's Fury'] }, -- Knight/Priest 20 Elite
                { name = "Holy Strike",               use = (pctEB1 >= .2 ) and not tbuffs['Light Seal III'] },
                { name = "Punishment",                 use = (tbuffs['Light Seal III']) },
                }
            end

    -- Class: Priest/Knight 2.22
    -- DIYCE 2.2
            elseif mainClass == "AUGUR" and subClass == "KNIGHT" then
            
                local FairyExists = UnitExists("playerpet")
                
                if FairyExists then
                    if (PctH("playerpet") <= 0.80) then
                            TargetUnit("playerpet")
                            CastSpellByName("Regenerate")
                        return
                    end
                end

        --Potions and Buffs
            Skill = {
                { name = "Last Prayer",             use = ((not FairyExists) and combat) },
                { name = "Light Fairy",                use = ((not FairyExists) and combat) },
                { name = "Action: "..healthpot,      use = (phealth <= .40) },
                { name = "Action: "..manapot,          use = ((pctEB1 <= .50) and (phealth >= .40)) }, -- only mana pot if decent health
                { name = "Magic Barrier",             use = ((pctEB1 >= .05) and (not pbuffs['Magic Barrier'])) },
                { name = "Enhanced Armor",            use = ((pctEB1 >= .05) and (not pbuffs['Enhanced Armor'])) },
                { name = "Blessed Spring Water",       use = ((pctEB1 >= .05) and (not pbuffs['Blessed Spring Water'])) },
                { name = "Holy Power",                 use = (combat and (pctEB1 <= .80) and (not pbuffs['Holy Power'])) },
                { name = "Wave Armor",                 use = (combat and not pbuffs['Wave Armor']) },
                { name = "Soul Bond",                  use = (not pbuffs['Soul Bond']) },
                { name = "Grace of Life",              use = (not pbuffs['Enhanced Grace of Life']) },
                { name = "Amplified Attack",        use = (LockedOn and not enemy and not UnitIsUnit("playertarget","playerpet") and not tdead and not tbuffs['Amplified Attack']) },
                { name = "Amplified Attack",        use = (not pbuffs['Amplified Attack']) },
                { name = "Healing Salve",            use = ((phealth <= .85) and not pbuffs['Healing Salve'] ) },
                { name = "Healing Salve",            use = ((phealth <= .85) and pbuffs['Healing Salve'] and (pbuffs['Healing Salve'].time <= 10)) },

        -- 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 = (LockedOn and not enemy and (thealth <= .80) and (not tbuffs['Regenerate'])) },
                { name = "Urgent Heal",               use = (LockedOn and not enemy and (thealth <= .55)) },
                { name = "Healing Salve",            use = (LockedOn and not enemy and (thealth <= .85) and not tbuffs['Healing Salve'] ) },
                { name = "Heal",                       use = (LockedOn and not enemy and (thealth <= .40)) },
                    }

                    
                -- Combat
                if enemy then
                Skill2 = {
                { name = "Bone Chill",                 use = (not tbuffs['Bone Chill']) },
                { name = "Rising Tide",                use = true },
                }
    
            end

    -- Class: Druid/MAGE
    -- DIYCE 2.1
            elseif mainClass == "DRUID" and subClass == "MAGE" then
        -- Silence
            Skill = {
                { name = "Silence",                      use = (silenceThis) },
                
        -- Potions
                { name = "Action: "..healthpot,           use = (phealth <= .40) },
                { name = "Action: "..manapot,             use = ((pctEB1 <= .50) and (phealth >= .40)) }, -- only mana pot if decent health
                
        -- Heals
                { name = "Mother Earth's Protection",      use = (phealth <= .30) },
                { name = "Recover",                       use = (phealth <= .40) },
                { name = "Curing Seed",                    use = (phealth <= .50) },
                { name = "Restore Life",                   use = ((phealth <= .60) and (pbuffs['Nature's Power'].stack <=2))}, -- use this ahead of Recover if low on Natures Power
                { name = "Recover",                     use = (not enemy and (thealth <= .60) and (not tbuffs['Recover'])) },
                { name = "Recover",                     use = ((phealth <= .60) and (not pbuffs['Recover'])) },
                { name = "Antidote",                     use = (not enemy and tbuffs['Poisoned']) },
                { name = "Purify",                         use = (not enemy and tbuffs['Curse']) },
                { name = "Antidote",                     use = (pbuffs['Poisoned']) },
                { name = "Purify",                         use = (pbuffs['Curse']) },
                { name = "Blossoming Life",             use = ((phealth <= .80) and (not pbuffs['Blossoming Life'])) },
                { name = "Blossoming Life",             use = ((phealth <= .90) and not combat) },
                { name = "Blossoming Life",             use = (not enemy and (thealth <= .80)) },

        -- Buffs
                { name = "Savage Blessing",             use = (not pbuffs['Savage Blessing']) },
                { name = "Concentration Prayer",         use = (not pbuffs['Concentration Prayer']) },
                { name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
                }

        -- Ranged Attack
                if enemy then
                Skill2 = {
                { name = "Intensification",                use = (not pbuffs['Intensification']) },
                { name = "Binding Silence",              use = (tspell ~= nil and ttime >= 1 and (ttime - telapsed) > 0.5 and pctEB1 >= .05) },
                { name = "Briar Entwinement",             use = (not tbuffs['Briar Entwinement'] or BuffTimeLeft("target", "Briar Entwinement") <=2) },
                { name = "Fireball",                       use = (combat) },
                { name = "Earth Pulse",                   use = (combat) },
                { name = "Weakening Seed",                use = ((boss or elite) and (not tbuffs['Weakening Seed']) and (pbuffs['Nature's Power'].stack >= 3)) },
                { name = "Lightning",                     use = (not tbuffs['Lightning']) },
                { name = "Rockslide",                     use = (true) },
                { name = "Earth Arrow",                   use = (true) },
                }
                    
            end

    -- Class: Mage/Druid
    -- DIYCE 2.1
            elseif mainClass == "MAGE" and subClass == "DRUID" then

        -- Silence
            Skill = {
                { name = "Silence",                        use = (silenceThis) },

        -- Potions
                { name = "Action: "..healthpot,            use = (phealth <= .50) },
                { name = "Action: "..manapot,              use = ((pctEB1 <= .50) and (phealth >= .50)) }, -- only mana pot if decent health
        -- Heals
                { name = "Recover",                       use = ((phealth <= .60) and (not pbuffs['Recover'])) },
                { name = "Recover",                       use = (phealth <= .30) },
                { name = "Recover",                       use = ((phealth <= .90) and (not combat)) }, -- top off before fight
        -- Buffs
                { name = "Perception",                    use = (not pbuffs['Perception']) }, -- Mage/Druid Elite 15
                { name = "Magic Target",                  use = (not combat and not pbuffs['Magic Target']) }, -- Mage/Druid Elite 20
                { name = "Savage Blessing",               use = (not pbuffs['Savage Blessing']) },
                { name = "Fire Ward",                     use = (not pbuffs['Fire Ward']) },
            -- In case Electrostatic Charge is still on cooldown and you're getting hit hard
                { name = "Mother Earth's Protection",     use = ((phealth <= .30) and not pbuffs['Electrostatic Charge']) },  
                }

        -- Ranged Attack
                if enemy then
                Skill2 = {
                { name = "Fireball",                    use = (true) },
                { name = "Elemental Catalysis",           use = (not pbuffs['Elemental Catalysis']) },
                { name = "Intensification",               use = (not pbuffs['Intensification']) },
                { name = "Electrostatic Charge",          use = (not pbuffs['Electrostatic Charge']) },
                { name = "Lightning",                      use = (not tbuffs['Lightning']) },
                { name = "Meteor Shower",                use = (combat and tbuffs['Lightning']) },
                { name = "Phoenix",                       use = (combat and melee) },
                { name = "Earth Pulse",                  use = (combat and melee) },
                { name = "Discharge",                   use = (combat and melee) },
                { name = "Flame",                        use = (not tbuffs['Lightning']) },
                { name = "Plasma Arrow",                  use = (not pbuffs['Charged']) },
                }
            end

    -- Class: Scout/Warden
    -- DIYCE 2.1
            elseif mainClass == "RANGER" and subClass == "WARDEN" then

                local a1,a2,a3,a4,a5,ASon = GetActionInfo(22) -- Qbarslot for AutoShot
    
        --  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")
                return
            end

        -- Potions
            Skill = {
                { name = "Action: "..healthpot,        use = (phealth <= .50) },
                { name = "Action: "..manapot,          use = ((pctEB2 <= .50) and (phealth >= .50)) }, -- only mana pot if decent health

        -- Self Bufffs
                { name = "Frost Arrow",                use = (EnergyBar1 >= 20 and not pbuffs['Frost Arrow']) },
                { name = "Concentration",              use = (EnergyBar1 >= 20 and not pbuffs['Concentration']) },
                { name = "Briar Shield",              use = (not pbuffs['Briar Shield']) },
                }

            --  Use Throat Attack on detect enemy spell cast.
                if enemy then
                Skill2 = {
                { name = "Throat Attack",            use = (melee and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and pctEB1 >= 15) },

        -- Combat
                { name = "Savage Power",               use = (combat and not pbuffs['Savage Power']) },
                { name = "Elven Amulet",               use = (combat and (not pbuffs['Elven Amulet'])) },
                { name = "Arrow of Essence",           use = (EnergyBar1 >= 20 and boss) },
                { name = "Target Area",                use = (combat and boss) },
            -- I only use Blood Arrow in partys.
                { name = "Blood Arrow",              use = (phealth >= .80 and party and combat and not pbuffs['Blood Arrow']) },

        -- Shots
                { name = "Shot",                    use = (combat) },
                { name = "Autoshot",                use = (not ASon and combat) },
                { name = "Hidden Peril",               use = (pbuffs[ 'Hidden'] and EnergyBar1 >= 35) }, -- Warden 25 Elite
                { name = "Snipe",                      use = (pbuffs[ 'Hidden Peril']) },
                { name = "Vampire Arrows",             use = (EnergyBar1 >= 50 and not tbuffs['Vampire Arrows']) },
                { name = "Piercing Arrow",             use = (true) },
                { name = "Wind Arrows",                use = (thealth >= .75 and EnergyBar1 >= 50) },
                { name = "Combo Shot",                use = (true) },
                { name = "Thorn Arrow",                use = (pbuffs['Briar Shield']) }, -- Warden 15 Elite
                { name = "Reflected Shot",             use = (true) },

            -- Wrist and Joint- only if focus is plentiful.  I dunno if Joint attack is even worthwhile- maybe for kiting?
                { name = "Wrist Attack",                  use = (not tbuffs['Wrist Attack'] and EnergyBar1 >= 50 and melee) },
                { name = "Joint Blow",                    use = (not tbuffs['Joint Blow'] and EnergyBar1 >= 50 and melee) },
                { name = "Power of the Wood Spirit",    use = (melee) },
                { name = "Gryphon Bash",                     use = (melee) },
                { name = "Charged Chop",                  use = (melee) },
                }
            end

    -- Class: Warden/Scout
    -- DIYCE 2.1
            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
                return
            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")
                return
            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: 3 (Pet Attack)",     use = ((not petAttackActive) and (not tdead) and PetExists) },
            -- Make sure pet is assisting me.
                { name = "Pet Skill: 3 (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. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --ADD MORE CLASS COMBOS HERE. 
            --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
        UseSkill(1,1) -- Loot Corpse
          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

-- Custom Local Functions
-- DoTMaster Function adds target to focus and keeps spell refreshed.
-- usage /run DoTMaster("Spell Name")

function DoTMaster(spellname)

    local LockedOn = UnitExists("target")
    local tDead = UnitIsDeadOrGhost("target")
    local enemy = UnitCanAttack("player","target")
    local spell = UnitCastingTime("player")  -- Spell being cast?

    
    -- Stops if spell is mid cast
    if (spell ~= nil) then
        return
    end

--Check for level one mobs before doing combat
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetNearestEnemy()
        return
    end

    local function add_to_focus(thisunit)
        local onlist = false
        local freeslot = 0

        for i = 1,10 do
            if (not UnitExists("focus"..i)) and (freeslot == 0) then
                freeslot = i
            elseif UnitIsUnit(thisunit, "focus"..i) then
                return false
            end
        end

        if freeslot == 0 then
            Msg("All slots full, skipping "..thisunit)
            return false
        else
            FocusUnit(freeslot, thisunit)
        end
    end

    if enemy and not tDead and (UnitLevel("target") > 1) then
        if add_to_focus("target") then
            CastSpellByName(spellname)
            return true
        end
    end

    for i = 1,10 do
        if UnitIsDeadOrGhost("focus"..i) and (not UnitIsPlayer("focus"..i)) then
            FocusUnit(i, "")
        elseif UnitExists("focus"..i) and UnitCanAttack("player", "focus"..i)
        and (BuffTimeLeft("focus"..i, spellname) <= 2) then
            FocusUnit(11, "target")
            TargetUnit("focus"..i)
            CastSpellByName(spellname)
            TargetUnit("focus11")
            FocusUnit(11, "")
            return true
        end
    end
end
Macro for Knight Priest:

Source code

1
2
/run if not BuffParty(14) then if not PartyHealer.Main() then KillSequence("",11,12); end
/run if GetPlayerCombatState() then DoTMaster("Holy Light's Fury"); end  
Macro for Priest Knight:

Source code

1
2
 /run if not PriestFairySequence("v1") then if not BuffParty(14) then if not PartyHealer.Main() then KillSequence("v1",11,12); end end end
/run DoTMaster("Bone Chill") 
Macro for Mage Druid and Druid Mage:

Source code

1
 /run if not BuffParty(14) then if not PartyHealer.Main() then KillSequence("v1",11,12); end end

153

Friday, November 11th 2011, 9:27am

Is there a macro, addon, which function in diyce tell me exactly buff ID number, the Item Preview for or if anyone knows the ID "Hidden Peril," for Item Preview shows the ID number (504588), but this number or ID number is not buff "Hidden Peril "or lacking in some features diyce reading ID numbers for a buff.

154

Friday, November 11th 2011, 10:21am

Quoted from "Skodziro;482314"

Is there a macro, addon, which function in diyce tell me exactly buff ID number, the Item Preview for or if anyone knows the ID "Hidden Peril," for Item Preview shows the ID number (504588), but this number or ID number is not buff "Hidden Peril "or lacking in some features diyce reading ID numbers for a buff.



i got two id on that . 494039 and 494620
prbly skill id and buff id, not sure.
You might give it a try tho.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

155

Friday, November 11th 2011, 10:39am

Quoted from "Skodziro;482314"

Is there a macro, which function in diyce tell me exactly buff ID number

Yes, there is. Read through this thread again, you will find it... at least twice.

156

Friday, November 11th 2011, 1:01pm

Localization ?!

Hi guys,

i am using DIYCE right now, and i try to adapt DIYCE2.0 - for german servers. Its working already for combat / skills, but i am missing the translations for the silenceList.

Any idea how to find the german translations for the casts of the mobs?

ie "Annihilation" should be ""Vernichtung" in german, but the others...

how did they translate "King Bug Shock", "Mana Rift" etc. to german?

Any hint appreciated

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

157

Friday, November 11th 2011, 1:55pm

Quoted from "Tussilein;482360"

Hi guys,

i am using DIYCE right now, and i try to adapt DIYCE2.0 - for german servers. Its working already for combat / skills, but i am missing the translations for the silenceList.

Any idea how to find the german translations for the casts of the mobs?

ie "Annihilation" should be ""Vernichtung" in german, but the others...

how did they translate "King Bug Shock", "Mana Rift" etc. to german?

Any hint appreciated


I'm not sure what the translations should be, but if you can find the spells on runesdatabase then you can switch the website's language to German and see what it says (just a thought).

Edit:
Just tried with Mana Rift and got Manakluft.
2013... The year from hell....

158

Friday, November 11th 2011, 3:19pm

if you mean the function

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
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)
        -- 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


This feature does not work at all for me wants to know why I do not even like creature diyce all recommending feature pops up after use to me only (Buff list .............) or (Skill list ...... .) and nothing after that so desperately needs to learn some macro ID "Hidden Peril."

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

159

Friday, November 11th 2011, 4:04pm

Quoted from "Skodziro;482412"

if you mean the function

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

Funkcja DIYCE_DebugSkills (skillList)
    DEFAULT_CHAT_FRAME: AddMessage (. GREEN. "Lista umiej&#281;tno&#347;ci:")
    
    for i, v w ipairs (skillList) nie
        DEFAULT_CHAT_FRAME:.. AddMessage (SILVER. "[' .. WHITE .. i. SILVER ..']: ".. LTBLUE .. " ".. WHITE .. v.name .. LTBLUE .." \ "u&#380;ywa&#263; = ".. WHITE .. (v.use i" prawda "lub" false "))
    koniec

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

DIYCE_DebugBuffList funkcji (buffList)
    DEFAULT_CHAT_FRAME: AddMessage (. GREEN. "Lista Buff:")
    
    k, v w parach (buffList)
        - Mamy ignorowa&#263; ponumerowanych wpisów, poniewa&#380; zarówno ID i nazw&#281; 
        - Przechowywane s&#261; na li&#347;cie. Zapobiega to podwojenie produkcji.
        je&#347;li typ (k) ~ = "numer", a nast&#281;pnie
            DEFAULT_CHAT_FRAME:.. AddMessage (SILVER. "[' .. WHITE .. k. SILVER ..']: ".. LTBLUE .." id: ".. WHITE .. v.id. LTBLUE ..". Stosu: ".. WHITE .. v.stack .. LTBLUE .." czas: ".. WHITE .. v.time)
        koniec
    koniec
    
    DEFAULT_CHAT_FRAME: AddMessage (GREEN. ."----------")    
koniec


This feature does not work at all for me wants to know why I do not even like creature diyce all recommending feature pops up after use to me only (Buff list .............) or (Skill list ...... .) and nothing after that so desperately needs to learn some macro ID "Hidden Peril."

Why did you translate the Lua code? Of course this isn't going to work. Lua doesn't understand Polish words. The only thing you should translate to Polish are the text strings.

Further, I don't know what you used to actually do the translation, but it isn't even done consistently. Some of these are:
  • The local GREEN doesn't have the Polish word for local in front of it.
  • The second function seems to have the Polish word for function after the function name.
  • Some of the concatenation operators (..) have a space between them while others were converted to a single period.
  • One of the calls to DEFAULT_CHAT_FRAME:AddMessage has two periods inserted between the colon ( : ) and AddMessage.

In-short, this is a mess. Use the code I originally posted, make sure it is part of DIYCE, or better yet just get the latest version from first post and redo some of your changes. Then only translate the text strings.
2013... The year from hell....

160

Friday, November 11th 2011, 4:11pm

Translated lua code is pasted by mistake, but already I can finally find a solution to my problem and diyce buff id already read where I wanted. Without your help probably would not have succeeded.