Quoted from "mrmarc0001;287028"
Ah, that's unfortunate indeed. Perhaps something that can be added in the next version of DIYCE?![]()
Quoted from "mrmarc0001;287028"
Regarding BuffTimeLeft(), is there a reason to use the "Action" definition instead of the skillname, or is it interchangeable?
Quoted from "Sixpax;287092"
It's possible, but it wouldn't be very eloquent since...There are problems... for instance, what do you do when step #2 isn't ready when its supposed to fire?
)
Quoted
Feel free to use either. I used "Action" because that's what was in the code of the person I was responding to.
Quoted from "mrmarc0001;287122"
(although, I will add that BuffTimeLeft() might make a good addition to core in the next version)
Quoted from "mrmarc0001;287122"
In fact, I personally feel there should be limitations to what DIYCE can do, mainly for performance reasons.
is there a way to make the combo button like a rage skill button, i mean to be red when is not enough rage and normal when there is a specific amount of rage.
Quoted from "hangman04;287174"
I made a simple macro...I copied from my topic, lazy guyK, so...
Quoted from "Sixpax;287149"
I have that on the list of things I'm putting together for the next release. Adding functions like that isn't a problem because it just gives the user more utility rather than having to change the design of the engine itself. If they don't use the function, it doesn't affect them at all.
Quoted from "Sixpax;287149"
I couldn't agree more.
Quoted from "Sixpax;286830"
I'm not sure this will work, so you'll have to test it...

|
|
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 |
function MageSF(arg1,arg2)
local Skill = {}
local i = 0
local enemy = UnitCanAttack("player", "target")
local combat = GetPlayerCombatState()
local pBuffs = BuffList("player")
local tBuffs = BuffList("target")
local isCharged = string.find(pBuffs, "Charged")
local isChargedSF = string.find(pBuffs, "Static Field Charge")
--local stunList = ""
--local tSpell,tTime,tElapsed = UnitCastingTime("target")
local pSpell,pTime,pElapsed = UnitCastingTime("player")
local inParty = UnitInParty("player");
--local inRaid = UnitInRaid("player");
if (enemy) then
i=i+1; Skill[i] = { name = "Static Field", use = (isChargedSF and (not isCharged)) }
i=i+1; Skill[i] = { name = "Electric Compression", use = (isCharged and (not isChargedSF)) }
i=i+1; Skill[i] = { name = "Lightning", use = (isCharged) }
i=i+1; Skill[i] = { name = "Plasma Arrow", use = ((not isCharged) and (not isChargedSF)) }
end
MyCombat(Skill,arg1)
if (pSpell == "Static Field") then
if inParty then
SendChatMessage("Stuffing " .. UnitName("target") .. " Stay clear.", "PARTY")
else
SendChatMessage("Stuffing " .. UnitName("target") .. " Stay clear.","SAY")
end
end
end
|
Quoted from "mrmarc0001;287180"
As our functions grow in size and number, what's to be looked out for as far as performance goes? Is it DIYCE's size or the custom function's size/complexity that will have greater impact on performance?
I never noticed until recently, but when using my DIYCE function, I can't throw a Fireball right after Flame as fast as I "normally" could. The difference is maybe 1/3-1/2 of a second, but it's noticeable when compared to manually firing the two spells. Now that I think about it, I should test it out using a simple DIYCE function compared to my actual one.
Know of any debugging tools that could probably be used in-game (or side-by-side) to monitor performance, perhaps?
Quoted from "delve;287374"
...LUA will short circuit conditionals.
Quoted from "hangman04;287174"
K, so...
function WarriorWarden(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local rage = UnitSkill("player")
local friendly = (not UnitCanAttack("player", "target"))
local tbuffs = BuffList("target")
i=i+1; Skill = { name = "Enraged", use = (rage <= 25) }
i=i+1; Skill[i] = { name = "Slash", use = ((not friendly) and (rage >= 25)) }
i=i+1; Skill[i] = { name = "Power of the Wind Spirit", use = (not friendly) and (mana >= 130) }
i=i+1; Skill[i] = { name = "Tactical Attack", use = ((not friendly) and (rage >= 15) and string.find(tbuffs, "Bleed")) }
MyCombat(Skill,arg1)
end
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
function WarriorWarden(arg1)
local Skill = {}
local i = 0
local rage = UnitMana("player")
local mana = UnitSkill("player")
local friendly = (not UnitCanAttack("player", "target"))
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { name = "Enraged", use = (rage <= 25) }
i=i+1; Skill[i] = { name = "Tactical Attack", use = ((not friendly) and (rage >= 15) and string.find(tbuffs, "Bleed")) }
i=i+1; Skill[i] = { name = "Slash", use = ((not friendly) and (rage >= 25)) }
i=i+1; Skill[i] = { name = "Power of the Wood Spirit", use = ((not friendly) and (mana >= 130)) }
MyCombat(Skill,arg1)
end
|
Quoted from "mrmarc0001;287481"
|
|
Source code |
1 2 3 4 5 6 7 |
if (UnitCastingTime("player") == "Static Field") then
if inParty then
SendChatMessage("Stuffing " .. UnitName("target") .. " Stay clear.", "PARTY")
else
SendChatMessage("Stuffing " .. UnitName("target") .. " Stay clear.", "SAY")
end
end
|
Quoted from "mrmarc0001;287180"
I never noticed until recently, but when using my DIYCE function, I can't throw a Fireball right after Flame as fast as I "normally" could. The difference is maybe 1/3-1/2 of a second, but it's noticeable when compared to manually firing the two spells. Now that I think about it, I should test it out using a simple DIYCE function compared to my actual one.
Know of any debugging tools that could probably be used in-game (or side-by-side) to monitor performance, perhaps?
Quoted from "delve;287374"
Primarily I would think
1)Size and complexity of the MyCombat() function
2)Size and complexity of (especially the number of secondary function calls within) the custom function.
#2 is what each user mostly has control of, and ideally you'd want to put as few use[] lines as possible in, using separate functions for situational uses like CC where possible rather than using parameter controls (var2). Just my off the cuff analysis though, ymmv. Basically the parser runs through every line of your custom script at each execution, so the shorter it is and the fewer function calls within it the better your performance. You can also tweak them by putting the most commonly false factor of the conditional statement first, since LUA will short circuit conditionals.
As for MyCombat() I expect Six will make every effort to keep it clean and efficient since it pretty much drives everything, and he's very good at this. The number of helper functions included (pctHP() et al) shouldn't matter as they're only executed when called from the custom script and MyCombat().
|
|
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 |
function PriestMage(arg1)
local Skill = {}
local i = 0
local health
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
if (not combat) then
i=i+1; Skill[i] = { name = "Blessed Spring Water", use = (not string.find(pbuffs, "Blessed Spring Water")) }
i=i+1; Skill[i] = { name = "Magic Barrier", use = (not string.find(pbuffs, "Magic Barrier")) }
end
if friendly then
health = PctH("target")
i=i+1; Skill[i] = { name = "Regenerate", use = ((health <= .95) and (not string.find(tbuffs, "Regenerate"))) }
i=i+1; Skill[i] = { name = "Heal", use = (health <= .5) }
i=i+1; Skill[i] = { name = "Urgent Heal", use = (health <= .75) }
i=i+1; Skill[i] = { name = "Amplified Attack", use = (not string.find(tbuffs, "Amplified Attack")) }
i=i+1; Skill[i] = { name = "Grace of Life", use = (not string.find(tbuffs, "Grace of Life")) }
i=i+1; Skill[i] = { name = "Angel's Blessing", use = (not string.find(tbuffs, "Angel's Blessing")) }
else
health = PctH("player")
i=i+1; Skill[i] = { name = "Regenerate", use = ((health <= .95) and (not string.find(pbuffs, "Regenerate"))) }
i=i+1; Skill[i] = { name = "Heal", use = (health <= .5) }
i=i+1; Skill[i] = { name = "Urgent Heal", use = (health <= .75) }
i=i+1; Skill[i] = { name = "Bone Chill", use = (not string.find(tbuffs, "Bone Chill")) }
i=i+1; Skill[i] = { name = "Fireball", use = true }
i=i+1; Skill[i] = { name = "Rising Tide", use = true }
end
MyCombat(Skill, arg1)
end
|
Quoted from "Sixpax;287538"
Actually it should work on the same call as the spell is being cast, but you either need to update "pSpell" after the MyCombat() call, or just use UnitCastingTime().
Quoted from "Sixpax;287546"
There's a bug in the RoM code that allows you to occasionally use a skill while the GCD is active. I suspect this is why you're noticing the difference... since my engine is checking the cooldown of each skill before using it, it will never be able to take advantage of this bug.
Quoted from "delve;287505"
The more often your conditional short circuits the more efficient it will be
Quoted from "Sixpax;287563"
I have the MyCombat() function streamlined fairly well...You can separate your friendly healing skills from your damage skills and only build whichever ones you need for whatever mode you're in before calling MyCombat()...So instead of building a Skill table with all 11 of those skills in it each time, I'm only building it with the required Skills for the situation.
Quoted from "mrmarc0001;287180"
I don't get it. The problems you stated were problems with the original macro. What are you asking regarding your DIYCE function?

