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.

241

Wednesday, November 30th 2011, 8:36am

Quoted from "ghostwolf82;488564"

I currently ha a R/P/S giving me R/P and R/S to play as. Here are my scripts for those two combos:

R/P
:

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
--Class: Rogue/Priest
            elseif mainClass == "THIEF" and subClass == "AUGUR" then
            
            --Potions and Buffs
            Skill = {
                { name = "Holy Aura",                    use = (phealth <= .20) },
                { name = "Regenerate",                    use = (phealth <= .90) and (pctEB2 >= .05) and (not pbuffs['Regenerate']) },
                { name = "Urgent Heal",                    use = (phealth <= .70) and (pctEB2 >= .05) and (not combat) },
                { 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 combat) and ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45))},
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    --{ name = "Throw",                        use = (not melee) and (not boss) },
                    { name = "Premeditation",                use = (not combat) and boss and (EnergyBar1 >= 50) and (not pbuffs['Premeditiation']) },
                    { 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 = (tbuffs[620313]) and (tbuffs[500704]) and (EnergyBar1 >= 35) },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) },
                    { name = "Attack",                        use = (thealth == 1) },                    
                            }
                end
R/S:

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
--Class: Rogue/Scout
            elseif mainClass == "THIEF" and subClass == "RANGER" then
                --Timers for this class
                    CreateDIYCETimer("SSBleed", 6.8) --Change the value between 6 -> 7.5 depending on your lag.
                    CreateDIYCETimer("LBBleed", 8.8) --Change the value between 7 ->  8.5 depending on your lag.
            
                --Ammo Check and Equip
                if GetCountInBagByName("Runic Thorn") > 0 then
                    UseItemByName("Runic Thorn")
                    return true
                end
                if GetInventoryItemDurable("player", 9) == 0 
                    and GetTime() - arrowTime > 2 then
                        if (not RWB) then
                            UseAction(SlotRWB)
                            return
                        end
                    UseEquipmentItem(10)
                    arrowTime = GetTime()
                    return true
                end
            if (not MNB) then
                    UseAction(SlotMNB)
                    return
                end
            
            --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,            use = (phealth <= .70) },
                { name = "Combat Master",                use = ((not pbuffs['Combat Master']) or (pbuffs['Combat Master'].time <= 45)) and (EnergyBar2 >= 30) },
                { name = "Poison",                        use = (not combat) and ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45)) },                
                }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Throat Attack",                use = melee and (silenceThis) },
                    { name = "Substitute",                    use = subThis and (EnergyBar2 >= 30) },
                    { name = "Energy Thief",                use = ((EnergyBar1 < 25) and (boss) and (not tDead)) },
                    { name = "Fervent Attack",                use = (pbuffs['Energy Thief']) },
                    { name = "Premeditation",                use = (not combat) and boss and (EnergyBar1 >= 50) and (not pbuffs['Premeditation']) },
                    { name = "Informer",                    use = boss },
                    { name = "Assassins Rage",                use = boss },
                    { name = "Evasion",                        use = boss },
                    { name = "Wrist Attack",                use = (EnergyBar2 >= 35) and boss },
                    { name = "Sneak Attack",                use = (EnergyBar1 >= 20) and boss and behind and party and (not combat) },
                    { name = "Blind Spot",                    use = (EnergyBar1 >= 20) and boss and behind and party },
                    { name = "Vampire Arrows",                use = (not melee) and (EnergyBar2 >= 20) },
                    { name = "Shot",                        use = (not melee) },
                    { name = "Wound Attack",                use = (EnergyBar1 >= 35) and (tbuffs[620313]) and (tbuffs[500704]) },
                    { name = "Low Blow",                    use = (EnergyBar1 >= 25) and (tbuffs[620313]) and (not tbuffs[500704]),    timer = "LBBleed" },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) and (not tbuffs[620313]),    timer = "SSBleed" },
                    { name = "Vampire Arrows",                use = (EnergyBar2 >= 20) },
                    { name = "Shot",                        use = true },
                    { name = "Shadowstab",                    use = (EnergyBar1 >= 20) },                    
                    { name = "Attack",                        use = (thealth == 1) },                    
                            }
                end
