Guest User

Untitled

a guest
Feb 9th, 2025
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. createAura({
  2.         name = "Vitality Aura",
  3.         auraAbility = "A09D",
  4.         dummyAbility = "A0A1",
  5.         buff = "B00A",
  6.         buffEffect = "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl",
  7.         range = 900,
  8.         cooldown = 1,
  9.         delay = 1,
  10.         values = {
  11.             regen = { 2, 3, 4 },
  12.             threshold = 0.5
  13.         },
  14.         condition = function(source, target)
  15.             return IsUnitAlly(target, GetOwningPlayer(source)) and
  16.                 GetUnitState(target, UNIT_STATE_LIFE) < values.threshold * BlzGetUnitMaxHP(target)
  17.         end,
  18.         periodic = function(whichUnit, source, values)
  19.             print("Periodic effect")
  20.             SetUnitState(whichUnit, UNIT_STATE_LIFE,
  21.                 GetUnitState(whichUnit, UNIT_STATE_LIFE) + values.regen)
  22.         end
  23.     })
Advertisement
Add Comment
Please, Sign In to add comment