You are not logged in.

Dear visitor, welcome to Runes of Magic EU. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, April 23rd 2013, 4:56pm

DIYCE Not working correctly

So, i'm using DIYCE version 2.4.2 and can't seem to get it to work correctly. The CustomFunctions.lua that I have edited was originally found here:

http://forum.us.runesofmagic.com/showthr…?t=62854&page=4

This is the one I have now:

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
local WHITE      = "|cffffffff"local SILVER     = "|cffc0c0c0"
local GREEN      = "|cff00ff00"
local LTBLUE     = "|cffa0a0ff"
function DIYCE_DebugSkills(skillList)
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Skill List:")
    for i,v in ipairs(skillList) do
        DEFAULT_CHAT_FRAME:AddMessage(SILVER.." ['..WHITE..i..SILVER..']: "..LTBLUE.."" "..WHITE..v.name..LTBLUE.."" use = "..WHITE..(v.use and "true" or "false"))
    end
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end
function DIYCE_DebugBuffList(buffList)
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Buff List:")
    for k,v in pairs(buffList) do
        -- We ignore numbered entries because both the ID and name 
        -- are stored in the list. This avoids doubling the output.
        if type(k) ~= "number" then
            DEFAULT_CHAT_FRAME:AddMessage(SILVER.." ['..WHITE..k..SILVER..']: "..LTBLUE.."id: "..WHITE..v.id..LTBLUE.." stack: "..WHITE..v.stack..LTBLUE.." time: "..WHITE..v.time)
        end
    end
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------") 
end
local silenceList = {
    ['Annihilation']           = true,
    ['King Bug Shock']         = true,
    ['Mana Rift']              = true,
    ['Dream of Gold']          = true,
    ['Flame']                  = true,
    ['Flame Spell']            = true,
    ['Wave Bomb']              = true,
    ['Silence']                = true,
    ['Recover']                = true,
    ['Restore Life']           = true,
    ['Heal']                   = true,
    ['Curing Shot']            = true,
    ['Leaves of Fire']         = true,
    ['Urgent Heal']            = true,
}
function KillSequence(arg1, mode)
    --arg1 = "v1" or "v2" for debugging
    --mode = "PvE" or "PvP"
    local Skill = {}
    local Skill2 = {}
    local i = 0
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
    local EnergyBar1 = UnitMana("player")
    local EnergyBar2 = UnitSkill("player")
    local pctEB1 = PctM("player")
    local pctEB2 = PctS("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    local behind = (not UnitIsUnit("player", "targettarget"))
    local melee = GetActionUsable(13) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(1) -- # is your Autoshot slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
    --Silence Logic
    local tSpell,tTime,tElapsed = UnitCastingTime("target")
    local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)
    --Potion Checks
    healthpot = healthpot or 0
    manapot = manapot or 0
            end
        end 
    end
    --Begin Player Skill Sequences
    --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
    --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
    --Class: Scout/Warden
    if mainClass == "RANGER" and subClass == "WARDEN" then
        --Potions and Buffs
        Skill = {
            { name = "Briar Shield",               use = (not pbuffs['Briar Shield']) },
            { name = "Entling Offering",           use = (not pbuffs['Entling Offering']) },
        }
 
        --Combat
        if enemy then
            Skill2 = {
                { name = "Snipe",                  use = (pbuffs['Hidden Peril']) },
				{ name = "Charged Chop",           use = (true) },
				{ name = "Combo Shot",             use = (true) },
                { name = "Autoshot",               use = (not ASon) },
                { name = "Hidden Peril",           use = (EnergyBar1 >= 30) },
                { name = "Vampire Arrows",         use = (EnergyBar1 >= 30) },
                { name = "Shot",                   use = (true) },
                { name = "Thorn Arrow",            use = (true) },
                { name = "Reflected Shot",         use = (true) }, 
                { name = "Piercing Arrow",         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
 
    if mainClass == "RANGER" and (not party) then --To keep scouts from pulling mobs without meaning to.
        if (not LockedOn) or (not enemy) then
            TargetNearestEnemy()
            return
        end
    elseif mainClass ~= "RANGER" then --Let all other classes auto target.
        if (not LockedOn) or (not enemy) then
            TargetNearestEnemy()
            return
        end
    end
end


I just changed the rotation around slightly. But when I create the macro /run KillSequence(arg1) in-game it doesn't work properly. If I run the macro it will buff me, but only 1 buff per click. Other than that it only targets enemies, and it won't attack them.

Also, I do admit I am new to DIYCE and still rather nooby on RoM... How do I tell what number slot an item is in on my action bar? The reason I ask is:

Source code

1
2
    local melee = GetActionUsable(13) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(1) -- # is your Autoshot slot number


I am unsure as to what slots I should be putting these in; and also what is a melee range spell??

Thanks in advance