Lista de Staff online

Alexclusive
em Actions e Talkactions

Alexclusive

Um bom Veterano...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 25/10/12Posts: 2399Gênero: MasculinoChar no Tibia: Nuncative

Uma talkaction que vai incrementar um pouco mais seu servidor.

 

!staff (se tiver alguém online)



52uBmza.png

 

(se não tiver alguém online)

ljM79yf.png

 

Em data/talkactions/talkactions.xml:


<talkaction words="!staff" event="script" value="staff.lua"/>

 

Agora em data/talkactions/scripts: crie um arquivo chamado staff.lua e cole dentro:


function onSay(cid, words, param, channel)
local Info = db.getResult("SELECT * FROM `players` WHERE `online` = '1' AND `group_id` > 1")
local PlayerString = "Online Staff Members:\n"
if Info:getID() ~= -1 then
local count, i = Info:getRows(false), 0
repeat
PlayerString = PlayerString .. Info:getDataString("name") .. " - "
if Info:getDataInt("group_id") == 2 then
PlayerString = PlayerString .. "Tutor"
elseif Info:getDataInt("group_id") == 3 then
PlayerString = PlayerString .. "Senior Tutor"
elseif Info:getDataInt("group_id") == 4 then
PlayerString = PlayerString .. "Game Master"
elseif Info:getDataInt("group_id") == 5 then
PlayerString = PlayerString .. "Community Manager"
elseif Info:getDataInt("group_id") == 6 then
PlayerString = PlayerString .. "God"
end
PlayerString = PlayerString .. "\n"
until not(Info:next())
Info:free()
else
PlayerString = PlayerString .. "No staff online, try again later"
end
doPlayerPopupFYI(cid, PlayerString);
return true
end

 

Bom uso! (Créditos: Hiromath)

 

CURTA O FACEBOOK DO Ekz.

graphic_design.png  Seja um incentivador de pessoas. O mundo já tem críticos demais.  hardware_19.png

 

 

 

SkyDarkyes

avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 28/01/13Posts: 1685Gênero: Masculino

Puts man,muito bom esse script,mals não da pra da rep,limite,mas o script é MUITO BOM

48EnrrM.png

 

Alexclusive

Um bom Veterano...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 25/10/12Posts: 2399Gênero: MasculinoChar no Tibia: Nuncative

Puts man,muito bom esse script,mals não da pra da rep,limite,mas o script é MUITO BOM

 

Vlw chegado!

Aproveite :)

 

CURTA O FACEBOOK DO Ekz.

graphic_design.png  Seja um incentivador de pessoas. O mundo já tem críticos demais.  hardware_19.png

 

 

 

caotic

Afinal de contas,sou um mordomo e tanto
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 04/03/11Posts: 1599Char no Tibia: No Have

Muito legal o criado do script fazer uma busca na database sendo que ele pode usar um for em getPlayerOnline.

str = "Equipe On"
for i =1, #getPlayersOnline() do
local player = getPlayersOnline()[i]
if getPlayerGroupId(player) > 2 then
str = str..getPlayerName(player)
end
doShowTextDialog(cid, 1397, str)
end

KaboFlow29

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/11/12Posts: 267Gênero: MasculinoChar no Tibia: ADM Kabo

Muto Bom Mano :D

13662475_1132536336789432_1129366659_o.png

Alexclusive

Um bom Veterano...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 25/10/12Posts: 2399Gênero: MasculinoChar no Tibia: Nuncative

Brigado cara :)

 

CURTA O FACEBOOK DO Ekz.

graphic_design.png  Seja um incentivador de pessoas. O mundo já tem críticos demais.  hardware_19.png

 

 

 

WebTutoriais

Estudando Linux !
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 15/03/13Posts: 126Char no Tibia: No Have

Para Alguns Servidores , Realmente Tem Utilidade , Parabéns ..


¿

Alexclusive

Um bom Veterano...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 25/10/12Posts: 2399Gênero: MasculinoChar no Tibia: Nuncative

Obrigado Adilson!

 

Abraço :)

 

CURTA O FACEBOOK DO Ekz.

graphic_design.png  Seja um incentivador de pessoas. O mundo já tem críticos demais.  hardware_19.png

 

 

 

drakylucas

Draky Scripter
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 12/09/10Posts: 416Char no Tibia: Draky Lucas

até funciona, mas ao invez de verificar todos players do banco de dados que estão online pela query, nao era mais facil fazer isso?

for _, pid in ipairs(getPlayersOnline()) do

 

end

 

e apenas verificar o acesso? =p

FenixBorges

(Retired)
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 01/12/12Posts: 252

Perfeito brother..

Assim os players não vão precisar ficar no Help-Chat perguntando:

"Lord Of War [57]: Algum tutor ai? responde por favor!"

Eles simplesmente vai executar esse comando e ver quem ta online

da Staff, para ajuda-lo.

REP+ póste mais coisas úteis!

(Retired)

 

pokemonfox123

Mapper/Scripter Sempre as Ordens
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 24/10/12Posts: 107Char no Tibia: binhostylle

Velho Muito Foda Vai ser de Bom Uso Para Os Caras

Skymagnum

Hamburguer
avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 02/08/12Posts: 1025Char no Tibia: Maurolkit

Script bacana, estou sem rep no momento quando liberar eu do, mas não há necessidade de manuseio de db neste script.

 

17AHwqzz[/pastebin]

jeoz.png