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.

61

Friday, November 4th 2011, 9:30pm

@mrmisterwaa OK :) I may try to get it to work anyway just as a thought exercise. Checking against zone name and instance difficulty might have some esoteric use in the future.

@ghostwolf82 Since you are in the "fixing stuff" vibe, I thought I'd bring this up. This concerns updating the version of DIYCE for distribution purposes. Obviously you can't simply update the DIYCE code on curse.com because it would have the potential of inadvertently breaking someone's pre-existing 1.4 script if they were to update the combat engine through the Curse Client. Are there any plans of submitting DIYCE 2.0 as a new addon on Curse? (I'll admit that I haven't checked Curse yet. You may have already done this.)

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

62

Friday, November 4th 2011, 10:49pm

Updates made to OP, and new .zip file uploaded with fixes.

@jtanner28 - Yes, I have plans to upload DIYCE 2.0 to Curse.com, however there are a few other things I still have planned before I want to do that. Once I have made those upcoming updates, then I will upload it. Not until then though.

Auros

Professional

Posts: 1,360

Mood: Mellow

  • Send private message

63

Friday, November 4th 2011, 11:23pm

Any issues with having both DIYCE versions in the add-on folder?

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

64

Saturday, November 5th 2011, 6:35pm

@Auros - Never really tested it since I was making these changes along the way to my own code. Give it a try? Let us know if you have issues, so the rest of the community will know to not have both if there does end up being an issue. (I don't foresee a problem though.)

Also, does anyone have any pre-existing code for calling a priests fairy, and then casting the halo and conceal buffs on it? If not, can someone point me in the right direction on how to call the pet action bar skills? And, how to determine if the pet is out?

I tried the "PetHeadFrame:IsVisible()" to determine if the pet is out, but that doesn't seem to work for the fairy pet. A macro with "UsePetAction(#)" works to call the pet action bar, but I need to determine if the pet is out first, then I need the switches to be able to determine if the pet already has the two buffs it needs on it.

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

65

Saturday, November 5th 2011, 7:19pm

Only thing I can could about it Ghostwolf:

http://forum.us.runesofmagic.com/showthread.php?t=43396

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

66

Saturday, November 5th 2011, 7:29pm

Same thread I was working from. Hope someone out there has a code they have been using with v1.4 and just never posted before. I'm trying to learn from the addon LazyFairy too, but that's not so easy.

1Rausch1

Beginner

Posts: 42

Location: Midwest

Occupation: Network Engineer

  • Send private message

67

Sunday, November 6th 2011, 7:37pm

Cant even seem to get this to load. removed all other addons and dont even get any text in chat window when I start the game

Have my interface fully reset but doesnt seem to help

did notice an error tho

Attempt to call global 'KillSequence' (a nil value)

I assume that means DIYSCE isnt loading
I Tank For Guildies!
K 80 / S 73 / W 65
[img][/img]

1Rausch1

Beginner

Posts: 42

Location: Midwest

Occupation: Network Engineer

  • Send private message

68

Sunday, November 6th 2011, 7:52pm

Ok little different error this time

interface\Addons\DIYSCE\CustomFunctions.lua [string '?']:146:'<eof>' expected near 'end'

this happens when loading DIYSCE using

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
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,
        ['Dark Healing'] = true,
        ['Leaves of Fire'] = true,
        ['Urgent Heal'] = true,
                        }    


