Advertisement
jacksonie

1

Feb 15th, 2023
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1. local combat = Combat()
  2. combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
  3. combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
  4.  
  5. local spell = Spell("instant")
  6.  
  7. function spell.onCastSpell(creature, var)
  8.     local condition = Condition(CONDITION_MANASHIELD)
  9.     condition:setParameter(CONDITION_PARAM_TICKS, 180000)
  10.     local player = creature:getPlayer()
  11.     if player then
  12.         condition:setParameter(CONDITION_PARAM_MANASHIELD, player:getMaxMana())
  13.     end
  14.     creature:addCondition(condition)
  15.     return combat:execute(creature, var)
  16. end
  17.  
  18. spell:name("Magic Shield")
  19. spell:words("utamo vita")
  20. spell:group("support")
  21. spell:vocation("druid;true", "elder druid;true", "sorcerer;true", "master sorcerer;true")
  22. spell:id(44)
  23. spell:cooldown(14 * 1000)
  24. spell:groupCooldown(2 * 1000)
  25. spell:level(14)
  26. spell:mana(50)
  27. spell:isSelfTarget(true)
  28. spell:isAggressive(false)
  29. spell:needLearn(false)
  30. spell:register()
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement