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.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

301

Friday, December 23rd 2011, 11:46am

Quoted from "eguner;496199"

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?


Change 14 to whatever slot # in your hotkey action bar is your melee skill.

Shadowstab, Low Blow, Wound Attack. Anything with 50 range should be used.

eguner

Beginner

Posts: 15

Location: Türkiye

  • Send private message

302

Friday, December 23rd 2011, 12:37pm

Quoted from "mrmisterwaa;496214"

Change 14 to whatever slot # in your hotkey action bar is your melee skill.

Shadowstab, Low Blow, Wound Attack. Anything with 50 range should be used.


i got it, thanx for your help ;)

303

Thursday, December 29th 2011, 3:18pm

s/wd diyce

i have diyce 2.0 and it doesnt seem to work. i followed all the instructions on how to do so but no luck, can anyone help me out please? this is what is in my CustomFunctions.lua file just copied and paste didnt do any editting

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

--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
function ScoutWarden(arg1)
--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)) },
}
MyCombat(arg1,arg2)
end

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

304

Thursday, December 29th 2011, 3:59pm

First, put code tags around your code please.

Secondly,

Quoted from "Chucknrz;497578"

i followed all the instructions

No, you didn't.

Look at everyone elses code in this thread to figure out why.

305

Thursday, December 29th 2011, 10:09pm

Is there a m/d DIYCE?

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

306

Friday, December 30th 2011, 12:45am

Quoted from "aglupus;497680"

Is there a m/d DIYCE?

If you make one there is. ;)

307

Friday, December 30th 2011, 1:02am

Quoted

Quoted from "ghostwolf82;497589"

First, put code tags around your code please.
Secondly,

No, you didn't.

Look at everyone elses code in this thread to figure out why.


ok heres what i got

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

            --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 get a [string '?']:225: unexpected symbol near 'if'
my in game macro is /run KillSequence("", PVE)
and still no luck, not working for me =/

308

Friday, December 30th 2011, 4:27am

Quoted from "ghostwolf82;497716"

If you make one there is. ;)


Oh no, I can't code at all.

309

Friday, December 30th 2011, 8:37am

Quoted from "Chucknrz;497718"


i get a [string '?']:225: unexpected symbol near 'if'
my in game macro is /run KillSequence("", PVE)
and still no luck, not working for me =/
Your probably using diyce 2.0, download version 2.2 again from first page. Also

use = (CD("Torn Arrow")) }, < needs to be changed to Thorn Arrow
Eaglesfly:
Reni
62/60
K/R

Windreaper:
Reni
67/67/67
S/Wd/W

310

Friday, December 30th 2011, 1:29pm

Quoted from "eaglesfly;497793"

Your probably using diyce 2.0, download version 2.2 again from first page. Also

use = (CD("Torn Arrow")) }, < needs to be changed to Thorn Arrow


yeah i have 2.2 version, changed that to thorn arrow and all but still an error, i got something that didnt give an error yet it doesnt work properly it just casts a buff over and over, when i deleted that buff off the codes then it worked well until i popped a strong stim then all hell broke loose, only casted combo shot and nothing else. so eff it. none of these will ever work. thanks for the help

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

311

Friday, December 30th 2011, 10:07pm

Quoted from "Chucknrz;497826"

yeah i have 2.2 version, changed that to thorn arrow and all but still an error, i got something that didnt give an error yet it doesnt work properly it just casts a buff over and over, when i deleted that buff off the codes then it worked well until i popped a strong stim then all hell broke loose, only casted combo shot and nothing else. so eff it. none of these will ever work. thanks for the help


1) You forgot to put an arg2 (mode) in your KillSequence.
2) You need to make your code look pretty.
3) I fixed what I could from what you have provided (without checking it in-game, that is your job.)
4) I think Shoot > Wind Arrow btw.

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

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

    --Silence Logic
    local tSpell,tTime,tElapsed = UnitCastingTime("target")
    local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)
    
    --Potion Checks
    healthpot = healthpot or 0
    manapot = manapot or 0
    
    --Equipment and Pet Protection
    if phealth <= .04 then
            --SwapEquipmentItem()        --Note: Remove the first double dash to re-enable equipment protection.
        for i=1,6 do
            if (IsPetSummoned(i) == true) then
                ReturnPet(i);
            end
        end        
    end
        
    --Check for level 1 mobs, if it is, drop target and acquire a new one.
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetUnit("")
        return
    end
    
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        
        --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 = (true) },
                { name = "Autoshot",                   use = (not ASon) },
                { name = "Vampire Arrows",             use = (EnergyBar1 >= 30) },
                { name = "Thorn Arrow",                use = (true) },
                { name = "Hidden Peril",               use = (EnergyBar1 >= 30) },
                { name = "Reflected Shot",             use = (true) },  
                { name = "Piercing Arrow",             use = (true) }, 
                { name = "Wind Arrows",                use = (EnergyBar1 >= 55) },  
                { name = "Shoot",                      use = (true) },
                    }
            --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 = (true) },
                { name = "Reflected Shot",             use = (true) }, 
                { name = "Vampire Arrows",             use = (true) }, 
                { name = "Thorn Arrow",                use = (true) },
                { name = "Hidden Peril",               use = (EnergyBar1 >= 30) },
                { name = "Combo Shot",                 use = (true) },
                { name = "Wind Arrows",                use = (EnergyBar1 >= 35) },
                     }
            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

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

