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.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

701

Wednesday, July 18th 2012, 12:53pm

Quoted from "Alterios;546503"

The issue I have been having is that I have found out that there are multiple zone IDs for siege.

Yup, IIRC it is caused by the channel numbers, though it could also be something else. The modulo 1000 is trying to remove that part.

Quoted from "Alterios;546503"

I have been working from 5am to 8:30 pm 7 days a week for the last few weeks so I have not had the energy to root the issue out.

I know that feeling. Did some of that myself not too long ago.


Quoted from "BloodyArrow;546502"

Does the place of the code really mater or, because same thing again, my DIYCE does not react at all when I insert the code mentioned above.

Yes, the location of the code does indeed matter. The reason DIYCE is not reacting is likely that there is a typo and/or missing code.

Quoted from "BloodyArrow;546502"

Question: Can I make this work for both PvP (Arena) and Siege Wars?

Yes, though you will need to find out what the Arena's ZoneID is and modify the code to also check for that.

You can get the zone ID with this macro (or just type directly in the chat box):

Source code

1
/run DEFAULT_CHAT_FRAME:AddMessage("Zone ID is "..(GetZoneID() or "none"))


The change to the code would be:

Source code

1
    local pvp = (zoneid == 402 or zoneid == [i]ID from above macro[/i])
2013... The year from hell....

702

Wednesday, July 18th 2012, 1:13pm

Alright I got the zone ID for both Siege and Arena now. What code am I missing? I am really out of ideas :/

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

703

Wednesday, July 18th 2012, 2:33pm

Code change needed is shown in previous post. Once done, post the whole file so I can see if there are any other problems.
2013... The year from hell....

704

Wednesday, July 18th 2012, 4:01pm

Alright.
Note that I pasted frafall's piece of code for only targeting players under "--Select Next Enemy". The Locals are at the end of the --"Player and target status".

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

705

Wednesday, July 18th 2012, 6:51pm

Okay, since you want this to always select only players, then you don't need the PvP checks. Also, you were missing some code in there.

Anyway, to fix first remove the locals since they now serve no purpose.

Remove the return statement immediately after the TargetUnit("") line (just above previous edit).

Remove the if pvp then line as this too is redundant.

Remove everything from if mainClass == "RANGER" and (not party) then up to (and including) the second end statement at the bottom.

Now add the following right before the for loop

Source code

1
2
    if not UnitExists("target") or UnitIsDeadOrGhost("target") then
        TargetNearestEnemy()


Finally, add in the code to check if the target is indeed a player and clear the target if not (add this before the last end statement).

Source code

1
2
3
4
        if not UnitIsPlayer("target") then
            TargetUnit("")
        end
    end



Your code should now look like this (with a bit or re-adjusting for the spacing):

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
    --Select Next Enemy
    if (tDead) then
        TargetUnit("")
    end

    if not UnitExists("target") or UnitIsDeadOrGhost("target") then
        TargetNearestEnemy()

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

        if not UnitIsPlayer("target") then
            TargetUnit("")
        end
    end
end
2013... The year from hell....

706

Wednesday, July 18th 2012, 7:21pm

Thanks Peryl, did all that. But when I press my DIYCE macro ingame it does not target any player or mob. I need to use Tab now which I personally dont use much. I just want it target mobs and players. Now it does not do any of those. Here is the code, and the two locals I added before are gone.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--Select Next Enemy
    if (tDead) then
        TargetUnit("")
        --return
    end
    
    -- Only target players in pvp, no pets
            --if pvp then
            if not UnitExists("target") or UnitIsDeadOrGhost("target") then
        TargetNearestEnemy()
                for i=1,10 do
                    if UnitIsPlayer("target") then
                        break
                    end
                    TargetNearestEnemy()
                end
    if not UnitIsPlayer("target") then
            TargetUnit("")
        end
    end
    
end

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

707

Wednesday, July 18th 2012, 8:57pm

Then it simply won't work the way you want it too. The code, as is targets only players, which is what you stated you wanted. Now you want it to target mobs and players.

Further, that code (as mentioned previously) is for DIYCE re-targeting after a kill. So you need some target to begin with (or at least hit the macro once to kick start the process).

