Gostei Da Sua Script , Ajudará Muito Para Players Identificar Membros Da Staff Caso Precisem De Ajuda ,![]()
- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Online System
2
1.8k
info
Grupo: Campones
Registrado: 18/02/13
Posts: 52
Reputação: +1
Char no Tibia: (GOD)Damoon

05 de março de 2013 às 20:20

info
Grupo: Herói
Registrado: 08/08/07
Posts: 520
Reputação: +235
Gênero: Masculino
Char no Tibia: Sir Morths
Versão: 1.0 By Comedinha
Versão suportada: 9.4+ (funciona em anteriores)
Descrição: O script é o mesmo /online da tfs, porém com uma modificação em GM+, assim ajudando a identificar os membros da staff.
Features:
- Ao dizer /online os membros (GM+) irão ficar ao invés do level aparecendo Staff Member.
TAG:
Script:
data/talkactions/scripts/online.lua
function onSay(cid, words, param, channel) local strings, i, position, added, showGamemasters = {""}, 1, 1, false, getBooleanFromString(getConfigValue('displayGamemastersWithOnlineCommand')) for _, pid in ipairs(getPlayersOnline()) 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 added = false if((not getPlayerCustomFlagValue(pid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [" .. getPlayerLevel(pid) .. "]" i = i + 1 added = true else if((showGamemasters or getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES) and (not isPlayerGhost(pid) or getPlayerGhostAccess(cid) >= getPlayerGhostAccess(pid)))) then strings[position] = strings[position] .. getCreatureName(pid) .. " [staff Member]" i = i + 1 added = true end end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (i - 1) .. " player" .. (i > 1 and "s" or "") .. " 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 endAviso:
É só substituir o script original por este, ele não causará bugs.
Créditos:
Comedinha
TFS