Quoted from "ghostwolf82;480137"
...The change made to your Low Blow line is a subtle one, but should work for what you ask for. If (a and b) are both true, OR if c is true, then do not cast Low Blow. Which in this case if you have ET then LB...
Actually, as i read it again, I realize there is still going to be an error... it should be
Which would make you use LB if you do not have ET, however if you have ET buff, then skip LB. Sorry for the missing 'not' before. Can't believe I missed that.
![]()
Source code
1 (not pbuffs['Energy Thief'])
|
|
Source code |
1 |
{ name = "Low Blow", use = (EnergyBar1 >= 25) and ((tbuffs[620313] and not tbuffs[500704]) or not pbuffs['Energy Thief']) },
|
|
|
Source code |
1 |
use = (Energy >= 25) and (A and not B) or (not C) |
Quoted from "abshard;480162"
I got this new version working but i have 1 question. How do i disable targeting the nearest enemy? Its gonna cause me to wipe a party because im not used to it.
|
|
Source code |
1 2 3 4 5 6 7 8 9 |
--Select Next Enemy
if (tDead) then
TargetUnit("")
TargetNearestEnemy()
return
elseif (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
--Select Next Enemy
--[[
if (tDead) then
TargetUnit('')
TargetNearestEnemy()
return
elseif (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
--]]
|
|
|
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 |
function KnightRogue(arg1, arg2)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local gotShield = (GetEquipSlotInfo(17) == "Shield")
i=i+1; Skill[i] = { name = "Holy Shield", use = (not string.find(pbuffs, "Holy Shield") and (PctH("player") <= .30)) }
i=i+1; Skill[i] = { name = "Shield of Valor", use = (not string.find(pbuffs, "Holy Shield") and (PctH("player") <= .30)) }
i=i+1; Skill[i] = { name = "Leopard Instinct", use = (not string.find(pbuffs, "Leopard Instinct") and (PctH("player") <= .35)) }
i=i+1; Skill[i] = { name = "Crazy Blades", use = (not string.find(pbuffs, "Crazy Blades")) }
i=i+1; Skill[i] = { name = "Enhanced Armor", use = (not string.find(pbuffs, "Enhanced Armor")) }
i=i+1; Skill[i] = { name = "Holy Seal", use = (not string.find(pbuffs, "Holy Seal")) }
i=i+1; Skill[i] = { name = "Resolution", use = (not string.find(pbuffs, "Resolution")) }
i=i+1; Skill[i] = { name = "Whirlwind Shield", use = ((not friendly) and gotShield) }
i=i+1; Skill[i] = { name = "Shield of Atonement", use = ((not friendly) and gotShield) }
i=i+1; Skill[i] = { name = "Threaten", use = (string.find(tbuffs, "Holy Seals 3") and (not string.find(pbuffs, "Threaten")) and (arg2 == "threaten")) }
i=i+1; Skill[i] = { name = "Hatred Strike", use = (not string.find(pbuffs, "Hatred Strike")) }
i=i+1; Skill[i] = { name = "Mana Return", use = (string.find(tbuffs, "Holy Seals 3")) }
i=i+1; Skill[i] = { name = "Holy Strike", use = (not friendly) }
MyCombat(Skill, arg1)
end
|
|
|
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 |
if mainClass == "KNIGHT" and subClass == "THIEF" then
local SurpriseAttack = GetActionUsable(14)
--Potions and Buffs
Skill = {
{ name = "Holy Shield", use = (phealth <= .30) },
{ name = "Shield of Valor", use = (phealth <= .30) },
{ name = "Leoard Instinct", use = (phealth <= .35) },
{ name = "Crazy Blades", use = },
{ name = "Enhanced Armor", use = },
{ name = "Holy Seal", use = },
{ name = "Resolution"", use = },
}
--Combat
if enemy then
Skill2 = {
{ name = "Whirlwind Shield", use = },
{ name = "Shield of Atonement", use = },
{ name = "Threaten", use = },
{ name = "Hatred Strike", use = },
{ name = "Mana Return", use = },
{ name = "Holy Strike", use = },
}
end
|
Quoted from "CharlieBananas;480173"
So for v1, if my function was this...
...snip...
I took a swing at it and got what I know what I'm doing...what is the "translation" for the rest of it, if you don't mind. Maybe if I wasn't still up at 8:46 I'd know how to do it, hm...
|
|
Source code |
1 |
string.find(tbuffs, "Holy Seals 3") |
|
|
Source code |
1 |
tbuffs['Holy Seals 3'] |
|
|
Source code |
1 |
tbuffs[500740] |
|
|
Source code |
1 2 |
tbuffs['Holy Seals 3'].time -- Time remaining on buff/debuff tbuffs['Holy Seals 3'].stack -- Stack size of buff/debuff |

Quoted from "abshard;480162"
I got this new version working but i have 1 question. How do i disable targeting the nearest enemy? Its gonna cause me to wipe a party because im not used to it.
|
|
Source code |
1 2 3 4 5 6 7 8 9 |
--Select Next Enemy
if (tDead) then
TargetUnit("")
TargetNearestEnemy()
return
elseif (not LockedOn) or (not enemy) then
TargetNearestEnemy()
return
end
|

Quoted from "Peryl;480168"
Lua gives priority to the and operator (and statements are evaluated before or statements). Lua also uses short-circuited logic meaning that as soon as the result of the logic operation can be determined, the rest of the logic statement is skipped. These facts have to be kept in mind or you end up with something that wasn't intended.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
if enemy then
Skill[1] = { name = "Vampire Arrows", use = CD("Vampire Arrows") }
if not Skill[1].use then
Skill[1] = { name = "Autoshot", use = (not ASon) }
if not Skill[1].use then
Skill[1] = { name = "Combo Shot", use = CD("Combo Shot") }
if not Skill[1].use then
Skill[1] = { name = "Reflected Shot", use = (CD("Reflected Shot")) }
if not Skill[1].use then
Skill[1] = { name = "Piercing Arrow", use = (CD("Piercing Arrow")) }
if not Skill[1].use then
Skill[1] = { name = "Wind Arrows", use = (CD("Wind Arrows")) and (focus >= 35) }
if not Skill[1].use then
Skill[1] = { name = "Shot", use = (CD("Shot")) }
|
|
|
Source code |
1 2 3 4 5 6 7 |
Skill[1] = { name = "Reflected Shot", use = (CD("Reflected Shot")) }
if not Skill[1].use then
Skill[1] = { name = "Piercing Arrow", use = (CD("Piercing Arrow")) }
if not Skill[1].use then
Skill[1] = { name = "Vampire Arrows", use = (CD("Vampire Arrows")) }
if not Skill[1].use then
Skill[1] = { name = "Wind Arrows", use = (CD("Wind Arrows")) }
|
|
|
Source code |
1 |
/run ScoutKnightDps("v2")
|
|
|
Source code |
1 |
/run ScoutKnightFarm("v2")
|
|
|
Source code |
1 |
function KillSequence(arg1, [b]mode[/b]) |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
-- Class: Scout/Knight
if mainClass == "RANGER" and subClass == "KNIGHT" then
--Combat
if enemy and (mode == "DPS") then
Skill2 = {
{ name = "Vampire Arrows", use = CD("Vampire Arrows") },
{ name = "Autoshot", use = (not ASon) },
{ name = "Combo Shot", use = CD("Combo Shot") },
{ name = "Reflected Shot", use = (CD("Reflected Shot")) },
{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) },
{ name = "Wind Arrows", use = (CD("Wind Arrows")) and (EnergyBar1 >= 35) },
{ name = "Shot", use = (CD("Shot")) }
}
elseif enemy and (mode == "farm") then
Skill2 = {
{ name = "Reflected Shot", use = (CD("Reflected Shot")) },
{ name = "Piercing Arrow", use = (CD("Piercing Arrow")) },
{ name = "Vampire Arrows", use = CD("Vampire Arrows") },
{ name = "Wind Arrows", use = (CD("Wind Arrows")) and (EnergyBar1 >= 35) }
}
end
|
|
|
Source code |
1 |
/run KillSequence("", "DPS")
|
|
|
Source code |
1 |
/run KillSequence("", "farm")
|

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
elseif mainClass == "THIEF" and subClass == "RANGER" then
Skill = {
{ name = "Combat Master", use = ((not pbuffs['Combat Master')) }
{ name = 'Action: 62', use = ((not pbuffs['Yawaka's Blessing')) }
{ name = 'Action: 69', use = ((not pbuffs['Unbridled Enthusiasm')) } -- Speed Potion
{ name = 'Poison', use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45)) },
}
if enemy then
Skill2 = {
{ name = "Wound Attack", use = (EnergyBar1 >= 35 and (tbuffs[620313] and tbuffs[500704])) },
{ name = "Blind Spot", use = (EnergyBar1 >= 20) and boss and behind and (pbuffs['Energy Thief'] or pbuffs['Premeditation']) },
{ name = "Shadowstab", use = (EnergyBar1 >= 20) and (not tbuffs[620313]) },
{ name = "Low Blow", use = (EnergyBar1 >= 25) and (tbuffs[620313]) and ((not tbuffs[500704]) or pbuffs['Energy Thief']) },
{ name = "Vampire Arrows", use = (thealth > 1) },
{ name = "Shot", use = (not EnergyBar1 >= 20) },
{ name = "Wrist Attack", use = (EnergyBar2 >= 50) and boss },
{ name = "Throat Attack", use = (EnergyBar2 >= 50) and (boss or elite) and silenceThis },
}
end
|
Feedback is always a good thing, even when the results are not what you had planned on.
Quoted from "ghostwolf82;480244"
That all seems to be correct. I am going on 30+ hrs of no sleep right now though, so to know for sure, go give it a test run and see what happens. That will be the true measure of what you have coded thus far. If it works let us know, if it doesn't, also let us knowFeedback is always a good thing, even when the results are not what you had planned on.
The DIYCE community needs your brain cells. We'll hold down the fort in the meantime.
Quoted from "mrmisterwaa;480242"
@Peryl & Ghostwolf,
Ok,
So in other words if I were to assign (some sort of priority in my list), I should do the following to my code.
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21elseif mainClass == "THIEF" and subClass == "RANGER" then Skill = { { name = "Combat Master", use = ((not pbuffs['Combat Master')) } { name = 'Action: 62', use = ((not pbuffs['Yawaka's Blessing')) } { name = 'Action: 69', use = ((not pbuffs['Unbridled Enthusiasm')) } -- Speed Potion { name = 'Poison', use = ((not pbuffs['Poisonous']) or (pbuffs['Poisonous'].time <= 45)) }, } if enemy then Skill2 = { { name = "Wound Attack", use = (EnergyBar1 >= 35 and (tbuffs[620313] and tbuffs[500704])) }, { name = "Blind Spot", use = (EnergyBar1 >= 20) and boss and behind and (pbuffs['Energy Thief'] or pbuffs['Premeditation']) }, { name = "Shadowstab", use = (EnergyBar1 >= 20) and (not tbuffs[620313]) }, { name = "Low Blow", use = (EnergyBar1 >= 25) and (tbuffs[620313]) and ((not tbuffs[500704]) or pbuffs['Energy Thief']) }, { name = "Vampire Arrows", use = (thealth > 1) }, { name = "Shot", use = (not EnergyBar1 >= 20) }, { name = "Wrist Attack", use = (EnergyBar2 >= 50) and boss }, { name = "Throat Attack", use = (EnergyBar2 >= 50) and (boss or elite) and silenceThis }, } end
Right now this is the way I want it to work.
Wound Attack will cast only when Shadowstab & Low Blow bleeds are up (which should be 100% of the time), Otherwise it will cast Shadowstab to maintain the bleed and will also cast Low Blow to maintain that bleed too.
Now during Burn, I have Energy Thief up, I want to spam Low Blow (very large amount of DPS since Shadowstab should only be maintained for bleed + Wound Attack will have priority over Low Blow.)
So right now, from what I understand from the operators from the LUA.
Wound Attack is only cast when Bleed + Grevious Bleed is up + Energy is above 35
Blind Spot will only cast when (Energy Thief is up or Premed is on) + Behind Target + Above 20 Energy + Boss
Shadowstab will only cast when Bleed is not on target.
Low Blow will only cast when Energy is above 25 + Shadowstab Bleed is on Target + (Energy Thief or Grevious Wound is not up).
Everything past this point is simple.
I just wanted to ensure that Wound Attack is #1 priority.
Low Blow is spammed during Burn.
Btw, I somewhat understood what you said about the operators.
That is why I put the not Grevious Wound & Energy Thief together since they are pretty much the only two reasons to cast Low Blow. If the Bleed wasn't up or I needed to spam it for burns.
Please let me know if I misunderstood anything. I am 99% sure I missed something.

Quoted from "mrmisterwaa;480242"
@Peryl & Ghostwolf,
Ok,
So in other words if I were to assign (some sort of priority in my list), I should do the following to my code.
...snip...
So right now, from what I understand from the operators from the LUA.
Wound Attack is only cast when Bleed + Grevious Bleed is up + Energy is above 35
Blind Spot will only cast when (Energy Thief is up or Premed is on) + Behind Target + Above 20 Energy + Boss
Shadowstab will only cast when Bleed is not on target.
Low Blow will only cast when Energy is above 25 + Shadowstab Bleed is on Target + (Energy Thief or Grevious Wound is not up).
Everything past this point is simple.
I just wanted to ensure that Wound Attack is #1 priority.
Low Blow is spammed during Burn.
Quoted from "mrmisterwaa;480242"
Btw, I somewhat understood what you said about the operators.
That is why I put the not Grevious Wound & Energy Thief together since they are pretty much the only two reasons to cast Low Blow. If the Bleed wasn't up or I needed to spam it for burns.
Please let me know if I misunderstood anything. I am 99% sure I missed something.
|
|
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 |
-- Class: Knight/Priest
elseif mainClass == "KNIGHT" and subClass == "AUGUR" then
--Potions and Buffs
Skill = {
{ name = "Regenerate", use = ((phealth <= .90) and (pctEB1 >= .05) and (not pbuffs['Regenerate'])) },
{ name = "Action: "..healthpot, use = (phealth <= .40) },
{ name = "Action: "..manapot, use = (pctEB1 <= .50) },
{ name = "Magic Barrier", use = (pctEB1 >= .05 and (not pbuffs['Magic Barrier'])) },
{ name = "Holy Seal", use = (pctEB1 >= .05 and (not pbuffs['Holy Seal'])) },
{ name = "Enhanced Armor", use = (pctEB1 >= .05 and (not pbuffs['Enhanced Armor'])) },
{ name = "Blessed Spring Water", use = (pctEB1 >= .05 and (not pbuffs['Blessed Spring Water'])) },
-- Heals
{ name = "Holy Shield", use = (phealth <= .20) },
{ name = "Holy Illumination", use = (combat and phealth <= .75 and (not pbuffs['Holy Illumination'])) },
{ name = "Holy Aura", use = (phealth <= .30) },
{ name = "Resolution", use = (combat and phealth <= .65) },
{ name = "Urgent Heal", use = (phealth <= .65) },
{ name = "Regenerate", use = (phealth <= .90 and (not pbuffs['Regenerate'])) },
}
-- Combat
-- Shield Attacks
if enemy then
Skill2 = {
{ name = "Shield of Valor", use = (enemy and phealth <= .8 and shield) },
{ name = "Shield of Discipline", use = (silenceThis and shield) },
{ name = "Shield of Atonement", use = (enemy and combat and shield and (not tbuffs['Restrained'])) },
-- Other Attacks
{ name = "Rising Tide", use = (not melee and thealth >= .99) }, -- To Pull with
{ name = "Mana Return", use = (pctEB1 <= .7 and tbuffs['Holy Seals 3']) },
{ name = "Threaten", use = (tbuffs['Holy Seals 3'] and not tbuffs['Threaten']) },
{ name = "Punishment", use = (tbuffs['Light Seal III']) },
{ name = "Hatred Strike", use = (combat and party) },-- Agro Multiplier if in party only
{ name = "Disarmament", use = (UnitLevel("target") >= (UnitLevel("player") - 10) and (boss or elite) and ((not tbuffs['Disarmament IV']) or (tbuffs['Disarmament IV'].time <= 2))) }, -- stack to 4
{ name = "Whirlwind Shield", use = (shield and pctEB1 >= .2) },
{ name = "Charge", use = ((combat and (tspell ~= nil)) or (not melee and not tbuffs['Charge'])) }, -- charge spellcasters
{ name = "Holy Light's Fury", use = (pctEB1 >= .2 and not tbuffs['Holy Light's Fury']) }, -- Knight/Priest 15 Elite
{ name = "Holy Smite", use = (pctEB1 >= .2 and tbuffs['Holy Light's Fury']) }, -- Knight/Priest 20 Elite
{ name = "Holy Strike", use = (pctEB1 >= .2 and not tbuffs['Light Seal III']) }
}
end
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Class: Scout/Warden
if mainClass == "RANGER" and subClass == "WARDEN" then
--Combat
if enemy then
Skill2 = {
{ name = "Automatyczny Strzał", use = boss and elite and (not ASon) },
{ name = "Ukryte Niebezpieczeństwo", use = (CD("Ukryte Niebezpieczeństwo")) },
{ name = "Przycelowanie", use = (pbuffs['Ukryte Niebezpieczeństwo'].time <= 45) },
{ name = "Wampiryczne Strzały", use = (pbuffs['Strzała Esencji'].time <= 45) },
{ name = "Ciernista Strzała", use = (CD("Ciernista Strzała")) },
{ name = "Salwa", use = (CD("Salwa")) },
{ name = "Odbity Strzał", use = (CD("Odbity Strzał")) },
{ name = "Przebijająca Strzała", use = (CD("Przebijająca Strzała")) },
{ name = "Strzał", use = ((ChkBuff("player","Graj na Lutni")) and (ChkBuff("player","Strzała Esencji"))) }
{ name = "Naładowane Cięcie", use = (CD("Naładowane Cięcie")) },
}
end
|
Quoted from "pazuzzu;480281"
all functions are called by the same macro...thats the elegance
stupid question: how is the action slot of autshot called now? i couldnt remember my password to my scout and locked myself out...so cant test and play around![]()
|
|
Source code |
1 |
local a1,a2,a3,a4,a5,ASon = GetActionInfo(4) -- # is your Autoshot slot number |
Quoted from "lordmohg;480344"
Changing from DIYCE 1.4 to the new 2.o method and i am having some issues. It took me some time to figure it out but fot the most part i like the changes. However, it is not processing Mana Return at all. could you take a look?
And whats the difference in Skill { and Skill2{ usage?
do i have the self heals in the right spot?
|
|
Source code |
1 |
{ name = "Mana Return", use = (pctEB1 <= .7) and (tbuffs['Holy Seals 3']) },
|
Quoted from "Skodziro;480467"
Why this function does not want work at all. Do not use this skill Ciernista Strzała.
|
|
Source code |
1 |
{ name = "Ciernista Strzała", use = true },
|
Quoted from "lordmohg;480470"
You need to ad else to the if statement ?
![]()
Source code
1 Class: Scout/Warden [B]ESLE[/B]if mainClass == "RANGER" and subClass == "WARDEN" then