Ir para conteúdo

Featured Replies

Resolvido por luanluciano93

Ir para solução
  • Respostas 7
  • Visualizações 1.2k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • luanluciano93
    luanluciano93

    Primeiramente você precisa add essa função em sua source: setCreatureName function onCastSpell(cid, var) local cloth = getCreatureOutfit(cid) local health = getCreatureHealth(cid) local maxhealth =

  • luanluciano93
    luanluciano93

    Tenta isso, mas não é certeza de funcionar ... 

  • Rafael Mateus
    Rafael Mateus

    Ja Vou Dando Um rep+ Aki Quando Eu Testa Dou Mais Um   E creat quando voce gosta de algum conteudo ou Alguem Disponibilizar algo Pra voce Click No Gostei Do Lado

Postado
  • Solução

Primeiramente você precisa add essa função em sua source: setCreatureName

function onCastSpell(cid, var)
local cloth = getCreatureOutfit(cid)
local health = getCreatureHealth(cid)
local maxhealth = getCreatureMaxHealth(cid)
local MaximoSummon = 2 

local summons = getCreatureSummons(cid)
if(table.maxn(summons) < MaximoSummon) then 
local pos = getPlayerPosition(cid)
local bpos = {x=pos.x+2, y = pos.y, z = pos.z} 
local farAwayPos = {x = 2061, y = 2056, z = 7}
local Teste = doCreateMonster("Teste", farAwayPos)
doConvinceCreature(cid, Teste)
setCreatureMaxHealth(Teste, maxhealth)
doCreatureAddHealth(Teste, health)
doSetCreatureOutfit(Teste, cloth, -1)
setCreatureName(Teste, "".. getCreatureName(cid) .."", "a ".. getCreatureName(cid) .."")
addEvent(doSendMagicEffect, 300, pos, 2)
addEvent(doTeleportThing, 300, Teste, pos)
return true
end
end

Arruma o nome do monster que servirá de base: doCreateMonster("Teste", farAwayPos)

Postado

Tenta isso, mas não é certeza de funcionar ... 

function onCastSpell(cid, var)
	
	local cloth, health, maxhealth, summons = getCreatureOutfit(cid), getCreatureHealth(cid), getCreatureMaxHealth(cid), getCreatureSummons(cid)
	local MaximoSummon = 5 

	if(table.maxn(summons) < MaximoSummon) then 
		local pos = getPlayerPosition(cid)
		local bpos = {x=pos.x+2, y = pos.y, z = pos.z} 
		local farAwayPos = {x = 2061, y = 2056, z = 7}
		
		-- SUMMON 1
		local Teste1 = doCreateMonster("Teste", farAwayPos)
		doConvinceCreature(cid, Teste1)
		setCreatureMaxHealth(Teste1, maxhealth)
		doCreatureAddHealth(Teste1, health)
		doSetCreatureOutfit(Teste1, cloth, -1)
		setCreatureName(Teste1, "".. getCreatureName(cid) .."", "a ".. getCreatureName(cid) .."")
		addEvent(doTeleportThing, 300, Teste1, pos)
		
		-- SUMMON 2
		local Teste2 = doCreateMonster("Teste", farAwayPos)
		doConvinceCreature(cid, Teste2)
		setCreatureMaxHealth(Teste2, maxhealth)
		doCreatureAddHealth(Teste2, health)
		doSetCreatureOutfit(Teste2, cloth, -1)
		setCreatureName(Teste2, "".. getCreatureName(cid) .."", "a ".. getCreatureName(cid) .."")
		addEvent(doTeleportThing, 300, Teste2, pos)
		
		-- SUMMON 3
		local Teste3 = doCreateMonster("Teste", farAwayPos)
		doConvinceCreature(cid, Teste3)
		setCreatureMaxHealth(Teste3, maxhealth)
		doCreatureAddHealth(Teste3, health)
		doSetCreatureOutfit(Teste3, cloth, -1)
		setCreatureName(Teste3, "".. getCreatureName(cid) .."", "a ".. getCreatureName(cid) .."")
		addEvent(doTeleportThing, 300, Teste3, pos)
		
		-- SUMMON 4
		local Teste4 = doCreateMonster("Teste", farAwayPos)
		doConvinceCreature(cid, Teste4)
		setCreatureMaxHealth(Teste4, maxhealth)
		doCreatureAddHealth(Teste4, health)
		doSetCreatureOutfit(Teste4, cloth, -1)
		setCreatureName(Teste4, "".. getCreatureName(cid) .."", "a ".. getCreatureName(cid) .."")
		addEvent(doTeleportThing, 300, Teste4, pos)
		
		-- SUMMON 5
		local Teste5 = doCreateMonster("Teste", farAwayPos)
		doConvinceCreature(cid, Teste5)
		setCreatureMaxHealth(Teste5, maxhealth)
		doCreatureAddHealth(Teste5, health)
		doSetCreatureOutfit(Teste5, cloth, -1)
		setCreatureName(Teste5, "".. getCreatureName(cid) .."", "a ".. getCreatureName(cid) .."")
		addEvent(doTeleportThing, 300, Teste5, pos)
		
		addEvent(doSendMagicEffect, 300, pos, 2)
		return true	
	end
	
	return true	
end 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo