Quoted from "neomoses;365269"
So, I added Fervant Attack to my function along with Informer and Assassins Rage. Theyre suppose to cast when i hit at or below 50%. However, after Fervant Attack casts and its on CD, I keep getting a yellow message saying Skill is not ready. Am I missing something here? The other buffs with the same conditions I added work just fine.
Quoted from "ghostwolf82;365286"
I just finished this piece of code for a friend of mine. He is one of the best Scouts I have ever known, and is one of (if not the) top scout on the server. He is a S/K. Another one of my better pieces of work. Hope this helps many of you.
|
|
Source code |
1 |
local mana = PctS("player")
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 |
--Ammo Check and Equip
if (not ammo) then
local j, x, y, name = 1
repeat
x,y,name = GetBagItemInfo(j)
if ((string.find(name, "Runic Thorn")) or (string.find(name, " Arrow"))) then
j = 61
UseItemByName(name)
end
j = j + 1
until j > 60
end
|
Quoted from "hangman04;365289"
And second question is there a function to check if target is normal, elite or boss ?
|
|
Source code |
1 |
UnitSex("target") == 2
|
|
|
Source code |
1 |
UnitSex("target") > 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 |
local mana = PctS("player")
local pmana = UnitSkill("player")
--Potions and buffs
i=i+1; Skill[i] = { name = "Action: "..potslot, use = (phealth < .25) }
i=i+1; Skill[i] = { name = "Healing Shot", use = (phealth < .65) }
i=i+1; Skill[i] = { name = "Action: "..potslot2, use = (mana < .50) }
i=i+1; Skill[i] = { name = "Mana Conversion", use = ((focus <= .10) and (pmana >= 650)) }
i=i+1; Skill[i] = { name = "Concentration", use = (focus <= .30) }
i=i+1; Skill[i] = { name = "Enhanced Armor", use = ((not string.find(pbuffs,"Significantly Enhanced Armor")) and (pmana >= 120)) }
i=i+1; Skill[i] = { name = "Frost Arrow", use = (not string.find(pbuffs,"Frost Arrow")) }
i=i+1; Skill[i] = { name = "Blood Arrow", use = ((not combat or (phealth <= .45)) and (string.find(pbuffs,"Blood Arrow"))) }
i=i+1; Skill[i] = { name = "Blood Arrow", use = (combat and (not string.find(pbuffs,"Blood Arrow") and (phealth > .99))) }
if enemy and (not melee) then
if IsShiftKeyDown() then
i=i+1; Skill[i] = { name = "Snipe", use = (not combat) }
end
i=i+1; Skill[i] = { name = "Disarmament", use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament I")) and (thealth > .50)) }
i=i+1; Skill[i] = { name = "Autoshot", use = ((not ASon)) }
i=i+1; Skill[i] = { name = "Combo Shot", use = (not melee) }
i=i+1; Skill[i] = { name = "Shot", use = true }
i=i+1; Skill[i] = { name = "Disarmament", use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament II")) and (thealth > .50)) }
i=i+1; Skill[i] = { name = "Disarmament", use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament III")) and (thealth > .50)) }
i=i+1; Skill[i] = { name = "Disarmament", use = ((mana >= .45) and (not string.find(tbuffs,"Disarmament IV")) and (thealth > .50)) }
i=i+1; Skill[i] = { name = "Repelling Arrow", use = (mana >= .45) }
i=i+1; Skill[i] = { name = "Piercing Arrow", use = true }
i=i+1; Skill[i] = { name = "Wind Arrows", use = (focus >= 15) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = (focus >= 20) }
elseif enemy and melee then
if IsShiftKeyDown() then
i=i+1; Skill[i] = { name = "Escape Danger", use = true }
i=i+1; Skill[i] = { name = "Throat Attack", use = true }
end
i=i+1; Skill[i] = { name = "Autoshot", use = ((not ASon)) }
i=i+1; Skill[i] = { name = "Shot", use = true }
i=i+1; Skill[i] = { name = "Holy Strike", use = ((pmana >= 120) and (not string.find(tbuffs,"Light Seal I"))) }
i=i+1; Skill[i] = { name = "Holy Strike", use = ((pmana >= 120) and (not string.find(tbuffs,"Light Seal II"))) }
i=i+1; Skill[i] = { name = "Wrist Attack", use = (focus >= 35) }
i=i+1; Skill[i] = { name = "Punishment", use = ((pmana >= 120) and ((string.find(tbuffs,"Light Seal I")) or (string.find(tbuffs,"Light Seal II")))) }
i=i+1; Skill[i] = { name = "Joint Blow", use = (not string.find(tbuffs,"Slow")) }
|
|
|
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 |
function ChkArg(arg1, skillname)
arg1 = arg1 or ""
return (string.find(arg1, skillname) ~= nil)
end
function ScoutWarden(arg1,arg2,arg3)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local mana = UnitSkill("player")
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local myhealth = PctH("player")
local pbuffs = BuffList("player")
local tDead = UnitIsDeadOrGhost("target")
local LockedOn = UnitExists("target")
local a1,a2,a3,a4,a5,ASon = GetActionInfo(61) -- # is your Autoshot slot number
if (health <= .1) then
SwapEquipmentItem()
for i=1,3 do
if (IsPetSummoned(i) == true) then
ReturnPet(i);
end
end
CastSpellByName("Elven Amulet")
end
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Blood Arrow")) and (myhealth >= .75)) }
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = (ChkArg(arg2,"boss") and ChkArg(pbuffs, "Blood Arrow") and ((not combat) or (myhealth <= .25))) }
i=i+1; Skill[i] = { ['name'] = "Savage Power", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Savage Power"))) }
i=i+1; Skill[i] = { ['name'] = "Arrow of Essence", ['use'] = (ChkArg(arg2,"boss") and combat) }
i=i+1; Skill[i] = { ['name'] = "Concentration", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs,"Concentration"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 62 (Archer's Glory)", ['use'] = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Archer's Glory")) }
i=i+1; Skill[i] = { ['name'] = "Autoshot", ['use'] = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { ['name'] = "Serenity", ['use'] = ( ChkArg(arg2,"boss") and CD("Concentration") == false and (not ChkArg(pbuffs,"Concentration")) and UnitMana("player")<15) }
i=i+1; Skill[i] = { ['name'] = "Item: Focus Potion", ['use'] = (ChkArg(arg2,"boss") and combat and (focus >= 10)) }
i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Briar Shield"))) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Entling Offering"))) }
i=i+1; Skill[i] = { ['name'] = "Item: Roast Wolf Leg", ['use'] = (ChkArg(arg3,"consume") and combat and (not(ChkArg(pbuffs,"Informer") or ChkArg(pbuffs,"Roast Wolf Leg")))) }
i=i+1; Skill[i] = { ['name'] = "Item: Frenzy Potion", ['use'] = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Frenzy Potion"))) }
i=i+1; Skill[i] = { ['name'] = "Item: Strong Stimulant", ['use'] = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Strong Stimulant"))) }
i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not ChkArg(pbuffs,"Briar Shield")) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (not ChkArg(pbuffs,"Entling Offering")) }
i=i+1; Skill[i] = { ['name'] = "Shoot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Snipe", ['use'] = (ChkArg(pbuffs,"Hidden Peril")) }
i=i+1; Skill[i] = { ['name'] = "Combo Shot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Thorn Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Hidden Peril", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
MyCombat(Skill,arg1)
if (tDead) or (not LockedOn) or (not enemy) then
TargetNearestEnemy()
end
end
|
|
|
Source code |
1 2 3 |
SSE = SSE
i=i+1; Skill[i] = { name = "Action: "..SSE, use = ((phealth < .75) and potslot) }
|
Quoted from "ghostwolf82;366466"
What is the directory of your folders? If you have a diyce folder inside a diyce folder, this is incorrect.
Quoted from "CyberZe;366232"
my first attempt to make a function for DIYCE...
but it doesnt work im not sure why, i downloaded addon, pasted it into addons, then made the new folder and files inside (as in guide)
and paste my function (made form some other's work) inside this MyFunctions.lua
but it doesnt work at all...
Any help appreciated![]()
|
|
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 |
function ChkArg(arg1, skillname)
arg1 = arg1 or ""
return (string.find(arg1, skillname) ~= nil)
end
function ScoutWarden(arg1,arg2,arg3)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local mana = UnitSkill("player")
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local myhealth = PctH("player")
local pbuffs = BuffList("player")
local tDead = UnitIsDeadOrGhost("target")
local LockedOn = UnitExists("target")
local a1,a2,a3,a4,a5,ASon = GetActionInfo(61) -- # is your Autoshot slot number
if (myhealth <= .1) then
SwapEquipmentItem()
for j=1,3 do
if IsPetSummoned(j) then
ReturnPet(j)
end
end
CastSpellByName("Elven Amulet")
return true
end
i=i+1; Skill[i] = { name = "Blood Arrow", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Blood Arrow")) and (myhealth >= .75)) }
i=i+1; Skill[i] = { name = "Blood Arrow", use = (ChkArg(pbuffs, "Blood Arrow") and ((not combat) or (myhealth <= .25))) }
i=i+1; Skill[i] = { name = "Savage Power", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Savage Power"))) }
i=i+1; Skill[i] = { name = "Arrow of Essence", use = (ChkArg(arg2,"boss") and combat) }
i=i+1; Skill[i] = { name = "Concentration", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs,"Concentration"))) }
i=i+1; Skill[i] = { name = "Action: 62 (Archer's Glory)", use = (ChkArg(arg2,"boss") and combat and (not ChkArg(pbuffs, "Archer's Glory"))) }
i=i+1; Skill[i] = { name = "Autoshot", use = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { name = "Serenity", use = ( ChkArg(arg2,"boss") and (not CD("Concentration")) and (not ChkArg(pbuffs,"Concentration")) and (UnitMana("player")<15)) }
i=i+1; Skill[i] = { name = "Item: Focus Potion", use = (ChkArg(arg2,"boss") and combat and (focus <= 10)) }
i=i+1; Skill[i] = { name = "Briar Shield", use = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Briar Shield"))) }
i=i+1; Skill[i] = { name = "Entling Offering", use = (ChkArg(arg3,"consume") and (not ChkArg(pbuffs,"Entling Offering"))) }
i=i+1; Skill[i] = { name = "Item: Roast Wolf Leg", use = (ChkArg(arg3,"consume") and combat and (not (ChkArg(pbuffs,"Informer") or ChkArg(pbuffs,"Roast Wolf Leg")))) }
i=i+1; Skill[i] = { name = "Item: Frenzy Potion", use = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Frenzy Potion"))) }
i=i+1; Skill[i] = { name = "Item: Strong Stimulant", use = (ChkArg(arg3,"consume") and combat and (not ChkArg(pbuffs,"Strong Stimulant"))) }
i=i+1; Skill[i] = { name = "Briar Shield", use = (not ChkArg(pbuffs,"Briar Shield")) }
i=i+1; Skill[i] = { name = "Entling Offering", use = (not ChkArg(pbuffs,"Entling Offering")) }
i=i+1; Skill[i] = { name = "Shoot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Snipe", use = (ChkArg(pbuffs,"Hidden Peril")) }
i=i+1; Skill[i] = { name = "Combo Shot", use = (not friendly) }
i=i+1; Skill[i] = { name = "Thorn Arrow", use = (not friendly) }
i=i+1; Skill[i] = { name = "Hidden Peril", use = (not friendly) }
i=i+1; Skill[i] = { name = "Wind Arrows", use = ((not friendly) and (focus >= 15)) }
MyCombat(Skill,arg1)
if (tDead) or (not LockedOn) or friendly then
TargetNearestEnemy()
end
end
|
Quoted from "ghostwolf82;366466"
I am wanting to get and item set still into working within the diyce code, but am uncertain as to if this will actually work or not, and just wondering if this seem like correct syntax, or if anyone has any other ideas. Tired of Spirit Herb Essence sitting on my action bar, and me forgetting I have it. So, I want to check to see if potslot is nil or not, and if it isn't, then use the item set skill. If it is, then do nothing. So I think this will work:
potslot is currently spirit herbs, so does this work?
![]()
Source code
1 2 3SSE = SSE i=i+1; Skill[i] = { name = "Action: "..SSE, use = ((phealth < .75) and potslot) }
EDIT: This does work. For any wanting to include this skill into your rotation.
|
|
Source code |
1 |
SSE = SSE or 0 |
Quoted from "Sixpax;366484"
I gave your code the once-over and found a whole bunch of errors. I corrected as many as I spotted, so give this a try:
Also, whenever you run your code and it doesn't work, be sure to look for a red flashing icon by the minimap and click on it. That will give you some indication of syntax errors and the line number they occur on.
Also, just in case you're not aware of this, that function relies on passing certain text strings to it as the 2nd and 3rd argument in your macro. Let me know if you don't understand what that means and I'll explain further.

Quoted from "ghostwolf82;366665"
I think another issue may well be it seems you have the functions file in a layer of folders too deep. Try moving that file up one level so it looks like this:
Runes of Magic\Interface\Addons\DIYCE\DIYCE.toc
Runes of Magic\Interface\Addons\DIYCE\DIYCE.lua
Runes of Magic\Interface\Addons\DIYCE\MyFunctions.lua
These three files should be all in the DIYCE folder, and when you open DICYE.toc you should see two lines of code there that look like this:
DIYCE.lua
MyFunctions.lua
Quoted from "CyberZe;366988"
Oh, i could do that, but after Six's tweaking it works well, only thing thats not ok is that when reusing macro while comboshot is loading its cast bar it gets interrupted
Quoted from "AKALASZLO;369044"
Ok I need help. I suck at this kind of stuff. I have made a new s/k. I have the elites up to 45. I want a macro but the only one I found here is by wolf and I can't seem to make it work right and really don't want it to do all that its set up to do anyways. I want 2 macros one that for range and one for up close. But I want it on 2 different buttons. I do want to make sure both keep my armor and arrow buff up. Can someone please help.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
function ScoutKnightRange(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local enemy = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local a1,a2,a3,a4,a5,ASon = GetActionInfo(0) -- Change the 0 to your action bar slot # for Autoshot
i=i+1; Skill[i] = { name = "Enhanced Armor", use = ((not combat) and (not string.find(pbuffs,"Enhanced Armor"))) }
i=i+1; Skill[i] = { name = "Frost Arrow", use = ((not combat) and (not string.find(pbuffs,"Frost Arrow"))) }
i=i+1; Skill[i] = { name = "Combo Shot", use = enemy }
i=i+1; Skill[i] = { name = "Autoshot", use = (enemy and (not ASon)) }
i=i+1; Skill[i] = { name = "Shot", use = enemy }
i=i+1; Skill[i] = { name = "Disarmament", use = (enemy and (not string.find(tbuffs,"Disarmament IV"))) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = (enemy and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Wind Arrows", use = (enemy and (focus >= 15)) }
i=i+1; Skill[i] = { name = "Disarmament", use = enemy }
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 |
/run ScoutKnightRange() |
|
|
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 |
function ScoutKnightMelee(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local enemy = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local a1,a2,a3,a4,a5,ASon = GetActionInfo(0) -- Change the 0 to your action bar slot # for Autoshot
i=i+1; Skill[i] = { name = "Enhanced Armor", use = ((not combat) and (not string.find(pbuffs,"Enhanced Armor"))) }
i=i+1; Skill[i] = { name = "Frost Arrow", use = ((not combat) and (not string.find(pbuffs,"Frost Arrow"))) }
i=i+1; Skill[i] = { name = "Combo Shot", use = enemy }
i=i+1; Skill[i] = { name = "Autoshot", use = (enemy and (not ASon)) }
i=i+1; Skill[i] = { name = "Shot", use = enemy }
i=i+1; Skill[i] = { name = "Punishment", use = (enemy and string.find(tbuffs, "Light Seal III")) }
i=i+1; Skill[i] = { name = "Disarmament", use = (enemy and (not string.find(tbuffs,"/Disarmament I/"))) }
i=i+1; Skill[i] = { name = "Holy Strike", use = (enemy and (not string.find(tbuffs,"/Light Seal I/"))) }
i=i+1; Skill[i] = { name = "Disarmament", use = (enemy and (not string.find(tbuffs,"/Disarmament II/"))) }
i=i+1; Skill[i] = { name = "Holy Strike", use = (enemy and (not string.find(tbuffs,"/Light Seal II/"))) }
i=i+1; Skill[i] = { name = "Disarmament", use = (enemy and (not string.find(tbuffs,"/Disarmament III/"))) }
i=i+1; Skill[i] = { name = "Holy Strike", use = (enemy and (not string.find(tbuffs,"/Light Seal III/"))) }
i=i+1; Skill[i] = { name = "Vampire Arrows", use = (enemy and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Wind Arrows", use = (enemy and (focus >= 15)) }
i=i+1; Skill[i] = { name = "Disarmament", use = enemy }
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 |
/run ScoutKnightMelee() |