Anyway, the code you want is to target non-pets since that should allow targeting of both players and mobs.

Change if UnitIsPlayer("target") then to:

Source code

1
    if not UnitMaster("target") then


and change if not UnitIsPlayer("target") then to:

Source code

1
    if UnitMaster("target") then


That should allow targeting of mobs and players, but will ignore pets.
2013... The year from hell....

708

Wednesday, July 18th 2012, 10:01pm

Quoted from "Peryl;546821"

Then it simply won't work the way you want it too. The code, as is targets only players, which is what you stated you wanted. Now you want it to target mobs and players.

Further, that code (as mentioned previously) is for DIYCE re-targeting after a kill. So you need some target to begin with (or at least hit the macro once to kick start the process).

Anyway, the code you want is to target non-pets since that should allow targeting of both players and mobs.

Change if UnitIsPlayer("target") then to:

Source code

1
    if not UnitMaster("target") then


and change if not UnitIsPlayer("target") then to:

Source code

1
    if UnitMaster("target") then


That should allow targeting of mobs and players, but will ignore pets.


Thanks Peryl, works perfectly now. :)

709

Monday, July 23rd 2012, 12:22pm

Hey,
I wonder what I can add to my Low Blow in my code below. I want it to be used when I farm mobs in the new zone or TB since its usually 1-hit. Now it goes SS/LB/WA, but would prefer to cast LB first but only on mobs, on bosses I want the same rotation.

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

710

Monday, July 23rd 2012, 12:52pm

I have to run off to work soon so I don't have time to go in-depth at the moment, but you could always do a check for the zones/conditions you want and create a completely different skill list for those zones/conditions.
2013... The year from hell....

trav42073

Professional

Posts: 806

Location: Arizona

Occupation: welder/fabricator/antagonist

  • Send private message

711

Monday, July 23rd 2012, 3:02pm

or u could check out extraaction bar addon.
95r/62m/63s/ Soultwist.
Ryaderr wrd/s/w erobos

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

712

Tuesday, July 24th 2012, 2:03pm

Quoted from "BloodyArrow;559588"

Hey,
I wonder what I can add to my Low Blow in my code below. I want it to be used when I farm mobs in the new zone or TB since its usually 1-hit. Now it goes SS/LB/WA, but would prefer to cast LB first but only on mobs, on bosses I want the same rotation.

Okay, you've changed the requirement a little, but that should make things easier to do.
Add another Low Blow skill line before the SS one, but add a and not boss to the use clause so that on bosses it will be ignored. For the second Low Blow line (the one currently there) add and boss to the use clause. Now when you are attacking a mob, Low Blow will come first but when attacking a boss, that first Low Blow line will not be used but the second will.
2013... The year from hell....

713

Tuesday, July 24th 2012, 5:59pm

Thanks a lot, why didnt I think of that, so simple and does exactly what I want. :)

714

Monday, August 6th 2012, 8:24am

OK i have searched this entire thread as well googles hundreds of pages on a R/S DIYCE 2.2, ive tried the ones posted in this thread they all seem to have the same issues and are split into several different macros (as you can see this is why i am a fan of DIYCE 1.4) I would like a simple function for R/S that all is does is the DPS SS>LB>WA>VA>Shot>Joint Blow and keeps Combat Master up with just 1 MACRO i dont want several i have enough skills on my hotbar lol

If someone could provide some basic scrits or @ least something to go off of so i can do it myself i would surely appreciate it
-[EvilEmpires]-
Cocheech - RIP
Ricknight - R/M/S/Wd
Necrotix - WL/C/M
Yamanight D/W/Wd
Nightmareknight K/W/M/P

715

Monday, August 6th 2012, 11:40am

Everything you need is all in here. Last week I didnt know jack squat about diyce or any of its coding. I took a couple hours to look through this thread and the examples, and I've written a diyce that our end game rogues are using in GCH/ToSH/AC and are very much pleased with the results. So much so, that they don't want me sharing it >.>

Anyways, heres an example of "Blind Spot":

Source code

1
{ name = "Blind Spot",                         use = ((EnergyBar1 >= 25) and (boss) and (behind)) },


