Quoted from "Reinforcements;271360"
I tried scanning all 42 pages, but didn't see a ScoutKnight function posted. Did I miss it, or can someone help me make one?
Many thanks.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
function ScoutKnight(arg1)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player","target"))
local combat = GetPlayerCombatState()
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
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 = (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 = "Vampire Arrows", use = ((not friendly) and (focus >= 20)) }
i=i+1; Skill[i] = { name = "Disarmament", use = ((not friendly) and (not string.find(tbuffs,"Disarmament IV"))) }
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
|
|
|
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 |
function PriestWarriorSolo(arg1)
local Skill = {}
local i = 0
local mana = UnitMana("player")
local rage = UnitSkill("player")
local friendly = (not UnitCanAttack("player", "target"))
local tbuffs = BuffList("target")
local pbuffs = BuffList("player")
i=i+1; Skill[i] = { ['name'] = "Soul Source", ['use'] = (PctH("player") < .10) }
i=i+1; Skill[i] = { ['name'] = "Holy Aura", ['use'] = (PctH("player") < .25) }
i=i+1; Skill[i] = { ['name'] = "Action: 52 (Health Potion)", ['use'] = (PctH("player") < .50) }
i=i+1; Skill[i] = { ['name'] = "Action: 50 (Mana Potion)", ['use'] = (PctM("player") < .25) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = (PctH("player") < .90) }
i=i+1; Skill[i] = { ['name'] = "Urgent Heal", ['use'] = (PctH("player") < .75) }
i=i+1; Skill[i] = { ['name'] = "Heal", ['use'] = (PctH("player") < .60) }
i=i+1; Skill[i] = { ['name'] = "Soul Bond", ['use'] = (not string.find(pbuffs, "Soul Bond")) }
i=i+1; Skill[i] = { ['name'] = "Battle Monk Stance", ['use'] = (not string.find(pbuffs, "Battle Monk Stance")) }
i=i+1; Skill[i] = { ['name'] = "Power Build-Up", ['use'] = (not string.find(pbuffs, "Power Build-Up")) }
-- i=i+1; Skill[i] = { ['name'] = "Condensed Rage", ['use'] = (not string.find(pbuffs, "Condensed Rage")) }
i=i+1; Skill[i] = { ['name'] = "Amplified Attack", ['use'] = (not string.find(pbuffs, "Amplified Attack")) }
i=i+1; Skill[i] = { ['name'] = "Grace of Life", ['use'] = (not string.find(pbuffs, "Grace of Life")) }
i=i+1; Skill[i] = { ['name'] = "Enraged", ['use'] = ((rage <= 50) and (combat)) }
i=i+1; Skill[i] = { ['name'] = "Ascending Dragon Strike", ['use'] = ((not friendly) and (rage >= 30)) }
i=i+1; Skill[i] = { ['name'] = "Fighting Spirit Combination", ['use'] = ((not friendly) and (mana >= 200)) }
i=i+1; Skill[i] = { ['name'] = "Explosion of Fighting Spirit", ['use'] = ((not friendly) and (mana >= 200)) }
i=i+1; Skill[i] = { ['name'] = "Slash", ['use'] = ((not friendly) and (rage >= 25) and (not string.find(tbuffs, "Bleed"))) }
MyCombat(Skill, arg1)
end
|
Quoted from "Reinforcements;271517"
Thanks for the quick reply Sixpax, I had completely missed that earlier code.
I pasted your revised function onto the end of your combat engine, and am getting an error when I try to execute the macro "/run ScoutKnight()"
The error says "...Attempt to call global 'ScoutKnight' (a nil value)"
Quoted from "Vaeliorin;271754"
The problem is that Power Build-Up keeps recasting every time the cooldown is over. The buff name on the tooltip is the same as the spell name (at least so far as I can tell...there might be an extra space or something in there.)
I tried running the /run Msg(Bufflist("target")) macro with myself as the target, and also changing "target" to "player" with no success (nothing was returned).
|
|
Source code |
1 |
/run Msg(BuffList("player"))
|
Quoted from "ilaelyn;271775"
Maybe I'm just blind, but looking for help to set up in the engine that Blood Arrow is auto cast and removed if health drops below 25%, and Savage Power, Arrow of Essence, and Concentration are cast when they are available. Thanks much.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
function ScoutSpecials(arg1,arg2)
local Skill = {}
local i = 0
local focus = UnitMana("player")
local friendly = (not UnitCanAttack("player", "target"))
local combat = GetPlayerCombatState()
local health = PctH("player")
local pbuffs = BuffList("player")
i=i+1; Skill[i] = { name = "Blood Arrow", use = (combat and (not string.find(pbuffs, "Blood Arrow")) and (health >= .75)) }
i=i+1; Skill[i] = { name = "Blood Arrow", use = (string.find(pbuffs, "Blood Arrow") and ((not combat) or (health <= .25))) }
i=i+1; Skill[i] = { name = "Savage Power", use = (combat and (not string.find(pbuffs, "Savage Power"))) }
i=i+1; Skill[i] = { name = "Arrow of Essence", use = (combat) }
i=i+1; Skill[i] = { name = "Concentration", use = (combat and (not string.find(pbuffs, "Concentration"))) }
MyCombat(Skill, arg1)
end
|
|
|
Source code |
1 |
/run ScoutSpecials() |
Quoted from "Sixpax;271794"
The "L" is capital in BuffList. So you need to run this command (can be done from the chat window or from a macro):
![]()
Source code
1/run Msg(BuffList("player"))
)
Quoted from "Mousekawitz;272276"
Haha, tried patching one together, ended up breaking it so bad it won't even read my class skills anymore, hahaa. Have to clear it out and redo it all.. Found a good warrior/scout function on page 4, still need s/w, which is mainly using berserk and the elites.
|
|
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 |
function General(arg1,arg2)
local Skill = {}
local i = 0
local tgt = "player"
local mana = PctM(tgt)
local health = PctH(tgt)
local friendly = (not UnitCanAttack("player","target"))
local shield = (GetEquipSlotInfo(17) ~= nil)
local tspell,ttime,telapsed = UnitCastingTime("target")
local combat = GetPlayerCombatState()
local bigparty = (GetNumPartyMembers() > 2)
if friendly then
tgt = "target"
end
local pbuffs = BuffList("player")
local tbuffs = BuffList("target")
i=i+1; Skill[i] = { ['name'] = "Hall of Dead Heroes", ['use'] = (health <= .10) }
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'] = "Action: 20 (Mana Pot)" , ['use'] = (mana < .40) }
i=i+1; Skill[i] = { ['name'] = "Action: 61 (Banquet)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Dragon's Banquet"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 62 (Tea Waffle)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Tea-scented Waffle"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 63 (Holy Power)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Potion of Holy Power"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 64 (Mana Source)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Mana Source"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 65 (Life Source)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Life Source"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 66 (Crystal Sugar)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Crystal Sugar"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 67 (Fruit Pie)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Exotic Fruit Pie"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 68 (Stim)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Stimulant"))) }
i=i+1; Skill[i] = { ['name'] = "Action: 69 (Scent)", ['use'] = ((health < .99) and (not string.find(pbuffs,"Stimulating Scent"))) }
i=i+1; Skill[i] = { ['name'] = "Shock", ['use'] = ((not friendly) and (ttime > 1) and (ttime - telapsed > 0.5)) }
-- i=i+1; Skill[i] = { ['name'] = "Charge", ['use'] = ((not friendly) and (ttime > 1) and (ttime - telapsed > 0.5)) }
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'] = "Charge", ['use'] = ((not friendly) and (not string.find(tbuffs,"Charge"))) }
i=i+1; Skill[i] = { ['name'] = "Holy Aura", ['use'] = (health <= .25) }
i=i+1; Skill[i] = { ['name'] = "Holy Shield", ['use'] = (health <= .33) }
i=i+1; Skill[i] = { ['name'] = "Resolution", ['use'] = (health <= .40) }
i=i+1; Skill[i] = { ['name'] = "Urgent Heal", ['use'] = (health <= .50) }
i=i+1; Skill[i] = { ['name'] = "Urgent Heal", ['use'] = (friendly and (health <= .50)) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = ((not friendly) and (health <= .95) and (not string.find(pbuffs,"Regenerate"))) }
i=i+1; Skill[i] = { ['name'] = "Regenerate", ['use'] = (friendly and (health <= .95) and (not string.find(tbuffs,"Regenerate"))) }
i=i+1; Skill[i] = { ['name'] = "Holy Smite", ['use'] = ((not friendly) and (not bigparty) and string.find(tbuffs,"Holy Light's Fury")) }
i=i+1; Skill[i] = { ['name'] = "Holy Light's Fury", ['use'] = ((not friendly) and (not bigparty) and (not string.find(tbuffs,"Holy Light's Fury"))) }
i=i+1; Skill[i] = { ['name'] = "Shield of Atonement", ['use'] = ((not friendly) and shield) }
i=i+1; Skill[i] = { ['name'] = "Shield of Valor", ['use'] = ((not friendly) and shield) }
i=i+1; Skill[i] = { ['name'] = "Whirlwind Shield", ['use'] = ((not friendly) and shield) }
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'] = "Disarmament", ['use'] = ((not friendly) and (not bigparty) and (not string.find(tbuffs,"Disarmament IV"))) }
i=i+1; Skill[i] = { ['name'] = "Shock", ['use'] = ((not friendly) and string.find(tbuffs,"Light Seal III") and (arg2 == "shock")) }
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
|