• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[SPELL] Destroy Summon

samuelsami

New Member
Joined
Oct 27, 2010
Messages
77
Reaction score
1
Hey, could someone please make a spell/talkaction for vocation 11 to destroy own summons, i'm using this summoner script:
Code:
local combat = createCombatObject()
local maxsummons = 1
function onCastSpell(cid, var)
   local summoncount = getCreatureSummons(cid)
   if #summoncount < 1 then
     for i = 1, maxsummons - #summoncount do
       doConvinceCreature(cid, doSummonCreature("wolf", getCreaturePosition(cid)))
     end
   end
   return doCombat(cid, combat, var)
end

Thx
 
Code:
local function removesummon(cid,summons)
local summons = getCreatureSummons(cid)
    if #summons > 0 then
    for i, v in ipairs(summons) do
        doRemoveCreature(v)
        end
    end
end

local combat = createCombatObject()
local maxsummons = 1
function onCastSpell(cid, var)
   local summoncount = getCreatureSummons(cid)
   if #summoncount < 1 then
     for i = 1, maxsummons - #summoncount do
       doConvinceCreature(cid, doSummonCreature("wolf", getCreaturePosition(cid)))
       end
       else
       addEvent(removesummon, 0, cid, summons)
   end
   return doCombat(cid, combat, var)
end
 
Back
Top