Quoted from "Sixpax;287534"
So give this one a try:
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15function WarriorWarden(arg1) local Skill = {} local i = 0 local rage = UnitMana("player") local mana = UnitSkill("player") local friendly = (not UnitCanAttack("player", "target")) local tbuffs = BuffList("target") i=i+1; Skill[i] = { name = "Enraged", use = (rage <= 25) } i=i+1; Skill[i] = { name = "Tactical Attack", use = ((not friendly) and (rage >= 15) and string.find(tbuffs, "Bleed")) } i=i+1; Skill[i] = { name = "Slash", use = ((not friendly) and (rage >= 25)) } i=i+1; Skill[i] = { name = "Power of the Wood Spirit", use = ((not friendly) and (mana >= 130)) } MyCombat(Skill,arg1) end
Quoted from "hangman04;287821"
so practically the script runs all skills in that order...how or when does the script end? when targed is dead or i exit combat?
Quoted from "hangman04;287821"
now ill ask noob question since i didnt read all pages.how does it work:
Quoted from "Sixpax;287563"
I have the MyCombat() function streamlined fairly well. By the time it gets called, all of the "use" definitions have already been evaluated...So I have it first check to see if "use" is true before even attempting to dissect the Skill/Action and execute it.
|
|
Source code |
1 |
i=i+1; Skill[i] = { name = "Static Field", use = (isChargedSF and (not isCharged)) }
|
Quoted from "mrmarc0001;287840"
You're calling a custom function. The script starts and ends with the first skill performed by the function. You continue to call the function to perform each skill based on the conditions set forth in your function. It doesn't work like a macro script that performs skills one after the other.
Quoted from "hangman04;287875"
So in order to get a "combo" i have to spam the macro button, right? and depending how well made is the list of priorities i might get smth good.