• 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 please Cykotitan! Special Summon Script

Exedion

Active Member
Joined
Jun 11, 2007
Messages
629
Reaction score
30
Well i need a script for special summons with this step

*Use Spell: Normal summon a special monster
*Use Spell Again: unSummon The Special monster
*If 2 monster summoned: use the especific spell to unSummon Example:

First Spell: summon special rotworn
Second Spell: Summon espcial rat
First Spell again: unSummon special rotworn and left the special rat

Thansk in advance and sorry for my bad english and syntax xD
 
try this though i am not pretty sure
LUA:
local monster = "Dragon"	--monster name
local max_summons = 2
 
function onCastSpell(cid, var)
	local count, pos, check  = getCreatureSummons(cid), getThingPos(cid), {}
	if #count > 0 then
		for _,pid in ipairs(count) do
			if string.lower(getCreatureName(pid)) == string.lower(monster) then
				check[1] = true
				check[2] = pid
			end
		end
	end
	if check[1] == true then
		doRemoveCreature(check[2])
		doPlayerSendTextMessage(cid,27, monster.." Unsummoned.")	
		doSendMagicEffect(getThingPos(cid),12)
		check[1] = false
	else
		if #count == max_summons then
			return doPlayerSendCancel(cid,"You can't summon more monsters.") and doSendMagicEffect(getThingPos(cid),12) and false
		end
		doSummonMonster(cid, monster)
		doPlayerSendTextMessage(cid,27, monster.." summoned.")	
		doSendMagicEffect(getThingPos(cid),12)
		end
	end
	return true
end
 
Back
Top