gahgah 5 Postado Fevereiro 7, 2011 Share Postado Fevereiro 7, 2011 (editado) Hello galera XTibia, estou aqui para fazer mais um pedido, comando !online que mostra a lista de players online em ordem alfabetica, vai logo abaixo uma imagem, aguardo ajuda, REP+ Ot: Alissow Server, version 0.4.1 (Alissow) – 8.60 SS: Editado Fevereiro 7, 2011 por gahgah Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/ Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Fevereiro 7, 2011 Share Postado Fevereiro 7, 2011 posta seu script do online ai T.T Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-998742 Compartilhar em outros sites More sharing options...
junior2b 18 Postado Fevereiro 7, 2011 Share Postado Fevereiro 7, 2011 Né por nada não, mais ele PEDIU o script .-. Amigão criador do post, foi mal, mais nisso não sei como te ajudar =x Sem mais. Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-998747 Compartilhar em outros sites More sharing options...
gahgah 5 Postado Fevereiro 7, 2011 Autor Share Postado Fevereiro 7, 2011 (editado) Script !online abaixo: 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 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, (i - 1) .. " Player(s) Online:") for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, str) doPlayerSendTextMessage(cid, MESSAGE_STATUS_SMALL, words) end return true end Editado Fevereiro 7, 2011 por gahgah Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-998773 Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Fevereiro 7, 2011 Share Postado Fevereiro 7, 2011 (editado) retirado Editado Fevereiro 8, 2011 por Vodkart Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-998853 Compartilhar em outros sites More sharing options...
gahgah 5 Postado Fevereiro 7, 2011 Autor Share Postado Fevereiro 7, 2011 Esse não é o mesmo script? Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-998858 Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Fevereiro 8, 2011 Share Postado Fevereiro 8, 2011 tenta assim: lembrando que vai depender da hr que o jogador relogar(euacho) 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 .. "," end t = {str} table.sort(t, function(a,b) return a<b end) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, table.concat(t, ", ")) end return TRUE end Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-998953 Compartilhar em outros sites More sharing options...
gahgah 5 Postado Fevereiro 8, 2011 Autor Share Postado Fevereiro 8, 2011 Testei aqui, mais nao esta em ordem alfabetica nao, ainda continua normal =s Aproveitando tenho esse topico aqui tb se puder me dar uma luz tb eu agradeço [Pedido] Descriçao Ao Dar Look Link para o comentário https://xtibia.com/forum/topic/151167-pedido-online-por-ordem-alfabetica/#findComment-999003 Compartilhar em outros sites More sharing options...
Posts Recomendados