|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Hatred Strike", ['use'] = (not string.find(pbuffs,"Hatred Strike")) and (arg2 == "threaten")) }
|
Quoted from "Tigsman;234695"
as for Hatred Strike just add this line where you want it.
that should work
![]()
Source code
1i=i+1; Skill[i] = { ['name'] = "Hatred Strike", ['use'] = (not string.find(pbuffs,"Hatred Strike")) and (arg2 == "threaten")) }
|
|
Source code |
1 |
i=i+1; Skill[i] = { name = "Hatred Strike", use = ((not string.find(pbuffs,"Hatred Strike")) and (arg2 == "threaten")) }
|
|
|
HTML |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
function WarriorKnight(arg1,arg2)
local Skill = {}
local i = 0
local friendly = (not UnitCanAttack("player","target"))
local rage = UnitMana("player")
local focus = UnitSkill("player")
local tbuffs = BuffList("player")
local pbuffs = BuffList("target")
local tspell = UnitCastingTime("target")
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = ((not friendly) and (not string.find(tbuffs,"Disarmament I")) and (arg2 == "disarm")) }
i=i+1; Skill[i] = { ['name'] = "Enraged", ['use'] = ((not friendly) and (rage <= 50)) }
i=i+1; Skill[i] = { ['name'] = "Slash", ['use'] = ((not friendly) and (rage >= 25) and (not string.find(tbuffs,"Bleed"))) }
i=i+1; Skill[i] = { ['name'] = "Tactical Attack", ['use'] = ((not friendly) and (rage >= 15) and string.find(tbuffs,"Bleed")) }
i=i+1; Skill[i] = { ['name'] = "Open Flank", ['use'] = ((not friendly) and (rage >= 10) and string.find(tbuffs,"Bleed")) }
i=i+1; Skill[i] = { ['name'] = "Probing Attack", ['use'] = ((not friendly) and (rage >= 20) and string.find(tbuffs,"Bleed")) }
i=i+1; Skill[i] = { ['name'] = "Enhanced Armor", ['use'] = (not string.find(pbuffs,"Enhanced Armor")) }
i=i+1; Skill[i] = { ['name'] = "Blocking Stance", ['use'] = (not string.find(pbuffs,"Blocking Stance")) }
MyCombat(Skill,arg1)
end
|
Quoted from "dharleyman;235644"
![]()
Source code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21function WarriorKnight(arg1,arg2) local Skill = {} local i = 0 local friendly = (not UnitCanAttack("player","target")) local rage = UnitMana("player") local mana = UnitSkill("player") local pbuffs = BuffList("player") local tbuffs = BuffList("target") i=i+1; Skill[i] = { ['name'] = "Enhanced Armor", ['use'] = (not string.find(pbuffs,"Enhanced Armor")) } i=i+1; Skill[i] = { ['name'] = "Blocking Stance", ['use'] = (not string.find(pbuffs,"Blocking Stance")) } i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = ((not friendly) and (not string.find(tbuffs,"Disarmament IV")) and (arg2 == "disarm")) } i=i+1; Skill[i] = { ['name'] = "Enraged", ['use'] = ((not friendly) and (rage <= 50)) } i=i+1; Skill[i] = { ['name'] = "Tactical Attack", ['use'] = ((not friendly) and (rage >= 15) and string.find(tbuffs,"Bleed")) } i=i+1; Skill[i] = { ['name'] = "Open Flank", ['use'] = ((not friendly) and (rage >= 10) and string.find(tbuffs,"Bleed")) } i=i+1; Skill[i] = { ['name'] = "Probing Attack", ['use'] = ((not friendly) and (rage >= 20) and string.find(tbuffs,"Bleed")) } i=i+1; Skill[i] = { ['name'] = "Slash", ['use'] = (not friendly) } MyCombat(Skill,arg1) end
|
|
Source code |
1 |
i=i+1; Skill[i] = { ['name'] = "Feint", ['use'] = (not friendly) }
|
Quoted from "dharleyman;235843"
Awesome. Thanks for the help Tigs.
I have 1 other question. I want to cast Feint if the enemy dodges, but i'm having issues with this test.
where slot 19 on skill bar is Feint.
![]()
HTML
1i=i+1; Skill[i] = { ['name'] = "Feint", ['use'] = (if GetActionUsable(19)) }
Any ideas?
Quoted from "Tigsman;235852"
I would not do by slots as things change, besides not sure it would work in this engine.
Quoted from "Tigsman;235852"
The creator would know more, but since if you cast feint they need to have dodged, the casting of feint should only need to know that the target is not friendly. I would simply put it first in the progressing before buffs. That should work.
Quoted from "Tigsman;235852"
I would not do by slots as things change, besides not sure it would work in this engine. The creator would know more, but since if you cast feint they need to have dodged, the casting of feint should only need to know that the target is not friendly. I would simply put it first in the progressing before buffs. That should work.
T
![]()
Source code
1i=i+1; Skill[i] = { ['name'] = "Feint", ['use'] = (not friendly) }
|
|
Source code |
1 |
/script if(GetActionUsable(32)) then UseAction(32); else WarriorKnight(); end; |
|
|
Source code |
1 |
/script if(GetActionUsable(32)) then UseAction(32); elseif(((UnitSkill("player") >= 150) and (not GetActionUsable(11))) and (GetActionUsable(12))) then UseAction(12); else WarriorKnight(); 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 |
function RogueKnight(arg1,arg2)
local Skill = {}
local i = 0
local energy = UnitMana("player")
local mana = UnitSkill("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 string.find(pbuffs,"Enhanced Armor")) }
i=i+1; Skill[i] = { ['name'] = "Lions Protection", ['use'] = (not string.find(pbuffs,"Lions Protection")) }
i=i+1; Skill[i] = { ['name'] = "Premeditation", ['use'] = ((not string.find(pbuffs,"Premeditation")) and (not combat)) }
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 Spot", ['use'] = ((not friendly) and (energy >=25) and (arg2=="behind")) }
i=i+1; Skill[i] = { ['name'] = "Shadowstab", ['use'] = ((not friendly) and (energy >=35)) }
i=i+1; Skill[i] = { ['name'] = "Disarmament", ['use'] = (not friendly) }
MyCombat(Skill,arg1)
end
|
Quoted from "LucasUpright;236835"
Working on a RogueKnight function but have a question on syntax: what is the difference between using "not ChkBuff("player","Enhanced Armor")" and "not string.find(pbuffs,"Ehanced Armor")" or is there one?
Quoted from "jsalemi;236877"
I've been curious about this one myself, since I see both in various combat scripts here. As far as I can tell, they both do the same thing, except the first uses a custom function and the later a built-in function.
Quoted from "LucasUpright;236835"
Working on a RogueKnight function but have a question on syntax: what is the difference between using "not ChkBuff("player","Enhanced Armor")" and "not string.find(pbuffs,"Ehanced Armor")" or is there one?
Quoted from "LucasUpright;236849"
Preliminary function for RogueKnight:
![]()
Source code
1 <snip>
How does that look?
|
|
Source code |
1 2 |
i=i+1; Skill[i] = { ['name'] = "Mana Return", ['use'] = (string.find(tbuffs,"Holy Seals %(3%)") and (mana <= .99)) }
i=i+1; Skill[i] = { ['name'] = "Threaten", ['use'] = (string.find(tbuffs,"Holy Seals %(3%)") and (not string.find(pbuffs,"Threaten"))) }
|