RT

[ Pedido ] Comando !online Para 0.3.6 !

Por rtibia, 17 de dez. de 2009 em Archived

tibia
otserv
4
922
rtibiaR
17 de dezembro de 2009 às 18:49

Quero Um Comando De !online Para Pega Na Versão 0.3.6 Do Tfs.

 

Obrigado Pela Sua Visita ao Topico

 

By : R-Tibia

thaleeesT
20 de dezembro de 2009 às 15:43

Aqui está:

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_BLUE, (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_BLUE, str)

end

 

return true

end

 

 

Abraços.

rtibiaR
23 de dezembro de 2009 às 15:22
Aqui está:

 

 

 

Abraços.

 

Não Pegou

netflat15N
24 de dezembro de 2009 às 15:39

Eu uso este que o thales disse, deve ser você que está fazendo coisa errada ou seu distro eh diferente...