function onCastSpell(cid, var)
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid, "You can only summon one creature.")
return false
end
local summon, useCreateMonster = 0, false
if type(doSummonMonster) then
summon = doSummonMonster(cid, "Zodom")
if summon == 3 then
doPlayerSendCancel(cid, "There is not enough room to summon a creature.")
return false
end
summon = getCreatureSummons(cid)
summon = summon[#summon]
if isCreature(summon) and getCreatureMaster(summon) == cid then
doSendMagicEffect(getThingPos(summon), CONST_ME_MAGIC_BLUE)
return true
else
useCreateMonster = true
end
else
useCreateMonster = true
end
if useCreateMonster then
local pos = getThingPos(cid)
pos.y = pos.y + 1
summon = doCreateMonster("Zodom", pos, false)
if summon == true then
doPlayerSendCancel(cid, "There is not enough room to summon a creature.")
return false
end
end
if not isCreature(summon) then return false end
doConvinceCreature(cid, summon)
if getCreatureMaster(summon) ~= cid then
doRemoveCreature(summon)
return false
end
doSendMagicEffect(getThingPos(summon), CONST_ME_MAGIC_BLUE)
return true
end
5
1.7k
info
Grupo: Cavaleiro
Registrado: 19/11/10
Posts: 190
Reputação: +36
Char no Tibia: Frenesy

02 de dezembro de 2012 às 11:03
02 de dezembro de 2012 às 12:53
function onCastSpell(cid, var)
if #getCreatureSummons(cid) > 1 then
doPlayerSendCancel(cid, "You already have more than 1 summon.")
return false
end
local function doCreateSummon()
if #getCreatureSummons(cid) > 1 then return end
local summon, useCreateMonster = 0, false
if type(doSummonMonster) then
summon = doSummonMonster(cid, "Zodom")
if summon == 3 then
doPlayerSendCancel(cid, "There is not enough room to summon a creature.")
return false
end
summon = getCreatureSummons(cid)
summon = summon[#summon]
if isCreature(summon) and getCreatureMaster(summon) == cid then
doSendMagicEffect(getThingPos(summon), CONST_ME_MAGIC_BLUE)
return true
else
useCreateMonster = true
end
else
useCreateMonster = true
end
if useCreateMonster then
local pos = getThingPos(cid)
pos.y = pos.y + 1
summon = doCreateMonster("Zodom", pos, false)
if summon == true then
doPlayerSendCancel(cid, "There is not enough room to summon a creature.")
return false
end
end
if not isCreature(summon) then return false end
doConvinceCreature(cid, summon)
if getCreatureMaster(summon) ~= cid then
doRemoveCreature(summon)
return false
end
doSendMagicEffect(getThingPos(summon), CONST_ME_MAGIC_BLUE)
end
doCreateSummon()
doCreateSummon()
return true
end
info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...

03 de dezembro de 2012 às 13:19
vlw frenesy REP +
vlwbrun123 depois te dou 1 REP pela intenção de ajudar ^^
resolvido topico reportado para moverem






info
Grupo: Visconde
Registrado: 21/08/11
Posts: 470
Reputação: +5
Char no Tibia: ...
@edit
ajuda com essa magia de summon ela so sumona 1 zodom queria que pude-se sumona 2
function onCastSpell(cid, var) if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, "You can only summon one creature.") return false end local summon, useCreateMonster = 0, false if type(doSummonMonster) then summon = doSummonMonster(cid, "Zodom") if summon == 3 then doPlayerSendCancel(cid, "There is not enough room to summon a creature.") return false end summon = getCreatureSummons(cid) summon = summon[#summon] if isCreature(summon) and getCreatureMaster(summon) == cid then doSendMagicEffect(getThingPos(summon), CONST_ME_MAGIC_BLUE) return true else useCreateMonster = true end else useCreateMonster = true end if useCreateMonster then local pos = getThingPos(cid) pos.y = pos.y + 1 summon = doCreateMonster("Zodom", pos, false) if summon == true then doPlayerSendCancel(cid, "There is not enough room to summon a creature.") return false end end if not isCreature(summon) then return false end doConvinceCreature(cid, summon) if getCreatureMaster(summon) ~= cid then doRemoveCreature(summon) return false end doSendMagicEffect(getThingPos(summon), CONST_ME_MAGIC_BLUE) return true endEditado Dezembro 2 por KennyxD