Ir para conteúdo

Featured Replies

  • Respostas 5
  • Visualizações 462
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Em data/creaturescripts/scripts adicione um arquivo chamado Kill_Pks.lua

 

local Configs = {
	Crystal_Coin_ID = 2160,
	Count = 5,
}

function onLogin(cid)
	registerCreatureEvent(cid, "Kill_PKS")
	return true
end

function onKill(cid, target)
	if isPlayer(target) and isPlayer(cid) then
		if getCreatureSkull(target) == SKULL_WHITE then
			doPlayerAddItem(cid, Configs.Crystal_Coin_ID, Configs.Count)
		end
	end
	return true
end

Em data/creaturescripts/creaturescripts.xml adicione a tag:

<event type="kill" name="Kill_PKS" event="script" value="Kill_Pks.lua"/>

 

Postado
Em 12/11/2017 em 20:15, Gabrielcml disse:

Essa SCRIPT serve para pk red tbm? Preciso de pk red tbm Rep +

Spoiler

local Configs = {
	Crystal_Coin_ID = 2160,
	Count = 5,
}

function onLogin(cid)
	registerCreatureEvent(cid, "Kill_PKS")
	return true
end

function onKill(cid, target)
	if isPlayer(target) and isPlayer(cid) then
		if getCreatureSkull(target) >= 3 then
			doPlayerAddItem(cid, Configs.Crystal_Coin_ID, Configs.Count)
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce recebeu algumas moedas por matar um jogador com Skull.")
		end
	end
	return true
end

Teste assim ^_^
OBS: Não testei.

Editado por OutSider Server (veja o histórico de edições)

Postado
11 horas atrás, OutSider Server disse:

if getCreatureSkull(target) >= 3 then

 

SKULL_NONE = 0
SKULL_YELLOW = 1
SKULL_GREEN = 2
SKULL_WHITE = 3
SKULL_RED = 4
SKULL_BLACK = 5
SKULL_ORANGE = 6
if getCreatureSkull(target) >= 3 and getCreatureSkull(target) <= 5 then

 

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