• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need pro Spell scripter

UNTESTED
LUA:
function onCastSpell(cid, combat, var)
local monster = "Orc"
local summons = 2
local time = 15

	for i = 1, summons do
		local summon = doSummonCreature(monster, getCreaturePosition(cid))
		doConvinceCreature(cid, summon)
		addEvent(doRemoveSummon, time * 1000, summon)
	end
end

local function doRemoveSummon(summon)
	if isCreature(summon) == true then
		doRemoveCreature(summon)
	end
	return LUA_ERROR
end
 
UNTESTED
LUA:
function onCastSpell(cid, combat, var)
local monster = "Orc"
local summons = 2
local time = 15

	for i = 1, summons do
		local summon = doSummonCreature(monster, getCreaturePosition(cid))
		doConvinceCreature(cid, summon)
		addEvent(doRemoveSummon, time * 1000, summon)
	end
end

local function doRemoveSummon(summon)
	if isCreature(summon) == true then
		doRemoveCreature(summon)
	end
	return LUA_ERROR
end

local function?
i think if it's like this it won't work but if you remove the local it'll work(don't know i'm just a noob lua coder xD)
 
Back
Top