Nothing special, just telling diyce to use Blind Spot if your 1st energy bar has equal to or greater than 25 energy, your target is a boss mob, and you are behind your target.

For things without an energy bar, and just a simple cooldown, like Shot, it would look like this:

Source code

1
{ name = "Shot",                              use = (true) },

All this is telling diyce is when it gets down to the skill "Shot" in the priority list, to use it if it is off cooldown. Is "Shot" off cooldown? If true, then use.

There are some skills you don't want to use if there are already one of the same skill casted by you on a boss. Lets take Shadowstab as an example. If you don't tell diyce to check the bosse's debuffs to see if you already have shadowstab, then itll just spam shadowstab until you are out of energy. The debuff causes by shadowstab is simply named "Bleed". So telling diyce to check if "Bleed" is on the boss, then skip SS and move on to the next attack would look like this:

Source code

1
{ name = "Shadowstab",                         use = ((EnergyBar1 >= 20) and (not tbuffs['Bleed'])) },



There are other "parameters" (im still a nub to lua, don't know the correct lingo) that exist within diyce. For example on Scout/Warrior, I have target lock like this:

Source code

1
{ name = "Target Lock",                     use = ((boss) and (not tDead)) },

Use if the target is a boss, and the target is not dead.

Source code

1
(phealth <= .55)

Player health is equal to, or above 55%

Source code

1
(pbuffs['Energy Thief'])

Check to see if Energy Thief is currently buffed.

Source code

1
CancelBuff("Blood Arrow")

Cancels blood arrow.


Bored now, hope that helped a lil.

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

716

Monday, August 6th 2012, 11:44pm

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
            --Class: Rogue/Scout
            elseif mainClass == "THIEF" and subClass == "RANGER" then
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Combat Master",                use = (not combat) and (EnergyBar2 >= 30) and ((not pbuffs['Combat Master']) },
                    { name = "Blind Spot",                   use = ((EnergyBar1 >= 25) and (boss) and (behind)) },
                    { name = "Wound Attack",                 use = (EnergyBar1 >= 35) and (tbuffs['Bleed']) and (tbuffs['Grievous Wound']) },
                    { name = "Shadowstab",                   use = (EnergyBar1 >= 20) and (not tbuffs['Bleed']) },
                    { name = "Low Blow",                     use = (EnergyBar1 >= 25) },
                    { name = "Vampire Arrows",               use = (EnergyBar2 >= 20) },
                    { name = "Shot",                         use = (true) },
                    { name = "Joint Blow",                   use = (EnergyBar2 >= 15) },                    
                            }
                end


I dont know whats wrong all it spams is shadowstab and blindspot works
-[EvilEmpires]-
Cocheech - RIP
Ricknight - R/M/S/Wd
Necrotix - WL/C/M
Yamanight D/W/Wd
Nightmareknight K/W/M/P

717

Tuesday, August 7th 2012, 1:16am

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
            --Class: Rogue/Scout
            elseif mainClass == "THIEF" and subClass == "RANGER" then
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Combat Master",                use = (not combat) and (EnergyBar2 >= 30) and ((not pbuffs['Combat Master']) or (pbuffs['Combat Master'].time <= 45)) },
                    { name = "Wound Attack",                 use = ((EnergyBar1 >= 35) and (tbuffs['Bleed']) and (tbuffs['Grievous Wound'])) },
                    { name = "Blind Spot",                   use = ((EnergyBar1 >= 25) and (boss) and (behind)) },
                    { name = "Shadowstab",                   use = ((EnergyBar1 >= 20) and (not tbuffs['Bleed'])) },
                    { name = "Low Blow",                     use = ((EnergyBar1 >= 25) and (tbuffs['Bleed'])) },
                    { name = "Vampire Arrows",               use = (EnergyBar2 >=20) },
                    { name = "Shot",                         use = (true) },
                    { name = "Joint Blow",                   use = (EnergyBar2 >=15) },                    
                            }
                end


UPDATE: Fixed it

everything works now

