Blazera 8.60
blazera.net
SOBRE O BLAZERA
Um fresh start em um servidor 8.6 clássico, com real map, focado na experiência raiz do Tibia. | Classic Real Map • Fresh Start • Client 8.6 • Old School Gameplay • Active Community
Inicia em:
--
Participar
Histórico de Curtidas
-
JohnnyDK deu reputação a Vodkart em [PEDIDO]Muteplayer um pouco diferente!Conseguiu criar esse parâmetro? é bem simples, o código é de minha autoria, e posso fazer essa alteração.
Sobre o código, falta uma parte dele, o onLogin no caso, que serve para caso jogador deslogar e logar novamente, ele ainda esteja mutado.
http://www.tibiaking.com/forum/topic/12122-talk-comando-mutedesmute/
luangop
obrigado por compartilhar essa informação!
-
JohnnyDK deu reputação a Wise em [PEDIDO]Muteplayer um pouco diferente!Que confusão desnecessária..
Deixei o parâmetro de reason, como sendo opcional.
(Estou via mobile, não tem opção <code>)
function onSay(cid, words, param)
local p = string.explode(param, ',')
local pid = getPlayerByName(p[1])
if param == '' then
return doPlayerSendCancel(cid, 'Enter in sequence: player\'s name, time in minutes, reason (optional). E.g.: /mute Violator, 2, Spam')
elseif not tostring(p[1]) or type(p[2]) ~= 'number' or p[3] and not tostring(p[3]) then
return doPlayerSendCancel(cid, 'Invalid parameters.')
elseif not pid then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_PLAYERWITHTHISNAMEISNOTONLINE)
elseif getPlayerAccess(pid) > getPlayerAccess(cid) then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
doMutePlayer(pid, p[2] * 60)
doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_RED, 'You\'ll stay '..p[2]..' minute'..(p[2] > 1 and 's' or '')..' muted'..(p[3] ~= '' and ' for '..p[3]:lower() or '.'))
return doPlayerSendCancel(cid, p[1]..' was muted successfully.')
end
-
JohnnyDK deu reputação a vankk em [PEDIDO]Muteplayer um pouco diferente!Achei esse script no google, não sei se vai funcionar:
local v = {} for k = 1, 100 do table.insert(v, createConditionObject(CONDITION_MUTED)) setConditionParam(v[k], CONDITION_PARAM_TICKS, k*60*1000) end local timea = k*60*1000 function onSay(cid, words, param) if (words == "/mute") then local t = string.explode(param, ",") if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player,time,pid = getPlayerByName(t[1]),t[2],getPlayerByNameWildcard(t[1]) if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player with this name doesn\'t exist or is offline.") return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You muted Player "..t[1].." for "..tonumber(timea).." minutes.") doAddCondition(player, v[tonumber(time)]) setPlayerStorageValue(player, 90000, os.time()+time*60) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "You have been muted for "..tonumber(timea).." minutes.") elseif (words == "/desmute") then if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid param specified.") return true end local player = getPlayerByNameWildcard(param) if(not player)then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player not found.") return true end if getCreatureCondition(player, CONDITION_MUTED) == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This player is not muted.") return true end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You desmuted player "..param..".") doRemoveCondition(player, CONDITION_MUTED) setPlayerStorageValue(player, 90000, -1) doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "You have been desmuted.") end return true end <talkaction log="yes" words="/mute;/desmute" access="2" event="script" value="muteplayer.lua"/>
/mute NAME,MINUTES