ae adorei o script mais queria saber como faço pra so aparecer o nome do player que esta online e o level dele ^^
![]()
Por DevilMoon, 12 de jun. de 2010 em Actions e Talkactions
info
Grupo: Campones
Registrado: 10/02/12
Posts: 32
Reputação: +3
Char no Tibia: ñ tenho

ae adorei o script mais queria saber como faço pra so aparecer o nome do player que esta online e o level dele ^^
![]()
info
Grupo: Infante
Registrado: 27/07/09
Posts: 1.5k
Reputação: +405
Char no Tibia: Gean Riot

cara seu script está errado, ele vai mostrar de todo mundo que tiver online o mesmo reset por que está em cid em vez de pid ali.
certo seria assim.
local config = {
showGamemasters = getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand'))
}
function getResets(pid)
resets = getPlayerStorageValue(pid,2310)
if resets < 0 then
resets = 0
end
return resets
end
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) .. " [resets ".. getResets(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
info
Grupo: Barão
Registrado: 07/03/08
Posts: 231
Reputação: +17
Gênero: Masculino

Seria viavelmente possível uma talkactions mostrar level, resets e ainda cada vocação de um character?
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

Seria viavelmente possível uma talkactions mostrar level, resets e ainda cada vocação de um character?
sem dúvida que sim
info
Grupo: Infante
Registrado: 27/07/09
Posts: 1.5k
Reputação: +405
Char no Tibia: Gean Riot

da pra fazer mostrar level,resets,vocation, e até mesmo quantos dias de premium tem ali u.u
o meu sistema de reset nao é por storage, como faço pra apareçer o reset no online? a funçao que pega o reset é
getPlayerReset(cid)
info
Grupo: Conde
Registrado: 29/04/09
Posts: 904
Reputação: +389
Char no Tibia: Jabuti Selvagem

o meu sistema de reset nao é por storage, como faço pra apareçer o reset no online? a funçao que pega o reset é
getPlayerReset(cid)
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) .. " [resets ".. getPlayerResets(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
info
Grupo: Campones
Registrado: 20/10/10
Posts: 35
Reputação: +4
Gênero: Masculino
Char no Tibia: Drifitooh
legal o script. Mas acho que é uma invasão de privacidade.