I need to disable the auto targetting what do i need to remove from this

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
local WHITE = "|cffffffff"
local SILVER = "|cffc0c0c0"
local GREEN = "|cff00ff00"
local LTBLUE = "|cffa0a0ff"
function DIYCE_DebugSkills(skillList)
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Skill List:")
    
    for i,v in ipairs(skillList) do
        DEFAULT_CHAT_FRAME:AddMessage(SILVER.."  ['..WHITE..i..SILVER..']: "..LTBLUE.."" "..WHITE..v.name..LTBLUE..""  use = "..WHITE..(v.use and "true" or "false"))
    end
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")
end
function DIYCE_DebugBuffList(buffList)
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."Buff List:")
    
    for k,v in pairs(buffList) do
        -- We ignore numbered entries because both the ID and name 
        -- are stored in the list. This avoids doubling the output.
        if type(k) ~= "number" then
            DEFAULT_CHAT_FRAME:AddMessage(SILVER.."  ['..WHITE..k..SILVER..']:  "..LTBLUE.."id: "..WHITE..v.id..LTBLUE.."  stack: "..WHITE..v.stack..LTBLUE.."  time: "..WHITE..v.time)
        end
    end
    
    DEFAULT_CHAT_FRAME:AddMessage(GREEN.."----------")    
end
local silenceList = {
  ['Annihilation']  = true,
  ['King Bug Shock']  = true,
  ['Mana Rift']   = true,
  ['Dream of Gold']  = true,
  ['Flame']    = true,
  ['Flame Spell']  = true,
  ['Wave Bomb']   = true,
  ['Silence']   = true,
  ['Recover']   = true,
  ['Restore Life']  = true,
  ['Heal']    = true,
  ['Curing Shot']  = true,
  ['Leaves of Fire']  = true,
  ['Urgent Heal']  = true,
     }
     
function PriestFairySequence(arg1)
 local Skill = {}
 local Skill2 = {}
 local i = 0
 local FairyExists = UnitExists("playerpet")
 local FairyBuffs = BuffList("playerpet")
 local combat = GetPlayerCombatState()
    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
 --Summon Fairy
 if (not FairyExists) and (not combat) then
  if mainClass == "AUGUR" then
   if subClass == "THIEF" then
    Skill = {
     { name = "Shadow Fairy",   use = true },
      }
   elseif subClass == "RANGER" then
    Skill = {
     { name = "Water Fairy",    use = true },
      }
   elseif subClass == "MAGE" then
    Skill = {
     { name = "Wind Fairy",    use = true },
      }   
   elseif subClass == "KNIGHT" then
    Skill = {
     { name = "Light Fairy",    use = true },
      }   
   elseif subClass == "WARRIOR" then
    Skill = {
     { name = "Fire Fairy",    use = true },
      }
   end
  end
 end 
 
 --Cast Halo
 if FairyExists then
  if mainClass == "AUGUR" then
   if subClass == "THIEF" then
    if (not FairyBuffs[503459]) then
     if (arg1 == "v1") then
      Msg("- Activating Halo", 0, 1, 1)
     end
     Skill = {
      { name = "Pet Skill: 6 (Wraith Halo)", use = true },
       }
    end
   elseif subClass == "RANGER" then
    if (not FairyBuffs[503457]) then
     if (arg1 == "v1") then
      Msg("- Activating Halo", 0, 1, 1)
     end
     Skill = {
      { name = "Pet Skill: 6 (Frost Halo)", use = true },
       }
    end
   elseif subClass == "MAGE" then
    if (not FairyBuffs[503461]) then
     if (arg1 == "v1") then
      Msg("- Activating Halo", 0, 1, 1)
     end
     Skill = {
      { name = "Pet Skill: 6 (Windrider Halo)", use = true },
       }
    end
   elseif subClass == "KNIGHT" then
    if (not FairyBuffs[503507]) then
     if (arg1 == "v1") then
      Msg("- Activating Halo", 0, 1, 1)
     end
     Skill = {
      { name = "Pet Skill: 6 (Devotion Halo)", use = true },
       }
    end
   elseif subClass == "WARRIOR" then
    if (not FairyBuffs[503455]) then
     if (arg1 == "v1") then
      Msg("- Activating Halo", 0, 1, 1)
     end
     Skill = {
      { name = "Pet Skill: 6 (Accuracy Halo)", use = true },
       }
    end
   end
  
   --Cast Conceal
  if (not MyCombat(Skill, arg1)) then
   if (not FairyBuffs[503753]) then
    if (arg1 == "v1") then
     Msg("- Activating Conceal", 0, 1, 1)
    end
    Skill2 = {
     { name = "Pet Skill: 7 (Conceal)", use = true },
      }
   end
  end
  end
 end
 
 if (not MyCombat(Skill, arg1)) then
  MyCombat(Skill2, arg1)
 end
