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.

scanderson

Central Scrutinizer

Posts: 87

Location: New York, New York

  • Send private message

1,101

Monday, April 22nd 2013, 7:25pm

@Ghostwolf82 - I removed the fairy stuff to make it easier to edit and experiment with. I realize there's no harm in leaving it, but cleaning out things I don't use makes it a hell of alot easier to scroll through, compare to oroiginal code, and focus while I tinker.

I understand that you test all code against what you have available for testing, but I doubt you test it for all class combo variations, factoring in elites skills, etc. That would take a ton of time and wouldn't be feasible. Do you? If so, you deserve a medal.

The fact remains that I can't get your code to work "out of the box" as a package. Maybe I am the only one. It's something in the customsfunctions that doesn't work with my class level/combo and I haven't been able to isolate it. If I do, I'll let you know. I'll continue to try and find out what is causing the problem. I'll try taking out the Rune Thorn stuff and see if that's it, but right now, everything works fine in my modified customfunctions from Mrmisterwaa, except the rogue melee skills. The inconsistency in the skill actuation is a killer.

As far as the melee targeting, that remains a mystery to me as well. It targets fine but often nothing happens after that sometimes or there is a delay in the skill being triggered. Othertimes, it works fine. It will probably take me time to figure it out.

Thanks again for taking the time to help us out and answer our questions. If there is anything I can do to test this further, let me know. I play a 77/77 R/S with all Elites. And again, Mrmisterwaa's customfunctions (with a little tweaking) works for the most part, whereas your stock custom functions does not. Trust me, it's driving me crazy trying to figure it out, lol.

Auros

Professional

Posts: 1,360

Mood: Mellow

  • Send private message

1,102

Monday, April 22nd 2013, 8:47pm

Scanderson, basic question, are you reading the error messages? I'm just an Engineer, not a Programmer, but those error messages really help in narrowing down at least the code line causing problems.

GW82, Wl/R, QuickKill, lol, just feeds out those shadowstabs. I will have to adjust your code to fit my preferred playstyle; (DIY) - yeah, IKR. But this is where that "missing" can become a problem.
Govinda P/W/K/M 100x4 :pump:
Wl/R/M/Ch 100x4 :borg:
Wd/W/S 100/100/100
W/M 100/100 Glass Cannon: oh gawd, not again :pinch: ... and numerous others Semi-retired :pillepalle:

scanderson

Central Scrutinizer

Posts: 87

Location: New York, New York

  • Send private message

1,103

Monday, April 22nd 2013, 9:32pm

Here's the thing - there is no error message. I know how to read them too (I have read through all the DIYCE threads). Sometimes if I break something due to bad coding, I'll get one, but I don't get them with my current customfunctions nor with Ghostwolf's Curse DIYCE (which just doesn't work for me). I am using NotePad++ too, in split screen to compare my customfuction scripts.

Not to worry - I am sure I am doing something wrong or will eventually figure it out. It will just take time.

BTW, that isn't my script. It's Mrmisterwaa's customfunctions as posted on Page 6 of this thread. My own version is a bit different with some fixes and adjustments - but it is error free so far. The thing is, the red error icon doesn't catch every little thing I have learned...

Auros

Professional

Posts: 1,360

Mood: Mellow

  • Send private message

1,104

Tuesday, April 23rd 2013, 12:31am

IIRC, I looked at Mistermisterwaa's (Mmw) code a long time ago when DIYCE 2.0 was first put out by GW. Was looking for a good S/R, R/S DIYCE..He heavily customized not only his customfunction but also the DIYCE coding also so, yeah it worked well together, but i do not think you can mix and match his custom function and GW's DIYCE engine without again modifying the DIYCE code. I do note that Mmw also said that he liked to do his own targeting...
Govinda P/W/K/M 100x4 :pump:
Wl/R/M/Ch 100x4 :borg:
Wd/W/S 100/100/100
W/M 100/100 Glass Cannon: oh gawd, not again :pinch: ... and numerous others Semi-retired :pillepalle:

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

1,105

Tuesday, April 23rd 2013, 2:34am

Just to comment on what you guys are discussing.

My code is Ghostwolf's old code with Peryl's custom timer modifications.

I am not sure if GW implemented the custom timers into his post in the first post of this thread.

There is a bug in my code when it involves Low Blow's custom timer (it should be pbuffs instead of tbuffs).

I did not use the melee section of my R/S code as I felt that it was inefficient at the time of playing with ~250ms ping.

After playing with 40ms ping, I found it more efficient to start using the melee section.

Please remember that if you choose to use GW's version that you remove the code for the custom timers in the section of my code as it will cause an error. (Assuming GW did not implement the modifications to his post)

(And Yes, I do my own targeting)

As any Rogue should, you should always target things manually and one shot everything in Instance clears. If you are using DIYCE for PVP, you need to ensure you implement class-based targeting.

Edit: As of this post, I have updated the bug in my low blow's custom cooldown.

Edit2: GhostWolf's Curse & First post on this thread is missing the custom timers modifications that are included in my code. So if you do choose to use mine, as it does have Peryl's custom timer modifications.

List of differences:

GW: Line 84

Source code

1
list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining, id = ID }


