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.

841

Wednesday, November 21st 2012, 1:03am

Quoted from "Dreamcatcher;577707"


Problem is it will cast Antidote while target is still casting there poison. Can't get it to do it after.


That is because the silenceThis code is made to interrupt the casting. When I said we would need a debuff list similar to the silenceThis list, I didn't mean that the silenceThis code would work. I was thinking more of having a debuff list made so that when DIYCE read

Source code

1
 { name = "Antidote",   use = (pctEB1 >= .05) and (pbuffs = (poisonList)) },
but I don't know if pbuffs would even check a debuff list or how to even edit it to try.

I am having real issues with pet commands. I hadn't noticed this before but in my wrdn/d DIYCE when I applied

Source code

1
{ name = "PetSkill: 7",          use = boss or elite },
anything after that line would not work. I hadn't noticed it because my chat was being spamed with "Ability not available, PetSkill: 7" even when the ability did fire. Just last night I realized that I was ending up spamming Charged Chop while Cross chop and Blade of Protection were on CD. So what i think is happening is DIYCE is not recognizing the CD of pet skills at all so keeps trying to fire them.

Anyone know how to change the code so it checks the CD of pet skills?

Posts: 17

Location: New Mexico

Occupation: Server

  • Send private message

842

Saturday, November 24th 2012, 7:16pm