312

Saturday, December 31st 2011, 4:22am

As Sekret has fixed so kindly in your broken code, and I have seen others doing this as well... The use of something such as "{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) }," is rather redundant. As the code is already checking for the skill to be on cooldown, and therefore allows you to just run a "true" conditional check.

Posts: 86

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

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

  • Send private message

313

Sunday, January 1st 2012, 6:03am

Heres one to chew on.

Is there a way to code a condition to check whether a "key" is pressed? And if so, don't use "x" skill?

For example. I have my DIYCE running all of my skills perfectly for a S/R, but If I am kiting of any sort and it gets to Deadly Poison Bite, it wont go off because it requires a 1 second cast time and to stand still while casting. So if I need to move during burst phase my character ends up trying to use DPB over and over until I stop moving or another skill is off CD.

What I'm hoping for is a way to skip a skill if w, a, s or d is pressed at the time of /run KillSequence. In my case it would be DPB.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

314

Sunday, January 1st 2012, 12:15pm

Quoted from "ItIsFinished22;498243"

Heres one to chew on.

Is there a way to code a condition to check whether a "key" is pressed? And if so, don't use "x" skill?

For example. I have my DIYCE running all of my skills perfectly for a S/R, but If I am kiting of any sort and it gets to Deadly Poison Bite, it wont go off because it requires a 1 second cast time and to stand still while casting. So if I need to move during burst phase my character ends up trying to use DPB over and over until I stop moving or another skill is off CD.

What I'm hoping for is a way to skip a skill if w, a, s or d is pressed at the time of /run KillSequence. In my case it would be DPB.


Uh...

If you look back at the older DIYCE, I remember seeing something like this being used.

315

Monday, January 2nd 2012, 9:47pm

oK newbie here i have down loded the zip file extracted put in runesofmagic\interface\addons. I have the DIYCE folder with the 3 files in it checked the files to make sure windows not bloked them.

when start game i have no yellow writing saying that addon is loaded.

what have i done Wrong

and when i run macro i get a nill argument .

316

Tuesday, January 3rd 2012, 4:52am

Warmage Electrical Rage

Got a question about modifying the custom function for the warrior/mage combo. How would I go about refreshing the buff caused by the ability Electrical Rage before if drops?

The way it works now is the buff is stacked to 3 and does not get used again until the buff High Voltage has faded. Id really like to be able to keep this buff up as much as possible.

Can someone help me out with this?

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

317

Tuesday, January 3rd 2012, 6:40am

Quoted from "kraevyne;498737"

Got a question about modifying the custom function for the warrior/mage combo. How would I go about refreshing the buff caused by the ability Electrical Rage before if drops?

The way it works now is the buff is stacked to 3 and does not get used again until the buff High Voltage has faded. Id really like to be able to keep this buff up as much as possible.

Can someone help me out with this?


I would recommend researching here or in the DIYCE 1.0 thread about the use of Holy Strike to check how many "charges" of the seals are up and to use that to maintain it.

318

Tuesday, January 3rd 2012, 7:40pm

Quoted from "mrmisterwaa;497961"

1) You forgot to put an arg2 (mode) in your KillSequence.
2) You need to make your code look pretty.
3) I fixed what I could from what you have provided (without checking it in-game, that is your job.)
4) I think Shoot > Wind Arrow btw.


i gave it a shot, still getting error on 220 near if, dunno what to do with that lol.

319

Tuesday, January 3rd 2012, 9:35pm

Hey so I have extracted the files from the winzip file but when I try to go into the custom functions or any of them they just look like blank paper icons. Then when i click it searches for program to open them with, what program should i get in order to go in and edit these files? Or do i need to, once ive extracted them to the proper DIYCE folder in the runes of magic location can i do all the rest in game?
Thanks alot!

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

320

Wednesday, January 4th 2012, 11:21am

The first post describes how to use Notepad++ to edit the files.