Bom nao sei se seria isso mais ta ai!!
Abra data\talkactions\talkactions.xml
Em talkctions clique com botao direito do mause e em editar, feito isso adicione o seguinte :
<talkaction words="/jail" script="Cadeia.lua"/> <talkaction words="/unjail" script="Cadeia.lua"/>
Feche e salve o arquivo xml!!!
Agora vá em data\talkactions\scripts crie um bloco de nota com seguinte nome Cadeia.lua e adicione o seguinte:
--xXPaquitoXx--
default_jail = 300 -- muda para tempo que deseja que o jogador fique preso obs. é em segundos
grouprequired = 3
-- StorageValue that the player gets --
jailedstoragevalue_time = 1338
jailedstoragevalue_bool = 1339
-- POSICAO DA CADEIA: --
]jailpos = { x : x = 1196, y = 1100, z =7 } -- posiçao da cadeia já mudei
unjailpos = { x = 1196, y = 1100, z =7 } --posiçao do templo
-- auto kicker, dont edit
jail_list = {}
jail_list_work = 0
function checkJailList(param)
addEvent(checkJailList, 1000, {})
for targetID,player in ipairs(jail_list) do
if isPlayer(player) == TRUE then
if getPlayerStorageValue(player, jailedstoragevalue_time) < os.time() then
doTeleportThing(player, unjailpos, TRUE)
setPlayerStorageValue(player, jailedstoragevalue_time, 0)
setPlayerStorageValue(player, jailedstoragevalue_bool, 0)
table.remove(jail_list,targetID)
doPlayerSendTextMessage(player,MESSAGE_STATUS_CONSOLE_ORANGE,'Você infringio regras do ot está preso! Até logo') --edita para fraze que desejar
end
else
table.remove(jail_list,targetID)
end
end
end
-------------------------------
function onSay(cid, words, param)
if jail_list_work == 0 then
jail_list_work = addEvent(checkJailList, 1000, {})
end
if param == '' and (words == '!unjail' or words == '/unjail') then
if getPlayerStorageValue(cid, jailedstoragevalue_time) > os.time() then
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'Você está preso até ' .. os.date("%H:%M:%S", getPlayerStorageValue(cid, jailedstoragevalue_time)) .. ' (Agora são: ' .. os.date("%H:%M:%S", os.time()) .. ').')
else
if getPlayerStorageValue(cid, jailedstoragevalue_bool) == 1 then
table.insert(jail_list,cid)
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'Você vai sair da prisão em um segundo.')
else
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'Você não está preso.')
end
end
return TRUE
end
local jail_time = -1
for word in string.gmatch(tostring(param), "(%w+)") do
if tostring(tonumber(word)) == word then
jail_time = tonumber(word)
end
end
local isplayer = getPlayerByName(param)
if isPlayer(isplayer) ~= TRUE then
isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+1))
if isPlayer(isplayer) ~= TRUE then
isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+2))
if isPlayer(isplayer) ~= TRUE then
isplayer = getPlayerByName(string.sub(param, string.len(jail_time)+3))
end
end
end
if jail_time ~= -1 then
jail_time = jail_time * 60
else
jail_time = default_jail
end
if words == '!jail' or words == '/jail' then
if getPlayerGroupId ( cid ) >= grouprequired then
if isPlayer(isplayer) == TRUE then
doTeleportThing(isplayer, jailpos, TRUE)
setPlayerStorageValue(isplayer, jailedstoragevalue_time, os.time()+jail_time)
setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 1)
table.insert(jail_list,isplayer)
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'Você está preso '.. getCreatureName(isplayer) ..' até ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (Agora são: ' .. os.date("%H:%M:%S", os.time()) .. ').')
doPlayerSendTextMessage ( isplayer, MESSAGE_INFO_DESCR, 'Você foi preso por '.. getCreatureName(cid) ..' até ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (Agora sao: ' .. os.date("%H:%M:%S", os.time()) .. ').')
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O player com este nome não existe ou está offline.")
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não pode libertar outros jogadores.")
return FALSE
end
elseif words == '!unjail' or words == '/unjail' then
if getPlayerGroupId ( cid ) >= grouprequired then
if isPlayer(isplayer) == TRUE then
doTeleportThing(isplayer, unjailpos, TRUE)
setPlayerStorageValue(isplayer, jailedstoragevalue_time, 0)
setPlayerStorageValue(isplayer, jailedstoragevalue_bool, 0)
table.remove(jail_list,targetID)
doPlayerSendTextMessage(isplayer,MESSAGE_STATUS_CONSOLE_ORANGE,getCreatureName(cid) .. 'vou deixar você sair da prisão!')
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'Voce está solto '.. getCreatureName(isplayer) ..'.')
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "O player com este nome não existe ou está offline.")
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você não pode libertar outros jogadores.")
return FALSE
end
end
return FALSE
end
Bom para prender você digita /jail bandido
Para tiralo da cadeia /unjail bandido
Legenda
Nome do jogador á banir!
Este script nao é de minha autoria dei poucas editadas nele somente, entao creditos ao autor, nao sei nome entao se aparece dono poste que ponho seus devidoscreditos!
---------------------------------------------------------
AJUDEI CLICA ALI :button_ok: REP +






info
Grupo: Campones
Registrado: 01/01/11
Posts: 39
Reputação: +8
Char no Tibia: Nao tenho
Eai galera xtibiana , to aqui para pedir um script "prisao" eu tenho um so que nao é do jeito que eu quero , vou explicar :
É assim , eu GOD quero fazer uma prisao para alguem que fazer alguma coisa de errado , dai eu vo e coloco /cadeia (Nick da pessoa),(tempo em minutos),(motivodaprisao) dai a pessoa vai para um certa area ( cadeia ) e aparace uma mensagem PARA TODOS DO SERVER "O admin (nomedoadmin) mandou o player (nome do player) para a prisao. Motivo : (motivoquefoipreso).
Agora vo falar do jeito que e os comandos em quote
Exemplo tem eu GM Psy e o player Joao xD dai eu vo lá e do
Dai logo que eu mandar ele pra prisao , ele aparace na pos x : 1065 y : 906 z : 7 dai fica la 10 minutos e aparace uma mensagem para ele assim ( SÓ PARA ELE ) Você foi preso pelo admin Psy.
dai no msm tempo aparace uma mensagem para todos assim :
O admin Psy mandou o player Joao xD para a prisao. Motivo : Racismo.
DOU +REP QUEM FIZER