comedinhasss 234 Postado Fevereiro 17, 2013 Share Postado Fevereiro 17, 2013 (editado) Versão: 3.2Versão de tibia: 9.4+ (Funciona em anteriores)Descrição: Existem muitos scripts que ajudam o administrador do servidor a cuidar dele, um deles é saber coisas sobre quem está jogando e se está sendo honesta. Eu peguei alguns scripts e estou juntando em um para diminuir o tamanho e ter uma fácil verificação.TAG: <talkaction log="yes" words="!p;/p" access="5" event="script" value="playercheck.lua"/> Script:Talkactions/scripts/playercheck.lua local config = { check = {"check", "viwer", "verificar", "ver"}, delete = {"del", "delete", "deletar"}, search = {"search", "procurar"} } function getItemsInContainer(cont, sep) local text = "" local tsep = "" local count = "" for i=1, sep do tsep = tsep.."-" end tsep = tsep..">" for i=0, getContainerSize(cont.uid)-1 do local item = getContainerItem(cont.uid, i) if isContainer(item.uid) == FALSE then if item.type > 0 then count = "("..item.type.."x)" end text = text.."\n"..tsep..getItemNameById(item.itemid).." "..count.." ("..item.itemid..")" else if getContainerSize(item.uid) > 0 then text = text.."\n"..tsep..getItemNameById(item.itemid).." ("..item.itemid..")" text = text..getItemsInContainer(item, sep+2).." ("..item.itemid..")" else text = text.."\n"..tsep..getItemNameById(item.itemid).." ("..item.itemid..")" end end end return text end function onSay(cid, words, param, channel) local slotName = {"Cabeça", "Amuleto", "Backpack", "Armor", "Mao Direita", "Mao Esquerda", "Legs", "Pés", "Ring", "Ammo Slot"} local t = string.explode(param, ",") if(table.isStrIn(param, config.check)) then if getPlayerGroupId (cid) >= 5 then local player = getPlayerByNameWildcard(t[2]) if isPlayer(player) == TRUE then local text = getPlayerName(player).."'s Equipment: " for i=1, 10 do text = text.."\n\n" local item = getPlayerSlotItem(player, i) if item.itemid > 0 then if isContainer(item.uid) == TRUE then text = text..slotName[i]..": "..getItemNameById(item.itemid).." ("..item.itemid..") "..getItemsInContainer(item, 1) else text = text..slotName[i]..": "..getItemNameById(item.itemid).." ("..item.itemid..")" end else text = text..slotName[i]..": Empty" end end doShowTextDialog(cid, 6579, text) else doPlayerSendCancel(cid, "This player is not online.") end end elseif(table.isStrIn(param, config.delete)) then if getPlayerGroupId(cid) >= 5 then local player = getPlayerByNameWildcard(t[3]) if isPlayer(player) == TRUE then count = t[4] if(not t[4]) then count = 1 end if getPlayerItemCount(player, t[2]) > 0 then if doPlayerRemoveItem(player, t[2], count) then doPlayerSendCancel(cid, "Item Deletado.") else doPlayerSendCancel(cid, "Este player não esta quantidade.") end else doPlayerSendCancel(cid, "Este player não tem o item.") end end end elseif(table.isStrIn(param, config.search)) then if getPlayerGroupId (cid) >= 5 then local player = getPlayerByNameWildcard(t[3]) local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = ".. t[2] ..");") local msg = "Resultados da busca pelo item ".. t[2] .." em seu banco de dados:\n\n" if result:getID() ~= -1 then while true do local name = result:getDataString("name") local online = result:getDataInt("online") msg = msg .. name .." [".. (online == 1 and "Online" or "Offline") .."]\n" if not result:next() then break end end else msg = msg .. "O item não foi encontrado em nenhum jogador." end doShowTextDialog(cid, t[2], msg) end end return true end Explicação:Quando o god digita:/p check, (PNAME) - Ele verifica os items que o player tem./p del, (ID), (PNAME), (COUNT) - Ele deleta o item de determinado player (Se não colocar o count ele irá remover somente 1)./p search, (ID) - Ele verifica quantos players tem tal item e se está online.Créditos:OneshotCaioODemaisComedinha (Bruno Carvalho) Editado Janeiro 10, 2014 por BrunoCarvalho Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/ Compartilhar em outros sites More sharing options...
manoelouro 1 Postado Fevereiro 17, 2013 Share Postado Fevereiro 17, 2013 (editado) Cara testei aqui e ta rox,muito boum o script,ta de parabens pelo trabalho,sera de grande ajuda para a galera q se dedica a fazer um servidor seriu tem meu REP+ manolo Editado Fevereiro 17, 2013 por manoellouro Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1471480 Compartilhar em outros sites More sharing options...
comedinhasss 234 Postado Fevereiro 17, 2013 Autor Share Postado Fevereiro 17, 2013 Cara testei aqui e ta rox,muito boum o script,ta de parabens pelo trabalho,sera de grande ajuda para a galera q se dedica a fazer um servidor seriu tem meu REP+ manolo Vlw cara, eu estou usando ele no atual Alissow Server também... Em breve quem saiba novas atualizações, com novas funções... Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1471488 Compartilhar em outros sites More sharing options...
Administrador Administrador 1436 Postado Fevereiro 17, 2013 Administrador Share Postado Fevereiro 17, 2013 Bem funcional comedinhas, curti! rep+ Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1471494 Compartilhar em outros sites More sharing options...
manoelouro 1 Postado Fevereiro 17, 2013 Share Postado Fevereiro 17, 2013 Cara axei um pequeno bug,tipo nada que tire sua funcionalidade,quando eu tenhu um item na BP agrupavel e esse item tem um count maior q 2,os outrositens listados sao mostrado com count do primeiro. Exemplo: Na minha bp tenhu 2 macas,1 mace e 1 sword quando dou check ele lista 2 macas,2 maces e 2 swords,o script ta armazenandu o count do primeiro e lista esse count nos proximos. Espero ter contribuido Manolo Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1471577 Compartilhar em outros sites More sharing options...
comedinhasss 234 Postado Fevereiro 17, 2013 Autor Share Postado Fevereiro 17, 2013 Cara axei um pequeno bug,tipo nada que tire sua funcionalidade,quando eu tenhu um item na BP agrupavel e esse item tem um count maior q 2,os outrositens listados sao mostrado com count do primeiro. Exemplo: Na minha bp tenhu 2 macas,1 mace e 1 sword quando dou check ele lista 2 macas,2 maces e 2 swords,o script ta armazenandu o count do primeiro e lista esse count nos proximos. Espero ter contribuido Manolo Vlw, vou verificar. Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1471590 Compartilhar em outros sites More sharing options...
hounteern 0 Postado Novembro 28, 2013 Share Postado Novembro 28, 2013 Get amazing online web traffic using best xrumer service today. We can post your custom message up to 10K forums worldwide, get insane amount of backlinks and great online web traffic in very short time. Most affordable and most powerful service for web traffic and backlinks in the world!!!! Price just from $29 your post will be published up to 100000 forums worldwide your website will get insatnt traffic and massive increase in rankings just after few days or weeks. Order now: xrumer blast Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1586847 Compartilhar em outros sites More sharing options...
meubk 257 Postado Novembro 30, 2013 Share Postado Novembro 30, 2013 util Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1587291 Compartilhar em outros sites More sharing options...
Rikutachimoto 8 Postado Novembro 30, 2013 Share Postado Novembro 30, 2013 (editado) Acho muito útil, se algum jogador pegar um item indesejado você vai poder remover dele simplesmente. Editado Novembro 30, 2013 por Rikutachimoto Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1587293 Compartilhar em outros sites More sharing options...
Avuenja 253 Postado Janeiro 10, 2014 Share Postado Janeiro 10, 2014 Fuck, excelente! Parabéns Bruno, já precisei de um script assim e não tinha... xD Link para o comentário https://xtibia.com/forum/topic/207918-player-check-system/#findComment-1600939 Compartilhar em outros sites More sharing options...
Posts Recomendados