Postado Dezembro 16, 2014 10 anos 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 Dezembro 17, 2014 10 anos por Gantz (veja o histórico de edições) (18) 98134-9991 [email protected]
Postado Dezembro 16, 2014 10 anos Autor 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 Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Dezembro 16, 2014 10 anos 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
Postado Dezembro 18, 2014 10 anos Autor Miiiller ta vooltandooo *-------* <3 <3 Quem e miller? Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
Postado Dezembro 19, 2014 10 anos Autor up Pokémon Dust Evolution É aonde começa sua nova aventura!! Facebook Verifique Atualizações
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.