Ir para conteúdo
  • Cadastre-se

2 mega pedidos para ajudar


Posts Recomendados

eae galera estou com 2 pedidos ai vai

 

 

1. um sistema de tempo rank por player online com restrição de god,cm e gm,com os top 10,de preferencia com PopUp Se Posivel ex :

 

        Rank tempo 

 

1. Zlaxus tempo 50d 14h

 

2. Zet0N0Murmurou tempo 43d 12h

 

e por ai vai

 

 

2. e um sistema de libera o god,cm,gm de não ser atacado ex : o God fala "!libert" ai o god pode ser atacado por monstros ai dps fala "!block" ai não pode mais ser atacado

 

 

dou 5 rep para quem resolver pelo menos um pedido

 

 

 

 

 

desculpa pelo topico mal feito eu tinha feito ele bomzinho dai sem querer deletei


up

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

Link para o post
Compartilhar em outros sites

Pra fazer um ranking de tempo, sua data base precisa ter uma table (ou coluna) que guarde o tempo que o player ficou online.

 

Pra fazer o "!libert" creio que somente mexendo na distro, pois o god, gm e cm são ignorados pelos monstros. O unico jeito seria se ao usar o comando "!libert" aí a group_id do individuo fosse mudado pra player ou tutor (ou senior tutor). Mas aí, o individuo poderia morrer.

 

Se esclareci algo, pf REP+ ^^

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

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Link para o post
Compartilhar em outros sites

Pra fazer um ranking de tempo, sua data base precisa ter uma table (ou coluna) que guarde o tempo que o player ficou online.

 

Pra fazer o "!libert" creio que somente mexendo na distro, pois o god, gm e cm são ignorados pelos monstros. O unico jeito seria se ao usar o comando "!libert" aí a group_id do individuo fosse mudado pra player ou tutor (ou senior tutor). Mas aí, o individuo poderia morrer.

 

Se esclareci algo, pf REP+ ^^

e esta table tem como criar uma nova e configurar para guarda o tempo?

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

Link para o post
Compartilhar em outros sites

 

é possivel fazer um globalevent, que salva no player, uma storage a cada minuto que passou, assim contabilizando o tempo que ele ficou online :)

Será que não ia puxar mt do pc, não? :S

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Link para o post
Compartilhar em outros sites

fiz um mod para seu primeiro pedido, entre na pasta mods, crie um aquivo xml e cole o código:

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Ranking Uptime" version="1.0" author="Gantz (miiller)" contact="tibiaking.com" enabled="yes">
<config name="uptime_func"><![CDATA[
uptime = {
	storage = 67517,
	get = function (cid)
		return getPlayerStorageValue(cid, uptime.storage)
	end,
	start = function (cid)
				if not isCreature(cid) then return true end
				setPlayerStorageValue(cid, uptime.storage,  uptime.get + 1)
				addEvent(uptime.start, 1000, cid)
	end,
	convert = function(uptime)
				local day, hour, minute = 0
				while uptime >= 86400 do
					day = day + 1
					uptime = uptime - 86400
				end
				while uptime >= 3600 do
					hour = hour + 1
					uptime = uptime - 3600
				end
				while uptime >= 60 do
					minute = minute + 1
					uptime = uptime - 60
				end
				local second = uptime
				local str = ((day > 0 and day .. "d " or "") .. (hour > 0 and hour .. "h " or "") .. (minute > 0 and minute .. "m " or "") .. (second > 0 and second .. "s " or ""))
				return str
	end
}
]]></config>
<event type="login" name="uptime_login" event="script"><![CDATA[
domodlib('uptime_func')
function onLogin(cid)
	setPlayerStorageValue(cid, uptime.storage, 0)
	uptime.start(cid)
	return true
end]]></event>
<talkaction words="!uptimerank;/uptimerank" event="buffer"><![CDATA[
domodlib('uptime_func')
function onSay(cid, words, param)
	local ranking = getPlayersOnline()
	local t = #ranking < 10 and #ranking or 10
	for i = 1, t do
		for j = i + 1, #getPlayersOnline() do
			if uptime.get(ranking[j]) > uptime.get(ranking[i]) then
				local aux = uptime.get(ranking[i])
				ranking[i] = ranking[j]
				ranking[j] = aux
			end
		end
	end
	local result = ""
	for i = 1, t do
		result = result .. i .. ". " .. getCreatureName(ranking[i]) .. " - " .. uptime.convert(uptime.get(ranking[i])) .. "\n"
	end
	doShowTextDialog(cid, 6500, result)
	return true
end]]></talkaction>
</mod>
Editado por Gantz (veja o histórico de edições)

whatsapp-4in.png (18) 98134-9991

 

icon-skype.png [email protected]

 

Link para o post
Compartilhar em outros sites

 