GW: Line 145

Source code

1
elseif CD(Skill[x].name) then


MMW: Line 84

Source code

1
list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining or 0, id = ID }


MMW: Line 163

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
--[[ Timer Update function ]]--
-- Tick down any active timers
function DIYCE_TimerUpdate(elapsed)
    for k,v in pairs(DIYCE_Timers) do
        v.timeLeft = v.timeLeft - elapsed
        if v.timeLeft < 0 then
            v.timeLeft = 0
        end
    end
end

--[[ Create a named timer ]]--
-- if the named timer already exists, this does nothing.
function CreateDIYCETimer(timerName, waitTime)
    if not DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName] = { timeLeft = 0, waitTime = waitTime }
    end
end

--[[ Set/reset waitTimer of an existing timer ]]--
-- if the timer doesn't exist, this does nothing
function SetDIYCETimerDelay(timerName, waitTime)
    if DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName].waitTime = waitTime
    end
end

--[[ Delete named timer ]]--
-- if the timer doesn't exist, this does nothing
-- Not really needed, but added for completeness
function DeleteDIYCETimer(timerName)
    if DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName] = nil
    end
end

--[[ Get a timer's current time ]]--
-- if the timer doesn't exist, this returns 0
function GetDIYCETimerValue(timerName)
    if timerName then
        return DIYCE_Timers[timerName] and DIYCE_Timers[timerName].timeLeft or 0
    end
    return 0
end

--[[ Starts a timer ticking down ]]--
-- if timer doesn't exist, this does nothing
function StartDIYCETimer(timerName)
    if timerName and DIYCE_Timers[timerName] then
        DIYCE_Timers[timerName].timeLeft = DIYCE_Timers[timerName].waitTime
    end
end


MMW: Line 145:

Source code

1
elseif (Skill[x].ignoretimer or GetDIYCETimerValue(Skill[x].timer) == 0) and CD(Skill[x].name) then


All the custom cooldown timer's code.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,106

Tuesday, April 23rd 2013, 3:03am

Nice to know you are still around sekrit :)

Ok, lots to answer in the last few posts, so just bear with me (I will not be separating for each person in this one)...

As sekrit and Auros have said, the code sekrit put out is modified, and while I did implement peryl's timers into DIYCE, there could still be lingering changes from sekrit that you haven't fixed up. I do actually test DIYCE against many of the combos in game. I have probably personally tested it with over half the combos in game, and have seen the rest covered by friends and fellow DIYCEers in this thread. (S/R is one of the combos I have tested.) However, the targeting section has noting at all to do with class or level or any skills available at all, it works off simple API calls built into the game for every person playing RoM. As for the melee call, do you have something like Shadowstab in slot 14 to check the availability of the melee variable?

Yeah Auros, the QuickKill does spam shadowstab until you run out of energy lol, then moves on to backup skills. I use it for leveling purposes since most things die with two SS. (I was a wl/w and dropped that for wl/r, and as of today with C&P being broken, dropped that to go wl/c so there will be a diyce for that forthcoming.)

mrmisterwaa

Professional

Posts: 670

Location: Kuwait

  • Send private message

1,107

Tuesday, April 23rd 2013, 3:07am

Quoted from "ghostwolf82;598885"

Nice to know you are still around sekrit :)

Ok, lots to answer in the last few posts, so just bear with me (I will not be separating for each person in this one)...

