|
|
Source code |
1 |
{ name = "Savage Whirlwind", use = (pctEB2 >= .05) and (boss), timer = "Wild Howl", ignoretimer = (thealth <= .30)},
|
This post has been edited 1 times, last edit by "Notor" (May 20th 2014, 4:17pm)
|
|
Source code |
1 2 3 |
local myTimer = api.CreateFDTimer("Wild Howl", 0, 0.5)
trySkill("Savage Whirlwind", (PlayerManaPct >= 5) and IsTargetBoss, myTimer(10), (PlayerHealthPct <= 30))
|
This post has been edited 4 times, last edit by "frafall" (May 20th 2014, 10:21pm)


|
|
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 |
--[[
$Id: RogueScout.lua 42 2014-05-18 07:57:41Z frafall $
Rogue/Scout combat script
--]]
local fd = FuzzyDIYCE
local fdvars = fd.FDVars
local api = fd.API
-- Set the environment for the scripts to run in
api.SetDefaultScriptApartment()
--[[
Rogue/Scout bleeds
------------------
Bleed : 620313 - 10s (old value 500654?)
Blind Spot Bleed : 620297 - 6s
Sneak Attack Bleed : 500726 - 20s
--]]
local bleeds = {620313, 620297, 500726}
local dangerous = {"boss", "elite"}
function RogueScout(mode)
local hpPotAction = 39 -- action bar slot of HP pot
local foodAction = 40 -- action bar slot of house maid food
local unknownChoiceAction = 63 -- action bar slot of "Unknown Choice Rogue" ISS skill
local wantWoundAttack = false
local ranged = (mode == "ranged") -- If true, we prefer ranged skills
local strongBoss = (mode == "boss") -- We are up against a strong boss that needs "all we have"
if ranged then
api.FDMsg("ranged")
end
if strongBoss then
api.FDMsg("strongBoss")
end
-- heal / stay alive
trySkill( "Substitute", PlayerHealthPct < 30 and not PlayerHasBuff("Substitute") ) -- let substitute catch the next hit
tryAction( hpPotAction, PlayerHealthPct < 30 and not IsSiege )
-- buffs
trySkill( "Combat Master", not PlayerHasBuff("Combat Master") )
-- Food van housemaid cook.
tryAction( foodAction, not PlayerHasBuff("Unimaginable Salad")
and not PlayerHasBuff("Roast Leg of Lamb")
and not PlayerHasBuff("Fried Salted Fish")
and not PlayerHasBuff("Fried Rib") )
-- We have a target?
if GotTarget and IsEnemy and not TargetIsDead then
wantWoundAttack = (TargetHasBuff("Grievous Wound") and TargetHasBuff("Bleed") and CD("Wound Attack") )
-- if true, and we don't have energy for Wound Attack, then do not waste energy on LB or SS, but use filler skill to regen energy
if wantWoundAttack then
api.FDMsg("!! wantWoundAttack !!")
end
-- Silence / interrupt spell casting
trySkill( "Throat Attack", (PlayerEnergy >= 50) and SilenceThis and (IsSiege or IsTargetType(dangerous)) )
-- In SW, use low blow by default
-- trySkill( "Low Blow", (PlayerEnergy >= 25) and IsSiege )
-- Item-set skill that randomly creates one of three possible buffs. (cost 20 energy, CD=3min)
tryAction( 63, (not wantWoundAttack) and not PlayerHasBuff("Excite") and not PlayerHasBuff("Blood Boil") and not PlayerHasBuff("Immortality") )
-- Crit
trySkill( "Premeditation", (not PlayerInCombat) and (not PlayerHasBuff("Premeditation")) and (IsSiege or IsTargetType(dangerous)) ) -- next attack is crit with +40% dmg
trySkill( "Vampire Arrows", ranged and (PlayerFocus >= 20) )
trySkill( "Shot", ranged )
-- Strong Boss with HP < 30%
trySkill( "Fervent Attack", strongBoss and (TargetHealthPct <= 30) and (not PlayerHasBuff("Fervent Attack")) ) -- D 0:30, +PATT speed, -DEF
trySkill( "Assassins Rage", strongBoss and (TargetHealthPct <= 30) and (not PlayerHasBuff("Assassins Rage")) ) -- D 0:15, CD 5:00, +crit rate+dmg
trySkill( "Energy Thief", strongBoss and (TargetHealthPct <= 30) and (not PlayerHasBuff("Energy Thief")) ) -- D 0:15, CD 2:00, normal att +20 energy
-- Survival
trySkill("Evasion", PlayerInCombat and (PlayerHealthPct < 40)) -- D 0:20, CD 2:00, +40% dodge
if wantWoundAttack then
api.FDMsg("!!!! wantWoundAttack !!!!")
end
-- MAIN ROTATION
trySkill("Wound Attack", (PlayerEnergy >= 35) and (wantWoundAttack) ) -- I, CD 0:06
trySkill("Low Blow", (PlayerEnergy >= 25) and (not wantWoundAttack) and TargetHasBuff("Bleed")) -- causes 10 sec Grievous Wound
trySkill("Shadowstab", (PlayerEnergy >= 20) and (not wantWoundAttack) and (not TargetHasBuff("Bleed")) ) -- causes 10 sec Bleed
-- FILLERS: Rogue skills
trySkill( "Low Blow", (PlayerEnergy >= 25) and PlayerHasBuff("Energy Thief") ) -- energy restores fast, and LB better than scout skills
-- FILLERS: Scout skills
trySkill( "Vampire Arrows", PlayerFocus >= 20 ) -- out of energy or wait for WA, keep DPS up
trySkill( "Shot", true ) -- out of energy or wait for WA, keep DPS up
trySkill( "Joint Blow", true )
-- If all else unavailable
trySkill( "Attack", true )
end
if (TargetIsDead or not GotTarget) then
target("select", "next", "enemy")
end
end
|
|
|
Source code |
1 |
wantWoundAttack = (TargetHasBuff("Grievous Wound") and TargetHasBuff("Bleed") and CD("Wound Attack") )
|
|
|
Source code |
1 |
wantWoundAttack = (TargetHasBuff("Grievous Wound") and TargetHasBuff("Bleed") and not CD("Wound Attack") )
|
|
|
Source code |
1 |
wantWoundAttack = (tbuffs[620314] and tbuffs[500654] and CD("Wound Attack") )
|
|
|
Source code |
1 2 3 4 |
elseif CD(Skill[x].name) then
if talktome then Msg("- "..Skill[x].name) end
CastSpellByName(Skill[x].name)
return true
|
All works great@Notor:
The equivalent would be:
![]()
Source code
1 2 3local myTimer = api.CreateFDTimer("Wild Howl", 0, 0.5) trySkill("Savage Whirlwind", (PlayerManaPct >= 5) and IsTargetBoss, myTimer(10), (PlayerHealthPct <= 30))
The "cut cooldown short" is the time it should cast a skill before the cooldown is ready, ex a skill with 10s cooldown would, if we have CutCD = 0.5, be cast again at 9.5s. This increases/optimizes dps and is possible due to lag between your client and the server. I plan to use this in the timers as well, just havent gotten to it yet.
@krssrb:
Good, then I have an Idea why you had crashes and why it fails now, I'll dig a little into it and get back to u. It seems FD hasn't initialized your CutCD config variable which results in a numeric comparison with a nil value.
.frafall
|
|
Source code |
1 |
elseif mode == "aoe" then |
|
|
Source code |
1 |
/fdiyce Attack(aoe) |
|
|
Source code |
1 |
function WarriorWarden(mode) |
|
|
Source code |
1 2 3 |
if (TargetIsDead or not GotTarget) and (IsSiege or ShiftHeld) then
target("select", "next", "enemy")
end
|
|
|
Source code |
1 2 3 |
if (TargetIsDead or not GotTarget) then
target("select", "next", "enemy")
end
|
|
|
Source code |
1 2 3 |
-- Target selection/clearing -- target select [prev|next] [enemy|friend] [normal|players|nopets|custom] [custom function] function target(subcmd, selectdir, trgttype, option, customfunc) |
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
local function MyTargetFunction(prev, trgtfriendly)
local trgtfunc = trgtfriendly and TargetNearestFriend or TargetNearestEnemy
for i = 1,10 do
trgtfunc(prev)
if not UnitMaster("target") or UnitLevel("target") > 1 then
break
end
end
if UnitExists("target") and (UnitMaster("target") or UnitLevel("target" <= 1)) then
TargetUnit("")
end
end
if TargetIsDead or (not IsEnemy) then
target("clear")
end
if (TargetIsDead or not GotTarget) then
target("select", "next", "enemy", "custom", MyTargetFunction)
end
|
thx This post has been edited 1 times, last edit by "frafall" (May 29th 2014, 5:17pm)
|
|
Source code |
1 |
target("select", "next", "custom", MyTargetFunction)
|
|
|
Source code |
1 |
target("select", "next", "enemy", "custom", MyTargetFunction)
|
|
|
Source code |
1 2 3 4 5 6 |
-- Eat housemaid cook food, unless we have a better food buff active.
local foodAction = 40 -- action bar slot of house maid food
tryAction( foodAction, not PlayerHasBuff("Unimaginable Salad")
and not PlayerHasBuff("Roast Leg of Lamb")
and not PlayerHasBuff("Fried Salted Fish")
and not PlayerHasBuff("Fried Rib") )
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 |
-- Eat housemaid cook food, unless we have a better food buff active.
local foodAction = 40 -- action bar slot of house maid food
tryAction( foodAction, not PlayerHasBuff("Cheese Fishcake") -- Housemaid
and not PlayerHasBuff("Berry Sandwich") -- M. Damage
and not PlayerHasBuff("Garlic Bread") -- M. Attack
and not PlayerHasBuff("Fried Egg Sandwich") -- M. Damage
and not PlayerHasBuff("Light Fluffy Bread") -- M. Damage
and not PlayerHasBuff("Crispy Chicken Drumstick") -- M. Damage
and not PlayerHasBuff("Loaf of Magic Hard Bread") -- M. Attack
and not PlayerHasBuff("Charcoal Barbequed Beef") ) -- M. Attack
|
Unless you create food buff as separate item, shouldn't you check if you already have house maid food buff as well?