Mercurial > wow > skeencore3beastmasteryhunter
comparison SkeenCore3BeastMasteryHunter.lua @ 0:4dbfbe163c49 v1.0.1
Added files
| author | Emil Madsen <skeen@cs.au.dk> |
|---|---|
| date | Tue, 28 Jun 2011 14:10:09 +0200 |
| parents | |
| children | 629e6e84fd18 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4dbfbe163c49 |
|---|---|
| 1 -- | |
| 2 -- SkeenCore3BeastMasteryHunter | |
| 3 -- | |
| 4 | |
| 5 local function Rotation() | |
| 6 | |
| 7 local guid = UnitGUID("target") | |
| 8 local puid = UnitGUID("player") | |
| 9 | |
| 10 if UnitName("target") == nil or UnitIsFriend("player","target") ~= nil or UnitHealth("target") == 0 then | |
| 11 return nil-- ignore the dead and friendly | |
| 12 end | |
| 13 | |
| 14 local spell = {} | |
| 15 spell.current = nil | |
| 16 spell.next = nil | |
| 17 spell.cd1 = nil | |
| 18 spell.cd2 = nil | |
| 19 spell.cd3 = nil | |
| 20 spell.cd4 = nil | |
| 21 | |
| 22 local focus = UnitPower("player") | |
| 23 | |
| 24 --Cooldowns | |
| 25 local kill_command_cooldown = GetCooldown("Kill Command") | |
| 26 local kill_shot_cooldown = GetCooldown("Kill Shot") | |
| 27 local rapid_fire_cooldown = GetCooldown("Rapid Fire") | |
| 28 local focus_fire_cooldown = GetCooldown("Focus Fire") | |
| 29 local fervor_cooldown = GetCooldown("Fervor") | |
| 30 local bestial_wrath_cooldown = GetCooldown("Bestial Wrath") | |
| 31 | |
| 32 --Debuff | |
| 33 local serpent_sting_duration = GetDebuffDuration("Serpent Sting") | |
| 34 | |
| 35 -- Get the target's health percentage | |
| 36 local TargetsPercentOfHealth = (UnitHealth("target") / UnitHealthMax("target") * 100); | |
| 37 | |
| 38 if (kill_command_cooldown < 1) then | |
| 39 if (focus >= 40) then | |
| 40 spell.current = 34026 --KC | |
| 41 else | |
| 42 spell.next = 34026 --KC | |
| 43 end | |
| 44 elseif (serpent_sting_duration < 1) then | |
| 45 if (focus >= 25) then | |
| 46 spell.current = 1978 --SS; | |
| 47 else | |
| 48 spell.next = 1978 --SS; | |
| 49 end | |
| 50 elseif ((TargetsPercentOfHealth < 20) and (kill_shot_cooldown<1)) then | |
| 51 spell.current = 53351 --Kill Shot | |
| 52 elseif (focus >= 25) then | |
| 53 spell.current = 3044 --Arcane Shot | |
| 54 else | |
| 55 spell.current = 77767 --Cobra Shot | |
| 56 end | |
| 57 | |
| 58 if (rapid_fire_cooldown < 1) then | |
| 59 spell.cd1 = 3045 --Rapid fire | |
| 60 end | |
| 61 | |
| 62 if (focus_fire_cooldown < 1) then | |
| 63 spell.cd2 = 82692 --Focus fire | |
| 64 end | |
| 65 | |
| 66 if (fervor_cooldown < 1) then | |
| 67 spell.cd3 = 82726 --Fervor | |
| 68 end | |
| 69 | |
| 70 if (bestial_wrath_cooldown < 1) then | |
| 71 spell.cd4 = 19574 --Bestial Wrath | |
| 72 end | |
| 73 | |
| 74 return spell | |
| 75 end | |
| 76 | |
| 77 local SkeenCore3 = _G["SkeenCore3"] | |
| 78 | |
| 79 local SkeenPlugin = {} | |
| 80 SkeenPlugin.Name = "SkeenCore3BeastMasteryHunter" | |
| 81 SkeenPlugin.Class = "HUNTER" | |
| 82 SkeenPlugin.Spec = 1 | |
| 83 SkeenPlugin.Version = 1.00 | |
| 84 SkeenPlugin.Rotation = Rotation | |
| 85 --SkeenPlugin.Plugin_Active = Plugin_Active | |
| 86 | |
| 87 SkeenCore3:RegisterPlugin(SkeenPlugin) | |
| 88 |