For the R/S combo, add this to the local variables section:

Source code

1
2
    local _,_,_,_,RWB,_ = GetActionInfo( SlotRWB )
    local _,_,_,_,MNB,_ = GetActionInfo( SlotMNB )


And then add this to CustomFunctions.lua, outside of any functions:

Source code

1
2
3
arrowTime = 0
SlotRWB = 16 --Action Bar Slot # for Rune War Bow
SlotMNB = 17 --Action Bar Slot # for your Main Bow


Hope this helps someone along the way.


That macro would have to put exactly for this function pardon for my bad English?

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

242

Wednesday, November 30th 2011, 8:56am

I think you are asking what would the macro look like to call this section of script? If that is what you are asking, then it is the exact same macro as the one found in the first post of this thread. The macro for DIYCE v2 never changes.

243

Wednesday, November 30th 2011, 10:50am

Hi Ghost,

great work here with DIYCE, i really admire it !

some remarks from me to your latest Post with your Rogue/Scout rotation:

I'm missing the part with "subThis" (which is a condition for your "Substitute") - i guess, it's a list like the one for "silenceThis"

Then I found, that you use the same skills twice (like Vampire Arrows, Shot, Shadowstab) - i guess, because of different conditions - first to use while grinding (not using melee attacks on mobs out there, eh ?) , second to use in melee only when all else are on cooldown ?
But what about Shadowstab ? Why do you use it first with the bleeding timer and then without any restraints ?

244

Wednesday, November 30th 2011, 11:20am

Quoted from "ghostwolf82;488970"

I think you are asking what would the macro look like to call this section of script? If that is what you are asking, then it is the exact same macro as the one found in the first post of this thread. The macro for DIYCE v2 never changes.


Thanks for your help, but I tested with the macros in the first post, and it does not work

245

Wednesday, November 30th 2011, 12:25pm

Quoted from "torivio360;488990"

Thanks for your help, but I tested with the macros in the first post, and it does not work

It's always helpful to give a wee little bit more information:
"it does not work" could mean, you have to start the game first, or you don't have DIYCE 2, or you do not have a target, or....

look at the minimap: is there a red glowing button ? Click on it, then go back to the first page of errors and post the error (if related to DIYCE).

btw: it COULD be the "subThis" - since you probably do not have this variable declared anywhere in your code...

put a "--" in front of that line in Ghostwolfs Code (in CustomFunctions.lua) and try to call DIYCE with "/run KillSequence()"

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

246

Wednesday, November 30th 2011, 12:38pm

Ghostwolf,

Did you fix the problem with GCD that occurred in the newest patch?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

247

Wednesday, November 30th 2011, 1:42pm

Quoted from "mrmisterwaa;488995"

Ghostwolf,

Did you fix the problem with GCD that occurred in the newest patch?


We are "pleased" with the current state of the GCD.

Having said this, we will "continue to monitor" the forums and are "continuing discussions" as to the implementation.

Welcome to Ruins of Magic.
2013... The year from hell....

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

248

Wednesday, November 30th 2011, 3:19pm

Oh I didn't make it clear enough.

Ghostwolf earlier in the thread (1 - 2 pages back) says that the GCD broke DIYCE's melee checker.

Did he fix it? >.>

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

249

Wednesday, November 30th 2011, 3:32pm

Quoted from "mrmisterwaa;489022"

Oh I didn't make it clear enough.

Ghostwolf earlier in the thread (1 - 2 pages back) says that the GCD broke DIYCE's melee checker.

Did he fix it? >.>