function KillSequence(arg1, arg2, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--arg2 = Use for multiple buttons for cooldowns and other stuff
--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(2) -- # 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 <= .03 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
        
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetUnit("")
        TargetNearestEnemy()
        return
    end
    
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        
        -- Class: Rogue/Scout
            if mainClass == "THIEF" and subClass == "RANGER" then
            --arg2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
            
            if (arg2 == "0") then
            Skill = {
                { name = "Combat Master",                      use = ((not pbuffs['Combat Master'])) },
                { name = "Action: 62 (Yawaka's Blessing)",     use = ((not pbuffs['Yawaka's Blessing'])) },
                { name = "Action: 69 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion
                    }
            elseif (arg2 == "3") then
            Skill = {
               { name = "Informer",                            use = ((not pbuffs['Informer'])) },
               { name = "Action: 64 (Unknown Choice)",         use = ((EnergyBar1 > 20)) },
               { name = "Action: 65 (Caviar Sandwich)",        use = ((not pbuffs['Caviar Sandwich'])) },
                     }
            elseif (arg2 == "4") then
            Skill = {
                { name = "Action: 46 (Energy Potion)",         use = ((EnergyBar1) <= 15 and (boss)) },
                { name = "Action: 30 (Strong Stimulant)",      use = ((boss) and (not pbuffs['Fervent Attack'])) },
                { name = "Action: 34 (Extinction Potion)",     use = ((boss) and (not pbuffs['Extinction Potion'])) },
                { name = "Energy Thief",                       use = ((EnergyBar1 < 50) and (boss) and (not tDead)) },
                { name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
                { name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs['Strong Stimulant'])) },
                     }
            end

            if ((enemy) and (arg2 == "1")) then
            Skill2 = {
                { name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and (tbuffs[500654] and tbuffs[500704])) },
                { name = "Blind Spot",                         use = (((EnergyBar1 >= 25) and boss and behind) and (pbuffs['Energy Thief'] or pbuffs['Premeditation'])) },
                { 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 = "Throat Attack",                      use = ((EnergyBar2 >= 50) and (boss or elite) and silenceThis) },
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) },
                { name = "Shot",                               use = ((EnergyBar1 < 20 )) },
                    }
            elseif (arg2 == "2") then
            Skill2 = {
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Shot",                               use = (not 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 (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
        
    --Select Next Enemy
    --[[
    if (tDead) then
        TargetUnit('')
        TargetNearestEnemy()
        return
    elseif (not LockedOn) or (not enemy) then
        TargetNearestEnemy()
        return
    end
    --]]
    
end
I Tank For Guildies!
K 80 / S 73 / W 65
[img][/img]

69

Sunday, November 6th 2011, 7:56pm

@Ghostwolf

Quoted

Updates made to OP, and new .zip file uploaded with fixes.


Just curious as to whether i am using the most current Vs. of 2.0 with fixes or not, would you mind changing the -- DIY Combat Engine version 2.0 with 2.1 2.11 2.2 ... etc. to denote minor changes or moderate changes to the base .lua? So we are all on the same page?

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

70

Sunday, November 6th 2011, 8:20pm

Quoted from "1Rausch1;481153"

Ok little different error this time

interface\Addons\DIYSCE\CustomFunctions.lua [string '?']:146:'<eof>' expected near 'end'

this happens when loading DIYSCE using

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
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,
        ['Dark Healing'] = true,
        ['Leaves of Fire'] = true,
        ['Urgent Heal'] = true,
                        }    


function KillSequence(arg1, arg2, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--arg2 = Use for multiple buttons for cooldowns and other stuff
--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(2) -- # 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 <= .03 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
        
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetUnit("")
        TargetNearestEnemy()
        return
    end
    
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        
        -- Class: Rogue/Scout
            if mainClass == "THIEF" and subClass == "RANGER" then
            --arg2: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
            
            if (arg2 == "0") then
            Skill = {
                { name = "Combat Master",                      use = ((not pbuffs['Combat Master'])) },
                { name = "Action: 62 (Yawaka's Blessing)",     use = ((not pbuffs['Yawaka's Blessing'])) },
                { name = "Action: 69 (Unbridled Enthusiam)",   use = ((not pbuffs['Unbridled Enthusiasm'])) }, -- Speed Potion
                    }
            elseif (arg2 == "3") then
            Skill = {
               { name = "Informer",                            use = ((not pbuffs['Informer'])) },
               { name = "Action: 64 (Unknown Choice)",         use = ((EnergyBar1 > 20)) },
               { name = "Action: 65 (Caviar Sandwich)",        use = ((not pbuffs['Caviar Sandwich'])) },
                     }
            elseif (arg2 == "4") then
            Skill = {
                { name = "Action: 46 (Energy Potion)",         use = ((EnergyBar1) <= 15 and (boss)) },
                { name = "Action: 30 (Strong Stimulant)",      use = ((boss) and (not pbuffs['Fervent Attack'])) },
                { name = "Action: 34 (Extinction Potion)",     use = ((boss) and (not pbuffs['Extinction Potion'])) },
                { name = "Energy Thief",                       use = ((EnergyBar1 < 50) and (boss) and (not tDead)) },
                { name = "Assassins Rage",                     use = ((boss) and (not tDead)) },
                { name = "Fervent Attack",                     use = ((boss) and (not tDead) and (not pbuffs['Strong Stimulant'])) },
                     }
            end

            if ((enemy) and (arg2 == "1")) then
            Skill2 = {
                { name = "Wound Attack",                       use = ((EnergyBar1 >= 35) and (tbuffs[500654] and tbuffs[500704])) },
                { name = "Blind Spot",                         use = (((EnergyBar1 >= 25) and boss and behind) and (pbuffs['Energy Thief'] or pbuffs['Premeditation'])) },
                { 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 = "Throat Attack",                      use = ((EnergyBar2 >= 50) and (boss or elite) and silenceThis) },
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Wrist Attack",                       use = ((EnergyBar2 >= 50) and (boss)) },
                { name = "Shot",                               use = ((EnergyBar1 < 20 )) },
                    }
            elseif (arg2 == "2") then
            Skill2 = {
                { name = "Vampire Arrows",                     use = (EnergyBar2 >= 20) },
                { name = "Shot",                               use = (not 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 (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
        
    --Select Next Enemy
    --[[
    if (tDead) then
        TargetUnit('')
        TargetNearestEnemy()
        return
    elseif (not LockedOn) or (not enemy) then
        TargetNearestEnemy()
        return
    end
    --]]
    
end


I have no idea what you are doing wrong because at line 146 is:

return (which is part of a cancelled out block of code)

1Rausch1

Beginner

Posts: 42

Location: Midwest

Occupation: Network Engineer

  • Send private message

71

Sunday, November 6th 2011, 8:24pm

Well last error was caused by an extra end at the end of the file

second to last error was caused by a missing } in the skills list.

I went to bed at 5:30 last night which was really 6:30 then got up at 10 so must have missed that
I Tank For Guildies!
K 80 / S 73 / W 65
[img][/img]

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

72

Sunday, November 6th 2011, 11:26pm

Quoted from "lordmohg;481156"

@Ghostwolf

Just curious as to whether i am using the most current Vs. of 2.0 with fixes or not, would you mind changing the -- DIY Combat Engine version 2.0 with 2.1 2.11 2.2 ... etc. to denote minor changes or moderate changes to the base .lua? So we are all on the same page?

Will do that with the next update. I will update the code in the main post as well as the .zip, so everyone knows what the most recent changes are. Thanks for the suggestion.

@1Rausch1 - Are you still having errors, or did you get them all fixed? The reason for the (nil value) would be due to errors such as the ones you mentioned.

73

Monday, November 7th 2011, 5:15am

I have a few converted and functional Scripts I want to share with others. May need some adjustment to your tastes but i like em. Cut and paste them in customfunctions.lua and enjoy.

Knight/Priest 2.0

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
        -- Class: Knight/Priest
-- DIYCE 2.0
            elseif mainClass == "KNIGHT" and subClass == "AUGUR" then


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

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

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

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
        -- Class: Priest/Knight
-- DIYCE 2.0
            elseif mainClass == "AUGUR" and subClass == "KNIGHT" then

        local PetExists = UnitExists("playerpet")
        local petname = UnitName("playerpet")
        local pethealth = PctH("playerpet")
        local petbuffs = BuffList("playerpet")
        local petAttackActive = false

        -- Pet Summon
            Skill = {
                { name = "Light Fairy",                     use = ((not PetExists) and (not combat)) },
                { name = "Pet Skill: 6 (Devotion Halo)",    use = ((PetExists) and (not petbuffs['Devotion Halo'])) } ,
                { name = "Pet Skill: 7 (Conceal)",             use = ((PetExists) and (not petbuffs['Conceal'])) },

            --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,       use = (phealth <= .40) },
                { name = "Action: "..manapot,         use = ((pctEB1 <= .50) and (phealth >= .40)) }, -- only mana pot if decent health
                { name = "Magic Barrier",             use = ((pctEB1 >= .05) and (not pbuffs['Magic Barrier'])) },
                { name = "Enhanced Armor",            use = ((pctEB1 >= .05) and (not pbuffs['Enhanced Armor'])) },
                { name = "Blessed Spring Water",      use = ((pctEB1 >= .05) and (not pbuffs['Blessed Spring Water'])) },
                { name = "Holy Power",                use = (combat and (pctEB1 <= .80) and (not pbuffs['Holy Power'])) },
                { name = "Wave Armor",                use = (combat and not pbuffs['Wave Armor']) },
                { name = "Soul Bond",                 use = (not pbuffs['Soul Bond']) },
                { name = "Grace of Life",             use = (not pbuffs['Enhanced Grace of Life']) },
                { name = "Amplified Attack",          use = (not pbuffs['Amplified Attack']) },

            -- Self Heals
                { name = "Regenerate",                use = ((phealth <= .85) and (not pbuffs['Regenerate'])) },
                { name = "Urgent Heal",               use = (phealth <= .55) },
                { name = "Heal",                        use = (phealth <= .40) },
                { name = "Holy Aura",                 use = (phealth <= .30) },
                { name = "Soul Source",               use = (phealth <= .25) },

            -- Target Heals
                { name = "Regenerate",               use = (friendly and (thealth <= .80) and (not tbuffs['Regenerate'])) },
                { name = "Urgent Heal",               use = (friendly and (thealth <= .55)) },
                { name = "Heal",                          use = (friendly and (thealth <= .40)) },
                    }

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

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
        -- Class: Druid/MAGE
-- DIYCE 2.0
            elseif mainClass == "DRUID" and subClass == "MAGE" then
-- Silence
            Skill = {
                { name = "Silence",                          use = (silenceThis) },

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

-- Heals
                { name = "Mother Earth's Protection",        use = (phealth <= .30) },
                { name = "Recover",                               use = (phealth <= .40) },
                { name = "Curing Seed",                         use = (phealth <= .50) },
                { name = "Restore Life",                       use = ((phealth <= .60) and (pbuffs['Nature's Power'].stack <=2))}, -- use this ahead of Recover if low on Natures Power
                { name = "Recover",                             use = ((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'])) },
                { name = "Blossoming Life",                  use = ((phealth <= .90) and not combat) },

-- 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 = (enemy and not pbuffs['Intensification']) },
                    }

-- Ranged Attack
                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'] or BuffTimeLeft("target", "Briar Entwinement") <=2) },
                { name = "Fireball",                             use = (combat) },
                { name = "Earth Pulse",                      use = (combat) },
                { name = "Weakening Seed",              use = ((boss or elite) and (not tbuffs['Weakening Seed']) and (pbuffs['Nature's Power'].stack >= 3)) },
                { name = "Lightning",                          use = (not tbuffs['Lightning']) },
                { name = "Rockslide",                         use = (true) },
                { name = "Earth Arrow",                      use = (true) },
                    }
    end
Mage/Druid 2.0

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
-- Class: Mage/Druid
-- DIYCE 2.0
            elseif mainClass == "MAGE" and subClass == "DRUID" then

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

-- Potions
                { name = "Action: "..healthpot,                       use = (phealth <= .50) },
                { name = "Action: "..manapot,                        use = ((pctEB1 <= .50) and (phealth >= .50)) }, -- only mana pot if decent health
-- Heals
                { name = "Recover",                   use = ((phealth <= .60) and not pbuffs['Recover']) },
                { name = "Recover",                   use = (phealth <= .30) },
                { name = "Recover",                   use = ((phealth <= .90) and not combat) }, -- top off before fight
-- Buffs
                { name = "Perception",                use = (not pbuffs['Perception']) }, -- Mage/Druid Elite 15
                { name = "Magic Target",              use = (not combat and not pbuffs['Magic Target']) }, -- Mage/Druid Elite 20
                { name = "Savage Blessing",           use = (not pbuffs['Savage Blessing']) },
                { name = "Fire Ward",                 use = (not pbuffs['Fire Ward']) },
                { 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']) },
                    }

-- Ranged Attack
                if enemy then
                Skill2 = {
                { name = "Fireball",                    use = (true) },
                { name = "Lightning",                  use = (not tbuffs['Lightning']) },
                { name = "Meteor Shower",        use = (combat and tbuffs['Lightning']) },
                { name = "Phoenix",                   use = (combat and melee) },
                { name = "Earth Pulse",              use = (combat and melee) },
                { name = "Flame",                     use = (not tbuffs['Lightning']) },
                { name = "Plasma Arrow",          use = (not pbuffs['Charged']) },
                    }
    end
Scout/Warden 2.0

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
-- Class: Scout/Warden
-- DIYCE 2.0
            elseif mainClass == "RANGER" and subClass == "WARDEN" then

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

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

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

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

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

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

-- Wrist and Joint- only if focus is plentiful.  I dunno if Joint attack is even worthwhile- maybe for kiting?

                { name = "Wrist Attack",              use = (not tbuffs['Wrist Attack'] and EnergyBar1 >= 50 and melee) },
                { name = "Joint Blow",                            use = (not tbuffs['Joint Blow'] and EnergyBar1 >= 50 and melee) },
                { name = "Power of the Wood Spirit",     use = (melee) },
                { name = "Gryphon Bash",                 use = (melee) },
                { name = "Charged Chop",          use = (melee) },
    }
    end
Warden/Scout 2.0 Alpha ---- work in progress. Dealing with pet attack functions. But it buffs and summons and Heart of oak if shift is held. Some Drake Code some Ghostwolf Code and Some others.

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
-- Class: Warden/Scout 11/7/2011
-- DIYCE 2.0
        elseif mainClass == "WARDEN" and subClass == "RANGER" then

        local PetExists = UnitExists("playerpet")
        local petname = UnitName("playerpet")
        local pethealth = PctH("playerpet")
        local petAttackActive = false
        
        if (PetExists and UnitExists("pettarget") and UnitCanAttack("player","pettarget") and combat) then
            petAttackActive = true
        end

    --  Cancel Blood Arrows out of combat or at less than 40% health, without invoking the GCD.    
        if friendly or (not UnitExists("target")) or tdead or (phealth <= .40) and (pbuffs['Blood Arrow']) then 
            CancelBuff("Blood Arrow")
        end

    -- Potions
            Skill = {
                { name = "Action: "..healthpot,           use = (phealth <= .60) },
                { name = "Action: "..manapot,             use = ((pctEB1 <= .50) and (phealth >= .40)) }, -- only mana pot if decent health
                { name = "Elven Prayer",                   use = ((pethealth <= .70) and PetExists) },


    -- Buffs
                { name = "Briar Shield",                  use = (not pbuffs['Briar Shield']) },
                { name = "Protection of Nature",         use = (not pbuffs['Protection of Nature']) },
    -- Pet
                { name = "Summon Spirit of the Oak",     use = ((not PetExists) and (not pbuffs['Heart of the Oak']) and (not combat)) },
                { name = "Summon Spirit of the Oak",     use = ((PetExists) and (not string.find(petname,"Spirit of the Oak")) and (not pbuffs['Heart of the Oak']) and (not combat)) } ,
        -- Cheaper to Recast weak pet than to heal        
                { name = "Summon Spirit of the Oak",     use = ((pethealth <= .25) and (PetExists) and (not pbuffs['Heart of the Oak'])) },
        -- Hold Shift to Absorb Spirit of the Oak to Tank 
                { name = "Heart of the Oak",             use = (IsShiftKeyDown() and (not combat) and (PetExists) and (string.find(petname,"Spirit of the Oak")) and (not pbuffs['Heart of the Oak'])) },
            }


    -- Combat
            if enemy then
            Skill2 = {
            -- the following is my pet's basic attack command, and it is listed first in order to use it as a combat opener and help ensure that the pet gets first aggro, making aggro management easier.
                { name = "Pet Skill: 3 (Pet Attack)",     use = ((not petAttackActive) and (not tdead) and PetExists) },
            -- Make sure pet is assisting me.
                { name = "Pet Skill: 3 (Pet Attack)",     use = ((petAttackActive) and (not UnitIsUnit( "playerpettarget", "playertarget" )) and PetExists) }, 
            --  Use Throat Attack on detect enemy spell cast.                
                { name = "Throat Attack",                use = (melee and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and pctEB1 >= 15) },

                { name = "Damage Transfer",                use = (PetExists and combat and (pctEB1 <= .50) and (not pbuffs['Energy Absorb'])) },
                { name = "Energy Absorb",               use = (combat and (pctEB1 <= .50) and (not pbuffs['Energy Absorb'])) },
                { name = "Blood Arrow",                    use = ((phealth >= .80) and party and combat and (not pbuffs['Blood Arrow'])) },
                { name = "Savage Power",                   use = (combat and (not pbuffs['Savage Power'])) },
                { name = "Elven Amulet",                   use = (combat and (UnitIsUnit( "targettarget", "player" )) and (not pbuffs['Elven Amulet'])) },
                { name = "Vampire Arrows",                 use = ((EnergyBar2 >= 40) and (not tbuffs['Vampire Arrows'])) },
                { name = "Anti-Magic Arrow",             use = (true) },
                { name = "Shot",                         use = (combat) },
                { name = "Wrist Attack",                  use = ((melee) and (not tbuffs['Wrist Attack']) and (EnergyBar2 >= 50)) },
                { name = "Thorny Vines",                 use = ((pctEB1 >= .05) and melee and (not tbuffs['Thorny Vines'])) },
                { name = "Power of the Wood Spirit",     use = (melee) },
                { name = "Untamable",                     use = ((EnergyBar2 >= 60) and melee) },
                { name = "Cross Chop",                     use = (melee) },
                { name = "Charged Chop",                 use = (melee) },
                { name = "Frantic Briar",                 use = (melee) },
            }
        end

Auros

Professional

Posts: 1,360

Mood: Mellow

  • Send private message

74

Monday, November 7th 2011, 7:59am

For having both versions of DIYCE active. All I can verify is that the old DIYCE still works with both versions in the add-ons folder. I still haven't gotten the new DIYCE to work yet whether or not the old DIYCE is there, but indications are it should not be affected since if there was a conflict you would think it would make both not work.

CROMI80

Intermediate

Posts: 338

Occupation: Mechcanical service engineer

  • Send private message

75

Monday, November 7th 2011, 12:36pm

not working for me.

Class: Scout/Warden
if mainClass == "RANGER" and subClass == "WARDEN" then

Potions and Buffs
skill = {
{ name = "Frost Arrow", use = (not pbuffs("Frost Arrow") }
{ name = "Briar Shield", use = (not pbuffs("Briar Shield") }
{ name = "Entling Offering", use = (not pbuffs("Entling Offering") }
Combat
if enemy and (mode == "PvE") then
Skill2 = {
{ name = "Snipe", use = (pbuffs("Hidden Peril") }
{ name = "Combo Shot", use = CD("Combo Shot") },
{ name = "Autoshot", use = (not ASon) },
{ name = "Vampire Arrows", use = CD("Vampire Arrows") and (EnergyBar1 >= 30) },
{ name = "Thorn Arrow", use = (CD("Torn Arrow")) },
{ name = "Hidden Peril", use = (CD("Hidden Peril") and (EnergyBar1 >= 30) },
{ name = "Reflected Shot", use = (CD("Reflected Shot")) },
{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) },
{ name = "Wind Arrows", use = (CD("Wind Arrows")) and (EnergyBar1 >= 55) },
{ name = "Shoot", use = (CD("Shoot") }
}
elseif enemy and (mode == "PvP") then
Skill2 = {
{ name = "Detection", use = (not pbuffs("Detection") }
{ name = "Snipe", use = (pbuffs("Hidden Peril") }
{ name = "Autoshot", use = (not ASon) },
{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) },
{ name = "Reflected Shot", use = (CD("Reflected Shot")) },
{ name = "Vampire Arrows", use = CD("Vampire Arrows") },
{ name = "Thorn Arrow", use = (CD("Torn Arrow")) },
{ name = "Hidden Peril", use = (CD("Hidden Peril") and (EnergyBar1 >= 30) },
{ name = "Combo Shot", use = CD("Combo Shot") },
{ name = "Wind Arrows", use = (CD("Wind Arrows")) and (EnergyBar1 >= 35) }
}
end

just cant get the new diyce to work. can someone give me some pointers?
~Know no limit to unleash the untap potential in yourself
&#30475;&#30340;&#25026;&#30340;&#20154;&#35831;&#26469;osha&#32852;&#32476;&#25105;&#12290;Leogolas

76

Monday, November 7th 2011, 12:43pm

@Ghostwolf I found some code written by Drake and made some adjustments to handle pet summons for the Priest elite skill. Need to add some code into DIYCE.lua for Pet Skill: update is in bold on bottom.

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
function MyCombat(Skill, arg1)
    local spell_name = UnitCastingTime("player")
    local talktome = ((arg1 == "v1") or (arg1 == "v2"))
    local action,actioncd,actiondef,actioncnt
    
    if spell_name ~= nil then
        if (arg1 == "v2") then Msg("- ['..spell_name..']", 0, 1, 1) end
        return true
    end

    for x,tbl in ipairs(Skill) do
        
    local useit = type(Skill[x].use) ~= "function" and Skill[x].use or (type(Skill[x].use) == "function" and Skill[x].use() or false)
        if useit then
            if string.find(Skill[x].name, "Action:") then
                action = tonumber((string.gsub(Skill[x].name, "(Action:)( *)(%d+)(.*)", "%3")))
                _1,actioncd = GetActionCooldown(action)
                actiondef,_1,actioncnt = GetActionInfo(action)
                if GetActionUsable(action) and (actioncd == 0) and (actiondef ~= nil) and (actioncnt > 0) then
                    if talktome then Msg("- "..Skill[x].name) end
                    UseAction(action)
                    return true
                end
            elseif string.find(Skill[x].name, "Custom:") then
                action = string.gsub(Skill[x].name, "(Custom:)( *)(.*)", "%3")
                if CustomAction(action) then
                    return true
                end
            elseif string.find(Skill[x].name, "Item:") then
                action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
                if talktome then Msg("- "..Skill[x].name) end
                UseItemByName(action)
                return true
            elseif CD(Skill[x].name) then
                if talktome then Msg("- "..Skill[x].name) end
                CastSpellByName(Skill[x].name)
                return true
            [B]elseif string.find(Skill[x].name, "Pet Skill:") then
                action = string.gsub(Skill[x].name, "(Pet Skill:)( *)(%d+)(.*)", "%3")
                if talktome then Msg("- Activating Pet Action "..action, 0, 1, 1) end
                UsePetAction(action)
                if (arg1 == "v2") then Msg(Skill[x].name.." has been fully processed") end
                return true[/B]
                end
        end
    end
    if (arg1 == "v2") then Msg("- [IDLE]", 0, 1, 1) end
    return false
end
The top of my priest/knight now looks like this

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    -- Class: Priest/Knight
            elseif mainClass == "AUGUR" and subClass == "KNIGHT" then

        local PetExists = UnitExists("playerpet")
        local petname = UnitName("playerpet")
        local pethealth = PctH("playerpet")
        local petbuffs = BuffList("playerpet")
        local petAttackActive = false


        -- Pet Summon
            Skill = {
                { name = "Light Fairy",                     use = ((not PetExists) and (not combat)) },
                { name = "Pet Skill: 6 (Devotion Halo)",    use = ((PetExists) and (not petbuffs['Devotion Halo'])) } ,
                { name = "Pet Skill: 7 (Conceal)",             use = ((PetExists) and (not petbuffs['Conceal'])) },
When you /run KillSequence("v1") it displays
- Light Fairy
- Activating Pet Action 6
- Activating Pet Action 7

What i would like to see is what I have in () in the Skill name "{ name = "Pet Skill: 6 (Devotion Halo)" but i am not sure how to go about that.
- Activating Devotion Halo
- Activating Conceal

Mainly because for my warden script later i want to do "{ name = "Pet Skill: 3 (Pet Attack)"
-Activating Pet Attack

What part of this needs changed to implement that?

Source code

1
2
3
4
5
6
7
            elseif string.find(Skill[x].name, "Pet Skill:") then
                action = string.gsub(Skill[x].name, "(Pet Skill:)( *)(%d+)(.*)", "%3")
                if talktome then Msg("- Activating Pet Action "..action, 0, 1, 1) end
                UsePetAction(action)
                if (arg1 == "v2") then Msg(Skill[x].name.." has been fully processed") end
                return true
                end

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

77

Monday, November 7th 2011, 1:18pm

Quoted from "CROMI80;481273"

just cant get the new diyce to work. can someone give me some pointers?


Please use code tags.

It makes things much easier for all of us.

The problem you are encountering is that you forgot to place the commas after each use (it's in an array now and they shouldn't be forgotten like in DIYCE 1.0)

Another thing you forgot to do was check your parentheses. (Brackets etc.)

Don't forget to debug it in game using the error menu on RoM. It really does help you find the errors.

This should be fixed (I might have missed something, so give it a try.)

One last thing... I am not sure why you are CD. DIYCE already checks if a skill is in cooldown before it even tries to use 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
--Class: Scout/Warden
            if mainClass == "RANGER" and subClass == "WARDEN" then
      
             --Potions and Buffs
            Skill = {
                { name = "Frost Arrow",                use = (not pbuffs("Frost Arrow")) },
                { name = "Briar Shield",               use = (not pbuffs("Briar Shield")) },
                { name = "Entling Offering",           use = (not pbuffs("Entling Offering")) },
            --Combat & PVE
            if enemy and (mode == "PvE") then
            Skill2 = {
                { name = "Snipe",                      use = (pbuffs("Hidden Peril")) },
                { name = "Combo Shot",                 use = (CD("Combo Shot")) },
                { name = "Autoshot",                   use = (not ASon) },
                { name = "Vampire Arrows",             use = (CD("Vampire Arrows") and (EnergyBar1 >= 30)) },
                { name = "Thorn Arrow",                use = (CD("Torn Arrow")) },
                { name = "Hidden Peril",               use = (CD("Hidden Peril") and (EnergyBar1 >= 30)) },
                { name = "Reflected Shot",             use = (CD("Reflected Shot")) },  
                { name = "Piercing Arrow",             use = (CD("Piercing Arrow")) }, 
                { name = "Wind Arrows",                use = ((CD("Wind Arrows")) and (EnergyBar1 >= 55)) },  
                { name = "Shoot",                      use = (CD("Shoot")) },
                    }
            --Combat & PVP
            elseif enemy and (mode == "PvP") then
            Skill2 = {
                { name = "Detection",                  use = (not pbuffs("Detection")) },
                { name = "Snipe",                      use = (pbuffs("Hidden Peril")) },
                { name = "Autoshot",                   use = (not ASon) },
                { name = "Piercing Arrow",             use = (CD("Piercing Arrow")) },
                { name = "Reflected Shot",             use = (CD("Reflected Shot")) }, 
                { name = "Vampire Arrows",             use = (CD("Vampire Arrows")) }, 
                { name = "Thorn Arrow",                use = (CD("Torn Arrow")) },
                { name = "Hidden Peril",               use = (CD("Hidden Peril") and (EnergyBar1 >= 30)) },
                { name = "Combo Shot",                 use = (CD("Combo Shot")) },
                { name = "Wind Arrows",                use = ((CD("Wind Arrows")) and (EnergyBar1 >= 35)) },
                     }
            end


@lordmohg, very nice.

Just a weird question, how does playerpet work? Wouldn't the item shop pet be considered one as well? (Same with the summoned pet?)

78

Monday, November 7th 2011, 1:57pm

my understanding of Item shop pet or the pet eggs, you can't control them to attack... they have to "feel like it". But i will test it out later and see. going to bed... insomnia is cured Thank you DIYCE 2.0

79

Monday, November 7th 2011, 2:03pm

Quoted from "mrmisterwaa;481277"

One last thing... I am not sure why you are CD. DIYCE already checks if a skill is in cooldown before it even tries to use it.

Someone posted earlier about using "mode"
/run KillSequence("",11,12,"CD")
/run KillSequence("",11,12,"Buff")
/run KillSequence("",11,12,"DPS")


Quoted

Just a weird question, how does playerpet work? Wouldn't the item shop pet be considered one as well? (Same with the summoned pet?)


"playerpet" is what your personal pet is called as a "target" instead of "target" or "player"

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

80

Monday, November 7th 2011, 2:35pm

Quoted from "lordmohg;481288"

Someone posted earlier about using "mode"
/run KillSequence("",11,12,"CD")
/run KillSequence("",11,12,"Buff")
/run KillSequence("",11,12,"DPS")




"playerpet" is what your personal pet is called as a "target" instead of "target" or "player"


I know that but ...

But you misunderstood, or I hope I didn't misunderstand.

I am talking about how he used CD("Name of Skill") - Which from what I am reading in DIYCE.lua, is that CD checks for the information about Cooldowns for a skill.

I don't see the point of using it, since it already checks if it's on cooldown (or doesn't it? o.O) Because I am sure it does.