Ir para conteúdo

Players, Npcs E Creatures Online.


Cloaky

Posts Recomendados

Players, Npcs e Creatures Online

  • Bom, eu estava fuçando por ai e achei um script parecido com esse mas estava meio bugado, com uns erros e mal escrito, ai resolvi dar uma ajeitada pra poder postar aqui. Lembrando que ele só funciona para The Forgotten Server.

Tutorial:

 

Crie:

data/talkactions/scripts/status.lua

--- Made by Xikez

--- Edited and Fixed by Cloaky

 

function onSay(cid, words, param)

 

acesso = 3 --- Access to use this command (Acesso para usar o comando).

 

-------------------------------- Don't Edit --------------------------------

local access = getPlayerAccess(cid)

local nplayers = getWorldCreatures(0)

local ncreatures = getWorldCreatures(1)

local nnpcs = getWorldCreatures(2)

local nall = getWorldCreatures(3)

 

if access >= acesso then

 

if nplayers > 1 then

mplayers = "There are currently ".. players .." players online."

else

mplayers = "You are the only player online."

end

 

if ncreatures > 1 then

mcreatures = "There are currently ".. creatures .." creatures spawned."

elseif ncreatures == 1 then

mcreatures = "There is currently 1 creature spawned."

else

mcreatures = "There are no creatures spawned."

end

 

if nnpcs > 1 then

mpcss = "There are currently ".. npcs .." NPCs online."

elseif nnpcs == 1 then

mnpcs = "There is currently only 1 NPC online."

else

mnpcs = "There are no NPCs online."

end

 

if nall > 1 then

mall = "Overall, There are ".. all .." creatures, npcs, and players online."

else

mall = "Overall, You are the only player online. No creatures, NPCs or any other players."

end

 

doPlayerSendTextMessage(cid, 24, mplayers)

doPlayerSendTextMessage(cid, 24, mcreatures)

doPlayerSendTextMessage(cid, 24, mnpcs)

doPlayerSendTextMessage(cid, 24, mall)

 

else

doPlayerSendCancel(cid, "You can not execute this command.")

end

 

return 0

end

----------------------------------------------------------------------------

 

Agora em data/talkactions/talkactions.xml adicione:

<talkaction words="!status" script="status.lua"/> --- Palavras para usar o comando.

 

Resultado:

50536176ng8.jpg

 

 

Sem mais,

Cloaky\~\

Editado por Cloaky
Link para o comentário
Compartilhar em outros sites

  • 1 month later...
  • 3 months later...
×
×
  • Criar Novo...