Draw ROP location

main
Ryan Crockett 2 years ago
parent 33ca6a0707
commit 3b2a60e0f6
  1. 19
      scripts/frost.lua
  2. 45
      scripts/shared/draw-rop.lua

@ -4,9 +4,11 @@ Tinkr,
Bastion = ...
local FrostModule = Bastion.Module:New('frost')
local Player = Bastion.UnitManager:Get('player')
local Target = Bastion.UnitManager:Get('target')
local None = Bastion.UnitManager:Get('none')
local AutoAttack = Bastion.SpellBook:GetSpell(6603)
local Frostbolt = Bastion.SpellBook:GetSpell(116)
local IceLance = Bastion.SpellBook:GetSpell(30455)
@ -16,6 +18,8 @@ local FingersOfFrost = Bastion.SpellBook:GetSpell(44544)
local WintersChill = Bastion.SpellBook:GetSpell(228358)
local FrostNova = Bastion.SpellBook:GetSpell(122)
local IceNova = Bastion.SpellBook:GetSpell(157997)
local IcyVeins = Bastion.SpellBook:GetSpell(12472)
local RuneOfPower = Bastion.SpellBook:GetSpell(116011)
local CDsEnabled = false
@ -29,6 +33,9 @@ end)
---@type GetRangedTargetCount
local GetRangedTargetCount = Tinkr:require("scripts/bastion/scripts/shared/get-ranged-target-count", Bastion)
local EnableDrawROP = Tinkr:require("scripts/bastion/scripts/shared/draw-rop", Bastion)
---@param unit Unit
local function isUnitFrozen(unit)
if not unit:Exists() then return false end
@ -83,6 +90,16 @@ end)
---@return boolean
local function CombatRotation()
local targetCount = GetRangedTargetCount(40)
if CDsEnabled and IcyVeins:IsKnownAndUsable() and not Player:IsCastingOrChanneling() then
IcyVeins:Cast(Player)
end
if CDsEnabled and not Player:IsMoving() then
end
if IceLance:IsKnownAndUsable() and IceLanceTarget:Exists() then
return IceLance:Cast(IceLanceTarget)
end
@ -121,6 +138,8 @@ FrostModule:Sync(function()
isRunning = true
end
EnableDrawROP()
if not Player:IsAlive() or Player:IsMounted() then
return false
end

@ -0,0 +1,45 @@
local
Tinkr,
---@type Bastion
Bastion = ...
local Player = Bastion.UnitManager:Get('player')
local RuneOfPower = Bastion.SpellBook:GetSpell(116011)
local Draw = Tinkr.Util.Draw:New()
Draw:Sync(function(draw)
for i, object in ipairs(Objects()) do
local name = ObjectName(object)
if name == RuneOfPower:GetName() then
local creator = ObjectCreator(object)
if tostring(creator) == tostring(Player:GetGUID()) then
local distance = ObjectDistance('player', object)
local ropX, ropY, ropZ = ObjectPosition(object)
draw:Circle(ropX, ropY, ropZ, 8)
draw:SetColor(69, 7, 58)
if distance > 8 then
draw:SetColor(252, 3, 207)
end
end
end
end
end)
local isEnabled = false
-- Draws a circle around the players Rune of Power to make it easier to stay within range.
local function EnableDrawROP()
if not isEnabled then
isEnabled = true
Draw:Enable()
end
end
return EnableDrawROP()
Loading…
Cancel
Save