FA
action
[Pedido] Talkactions Mute Com Motivo
Por Farathor, 09 de mar. de 2014 em Scripts
otserv
tibia
script
6
818
3 semanas depois...
info
Grupo: Visconde
Registrado: 02/10/13
Posts: 320
Reputação: +22
Gênero: Masculino

27 de março de 2014 às 22:29
Ajudo em Nada ;x
28 de março de 2014 às 14:27
Melhor resposta
local v = {}
for k = 1, 100 do
table.insert(v, createConditionObject(CONDITION_MUTED))
setConditionParam(v[k], CONDITION_PARAM_TICKS, k*60*1000)
end
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 reason = t[3]
if not reason then
reason = "No reason."
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_STATUS_CONSOLE_RED, "Você mutou o jogador "..t[1].." por "..time.." minutos, pelo motivo: "..reason)
doAddCondition(player, v[tonumber(time)])
setPlayerStorageValue(player, 90000, os.time()+time*60)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você foi mutado por "..getCreatureName(cid).." "..time.." minutos, pelo motivo: "..reason)
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, "este jogador não está mutado.")
return true
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você desmutou o jogador "..param..".")
doRemoveCondition(player, CONDITION_MUTED)
setPlayerStorageValue(player, 90000, -1)
doPlayerSendTextMessage(player, MESSAGE_INFO_DESCR, "Você foi desmutado.")
end
return true
end
info
Grupo: Visconde
Registrado: 02/10/13
Posts: 320
Reputação: +22
Gênero: Masculino

28 de março de 2014 às 23:31
Muito Obrigado Cara, Duvida Sanada!
info
Grupo: Conde
Registrado: 18/01/12
Posts: 988
Reputação: +327
Gênero: Masculino
Char no Tibia: Xerife Woody

28 de março de 2014 às 23:47
Tópico movido para Pedidos e dúvidas resolvidos.





info
Grupo: Visconde
Registrado: 02/10/13
Posts: 320
Reputação: +22
Gênero: Masculino
Eu Peguei Esse Script do Vodkart,So Que Eu Queria Adicionar Uma Coisa,Quando o Tutor Foi Mutar Alguem Ele Fala./Mute Player,Tempo,Motivo Intão,Aparece Uma Msg Assim Para o Tutor,no server log em Vermelho. Você Mutou o Jogador ..... Por Tempo,Pelo Motivo: .....
E Pro Player Que Foi Mutado Aparece Isso,Você Foi Mutado Por "Aqui o Jogador Que Aplicou o Muted Nele",Por "Tempo",Pelo Motivo de: ....... obrigado
Script do Vodkart