I did some tweaking to my Mage combo classes but not sure if its all right. Still learning a good rotation. Can someone look this over and let me know if there is anything that needs changing or added. I don't have the elite spells yet.

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
	-- Class: Mage/Druid
	elseif mainClass == "MAGE" and subClass == "DRUID" then
		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
			{ 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 = "Savage Blessing",               use = (not pbuffs['Savage Blessing']) },
			{ name = "Energy Influx",                 use = (not pbuffs['Energy Influx']) },
			{ name = "Energy Well",                   use = ((boss or elite) and (not pbuffs['Energy Well'])) },
			{ name = "Fire Ward",                     use = (not pbuffs['Fire Ward']) },
			{ name = "Electrostatic Charge",          use = (not pbuffs['Electrostatic Charge']) },
			-- 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']) },  
			{ name = "Elemental Catalysis",           use = (not pbuffs['Elemental Catalysis']) },
			{ name = "Intensification",               use = (not pbuffs['Intensification']) },
			}
		if enemy then
			Skill2 = {
				{ name = "Elemental Weakness",        use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
				{ name = "Electric Bolt",             use = ((boss or elite) and not tbuffs['Electric Current']) },
				{ name = "Fireball",                  use = (true) },
				{ name = "Lightning",                 use = (not tbuffs['Lightning']) },
				{ name = "Flame",                     use = ((boss or elite) and tbuffs['Elemental Weakness']) },
				{ name = "Earth Pulse",               use = (combat and melee) },
				{ name = "Phoenix",                   use = (combat and melee) },
				{ name = "Discharge",                 use = (combat and melee) },
				{ name = "Meteor Shower",             use = (combat and tbuffs['Lightning']) },
				{ name = "Plasma Arrow",              use = (not pbuffs['Charged']) },
			}
		end

	-- Class: Mage/Scout
	elseif mainClass == "MAGE" and subClass == "RANGER" then
		-- Scout Cancel Blood Arrows out of combat or at less than 40% health, without invoking the GCD.    
		if friendly or (not UnitExists("target")) or tdead or (phealth <= .40) and (pbuffs['Blood Arrow']) then 
			CancelBuff("Blood Arrow")
		end
		Skill = {
			-- Silence
			{ 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
			-- Buffs
			{ name = "Energy Influx",                 use = (not pbuffs['Energy Influx']) },
			{ name = "Energy Well",                   use = ((boss or elite) and (not pbuffs['Energy Well'])) },
			{ name = "Fire Ward",                     use = (not pbuffs['Fire Ward']) },
			{ name = "Electrostatic Charge",          use = (not pbuffs['Electrostatic Charge']) },
			-- 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']) },  
			{ name = "Elemental Catalysis",           use = (not pbuffs['Elemental Catalysis']) },
			{ name = "Intensification",               use = (not pbuffs['Intensification']) },
			}
		if enemy then
			Skill2 = {
				--  Scout Use Throat Attack on detect enemy spell cast.
				--  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 EnergyBar1 >= 15) },
				-- Combat
				{ name = "Blood Arrow",               use = (phealth >= .80 and party and combat and not pbuffs['Blood Arrow']) },
				{ name = "Vampire Arrows",            use = (EnergyBar1 >= 20 and not tbuffs['Vampire Arrows']) },
				{ name = "Elemental Weakness",        use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
				{ name = "Electric Bolt",             use = ((boss or elite) and not tbuffs['Electric Current']) },
				{ name = "Fireball",                  use = (true) },
				{ name = "Lightning",                 use = (not tbuffs['Lightning']) },
				{ name = "Flame",                     use = ((boss or elite) and tbuffs['Elemental Weakness']) },
				{ name = "Phoenix",                   use = (combat and melee) },
				{ name = "Discharge",                 use = (combat and melee) },
				{ name = "Meteor Shower",             use = (combat and tbuffs['Lightning']) },
				{ name = "Plasma Arrow",              use = (not pbuffs['Charged']) },
				-- Scout Wrist and Joint- only if focus is plentiful.
				{ name = "Wrist Attack",              use = (not tbuffs['Wrist Attack'] and EnergyBar2 >= 50 and melee) },
				{ name = "Joint Blow",                use = (not tbuffs['Joint Blow'] and EnergyBar2 >= 50 and melee) },
			}
		end

843

Thursday, November 29th 2012, 11:18am

CreateDIYCETimer error

Hi guys.. Im playing a Scout/Rogue and this is the part of my custom file

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
-- Class: Scout/Rogue
        elseif mainClass == "RANGER" and subClass == "THIEF" then

            --Timers for this class
            CreateDIYCETimer("ExploitCooldown", 32, false)  <--this is the line 147 which i see as an error

            if (enemy and (arg2 == "DPS")) then
                Skill2 = {
                    { name = "Timer: ExploitCooldown",            use = (tbuffs['Exploiting Shot']) and (GetDIYCETimerValue("ExploitCooldown") == 0) },
                    { name = "Autoshot",                        use = (not ASon) },
                    { name = "Sapping Arrow",                    use = (not pbuffs['Sapping Arrow']) },
                    { name = "Shot",                            use = (GetDIYCETimerValue("ExploitCooldown") == 0) },
                    { name = "Reflected Shot",                    use = true },
                    { name = "Vampire Arrows",                    use = true },
                    { name = "Deadly Poison Bite",                use = true },
                    { name = "Piercing Arrow",                    use = true },
                    { name = "Combo Shot",                        use = true },
                    { name = "Weak Spot",                        use = true },
                    { name = "Wind Arrows",                        use = (EnergyBar1 >= 20) }
                            }

            elseif (enemy and (arg2 == "FARM")) then
                Skill2 = {
                    { name = "Reflected Shot",                    use = true },
                    { name = "Piercing Arrow",                    use = true },
                    { name = "Vampire Arrows",                    use = true },
                    { name = "Wind Arrows",                        use = (EnergyBar1 >= 20) }
                            }

            elseif (enemy and (arg2 == "SEIGE")) then
                Skill2 = {
                    { name = "Vampire Arrows",                    use = true },
                    { name = "Autoshot",                        use = (not ASon) },
                    { name = "Reflected Shot",                    use = true },
                    { name = "Piercing Arrow",                    use = true },
                    { name = "Wind Arrows",                        use = (EnergyBar1 >= 20) }
                            }
                    end


everytime im running /run KillSequence("","DPS") /FARM/SIEGE im having error

Source code

1
[string '?']:147: attempt to call global 'CreateDIYCETimer' (a nil value)


i got this script from this thread
http://forum.us.runesofmagic.com/showthr…ll=1#post542645

i dont know how to resolve this so im seeking your help..

Thanks in advance!

EDIT**
Found the Solution.. I copied the Custom file but never changed my Diyce File.
Working now after i used DIYCE 2.2 (with timers) ^_^

844

Saturday, December 1st 2012, 2:50pm

chaimahbun,
you might want to change

Source code

1
{ name = "Sapping Arrow",                    use = (not pbuffs['Sapping Arrow']) },


to

Source code

1
{ name = "Sapping Arrow",                    use = (not tbuffs['Sapping Arrow']) },

because you actually need to check target buff not on yourself :D

845

Monday, December 3rd 2012, 2:31am

Quoted from "Hovoom;579298"

chaimahbun,
you might want to change

Source code

1
{ name = "Sapping Arrow",                    use = (not pbuffs['Sapping Arrow']) },


to

Source code

1
{ name = "Sapping Arrow",                    use = (not tbuffs['Sapping Arrow']) },

because you actually need to check target buff not on yourself :D


Thanks.Good catch. ill edit this as soon as i get home.
I have few questions though..
I noticed that its not casting Piercing Shot and Reflected Shot when they are in cool down/available. I have to manually press them..
And i also wanted to "only" cast Deadly Poison Bite when the Target has Vamp Arrows buff on him whether I am in a Party or solo grind..
is this possible,

Source code

1
 { name = "Deadly Poison Bite",                use = (tbuffs['Vampire Arrows']) },

Posts: 17

Location: New Mexico

Occupation: Server

  • Send private message

846

Wednesday, December 5th 2012, 5:27pm

I have some problems. One I can't get ether of the silence spells to work in my Druid/Mage combo. Two on my Scout/Druid my Throat, Wrist and Joint attacks don't seam to work.

-- Class: Druid/Mage

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
	elseif mainClass == "DRUID" and subClass == "MAGE" then
		Skill = {
			{ name = "Silence",                       use = (silenceThis) },
			-- Potions
            { name = "Action: "..healthpot,           use = (phealth <= .40) },
			{ name = "Action: "..manapot,             use = ((pctEB1 <= .50) and (phealth >= .50)) }, -- only mana pot if decent health
			-- Heals
			{ 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 = ((phealth <= .60) and (not pbuffs['Recover'])) },
			{ name = "Antidote",                      use = (pbuffs['Poisoned']) },
			{ name = "Purify",                        use = (pbuffs['Curse']) },
			{ name = "Blossoming Life",               use = ((phealth <= .80) and (not pbuffs['Blossoming Life'])) },
			-- 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']) },
			{ name = "Intensification",               use = ((boss or elite) and not pbuffs['Intensification']) },
			{ name = "Body Vitalization",             use = ((boss or elite) and not pbuffs['Body Vitalization']) },
			{ name = "Mother Earth's Protection",     use = (phealth <= .40 and (boss or elite)) },
			}
		if enemy then
			Skill2 = {
				{ name = "Binding Silence",           use = (combat and melee and (silenceThis)) },
				{ name = "Briar Entwinement",         use = (not tbuffs['Briar Entwinement']) },
				{ name = "Mother Nature's Wrath",     use = (not tbuffs['Mother Nature's Wrath']) },
				{ name = "Withering Seed",            use = ((boss or elite) and (not tbuffs['Withering Seed']) and (pbuffs['Nature's Power'].stack >= 3)) },
				{ name = "Weakening Seed",            use = ((boss or elite) and (not tbuffs['Weakening Seed']) and (pbuffs['Nature's Power'].stack >= 3)) },
				{ name = "Fireball",                  use = (true) },
				{ name = "Lightning",                 use = (not tbuffs['Lightning']) },
				{ name = "Rockslide",                 use = (true) },
				{ name = "Earth Arrow",               use = (true) },
				{ name = "Earth Pulse",               use = (combat and melee) },
			}
		end


-- Class: Scout/Druid

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
	if mainClass == "RANGER" and subClass == "DRUID" then
		Skill = {
			-- Potions
			{ name = "Action: "..healthpot,       use = (phealth <= .40) },
			{ 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
			-- Bufffs
			{ name = "Frost Arrow",               use = (EnergyBar1 >= 20 and not pbuffs['Frost Arrow']) },
			{ name = "Savage Blessing",           use = (not pbuffs['Savage Blessing']) },
			{ name = "Mother Earth's Protection", use = (phealth <= .40 and (boss or elite)) },
			{ name = "Concentration",             use = (combat and (boss or elite) and not pbuffs['Concentration']) },
			{ name = "Arrow of Essence",          use = (combat and (boss or elite) and not pbuffs['Arrow of Essence']) },
			{ name = "Target Area",               use = (combat and (boss or elite) and not pbuffs['Target Area']) },
		}
		if enemy then
			Skill2 = {
				--  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 EnergyBar1 >= 15) },
				-- Shots
				{ name = "Autoshot",              use = (not ASon and combat) },
				{ name = "Combo Shot",            use = (true) },
				{ name = "Vampire Arrows",        use = (EnergyBar1 >= 20 and not tbuffs['Vampire Arrows']) },
				{ name = "Piercing Arrow",        use = (combat and (boss or elite)) },
				{ name = "Shot",                  use = (EnergyBar1 <= 15 and combat) },
				{ name = "Wind Arrows",           use = (thealth >= .75 and EnergyBar1 >= 15) },
				{ name = "Reflected Shot",        use = (combat and (boss or elite)) },
				{ name = "Earth Pulse",           use = (EnergyBar2 >= 40 and combat and melee) },
				-- Wrist and Joint- only if focus is plentiful.
				{ 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) },
			}
		end

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

847

Wednesday, December 5th 2012, 7:41pm

Quoted from "Dreamcatcher;579837"

I have some problems. One I can't get ether of the silence spells to work in my Druid/Mage combo. Two on my Scout/Druid my Throat, Wrist and Joint attacks don't seam to work.


First thing would be to run DIYCE with the "debugskills" option. Try:

Source code

1
/run KillSequence("debugskills")

This should show you the skill lists as DIYCE sees them. If both silence skill lines are always coming up false then you will need to check the variables/conditions that affect this (silenceThis, combat and melee variables)

For the Scout/Druid skills, shouldn't those variables be tSpell, tTime and tElapsed? Lua is case sensitive after all (I'm basing this from code you showed in earlier posts.
2013... The year from hell....

848

Wednesday, December 5th 2012, 8:02pm

Quoted from "Dreamcatcher;579837"

I have some problems. One I can't get ether of the silence spells to work in my Druid/Mage combo. Two on my Scout/Druid my Throat, Wrist and Joint attacks don't seam to work.

-- Class: Druid/Mage

Source code

1
2
3
    elseif mainClass == "DRUID" and subClass == "MAGE" then
        Skill = {
            { name = "Silence",                       use = (silenceThis) },


-- Class: Scout/Druid

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
    if mainClass == "RANGER" and subClass == "DRUID" then
        Skill = {
.....
        }
        if enemy then
            Skill2 = {
                --  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 EnergyBar1 >= 15) },
....
-- Wrist and Joint- only if focus is plentiful.
                { 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) },
            }
        end


Druid silence is actually called Binding Silence which ur not calling in code.

for s/d i would check the function melee (after checking what peryl said about case sensitive). its supposed to check for the skill in actionbar slot 21 (if default settings for DIYCE r being used) is useable to use whatever skill is being called. also it might create a problem later on if the skill being checked is one of the 3 u r using melee on, as when its used it will be in cd so the result for melee will be false for the others as well.

849

Wednesday, December 5th 2012, 8:20pm

Druid/Mage can use "Silence" from mage side since its a mage general skill.

Nothing looks wrong with the code as far as I can tell. I'd go about and checking the silence list and its logic since silences dont seem to work on either combo.

Ravesden, D/S/Wd 80/75/62
Retired. Click siggy for old RoM vids, among other things.

850

Wednesday, December 5th 2012, 8:33pm

Quoted from "Dreamcatcher;578220"

I did some tweaking to my Mage combo classes but not sure if its all right. Still learning a good rotation. Can someone look this over and let me know if there is anything that needs changing or added. I don't have the elite spells yet.

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
    -- Class: Mage/Druid
    elseif mainClass == "MAGE" and subClass == "DRUID" then
        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
            { 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 = "Savage Blessing",               use = (not pbuffs['Savage Blessing']) },
            { name = "Energy Influx",                 use = (not pbuffs['Energy Influx']) },
            { name = "Energy Well",                   use = ((boss or elite) and (not pbuffs['Energy Well'])) },
            { name = "Fire Ward",                     use = (not pbuffs['Fire Ward']) },
            { name = "Electrostatic Charge",          use = (not pbuffs['Electrostatic Charge']) },
            -- 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']) },  
            { name = "Elemental Catalysis",           use = (not pbuffs['Elemental Catalysis']) },
            { name = "Intensification",               use = (not pbuffs['Intensification']) },
            }
        if enemy then
            Skill2 = {
                { name = "Elemental Weakness",        use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
                { name = "Electric Bolt",             use = ((boss or elite) and not tbuffs['Electric Current']) },
                { name = "Fireball",                  use = (true) },
                { name = "Lightning",                 use = (not tbuffs['Lightning']) },
                { name = "Flame",                     use = ((boss or elite) and tbuffs['Elemental Weakness']) },
                { name = "Earth Pulse",               use = (combat and melee) },
                { name = "Phoenix",                   use = (combat and melee) },
                { name = "Discharge",                 use = (combat and melee) },
                { name = "Meteor Shower",             use = (combat and tbuffs['Lightning']) },
                { name = "Plasma Arrow",              use = (not pbuffs['Charged']) },
            }
        end

    -- Class: Mage/Scout
    elseif mainClass == "MAGE" and subClass == "RANGER" then
        -- Scout Cancel Blood Arrows out of combat or at less than 40% health, without invoking the GCD.    
        if friendly or (not UnitExists("target")) or tdead or (phealth <= .40) and (pbuffs['Blood Arrow']) then 
            CancelBuff("Blood Arrow")
        end
        Skill = {
            -- Silence
            { 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
            -- Buffs
            { name = "Energy Influx",                 use = (not pbuffs['Energy Influx']) },
            { name = "Energy Well",                   use = ((boss or elite) and (not pbuffs['Energy Well'])) },
            { name = "Fire Ward",                     use = (not pbuffs['Fire Ward']) },
            { name = "Electrostatic Charge",          use = (not pbuffs['Electrostatic Charge']) },
            -- 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']) },  
            { name = "Elemental Catalysis",           use = (not pbuffs['Elemental Catalysis']) },
            { name = "Intensification",               use = (not pbuffs['Intensification']) },
            }
        if enemy then
            Skill2 = {
                --  Scout Use Throat Attack on detect enemy spell cast.
                --  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 EnergyBar1 >= 15) },
                -- Combat
                { name = "Blood Arrow",               use = (phealth >= .80 and party and combat and not pbuffs['Blood Arrow']) },
                { name = "Vampire Arrows",            use = (EnergyBar1 >= 20 and not tbuffs['Vampire Arrows']) },
                { name = "Elemental Weakness",        use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
                { name = "Electric Bolt",             use = ((boss or elite) and not tbuffs['Electric Current']) },
                { name = "Fireball",                  use = (true) },
                { name = "Lightning",                 use = (not tbuffs['Lightning']) },
                { name = "Flame",                     use = ((boss or elite) and tbuffs['Elemental Weakness']) },
                { name = "Phoenix",                   use = (combat and melee) },
                { name = "Discharge",                 use = (combat and melee) },
                { name = "Meteor Shower",             use = (combat and tbuffs['Lightning']) },
                { name = "Plasma Arrow",              use = (not pbuffs['Charged']) },
                -- Scout Wrist and Joint- only if focus is plentiful.
                { name = "Wrist Attack",              use = (not tbuffs['Wrist Attack'] and EnergyBar2 >= 50 and melee) },
                { name = "Joint Blow",                use = (not tbuffs['Joint Blow'] and EnergyBar2 >= 50 and melee) },
            }
        end


from my limited understanding of mages, u dont want elemental catalysis and intensification going off all the time when they r up, so it would probably be better to add boss/elite with their usage. also when enemy is in melee range u want discharge to go off first and then use purg. i believe that purg is the best aoe at melee range then either phoniex or earth pulse (both of them r frontal aoe only). also i noticed that ur piorities for spells r not how u probably want it. for example: when ur m/s and facing a boss and fight has not started, than the first skill u use (after buffing up with all ur buffs) is vampire arrow than blood arrow than elemental weekness than electric bolt than fireball than lightning and than flame (and than keep doing flame until any of the previous skill is available at which time u will cast it and than go back to casting flame). that would have wasted a good amount of elemental catalysis and intensification along with a good chunk of ur health while u have not even used any ranged weapon dps in the begining. it would not even go down to wrist attack and joint blow unless ur not of mana for any of ur mage skills.

the best thing to do while writing a piority list like diyce is to try it in game to c if its doing what u want it to do.

Amberwave

Intermediate

Posts: 369

Location: Chicagoland

  • Send private message

851

Wednesday, December 5th 2012, 8:43pm

Peryl, welcome back. I am trying to create a list of dbuffs, that if I get one, I can trigger a skill or use an item, specificly there are dbuffs where I need to use Serenstrum. I can not get DIYCE to check and trigger off a dbuff list like we do with the silence list. I am assuming it is something like ...use = pbuffs(MprotectThis) }, where MprotectThis is the list I made. Any ideas on how this should work?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

852

Wednesday, December 5th 2012, 9:09pm

Well it is possible to do, but it'll have to be done in a couple of steps because pbuffs is a list and so is your MprotectThis. In other words, what you doing is indexing a list with another list (Lua actually does allow doing that, but it doesn't do what you think it does :p).

So basically, you must first check if anything in your protect list exists in pbuffs, then use that result in your use clause (somewhat like what the silence stuff does in fact).

Also, make sure you are using the correct list. IIRC, pbuffs only give the player buffs, not debuffs. There is hiding in this thread some code I posted to get the player debuffs (if you don't already have that code). Do a search on this thread for pdbuffs (or something like that).

So first, near the top of KillSequence, you would do something like (I'll assume the player debuff list is in pdbuffs):

Source code

1
2
3
4
5
6
7
8
    local ProtectMe = false

    for k,v in pairs(pdbuffs) do 
        if MprotectThis[v] then 
            ProtectMe = true
            break
        end
    end


Once this is done, you can then use ProtectMe in your skill list. For example:

Source code

1
    { name = "some skill to use",  use = ProtectMe },
2013... The year from hell....

Posts: 17

Location: New Mexico

Occupation: Server

  • Send private message

853

Thursday, December 6th 2012, 6:36am

Ok I ran the debug and both of my Silence spells are coming up false I don't know why. Also question how can I put a melee spell in my action slot if I don't have a range 50 spell or a spell I'm not using in my DIYCE? I'm still learning this program and not sure how to do all of this. I posted below all of the code in my CustomFunctions.

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

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(5) -- # is your melee range spell slot number
	local a1,a2,a3,a4,a5,ASon = GetActionInfo(6)  -- # 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/Druid
	if mainClass == "RANGER" and subClass == "DRUID" then
		Skill = {
			-- Potions
			{ name = "Action: "..healthpot,          use = (phealth <= .40) },
			{ name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
			
			-- Heals
			{ name = "Recover",                      use = ((phealth <= .60) and not pbuffs['Recover']) },
			{ name = "Recover",                      use = (phealth <= .30) },
			{ name = "Recover",                      use = ((phealth <= .90) and not combat) },
			
			-- Bufffs
			{ name = "Frost Arrow",                  use = (EnergyBar1 >= 20 and not pbuffs['Frost Arrow']) },
			{ name = "Savage Blessing",              use = (not pbuffs['Savage Blessing']) },
			{ name = "Mother Earth's Protection",	 use = (phealth <= .40 and (boss or elite)) },
			{ name = "Concentration",                use = (combat and (boss or elite) and not pbuffs['Concentration']) },
			{ name = "Arrow of Essence",             use = (combat and (boss or elite) and not pbuffs['Arrow of Essence']) },
			{ name = "Target Area",                  use = (combat and (boss or elite) and not pbuffs['Target Area']) },
		}
		if enemy then
			Skill2 = {
				--  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) },
				
				-- Shots
				{ name = "Autoshot",                 use = (not ASon and combat) },
				{ name = "Combo Shot",               use = (true) },
				{ name = "Vampire Arrows",           use = (pctEB1 >= 50 and not tbuffs['Vampire Arrows']) },
				{ name = "Piercing Arrow",           use = (combat and (boss or elite)) },
				{ name = "Shot",                     use = (EnergyBar1 <= 15 and combat) },
				{ name = "Wind Arrows",              use = (thealth >= .75 and EnergyBar1 >= 15) },
				{ name = "Reflected Shot",           use = (combat and (boss or elite)) },
				{ name = "Earth Pulse",              use = (EnergyBar2 >= 40 and combat and melee) },
				
				-- Wrist and Joint- only if focus is plentiful.
				{ 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) },
				}
		end

	-- Class: Scout/Mage
	elseif mainClass == "RANGER" and subClass == "MAGE" then
		Skill = {
			-- Silence Mage
			{ name = "Silence",                      use = (silenceThis) },
			
			-- Potions
			{ name = "Action: "..healthpot,          use = (phealth <= .40) },
			{ name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
			
			-- Bufffs
			{ name = "Frost Arrow",                  use = (EnergyBar1 >= 20 and not pbuffs['Frost Arrow']) },
			{ name = "Arrow of Essence",             use = (EnergyBar1 >= 20 and boss) },
			{ name = "Concentration",                use = (EnergyBar1 >= 20 and not pbuffs['Concentration']) },
			{ name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
			{ name = "Intensification",              use = (not pbuffs['Intensification']) },
			{ name = "Target Area",                  use = (combat and (boss or elite) and not pbuffs['Target Area']) },
			
		}
		--  Use Throat Attack on detect enemy spell cast.
		if enemy then
			Skill2 = {
				--  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) },
				
				-- Combat
				{ name = "Autoshot",                 use = (not ASon and combat) },
				{ name = "Combo Shot",               use = (true) },
				{ name = "Vampire Arrows",           use = (pctEB1 >= 50 and not tbuffs['Vampire Arrows']) },
				{ name = "Fireball",                 use = (true) },
				{ name = "Lightning",                use = (not tbuffs['Lightning']) },
				{ name = "Piercing Arrow",           use = (combat and (boss or elite)) },
				{ name = "Shot",                     use = (EnergyBar1 <= 15 and combat) },
				{ name = "Wind Arrows",              use = (thealth >= .75 and EnergyBar1 >= 15) },
				{ name = "Reflected Shot",           use = (combat and (boss or elite)) },
				
				-- Wrist and Joint- only if focus is plentiful.
				{ 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) },
			}
		end

	-- Class: Druid/Mage
	elseif mainClass == "DRUID" and subClass == "MAGE" then
		Skill = {
			{ name = "Silence",                      use = (silenceThis) },
			
			-- Potions
			{ name = "Action: "..healthpot,          use = (phealth <= .40) },
			{ name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
			
			-- Heals
			{ 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 = ((phealth <= .60) and (not pbuffs['Recover'])) },
			{ name = "Blossoming Life",              use = ((phealth <= .80) and (not pbuffs['Blossoming Life'])) },
			
			-- 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']) },
			{ name = "Intensification",              use = ((boss or elite) and not pbuffs['Intensification']) },
			{ name = "Body Vitalization",            use = ((boss or elite) and not pbuffs['Body Vitalization']) },
			{ name = "Mother Earth's Protection",    use = (phealth <= .40 and (boss or elite)) },
		}
		if enemy then
			Skill2 = {
				{ 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']) },
				{ name = "Mother Nature's Wrath",    use = (not tbuffs['Mother Nature's Wrath']) },
				{ name = "Withering Seed",           use = ((boss or elite) and (not tbuffs['Withering Seed'])) },
				{ name = "Weakening Seed",           use = ((boss or elite) and (not tbuffs['Weakening Seed'])) },
				{ name = "Fireball",                 use = (true) },
				{ name = "Lightning",                use = (not tbuffs['Lightning']) },
				{ name = "Rockslide",                use = (true) },
				{ name = "Earth Arrow",              use = (true) },
				{ name = "Earth Pulse",              use = (EnergyBar1 >= 40 and combat and melee) },
				
			}
		end	

	-- Class: Druid/Scout
	elseif mainClass == "DRUID" and subClass == "RANGER" then
		Skill = {
			-- Potions
			{ name = "Action: "..healthpot,          use = (phealth <= .40) },
			{ name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
			
			-- Heals
			{ name = "Recover",                      use = (phealth <= .40) },
			{ name = "Curing Seed",                  use = (phealth <= .50) },
			{ name = "Restore Life",                 use = ((phealth <= .60) and (pbuffs['Nature's Power'].stack <=2))},
			{ name = "Recover",                      use = ((phealth <= .60) and not pbuffs['Recover']) },
			{ name = "Blossoming Life",              use = ((phealth <= .80) and not pbuffs['Blossoming Life']) },
			
			-- Buffs
			{ name = "Savage Blessing",              use = (not pbuffs['Savage Blessing']) },
			{ name = "Concentration Prayer",         use = (not pbuffs['Concentration Prayer']) },
			{ name = "Body Vitalization",            use = ((boss or elite) and not pbuffs['Body Vitalization']) },
			{ name = "Mother Earth's Protection",    use = (phealth <= .40 and (boss or elite)) },
		}
		if enemy then
			Skill2 = {
				--  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 pctEB2 >= 15) },
				
				-- Combat
				{ name = "Binding Silence",          use = (tSpell ~= nil and tTime >= 1 and (tTime - telapsed) > 0.5 and pctEB1 >= .05) },
				{ name = "Vampire Arrows",           use = (pctEB2 >= 50 and not tbuffs['Vampire Arrows']) },
				{ name = "Briar Entwinement",        use = (not tbuffs['Briar Entwinement']) },
				{ name = "Withering Seed",           use = ((boss or elite) and not tbuffs['Withering Seed']) },
				{ name = "Weakening Seed",           use = ((boss or elite) and not tbuffs['Weakening Seed']) },
				{ name = "Mother Nature's Wrath",    use = (not tbuffs['Mother Nature's Wrath']) },
				{ name = "Rockslide",                use = (true) },
				{ name = "Earth Arrow",              use = (true) },
				{ name = "Earth Pulse",              use = (combat and melee) },
				
				-- Wrist and Joint- only if focus is plentiful.
				{ name = "Wrist Attack",             use = (not tbuffs['Wrist Attack'] and EnergyBar2 >= 50 and melee) },
                { name = "Joint Blow",               use = (not tbuffs['Joint Blow'] and EnergyBar2 >= 50 and melee) },
			}
		end

	-- Class: Mage/Druid
	elseif mainClass == "MAGE" and subClass == "DRUID" then
		Skill = {
			{ name = "Silence",                      use = (silenceThis) },
			
			-- Potions
			{ name = "Action: "..healthpot,          use = (phealth <= .40) },
			{ name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
			
			-- Heals
			{ name = "Recover",                      use = ((phealth <= .60) and not pbuffs['Recover']) },
			{ name = "Recover",                      use = (phealth <= .30) },
			{ name = "Recover",                      use = ((phealth <= .90) and not combat) },
			
			-- Buffs
			{ name = "Savage Blessing",              use = (not pbuffs['Savage Blessing']) },
			{ name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
			{ name = "Elemental Catalysis",          use = ((boss or elite) and not pbuffs['Elemental Catalysis']) },
			{ name = "Intensification",              use = ((boss or elite) and not pbuffs['Intensification']) },
			{ name = "Electrostatic Charge",         use = ((boss or elite) and not pbuffs['Electrostatic Charge']) },
			{ name = "Energy Influx",                use = ((boss or elite) and not pbuffs['Energy Influx']) },
			{ name = "Energy Well",                  use = ((boss or elite) and not pbuffs['Energy Well']) },
			
			-- In case Electrostatic Charge is still on cooldown and you're getting hit hard
			{ name = "Mother Earth's Protection",    use = (phealth <= .40 and (boss or elite)) },
		}
		if enemy then
			Skill2 = {
				{ name = "Elemental Weakness",       use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
				{ name = "Fireball",                 use = (true) },
				{ name = "Lightning",                use = (not tbuffs['Lightning']) },
				{ name = "Plasma Arrow",             use = (not pbuffs['Charged']) },
				{ name = "Flame",                    use = ((boss or elite) and tbuffs['Elemental Weakness']) },
				{ name = "Electric Bolt",            use = ((boss or elite) and not tbuffs['Electric Current']) },
				{ name = "Discharge",                use = (combat and melee) },
				{ name = "Purgatory Fire",           use = (combat and melee) },
			}
		end

	-- Class: Mage/Scout
	elseif mainClass == "MAGE" and subClass == "RANGER" then
		Skill = {
			-- Silence
			{ name = "Silence",                      use = (silenceThis) },
			
			-- Potions
			{ name = "Action: "..healthpot,          use = (phealth <= .40) },
			{ name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
			
			-- Buffs
			{ name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
			{ name = "Electrostatic Charge",         use = ((boss or elite) and not pbuffs['Electrostatic Charge']) },
			{ name = "Elemental Catalysis",          use = ((boss or elite) and not pbuffs['Elemental Catalysis']) },
			{ name = "Intensification",              use = ((boss or elite) and not pbuffs['Intensification']) },
			{ name = "Energy Influx",                use = ((boss or elite) and not pbuffs['Energy Influx']) },
			{ name = "Energy Well",                  use = ((boss or elite) and not pbuffs['Energy Well']) },
		}
		if enemy then
			Skill2 = {
				--  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 pctEB2 >= 15) },
				
				-- Combat
				{ name = "Elemental Weakness",       use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
				{ name = "Vampire Arrows",           use = (pctEB2 >= 50 and not tbuffs['Vampire Arrows']) },
				{ name = "Fireball",                 use = (true) },
				{ name = "Lightning",                use = (not tbuffs['Lightning']) },
				{ name = "Plasma Arrow",             use = (not pbuffs['Charged']) },
				{ name = "Flame",                    use = ((boss or elite) and tbuffs['Elemental Weakness']) },
				{ name = "Electric Bolt",            use = ((boss or elite) and not tbuffs['Electric Current']) },
				{ name = "Discharge",                use = (combat and melee) },
				{ name = "Purgatory Fire",           use = (combat and melee) },
				
				-- Wrist and Joint- only if focus is plentiful.
				{ name = "Wrist Attack",             use = (not tbuffs['Wrist Attack'] and EnergyBar2 >= 50 and melee) },
                { name = "Joint Blow",               use = (not tbuffs['Joint Blow'] and EnergyBar2 >= 50 and melee) },
			}
		end	
		--ADD MORE CLASS COMBOS HERE. 
		--USE AN "ELSEIF" TO CONTINUE WITH MORE CLASS COMBOS.
		--THE NEXT "END" STATEMENT IS THE END OF THE CLASS COMBOS STATEMENTS.
		--DO NOT POST BELOW THE FOLLOWING "END" STATEMENT!
	end
	--End Player Skill Sequences
	
	if (arg1=="debugskills") then	--Used for printing the skill table, and true/false usability
		DIYCE_DebugSkills(Skill)
		DIYCE_DebugSkills(Skill2)
		elseif (arg1=="debugpbuffs") then	--Used for printing your buff names, and buffID
		DIYCE_DebugBuffList(pbuffs)
		elseif (arg1=="debugtbuffs") then	--Used for printing target buff names, and buffID
		DIYCE_DebugBuffList(tbuffs)
		elseif (arg1=="debugall") then	--Used for printing all of the above at the same time
		DIYCE_DebugSkills(Skill)
		DIYCE_DebugSkills(Skill2)
		DIYCE_DebugBuffList(pbuffs)
		DIYCE_DebugBuffList(tbuffs)
	end
	
	if (not MyCombat(Skill, arg1)) then
		MyCombat(Skill2, arg1)
	end
	
	--Select Next Enemy
	if (tDead) then
		TargetUnit("")
		return
	end
	if mainClass == "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

854

Thursday, December 6th 2012, 9:16am

Quoted from "Peryl;579868"

Well it is possible to do, but it'll have to be done in a couple of steps because pbuffs is a list and so is your MprotectThis. In other words, what you doing is indexing a list with another list (Lua actually does allow doing that, but it doesn't do what you think it does :p).

So basically, you must first check if anything in your protect list exists in pbuffs, then use that result in your use clause (somewhat like what the silence stuff does in fact).

Also, make sure you are using the correct list. IIRC, pbuffs only give the player buffs, not debuffs. There is hiding in this thread some code I posted to get the player debuffs (if you don't already have that code). Do a search on this thread for pdbuffs (or something like that).

So first, near the top of KillSequence, you would do something like (I'll assume the player debuff list is in pdbuffs):

Source code

1
2
3
4
5
6
7
8
    local ProtectMe = false

    for k,v in pairs(pdbuffs) do 
        if MprotectThis[v] then 
            ProtectMe = true
            break
        end
    end


Once this is done, you can then use ProtectMe in your skill list. For example:

Source code

1
    { name = "some skill to use",  use = ProtectMe },


I don't know how I am missing it but I did a search and I just can't find this pdbuffs.

855

Thursday, December 6th 2012, 9:26am

Quoted from "Peryl;565712"

There is/was a post about something along these lines but I can't seem to find it.

Anyway, I suspect that at least part of the problem is that you are using pbuffs to look for player debuffs. Unfortunately, the function that fills that table only looks at the player buffs, so it'll never trigger in DIYCE as is.

To "fix" this, you'll need to create a new function for retrieving the debuffs.

Open DIYCE.lua in a text editor (notepad will do at a pinch, but try Notepad++. It rocks, and it's free)
Look for the function BuffList and copy all the lines of the function (should be about 26 lines or so). Starting with:

Source code

1
2
function BuffList(tgt)
    local list = {}

up to

Source code

1
2
    return list
end

again, should be about 26 lines

Now that you have a copy paste a duplicate of this function in this same file (right after the BuffList function itself is fine).
Change the name of this copied function to DebuffList and change the code so that where in says UnitBuff to UnitDebuff, change where it originally says UnitDebuff to UnitBuff (do the same for the UnitBuffTimeLeft and UnitDebuffTimeLeft). In effect we are just swapping the functions it calls. The first few lines of your function should then look like this:

Source code

1
2
3
4
5
6
7
8
9
function DebuffList(tgt)
    local list = {}
    local buffcmd = UnitDebuff
    local infocmd = UnitDebuffLeftTime

    if UnitCanAttack("player",tgt) then
        buffcmd = UnitBuff
        infocmd = UnitBuffLeftTime
    end

Save the file.

Now in your CustomFunctions.lua, you can add the following in KillSequence where all the local variables are:

Source code

1
    local pdebuffs = DebuffList("player")


And finally, you can now look for debuffs in your use clauses with pdebuffs['name of debuff'] much like you do for the buffs.

Note that this "DebuffList" also works for targets, but in that case it will return the actual buffs of the target (much like BuffList returns target debuffs).


Searched through your posts alone and came up with this one. Is this what you were referring to? If this can be worked into this protect list, I wonder how it will tell the difference to know if Antidote or Dispell Curse will work?

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

856

Thursday, December 6th 2012, 1:04pm

That's the one. Add that function then do what I mentioned in the post above and you should be good to go.
2013... The year from hell....

857

Thursday, December 6th 2012, 4:48pm

Quoted from "Dreamcatcher;579911"

Ok I ran the debug and both of my Silence spells are coming up false I don't know why. Also question how can I put a melee spell in my action slot if I don't have a range 50 spell or a spell I'm not using in my DIYCE? I'm still learning this program and not sure how to do all of this. I posted below all of the code in my CustomFunctions.

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

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(5) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(6)  -- # 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/Druid
    if mainClass == "RANGER" and subClass == "DRUID" then
        Skill = {
            -- Potions
            { name = "Action: "..healthpot,          use = (phealth <= .40) },
            { name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
            
            -- Heals
            { name = "Recover",                      use = ((phealth <= .60) and not pbuffs['Recover']) },
            { name = "Recover",                      use = (phealth <= .30) },
            { name = "Recover",                      use = ((phealth <= .90) and not combat) },
            
            -- Bufffs
            { name = "Frost Arrow",                  use = (EnergyBar1 >= 20 and not pbuffs['Frost Arrow']) },
            { name = "Savage Blessing",              use = (not pbuffs['Savage Blessing']) },
            { name = "Mother Earth's Protection",     use = (phealth <= .40 and (boss or elite)) },
            { name = "Concentration",                use = (combat and (boss or elite) and not pbuffs['Concentration']) },
            { name = "Arrow of Essence",             use = (combat and (boss or elite) and not pbuffs['Arrow of Essence']) },
            { name = "Target Area",                  use = (combat and (boss or elite) and not pbuffs['Target Area']) },
        }
        if enemy then
            Skill2 = {
                --  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) },
                
                -- Shots
                { name = "Autoshot",                 use = (not ASon and combat) },
                { name = "Combo Shot",               use = (true) },
                { name = "Vampire Arrows",           use = (pctEB1 >= 50 and not tbuffs['Vampire Arrows']) },
                { name = "Piercing Arrow",           use = (combat and (boss or elite)) },
                { name = "Shot",                     use = (EnergyBar1 <= 15 and combat) },
                { name = "Wind Arrows",              use = (thealth >= .75 and EnergyBar1 >= 15) },
                { name = "Reflected Shot",           use = (combat and (boss or elite)) },
                { name = "Earth Pulse",              use = (EnergyBar2 >= 40 and combat and melee) },
                
                -- Wrist and Joint- only if focus is plentiful.
                { 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) },
                }
        end

    -- Class: Scout/Mage
    elseif mainClass == "RANGER" and subClass == "MAGE" then
        Skill = {
            -- Silence Mage
            { name = "Silence",                      use = (silenceThis) },
            
            -- Potions
            { name = "Action: "..healthpot,          use = (phealth <= .40) },
            { name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
            
            -- Bufffs
            { name = "Frost Arrow",                  use = (EnergyBar1 >= 20 and not pbuffs['Frost Arrow']) },
            { name = "Arrow of Essence",             use = (EnergyBar1 >= 20 and boss) },
            { name = "Concentration",                use = (EnergyBar1 >= 20 and not pbuffs['Concentration']) },
            { name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
            { name = "Intensification",              use = (not pbuffs['Intensification']) },
            { name = "Target Area",                  use = (combat and (boss or elite) and not pbuffs['Target Area']) },
            
        }
        --  Use Throat Attack on detect enemy spell cast.
        if enemy then
            Skill2 = {
                --  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) },
                
                -- Combat
                { name = "Autoshot",                 use = (not ASon and combat) },
                { name = "Combo Shot",               use = (true) },
                { name = "Vampire Arrows",           use = (pctEB1 >= 50 and not tbuffs['Vampire Arrows']) },
                { name = "Fireball",                 use = (true) },
                { name = "Lightning",                use = (not tbuffs['Lightning']) },
                { name = "Piercing Arrow",           use = (combat and (boss or elite)) },
                { name = "Shot",                     use = (EnergyBar1 <= 15 and combat) },
                { name = "Wind Arrows",              use = (thealth >= .75 and EnergyBar1 >= 15) },
                { name = "Reflected Shot",           use = (combat and (boss or elite)) },
                
                -- Wrist and Joint- only if focus is plentiful.
                { 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) },
            }
        end

    -- Class: Druid/Mage
    elseif mainClass == "DRUID" and subClass == "MAGE" then
        Skill = {
            { name = "Silence",                      use = (silenceThis) },
            
            -- Potions
            { name = "Action: "..healthpot,          use = (phealth <= .40) },
            { name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
            
            -- Heals
            { 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 = ((phealth <= .60) and (not pbuffs['Recover'])) },
            { name = "Blossoming Life",              use = ((phealth <= .80) and (not pbuffs['Blossoming Life'])) },
            
            -- 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']) },
            { name = "Intensification",              use = ((boss or elite) and not pbuffs['Intensification']) },
            { name = "Body Vitalization",            use = ((boss or elite) and not pbuffs['Body Vitalization']) },
            { name = "Mother Earth's Protection",    use = (phealth <= .40 and (boss or elite)) },
        }
        if enemy then
            Skill2 = {
                { 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']) },
                { name = "Mother Nature's Wrath",    use = (not tbuffs['Mother Nature's Wrath']) },
                { name = "Withering Seed",           use = ((boss or elite) and (not tbuffs['Withering Seed'])) },
                { name = "Weakening Seed",           use = ((boss or elite) and (not tbuffs['Weakening Seed'])) },
                { name = "Fireball",                 use = (true) },
                { name = "Lightning",                use = (not tbuffs['Lightning']) },
                { name = "Rockslide",                use = (true) },
                { name = "Earth Arrow",              use = (true) },
                { name = "Earth Pulse",              use = (EnergyBar1 >= 40 and combat and melee) },
                
            }
        end    

    -- Class: Druid/Scout
    elseif mainClass == "DRUID" and subClass == "RANGER" then
        Skill = {
            -- Potions
            { name = "Action: "..healthpot,          use = (phealth <= .40) },
            { name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
            
            -- Heals
            { name = "Recover",                      use = (phealth <= .40) },
            { name = "Curing Seed",                  use = (phealth <= .50) },
            { name = "Restore Life",                 use = ((phealth <= .60) and (pbuffs['Nature's Power'].stack <=2))},
            { name = "Recover",                      use = ((phealth <= .60) and not pbuffs['Recover']) },
            { name = "Blossoming Life",              use = ((phealth <= .80) and not pbuffs['Blossoming Life']) },
            
            -- Buffs
            { name = "Savage Blessing",              use = (not pbuffs['Savage Blessing']) },
            { name = "Concentration Prayer",         use = (not pbuffs['Concentration Prayer']) },
            { name = "Body Vitalization",            use = ((boss or elite) and not pbuffs['Body Vitalization']) },
            { name = "Mother Earth's Protection",    use = (phealth <= .40 and (boss or elite)) },
        }
        if enemy then
            Skill2 = {
                --  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 pctEB2 >= 15) },
                
                -- Combat
                { name = "Binding Silence",          use = (tSpell ~= nil and tTime >= 1 and (tTime - telapsed) > 0.5 and pctEB1 >= .05) },
                { name = "Vampire Arrows",           use = (pctEB2 >= 50 and not tbuffs['Vampire Arrows']) },
                { name = "Briar Entwinement",        use = (not tbuffs['Briar Entwinement']) },
                { name = "Withering Seed",           use = ((boss or elite) and not tbuffs['Withering Seed']) },
                { name = "Weakening Seed",           use = ((boss or elite) and not tbuffs['Weakening Seed']) },
                { name = "Mother Nature's Wrath",    use = (not tbuffs['Mother Nature's Wrath']) },
                { name = "Rockslide",                use = (true) },
                { name = "Earth Arrow",              use = (true) },
                { name = "Earth Pulse",              use = (combat and melee) },
                
                -- Wrist and Joint- only if focus is plentiful.
                { name = "Wrist Attack",             use = (not tbuffs['Wrist Attack'] and EnergyBar2 >= 50 and melee) },
                { name = "Joint Blow",               use = (not tbuffs['Joint Blow'] and EnergyBar2 >= 50 and melee) },
            }
        end

    -- Class: Mage/Druid
    elseif mainClass == "MAGE" and subClass == "DRUID" then
        Skill = {
            { name = "Silence",                      use = (silenceThis) },
            
            -- Potions
            { name = "Action: "..healthpot,          use = (phealth <= .40) },
            { name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
            
            -- Heals
            { name = "Recover",                      use = ((phealth <= .60) and not pbuffs['Recover']) },
            { name = "Recover",                      use = (phealth <= .30) },
            { name = "Recover",                      use = ((phealth <= .90) and not combat) },
            
            -- Buffs
            { name = "Savage Blessing",              use = (not pbuffs['Savage Blessing']) },
            { name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
            { name = "Elemental Catalysis",          use = ((boss or elite) and not pbuffs['Elemental Catalysis']) },
            { name = "Intensification",              use = ((boss or elite) and not pbuffs['Intensification']) },
            { name = "Electrostatic Charge",         use = ((boss or elite) and not pbuffs['Electrostatic Charge']) },
            { name = "Energy Influx",                use = ((boss or elite) and not pbuffs['Energy Influx']) },
            { name = "Energy Well",                  use = ((boss or elite) and not pbuffs['Energy Well']) },
            
            -- In case Electrostatic Charge is still on cooldown and you're getting hit hard
            { name = "Mother Earth's Protection",    use = (phealth <= .40 and (boss or elite)) },
        }
        if enemy then
            Skill2 = {
                { name = "Elemental Weakness",       use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
                { name = "Fireball",                 use = (true) },
                { name = "Lightning",                use = (not tbuffs['Lightning']) },
                { name = "Plasma Arrow",             use = (not pbuffs['Charged']) },
                { name = "Flame",                    use = ((boss or elite) and tbuffs['Elemental Weakness']) },
                { name = "Electric Bolt",            use = ((boss or elite) and not tbuffs['Electric Current']) },
                { name = "Discharge",                use = (combat and melee) },
                { name = "Purgatory Fire",           use = (combat and melee) },
            }
        end

    -- Class: Mage/Scout
    elseif mainClass == "MAGE" and subClass == "RANGER" then
        Skill = {
            -- Silence
            { name = "Silence",                      use = (silenceThis) },
            
            -- Potions
            { name = "Action: "..healthpot,          use = (phealth <= .40) },
            { name = "Action: "..manapot,            use = ((pctEB1 <= .50) and (phealth >= .50)) },
            
            -- Buffs
            { name = "Fire Ward",                    use = (not pbuffs['Fire Ward']) },
            { name = "Electrostatic Charge",         use = ((boss or elite) and not pbuffs['Electrostatic Charge']) },
            { name = "Elemental Catalysis",          use = ((boss or elite) and not pbuffs['Elemental Catalysis']) },
            { name = "Intensification",              use = ((boss or elite) and not pbuffs['Intensification']) },
            { name = "Energy Influx",                use = ((boss or elite) and not pbuffs['Energy Influx']) },
            { name = "Energy Well",                  use = ((boss or elite) and not pbuffs['Energy Well']) },
        }
        if enemy then
            Skill2 = {
                --  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 pctEB2 >= 15) },
                
                -- Combat
                { name = "Elemental Weakness",       use = ((boss or elite) and not tbuffs['Elemental Weakness']) },
                { name = "Vampire Arrows",           use = (pctEB2 >= 50 and not tbuffs['Vampire Arrows']) },
                { name = "Fireball",                 use = (true) },
                { name = "Lightning",                use = (not tbuffs['Lightning']) },
                { name = "Plasma Arrow",             use = (not pbuffs['Charged']) },
                { name = "Flame",                    use = ((boss or elite) and tbuffs['Elemental Weakness']) },
                { name = "Electric Bolt",            use = ((boss or elite) and not tbuffs['Electric Current']) },
                { name = "Discharge",                use = (combat and melee) },
                { name = "Purgatory Fire",           use = (combat and melee) },
                
                -- Wrist and Joint- only if focus is plentiful.
                { name = "Wrist Attack",             use = (not tbuffs['Wrist Attack'] and EnergyBar2 >= 50 and melee) },
                { name = "Joint Blow",               use = (not tbuffs['Joint Blow'] and EnergyBar2 >= 50 and melee) },
            }
        end    
        --ADD MORE CLASS COMBOS HERE. 
        --USE AN "ELSEIF" TO CONTINUE WITH MORE CLASS COMBOS.
        --THE NEXT "END" STATEMENT IS THE END OF THE CLASS COMBOS STATEMENTS.
        --DO NOT POST BELOW THE FOLLOWING "END" STATEMENT!
    end
    --End Player Skill Sequences
    
    if (arg1=="debugskills") then    --Used for printing the skill table, and true/false usability
        DIYCE_DebugSkills(Skill)
        DIYCE_DebugSkills(Skill2)
        elseif (arg1=="debugpbuffs") then    --Used for printing your buff names, and buffID
        DIYCE_DebugBuffList(pbuffs)
        elseif (arg1=="debugtbuffs") then    --Used for printing target buff names, and buffID
        DIYCE_DebugBuffList(tbuffs)
        elseif (arg1=="debugall") then    --Used for printing all of the above at the same time
        DIYCE_DebugSkills(Skill)
        DIYCE_DebugSkills(Skill2)
        DIYCE_DebugBuffList(pbuffs)
        DIYCE_DebugBuffList(tbuffs)
    end
    
    if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
    
    --Select Next Enemy
    if (tDead) then
        TargetUnit("")
        return
    end
    if mainClass == "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 have no idea how u can get melee to work on ur m/d or d/m classes but for d/s or s/d classes u can do the following:

Source code

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

change the number in there to the actionbar number in which u keep throat attack, that by itself would work to define melee most of the time (except for when ur going to use throat attack then it is not a great way)
to overcome that u can add another line or 2:

Source code

1
2
 local melee2 = GetActionUsable(6) -- # is your melee range spell slot number
 local melee3 = GetActionUsable(7) -- # is your melee range spell slot number

put the actionbar number of wrist attack as melee2 and neck strike as melee3 and than call both of them in there respective slots. u can also do

Source code

1
{.... use= melee or melee2}

when ur playing x/s that way if u use 1 of those skill the other can define melee for u, not the best solution but it works for me as d/s

858

Friday, December 7th 2012, 4:35am

Hi everyone.. No one seems to notice my question on my previous post.. oh well here it is..

im using this customfile

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
-- Class: Scout/Rogue
        elseif mainClass == "RANGER" and subClass == "THIEF" then

            --Timers for this class
            CreateDIYCETimer("ExploitCooldown", 32, false)  <--this is the line 147 which i see as an error

            if (enemy and (arg2 == "DPS")) then
                Skill2 = {
                    { name = "Timer: ExploitCooldown",            use = (tbuffs['Exploiting Shot']) and (GetDIYCETimerValue("ExploitCooldown") == 0) },
                    { name = "Autoshot",                        use = (not ASon) },
                    { name = "Sapping Arrow",                    use = (not pbuffs['Sapping Arrow']) },
                    { name = "Shot",                            use = (GetDIYCETimerValue("ExploitCooldown") == 0) },
                    { name = "Reflected Shot",                    use = true },
                    { name = "Vampire Arrows",                    use = true },
                    { name = "Deadly Poison Bite",                use = true },
                    { name = "Piercing Arrow",                    use = true },
                    { name = "Combo Shot",                        use = true },
                    { name = "Weak Spot",                        use = true },
                    { name = "Wind Arrows",                        use = (EnergyBar1 >= 20) }
                            }

            elseif (enemy and (arg2 == "FARM")) then
                Skill2 = {
                    { name = "Reflected Shot",                    use = true },
                    { name = "Piercing Arrow",                    use = true },
                    { name = "Vampire Arrows",                    use = true },
                    { name = "Wind Arrows",                        use = (EnergyBar1 >= 20) }
                            }

            elseif (enemy and (arg2 == "SEIGE")) then
                Skill2 = {
                    { name = "Vampire Arrows",                    use = true },
                    { name = "Autoshot",                        use = (not ASon) },
                    { name = "Reflected Shot",                    use = true },
                    { name = "Piercing Arrow",                    use = true },
                    { name = "Wind Arrows",                        use = (EnergyBar1 >= 20) }
                            }
                    end


On the DPS part, its not casting Piercing Shot and Reflected Shot when they are available.. they are casting but pretty much delayed. I want them to cast as soon as possible... i ran ("v1","DPS") and i saw there are too many IDLE..

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

859

Friday, December 7th 2012, 5:32am

Well it looks like you aren't using the timers properly.

I'd recommend the following changes.
First remove the first entry (the "Timer: ExploitCooldown" line), it is redundant.

Second, change the Shot line to:

Source code

1
{ name = "Shot",  use = true,  timer = "ExploitCooldown" },


Also, check that there isn't a call to StartDIYCETimer() in the KillSequence function.

I think this may fix the delays, though I can't be certain.
2013... The year from hell....

860

Friday, December 7th 2012, 7:35am

Quoted from "Peryl;580023"

Well it looks like you aren't using the timers properly.

I'd recommend the following changes.
First remove the first entry (the "Timer: ExploitCooldown" line), it is redundant.

Second, change the Shot line to:

Source code

1
{ name = "Shot",  use = true,  timer = "ExploitCooldown" },


Also, check that there isn't a call to StartDIYCETimer() in the KillSequence function.

I think this may fix the delays, though I can't be certain.



Wow Peryl you are truely amazing!! Thanks for the fast response and a genius suggestion! now it works how i want it too!!

Thanks so much!! ^________^