Duplica um arquivo no data/talkaction/scripts e nomeia para "itemunban" sem as aspas e nele cole:
function onSay(cid, words, param, channel)
local itemid = 2345 -- id do item que ira remover
local j = 0
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
if (getPlayerItemCount(cid, itemid) <= 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You no have item.")
return true
end
local account, tmp = getAccountIdByName(param), true
if(account == 0) then
account = getAccountIdByAccount(param)
if(account == 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player or account '" .. param .. "' does not exists.")
return true
end
tmp = false
end
local ban = getBanData(account, BAN_ACCOUNT)
if(ban and doRemoveAccountBanishment(account)) then
local name = param
if(tmp) then
name = account
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, name .. " has been " .. (ban.expires == -1 and "undeleted" or "unbanned") .. ".")
end
if(not tmp) then
return true
end
tmp = getIpByName(param)
if(isIpBanished(tmp) and doRemoveIpBanishment(tmp)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "IP Banishment on " .. doConvertIntegerToIp(ip) .. " has been lifted.")
end
local guid = getPlayerGUIDByName(param, true)
if(guid == nil) then
return true
end
ban = getBanData(guid, BAN_PLAYER, PLAYERBAN_LOCK)
if(ban and doRemovePlayerBanishment(guid, PLAYERBAN_LOCK)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Namelock from " .. param .. " has been removed.")
doPlayerRemoveItem(cid, itemid, 1)
j = 1
end
ban = getBanData(guid, BAN_PLAYER, PLAYERBAN_BANISHMENT)
if(ban and doRemovePlayerBanishment(guid, PLAYERBAN_BANISHMENT)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, param .. " has been " .. (ban.expires == -1 and "undeleted" or "unbanned") .. ".")
if (j ~= 1) then
doPlayerRemoveItem(cid, itemid, 1)
end
end
return true
end
Em talkactions.xml cole a tag:
<talkaction words="/unban" event="script" value="itemunban.lua"/>
Prontinho, sóh tira a outra tag no talkactions.xml que tem o comando /unban.




info
Grupo: Campones
Registrado: 07/02/12
Posts: 55
Reputação: 0
Char no Tibia: {ADM} Marcelo
Tipo do script: Talkaction
Protocolo (versão do Tibia): 8.60
Servidor utilizado: Styller Yurots 0.8 [Original]
Nível de experiência: Médio.
Adicionais/Informações:
Comando que jogadores podem retirar o ban assim
!unban NomeDeAlguem
Removendo item X
Se não tiver o item X, o ban não será removido.
Exemplo
!unban Xtibia
Jogador Xtibia desbanido com sucesso!
--------------------------------------------------------
!unban Xtibia
Você não possui o item X para desbanir o jogador Xtibia.
Aguardo! REP+ pra quem faser pra mim *---*