Help Tibia Ots
Bienvenido Invitado Registrate
¡Hola! En este momento estas conectado como un Invitado(Usuario No Registrado), si te gusta Tibia o deseas aprender a crear tu propio videojuego este es el foro indicado. Si ya estas registrado conectate y comienza a participar en todos los temas que tenemos para ti.

Jail System ^^ 5002-310


Unirse al foro, es rápido y fácil

Help Tibia Ots
Bienvenido Invitado Registrate
¡Hola! En este momento estas conectado como un Invitado(Usuario No Registrado), si te gusta Tibia o deseas aprender a crear tu propio videojuego este es el foro indicado. Si ya estas registrado conectate y comienza a participar en todos los temas que tenemos para ti.

Jail System ^^ 5002-310
Help Tibia Ots
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Attension Postulados para EL staff

Dom Oct 10, 2010 9:27 pm por Cody!

HOLAAS amigos De la comunidad e puesto un nueva Administradora llamada kasumi ^^
el estara para ayudar a toda la comunidad es un amiga de confiansa asi que ar aaportes en el forum gracias x todo i dejen sus comentarios de que opinan dela nueva administradora

COPA1 BBBIEN YEAHHHHH YEAHHHHH BRABONN SALTANTONN ZENZEI ZENZEI SSSSSSS

Comentarios: 14

Últimos temas
» Tibia Multi IP Changer 8.60 Download
Jail System ^^ EmptyVie Dic 27, 2013 8:35 pm por pueblo

» Tibia Multi IP changer 10.2 Download
Jail System ^^ EmptyDom Oct 20, 2013 7:18 pm por Luis151

» Tibia MC 10.1 - REDBOT 10.1 - Ibot 10.1 - MageBot 10.1 - BB BOT 10.1 DOWNLOAD
Jail System ^^ EmptyDom Sep 29, 2013 10:00 am por loko

» Tibia iBot Crack - 10.00 download
Jail System ^^ EmptyMiér Mayo 29, 2013 1:02 pm por pueblo

» Tibia MULTI ip changer - Todas as Versoes 7.1- 10.30
Jail System ^^ EmptyMiér Mayo 29, 2013 1:01 pm por pueblo

» Tibia Bot NG 10.2 crackedo DOWNLOAD
Jail System ^^ EmptyLun Mayo 27, 2013 6:37 am por PASCHUAN

» Tibia Bot NG 10.2 / Tibia MC 10.2 / Ibot 10.2 / TibiaAuto 10.2 / RedBot 10.2 / KeraBot 10.2
Jail System ^^ EmptySáb Ene 12, 2013 5:44 pm por Masakre

» Crews Ot Server 8.6 24/7
Jail System ^^ EmptySáb Ene 12, 2013 5:42 pm por Masakre

» problemas con TFS 8.60 para elf war system
Jail System ^^ EmptyMar Oct 30, 2012 11:31 pm por Cody!


Jail System ^^

Ir abajo

Jail System ^^ Empty Jail System ^^

Mensaje por Buzzlight Year Mar Oct 26, 2010 1:26 am

Este es un script supeeeer util la verdad consiste en si algun char esta haciendo desmadre o algo qe rompa las leyes tansolo dices !jail name y listo no mas problemas see va a la carcel durante 1 min. hahaha xD

Comenzemos:

vallan a OT/data/Talkactions/scripts agan una carpeta llamada Jailsystem y pongan esto:

Código:
-- Default jail time in seconds --
default_jail = 60
-- The permission you need to jail someone --
grouprequired = 4
-- StorageValue that the player gets --
jailedstoragevalue_time = 1338
jailedstoragevalue_bool = 1339
-- Set the position of the jail: --
jailpos = { x = 1001, y = 999, z =10 }
-- Set the position once unjailed: --
unjailpos = { x = 163, 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! Make sure to follow the rules from now on !')
            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()) .. ').')
doBroadcastMessage(' >>>'.. getCreatureName(cid) ..'<<< Ha encarcelado ha: '.. getCreatureName(isplayer) ..' ', MESSAGE_EVENT_ADVANCE)
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

Editar las cordenadas
Aquii se ponen las cordenadas de la carcel
Código:
jailpos = { x = 1001, y = 999, z =10 }

Aquii se ponen las cordenadas del Templo o a donde qieras qe se valla cuando salga de la carcel (Les recomiendo hacer una carcel original no una islita...)
Código:
unjailpos = { x = 163, y = 52, z =7 }

Aqi se edita el tiempo qe qieeres qe este en la carcel (en segundos)
Código:
default_jail = 60

ahora van a Talkactions.XML y pegan esto:
Código:

   <!-- Jail -->
   <talkaction words="!jail" script="jailsystem.lua"/>
   <talkaction words="!unjail" script="jailsystem.lua"/>
   <talkaction words="/jail" script="jailsystem.lua"/>
   <talkaction words="/unjail" script="jailsystem.lua"/>

y listo ;D

Buzzlight Year
ColaboradorColaborador

Mensajes : 16
Fecha de inscripción : 26/10/2010

Volver arriba Ir abajo

Jail System ^^ Empty Re: Jail System ^^

Mensaje por Buzzlight Year Lun Nov 08, 2010 1:57 am

Cody! escribió:=o Buen aporte men MAS RESP+

Ty;D

Buzzlight Year
ColaboradorColaborador

Mensajes : 16
Fecha de inscripción : 26/10/2010

Volver arriba Ir abajo

Volver arriba


 
Permisos de este foro:
No puedes responder a temas en este foro.