Area errada amigo, a area correta seria em Pedidos de Scripts, reportado.
Abraços.
Por ciappabrother, 23 de mai. de 2010 em Archived
info
Grupo: Conde
Registrado: 31/10/08
Posts: 871
Reputação: +199
Char no Tibia: Luis Felipe Knight

Area errada amigo, a area correta seria em Pedidos de Scripts, reportado.
Abraços.
info
Grupo: Campones
Registrado: 12/04/08
Posts: 75
Reputação: +9

Valew ai!!/
Abraços
Te Ajudei?
Você e nosso Fan?
Use minha FanBar
Gasper&Reaper Fanbar

![]()
Editado Maio 23 por anfarosx
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

-- Default jail time in seconds --
default_jail = 30
-- The permission you need to jail someone --
grouprequired = 3
-- StorageValue that the player gets --
jailedstoragevalue_time = 1338
jailedstoragevalue_bool = 1339
-- POSIcaO DA CADEIA: --
jailpos = { x = 128, y = 72, z =7 }
-- POSICAO DO TEMPLO: --
unjailpos = { x = 160, y = 52, z =7 }
-- 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,'You were kicked from jail! See you later ')
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, 'You are jailed until ' .. os.date("%H:%M:%S", getPlayerStorageValue(cid, jailedstoragevalue_time)) .. ' (now is: ' .. 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, 'You will be kicked from jail in one second.')
else
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You are not jailed.')
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, 'You jailed '.. getCreatureName(isplayer) ..' until ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').')
doPlayerSendTextMessage ( isplayer, MESSAGE_INFO_DESCR, 'You have been jailed by '.. getCreatureName(cid) ..' until ' .. os.date("%H:%M:%S", getPlayerStorageValue(isplayer, jailedstoragevalue_time)) .. ' (now is: ' .. os.date("%H:%M:%S", os.time()) .. ').')
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player with this name doesn\'t exist or is offline.")
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have access to unjail other players.")
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) .. ' let you go out from jail! See you later')
doPlayerSendTextMessage ( cid, MESSAGE_INFO_DESCR, 'You unjailed '.. getCreatureName(isplayer) ..'.')
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Player with this name doesn\'t exist or is offline.")
return FALSE
end
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have access to unjail other players.")
return FALSE
end
end
return FALSE
end
talkactions.xml
<talkaction words="!jail" script="Cadeia.lua"/>
<talkaction words="!unjail" script="Cadeia.lua"/>
<talkaction words="/jail" script="Cadeia.lua"/>
<talkaction words="/unjail" script="Cadeia.lua"/>
info
Grupo: Campones
Registrado: 12/04/08
Posts: 75
Reputação: +9

Valeu ai vodcart ![]()
mas cara nao da pra tipo no script coloka pra teletransporta o player pra prisao direto tipo
eu falo /jain {playername} e que fais ele ir pra prisao sem presizar de /c?
que assim quando do /unjail o player vai pro templo
e quando falo /jail ele nao vai pra prisao....
se tiver algum bug arrumae ![]()
Abracs
Editado Maio 24 por anfarosx
info
Grupo: Herói
Registrado: 20/05/10
Posts: 3.4k
Reputação: +1.5k
Gênero: Masculino

esse script está tudo certo só você configurar ele,
se vc fala /jail PLAYER NAME ele é mandado para prisão
se vc fala /unjail PLAYER NAME ele é retirado da prisao...
só muda isso:
-- Default jail time in seconds --
default_jail = 30
-- POSIcaO DA CADEIA: --
jailpos = { x = 128, y = 72, z =7 }
-- POSICAO DO TEMPLO: --
unjailpos = { x = 160, y = 52, z =7 }
Vermelho: Tempo em segundos que o player irá ficar preso
azul: Coordenadas da sua prisão
laranja: coordenadas do seu templo
oque foi que voce não entendeu?
info
Grupo: Campones
Registrado: 12/04/08
Posts: 75
Reputação: +9

eu que so burro msm ;/
valew pela ajuda !
Cliquei no + ali em baixo!!
Valew ai!
Abraços
(Duvida: coloquei o
z.z e y.y na posiçao erada .-. coloquei o andar errado!)
info
Grupo: Campones
Registrado: 12/04/08
Posts: 75
Reputação: +9
Olá XTibianos !!
Presizo De uma Ajuda de vocês!!
BOm Tava vendo uns scripts e vi o script de manda para a prisão por TalkActions mas não tava funcionando....
Eu Presizo de 2 scripts de Talk!
O 1° e um assim
que eu falo /prision {PLAYERNAME} e envia o player para uma torre que eu possa escolher a localização (x , y ,z)
e depois de 10 minutos ele enviara o player para o templo ou que eu fale o comando
/unprision {PLAYERNAME} e que mande para o templo O player que estava preso !!
Urgente...
E O Outro Script e um zoado HAHA
e um que eu falo /crew com um iten que eu criei chamado Camisinha dai se o player falar /crew com a camisinha a camisinha some mas se ele falar /crew sem a camisinha em baixo da pessoa em que ele falou crew aparese um bonequinho escrito assim (Ele E filho de {PLAYERNAME} e de {PLAYERNAME})
O Script do crew nem presiza mas quem puder ajudar....
O da prision eu presizo muitooo!
para a versao 8.5
Abraços
Te Ajudei?
Você e nosso Fan?
Use minha FanBar
Gasper&Reaper Fanbar
Editado Maio 23 por anfarosx