Players, Npcs E Creatures Online.

Cloaky
Por Cloaky
em Actions e Talkactions

Cloaky

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 04/11/07Posts: 3

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\~\

h3online

.......0.o.......
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 21/02/07Posts: 137Char no Tibia: GOD Grimrath

show vo testar e edito se funcionar



[X]Camponês
[X]Caçador
[X]Cavaleiro
[X]Baronete
[X]Barão


Tibi4ee e Colex melhores escripters
Mapper e RPG Maker

Misterius

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 14/08/06Posts: 24

isso é bom e me deu uma ideia rox(secret)...

Nandu Minerim

avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 10/09/06Posts: 196

filé, recomendo

Flyw

ϟ Yeah baby,Yeah!
avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 28/03/08Posts: 423

Vlw bem legal

Att, Lucas F. Mendonça - FlyWorld

 

orkutqr.pngϟ Lucas F Mendonça

msnicon.png lGk@SoldatX.com / Flyw_@Live.com

skypeicon.png Lucas.Ferreira.Maoe