Ir para conteúdo

Featured Replies

Postado

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 por markim1986 (veja o histórico de edições)

  • Respostas 16
  • Visualizações 1.7k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Bruno Carvalho
    Bruno Carvalho

    Tenta este: [paste]dvKc1Yvy[/paste] Créditos a esse tópico da otland onde eu peguei a base: http://otland.net/f81/show-players-online-who-have-not-done-specific-quest-148358/

Postado
  • 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 por markim1986 (veja o histórico de edições)

Postado

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

 

wMwSJFE.png?1

 

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