Quoted from "pazuzzu;482475"
awesome job ghost/peryl/ and even sekritnub...my latency timer returns like 0.0. very fast script :p
everything working great but i have a weird issue...i cant kite with it on scout like diyce 1.0. keeps saying must face target and wont fire skills...took out auto target and still same issue. no idea :/ ?
Location: Dominating in 3vs3, 6vs6 and siege.
Occupation: Network Administrator for a local NBC T.V. station.
Quoted from "ItIsFinished22;482554"
For those that have made the switchover to 2.0, have you noticed an improvement in the speed that skills are being set off? Or maybe a DPS increase? I'm thinking of trying out this version of DIYCE but would like some thoughts on it from other users. Thanks guys and nice work Ghostwolf.
Quoted from "lordmohg;482510"
Ghost or Peryl, have you had a chance to take a look at my code to find out why diyce won't run while i am in a group? I have scoured both the diyce and custom functions only a few specific places call for group locals. But I can't see any reason why they work solo and don't work grouped. My post was #152 with full code posts.
|
|
Source code |
1 |
/run if PriestFairySequence("v1") then return; elseif BuffParty(14) then return; elseif PartyHealer.Main() then return; elseif KillSequence("v1",11,12) then return; end
|
Quoted from "mrmisterwaa;482523"
One thing I did notice, Peryl:
/run KillSequence("debugall","1")
("1" = my arg2 btw).
I don't get the target's buffs.
When I use debugtbuffs as the arg1, it gives it to me.
Weird. >.>
Quoted from "lordmohg;482510"
Ghost or Peryl, have you had a chance to take a look at my code to find out why diyce won't run while i am in a group? I have scoured both the diyce and custom functions only a few specific places call for group locals. But I can't see any reason why they work solo and don't work grouped. My post was #152 with full code posts.
Quoted from "lordmohg;482648"
update: i took buffparty out of macro and its working as intended again. something is amiss with buff party. have to look at it in detail later. but at least narrowed it down to buffparty.
Quoted from "Peryl;482638"
I'm not really sure what is going on here (I'm assuming you are running the code you posted in your sig)but I'd like you to test a little theory that popped into my head.
DIYCE 2.0 uses a frame to catch events (specifically to know when to re-read the player skills when leveling up, changing classes, etc). One thing about frames is that it uses variables called arg1, arg2, ..., arg9. Now it shouldn't be a problem, but I'm wondering if there is some kind of interference going on with your use of arg1 and arg2 as parameters (if this is the case, then it could affect all DIYCE 2.0 code).
So the test is simply change the name of the arguments to something else (say param1, param2). Of course, you'd need to change the references to those variables in KillSequence() as well. If things start to work after this change, then we found the problem.
Again though, this is merely speculation on my part and I'm not really confident it will work (more like grasping at straws).
|
|
Source code |
1 |
[string '?']:23: attempt to concatenate field 'time' (a nil value) |
Quoted from "mrmisterwaa;482666"
I changed arg2 -> goat2
Tested and still the same problem.
So I doubt it's a conflict problem.
Quoted from "mrmisterwaa;482666"
Weird error I have never gotten though:
![]()
Source code
1 [string '?']:23: attempt to concatenate field 'time' (a nil value)
This is a brand-new error that never appeared until I updated to DIYCE 2.2 (today)
|
|
Source code |
1 2 3 4 |
-- Ad to list by name
list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining or 0, id = ID }
-- We also list by ID in case two different buffs/debuffs have the same name.
list[ID] = {stack = stackSize, time = timeRemaining or 0, name = buff:gsub("(%()(.)(%))", "%2") }
|
Quoted from "karol891;482283"
Sadly there is no clue/hint , action bar only showing skill's cooldown which is 4sec for Decay.
|
|
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 |
function BuffParty(arg1,arg2)
-- arg1 = Quickbar slot # for targetable, instant-cast buff without a cooldown (eg. Amp Attack) for range checking.
-- arg2 = buff expiration time cutoff (in seconds) for refreshing buffs, default is 45 seconds.
local selfbuffs = { "Soul Bond", "Enhanced Armor", "Holy Seal" }
local groupbuffs = { "Grace of Life", "Amplified Attack", "Angel's Blessing", "Essence of Magic", "Magic Barrier", "Blessed Spring Water", "Fire Ward", "Savage Blessing", "Concentration Prayer", "Shadow Fury" }
local othersbuffs = { "Holy Protection" }
local buffrefresh = arg2 or 45 -- Refresh buff time (seconds)
local spell = UnitCastingTime("player") -- Spell being cast?
local vocal = IsShiftKeyDown() -- Generate feedback if Shift key held
if (spell ~= nil) then
return
end
if vocal then Msg("- Checking self buffs on "..UnitName("player")) end
for i,buff in ipairs(selfbuffs) do
if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("player",buff) <= buffrefresh) then
if vocal then Msg("- Casting "..buff.." on "..UnitName("player")) end
TargetUnit("player")
CastSpellByName(buff)
return
end
end
if vocal then Msg("- Checking group buffs on "..UnitName("player")) end
for i,buff in ipairs(groupbuffs) do
if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("player",buff) <= buffrefresh) then
if vocal then Msg("- Casting "..buff.." on "..UnitName("player")) end
TargetUnit("player")
CastSpellByName(buff)
return
end
end
for num=1,GetNumPartyMembers()-1 do
TargetUnit("party"..num)
if GetActionUsable(arg1) and (UnitHealth("party"..num) > 0) then
if vocal then Msg("- Checking group buffs on "..UnitName("party"..num)) end
for i,buff in ipairs(groupbuffs) do
if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("target",buff) <= buffrefresh) then
if UnitIsUnit("target","party"..num) then
if vocal then Msg("- Casting "..buff.." on "..UnitName("target")) end
CastSpellByName(buff)
return
else
if vocal then Msg("- Error: "..UnitName("target").." != "..UnitName("party"..num)) end
end
end
end
-- if vocal then Msg("- Checking others buffs on "..UnitName("party"..num)) end
-- for i,buff in ipairs(othersbuffs) do
-- if (g_skill[buff] ~= nil) and CD(buff) and (BuffTimeLeft("target", buff) <= buffrefresh) then
-- if UnitIsUnit("target","party"..num) then
-- if vocal then Msg("- Casting "..buff.." on "..UnitName("target")) end
-- CastSpellByName(buff)
-- return
-- else
-- if vocal then Msg("- Error: "..UnitName("target").." != "..UnitName("party"..num)) end
-- end
-- end
-- end
else
if vocal then Msg("- Player "..UnitName("party"..num).." out of range or dead.") end
end
end
if vocal then Msg("- Nothing to do.") end
end
|
Quoted from "Peryl;482677"
Yeah, didn't really think it would be, but had to test it just in case.
Hmmmm... didn't think the game would return a nil value for some buffs/debuffs. Guess it does.
To fix, change the following lines in the BuffList() function in DIYCE.lua
All I did here is added or 0 where I use timeRemaining.
![]()
Source code
1 2 3 4-- Ad to list by name list[buff:gsub('(%()(.)(%))', '%2')] = { stack = stackSize, time = timeRemaining or 0, id = ID } -- We also list by ID in case two different buffs/debuffs have the same name. list[ID] = {stack = stackSize, time = timeRemaining or 0, name = buff:gsub("(%()(.)(%))", "%2") }
|
|
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 |
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, 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 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
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: Warrior/Mage
if mainClass == "WARRIOR" and subClass == "THIEF" then
local SurpriseAttack = GetActionUsable(14)
--Potions and Buffs
Skill = {
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Survival Instinct", use = (phealth <= .40) and combat },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
}
--Combat
if enemy then
Skill2 = {
{ name = "Enraged", use = (EnergyBar1 <= 30) and (boss or elite) },
{ name = "Slash", use = ( not tbuffs[500081]) and(EnergyBar1 >= 25) },
{ name = "Probing Attack", use = ( not tbuffs[501502]) and (EnergyBar1 >= 20) },
{ name = "Open Flank", use = ( tbuffs[501502]) and (not tbuffs[503161]) and(EnergyBar1 >= 10) },
{ name = "Keen Attack", use = ( tbuffs[501502]) and(EnergyBar2 >= 20) },
{ name = "Splitting Chop", use = ( tbuffs[501503]) and (EnergyBar1 >= 15) },
{ name = "Tactical Attack", use = ( tbuffs[500081]) and (EnergyBar1 >= 15) },
{ name = "Blood Dance", use = (phealth >= .70) and combat },
{ name = "Shadowstab", use = (EnergyBar2 >= 20) },
{ name = "Attack", use = (thealth == 1) },
}
end
--Class: Knight/Scout
elseif mainClass == "KNIGHT" and subClass == "RANGER" then
--Potions and Buffs
Skill = {
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
{ name = "Resolution", use = (phealth <= .30) and combat },
}
--Combat
if enemy then
Skill2 = {
-- Use Throat Attack on detect enemy spell cast.
{ name = "Throat Attack", use = (melee and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and pctEB1 >= 15) },
{ name = "Schock", use = (silenceThis) },
{ 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 = "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 = "Charge", use = (combat and (tspell ~= nil)) or (not melee and not tbuffs['Charge']) }, -- charge spellcasters
{ name = "Whirlwind Shield", use = (CD("Whirlwind Shield") and (EnergyBar1 >= 189)) },
{ name = "Holy Strike", use = (EnergyBar1 >= 145 ) and not tbuffs['Light Seal III'] },
}
--Combat & arrow
if enemy and (mode == "arrow") then
Skill2 = {
{ name = "Vampire Arrows", use = (CD("Vampire Arrows")) },
{ name = "Sacred Resistance", use = (CD("Sacred Resistance")) },
{ name = "Shot", use = (CD("Shot")) },
}
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
|
- S/K VN and GCH tanking complete 
|
|
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 |
--Class: Knight/Scout
elseif mainClass == "KNIGHT" and subClass == "RANGER" then
--Potions and Buffs
Skill = {
{ name = "Action: "..healthpot, use = (phealth <= .70) },
{ name = "Action: "..manapot, use = (pctEB2 <= .40) },
{ name = "Resolution", use = (phealth <= .30) and combat },
}
--Combat
if enemy then
if (mode == "arrow") then --set mode to "arrow" in a seperate macro to call the ranged spells, otherwise it will go right to the melee spells (this is how mode is meant to work).
Skill2 = {
{ name = "Vampire Arrows", use = true },
{ name = "Sacred Resistance", use = true },
{ name = "Shot", use = true },
}
else
Skill2 = {
-- Use Throat Attack on detect enemy spell cast.
{ name = "Throat Attack", use = (melee and (silenceThis) and pctEB1 >= 15) },
{ name = "Schock", use = (silenceThis) },
{ 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 = "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 = "Charge", use = (combat and (tspell ~= nil)) or (not melee and not tbuffs['Charge']) }, -- charge spellcasters
{ name = "Whirlwind Shield", use = (EnergyBar1 >= 189) },
{ name = "Holy Strike", use = (EnergyBar1 >= 145 ) and not tbuffs['Light Seal III'] },
}
end
|