fiz um mod para seu primeiro pedido, entre na pasta mods, crie um aquivo xml e cole o código:

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Ranking Uptime" version="1.0" author="Gantz (miiller)" contact="tibiaking.com" enabled="yes">
<config name="uptime_func"><![CDATA[
local uptime = {
	storage = 67517,
	get = function (cid)
		return getPlayerStorageValue(cid, uptime.storage)
	end,
	start = function (cid)
				if not isCreature(cid) then return true end
				setPlayerStorageValue(cid, uptime.storage,  uptime.get + 1)
				addEvent(uptime.start, 1000, cid)
	end,
	convert = function(uptime)
				local day, hour, minute = 0
				while uptime >= 86400 do
					day = day + 1
					uptime = uptime - 86400
				end
				while uptime >= 3600 do
					hour = hour + 1
					uptime = uptime - 3600
				end
				while uptime >= 60 do
					minute = minute + 1
					uptime = uptime - 60
				end
				local second = uptime
				local str = ((day > 0 and day .. "d " or "") .. (hour > 0 and hour .. "h " or "") .. (minute > 0 and minute .. "m " or "") .. (second > 0 and second .. "s " or ""))
				return str
	end
}
]]></config>
<event type="login" name="uptime_login" event="script"><![CDATA[
domodlib('uptime_func')
function onLogin(cid)
	setPlayerStorageValue(cid, uptime.storage, 0)
	uptime.start(cid)
	return true
end]]></event>
<talkaction words="!uptimerank;/uptimerank" event="buffer"><![CDATA[
domodlib('uptime_func')
function onSay(cid, words, param)
	local ranking = getPlayersOnline()
	for i = 1, 10 do
		for j = i, #getPlayersOnline() do
			if uptime.get(ranking[j]) > uptime.get(ranking[i]) then
				local aux = uptime.get(ranking[i])
				ranking[i] = ranking[j]
				ranking[j] = aux
			end
		end
	end
	local result = ""
	for i = 1, 10 do
		result = result .. i .. ". " .. getCreatureName(ranking[i]) .. " - " .. uptime.convert(uptime.get(ranking[i])) .. "\n"
	end
	doShowTextDialog(cid, 6500, result)
	return true
end]]></talkaction>
</mod>

jah jah eu testo

wq3bBzt.png
Pokémon Dust Evolution
 
É aonde começa sua nova aventura!! 

 

Facebook

 
Verifique Atualizações

 

Link para o post
Compartilhar em outros sites

 

fiz um mod para seu primeiro pedido, entre na pasta mods, crie um aquivo xml e cole o código:

<?xml version="1.0" encoding="ISO-8859-1"?>
<mod name="Ranking Uptime" version="1.0" author="Gantz (miiller)" contact="tibiaking.com" enabled="yes">
<config name="uptime_func"><![CDATA[
local uptime = {
	storage = 67517,
	get = function (cid)
		return getPlayerStorageValue(cid, uptime.storage)
	end,
	start = function (cid)
				if not isCreature(cid) then return true end
				setPlayerStorageValue(cid, uptime.storage,  uptime.get + 1)
				addEvent(uptime.start, 1000, cid)
	end,
	convert = function(uptime)
				local day, hour, minute = 0
				while uptime >= 86400 do
					day = day + 1
					uptime = uptime - 86400
				end
				while uptime >= 3600 do
					hour = hour + 1
					uptime = uptime - 3600
				end
				while uptime >= 60 do
					minute = minute + 1
					uptime = uptime - 60
				end
				local second = uptime
				local str = ((day > 0 and day .. "d " or "") .. (hour > 0 and hour .. "h " or "") .. (minute > 0 and minute .. "m " or "") .. (second > 0 and second .. "s " or ""))
				return str
	end
}
]]></config>
<event type="login" name="uptime_login" event="script"><![CDATA[
domodlib('uptime_func')
function onLogin(cid)
	setPlayerStorageValue(cid, uptime.storage, 0)
	uptime.start(cid)
	return true
end]]></event>
<talkaction words="!uptimerank;/uptimerank" event="buffer"><![CDATA[
domodlib('uptime_func')
function onSay(cid, words, param)
	local ranking = getPlayersOnline()
	local t = #ranking < 10 and #ranking or 10
	for i = 1, t do
		for j = i, #getPlayersOnline() do
			if uptime.get(ranking[j]) > uptime.get(ranking[i]) then
				local aux = uptime.get(ranking[i])
				ranking[i] = ranking[j]
				ranking[j] = aux
			end
		end
	end
	local result = ""
	for i = 1, t do
		result = result .. i .. ". " .. getCreatureName(ranking[i]) .. " - " .. uptime.convert(uptime.get(ranking[i])) .. "\n"
	end
	doShowTextDialog(cid, 6500, result)
	return true
end]]></talkaction>
</mod>

Miiiller ta vooltandooo *-------* <3 <3

Tony Araújo  ;D 

 

Link para o post
Compartilhar em outros sites
  • 2 weeks later...

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo