• 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 and hide spell

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
743
Solutions
5
Reaction score
200
Location
Pr0land
GitHub
Erexo
Hello,
im looking for a script, with make a summons, and hide, to hide this summons :P

Summons:
-summon 2dragons
-when you summon a dragons, you cant summon more (only when dragons die)


Hide:
-Hide all summons ;]

Thanks,
Erexo.
 
LUA:
local max = 2
 
function onCastSpell(cid, var)
	local count, pos = #getCreatureSummons(cid), getThingPos(cid)
	if count == max then
		doPlayerSendCancel(cid, 'You cannot summon more creatures.')
		doSendMagicEffect(pos, CONST_ME_POFF)
		return false
	end
 
 
	for i = 1, max - count do
		local v = doSummonMonster(cid, 'Dragon')
		if v ~= 1 then
			doPlayerSendDefaultCancel(cid, v)
			doSendMagicEffect(pos, CONST_ME_POFF)
			return i ~= 1
		end
		doSendMagicEffect(getThingPos(getCreatureSummons(cid)[count+i]), CONST_ME_TELEPORT)
	end
	doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
	return true
end
 
LUA:
local max = 2
 
function onCastSpell(cid, var)
	local count, pos = #getCreatureSummons(cid), getThingPos(cid)
	if count == max then
		doPlayerSendCancel(cid, 'You cannot summon more creatures.')
		doSendMagicEffect(pos, CONST_ME_POFF)
		return false
	end
 
 
	for i = 1, max - count do
		local v = doSummonMonster(cid, 'Dragon')
		if v ~= 1 then
			doPlayerSendDefaultCancel(cid, v)
			doSendMagicEffect(pos, CONST_ME_POFF)
			return i ~= 1
		end
		doSendMagicEffect(getThingPos(getCreatureSummons(cid)[count+i]), CONST_ME_TELEPORT)
	end
	doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
	return true
end
fail tags?:P
 
LUA:
local max = 2
 
function onCastSpell(cid, var)
	local n = getCreatureSummons(cid)
	if #n < 1 then
		return doPlayerSendCancel(cid,"You dont have any summons.") and doSendMagicEffect(getThingPos(cid),2) and false
	end
	for _,pid in ipairs(n) do
		doRemoveCreature(pid)
	end
	doSendMagicEffect(getThingPos(cid),12)
	doPlayerSendTextMessage(cid,27,"All summoned were removed.")
	return true
end
 
Hide spell work perfect :)
Thanks (rep+)

Now i have next problem ;P

When you summon a pet, i wanna pet have the same hp/mana and outfit to summoner.

(My english is so bad :P)
 
Hide spell work perfect :)
Thanks (rep+)

Now i have next problem ;P

When you summon a pet, i wanna pet have the same hp/mana and outfit to summoner.

(My english is so bad :P)

That wud require edited monsters I guess.
 
Back
Top