[vicio]Casino System
3 participantes
- °ஃŠﺕρξŘθஃ°Aportador
- Mensajes : 213
[vicio]Casino System
Dom Sep 11, 2011 8:07 pm
Bueno aqui les traigo el systema del casino que lo encontre en un server sin mas nada que decir :
Van a : su Ot/Data/Actions/Scripts y creamos un archivo que se llame casino.lua y pegamos esto :
y ahora en actions.xml :
Y listo ahi tienen su vicioso casino jeje aki les dejo una Imagen:
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!! espero les guste y me den reeeeeepp
Id maquina : 9899
la tienen que pones con el map editor a la maquina
Creditos 100% Super8
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:
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!! espero les guste y me den reeeeeepp
Id maquina : 9899
la tienen que pones con el map editor a la maquina
Creditos 100% Super8
- StarkScripter
- Mensajes : 29
Re: [vicio]Casino System
Mar Sep 13, 2011 9:32 am
muy bueno pero 100% creditos tuyos?
Permisos de este foro:
No puedes responder a temas en este foro.