Ir para conteúdo

Featured Replies

Postado

Gostaria d eum script que ao player escrever !kills, mostrasse quantas unjustified kills o player tem.

 

Por exemplo digamos q com 10 kills o player pegue red skull....ao usar o comando !kills ele mostra quantas kills o player tem. por exmeplo 8, assim o player sabe q pode matar mais 1 pessoa e nao ira pegar mais red skull.....e claro quano o tempo da unjustified kill passar e de 8 ele ficar com 7, o comando ira mostrar 7 kills.

 

 

Achei um script aqui no TK q faz isso mas ele nao esta carregando, por isso estou pedindo um aqui.

 

TFS 1.x

Postado
function onSay(player, words, param)
	local fragTime = configManager.getNumber(configKeys.FRAG_TIME)
	if fragTime <= 0 then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
		return false
	end

	local skullTime = player:getSkullTime()
	if skullTime <= 0 then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
		return false
	end

	local kills = math.ceil(skullTime / fragTime)
	local remainingSeconds = math.floor((skullTime % fragTime) / 1000)

	local hours = math.floor(remainingSeconds / 3600)
	local minutes = math.floor((remainingSeconds % 3600) / 60)
	local seconds = remainingSeconds % 60

	local message = "You have " .. kills .. " unjustified kill" .. (kills > 1 and "s" or "") .. ". The amount of unjustified kills will decrease after: "
	if hours ~= 0 then
		if hours == 1 then
			message = message .. hours .. " hour, "
		else
			message = message .. hours .. " hours, "
		end
	end

	if hours ~= 0 or minutes ~= 0 then
		if minutes == 1 then
			message = message .. minutes .. " minute and "
		else
			message = message .. minutes .. " minutes and "
		end
	end

	if seconds == 1 then
		message = message .. seconds .. " second."
	else
		message = message .. seconds .. " seconds."
	end

	player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message)
	return false
end

 

Postado
  • Autor
12 horas atrás, pablobion disse:

function onSay(player, words, param)
	local fragTime = configManager.getNumber(configKeys.FRAG_TIME)
	if fragTime <= 0 then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
		return false
	end

	local skullTime = player:getSkullTime()
	if skullTime <= 0 then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
		return false
	end

	local kills = math.ceil(skullTime / fragTime)
	local remainingSeconds = math.floor((skullTime % fragTime) / 1000)

	local hours = math.floor(remainingSeconds / 3600)
	local minutes = math.floor((remainingSeconds % 3600) / 60)
	local seconds = remainingSeconds % 60

	local message = "You have " .. kills .. " unjustified kill" .. (kills > 1 and "s" or "") .. ". The amount of unjustified kills will decrease after: "
	if hours ~= 0 then
		if hours == 1 then
			message = message .. hours .. " hour, "
		else
			message = message .. hours .. " hours, "
		end
	end

	if hours ~= 0 or minutes ~= 0 then
		if minutes == 1 then
			message = message .. minutes .. " minute and "
		else
			message = message .. minutes .. " minutes and "
		end
	end

	if seconds == 1 then
		message = message .. seconds .. " second."
	else
		message = message .. seconds .. " seconds."
	end

	player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message)
	return false
end

 

Cara quando o player pega black skull(que esta configurado para ser com 12 kills..ele aparece isso

00:29 You have 270 unjustified kills. The amount of unjustified kills will decrease after: 3 hours, 31 minutes and 49 seconds.

e antes disso, as 11 primeiras kills, ele nao registra nada

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

Postado
  • Autor
13 horas atrás, pablobion disse:

function onSay(player, words, param)
	local fragTime = configManager.getNumber(configKeys.FRAG_TIME)
	if fragTime <= 0 then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
		return false
	end

	local skullTime = player:getSkullTime()
	if skullTime <= 0 then
		player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You do not have any unjustified kill.")
		return false
	end

	local kills = math.ceil(skullTime / fragTime)
	local remainingSeconds = math.floor((skullTime % fragTime) / 1000)

	local hours = math.floor(remainingSeconds / 3600)
	local minutes = math.floor((remainingSeconds % 3600) / 60)
	local seconds = remainingSeconds % 60

	local message = "You have " .. kills .. " unjustified kill" .. (kills > 1 and "s" or "") .. ". The amount of unjustified kills will decrease after: "
	if hours ~= 0 then
		if hours == 1 then
			message = message .. hours .. " hour, "
		else
			message = message .. hours .. " hours, "
		end
	end

	if hours ~= 0 or minutes ~= 0 then
		if minutes == 1 then
			message = message .. minutes .. " minute and "
		else
			message = message .. minutes .. " minutes and "
		end
	end

	if seconds == 1 then
		message = message .. seconds .. " second."
	else
		message = message .. seconds .. " seconds."
	end

	player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, message)
	return false
end

 

e quando esta red skulls(configurado para pegar com 8 kills) ele mostra que tem 180 frags

 

meu config.lua esta assim s eisso ajuda

 

timeToDecreaseFrags = 4 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
stairJumpExhaustion = 2 * 1000
experienceByKillingPlayers = false
expFromPlayersLevelRange = 75
dayKillsToRedSkull = 8
dayKillsToBlackSkull = 12
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = true
redSkullDuration = 30
blackSkullDuration = 45
orangeSkullDuration = 7

 

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