Postado Novembro 4, 2012 12 anos Olá a todos , essa é uma versão do !partycheck - !guildcheck feita pelo Jetro. Esses comandos checam quem está online no seu Team. - !partycheck mostra quem está online na sua party - !guildcheck é um parametro que mostra quem está online na guild que você quiser checar . Exemplo : !guildcheck The Legion No caso,se a guild The Legion existir,irá mostrar todos online nessa guild. --------------------------------------------------------------------------- INSTALANDO O SCRIPT 1 - Vá até data/talkactions/scripts e crie um arquivo com o nome comandocheck.lua local function getMembersOnline(tabla) if (type(tabla) == 'table') then local nohay = "There are not." str = "Members list: "..#players.sorcs + #players.druids + #players.paladins + #players.kinas.."\n" str = str.. "•Sorcerers (".. #players.sorcs.."):\n ".. (#players.sorcs == 1 and players.sorcs[1] or #players.sorcs > 1 and table.concat (players.sorcs, "\n") or nohay).. " \n" str = str.. "•Druids ("..#players.druids.."):\n ".. (#players.druids == 1 and players.druids[1] or #players.druids > 1 and table.concat (players.druids, "\n") or nohay).. "\n" str = str.. "•Paladins ("..#players.paladins.."):\n "..(#players.paladins == 1 and players.paladins[1] or #players.paladins > 1 and table.concat (players.paladins, "\n") or nohay).. "\n" str = str.. "•Knights("..#players.kinas.."):\n ".. (#players.kinas == 1 and players.kinas[1] or #players.kinas > 1 and not table.sort(players.kinas, function (a, b) return (a:match("%d+") < b:match("%d+")) end) and table.concat (players.kinas, "\n") or nohay).."\n" str = str.. "•The best knights are:\n "..(#players.kinas == 0 and nohay or #players.kinas == 1 and players.kinas[1] or #players.kinas == 2 and players.kinas[1].."\n"..players.kinas[2] or #players.kinas >= 3 and players.kinas[1].."\n"..players.kinas[2] .. "\n"..players.kinas[3]) end return str end local shield = 2511 function onSay(cid, words, param, channel) if (words == '/guildcheck') then if (not param or param == "") then if (getPlayerGuildId(cid) >= 1) then guildId = getPlayerGuildId(cid) else return doPlayerSendCancel(cid, "You are not in a guild.") end elseif (getGuildId(param)) then guildId = getGuildId(param) else return doPlayerSendCancel(cid, "There is not exist a guild called "..param..".") end players = {} players.sorcs = {} players.druids = {} players.paladins = {} players.kinas = {} for _, pid in pairs (getPlayersOnline()) do if (getPlayerGuildId(pid) == guildId ) then local str = getPlayerName(pid).. " ["..getPlayerLevel(pid).."]" if (isSorcerer(pid)) then table.insert(players.sorcs, str) elseif (isDruid(pid)) then table.insert(players.druids, str) elseif (isPaladin(pid)) then table.insert(players.paladins, str) elseif (isKnight(pid)) then table.insert(players.kinas, str) end end end doShowTextDialog(cid, shield, "Guild "..param.. " "..getMembersOnline(players)) elseif (words == '/partycheck') then if (isInParty(cid)) then players = {} players.sorcs = {} players.druids = {} players.paladins = {} players.kinas = {} for _, pid in pairs(getPlayersOnline()) do if (isInParty(pid) and getPlayerParty(pid) == getPlayerParty(cid)) then str = getPlayerName(pid).. " ["..getPlayerLevel(pid).."]" if (isSorcerer(pid)) then table.insert(players.sorcs, str) elseif (isDruid(pid)) then table.insert(players.druids, str) elseif (isPaladin(pid)) then table.insert(players.paladins, str) elseif (isKnight(pid)) then table.insert(players.kinas, str) end end end doShowTextDialog(cid, shield, "Party "..getMembersOnline(players)) else doPlayerSendCancel(cid,"You are not in a party.") end end return true end 2 - Vá emdata/talkactions/talkactions.xml e adicione : <talkaction words="!partycheck;!guildcheck" event="script" value="nameofyourscript.lua"/> ------------------------------------------------- Créditos Jetro - fazer o script. Gaonner - trazer ao forum Editado Novembro 4, 2012 12 anos por Gaonner (veja o histórico de edições) Girls, kisses ! Dizem que o homem-aranha não existe porque está somente nos livros... E Deus existe mesmo estando somente na bíblia ... Povo Ignorante.
Postado Novembro 5, 2012 12 anos Eae , to dando REP+ so pq é teu aniversário memu '-' .... Zoa , gostei do conteudo :0 Clique na imagem e veja nosso TOPICO OFFICIAL
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.