I don't think he's looked into it, but you might want to try adding a timer to the skill to compensate for the GCD (though it might also require changing some other code, I haven't bothered to look).
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

250

Wednesday, November 30th 2011, 4:15pm

@Muinimula - Look at post #218 for the subThis list. I used the code, but didn't (and won't take credit) create that piece.

As for the use of skills twice, yes it has to do with the conditionals. As for Shadow Stab, I want to apply the bleed (and then monitor it with the timer as well to make sure it isn't another rogues bleed), run through the other skills, and then if every single skill is on CD, or I only have 20 energy (lowest cost skill a rogue has), and all bleeds are current, then go ahead and spam SS. The line for "Attack" is the catch all, as it always has been.

@torivio360 - Try it with just "/run KillSequence()", and yes, as Muinimula said, a simple "it doesnt work" doesn't really help us to help you debug anything. Specifics are needed. Perhaps try posting exactly what you have in your CustomFunctions.lua

@Sekrit - The GCD is still an issue with the melee check, and other than Peryls suggestion of adding a global self timer to the code, I have not found a work around. I just try to time my button mashing a little better. Actually, now that I think about it while writing this, try this for a fix...

Open DIYCE.lua, find "function CD(skillname)" and change this line "return cd <= 0.4" back to the original "return cd == 0". This may well help to alleviate the GCD errors with melee checks we currently suffer from.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

251

Wednesday, November 30th 2011, 4:25pm

Quoted from "Grandpoubba;488581"

ok, i read the thread page by page but cannot find what im looking for
(almost certain i missed what im looking for but...ya know...lol)
I've been gone for 6months too since like april/may ish
i/ve lost most info, links, addons etc since then(PC total crash, long story hehe)
I want my "Ignore Pain" skill to activate if im feared for example.
in v1.4 i made a addition script looking at my debuffs on myself

if i remember i had a "pdbuff" that checked my debuffs and applied Ignore Pain if i was stunned, rooted etc

now, i could read old thread from scratch and make it and convert to new 2.2 but... Thought I'd ask the pros.
The fears spells applied to me are name "Primal Fear" and seem to be instant spells from mobs so "local silenceList" doest apply.


can someone point me in right direction please or give me an example as reference
TY all for your time

You could create a list (much like the silenceThis list) for any debuff that could be gotten rid of with your skill, then just call that skill with that list as a conditional.

And please try to post code in

Source code

1
2
3
4
5
 and [ /code] brackets.

Also, for your skill Feint, try this instead
[code]
{ name = "Feint",    use = ((_target == UnitName("target")) and (_type == "DODGE")) },

Grandpoubba

Beginner

Posts: 4

Location: Just a place...

Occupation: Just a job...

  • Send private message

252

Friday, December 2nd 2011, 12:42am

tx for Feint tip Ghost for starters.
sory for code, didnt preview, saw it after.

ya will make a pdebufflist like silencelist.
but my questions is, what is the code/script to check for "self debuffs check" is my question really. its not tbuffs for sure, is it pbuffs? if so, it doesnt recognize it by name. dont tell me its by debuff ID?

any additional would be appreciated ty
it would be the same as to check if your poisoned and use a cure poison skill(forget the class again)
...it's too hard to say "Au Revoir", so let's just say "Au Gratin"...

krssrb

Beginner

Posts: 20

Location: Serbia

  • Send private message

253

Friday, December 2nd 2011, 7:29pm

Mage/Scout need help

hi

im playing Mage/Scout, and from last patch there is global cooldown 1 sec on all my skill's, except on Scout skill "Shot". My problem is, after i cast "Flame" there is 1 sec delay, and in the in the meantime i can use "Shot" ("Shot" do same or more magic damage like "Fireball" cose of "Fire Arow" buff), but if i do this manualy i lose much on DPS. So if someone can help me to write function that after cast "Flame" fire "Shot" then again "Flame" then again "Shot"....
" if casted 1 than cast 2; if casted 2 than cast 1; ......"

254

Saturday, December 3rd 2011, 7:28pm

Quoted from "ghostwolf82;489040"


@torivio360 - Try it with just "/run KillSequence()", and yes, as Muinimula said, a simple "it doesnt work" doesn't really help us to help you debug anything. Specifics are needed. Perhaps try posting exactly what you have in your CustomFunctions.lua


I think i had the same problem with using the W/M config out of the box. It didn't like the commands "HealSlot" or "HoTSlot", so i just commented them out and it seems to work now.

Of course, make sure you've made the update to your DIYCE.LUA file that Peryl came up with back on p.18:

Quoted from "Peryl;482677"


To fix, change the following lines in the BuffList() function in DIYCE.lua

Source code

1
2
3
4
            -- Ad to list by name
            list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining or 0, id = ID }
            -- We also list by ID in case two different buffs/debuffs have the same name.
            list[ID] = {stack = stackSize, time = timeRemaining or 0, name = buff:gsub("(%()(.)(%))", "%2") }

All I did here is added or 0 where I use timeRemaining.



Also, regarding the comment about the demo macro on the first page not working, the macro provided has 6 argurments in it: /run KillSequence("v1",59,57,"","",20) but the KillSequence(arg1, healthpot, manapot, foodslot) only amounts to 4 arguments. I use something like /run KillSequence("v1",38,18,50) and it works for me.

Hope this helps!

255

Sunday, December 4th 2011, 9:41pm

Hello guys


I have a little problem.

I can t see how slot number are assigned when using " Action : " command
( which number correspond to wich action bar and slot )


Can someone explain me ?

Edit I have another problem : When a monster is casting a skill, it stop doing anything. v2 option return nothing.

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

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 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
function Rogue1(arg1, healthpot, manapot, foodslot)

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 = 1 -- GetActionUsable(1) -- # is your melee range spell slot number Desactivated due to patch problem
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

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

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
 
i = 0

if (boss) then 
    if (bossmode == 3) then        
        i=i+1; Skill[i] = { ['name'] = "Assassins Rage", ['use'] =(not pbuffs['Potion of Annihilation'])}
        i=i+1; Skill[i] = { ['name'] = "Action: 9 (Potion of Annihilation)", ['use'] =((not pbuffs['Assassins Rage']) and (not pbuffs['Potion of Annihilation']))} 
        i=i+1; Skill[i] = { ['name'] = "Action: 11 (Strong Stimulant)", ['use'] = (not pbuffs['Fervent Attack']) }
        i=i+1; Skill[i] = { ['name'] = "Informer", ['use'] = (not pbuffs['Informer']) }
        i=i+1; Skill[i] = { ['name'] = "Fervent Attack", ['use'] = (not pbuffs['Strong Stimulant'])}
    end
        
    if (bossmode == 2 ) then 
        i=i+1; Skill[i] = { ['name'] = "Informer", ['use'] = (not pbuffs['Informer']) }
        i=i+1; Skill[i] = { ['name'] = "Fervent Attack", ['use'] = (not pbuffs['Strong Stimulant'])}
        i=i+1; Skill[i] = { ['name'] = "Assassins Rage", ['use'] =(not pbuffs['Potion of Annihilation'])}
        
     end
    if (bossmode > 0 ) then 
    --    i=i+1; Skill[i] = { ['name'] = "Action: 50 (Unknown Choice)", ['use'] = (EnergyBar1 > 20) }
    --    i=i+1; Skill[i] = { ['name'] = "Action: 46 (Caviar Sandwich)", ['use'] = (not pbuffs['Caviar Sandwich']) }
        i=i+1; Skill[i] = { ['name'] = "Energy Thief", ['use'] = (EnergyBar1<=20)}
        i=i+1; Skill[i] = { ['name'] = "Throat Attack", ['use'] = ((EnergyBar2 >= 50) and (boss or elite) and (silenceThis)) }
        
    end
        
end    
i=i+1; Skill[i] = { ['name'] = "Action: 29 (Yawaka's Blessing)", ['use'] = (not pbuffs['Yawaka's Blessing']) }
i=i+1; Skill[i] = { ['name'] = "Combat Master", ['use'] = ((not pbuffs['Combat Master'])) }
i=i+1; Skill[i] = { ['name'] = "Poison", ['use'] = ((not pbuffs['Poisonous'])) }        
    
if ((enemy) and melee) then
            Skill2 = {
                
                --{ name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) }, -- need table skill
                { name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and ((tbuffs[500654]) and (tbuffs[500704]))) },
                --{ name = "Blind Spot",                         use = (EnergyBar1 >= 25) },
                { name = "Low Blow",                           use = ((EnergyBar1 >= 25) and (tbuffs[500654]) ) },
                { name = "Shadowstab",                         use = ((EnergyBar1 >= 20) and (not tbuffs[500654])) },
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Shot",                               use = ((EnergyBar1 < 20 )) },
                    }
    elseif (not melee) then
            Skill2 = {
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Shot",                               use = (not melee) },
                     }
            end
         

    


if (tDead) then return end

if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end

end
function Rogue2(arg1, healthpot, manapot, foodslot)

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 = 1 -- GetActionUsable(1) -- # is your melee range spell slot number Desactivated due to patch problem
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

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

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
 
i = 0

if (boss) then 
    if (bossmode == 3) then        
        i=i+1; Skill[i] = { ['name'] = "Assassins Rage", ['use'] =(not pbuffs['Potion of Annihilation'])}
        i=i+1; Skill[i] = { ['name'] = "Action: 9 (Potion of Annihilation)", ['use'] =((not pbuffs['Assassins Rage']) and (not pbuffs['Potion of Annihilation']))} 
        i=i+1; Skill[i] = { ['name'] = "Action: 11 (Strong Stimulant)", ['use'] = (not pbuffs['Fervent Attack']) }
        i=i+1; Skill[i] = { ['name'] = "Informer", ['use'] = (not pbuffs['Informer']) }
        i=i+1; Skill[i] = { ['name'] = "Fervent Attack", ['use'] = (not pbuffs['Strong Stimulant'])}
    end
        
    if (bossmode == 2 ) then 
        i=i+1; Skill[i] = { ['name'] = "Informer", ['use'] = (not pbuffs['Informer']) }
        i=i+1; Skill[i] = { ['name'] = "Fervent Attack", ['use'] = (not pbuffs['Strong Stimulant'])}
        i=i+1; Skill[i] = { ['name'] = "Assassins Rage", ['use'] =(not pbuffs['Potion of Annihilation'])}
        
     end
    if (bossmode > 0 ) then 
        i=i+1; Skill[i] = { ['name'] = "Action: 40 (Unknown Choice)", ['use'] = (EnergyBar1 > 20) }
        i=i+1; Skill[i] = { ['name'] = "Action: 36 (Caviar Sandwich)", ['use'] = (not pbuffs['Caviar Sandwich']) }
        i=i+1; Skill[i] = { ['name'] = "Energy Thief", ['use'] = (EnergyBar1<=20)}
        i=i+1; Skill[i] = { ['name'] = "Combat Master", ['use'] = ((not pbuffs['Combat Master'])) }
        
    end
        
end    
i=i+1; Skill[i] = { ['name'] = "Action: 29 (Yawaka's Blessing)", ['use'] = (not pbuffs['Yawaka's Blessing']) }
i=i+1; Skill[i] = { ['name'] = "Combat Master", ['use'] = ((not pbuffs['Combat Master'])) }
i=i+1; Skill[i] = { ['name'] = "Poison", ['use'] = ((not pbuffs['Poisonous'])) }        
    
if ((enemy) and melee) then
            Skill2 = {
                { name = "Throat Attack",                      use = ((EnergyBar2 >= 50) and (boss or elite) and (silenceThis)) },
                --{ name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) }, -- need table skill
                { name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and ((tbuffs[500654]) and (tbuffs[500704]))) },
                { name = "Blind Spot",                         use = (EnergyBar1 >= 25) },
                { name = "Shadowstab",                         use = ((EnergyBar1 >= 20) and (not tbuffs[500654])) },
                { name = "Low Blow",                           use = ((EnergyBar1 >= 25) and (tbuffs[500654]) and ((not tbuffs[500704]) or (pbuffs['Energy Thief']))) },
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Shot",                               use = ((EnergyBar1 < 20 )) },
                    }
    elseif (not melee) then
            Skill2 = {
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Shot",                               use = (not melee) },
                     }
            end
         

    


if (tDead) then return end

if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end

end

                        


function ChangeModeBoss(arg1)
if (bossmode==0) then 
bossmode =1
Msg("- Boss mode to ON LVL 1 -\n")
else if (bossmode==1) then
bossmode =2
Msg("- Boss mode to ON LVL 2 -\n")
else if (bossmode==2) then
bossmode =3
Msg("- Boss mode to ON LVL 3 -\n")
else 
bossmode =0
Msg("- Boss mode to OFF -\n")
end
end
end
end




Thanks

256

Monday, December 5th 2011, 4:07pm

Warrior/Warden

Hi my DIYCE dont work. I'm spaming "/run KillSequence()" macro and character dont attack target, only targeting it.

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
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")
    --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 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: Warrior/Warden
	elseif mainClass == "WARRIOR" and subClass == "WARDEN" then
    
        --Combat
        if enemy then
            Skill = {
                { name = "Survival Instinct",        use    = (health <= .33) },
                { name = "Savage Whirlwind",                    use = (EnergyBar2 >= 25) },
                { name = "Attack Weakener",                use = (EnergyBar2 >= 20) and (tbuffs['Vulnerable']) },
                { name = "Probing Attack",            use = (EnergyBar1 >= 15) },
                { name = "Open Flank",                use = (EnergyBar1 >= 10) and (tbuffs['Vulnerable']) and CD("Attack Weakener") },
                { name = "Slash",                    use = (EnergyBar1 >= 25) },
                { name = "Power of the Wood Spirit",                    use = (EnergyBar2 >= 25) },
                    }
        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 (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
        
    --Select Next Enemy
    if (tDead) then
        TargetUnit("")
        return
    elseif (not LockedOn) or (not enemy) then
        TargetNearestEnemy()
        return
    end
    
end

krssrb

Beginner

Posts: 20

Location: Serbia

  • Send private message

257

Tuesday, December 6th 2011, 1:37am

Quoted from "pikspk;490688"

Hi my DIYCE dont work. I'm spaming "/run KillSequence()" macro and character dont attack target, only targeting it.

I have save problem, it just target mobs and do nothing
It return messige:

[string 'KillSequence('','1')']:1: attempt to call global 'KillSequence' (a nil value)
Warrior80/Mage80/Warlock80

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

258

Tuesday, December 6th 2011, 9:49am

KillSequence("","1"),

Why do you have your healthpotion as Hotkey #1 ?

259

Tuesday, December 6th 2011, 9:55am

Quoted from "krssrb;490861"

I have save problem, it just target mobs and do nothing
It return messige:

[string 'KillSequence('','1')']:1: attempt to call global 'KillSequence' (a nil value)


if you get this error, the reason mostly is, that DIYCE has not been loaded properly.
Normally (!), the reason is a missing bracket somewhere (not always, but in 80%).
First thing:
Use an editor to count all "{" and "}" as well as all "(" and ")" - if the numbers don't match (between one class of brackets only, of course), you'll know what to search for.

Second thing: remove parts of the code inside the function "KillSequence" and look, if it works afterwards. If it does: search this part of the code for the error.

If you haven't found anything: post all your code here. (remember to use

Source code

1
 
tags).

hangman04

Savage Warrior

Posts: 113

Location: Romania

Mood: Smile

  • Send private message

260

Tuesday, December 6th 2011, 9:30pm

Hey Ghost, Peryl is the a way to count how many bleeds are on a target. I am asking this because i want to use TA on my warrior only if they are 2 bleed debuffs (500018) on the target.
Also regarding GCD, are u sure about going back to "return cd == 0" ? from what i saw it's still 1 sec animation and below 1 sec the actual cd...