OTHispano
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Ir abajo
°ஃŠﺕρξŘθஃ°
°ஃŠﺕρξŘθஃ°
Aportador
Mensajes Mensajes : 213

[vicio]Casino System Empty [vicio]Casino System

Dom Sep 11, 2011 8:07 pm
Bueno aqui les traigo el systema del casino que lo encontre en un server Very Happy sin mas nada que decir :

Van a : su Ot/Data/Actions/Scripts y creamos un archivo que se llame casino.lua y pegamos esto :

Código:
 function onUse(cid, item, frompos, item2, topos)
 
local chance1 = math.random(1,5) -- 50% posibidad de ganar el item
local chance2 = math.random(1,5) -- 25%
local chance3 = math.random(1,5) -- 17%
local chance4 = math.random(1,5) -- 13%
local chance5 = math.random(1,5) -- 5%
local ficha = 2160 -- ID de la ficha
local effect = 26 --los efectos
local effect2 = 29
local effect3 = 28
local effect4 = 30
 
if item2.itemid == 9899 then ---- ID de la maquina
if (doPlayerRemoveItem (cid,ficha,1) ) then
if chance1 == 1 then
doSendMagicEffect(topos,effect2)
doSendAnimatedText(getPlayerPosition(cid), "Ganaste", TEXTCOLOR_GREEN)
doPlayerAddItem(cid,2160,5) ----- ID de la ficha que te dara si ganas
elseif chance2 == 1 then
doSendMagicEffect(topos,effect)
doSendAnimatedText(getPlayerPosition(cid), "Perdiste", TEXTCOLOR_RED)
doPlayerRemoveItem(cid,ficha,1)
elseif chance3 == 1 then
doSendMagicEffect(topos,effect3)
doSendAnimatedText(getPlayerPosition(cid), "Ganaste", TEXTCOLOR_GREEN)
doPlayerAddItem(cid,2160,5) ----- ID de la ficha que te dara si ganas
elseif chance1 == 1 then
doSendMagicEffect(topos,effect)
doSendAnimatedText(getPlayerPosition(cid), "Perdiste", TEXTCOLOR_RED)
doPlayerRemoveItem(cid,ficha,1)
elseif chance5 == 1 then
doSendMagicEffect(topos,effect4)
doSendAnimatedText(getPlayerPosition(cid), "Ganaste", TEXTCOLOR_GREEN)
doPlayerAddItem(cid,2160,5) ----- ID de la ficha que te dara si ganas
elseif chance4 == 1 then
doSendMagicEffect(topos,effect)
doSendAnimatedText(getPlayerPosition(cid), "Perdiste", TEXTCOLOR_RED)
doPlayerRemoveItem(cid,ficha,1)
end
else
doPlayerSendCancel(cid, "Necesitas 1 ficha para poder jugar.")
end
elseif item2.itemid == 9898 then ----- Asi dejalo
if (doPlayerRemoveItem (cid,ficha,1) ) then
if chance1 == 1 then
doSendMagicEffect(topos,effect2)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Ganaste.')
doPlayerAddItem(cid,2160,5)  ----- ID de la ficha que te dara si ganas
elseif chance2 == 1 then
doSendMagicEffect(topos,effect)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Perdiste.')
doPlayerRemoveItem(cid,ficha,1)
elseif chance3 == 1 then
doSendMagicEffect(topos,effect3)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Ganaste.')
doPlayerAddItem(cid,2160,5) ----- ID de la ficha que te dara si ganas
elseif chance1 == 1 then
doSendMagicEffect(topos,effect)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Perdiste.')
doPlayerRemoveItem(cid,ficha,1)
elseif chance5 == 1 then
doSendMagicEffect(topos,effect4)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Ganaste.')
doPlayerAddItem(cid,2160,5) ----- ID de la ficha que te dara si ganas
elseif chance4 == 1 then
doSendMagicEffect(topos,effect)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Perdiste.')
doPlayerRemoveItem(cid,ficha,1)
end
else
doPlayerSendCancel(cid, "Necesitas 1 ficha para poder jugar.")
end
end
end

y ahora en actions.xml :

Código:
<action itemid="9899" event="script" value="casino.lua"/>

Y listo ahi tienen su vicioso casino jeje aki les dejo una Imagen:
[vicio]Casino System Casino10
[vicio]Casino System Casino11

Bueno eso fue todo por lo ke ven la imagen es de mi ot de war eso es porque yo lo agregue a mi war ot jaj:P
Pd: la ficha es 1 crystal Coin y si ganan, ganan 3 crystal coin!! Very Happy espero les guste y me den reeeeeepp Wink
Id maquina : 9899
la tienen que pones con el map editor a la maquina Razz

Creditos 100% Super8


Última edición por °ஃŠﺕρξŘθஃ° el Mar Sep 20, 2011 1:47 pm, editado 1 vez
Dj Majestick
Dj Majestick
Miembro
Mensajes Mensajes : 131

[vicio]Casino System Empty Re: [vicio]Casino System

Mar Sep 13, 2011 8:09 am
Reputación del mensaje :100% (1 voto)
Buena Men
+rep
Stark
Stark
Scripter
Mensajes Mensajes : 29

[vicio]Casino System Empty Re: [vicio]Casino System

Mar Sep 13, 2011 9:32 am
muy bueno pero 100% creditos tuyos?
Contenido patrocinado

[vicio]Casino System Empty Re: [vicio]Casino System

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