This post has been edited 4 times, last edit by "frafall" (May 8th 2014, 9:32pm) with the following reason: New features
|
|
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 |
local fd = FuzzyDIYCE
local api = fd.API
local Skills = fd.Skills
-- Set the environment for the scripts to run in
api.SetDefaultScriptApartment()
function WarriorWarden(mode, hero, uni)
local hero = hero or 59
local uni = uni or 60
-- Silence target skills
try("skill", Skills["Shout"].entry, SilenceThis)
-- Survival skills
try("skill", Skills["Survival Instinct"].entry, PlayerInCombat and PlayerHealthPct < .5 )
try("skill", Skills["Defensive Formation"].entry, PlayerInCombat and PlayerHealthPct < .5 and PlayerMana >= 25 )
try("skill", Skills["Elven Amulet"].entry, PlayerInCombat and PlayerHealthPct < .4 )
-- Long buffs (XXX: Mana/Mana2 enough?)
try("skill", Skills["Battle Creed"].entry, (not PlayerHasBuff("Battle Creed")) or PlayerHasBuff("Battle Creed").time <= 5)
-- Maintain Hero, Speed pots, HP pots and speed pots
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 IsEnemy and not TargetIsDead then
-- Timer for Bleed
api.CreateFDTimer("Bleed", 7.0) -- Tune 6 - 7.5
-- Regenerate rage
try("skill", Skills["Enraged"].entry, IsTargetType{"boss"} and PlayerMana <= 20)
-- Surprise Attack
try("skill", Skills["Surprise Attack"].entry, true)
-- Maintain Briar Shield if in use, if not on skip (might be to avoid aoe's)
try("skill", Skills["Briar Shield"].entry, PlayerHasBuff("Briar Shield") and PlayerHasBuff("Briar Shield").time <= 5)
-- Make sure we get damage buff for party
try("skill", Skills["Savage Whirlwind"].entry, IsTargetType{"boss"} and PlayerSecMana >= 270)
-- Keep these going all times
try("skill", Skills["Slash"].entry, PlayerMana >= 25, "Bleed")
try("skill", Skills["Charged Chop"].entry, PlayerSecMana >= 260)
try("skill", Skills["Tactical Attack"].entry, TargetHasBuff("Bleed") and PlayerMana >= 15)
try("skill", Skills["Probing Attack"].entry, PlayerMana >= 20 and not TargetHasBuff("Vulnerable"))
try("skill", Skills["Open Flank"].entry, TargetHasBuff("Vulnerable") and PlayerMana >= 10)
-- If we can lessen damage boss gives
try("skill", Skills["Attack Weakener"].entry, IsTargetType{"boss"} and TargetHasBuff("Vulnerable") and PlayerSecMana >= 210)
end
-- Re-target if shift held down or in siegewars
if (TargetIsDead or not GotTarget) and (IsSiege or ShiftHeld) then
target("select", "next", "enemy")
end
end
|
|
|
Source code |
1 2 3 |
local function InitPlugin() api.FDLoad(PLUGIN_PATH..PLUGIN_FOLDER.."WarriorWarden.lua") 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 |
GotTarget IsEnemy PlayerInCombat CurrentZone ShiftHeld CtrlHeld AltHeld IsBehind InPvP TargetIsDead PlayerInParty PlayerInRaid TargetInParty TargetInRaid PlayerHealth PlayerHealthPct TargetHealth TargetHealthPct PlayerMana PlayerManaPct PlayerSecMana PlayerSecManaPct TargetMana TargetManaPct TargetSecMana TargetSecManaPct IsTargetType BuffTable TargetHasBuff PlayerHasBuff RSBleed Bleeding Dodged HaveOffhand SilenceThis IsSiege PetExists PetName PetHealth PetHealthPct PetActive |
This post has been edited 3 times, last edit by "frafall" (Apr 11th 2014, 7:04am)
|
|
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 |
local fd = FuzzyDIYCE
local api = fd.API
local Skills = fd.Skills
local fdvars = FuzzyDIYCE.FDVars
api.SetDefaultScriptApartment()
function WarriorWarden(mode, hero, uni)
local hero = hero or 43
local uni = uni or 58
local Caviar = Caviar or 47
local ManaPot = ManaPot or 21
local GCSkill = GCSkill or 24
try("skill", Skills["Survival Instinct"].entry, (IsTargetType{"boss"} and PlayerInCombat and PlayerHealthPct < .20))
try("skill", Skills["Battle Creed"].entry, (not PlayerHasBuff("Battle Creed")) or PlayerHasBuff("Battle Creed").time <= 120)
try("action", hero, PlayerHasBuff("Hero Magic Medicine") and PlayerHasBuff("Hero Magic Medicine").time <= 30)
try("action", uni, PlayerHasBuff("Touch of the Unicorn") and PlayerHasBuff("Touch of the Unicorn").time <= 15)
try("skill", Skills["Briar Shield"].entry, ((not PlayerInCombat) and (not PlayerHasBuff("Briar Shield")) or PlayerHasBuff("Briar Shield").time <= 120))
try("action", GCSkill, ((not PlayerHasBuff("Composure")) or PlayerHasBuff("Composure").time <= 120))
if IsEnemy and not TargetIsDead then
try("skill", Skills["Power of the Wood Spirit"].entry, (IsShiftKeyDown() and PlayerSecMana >= 400))
try("skill", Skills["Blasting Cyclone"].entry, (IsShiftKeyDown() and PlayerMana >= 35))
try("skill", Skills["Moon Cleave"].entry, (IsShiftKeyDown() and PlayerMana >= 50))
try("skill", Skills["Air Tremor"].entry, (IsShiftKeyDown() and PlayerSecMana >= 2000 and PlayerSecManaPct > .15))
try("skill", Skills["Charged Chop"].entry, PlayerSecMana >= 600)
try("action", ManaPot, (IsTargetType{"boss"} and PlayerMana <= 10000))
try("skill", Skills["Berserk"].entry, (IsTargetType{"boss"} and (not IsShiftKeyDown()) and PlayerMana >= 25))
try("action", Caviar, (IsTargetType{"boss"} and ((not PlayerHasBuff("Caviar Sandwich")) or (PlayerHasBuff("Caviar Sandwich").time <= 3))))
try("skill", Skills["Attack Weakener"].entry, TargetHasBuff("Vulnerable") and PlayerSecMana >= 900)
try("skill", Skills["Open Flank"].entry, TargetHasBuff("Vulnerable") and PlayerMana >= 10)
try("skill", Skills["Savage Whirlwind"].entry, ((not IsAltKeyDown()) and PlayerSecMana >= 800))
try("skill", Skills["Probing Attack"].entry, PlayerMana >= 30)
try("skill", Skills["Slash"].entry, PlayerMana >= 30)
try("skill", Skills["Enraged"].entry, IsTargetType{"boss"} and PlayerMana <= 20)
end
if TargetIsDead then
TargetUnit("")
return
end
if (not GotTarget) or (not IsEnemy) then
for i=1,10 do
TargetNearestEnemy()
if (not UnitMaster("target")) then
break
end
end
if UnitMaster("target") then TargetUnit("")
end
return
end
end
|
|
|
Source code |
1 2 3 |
if (TargetIsDead or not GotTarget) then
target("select", "next", "enemy", "nopets")
end
|
This post has been edited 1 times, last edit by "frafall" (Apr 20th 2014, 6:49pm)
This post has been edited 2 times, last edit by "pietroasp" (Apr 21st 2014, 12:01am)
|
|
PHP Source code |
1 2 3 |
local a1,a2,a3,a4,a5,ASon = GetActionInfo(20) -- # is your Autoshot slot number
{ name = "Autoshot", use = (not ASon) },
|
ScoutWarden.lua in C:\Runes Of Magic\interface\addons\FuzzyDIYCE\scriptsAdding combat scripts:
Write a script, there are some examples in the Addons/FuzzyDIYCE/scripts directory
Add your script to the Addons/FuzzyDIYCE/scripts directory
Add your script to the "InitPlugin" part of the Addons/FuzzyDIYCE/scripts/RegisterPlugin.lua
Relog
Now your script should be available to use as "/fdiyce YourScriptname"
Note, if you name your combat function as "MainclassSecondaryclass" it will also be available for the Attack plugin and you can call it as "/fdiyce Attack"
This post has been edited 6 times, last edit by "eguner" (May 7th 2014, 11:52am)
|
|
Source code |
1 2 3 4 5 |
local fdvars = fd.FDVars
if fdvars.Debug then
api.FDMsg("Some debug message")
end
|
This post has been edited 1 times, last edit by "frafall" (May 8th 2014, 4:08pm)