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

Summon spell

Alaa Adel

Basic Mapper
Joined
Mar 2, 2014
Messages
231
Reaction score
8
Hello :)
can someone tell me how to make a spell that summons 3 monsters without params and stuff... just when i say the spell it summons some number of monsters... that will be cool.
 
Yes..
The monster should be convinceable to be able to be convinced with that function in the script.
Reload monsters after you changed that or restart the server. Also make sure you edited the right monster.
 
Use the function
Code:
local function doRemoveSummon(cid)
     for _, m in pairs(getCreatureSummons(cid)) do
         if getCreatureName(m) == "Dragon" then
             doRemoveCreature(m)
         end
     end
     return true
end

To execute the function after 20 seconds, so the summons will be removed after 20 seconds.
Code:
addEvent(doRemoveSummon, 20 * 1000, cid)
 
Last edited:
Then you can just do it without the function addEvent (this function executes other functions after a certain time).
Code:
doRemoveSummon(cid)

You can add that to any spell script and it will remove the summons with the name you choose.
 
[26/06/2014 01:29:47] data/spells/scripts/support/remove summon.lua:2: 'end' expected (to close 'function' at line 1) near '<eof>'
 
Back
Top