|
|
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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
-- DIY Combat Engine version 1.4
g_skill = {}
function Msg(outstr,a1,a2,a3)
DEFAULT_CHAT_FRAME:AddMessage(tostring(outstr),a1,a2,a3)
end
function ReadSkills()
g_skill = {}
local skillname,slot
Msg("- Reading Class Skills")
for page = 1,4 do
slot = 1
skillname = GetSkillDetail(page,slot)
repeat
local a1,a2,a3,a4,a5,a6,a7,a8,skillusable = GetSkillDetail(page,slot)
if skillusable then
g_skill[skillname] = { ['page'] = page, ['slot'] = slot }
end
slot = slot + 1
skillname = GetSkillDetail(page,slot)
until skillname == nil
end
end
ReadSkills() -- Read skills into g_skill table at login
function PctH(tgt)
return (UnitHealth(tgt)/UnitMaxHealth(tgt))
end
function PctM(tgt)
return (UnitMana(tgt)/UnitMaxMana(tgt))
end
function PctS(tgt)
return (UnitSkill(tgt)/UnitMaxSkill(tgt))
end
function CancelBuff(buffname)
local i = 1
local buff = UnitBuff("player",i)
while buff ~= nil do
if buff == buffname then
CancelPlayerBuff(i)
return true
end
i = i + 1
buff = UnitBuff("player",i)
end
return false
end
function BuffTimeLeft(tgt, buffname)
local cnt = 1
local buffcmd, bufftimecmd, buff
if UnitCanAttack("player", tgt) then
buffcmd = UnitDebuff
bufftimecmd = UnitDebuffLeftTime
else
buffcmd = UnitBuff
bufftimecmd = UnitBuffLeftTime
end
buff = buffcmd(tgt, cnt)
while buff ~= nil do
if string.find(buff, buffname) then
return bufftimecmd(tgt, cnt)
end
cnt = cnt + 1
buff = buffcmd(tgt, cnt)
end
return 0
end
function ChkBuff(tgt,buffname)
local cnt = 1
local buffcmd = UnitBuff
if UnitCanAttack("player",tgt) then
buffcmd = UnitDebuff
end
local buff = buffcmd(tgt,cnt)
while buff ~= nil do
if string.gsub(buff, "(%()(.)(%))", "%2") == buffname then
return true
end
cnt = cnt + 1
buff = buffcmd(tgt,cnt)
end
return false
end
function BuffList(tgt)
local cnt = 1
local buffcmd = UnitBuff
local buffstr = "/"
if UnitCanAttack("player",tgt) then
buffcmd = UnitDebuff
end
local buff = buffcmd(tgt,cnt)
while buff ~= nil do
buffstr = buffstr..buff.."/"
cnt = cnt + 1
buff = buffcmd(tgt,cnt)
end
return string.gsub(buffstr, "(%()(.)(%))", "%2")
end
function CD(skillname)
local firstskill = GetSkillDetail(2,1)
if (g_skill[firstskill] == nil) or (g_skill[firstskill].page ~= 2) then
ReadSkills()
end
if g_skill[skillname] ~= nil then
local tt,cd = GetSkillCooldown(g_skill[skillname].page,g_skill[skillname].slot)
return cd==0
elseif skillname == nil then
return false
else
Msg("Skill not available: "..skillname)
return false
end
end
function MyCombat(Skill, arg1)
local spell_name = UnitCastingTime("player")
local talktome = ((arg1 == "v1") or (arg1 == "v2"))
local action,actioncd,actiondef,actioncnt
if spell_name ~= nil then
if (arg1 == "v2") then Msg("- ['..spell_name..']", 0, 1, 1) end
return true
end
for x,tbl in ipairs(Skill) do
if Skill[x].use then
if string.find(Skill[x].name, "Action:") then
action = tonumber((string.gsub(Skill[x].name, "(Action:)( *)(%d+)(.*)", "%3")))
_1,actioncd = GetActionCooldown(action)
actiondef,_1,actioncnt = GetActionInfo(action)
if GetActionUsable(action) and (actioncd == 0) and (actiondef ~= nil) and (actioncnt > 0) then
if talktome then Msg("- "..Skill[x].name) end
UseAction(action)
return true
end
elseif string.find(Skill[x].name, "Custom:") then
action = string.gsub(Skill[x].name, "(Custom:)( *)(.*)", "%3")
if CustomAction(action) then
return true
end
elseif string.find(Skill[x].name, "Item:") then
action = string.gsub(Skill[x].name, "(Item:)( *)(.*)", "%3")
if talktome then Msg("- "..Skill[x].name) end
UseItemByName(action)
return true
elseif CD(Skill[x].name) then
if talktome then Msg("- "..Skill[x].name) end
CastSpellByName(Skill[x].name)
return true
end
end
end
if (arg1 == "v2") then Msg("- [IDLE]", 0, 1, 1) end
return false
end
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[FONT=Verdana]
[/FONT][FONT=Verdana]function ScoutRogue(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local enemy = UnitCanAttack("player","target")
i=i+1; Skill[i] = { name = "Frost Arrow", use = (not ChkBuff("player","Frost Arrow")) }
i=i+1; Skill[i] = { name = "Combo Shot", use = enemy }
i=i+1; Skill[i] = { name = "Shot", use = enemy }
i=i+1; Skill[i] = { name = "Piercing Arrow", use = enemy }
i=i+1; Skill[i] = { name = "Weak Spot", use = (enemy and (focus >= 30)) }
-- i=i+1; Skill[i] = { name = "Vampire Arrows", use = (enemy and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Sapping Arrow", use = enemy }
i=i+1; Skill[i] = { name = "Wind Arrows", use = (enemy and (focus >= 15)) }
i=i+1; Skill[i] = { name = "Snipe", use = enemy }
MyCombat(Skill,arg1)
end
[/FONT]
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
[FONT=Verdana][U] skill [/U][/FONT][FONT=Verdana] [U]use [/U] [U](CD) [/U] Frost Arrow false true Combo Shot true false Shot true false Piercing Arrow true true Weak Spot false false Sapping Arrow true true Wind Arrows true true Snipe true true [/FONT] |
Quoted from "Icarii"
Thread closed.
Long story short, it was banned lol.
Quoted from "Me"
When I understand the validity of your argument, I will dignify it with a response.
|
|
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 |
function RogueScout(arg1, arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local focus = UnitSkill("player")
local friendly = (not UnitCanAttack("player", "target"))
local combat = GetPlayerCombatState()
local tspell,ttime,telapsed = UnitCastingTime("target")
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { name = "Throat Attack", use = ((not friendly) and (tspell ~= nil) and (ttime >= 1) and ((ttime - telapsed) > 0.5) and (focus >= 15)) }
i=i+1; Skill[i] = { name = "Combat Master", use = ((not string.find(pbuffs, "Combat Master")) and (not string.find(pbuffs, "Informer"))) }
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 = "Blind Spot", use = ((not friendly) and (energy >= 25) and (not string.find(tbuffs, "Bleed")) and (arg2 == "behind")) }
i=i+1; Skill[i] = { name = "Shadowstab", use = ((not friendly) and (energy >= 35) and (not string.find(tbuffs, "Bleed"))) }
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 = "Vampire Arrows", use = (not friendly) }
i=i+1; Skill[i] = { name = "Shot", use = (not friendly) }
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 |
/run if IsShiftKeyDown() then RogueScout("v1","behind") else RogueScout("v1") end
|
|
|
Source code |
1 |
/run RogueScout() |
|
|
Source code |
1 |
/run RogueScout("","behind")
|

|
|
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 |
function PriestKnight(arg1)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player", "target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
local health, buffs
if friendly then
health = PctH("target")
buffs = tbuffs
else
health = PctH("player")
buffs = pbuffs
end
i=i+1; Skill[i] = { name = "Magic Barrier", use = ((not combat) and (not string.find(pbuffs, "Magic Barrier"))) }
i=i+1; Skill[i] = { name = "Blessed Spring Water", use = ((not combat) and (not string.find(pbuffs, "Blessed Spring Water"))) }
i=i+1; Skill[i] = { name = "Soul Bond", use = (not string.find(pbuffs, "Soul Bond")) }
i=i+1; Skill[i] = { name = "Soul Source", use = (health <= .25) }
i=i+1; Skill[i] = { name = "Holy Aura", use = (PctH("player") <= .40) }
i=i+1; Skill[i] = { name = "Heal", use = (health <= .50) }
i=i+1; Skill[i] = { name = "Urgent Heal", use = (health <= .80) }
i=i+1; Skill[i] = { name = "Regenerate", use = ((health <= .95) and (not string.find(buffs, "Regenerate"))) }
i=i+1; Skill[i] = { name = "Grace of Life", use = (not string.find(pbuffs, "Grace of Life")) }
i=i+1; Skill[i] = { name = "Amplified Attack", use = (friendly and (not string.find(tbuffs, "Amplified Attack"))) }
i=i+1; Skill[i] = { name = "Enhanced Armor", use = (not string.find(pbuffs, "Enhanced Armor")) }
i=i+1; Skill[i] = { name = "Bone Chill", use = ((not friendly) and (not string.find(tbuffs, "Bone Chill"))) }
i=i+1; Skill[i] = { name = "Rising Tide", 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 |
function KnightGeneric(arg1, arg2)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player", "target"))
local shield = (GetEquipSlotInfo(17) ~= nil)
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { name = "Whirlwind Shield", use = ((not friendly) 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 Seals 3") and (not string.find(pbuffs, "Threaten")) and (arg2 == "threaten")) }
i=i+1; Skill[i] = { name = "Mana Return", use = (string.find(tbuffs, "Holy Seals 3")) }
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 |
/run KnightGeneric() |
|
|
Source code |
1 |
/run KnightGeneric("","threaten")
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
function ScoutPriest(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
i=i+1; Skill[i] = { ['name'] = "Frost Arrow", ['use'] = (not ChkBuff("player","Frost Arrow")) }
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 (PctH("player") <= .85) and (focus >= 20)) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
-- i=i+1; Skill[i] = { ['name'] = "Piercing Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Snipe", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
I added a health check to Vamp Arrows, since it gives a small regen due to the s/p elite.|
|
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 |
function PriestScout(arg1)
local Skill = {}
local i = 0
local tgt = "player"
local friendly = false
local combat = GetPlayerCombatState()
if not UnitCanAttack("player","target") then
tgt = "target"
friendly = true
end
local health = PctH(tgt)
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { ['name'] = "Soul Bond", ['use'] = (not string.find(pbuffs,"Soul Bond")) }
i=i+1; Skill[i] = { ['name'] = "Embrace of the Water Spirit", ['use'] = (not string.find(pbuffs,"Embrace of the Water Spirit")) }
i=i+1; Skill[i] = { ['name'] = "Soul Source", ['use'] = (health <= .20) }
i=i+1; Skill[i] = { ['name'] = "Holy Aura", ['use'] = (PctH("player") <= .40) }
i=i+1; Skill[i] = { ['name'] = "Heal", ['use'] = (health <= .50) }
i=i+1; Skill[i] = { ['name'] = "Urgent Heal", ['use'] = (health <= .80) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = ((not friendly) and (health <= .90) and (not string.find(pbuffs,"Regenerate"))) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = (friendly and (health <= .90) and (not string.find(tbuffs,"Regenerate"))) }
i=i+1; Skill[i] = { ['name'] = "Grace of Life", ['use'] = ((not combat) and (not string.find(pbuffs,"Grace of Life"))) }
i=i+1; Skill[i] = { ['name'] = "Amplified Attack", ['use'] = ((not combat) and (friendly and (not string.find(tbuffs,"Amplified Attack")))) }
i=i+1; Skill[i] = { ['name'] = "Bone Chill", ['use'] = ((not friendly) and (not string.find(tbuffs,"Bone Chill"))) }
i=i+1; Skill[i] = { ['name'] = "Rising Tide", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Magic Barrier", ['use'] = ((not combat) and (not string.find(pbuffs,"Magic Barrier"))) }
i=i+1; Skill[i] = { ['name'] = "Blessed Spring Water", ['use'] = ((not combat) and (not string.find(pbuffs,"Blessed Spring Water"))) }
MyCombat(Skill,arg1)
end
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
function RogueScout(arg1,arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { ['name'] = "Combat Master", ['use'] = (not string.find(pbuffs,"Combat Master")) }
i=i+1; Skill[i] = { ['name'] = "Poison", ['use'] = ((not combat) and (not string.find(pbuffs,"Poison"))) }
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'] = "Shadowstab", ['use'] = ((not friendly) and (energy >=35)) }
i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Shot", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
Quoted from "Tigsman;219002"
for the moment, i worked on my wife's R/S. she was looking for a replacement of the old RogueCombo that didnt do what she wanted.
Quoted from "Tigsman;219002"
still deciding if I want to toy with this for my k/w as what works from KnightCombo stll works for me, but I may try to work it out, but it would be multilayered with several different arg2 values, like injecting disarmament, punishment, perhaps a different way of having threaten and mana return fire off, not sure.. still thinking out the logic of the knightgeneric and what i can do with it.
Quoted from "Sixpax;219014"
I would suggest that you have it only cast Poison when she's out of combat because if it falls off in combat and she's getting attacked, it will continuously try to recast poison over and over until the mob doesn't interrupt her. Take a look at my PriestKnight function for an example of how to add the combat test to some of your skills.
Quoted from "Sixpax;219014"
I'll be happy to help with that if you like. Just let me know what the conditions are for using the different skills and I can try to come up with some definitions for their "use". You can start with the KnightGeneric function I posted and let me know what to add/change/delete.
Quoted from "jsalemi;219182"
GnatB is correct; UnitSkill("player") returns the value of your secondary class' mana/rage/energy/focus.
http://www.theromwiki.com/index.php/API:UnitSkill
|
|
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 |
function 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
|
Quoted from "Tigsman;219025"
well, they would be loosely based in the KnightCombo that I use now. one variant runes the HS spam with threaten or mana return thrown in when 3 seals are avail, but the addon does allow for selecting via gui, Threaten, MR or autoswapping when the seals are avail. I know I dont/won't have that here, but im thinking if i can do the variable or not of swapping, just havent figured out how. i.e. seals avail, threaten, seals used.. spam the rest of set, seals avail, use mana return, seals used.. spam the rest again, seals avail, threaten used this time.. in a rotating fashion. helps bring back some mana and still throw out threaten to boost my aggro. this is good for long fights when no angels blessing is avail from my party.
|
|
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 64 65 66 67 68 69 70 71 |
-- somewhere up top, perhaps in ReadSkill()
cycleindex=0
cycletable={"Threaten","Mana Return"}
function KnightGenericAutoThreaten(arg1,arg2)
local Skill = {}
local i = 0
local tgt = "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 <= .25) }
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 (cycletable[cycleindex] <> "Threaten")) }
i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seal III") and (cycletable[cycleindex] <> "Mana Return")) }
i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield", ['use'] = ((not friendly) and shield) }
i=i+1; Skill[i] = { ['name'] = "Holy Strike", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
function MyCombat(Skill,arg1)
local spell_name = UnitCastingTime("player")
local talktome = false
if (arg1 == "v1") or (arg1 == "v2") then
talktome = true
end
if spell_name ~= nil then
if (arg1 == "v2") then Msg("- ['..spell_name..']",0,1,1) end
return false
end
for x,tbl in ipairs(Skill) do
if CD(Skill[x].name) and Skill[x].use then
if talktome then Msg("- "..Skill[x].name) end
CastSpellByName(Skill[x].name)
--Added
if cycletable ~= nil then
for z = 0, #cycletable, 1 do
if Skill[x].name == cycletable[z] then
cycleindex = (cycleindex + 1) % (#cycletable + 1)
break
end
end
end
return true
end
end
if (arg1 == "v2") then Msg("- IDLE") end
return false
end
|
Quoted from "Tigsman;219025"
well, they would be loosely based in the KnightCombo that I use now. one variant runes the HS spam with threaten or mana return thrown in when 3 seals are avail, but the addon does allow for selecting via gui, Threaten, MR or autoswapping when the seals are avail. I know I dont/won't have that here, but im thinking if i can do the variable or not of swapping, just havent figured out how. i.e. seals avail, threaten, seals used.. spam the rest of set, seals avail, use mana return, seals used.. spam the rest again, seals avail, threaten used this time.. in a rotating fashion. helps bring back some mana and still throw out threaten to boost my aggro. this is good for long fights when no angels blessing is avail from my party.
|
|
Source code |
1 2 3 4 5 6 7 8 9 |
local usethreaten,usemanareturn = false,true -- by default only use Mana Return
if (arg2 == "justthreaten") then
usethreaten = true
usemanareturn = false
elseif (arg2 == "both") then
usethreaten = true
elseif (arg2 ~= nil) then
Msg("Unknown value for arg2: "..arg2) -- In case of typo
end
|
|
|
Source code |
1 2 |
i=i+1; Skill[i] = { name = "Threaten", use = (string.find(tbuffs,"Holy Seals 3") and usethreaten and (not string.find(pbuffs,"Threaten"))) }
i=i+1; Skill[i] = { name = "Mana Return", use = (string.find(tbuffs,"Holy Seals 3") and usemanareturn) }
|
Quoted from "Tigsman;219025"
The other variant i use, is spamming disarm until 4 avail, then follow through on the variant listed above. until disarm is no longer active, then it respams disarm. I use this version for relatively slow boss fights or soloing, as it helps bring down the pdef of the target helping me kill faster.
|
|
Source code |
1 2 3 4 |
local solo = true
if GetNumPartyMembers() > 1 then
solo = false
end
|
|
|
Source code |
1 2 3 4 |
local usedisarm = false
if IsShiftKeyDown() or solo then
usedisarm = true
end
|
|
|
Source code |
1 |
i=i+1; Skill[i] = { name = "Disarmament", use = (not string.find(tbuffs,"Disarmament IV") and usedisarm) }
|
Quoted from "Tigsman;219025"
i havent run an instance in a week or so, so give me some time to think about this more. Wish I could fit potting into this somehow, cause, tbh, most autobuffs, don't do a good job of forcing the pots in when they are necessary, and tend to be severely delayed in providing the needed pots (for me I'm usually short on mana) in a crunch, have to stop using macros and simple force the pot on my toon. just sumtin to keep in mind.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
function ScoutRogue(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
i=i+1; Skill[i] = { ['name'] = "Frost Arrow", ['use'] = (not ChkBuff("player","Frost Arrow")) }
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'] = "Piercing Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Weak Spot", ['use'] = ((not friendly) and (focus >= 30)) }
-- i=i+1; Skill[i] = { ['name'] = "Vampire Arrows", ['use'] = ((not friendly) and (focus >= 20)) }
i=i+1; Skill[i] = { ['name'] = "Sapping Arrow", ['use'] = (not friendly) }
i=i+1; Skill[i] = { ['name'] = "Wind Arrows", ['use'] = ((not friendly) and (focus >= 15)) }
i=i+1; Skill[i] = { ['name'] = "Snipe", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|