Spell only Healing Party

Discussion in 'Requests' started by Devlinn, Oct 12, 2017.

  1. Devlinn

    Devlinn Member

    Joined:
    Mar 25, 2015
    Messages:
    287
    Likes Received:
    6
    Best Answers:
    0
    hey, i dont know someone made something like this? look down. if not, its possible to do this? if yes can someone made it for me? thanks

    Healing only Party Members, skill working by 12 second all party members got every second 50 health points before spell end

    tfs 1.x

    bump
     
    Last edited by a moderator: Oct 15, 2017 at 12:45 PM
  2. GarQet

    GarQet Own3d!

    Joined:
    Feb 10, 2009
    Messages:
    1,370
    Likes Received:
    76
    Best Answers:
    14
    Code (Lua):
    1.  
    2. function startHealingMembers(members, health_amount, rands)
    3.    for i = 1, members do
    4.        members[i]:addHealth(health_amount)
    5.        members[i]:sendMagicEffect(CONST_ME_GREEN)
    6.    end
    7.    addEvent(startHealingMembers, 1000, members, health_amount, rands - 1)
    8. end
    9.  
    10. function onCastSpell(creature, var, isHotkey)
    11.  
    12.    local health_amount = 50
    13.    local rands = 12
    14.  
    15.    if not creature:getParty() then
    16.        creature:sendCancelMessage("You are not in the party.")
    17.        return false
    18.    end
    19.    local members = creature:getParty():getMembers()
    20.    startHealingMembers(members, health_amount, rands)
    21.    return true
    22. end
    23.  
    24.  
     
    Last edited: Oct 15, 2017 at 12:54 PM

Share This Page

Loading...