Quoted from "Tryfaen;249664"
This macro has been working great for me but I found one small issue. If you are using threaten but for some reason end up with not enough mana to cast it, the macro wont move on to mana return.
Quoted from "Blueman0x76;249717"
For people who want to use Auto Attack as part of their rotation you must edit the ReadSkill() function since "Attack" is in page1.
Change this line of code
to
![]()
Source code
1 for page = 2,4 do
I use
![]()
Source code
1 for page = 1,4 do
because when I tab target a new mob but have no energy/rage left as a rogue I want it to start doing white dmg
![]()
Source code
1i=i+1; Skill[i] = { ['name'] = "Attack", ['use'] = ((not friendly)) }
|
|
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 |
function ScoutWarden(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local mana = UnitSkill("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(1) -- # is your Autoshot slot number
i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not ChkBuff("player","Briar Shield")) }
i=i+1; Skill[i] = { ['name'] = "Entling Offering", ['use'] = (not ChkBuff("player","Entling Offering")) }
i=i+1; Skill[i] = { ['name'] = "Frost Arrow", ['use'] = (not ChkBuff("player","Frost Arrow")) }
-- i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly)}
i=i+1; Skill[i] = { ['name'] = "Combo Shot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Autoshot", ['use'] = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { ['name'] = "Shoot", ['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'] = "Snipe", ['use'] = (chkBuff("player", "Hidden Peril")) }
i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
i=i+1; Skill[i] = { ['name'] = "Charged Chop", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
Quoted from "Sixpax;249801"
However, it looks to me like putting that line in your function would cause Attack to just keep going on/off whenever it gets to that skill. If that is the case, you might put something like: (PctH("target")==1) in your ['use'] definition, so it only executes "Attack" if you haven't started hitting the mob yet.
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Antidote", ['use'] = (string.find(dbuffs,"Poisoned")) }
|
Quoted from "Sixpax;247998"
I started working on that last night myself. The main problem I ran into was Elven Prayer requiring your pet to be targeted (how stupid is that... it's not like I'm going to cast it on anything else). For that I just put in some code before the Skill definitions to handle it.
I noticed the pet skills can be set to automatically fire so I didn't need to worry about managing them within the engine.
Be aware that my Warden is only level 11 so I'm still fairly ignorant of the challenges in playing the class, but I'll be happy to help if you can spell out what they are.
I don't have my code in front of me, but basically it looks something like 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 36function WardenScout(arg1) local Skill = {} local i = 0 local mana = UnitMana("player")/UnitMaxMana("player") local friendly = (not UnitCanAttack("player","target")) local pet = UnitExists("playerpet") local combat = GetPlayerCombatState() if pet then if (PctH("playerpet") < 0.5) and CD("Elven Prayer") then if UnitExists("target") then FocusUnit(1,"target") TargetUnit("playerpet") CastSpellByName("Elven Prayer") TargetUnit("focus1") FocusUnit(1,"") return else TargetUnit("playerpet") CastSpellByName("Elven Prayer") return end elseif combat and (not friendly) then UsePetAction(3) -- Pet attacks my target end end i=i+1; Skill[i] = { ['name'] = "Briar Shield", ['use'] = (not combat) } i=i+1; Skill[i] = { ['name'] = "Summon Spirit of the Oak", ['use'] = ((not combat) and (not pet)) } i=i+1; Skill[i] = { ['name'] = "Shot", ['use'] = (not friendly) } i=i+1; Skill[i] = { ['name'] = "Thorny Vine", ['use'] = (not friendly) } i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) } i=i+1; Skill[i] = { ['name'] = "Power of the Wood Spirit", ['use'] = (not friendly) } MyCombat(Skill,arg1) end
Quoted from "Provoke;251201"
Heya, been using my Rogue/Knight macros leeched from here and can't live without them now <3
I was wondering if I could put my Elite skill [Poison Protection] to better use as I find myself rarely using it because of it's fairly short duration and long cooldown.
I was wondering if I could throw it into the mix and use it a little like the Scouts Throat Attack found in this thread, in the way that the macro detects poison being cast and then applies PP?
I'm fairly sceptical as to whether this is at all possible as I think that the TA method doesn't need to "know" what is being cast by a mob - it just activates at any cast [['use'] = ((not friendly) and (tspell ~= nil))] but for Poison Protection it would need to know whether the mob is casting Poison specifically for it to be effective.
[edit] I just noticed that some mobs don't actually seem to cast poison, rather that it's an instant effect... so I guess it wouldn't work in those situations, but I'm sure mobs like the scorpion in Aslan do cast poison.
Is this possible at all?
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Throat Attack", ['use'] = ((not friendly) and (ttime >= 1) and ((ttime - telapsed) > 0.5)) }
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Poison Protection", ['use'] = ((not friendly) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and string.find(string.lower(tspell),"poison")) }
|
Quoted from "Provoke;251201"
Oh and whilst we're at it, I started a Druid and I was trying to use jsalemi's functions he posted earlier. The problem I have is that antidote seems to try and cast on the enemy target rather than on yourself.
![]()
Source code
1i=i+1; Skill[i] = { ['name'] = "Antidote", ['use'] = (string.find(dbuffs,"Poisoned")) }
Quoted from "Sixpax;251346"
Do you have self-cast enabled? I would think that spell would adhere to the same rules as say a heal so it casts on you if you have an enemy targeted with self-cast enabled. If not, you'll have to add some code to do the targeting.

Quoted from "Sixpax;251346"
Anyway as for your request for Poison Protection, I'm assuming it won't remove poison effects, but rather protect you from getting them correct? In that case, it won't work for instant cast spells. However, if the mob's spell does have a long cast time, you could use the same logic but you'll need to probably add string searches for the name of the spell being cast. Assuming the word "poison" appears in those spells, you could do something like:
![]()
Source code
1i=i+1; Skill[i] = { ['name'] = "Poison Protection", ['use'] = ((not friendly) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and string.find(string.lower(tspell),"poison")) }
Quoted from "Provoke;251469"
I tried the above code and got this error:
[string '?']:199: attempt to compare number with nil
Needless to say I'm clueless as to what that means.
|
|
Source code |
1 |
local tspell = UnitCastingTime("target")
|
|
|
Source code |
1 |
local tspell,ttime,telapsed = UnitCastingTime("target")
|
|
|
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 KnightScout(arg1,arg2)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player","target"))
local shield = (GetEquipSlotInfo(17) ~= nil)
local combat = GetPlayerCombatState()
local mana = PctM("player")
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { ['name'] = "Holy Seal", ['use'] = (not string.find(pbuffs,"Holy Seal")) }
i=i+1; Skill[i] = { ['name'] = "Enhanced Armor", ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Charge", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Hatred Strike", ['use'] = ((not string.find(pbuffs,"Hatred Strike")) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Threaten", ['use'] = (string.find(tbuffs,"Holy Seals 3") and (not string.find(pbuffs,"Threaten")) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seals 3") and (mana <= .75)) }
i=i+1; Skill[i] = { ['name'] = "Punishment", ['use'] = ((not friendly) and string.find(tbuffs,"Light Seal III")) }
i=i+1; Skill[i] = { ['name'] = "Holy Strike", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield", ['use'] = ((not friendly) and shield) }
|
|
|
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 KnightScout(arg1,arg2)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player","target"))
local shield = (GetEquipSlotInfo(17) ~= nil)
local combat = GetPlayerCombatState()
local health = PctH("player")
local mana = PctM("player")
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { ['name'] = "Hall of Dead Heroes", ['use'] = ((health <= .10) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Holy Seal", ['use'] = (not string.find(pbuffs,"Holy Seal")) }
i=i+1; Skill[i] = { ['name'] = "Enhanced Armor", ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Charge", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield", ['use'] = (shield and (not friendly) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Hatred Strike", ['use'] = ((not string.find(pbuffs,"Hatred Strike")) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Threaten", ['use'] = (string.find(tbuffs,"Holy Seals 3") and (not string.find(pbuffs,"Threaten")) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seals 3") and (mana <= .75)) }
i=i+1; Skill[i] = { ['name'] = "Punishment", ['use'] = ((not friendly) and string.find(tbuffs,"Light Seal III")) }
i=i+1; Skill[i] = { ['name'] = "Holy Strike", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 2 3 4 5 |
local health = PctH("player")
local mana = PctM("player")
...
i=i+1; Skill[i] = { ['name'] = "Hall of Dead Heroes", ['use'] = ((health <= .10) and (arg2 == "tank")) }
i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seals 3") and (mana <= .75)) }
|
Quoted from "Sixpax;251609"
That's probably because you don't have ttime and/or telapsed defined. My guess is you have something like this line in your function:
Quoted from "Provoke;251924"
That was the problem.
Have a new one - it seems to me that it throws up this error with mobs that cast something other than poison, with this error:
[sting '?']:200: bad argument #1 to 'lower' (string expected, got nil)
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Poison Protection", ['use'] = ((not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and string.find(string.lower(tspell),"poison")) }
|