BboyChaos
Member
- Joined
- May 20, 2014
- Messages
- 10
- Reaction score
- 7
Code:
local combat = Combat()
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
local player = Player(cid)
local player_summons = player:getSummons()
if not next(player_summons) then
player:getPosition():sendMagicEffect(CONST_ME_POFF)
player:sendCancelMessage("You don't have any summons.")
return false
end
for i = 1, #player_summons do
local target_summon = player_summons[i] -- targetSummons
target_summon:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
target_summon:remove()
player:sendCancelMessage("Your summon has been unsummoned.")
end
return combat:execute(cid, var)
end