

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
function RogueScout(...)
--[[
Rogue/Scout bleeds
Bleed : 620313 - 10s (old value 500654?)
Blind Spot Bleed : 620297 - 6s
Sneak Attack Bleed : 500726 - 20s
--]]
local bleeds = {620313, 620297, 500726}
.
.
trySkill("Low Blow", TargetHasBuff(bleed))
.
.
end
|
|
|
Source code |
1 2 |
--BAD CODE; DON'T DO IT
trySkill("Wound Attack", TargetHasBuff({620313, 620297, 500726,"Grievous Wound"})
|
This post has been edited 4 times, last edit by "frafall" (May 14th 2014, 7:27am)
|
|
Source code |
1 2 3 4 5 |
bleed = api.CreateFDTimer("Bleed", 1) -- argument indicates delta to use in starting new
trySkill("Sneak Attack", (not PlayerInCombat) and PlayerMana >= 20 and IsBehind, bleed(21))
trySkill("Blind Spot", PlayerMana >= 20 and IsBehind, bleed(6))
trySkill("Shadowstab", PlayerMana >= 20, bleed(10))
|
|
|
Source code |
1 |
trySkill("Shadowstab", PlayerMana >= 20, bleed)
|
This post has been edited 1 times, last edit by "frafall" (May 14th 2014, 9:17am)
Thanks!
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
-- Maintain Hero, Speed pots, HP pots and stuff
try("action", hero, PlayerHasBuff("Hero Magic Medicine") and PlayerHasBuff("Hero Magic Medicine").time <= 5)
try("action", uni, PlayerHasBuff("Touch of the Unicorn") and PlayerHasBuff("Touch of the Unicorn").time <= 5)
-- We have a target?
if GotTarget and not TargetIsDead then
api.CreateFDTimer("Bleed", 9.0)
try("skill", Skills["Premeditation"].entry, (not PlayerInCombat) and IsTargetType("boss") and PlayerMana >= 50)
try("skill", Skills["Informer"].entry, (IsTargetType("boss") or IsTargetType("elite")) and not PlayerHasBuff("Informer"))
-- deleted
end
|
|
|
Source code |
1 2 3 |
perform SelfHeal perform PotUp perform DoRotation |
This post has been edited 1 times, last edit by "Peryl" (May 14th 2014, 12:20pm)

|
|
Source code |
1 2 |
try("skill", Skills["Premeditation"].entry, (not PlayerInCombat) and IsTargetType("boss") and PlayerMana >= 50)
try("skill", Skills["Informer"].entry, (IsTargetType("boss") or IsTargetType("elite")) and not PlayerHasBuff("Informer"))
|
|
|
Source code |
1 2 3 |
if not try("skill", Skills["Premeditation"].entry, (not PlayerInCombat) and IsTargetType("boss") and PlayerMana >= 50)
then if not try("skill", Skills["Informer"].entry, (IsTargetType("boss") or IsTargetType("elite")) and not PlayerHasBuff("Informer"))
then if not ...
|
|
|
Source code |
1 |
vars.IsTargetPlayer = function () return vars.IsTargetType("player") end
|
|
|
Source code |
1 |
return not not vars.IsTargetType("player")
|
|
|
Source code |
1 |
return vars.IsTargetType( {"player"} )
|
|
|
Source code |
1 |
return vars.IsTargetType{"player"}
|
|
|
Source code |
1 |
try("skill", Skills["Premeditation"].entry, fdvars.Triggered or ((not PlayerInCombat) and IsTargetType("boss") and PlayerMana >= 50) )
|
|
|
Source code |
1 2 |
local fd = FuzzyDIYCE local fdvars = fd.FDVars |
This post has been edited 3 times, last edit by "Peryl" (May 15th 2014, 4:54am)
|
|
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 |
vars.IsTargetType = {
-- types are "player","boss","elite","hard","mob","self","npc","pet","other"
func = function (arglist)
local arglist = type(arglist) == "table" and arglist or {arglist}
local trgttype
local desiredtype = arglist[1]
if not UnitExists("target") then
return false
end
for k, desiredtype in pairs(arglist) do
if desiredtype == "player" then
trgttype = UnitIsPlayer("target")
elseif desiredtype == "hard" then
trgttype = UnitSex("target") >= 2
elseif desiredtype == "boss" then
trgttype = UnitSex("target") > 2
elseif desiredtype == "elite" then
trgttype = UnitSex("target") == 2
elseif desiredtype == "mob" then
trgttype = UnitCanAttack("player", "target") and not UnitIsPlayer("target")
elseif desiredtype == "self" then
trgttype = UnitIsUnit("target", "player")
elseif desiredtype == "npc" then
trgttype = not UnitCanAttack("player", "target") and not UnitIsPlayer("target")
elseif desiredtype == "pet" then
trgttype = not not UnitMaster("target") -- The double not converts non boolean values to boolean
end
if trgttype then return true end
end
return false
end,
args = {
{ names = {"player", "boss", "elite", "hard", "npc", "mob", "self", "pet"} },
},
}
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
fd.Vars = setmetatable({}, {
__index = function (t, k)
if _CachedVars[k] then
if _CachedVars[k].template then
return _CachedVars[k] -- this is a templated var, so just return the entry
elseif _CachedVars[k].cache ~= CacheNum then
-- Data currently in cache is out of date, so update it
_CachedVars[k].value = _CachedVars[k].func()
_CachedVars[k].cache = CacheNum
end
-- Send cached result back
api.FDMsg("DEBUG: "..tostring(_CachedVars[k].value))
return _CachedVars[k].value
end
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
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(...)
local skip = fdvars.Triggered
-- Silence target skills
trySkill("Throat Attack", skip or SilenceThis)
-- Survival
trySkill("Evasion", skip or PlayerInCombat and PlayerHealthPct < .5)
-- We have a target?
if GotTarget and IsEnemy and not TargetIsDead then
local BleedTimer = api.CreateFDTimer("Bleed", 0, 0.5)
trySkill("Premeditation", skip or ((not PlayerInCombat) and IsTargetBoss and PlayerEnergy >= 50))
trySkill("Informer", skip or (IsTargetType(dangerous) and not PlayerHasBuff("Informer")))
trySkill("Sneak Attack", skip or ((not PlayerInCombat) and IsTargetType(dangerous) and PlayerEnergy >= 20 and IsBehind), BleedTimer(21))
trySkill("Shadow Step", skip or (IsTargetBoss and PlayerEnergy >= 50 and not IsBehind))
trySkill("Blind Spot", skip or (PlayerEnergy >= 20 and IsBehind), BleedTimer(6))
trySkill("Shadowstab", skip or PlayerEnergy >= 20, BleedTimer(10))
trySkill("Wound Attack", skip or (TargetHasBuff(bleeds) and TargetHasBuff("Grievous Wound")))
trySkill("Low Blow", skip or TargetHasBuff(bleeds))
trySkill("Shot", not skip)
end
if (TargetIsDead or not GotTarget) and (IsSiege or ShiftHeld) then
target("select", "next", "enemy")
end
end
|
... and thanks for incorporating many of the given suggestions 
Also, my Mage script with mode=melee uses Discharge and Purge without a target, etc.
As you see, I calculate a variable "wantWoundAttack" which is true if the required bleeds are present and wound-attack is out of cool down. This requires access to the CD function. Could I still do this in FD? (Or can you convince me that I should not want this, and the timer solution is superior?
)|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 |
if enemy then
wantWoundAttack = (tbuffs[620314] and tbuffs[500654] and CD("Wound Attack") )
-- if true, and we don't have energy for WA, then do not waste energy on LB or SS, but use filler skill to regen energy
Skill2 = {
-- many deleted lines
-- MAIN ROTATION
{ name = "Wound Attack", use = ( (pctEB1 >= .35) and wantWoundAttack )}, -- I, CD 0:06
{ name = "Low Blow", use = ( (pctEB1 >= .25) and (not wantWoundAttack) and tbuffs[500654] ) }, -- causes 10 sec Grievous Wound
{ name = "Shadowstab", use = ( (pctEB1 >= .20) and (not wantWoundAttack) and (not tbuffs[500654]) ) }, -- causes 10 sec Bleed
-- many deleted lines
}
|
Of course, I should backup my own code before installing new/updated add-ons, but some day, someone is going to forget this...|
|
Source code |
1 2 3 4 5 |
local function InitPlugin()
api.FDLoad("Rogue", "Mage", PLUGIN_PATH..PLUGIN_FOLDER.."RogueMage.lua")
api.FDLoad("Rogue", "Scout", PLUGIN_PATH..PLUGIN_FOLDER.."RogueScout.lua")
-- etc
end
|
This post has been edited 3 times, last edit by "frafall" (May 23rd 2014, 12:33pm)
This post has been edited 1 times, last edit by "pietroasp" (May 23rd 2014, 12:03pm)
) But, by just using scripts that you don't understand, well...