Ir para conteúdo

Featured Replies

Postado

Oi pessoas, mais uma vez eu com problemas nesse forum, bom dessa vez estou criando uma quest nova que funciona bem parecida com outras quests onde quando o player mata um monstro especifico ele deve acionar um evento onde uma pedra sai do caminho ou coisa do tipo.

 

bom segue o meu creature script:

local posfogo = {x=32355, y=31647, z=1}

--function MoveStone2() --creates wall back
--local criistal2 = getTileItemById(posdotp2, 1423)
--if not criistal2 then 
--doCreateItem(1423,1,posdotp2)-- Stone pos
--else 
--doCreateItem(1423,1,posdotp2)
--end
--return true
--
--end
--
--function RemoveStone2()
--    local cristal2 = getTileItemById(posdotp2, 1423) -- Id do cristal azul que some para dar lugar ao tp
--    if cristal2 then
--        doRemoveItem(cristal2.uid, 1)
--    end
--    return true
--end

function onKill(cid, target, damage, flags, corpse)
	print("entrou no script")
	if(isMonster(target)) then
		if(string.lower(getCreatureName(target)) == "three-headed black dragon") then
		    print("Está reconhecendo a morte do monstro!")
			--addEvent(RemoveStone2, 5 * 1000)
     	    --addEvent(MoveStone2, 300 * 1000)
		else
		print("não reconheceu!")
		end
		end
	return true
end

Detalhe: aqui estou apenas printando no console para ver se pelo menos o evento é ativado, e ai que está o erro, o evento não é nem ativado, então eu suponho que seja no meu monster....

Segue o monster:

<?xml version="1.0" encoding="UTF-8"?>
<monster name="Three-Headed Black Dragon" nameDescription="Three-Headed Black Dragon" race="blood" experience="5000000" speed="656" manacost="0">
	<health now="10225000" max="10225000"/>
	<look type="563" corpse="21291"/>
	<targetchange interval="2000" chance="10"/>
	<strategy attack="90" defense="10"/>
	<flags>
       <flag rewardboss="1" />
		<flag summonable="0"/>
		<flag attackable="1"/>
		<flag hostile="1"/>
		<flag illusionable="1"/>
		<flag convinceable="0"/>
		<flag pushable="0"/>
		<flag canpushitems="1"/>
		<flag canpushcreatures="1"/>
		<flag targetdistance="1"/>
		<flag staticattack="90"/>
		<flag runonhealth="300"/>
	</flags>
	<script>
   <event name="Three-Headed Black Dragon"/>
	</script>
	<attacks>
		<attack name="melee" interval="2000" min="-200" max="-10660"/>
		<attack name="curse" interval="2000" chance="17" length="8" spread="3" min="-2500" max="-10660">
			<attribute key="areaEffect" value="blackspark"/>
		</attack>
		<attack name="death" interval="2000" chance="14" length="8" spread="3" min="-8000" max="-10450">
			<attribute key="areaEffect" value="blacksmoke"/>
		</attack>
		<attack name="fire" interval="2000" chance="18" range="7" target="1" radius="4" min="-5500" max="-9700">
			<attribute key="shootEffect" value="fire"/>
			<attribute key="areaEffect" value="fireattack"/>
		</attack> 
		<attack name="death" interval="2000" chance="13" range="3" target="1" radius="1" min="-2200" max="-7230">
			<attribute key="shootEffect" value="fire"/>
			<attribute key="areaEffect" value="mortarea"/>
		</attack> 
		<attack name="the welter paralyze" interval="2000" chance="19"/>
	</attacks>
	<defenses armor="570" defense="445">
		<defense name="healing" interval="3000" chance="17" min="2250" max="9600">
			<attribute key="areaEffect" value="blueshimmer"/>
		</defense>
		<defense name="healing" interval="5000" chance="20" radius="5" min="2150" max="15700">
			<attribute key="areaEffect" value="greenshimmer"/>
		</defense>
		<defense name="the welter heal" interval="2000" chance="8"/>
	</defenses>
	<elements>
		<element energyPercent="20"/>
		<element icePercent="20"/>
		<element holyPercent="-30"/>
		<element physicalPercent="10"/>
	</elements>
	<immunities>
		<immunity lifedrain="1"/>
		<immunity earth="1"/>
		<immunity fire="1"/>
		<immunity death="1"/>
		<immunity paralyze="1"/>
		<immunity invisible="1"/>
	</immunities>
	<summons maxSummons="3">
		<summon name="black dragon spawn" interval="2000" chance="19"/>
	</summons>
	<voices interval="2000" chance="10">
		<voice sentence="FCHHHHH" yell="1"/>
		<voice sentence="GROAAAAAARRRRRRR" yell="1"/>
	</voices>
	<loot>	
	
		<item id="25377" countmax="5" chance="8200" /> <!-- gold token -->
		<item id="8927" chance="900"/> <!-- dark trinity staff -->
		<item id="26450" chance="900"/> <!-- haunted scytheblade -->
		<item id="25382" chance="6900"/> <!-- rift shield -->
		<item id="25383" chance="6900"/> <!-- rift lance -->
		<item id="2195" chance="10000"/> <!-- Boots of Haste -->
		<item id="2469" chance="2000"/> <!--  dragon scale legs -->
		<item id="11118" chance="5000"/> <!--  dragon scale boots -->
		<item id="2396" chance="20000"/> <!--  Ice Rapier -->
		<item id="2146" countmax="20" chance="20000"/> <!-- Small Sapphire -->
		<item id="2506" chance="8000"/> <!-- dragon scales helmet -->
		<item id="7588" countmax="100" chance="20000"/> <!-- Strong Health Potion -->
		<item id="2197" subtype="5" chance="20000"/> <!-- Stone Skin Amulet-->
		<item id="9971" countmax="10" chance="8800"/> <!-- Gold Ingot -->
		<item id="2498" chance="9500"/> <!-- Royal Helmet -->
		<item id="7632" chance="8600"/> <!-- Giant Shimmering Pearl -->
		<item id="7589" countmax="100" chance="20000"/> <!-- Strong Mana Potions-->
		<item id="2152" countmax="100" chance="20000"/> <!--  Platinum Coin -->
		<item id="2160" countmax="100" chance="20000"/> <!--  Platinum Coin -->
		<item id="2148" countmax="100" chance="20000"/> <!--  Gold Coins -->
		
	</loot>
	
</monster>

Espero que consigam me ajudar estou ficando louco já com isso!

Estou esquecendo alguma coisa?

  • Respostas 6
  • Visualizações 502
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado
  • Autor
34 minutos atrás, Vodkart disse:

mas se eu não me engano o seu tfs não é 1.2?

Sim é 1.2

mas tem exemplos de scripts que já funcionam assim em quests que vieram com o mapa

42 minutos atrás, roriscrave disse:

como ficou sua tag no creaturescripts.xml?

<event type="kill" name="Three-Headed Black Dragon" script="torre/Three-Headed Black Dragon.lua"/>
 

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.7k

Informação Importante

Confirmação de Termo