Postado Dezembro 15, 2014 10 anos ALO COM QUEM EU FALO? Galera estou querendo um Scritp que faça assim: /cargo [NOME DO PLAYER], [CARGO] ex: /cargo Splayer, Dono ai fica assim: 1) Nome do Player Alterado ([DONO] Splayer) 2) Player ficando no Group_id = 6 3) Aparençendo uma mensagem na tela ou no Chat que ele será kickado 4) Player sendo kickado AGRADEÇO A TODOS, E REPUTAREI! @UP Meus Contatos! Minhas Funções: Skype: TsplayerT Facebook: TakaFukushii YouTube: ADoseDupla Twitter: @_Splayer_ Mapper:▓▓▓▓▓▓▓▓▓▓ 97% Programmer:▓▓▓▓▓▒▒▒▒▒ 45% Scripter:▓▓▓▓▓▓▓▓▓▒ 83% Spriter:▓▓▓▓▓▓▒▒▒▒ 57% Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99% Ot Creator:▓▓▓▓▓▓▓▒▒▒71% Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%
Postado Dezembro 15, 2014 10 anos Não testei. local cargos = { ["tutor"] = {prefixNick = "[TUTOR]", group = 2}, ["gm"] = {prefixNick = "[GM]", group = 4}, ["cm"] = {prefixNick = "[GM]", group = 5}, ["adm"] = {prefixNick = "[ADM]", group = 6}, } function onSay(cid, words, param, channel) local t = string.explode(param, ",") if not isPlayer(getCreatureByName(t[1]:lower())) then doPlayerSendCancel(cid, "Este player não está online, ou não existe.") return true end local c = cargos[t[2]:lower()] if not c then doPlayerSendCancel(cid, "Cargo inexistente.") return true end db.executeQuery("UPDATE `players` SET `name` = '" .. c.prefixNick .. " ".. t[1]:lower() .. " ' WHERE name = '" .. t[1]:lower() .. "';") doPlayerSetGroupId(getCreatureByName(t[1]:lower(), c.group) addEvent(function(), if isPlayer(getCreatureByName(t[1]:lower())) then doRemoveCreature(getCreatureByName(t[1]:lower()), true) end, 5 * 1000, end) doPlayerSendTextMessage(getCreatureByName(t[1]:lower()), 27, "Voce sera kikado em 5 segundos.") return true end Tony Araújo
Postado Dezembro 15, 2014 10 anos Autor Não testei. local cargos = { ["tutor"] = {prefixNick = "[TUTOR]", group = 2}, ["gm"] = {prefixNick = "[GM]", group = 4}, ["cm"] = {prefixNick = "[GM]", group = 5}, ["adm"] = {prefixNick = "[ADM]", group = 6}, } function onSay(cid, words, param, channel) local t = string.explode(param, ",") if not isPlayer(getCreatureByName(t[1]:lower())) then doPlayerSendCancel(cid, "Este player não está online, ou não existe.") return true end local c = cargos[t[2]:lower()] if not c then doPlayerSendCancel(cid, "Cargo inexistente.") return true end db.executeQuery("UPDATE `players` SET `name` = '" .. c.prefixNick .. " ".. t[1]:lower() .. " ' WHERE name = '" .. t[1]:lower() .. "';") doPlayerSetGroupId(getCreatureByName(t[1]:lower(), c.group) addEvent(function(), if isPlayer(getCreatureByName(t[1]:lower())) then doRemoveCreature(getCreatureByName(t[1]:lower()), true) end, 5 * 1000, end) doPlayerSendTextMessage(getCreatureByName(t[1]:lower()), 27, "Voce sera kikado em 5 segundos.") return true end como que é a tag, para o talkactions, se for talkactions tem como colocar uma resposta? tipo comando errado, vai apareçer como deve ser feito Meus Contatos! Minhas Funções: Skype: TsplayerT Facebook: TakaFukushii YouTube: ADoseDupla Twitter: @_Splayer_ Mapper:▓▓▓▓▓▓▓▓▓▓ 97% Programmer:▓▓▓▓▓▒▒▒▒▒ 45% Scripter:▓▓▓▓▓▓▓▓▓▒ 83% Spriter:▓▓▓▓▓▓▒▒▒▒ 57% Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99% Ot Creator:▓▓▓▓▓▓▓▒▒▒71% Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%
Postado Dezembro 15, 2014 10 anos como que é a tag, para o talkactions, se for talkactions tem como colocar uma resposta? tipo comando errado, vai apareçer como deve ser feito O seu pedido é de um comando, correto? Então sim, é uma talkaction. Códigos do Orochi Elf cargo.lua (data/talkactions/scripts): local cargos = { ["tutor"] = {prefixNick = "[TUTOR]", group = 2}, ["gm"] = {prefixNick = "[GM]", group = 4}, ["cm"] = {prefixNick = "[GM]", group = 5}, ["adm"] = {prefixNick = "[ADM]", group = 6} } function onSay(cid, words, param, channel) local t = string.explode(param, ",") if param == "" or not tostring(t[1]) or not tostring(t[2]) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite o nome do jogador e o nome do cargo que deseja atribuir à ele, separados por vírgula. Exemplo: /cargo Player, GM") end local p = getPlayerByNameWildcard(t[1]) if not p then return doPlayerSendCancel(cid, "Este player não está online, ou não existe.") end local c = cargos[t[2]:lower()] if not c then return doPlayerSendCancel(cid, "Cargo inexistente.") end db.executeQuery("UPDATE `players` SET `name` = '"..c.prefixNick.." "..getCreatureName(p).."' WHERE `players`.`id`= "..getPlayerGUID(p).."") doPlayerSetGroupId(p, c.group) addEvent(function() if isPlayer(p) then doRemoveCreature(p, true) end end, 5 * 1000) doPlayerSendTextMessage(p, MESSAGE_STATUS_CONSOLE_BLUE, "Voce sera desconectado em 5 segundos.") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce deu acesso "..c.group.." para "..t[1]..", que agora é "..c.prefixNick) return true end Tag - talkactions.xml (data/talkactions): <talkaction log="yes" words="/cargo" access="5" event="script" value="cargo.lua"/> Editado Dezembro 16, 2014 10 anos por Suicide (veja o histórico de edições) The corrupt fear us. The honest support us. The heroic join us.
Postado Dezembro 15, 2014 10 anos @topic, Qm poderá usar esse comando? Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
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.