Postado Dezembro 15, 2012 12 anos Nome do Script: Comando !online diferente Tipo do Script: Nao sei Versão Utilizada: 8.60 Servidor Utilizado: TheLostServer Nível de Experiência: Iniciante Informações Extras: -- Ola pessoal gostaria de saber se tem como modificar o jeito de aparecer os players do server com o comando !online, gostaria que aparecece igual ao speal of book, sende que os dados venham assim: Nome: Profissao: Level: Legolas Elder Druid 100 Marcos Knight 154 Test Elite Knight 156 Total Paladins = 0 Total Druids= 1 Total Knights= 2 Total Sorcerers= 0 Total Geral: 3 Agradeço desde ja! Ideia eu tenho, nao sei fazer nada Editado Dezembro 15, 2012 12 anos por markim1986 (veja o histórico de edições)
Postado Dezembro 18, 2012 12 anos Autor Pessoal achei esse script que faz mais ou menos o que eu kero, ele faz o !online no estilho spell of book porem com os nomes um do lado do outro, seria facil editar para ficar como disse no post acima? Segue o script: local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "\n" end doShowTextDialog(cid, 1952, str) end return true end Editado Dezembro 19, 2012 12 anos por markim1986 (veja o histórico de edições)
Postado Dezembro 20, 2012 12 anos Tenta assim: local config = { showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) } function onSay(cid, words, param, channel) local players = getPlayersOnline() local strings = {""} local i, position = 1, 1 local added = false for _, pid in ipairs(players) do if(added) then if(i > (position * 7)) then strings[position] = strings[position] .. "," position = position + 1 strings[position] = "" else strings[position] = i == 1 and "" or strings[position] .. ", " end end if((config.showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) or not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else added = false end end for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "\n\n" end doShowTextDialog(cid, 1952, str) end return true end [/code] Bruno Carvalho / Ex-Administrador TibiaKing b.camara@live.com Em 26/12/2016 em 05:47, Spraypaint disse: A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une. -miltinho
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.