VO
talkaction

!guildmember

Por Vodkart, 30 de out. de 2012 em Actions e Talkactions

otserv
tibia
script
20
3.2k
VodkartV
30 de outubro de 2012 às 23:53

Antes de mais nada você precisará desta duas funções:http://www.xtibia.co...-onlineoffline/

 

Sobre: é um comando que mostra no chat da sua guild os membros que a guild possuem e os membros que estão online.

 

 

"/guildmember" -- retorna o nome de todos da guild

 

"/guildmember on/online" -- retorna o nome de todos da guild que estão online

 

 

em data > talkactions > script

 

guildmembers.lua

function onSay(cid, words, param, channel)
if channel ~= CHANNEL_GUILD or getPlayerGuildId(cid) <= 0 then
return false
end
str = "Membros da Guild "..(param == "" and "" or "Online")..":"
guild = param == "" and getGuildMembers(getPlayerGuildId(cid)) or getGuildMembersOnline(getPlayerGuildId(cid))
for i = 1,#guild do
str = str..""..(param == "" and guild[i] or getPlayerName(guild[i]))..""..(#guild == i and "." or ",")
end
return doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_RN, CHANNEL_GUILD)
end

 

talkactions.xml

<talkaction words="!guildmember;/guildmember" event="script" value="guildmembers.lua"/>

Editado Outubro 31 por Vodkart

2 meses depois...
FaisherF
03 de dezembro de 2012 às 17:13

Donde foe testado?

7 meses depois...
xaverlockX
23 de julho de 2013 às 07:27

amigo, por favor teria como me passar um script para criar guild e add players na guild atraveés do comando !createguild Obrigado

1 mês depois...
11 de agosto de 2013 às 04:30

Vodkart, não tem como fazer para o comando funcionar sem precisar digitar no guild chat?

Obrigado.

SlicerS
11 de agosto de 2013 às 12:14

eh soh tirar essa parte...

channel ~= CHANNEL_GUILD or 
11 de agosto de 2013 às 15:00

Eu tirei aqui não deu certo não, tem como fazer ai pra mim ?

REP+

dyego2008D
11 de agosto de 2013 às 15:33

Tente assim ...

 

 

 

if channel ~= CHANNEL

 

Deixe apenas CHANNEL

Editado Agosto 11 por dyego2008

SlicerS
11 de agosto de 2013 às 18:23

/\ lol?

 

usa esse aki...

 

 

function onSay(cid, words, param, channel)
   if getPlayerGuildId(cid) <= 0 then
      return false
   end
   local str = "Membros da Guild "..(param == "" and "" or "Online")..":"
   local guild = param == "" and getGuildMembers(getPlayerGuildId(cid)) or getGuildMembersOnline(getPlayerGuildId(cid))
   for i = 1, #guild do
      str = str..""..(param == "" and guild[i] or getPlayerName(guild[i]))..""..(#guild == i and "." or ",")
   end
   if channel ~= CHANNEL_GUILD then
      return doPlayerSendTextMessage(cid, 27, str)
   else
      return doPlayerSendChannelMessage(cid, "", str, TALKTYPE_CHANNEL_RN, CHANNEL_GUILD)
   end
end

Editado Agosto 11 por Slicer

MaenilseM
11 de agosto de 2013 às 19:56

/\ deu nao, ele nao da nenhuma erro na distro, mas nao mostra nada em channel nenhum.

SlicerS
11 de agosto de 2013 às 20:15

teu char tem guild ms? ;x pq agora n parece ter nenhum problema n... ;x

-preguiça de testar aki-

MaenilseM
11 de agosto de 2013 às 20:19

/\ claro que meu char ta em guild u.u.

 

20:18 You see yourself. You are administrador.[Frags: 0] You are Leader of the The Boss

VodkartV
11 de agosto de 2013 às 20:35

 

function onSay(cid, words, param, channel)
if getPlayerGuildId(cid) <= 0 then
doPlayerSendTextMessage(cid, 27, "você não tem guild.") return true
end
str = "Membros da Guild "..(param == "" and "" or "Online")..":"
guild = param == "" and getGuildMembers(getPlayerGuildId(cid)) or getGuildMembersOnline(getPlayerGuildId(cid))
for i = 1,#guild do
str = str..""..(param == "" and guild[i] or getPlayerName(guild[i]))..""..(#guild == i and "." or ",")
end
return doPlayerSendTextMessage(cid, 27, str)
end
SlicerS
11 de agosto de 2013 às 20:41

cabei de testar aki e foi --'

 

20:40 Membros da Guild :[GOD]Ticho,Ticha.

 

20:40 You see yourself. You are a GOD and a Gardestrike Tamer from Saffron City. You are Leader from the Avengers.
Position: [X: 1045][Y: 1057][Z: 7]

MaenilseM
11 de agosto de 2013 às 21:10
function onSay(cid, words, param, channel)
if getPlayerGuildId(cid) <= 0 then
doPlayerSendTextMessage(cid, 27, "você não tem guild.") return true
end
str = "Membros da Guild "..(param == "" and "" or "Online")..":"
guild = param == "" and getGuildMembers(getPlayerGuildId(cid)) or getGuildMembersOnline(getPlayerGuildId(cid))
for i = 1,#guild do
str = str..""..(param == "" and guild[i] or getPlayerName(guild[i]))..""..(#guild == i and "." or ",")
end
return doPlayerSendTextMessage(cid, 27, str)
end

ae preto, funfo ake, amanha te do o rep, ja chego no limite.-.

SkymagnumS
11 de agosto de 2013 às 21:46

Slicer, no que você mandou a mensagem estava mandando no chat da guild -k.