addEvent(function(cid)
local master = getCreatureMaster(cid)
if master then
local party = getPartyMembers(master)
local masterPosition = getCreaturePosition(master)
local totempos = getCreaturePosition(cid)
if party == nil or type(party) ~= "table" or #party <= 1 then
doCreatureAddHealth(master, c.health)
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(masterPosition, 12)
return true
end
local players = getSpectators(totempos, c.rangex, c.rangey, c.multifloor)
for _, member in pairs(party) do
if isInArray(players, member) then
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doCreatureAddHealth(member, c.health)
doSendMagicEffect(getCreaturePosition(member), 12)
end
end
end
end, 1000, creature:getId())
addEvent(function(cid)
local master = getCreatureMaster(cid)
if master then
local party = getPartyMembers(master)
local masterPosition = getCreaturePosition(master)
local totempos = getCreaturePosition(cid)
if party == nil or type(party) ~= "table" or #party <= 1 then
doCreatureAddHealth(master, c.health)
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(masterPosition, 12)
return true
end
local players = getSpectators(totempos, c.rangex, c.rangey, c.multifloor)
for _, member in pairs(party) do
if isInArray(players, member) then
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doCreatureAddHealth(member, c.health)
doSendMagicEffect(getCreaturePosition(member), 12)
end
end
end
end, 3000, creature:getId())
addEvent(function(cid)
local master = getCreatureMaster(cid)
if master then
local party = getPartyMembers(master)
local masterPosition = getCreaturePosition(master)
local totempos = getCreaturePosition(cid)
if party == nil or type(party) ~= "table" or #party <= 1 then
doCreatureAddHealth(master, c.health)
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(masterPosition, 12)
return true
end
local players = getSpectators(totempos, c.rangex, c.rangey, c.multifloor)
for _, member in pairs(party) do
if isInArray(players, member) then
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doCreatureAddHealth(member, c.health)
doSendMagicEffect(getCreaturePosition(member), 12)
end
end
end
end, 5000, creature:getId())
addEvent(function(cid)
local master = getCreatureMaster(cid)
if master then
local party = getPartyMembers(master)
local masterPosition = getCreaturePosition(master)
local totempos = getCreaturePosition(cid)
if party == nil or type(party) ~= "table" or #party <= 1 then
doCreatureAddHealth(master, c.health)
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(masterPosition, 12)
return true
end
local players = getSpectators(totempos, c.rangex, c.rangey, c.multifloor)
for _, member in pairs(party) do
if isInArray(players, member) then
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doCreatureAddHealth(member, c.health)
doSendMagicEffect(getCreaturePosition(member), 12)
end
end
end
end, 7000, creature:getId())
addEvent(function(cid)
local master = getCreatureMaster(cid)
if master then
local party = getPartyMembers(master)
local masterPosition = getCreaturePosition(master)
local totempos = getCreaturePosition(cid)
if party == nil or type(party) ~= "table" or #party <= 1 then
doCreatureAddHealth(master, c.health)
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doSendMagicEffect(masterPosition, 12)
return true
end
local players = getSpectators(totempos, c.rangex, c.rangey, c.multifloor)
for _, member in pairs(party) do
if isInArray(players, member) then
doAreaCombatHealth(creature, COMBAT_FIREDAMAGE, creature:getPosition(), hitArea, 0, 0, CONST_ME_MAGIC_BLUE)
doCreatureAddHealth(member, c.health)
doSendMagicEffect(getCreaturePosition(member), 12)
end
end
end
end, 9000, creature:getId())