As sekrit and Auros have said, the code sekrit put out is modified, and while I did implement peryl's timers into DIYCE, there could still be lingering changes from sekrit that you haven't fixed up. I do actually test DIYCE against many of the combos in game. I have probably personally tested it with over half the combos in game, and have seen the rest covered by friends and fellow DIYCEers in this thread. (S/R is one of the combos I have tested.) However, the targeting section has noting at all to do with class or level or any skills available at all, it works off simple API calls built into the game for every person playing RoM. As for the melee call, do you have something like Shadowstab in slot 14 to check the availability of the melee variable?

Yeah Auros, the QuickKill does spam shadowstab until you run out of energy lol, then moves on to backup skills. I use it for leveling purposes since most things die with two SS. (I was a wl/w and dropped that for wl/r, and as of today with C&P being broken, dropped that to go wl/c so there will be a diyce for that forthcoming.)


Hard to find another game like RoM that doesn't bore me after a few days.

(I actually checked).

You did not implement any of Peryl's custom timer fixes that he suggested for creating "Fake" cooldowns.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,108

Tuesday, April 23rd 2013, 3:58am

Missed those fixes then, and will be adding them to the DIYCE on curse. Have the timers, but not those fixes. The mistake is mine on that.

Edit: Actually, those are the exact changes I made to my code. Just didn't update the code in the first post. The download available here and the one on Curse both have these fixes already in them.

And I have also added a function that you need to add to yours sekrit

Source code

1
2
3
4
5
6
7
--[[ Stop a named timer ]]--
-- if timer doesn't exist, this does nothing
function StopDIYCETimer(timerName)
   if DIYCE_Timers[timerName] then
      DIYCE_Timers[timerName].timeLeft = 0
  end
end


I make calls to this in the targeting function now, which may well be causing the issues with said function for anyone having trouble with it.

1,109

Tuesday, April 23rd 2013, 6:38pm

Quoted from "scanderson;598858"

I can't get your code to work "out of the box" as a package

Quoted from "scanderson;598858"

Here's the thing - there is no error message.


Same problem, installed through curse and tried /run KillSequence() as a few class combos, nothing happens, no error. I have 42 addons total so could it be some conflict?

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,110

Tuesday, April 23rd 2013, 8:32pm

It might be a conflict. Try taking out all other addons (leaving DIYCE), and then try to run the macro. If it works, then add in one addon at a time to figure out which one is causing the conflict. If this works, please let me know which one is the issue for you, and I can try to work up a patch to fix this.

scanderson

Central Scrutinizer

Posts: 87

Location: New York, New York

  • Send private message

1,111

Wednesday, April 24th 2013, 2:46am

I only have 5 addons but will remove them and test it.

Ghost - are there any other macros I can use for testing in addition to /run KillSequence? I really want to try your basic DIYCE customfunctions from Curse.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,112

Wednesday, April 24th 2013, 9:04am

You can try with vocals on

/run KillSequence("v1")

or

/run KillSequence("v2")

1,113

Friday, April 26th 2013, 4:35am

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
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
                          
