Jump to content
Sign in to follow this  
Majesty

[TFS 1.2] Death Cast

Recommended Posts

Majesty    1,759
Majesty

[TFS 1.2] Death Cast

Citar

Nome: TFS 1.2 Death Cast

Versão: [10.98+] // Qualquer uma disponível para TFS 1.2

Tipo do script: Creature Script

Créditos: tataboy67, Mulizeu

Script que anuncia uma mensagem dizendo se o jogador morreu para outro jogador ou para um monstro.

 

Crie um arquivo em data/creaturescripts/scripts com o nome Death_Effect.lua e adicione o seguinte código:

function onKill(cid, target, lastHit)
	if isPlayer(target) == true then
	Game.broadcastMessage("[".. getCreatureName(cid) .."] acabou de matar o [" .. getCreatureName(target) .. "]", MESSAGE_EVENT_ADVANCE) 
	else
	Game.broadcastMessage("[".. getCreatureName(isMonster(cid)) .."] acabou de matar o [" .. getCreatureName(target) .. "]", MESSAGE_EVENT_ADVANCE)
	end  
	return true
end

Adicione a tag em data/creaturescripts/creaturescripts.xml:

<!-- Death Lua -->
	<event type="kill" name="Killed" script="Death_Effect.lua"/>

Adicione em data/creaturescripts/scripts/login.lua:

player:registerEvent("Killed")

 

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×