• 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!

[Help] Question about Summoning!

MarkSmartRemark

Lua-Noob in Training :D
Joined
Jan 27, 2010
Messages
139
Reaction score
3
Hi

I was wondering can i get this system to work. I want for a vocation to summon only 1 water elemental and it can be permanent summon (just like a regular summon). Now i want the mage to have another summon like fire elemental, but the fire elemental only lasts 30 seconds.

I found some scripts but when it goes to remove the fire elemental after 30 seconds, it removes the water elemental instead, and the fire elemental(that is stronger) ends up staying permanent...

How do i do this doRemoveCreature(cid) to specifically remove the fire elemental???
 
Option 1.
Code:
local summons = getCreatureSummons(cid)
if summons ~= nil then
    for i = 1, #summons do
        if getCreatureName(summons[i]) == "Fire Elemental" then
            doRemoveCreature(summons[i])
            ...

Option 2.
Use this as a monster's spell:
Code:
function onCastSpell(cid, var)
    return doRemoveCreature(cid)
end
In Fire_Elemental.xml add:
Code:
<defense type="instant" name="spell name here" interval="30000" chance="100"/>

Option 3.
Use this as a Fire Elemental summoning spell, this spell will summon FE and remove it after 30 seconds.
Code:
local function removeSummon(summon)
    return doRemoveCreature(summon)
end

function onCastSpell(cid, var)
    local summon = doSummonCreature("Fire Elemental", getCreaturePosition(cid))
    doConvinceCreature(cid, summon)
    addEvent(removeSummon, 30000, summon)
    return true
end
 
Last edited:

Similar threads

Back
Top