function KillSequence(arg1, az1, 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 melee = GetActionUsable(19) -- # is your melee range spell slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
  
    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
        
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        
        -- Class: Warrior/Mage
            if mainClass == "WARRIOR" and subClass == "MAGE" then
		--az1: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
                  
                   
            if (az1 == "0") then
            Skill =  {
                { name = "Lightning Burn Weapon",              		use = ((not pbuffs['Lightning Burn Weapon'])) },
                { name = "Action: 62 (Unbridled Enthusiam)",   		use = ((not pbuffs['Unbridled Enthusiasm'])) },
                { name = "Action: 63 (Scarlet Love)",   			use = ((not pbuffs['Scarlet Love'])) }, 
				{ name = "Action: 64 (Royal Radiance Cocktail)",    use = ((not pbuffs['Royal Radiance Cocktail'])) },
				{ name = "Action: 65 (Elegant Cuisine Delicacy)",   use = ((not pbuffs['Elegant Cuisine Delicacy'])) }
                     }
            elseif (az1 == "3") then
            Skill =  {
				{ name = "Action: 43 (Moti Blended Sausage)",       use = ((not pbuffs['Moti Blended Sausage'])) },
				{ name = "Action: 47 (Energy Restore)",          	use = (true) },
				                                    }
            elseif (az1 == "4") then
            Skill = {
				{ name = "Intensification",                			use = ((not pbuffs['Intensification'])) },
				{ name = "Action: 44 (Strong Stimulant)",      		use = (true) },
                { name = "Action: 45 (Extinction Potion)",   		use = (true) },
				{ name = "Action: 42 (Fire Attack)",		   		use = ((not pbuffs['Fire Attack'])) },
                { name = "Frenzy",                       			use = (true) },
                    }
            end

            if ((enemy) and (az1 == "1")) then
            Skill2 = {
                { name = "Survival Instinct",              			use = (phealth <= .15) and combat },
                { name = "Sense of Danger",                			use = (phealth <= .30) and combat },
				{ name = "Enraged",                    				use = ((EnergyBar1 <= 30)) },
				{ name = "Aggresiveness",                    		use = ((EnergyBar1 <= 30)) },
				{ name = "Action: 46 (Frenzy Potion)",     			use = ((not pbuffs['Strong Stimulant'])) },
				{ name = "Electrical Rage",            				use = ((EnergyBar1 >= 15) and ((not pbuffs['High Voltage III']) or (pbuffs[High Voltage III].time <= 2)) ) },
				{ name = "Lightning's Touch",               		use = (true) },	
                { name = "Attack",               					use = (true) },
                    }
            elseif ((enemy) and (paz1 == "2")) then
            Skill2 = {
                { name = "Thunder Sword",                        	use = (true) },
                { name = "Fireball",                               	use = (true) },
                     }
            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
   
end


Can someone please troubleshoot this for me? I'm new to diyce and I've been modeling after sekrit r/s but cant get it working. 0 is general buffs, 1 is melee (I want to cast ER whenever High Voltage III <2s, otherwise use attack and lightning's touch, also using Frenzy as soon as Stim wears off), 2 is for range (TS and Fireball), 3 and 4 are cds. Thanks!

When I remove the melee and range, the diyce (only buffs and cds) works.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,114

Friday, April 26th 2013, 7:21am

For starters, you are missing some commas at the end of some of the lines.

1,115

Friday, April 26th 2013, 10:11pm

Quoted from "heoboy123;599245"

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
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
                          
function KillSequence(arg1, az1, 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 melee = GetActionUsable(19) -- # is your melee range spell slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
  
    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
        
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        
        -- Class: Warrior/Mage
            if mainClass == "WARRIOR" and subClass == "MAGE" then
        --az1: 0 = Buffs, 1 = Melee, 2 = Ranged, 3 = Cooldowns & Potions, 4 = Longer Cooldowns
                  
                   
            if (az1 == "0") then
            Skill =  {
                { name = "Lightning Burn Weapon",                      use = ((not pbuffs['Lightning Burn Weapon'])) },
                { name = "Action: 62 (Unbridled Enthusiam)",           use = ((not pbuffs['Unbridled Enthusiasm'])) },
                { name = "Action: 63 (Scarlet Love)",               use = ((not pbuffs['Scarlet Love'])) }, 
                { name = "Action: 64 (Royal Radiance Cocktail)",    use = ((not pbuffs['Royal Radiance Cocktail'])) },
                { name = "Action: 65 (Elegant Cuisine Delicacy)",   use = ((not pbuffs['Elegant Cuisine Delicacy'])) }
                     }
            elseif (az1 == "3") then
            Skill =  {
                { name = "Action: 43 (Moti Blended Sausage)",       use = ((not pbuffs['Moti Blended Sausage'])) },
                { name = "Action: 47 (Energy Restore)",              use = (true) },
                                                    }
            elseif (az1 == "4") then
            Skill = {
                { name = "Intensification",                            use = ((not pbuffs['Intensification'])) },
                { name = "Action: 44 (Strong Stimulant)",              use = (true) },
                { name = "Action: 45 (Extinction Potion)",           use = (true) },
                { name = "Action: 42 (Fire Attack)",                   use = ((not pbuffs['Fire Attack'])) },
                { name = "Frenzy",                                   use = (true) },
                    }
            end

            if ((enemy) and (az1 == "1")) then
            Skill2 = {
                { name = "Survival Instinct",                          use = (phealth <= .15) and combat },
                { name = "Sense of Danger",                            use = (phealth <= .30) and combat },
                { name = "Enraged",                                    use = ((EnergyBar1 <= 30)) },
                { name = "Aggresiveness",                            use = ((EnergyBar1 <= 30)) },
                { name = "Action: 46 (Frenzy Potion)",                 use = ((not pbuffs['Strong Stimulant'])) },
                { name = "Electrical Rage",                            use = ((EnergyBar1 >= 15) and ((not pbuffs['High Voltage III']) or (pbuffs[High Voltage III].time <= 2)) ) },
                { name = "Lightning's Touch",                       use = (true) },    
                { name = "Attack",                                   use = (true) },
                    }
            elseif ((enemy) and (paz1 == "2")) then
            Skill2 = {
                { name = "Thunder Sword",                            use = (true) },
                { name = "Fireball",                                   use = (true) },
                     }
            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
   
end


Can someone please troubleshoot this for me? I'm new to diyce and I've been modeling after sekrit r/s but cant get it working. 0 is general buffs, 1 is melee (I want to cast ER whenever High Voltage III <2s, otherwise use attack and lightning's touch, also using Frenzy as soon as Stim wears off), 2 is for range (TS and Fireball), 3 and 4 are cds. Thanks!

When I remove the melee and range, the diyce (only buffs and cds) works.


Too lazy to look through your code, but heres my own diyce with the w/m only section. Edit it how you see fit.

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
-- ## DIYCE Script 2.2 (Author: Ghostwolf)
-- ## Skill Rotations and Updated SilenceList edited and coded by Ravesden @Reni
-- ## Scout/Warrior, Scout/Knight, Rogue/Scout, Scout/Warden, Warrior/Mage DIYCE - Chapter 5
-- ## Special thanks to Peryl @ Runes of Magic US Forums

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 = {
        ['Flame']             = true,
        ['Flame Spell']     = true,
        ['Heal']             = true,
        ['Healing Ripple']     = true,
        ['Thunderstorm']     = true,
        ['Iron Wing']         = true, --Furious Wodjin
        ['Flame Jet']         = true, --Spider Mandara
        ['Explosive Burn']     = true, --Spider Mandara
        ['Burning Fireball']     = true, --Spider Mandara
        ['Crackling Flash'] = true, --AC chest mobs
        ['Ancestral Fury']     = true, --Tosh third boss
        ['Heavy Shelling']  = true, --Juggler Apprentice in Grafu
        ['Dark Healing']    = true, --Mini-boss in Sardo
        ['Targonharl's Fury']    = true, --TB North boss
        ['Myrmex Survival']    = true, --Kulech 5th boss
        ['Storm's Pulse']    = true, --Kulech 3th boss
        ['Amplified Punishment']  = true, --Kulech 6th boss
                    }
                    
-- PVE Sequence
-- PvE
-- PvE
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(21) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(22)  -- # 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
    
    --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
        
    --Check for level 1 mobs, if it is, drop target and acquire a new one.
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetUnit("")
        return
    end
    
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR        
    
                        --Class: Warrior/Mage            
                    if mainClass == "WARRIOR" and subClass == "MAGE" then
                
                if enemy then
                Skill = {
                    { name = "Silence",                          use = ((silenceThis) and ((not tbuffs['Silence']) or (tbuffs['Silence'].time <= 4.9))) },
                    { name = "Sense of Danger",                 use = ((phealth <= .30) and (combat) and (not tDead)) },
                    { name = "Lightning's Touch",               use = (true) and (not boss) },
                    { name = "Electrical Rage",                 use = ((EnergyBar1 >= 15) and (boss) and (not pbuffs['High Voltage I']) and (not pbuffs['High Voltage II']) and (not pbuffs['High Voltage III'])) },
                    { name = "Electrical Rage",                  use = ((EnergyBar1 >= 15) and (boss) and (pbuffs['High Voltage I']) or (pbuffs['High Voltage II'])) },
                    { name = "Electrical Rage",                 use = ((EnergyBar1 >= 15) and (pbuffs['High Voltage III']) and (pbuffs['High Voltage III'].time <= 3.3) and (not tDead)) },
                    { name = "Enraged",                          use = ((true) and (combat) and (EnergyBar1 <= 30)) },
                    { name = "Lightning's Touch",               use = (true) },
                                 }
                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("")
    end

    if not UnitExists("target") or UnitIsDeadOrGhost("target") or not UnitCanAttack("player","target") then
        TargetNearestEnemy()

        for i=1,10 do
            if not UnitMaster("target") then
                break
            end
            TargetNearestEnemy()
        end

        if UnitMaster("target") then
            TargetUnit("")
        end
    end
end

You may have to do some modifications depending on whether you have the 70 elite or not, changes the ID of High Voltage or something, makes it 1/2/3 stacks versus having it names High Voltage I, II, III. Never got the 70 on the w/m as I don't see a real benefit to it, but there it is.

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

1,116

Saturday, April 27th 2013, 3:35am

I kind of hate diyce.... Now on my server people are like i cant dps i need to find somewhere a good diyce or other rank says that he cant tank because all he knows is how to press one botton for diyce.... That is big fail and reason i dont like it as people have no clue how to play their class. they blame bad diyce for their poor performance and as a result fail at actually playing game. Maybe thats not all people but that is major issue on my server.

ghostwolf82

Professional

  • "ghostwolf82" started this thread

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

1,117

Saturday, April 27th 2013, 4:31am

Quoted from "narix11;599356"

I kind of hate diyce.... Now on my server people are like i cant dps i need to find somewhere a good diyce or other rank says that he cant tank because all he knows is how to press one botton for diyce.... That is big fail and reason i dont like it as people have no clue how to play their class. they blame bad diyce for their poor performance and as a result fail at actually playing game. Maybe thats not all people but that is major issue on my server.


What server are you on?

Also, feel free to point out that DIYCE is never to blame, for anything. DIYCE stands for Do It Yourself Combat Engine, and if you fail to do it yourself it is just a Combat Engine. If they suck, it is because they don't know their class combo, and created a poor selection when making DIYCE. Now, if people are just getting scripts from someone else without making it themselves, then that is their own fault and you need to get into a better guild.

scanderson

Central Scrutinizer

Posts: 87

Location: New York, New York

  • Send private message

1,118

Saturday, April 27th 2013, 2:24pm

I can't seem to figure out how to disable the auto-targeting in this script:

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
--Select Next Enemy
    if (tDead) then
        TargetUnit("")
        return
    end
 
 if SeigeWar then
  if (not LockedOn) or (not enemy) then
   for i=1,10 do
    if UnitIsPlayer("target") then
     break
    end
    TargetNearestEnemy()
        StopDIYCETimer("LBBleed")
     StopDIYCETimer("SSBleed")
    return
   end
  end
 
 elseif (not SeigeWar) then
  if mainClass == "RANGER" and (not party) then  --To keep scouts from pulling mobs without meaning to.
   if (not LockedOn) or (not enemy) then
    TargetNearestEnemy()
     StopDIYCETimer("LBBleed")
     StopDIYCETimer("SSBleed")
    return
   end
  elseif mainClass ~= "RANGER" then     --Let all other classes auto target.
   if (not LockedOn) or (not enemy) then
    TargetNearestEnemy()
        StopDIYCETimer("LBBleed")
     StopDIYCETimer("SSBleed")
    return
   end
  end
 end
end


Any suggestions? I just want the ability to test my custom functions without the auto-targeting. I tried using the double-dash and brackets but not sure if I am doing it correctly. Any suggestions would be appreciated.

Thank you.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

1,119

Saturday, April 27th 2013, 4:32pm

Comment everything out. Starting from the line after --Select Next Enemy up to the the line before the last end statement.
like so:

Source code

1
2
3
4
5
6
7
--Select Next Enemy
--[[
    if (tDead) then
...
  end
--]]
end

That should do the trick.
2013... The year from hell....

Cike

Rogue

Posts: 4,171

Occupation: Being Human

  • Send private message

1,120

Saturday, April 27th 2013, 5:46pm

Quoted from "ghostwolf82;599360"

What server are you on?

Also, feel free to point out that DIYCE is never to blame, for anything. DIYCE stands for Do It Yourself Combat Engine, and if you fail to do it yourself it is just a Combat Engine. If they suck, it is because they don't know their class combo, and created a poor selection when making DIYCE. Now, if people are just getting scripts from someone else without making it themselves, then that is their own fault and you need to get into a better guild.


he be on palenque if I'm not mistaken...and how is spamming 1 button for diyce any different than spamming 1 button for flame?