end
      
function KillSequence(arg1, healthpot, manapot, foodslot)
--arg1 = "v1" or "v2" for debugging
--healthpot = # of actionbar slot for health potions
--manapot = # of actionbar slot for mana potions
--foodslot = # of actionbar slot for food (add more args for more foodslots if needed)
    local Skill = {}
    local Skill2 = {}
    local i = 0
    
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
    local EnergyBar1 = UnitMana("player")
    local EnergyBar2 = UnitSkill("player")
    local pctEB1 = PctM("player")
    local pctEB2 = PctS("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    local behind = (not UnitIsUnit("player", "targettarget"))
    local melee = GetActionUsable(13) -- # is your melee range spell slot number
    local a1,a2,a3,a4,a5,ASon = GetActionInfo(14)  -- # is your Autoshot slot number
    local phealth = PctH("player")
    local thealth = PctH("target")
    local LockedOn = UnitExists("target")
    local boss = UnitSex("target") > 2
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
    
    --Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
    --Silence Logic
    local tSpell,tTime,tElapsed = UnitCastingTime("target")
    local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)
    
    --Potion Checks
    healthpot = healthpot or 0
    manapot = manapot or 0
    
    --Equipment and Pet Protection
    if phealth <= .04 then
            --SwapEquipmentItem()        --Note: Remove the first double dash to re-enable equipment protection.
        for i=1,6 do
            if (IsPetSummoned(i) == true) then
                ReturnPet(i);
            end
        end        
    end
        
 --Check for level 1 mobs, if it is, drop target and acquire a new one.
    if (LockedOn and (UnitLevel("target") < 2)) then
        TargetUnit("")
        return
    end
    
    --Begin Player Skill Sequences
    
        --Priest = AUGUR, Druid = DRUID, Mage = MAGE, Knight = KNIGHT, 
        --Scout = RANGER, Rogue = THIEF, Warden = WARDEN, Warrior = WARRIOR
        
        -- Class: Warrior/Mage
            if mainClass == "WARRIOR" and subClass == "MAGE" then
                local SurpriseAttack = GetActionUsable(14)
    
            --Potions and Buffs
            Skill = {
                { name = "Action: "..healthpot,            use = (phealth <= .70) },
                { name = "Survival Instinct",              use = (phealth <= .30) and combat },
                { name = "Sense of Danger",                use = (phealth <= .30) and combat },
                { name = "Action: "..manapot,              use = (pctEB2 <= .40) },
                { name = "Action: "..Healslot,             use = (phealth < .70) and (not combat) and (not party) },
                { name = "Action: "..HoTslot,              use = (phealth < .80) and (not party) },
                { name = "Intensification",                use = (pctEB2 >= .05) and (not pbuffs['Intensification']) and boss and enemy },
                { name = "Aggressiveness",                 use = boss and enemy },
                { name = "Electric Attack",                use = (pctEB2 >= .05) and ((not pbuffs['Electric Attack']) or (pbuffs['Electric Attack'].time <= 45)) },
                    }
                    
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Silence",                    use = (silenceThis) },
                    { name = "Surprise Attack",            use = SurpriseAttack },
                    { name = "Enraged",                    use = (EnergyBar1 <= 30) and (boss or elite) },
                    { name = "Electrical Rage",            use = (EnergyBar1 >= 15) and (pctEB2 >=.05) and (not pbuffs['High Voltage III']) },
                    { name = "Thunder Sword",              use = (pctEB2 >= .05) },
                    { name = "Lightning's Touch",          use = (pctEB2 >= .05) },
                    { name = "Attack",                     use = (thealth == 1) },
                        }
                end
            --Class: Rogue/Scout
            elseif mainClass == "THIEF" and subClass == "RANGER" then
            --Combat
                if enemy then
                Skill2 = {
                    { name = "Combat Master",                use = (not combat) and (EnergyBar2 >= 30) and ((not pbuffs['Combat Master']) or (pbuffs['Combat Master'].time <= 45)) },
                    { name = "Wound Attack",                 use = ((EnergyBar1 >= 35) and (tbuffs['Bleed']) and (tbuffs['Grievous Wound'])) },
                    { name = "Blind Spot",                   use = ((EnergyBar1 >= 25) and (boss) and (behind)) },
                    { name = "Shadowstab",                   use = ((EnergyBar1 >= 20) and (not tbuffs['Bleed'])) },
                    { name = "Low Blow",                     use = ((EnergyBar1 >= 25) and (tbuffs['Bleed'])) },
                    { name = "Vampire Arrows",               use = (EnergyBar2 >=20) },
                    { name = "Shot",                         use = (true) },
                    { name = "Joint Blow",                   use = (EnergyBar2 >=15) },                    
                            }
                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
