angel.maclish Moderador Global
Posts : 40 Points : 54 Reputation : 0 Join date : 13/07/2012 Location : LPZ
| Tema: Sistema Penal ;D Sáb Jul 14, 2012 9:27 am | |
| [center] ¿Qué es este sistema?Bueno, él es el derecho de sus jugadores OTServer, ser ladrones o la policía. [center] ¿Para qué lo puedo utilizar?para mantener su servidor más divertido Primero Crean un .lua llamado Police, en SuServer\Data\Actions\Scripts: - Código:
-
function onUse(cid, item, fromPosition, itemEx, toPosition)
local config = { minreward = 500, -- Mínimo que ganara el policía maxreward = 2000, -- Máximo que ganara el policía storage = 5569, -- Un Storage cualquiera color = math.random(1, 255), prisonPos = {x=1014, y=1034, z=7}, -- Para donde se tele-transportara el Ladrón storagePreso = 5570, -- Un Storage cualquiera time = 60, -- Tiempo que el Ladrón estará preso. } local player = getSpectators(getCreaturePosition(cid), 7, 5) local money = math.random(config.minreward, config.maxreward)
if player and #player > 0 then for t, pid in pairs(player) do if isPlayer(pid) and pid ~= cid then if getPlayerStorageValue(pid, config.storage) == 1 then setPlayerStorageValue(pid, storagePreso, os.time()+config.time) doTeleportThing(pid, config.prisonPos) doPlayerAddMoney(cid, money) doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "You have just been arrested for committing crimes.") doSendAnimatedText(getCreaturePosition(cid), "+"..money.."", config.color) else doPlayerSendCancel(cid, "This player has not committed crimes.") end end end end return TRUE end
Creen otro .lua llamado Thief : - Código:
-
function onUse(cid, item, itemEx)
local config = { minMoneyRemove = 30, -- Mínimo que el Ladrón ganara. maxMoneyRemove = 1400, -- Máximo que el Ladrón ganara. storage = 5569, -- Un Storage cualquiera. color = math.random(1, 255), } local player = getSpectators(getCreaturePosition(cid), 7, 5) local money = math.random(config.minMoneyRemove, config.maxMoneyRemove)
if player and #player > 0 then for t, pid in pairs(player) do if isPlayer(pid) and pid ~= cid then if doPlayerRemoveMoney(pid, money) then setPlayerStorageValue(cid, config.storage, 1) doPlayerAddMoney(cid, money) doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, "You have just been stolen and lost "..money.." gps.") doSendAnimatedText(getCreaturePosition(cid), "+"..money.."", config.color) else doPlayerSendCancel(cid, "The player has not "..money.." gps.") end end end end return TRUE end
Creen otro .lua llamado Jail - Código:
-
function onUse(cid,item)
local config = { storagePreso = 5570, -- Uma storage qualquer toPos = {x=1016, y=1022, z=7}, -- Para aonde o player irá quando o tempo acabar }
timePreso = getPlayerStorageValue(cid, config.storage) - os.time()
if getPlayerStorageValue(cid, config.storagePreso) == -1 then doPlayerSendCancel(cid, "Você nao está preso.") else if timePreso <= 0 then setPlayerStorageValue(cid, config.storagePreso, -1) doTeleportThing(cid, config.toPos) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Espero que você pense bem agora, antes de cometer algum delito") else doPlayerSendCancel(cid, "Você ainda tem que esperar "..timePreso.." segundos, para ser solto.") end return TRUE end
end
Ahora agregue lo siguiente a SuServer\Data\Actions\Actions.xml - Código:
-
<action actionid="1256" event="script" value="Jail.lua"/> <action itemid="2556" event="script" value="Police.lua"/> <action itemid="10153" event="script" value="Ladrón.lua"/>
Créditos: Kimoszin 99.995% Angel.Maclish 00.005% por traducir al español e ingles. | |
|
Maniatiko™ Gamer
Posts : 11 Points : 16 Reputation : 3 Join date : 13/07/2012
| Tema: Re: Sistema Penal ;D Sáb Jul 14, 2012 9:28 am | |
| Jojojjo exelente , serviria para evento pero explicalo mejor =) | |
|
angel.maclish Moderador Global
Posts : 40 Points : 54 Reputation : 0 Join date : 13/07/2012 Location : LPZ
| Tema: Re: Sistema Penal ;D Sáb Jul 14, 2012 10:06 am | |
| Traen x item (el que quieras en este caso 2556) y los ladrones (10153) tienen que tratar de que no los atrape la policía, si alguien de la policía atrapa a un ladrón el policía gana dinero dependiendo mas o menos de cuantos crímenes aya cometido, y si el ladrón escapa el gana dinero. | |
|
Darkens Administrador
Premios :
Posts : 52 Points : 163 Reputation : 2 Join date : 09/07/2012 Location : Two
| |
Belloz Moderators
Premios :
Posts : 70 Points : 159 Reputation : 1 Join date : 13/07/2012
| Tema: Re: Sistema Penal ;D Sáb Jul 14, 2012 11:21 am | |
| | |
|
angel.maclish Moderador Global
Posts : 40 Points : 54 Reputation : 0 Join date : 13/07/2012 Location : LPZ
| Tema: Re: Sistema Penal ;D Sáb Jul 14, 2012 3:49 pm | |
| agradezco sus comentarios :), y me agrada saber que les encata. | |
|
Kiba Spriter
Gold Medals! :
Statue of Death Strike
Statue Of Abyssador
Statue Of Gnom evil
por ser el miembro del mes two Posts : 62 Points : 139 Reputation : 19 Join date : 13/07/2012
| Tema: Re: Sistema Penal ;D Sáb Jul 14, 2012 3:58 pm | |
| :O esta super me gusta me recuerda cuando era niño a ladrones y polizias jeheh | |
|
angel.maclish Moderador Global
Posts : 40 Points : 54 Reputation : 0 Join date : 13/07/2012 Location : LPZ
| Tema: Re: Sistema Penal ;D Sáb Jul 14, 2012 4:22 pm | |
| yes, eso si eran juegos, aun que los de ahora también :D | |
|
Guest Invitado
| Tema: Re: Sistema Penal ;D Dom Jul 15, 2012 9:01 am | |
| Jajajaja i esta chido amigo :P |
|
Hazardous Administrador
Posts : 38 Points : 151 Reputation : -1 Join date : 09/07/2012
| |
Contenido patrocinado
| Tema: Re: Sistema Penal ;D | |
| |
|