Quoted from "jsalemi;243190"
/run RogueKnight()
Just put that in your macro. If you want to see what's firing:
/run RogueKnight("v1")
To make a separate macro for being behind the target,
/run RogueKnight("","behind")
Quoted from "ddoine;243568"
Now if I wanted to do one for the Knight Rogue side do I just add in another function and call it with another macro?
Quoted from "Tigsman;219239"
thank you.
I havent tested my code for functionality yet, but this is what I'll give a go tomorrow.
T
![]()
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 34function KWCombat(arg1,arg2) local Skill = {} local i = 0 local tgt = "player" local rage = UnitSkill("player") local friendly = (not UnitCanAttack("player","target")) local shield = true local health = PctH("player") local tgtcast = UnitCastingTime("target") if GetEquipSlotInfo(17) == nil then shield = false end local pbuffs = BuffList("player") local tbuffs = BuffList("target") i=i+1; Skill[i] = { ['name'] = "Holy Shield", ['use'] = (health <= .20) } i=i+1; Skill[i] = { ['name'] = "Resolution", ['use'] = (health <= .33) } -- i=i+1; Skill[i] = { ['name'] = "Shield of Atonement", ['use'] = ((not friendly) and (health <= .40) and shield) } -- i=i+1; Skill[i] = { ['name'] = "Shield of Valor", ['use'] = ((not friendly) and (health <= .50) and shield) } -- i=i+1; Skill[i] = { ['name'] = "Shield of Discipline", ['use'] = ((not friendly) and (tgtcast ~= nil) and shield) } 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'] = "Threaten", ['use'] = (string.find(tbuffs,"Holy Seal III") and (not string.find(pbuffs,"Threaten")) and (arg2 == "threaten")) } i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seal III")) } i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield", ['use'] = ((not friendly) and shield) } i=i+1; Skill[i] = { ['name'] = "Punishment", ['use'] = (string.find(tbuffs,"Light Seal III")) } i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = (not string.find(tbuffs,"Disarmament IV") and (arg2 == "disarm")) } i=i+1; Skill[i] = { ['name'] = "Slash", ['use'] = ((not friendly) and (rage >=75)) } 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 |
function RogueKnight(arg1,arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local mana = UnitMana("player")/UnitMaxMana("player")
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
-- i=i+1; Skill[i] = { ['name'] = "Sneak Attack", ['use'] = ((not friendly) and (energy >=30) and (arg2=="behind") and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Wound Attack", ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed") and string.find(tbuffs,"Grievous Wound")) }
i=i+1; Skill[i] = { ['name'] = "Low Blow", ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed")) }
[B]i=i+1; Skill[i] = { ['name'] = "Blind Stab", ['use'] = ((not friendly) and (energy >=75)) and (not behind)}[/B]
i=i+1; Skill[i] = { ['name'] = "Shadowstab", ['use'] = ((not friendly) and (energy >=35)) }
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)
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = ((not friendly) and (mana >=90)) }
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = (not string.find(tbuffs,"Disarmament IV") and (arg2 == "disarm")) }
|
Quoted from "Provoke;243819"
The problem I'm having is that I'm guessing "(not behind)" doesn't do anything because the macro sure tries to use Blind Stab even if I am behind a target.
Is there a way to make it so that it doesn't try to use Blind Stab if my character is behind a target?
|
|
Source code |
1 |
/run RogueKnight("","Debuff")
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
function RogueKnight(arg1,arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local mana = UnitMana("player")/UnitMaxMana("player")
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
-- i=i+1; Skill[i] = { ['name'] = "Sneak Attack", ['use'] = ((not friendly) and (energy >=30) and (arg2=="behind") and (not combat)) }
i=i+1; Skill[i] = { ['name'] = "Wound Attack", ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed") and string.find(tbuffs,"Grievous Wound")) }
i=i+1; Skill[i] = { ['name'] = "Low Blow", ['use'] = ((not friendly) and (energy >=35) and string.find(tbuffs,"Bleed")) }
i=i+1; Skill[i] = { ['name'] = "Blind Stab", ['use'] = ((not friendly) and (energy >=75)) and (arg2 =="Debuff")}
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = ((not string.find(tbuffs,"Disarmament IV")) and (arg2 == "Debuff")) }
i=i+1; Skill[i] = { ['name'] = "Shadowstab", ['use'] = ((not friendly) and (energy >=35)) }
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
|
Quoted from "Provoke;243819"
Got a couple of queries reguarding Blind Stab and Disarmament.
|
|
Source code |
1 |
local mana = Unit[B]Skill[/B]("player")/UnitMax[B]Skill[/B]("player")
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = ((not friendly) and (mana >=[B].[/B]90)) }
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = (not string.find(tbuffs,"Disarmament IV") and (arg2 == "disarm")) }
|
Quoted from "viperbite;243781"
Thanks Tigs for the codes but somehow when I make macro with /run KWCombat("","threaten") and spam it, threaten, and mana return never execute. I've check the combat logs and didn't see them....did I do something wrong?
thanks for help
k/w btw
Quoted from "jsalemi;243842"
The problem with using "(not behind)" is that it's looking for a local variable called "behind", not the value of arg2. Change that to "(not (arg2=="behind"))" and it should work the way you want it to.
Quoted from "ghostbiker;245922"
and add in concentration if focus drops below a %
i thought this would work but dosent seem to
i=i+1; Skill = { ['name'] = "Concentration", ['use'] = ((not ChkBuff("player","Concentration")) and (focus <= 30)) }
Quoted from "ghostbiker;245922"
Ok im a total numpty when it comes to computers, that said affter following your guide i have a simple scout macro set and running well.
just basic of autoshot/combo/shot/wind arrows
now, i want to add in Bloodarrow but so it only starts if above say 60% hp and turns off if it drops below that. is that possable?
|
|
Source code |
1 2 |
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = ((PctH("player") >= .6) and (not ChkBuff("player", "Blood Arrow"))) }
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = ((PctH("player") < .6) and (ChkBuff("player", "Blood Arrow"))) }
|
Quoted from "ghostbiker;245922"
and add in concentration if focus drops below a %
i thought this would work but dosent seem to
i=i+1; Skill = { ['name'] = "Concentration", ['use'] = ((not ChkBuff("player","Concentration")) and (focus <= 30)) }
Quoted from "Blueman0x76;246012"
For Rogue/Warrior there are two types of bleed.
Bleed from AXE Slash & Dagger Shadowstab.
Both of them are named "Bleed"
Using string.find(tbuffs,"Bleed") I can't differentiate the two types.
I noticed the debuff icon for both bleed are different.
Is there a way to use them to distinguish between the two bleeds?
|
|
Source code |
1 |
/run Msg(BuffList("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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
function ScoutGroup(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(29) -- # is your Autoshot slot number
i=i+1; Skill[i] = { ['name'] = "Frost Arrow", ['use'] = (not ChkBuff("player","Frost Arrow")) }
i=i+1; Skill[i] = { ['name'] = "Serenity", ['use'] = (CD("Concentration") == false and ChkBuff("player","Concentration")==false and UnitMana("player")<15) }
i=i+1; Skill[i] = { ['name'] = "Target Area", ['use'] = (ChkBuff("player","Target Area")==false and UnitMana("player")>20) }
i=i+1; Skill[i] = { ['name'] = "Concentration", ['use'] = ((not ChkBuff("player","Concentration")) and (focus <= 30)) }
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = ((PctH("player") >= .7) and (not ChkBuff("player", "Blood Arrow"))) }
i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = ((PctH("player") < .4) and (ChkBuff("player", "Blood Arrow"))) }
i=i+1; Skill[i] = { ['name'] = "Autoshot", ['use'] = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { ['name'] = "Combo Shot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Shot", ['use'] = (not friendly) }
-- i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (focus >= 20)) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
MyCombat(Skill,arg1)
end
function Scoutsolo(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local a1,a2,a3,a4,a5,ASon = GetActionInfo(29) -- # is your Autoshot slot number
i=i+1; Skill[i] = { ['name'] = "Frost Arrow", ['use'] = (not ChkBuff("player","Frost Arrow")) }
i=i+1; Skill[i] = { ['name'] = "Serenity", ['use'] = (CD("Concentration") == false and ChkBuff("player","Concentration")==false and UnitMana("player")<15) }
i=i+1; Skill[i] = { ['name'] = "Target Area", ['use'] = (ChkBuff("player","Target Area")==false and UnitMana("player")>20) }
i=i+1; Skill[i] = { ['name'] = "Concentration", ['use'] = (UnitMana("player")<15)}
-- i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = (ChkBuff("player","Blood Arrow")==true and (UnitHealt("player")/UnitMaxHealth("player"))<= 0.5) }
-- i=i+1; Skill[i] = { ['name'] = "Blood Arrow", ['use'] = ((UnitHealt("player")/UnitMaxHealth("player"))>= 0.5) }
i=i+1; Skill[i] = { ['name'] = "Autoshot", ['use'] = ((not friendly) and (not ASon)) }
i=i+1; Skill[i] = { ['name'] = "Combo Shot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Shot", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (focus >= 20)) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
MyCombat(Skill,arg1)
end
|