-[EvilEmpires]-
Cocheech - RIP
Ricknight - R/M/S/Wd
Necrotix - WL/C/M
Yamanight D/W/Wd
Nightmareknight K/W/M/P

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

718

Tuesday, August 7th 2012, 1:50am

Quoted from "xMagus;563212"

I need to disable the auto targetting what do i need to remove from this

If you mean DIYCE's re-targeting stuff, you want to remove (or at least comment out) the part at the end of the function. Technically everything from the -- Select next enemy comment up to the second to last end statement. I suggest leaving the first if statement though. All it does is clear out your current target if it is dead.

Anyway, to comment out a single line, you can put two dashes (--) in front of the line. To comment out multiple lines, you can use Lua's block comment using --[[ to start the comment block and --]] to end it. Anything in between these symbols will be considered a comment and will be ignored by Lua.

So the end of your function would look something like this:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    --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

The nice thing about commenting out the code in this fashion is that you can easily re-instate the code by adding a third dash to the open block comment symbol turning it into ---[[.
2013... The year from hell....

719

Tuesday, August 7th 2012, 2:11pm

DIYCE 2.2 for Mage/Warlock

Hello,

First: Thank you all for your help, specially to Peryl for developing DIYCE, great work.
Sorry for my poor english, but I'm playing on a german server. I have some problems with the two new classes.

For my Warlock/Mage this seems to work fine:

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
--Class: Warlock/Mage
            elseif mainClass == "HARPSYN" and subClass == "MAGE" then
                 
          if ((enemy) and (goat2 == "1")) then
            Skill2 = {
{ name = "Verdrehte Ladung",                 use = ((EnergyBar1 >= 30) and (not tbuffs['Verdrehte Ladung'])) },
{ name = "Verwirrendes R\195\164tsel",       use = ((PsiPoints < 5) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Willenskraftklinge",               use = ((PsiPoints == 6) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Unbarmherziges Urteil",            use = ((pbuffs ['Willenskraftklinge']) and (PsiPoints >= 2)) },
{ name = "Wahrnehmungsentzug",               use = ((EnergyBar1 >= 15) and (not tbuffs['Wahrnehmungsentzug'])) },
{ name = "Seelenpein",                       use = ((EnergyBar1 >= 15) and (not tbuffs['Seelenpein'])) },
{ name = "Flammenherzangriff",               use = ((PsiPoints < 4) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Seelenbrandstich",                 use = ((pbuffs ['Willenskraftklinge']) and (PsiPoints >= 1)) },
{ name = "Feuerball",                        use = (true) },
{ name = "Psychische Pfeile",                use = ((PsiPoints < 6) and (not pbuffs['Willenskraftklinge'])) },
                    }
	elseif ((enemy) and (goat2 == "2")) then
            Skill2 = {
{ name = "Schw\195\164chender Webefluch",    use = ((EnergyBar1 >= 20) and (not tbuffs['Geschw195164cht'])) },
{ name = "Verdrehte Ladung",                 use = ((EnergyBar1 >= 30) and (not tbuffs['Verdrehte Ladung'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Woge der Boshaftigkeit",           use = ((EnergyBar1 >= 20) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Flammenherzangriff",               use = ((PsiPoints < 4) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Unbarmherziges Urteil",            use = ((pbuffs ['Willenskraftklinge']) and (PsiPoints >= 2)) },
{ name = "Verwirrendes R\195\164tsel",       use = ((PsiPoints < 6) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Willenskraftklinge",               use = ((PsiPoints == 6) and (not pbuffs['Willenskraftklinge']))},
{ name = "Wahrnehmungsentzug",               use = ((EnergyBar1 >= 15) and (not tbuffs['Wahrnehmungsentzug'])) },
{ name = "Seelenpein",                       use = ((EnergyBar1 >= 15) and (not tbuffs['Seelenpein'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Seelenbrandstich",                 use = ((pbuffs ['Willenskraftklinge']) and (PsiPoints >= 1)) },
{ name = "Verwirrendes R\195\164tsel",       use = ((PsiPoints < 5) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Feuerball",                        use = (true) },
{ name = "Psychische Pfeile",                use = ((PsiPoints < 6) and (not pbuffs['Willenskraftklinge'])) },
                     }
	elseif ((enemy) and (goat2 == "4")) then
            Skill2 = {
{ name = "Verdrehte Ladung",                 use = ((EnergyBar1 >= 30) and (not tbuffs['Verdrehte Ladung'])) },
{ name = "Verwirrendes R\195\164tsel",       use = ((PsiPoints < 6) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Unbarmherziges Urteil",            use = ((pbuffs ['Willenskraftklinge']) and (PsiPoints >= 2)) },
{ name = "Willenskraftklinge",               use = ((PsiPoints == 6) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Wahrnehmungsentzug",               use = ((EnergyBar1 >= 15) and (not tbuffs['Wahrnehmungsentzug'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Seelenpein",                       use = ((EnergyBar1 >= 15) and (not tbuffs['Seelenpein'])) },
{ name = "Flammenherzangriff",               use = ((PsiPoints < 5) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Seelenbrandstich",                 use = ((pbuffs ['Willenskraftklinge']) and (PsiPoints >= 1)) },
{ name = "Verwirrendes R\195\164tsel",       use = ((PsiPoints < 6) and (not pbuffs['Willenskraftklinge'])) },
{ name = "Herzsammelhieb",                   use = (true) },
{ name = "Psychische Pfeile",                use = ((PsiPoints < 6) and (not pbuffs['Willenskraftklinge'])) },
                    }
            end


Sorry for the german skillnames, I can translate them, when this is to confusing.
As you can see, I use three ingame macros for appropriate situations (single target (1), plus AoE (2) and for psi-point-building and using only (4).

My problem is more in using the Mage/Warlock class.


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
--Class: Mage/Warlock
            elseif mainClass == "MAGE" and subClass == "HARPSYN" then
                 
         if ((enemy) and (goat2 == "1")) then
            Skill2 = {
{ name = "Weakening Wave Curse",       use = ((EnergyBar1 >= 20) and (not tbuffs['Weakening Wave Curse'])) },
{ name = "Warp Charge",                use = ((EnergyBar2 >= 30) and (not tbuffs['Warp Charge'])) },
{ name = "Soul Pain",                  use = ((EnergyBar2 >= 15) and (not tbuffs['Soul Pain'])) },
{ name = "Lightning",                  use = (not tbuffs['Lightning']) },
{ name = "Fireball",                   use = (true) },
{ name = "Phoenix",                    use = (true) },
{ name = "Fire Lightning Burst",       use = (EnergyBar2 >= 25) },
{ name = "Plasma Arrow",               use = (not pbuffs['Charged']) },
{ name = "Electric Explosion",         use = ((pbuffs['Charged']) and (not pbuffs['Fire Spirit Pride II'])) },
{ name = "Flame",                      use = (pbuffs['Fire Spirit Pride II']) or (not pbuffs['Wind Spirit Pride II']))},
{ name = "Meteor Shower",              use = (EnergyBar2 < 25) },
                    }
	elseif ((enemy) and (goat2 == "2")) then
            Skill2 = {
{ name = "Warp Charge",                use = ((EnergyBar2 >= 30) and (not tbuffs['Warp Charge'])) },
{ name = "Soul Pain",                  use = ((EnergyBar2 >= 15) and (not tbuffs['Soul Pain'])) },
{ name = "Fireball",                   use = (true) },
{ name = "Fire Lightning Burst",       use = (EnergyBar2 >= 25) },
{ name = "Plasma Arrow",               use = (not pbuffs['Charged']) },
{ name = "Electric Explosion",         use = ((pbuffs['Charged']) and (not pbuffs['Fire Spirit Pride II'])) },
{ name = "Flame",                      use = (pbuffs['Fire Spirit Pride II']) or (not pbuffs['Wind Spirit Pride II']))},
{ name = "Meteor Shower",              use = (EnergyBar2 < 25) },
                     }
            end


Two ingame macros again: With AoE (1) and single target (2).
I have the problem to implement the buffs from the eliteskill "Elements of Pride" correctly. For better understanding, I have translate these skills^^ (Hope they are correct).
I want to use "Flame" when the buff "Fire Spirit Pride II" is active and when the buff "Wind Spirit Pride II" is not active. It seems to stuck at the skill "Electric Explosion" and the skill "Flame" (and "Meteor Shower") never go out. I think the problem is in the explanation for the 2 stacks of the buffs -> "Fire Spirit Pride II" and "Wind Spirit Pride II", but I have no idea to change that. Do You?
Where ist my mistake? What is wrong in my thinking? Do anyone have any ideas?

Thank you so far.
In best hope for a soon answer

Peryl

Intermediate

Posts: 313

Location: Elsewhere

  • Send private message

720

Tuesday, August 7th 2012, 3:49pm

Quoted from "BillTscherno;563299"

First: Thank you all for your help, specially to Peryl for developing DIYCE, great work.

Actually, I didn't develop DIYCE. That was originally created by Sixpax and DIYCE 2 was by Ghostwolf (and a modified version by mrmisterwaa). I just suggested some changes to the code, as well as some of the optimizations in there.

Quoted from "BillTscherno;563299"

I want to use "Flame" when the buff "Fire Spirit Pride II" is active and when the buff "Wind Spirit Pride II" is not active. It seems to stuck at the skill "Electric Explosion" and the skill "Flame" (and "Meteor Shower") never go out. I think the problem is in the explanation for the 2 stacks of the buffs -> "Fire Spirit Pride II" and "Wind Spirit Pride II", but I have no idea to change that.


First, there's a bit of a problem with the logic for the "Flame" skill. You want to change the or in the use clause to and

Source code

1
{ name = "Flame",                      use = (pbuffs['Fire Spirit Pride II']) and (not pbuffs['Wind Spirit Pride II']))},

Also, make sure that "Fire Spirit Pride II" and "Wind Spirit Pride II" are player buffs. If they are supposed to be debuffs on the target, you'll need to change pbuffs to tbuffs. If you are unclear as to why this is needed, I suggest going over my guide on Lua logic operators.

As for it not getting past "Electric Explosion", it could simply be that other skills in the list are coming off cooldown before DIYCE has a chance to process skills further down the list. Remember, the skill list is a priority list not a sequence. That means that as soon as something earlier in the list is available for use, it will be used and will stop the use of skills further down the list.

To check if this is happening, try giving one of the debug parameters to the KillSequence function in your macro. If you set the first parameter to "debugskills", it will show you the list of skills and the true/false state of the use clause as DIYCE sees it. If there is always an entry with a use clause of true before those skills it never seems to trigger, then that is likely what is going on. You'll then need to re-arrange your list so that they can trigger when needed (may also need to change the use clause in those cases).

Another thing that may happen is that DIYCE sometimes has trouble with some of the buff/debuff names since there can sometimes be more than one buff with the same name. You can try using the buff ID instead of the name. To find out what the ID is for a given buff/debuff. Call the KillSequence function with the first parameter as "debugpbuffs" when you have that buff and it will show you the buff names and IDs. To get the target debuff IDs, set that first parameter to "debugtbuffs". When using buff IDs, do not put the ID in quotes, use the number directly (example: if your buff ID was 500123, then your pbuffs line becomes pbuffs[500123])
2013... The year from hell....