OTServ
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.
Dirección Ip
[Action, Movement] Tragaperras Casino (Slot Machine) 3
Conectarse

Recuperar mi contraseña

Buscar
 
 

Resultados por:
 

 


Rechercher Búsqueda avanzada

Mejores posteadores
XxStroksxX (463)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
~*~[:Đαяќ:]~[:тιβια:]~*~ (366)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
spoor (83)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
Dj Pacos (73)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
God Skit (68)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
GoD MexicanSoul (40)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
fuzzy (35)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
Eddie (31)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
GOD Chimito (30)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 
conalep1996 (23)
[Action, Movement] Tragaperras Casino (Slot Machine) Vote1111[Action, Movement] Tragaperras Casino (Slot Machine) Vote2111[Action, Movement] Tragaperras Casino (Slot Machine) Vote3111 

Últimos temas
» [???] [Super Naruto OT]
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Lun Jun 08, 2015 12:08 pm por keishmer91

» [ACTION] God/GM da item a un player
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Mar Dic 02, 2014 12:53 pm por hecmanos

» [8.60] Nuevo War Thais By TheRobertxon
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Vie Jun 20, 2014 10:56 am por luismc

» [7.92]Naruto Final Story!
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Dom Mayo 26, 2013 2:40 am por ricardotuck

» [9.1] Fun Server
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Mar Mayo 14, 2013 5:32 pm por skifer

» [9.1] The Forgotten Server v0.2.11pl2 (Mystic Spirit)
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Mar Mayo 14, 2013 5:29 pm por skifer

» New Map 8.60 (Darksystem) By: Turock & Gilio LIsto Arreglado El
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Mar Mayo 07, 2013 5:27 pm por tonyso

» Ocean Clasic Global Map 8.6
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Miér Mayo 01, 2013 11:19 pm por maganiua

» ayuda a abrir puertos
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Lun Abr 29, 2013 5:58 pm por XxStroksxX

» [8.60] Speedy War
[Action, Movement] Tragaperras Casino (Slot Machine) Icon_m10Dom Abr 28, 2013 5:51 pm por Sunnade'Audio

Upload Images
ImagesHack
Scanner
VirusTotal

[Action, Movement] Tragaperras Casino (Slot Machine)

2 participantes

Ir abajo

[Action, Movement] Tragaperras Casino (Slot Machine) Empty [Action, Movement] Tragaperras Casino (Slot Machine)

Mensaje por XxStroksxX Jue Ene 20, 2011 8:55 am

CREDITOS:
CYBERM


Probado en TFS 0.4_DEV rev 40XX y TFS 0.3.6pl1

Video(ver en HD):


Frutas por defecto:
[Action, Movement] Tragaperras Casino (Slot Machine) Frutas1q

En codigo LUA:
Código:
-- [{FRUIT.1,FRUIT.2,FRUIT.3} = {PRIZE,#PRIZE}]
  --MIXED COMBOS
  [{2679,2683,2679}] = {2160,2},  -- cherry-pumpkin-cherry
  [{8841,2682,8841}] = {2160,1},  -- lemon-melon-lemon
  --TRIPLE COMBOS
  [{2680,2680,2680}] = {2152,80}, -- triple strawberry
  [{5097,5097,5097}] = {2152,60}, -- triple mango
  [{2683,2683,2683}] = {2152,80}, -- triple pumpkin
  [{2682,2682,2682}] = {2152,50}, -- triple melon
  [{2676,2676,2676}] = {2152,40}, -- triple banana
  [{8841,8841,8841}] = {2152,25}, -- triple lemon
  [{2679,2679,2679}] = {2152,20}, -- triple cherry
  [{2675,2675,2675}] = {2152,30}, -- triple orange
  [{2674,2674,2674}] = {2152,10}, -- triple apple
  --ANY COMBOS
  [{ANY,2683,2683}] = {2152,5}, -- double pumpkin right
  [{2683,2683,ANY}] = {2152,5}, -- double pumpkin left
  [{2683,ANY,2683}] = {2152,10}, -- pumpkin sides combo
  [{ANY,2679,2679}] = {2152,4}, -- double cherry right
  [{2679,2679,ANY}] = {2152,4}, -- double cherry left
  [{2679,ANY,2679}] = {2152,8}, -- cherry sides combo
  [{ANY,8841,8841}] = {2152,5}, -- double lemon right
  [{8841,8841,ANY}] = {2152,5}, -- double lemon left
  [{8841,ANY,8841}] = {2152,5}, -- lemon sides combo
}

Mas informacion:
~Cualquier item que se le lanzen a donde salen las frutas desaperece para evitar trampa.
~Una vez que el jugador empieze a jugar, no se podra mover hasta que termine.
~Si el jugador desaparece, el juego se resetea.

Configuracion del Script:

/data/actions/actions.xml
Código:
<action uniqueid="6297-6300" event="script" value="slot.lua"/>

/data/actions/scripts/slot.lua
Código:
--[[
  Advanced Slot Machine
      by Cybermaster   
]]--
 
--REQUIRED MONEY(gp) TO PLAY SLOT MACHINE
local money = 1000
 
--MILISECONDS TO CHANGE FRUITS
local time = 200
 
--ITERATOR TIME TO STOP CHANGING FRUIT IF PLAYER DOESN'T (30 is like 7 seconds)
local limit = 30
 
--FRUITS THAT WILL RANDOMLY APPEAR AND SWITCH
local fruits = {2674,2675,2676,2679,2680,2682,2683,5097,8841}
 
--PRIZES TABLES
local win = {
-- [{FRUIT.1,FRUIT.2,FRUIT.3} = {PRIZE,#PRIZE}]
  --MIXED COMBOS
  [{2679,2683,2679}] = {2160,2},  -- cherry-pumpkin-cherry
  [{8841,2682,8841}] = {2160,1},  -- lemon-melon-lemon
  --TRIPLE COMBOS
  [{2680,2680,2680}] = {2152,80}, -- triple strawberry
  [{5097,5097,5097}] = {2152,60}, -- triple mango
  [{2683,2683,2683}] = {2152,80}, -- triple pumpkin
  [{2682,2682,2682}] = {2152,50}, -- triple melon
  [{2676,2676,2676}] = {2152,40}, -- triple banana
  [{8841,8841,8841}] = {2152,25}, -- triple lemon
  [{2679,2679,2679}] = {2152,20}, -- triple cherry
  [{2675,2675,2675}] = {2152,30}, -- triple orange
  [{2674,2674,2674}] = {2152,10}, -- triple apple
  --ANY COMBOS
  [{ANY,2683,2683}] = {2152,5}, -- double pumpkin right
  [{2683,2683,ANY}] = {2152,5}, -- double pumpkin left
  [{2683,ANY,2683}] = {2152,10}, -- pumpkin sides combo
  [{ANY,2679,2679}] = {2152,4}, -- double cherry right
  [{2679,2679,ANY}] = {2152,4}, -- double cherry left
  [{2679,ANY,2679}] = {2152,8}, -- cherry sides combo
  [{ANY,8841,8841}] = {2152,5}, -- double lemon right
  [{8841,8841,ANY}] = {2152,5}, -- double lemon left
  [{8841,ANY,8841}] = {2152,5}, -- lemon sides combo
}
 
--MESSAGES THAT RANDOMLY APPEAR WHEN PLAYER WINS
local messages = {'Bingo!','Lucky!','Jackpot!','Win!'}
 
--FRUITS ROWS
local p = { --[LEVER.UNIQUEID]
  [6297] = {},[6298] = {},[6299] = {},[6300] = {}, --[6301] = {},
}  --JUST PUT THE INITIAL ROW POS FROM LEFT, SECOND & THIRD WILL BE AUTOM. GENERATED
for i = 1,3 do --p, UNIQUEID.LEVER, {POS FROM TILE OF LEFT}
  table.insert(p[6297],i,{x=91+(i-1),y=145,z=7,stackpos=1})
  table.insert(p[6298],i,{x=95+(i-1),y=145,z=7,stackpos=1})
  table.insert(p[6299],i,{x=99+(i-1),y=145,z=7,stackpos=1})
  table.insert(p[6300],i,{x=103+(i-1),y=145,z=7,stackpos=1})
  -- table.insert(p[6301],i,{x=19+(i-1),y=145,z=7,stackpos=1})
end
 
function verifyRow(cid, array, pos)
  local result, prize = false, ''
  for a, b in pairs(win) do
      if getTileItemById(pos[1],a[1]).uid > 1 or a[1] == ANY then
        if getTileItemById(pos[2],a[2]).uid > 1 or a[2] == ANY then
            if getTileItemById(pos[3],a[3]).uid > 1 or a[3] == ANY then
              doPlayerAddItem(cid, b[1], b[2] or 1, true)
              doSendAnimatedText(getThingPos(cid), messages[math.random(#messages)], math.random(255))
              result, prize, amount = true, b[1], b[2]
            end
        end
      end 
  end
  if prize ~= '' then
 
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING,
'Congratulations!! You won '..amount..'
'..getItemPluralNameById(prize)..'!')
  end
  for i = 1,3 do
      doSendMagicEffect(pos[i], result and CONST_ME_GIFT_WRAPS or CONST_ME_EXPLOSIONHIT)
      doRemoveItem(getTileThingByPos(pos[i]).uid)
  end
 
 return not result and doPlayerSendTextMessage(cid,
MESSAGE_STATUS_WARNING, 'You have lost in the Slot Machine <img
src="images/smilies/sad.gif" style="vertical-align: middle;" border="0"
alt="Sad" title="Sad" /> Try again')
end
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
  local function doFruit(pos,cid,id,limit)
      if not isPlayer(cid) then
 
      return doItemEraseAttribute(item.uid, 'aid'),
getTileThingByPos(pos).uid > 0 and
doRemoveItem(getTileThingByPos(pos).uid)
      end
      if getTileThingByPos(pos).itemid < 1 then
        doSendMagicEffect(pos, CONST_ME_POFF)
        doCreateItem(fruits[math.random(#fruits)], 1, pos)
      else
        doTransformItem(getTileThingByPos(pos).uid,fruits[math.random(#fruits)],1)
      end
      if limit <= 0 then
        doSendMagicEffect(pos,math.random(28,30))     
        doTransformItem(getTileThingByPos(pos).uid,fruits[math.random(#fruits)],1)
        doItemSetAttribute(getTileThingByPos(fromPosition).uid, 'aid', getTileThingByPos(fromPosition).actionid+1)
        doTransformItem(getTileThingByPos(fromPosition).uid, getTileThingByPos(fromPosition).itemid == 9826 and 9825 or 9826)
      elseif getTileThingByPos(fromPosition).actionid > id then
        doSendMagicEffect(pos,math.random(28,30))
        doTransformItem(getTileThingByPos(pos).uid,fruits[math.random(#fruits)],1)
      else
        addEvent(doFruit,time,pos,cid,id,limit-1)
      end
  end
 
  if item.actionid == 0 then
      if not doPlayerRemoveMoney(cid, money) then 
        return doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, 'You need '..money..' gps to play Slot Machine.')
      end
      doItemSetAttribute(item.uid, 'aid', 1)
      doCreatureSetNoMove(cid, true)
      doTransformItem(item.uid, item.itemid == 9826 and 9825 or 9826)
      doSendAnimatedText(getThingPos(cid), '-$'..money,COLOR_RED)
      for i = 1,3 do doFruit(p[item.uid][i],cid,i,i*limit) end
  elseif isInArray({1,2,3},item.actionid) then
      doItemSetAttribute(item.uid, 'aid', item.actionid+1)
      doTransformItem(item.uid, item.itemid == 9826 and 9825 or 9826)
  elseif item.actionid == 4 then
      doCreatureSetNoMove(cid, false)
      doItemEraseAttribute(item.uid, 'aid')
      doTransformItem(item.uid, item.itemid == 9826 and 9825 or 9826)
      verifyRow(cid, win, p[item.uid]) 
  end     
  return true
end

/data/movements/movements.xml
Código:
<movevent type="AddItem" tileitem="1" actionid="6577" event="script" value="casino.lua"/>

/data/movements/scripts/casino.lua
Código:
function onAddItem(moveItem, tileItem, position, cid)
  if isPlayer(cid) then
      doRemoveItem(moveItem.uid)
      doSendMagicEffect(position, CONST_ME_EXPLOSIONHIT)
  end
end

[Action, Movement] Tragaperras Casino (Slot Machine) Frutas3

Como pueden ver, solo tienen que poner la posición de la izquierda de cada fila:
Código:
--FRUITS ROWS
local p = { --[LEVER.UNIQUEID]
[6297] = {},[6298] = {},[6299] = {},[6300] = {}, --[6301] = {},
} --JUST PUT THE INITIAL ROW POS FROM LEFT, SECOND & THIRD WILL BE AUTOM. GENERATED
for i = 1,3 do --p, UNIQUEID.LEVER, {POS FROM TILE OF LEFT}
table.insert(p[6297],i,{x=91+(i-1),y=145,z=7,stackpos=1})
table.insert(p[6298],i,{x=95+(i-1),y=145,z=7,stackpos=1})
table.insert(p[6299],i,{x=99+(i-1),y=145,z=7,stackpos=1})
table.insert(p[6300],i,{x=103+(i-1),y=145,z=7,stackpos=1})
-- table.insert(p[6301],i,{x=19+(i-1),y=145,z=7,stackpos=1})
end

NOTA: PONER ACTIONID = 6577 AL PISO DEBAJO DE CADA PALANCA!
ItemIDs de palancas usados: 9825 - 9826
ActionIDs usado: 6577, 1, 2, 3, 4
UniqueIDs usados: 6297, ...etc (por cada palanca que se vaya a usar, un diferente uniqueid para cada una)

SI TE SIRVIO O TE GUSTO DAME +REP!

PD:SI NO ENTIENDEN ALGO YO NO PODRE AYUDARLOS PUES YO NO HICE EL SCRIP SI NECESITAN AYUDA LOCALIZEN A CYBERM EN OTFUSION O EN OTLAND
XxStroksxX
XxStroksxX

+ Administrador +
+ Administrador +

¡Sorcerer Rapero!
Masculino España Géminis Cerdo
Chrome
Edad Edad : 28
Mensajes Mensajes : 463
Localización Localización : Barcelona
Fecha de inscripción Fecha de inscripción : 01/08/2010

Hoja de personaje
Personaje: Khail Phount
Vocation: Knight
Mundo: Infernia

http://www.otserv.biz/

Volver arriba Ir abajo

[Action, Movement] Tragaperras Casino (Slot Machine) Empty Re: [Action, Movement] Tragaperras Casino (Slot Machine)

Mensaje por ~*~[:Đαяќ:]~[:тιβια:]~*~ Sáb Ene 29, 2011 4:13 pm

xD buena we Razz y CYBERM habla ingles XDDD creo
~*~[:Đαяќ:]~[:тιβια:]~*~
~*~[:Đαяќ:]~[:тιβια:]~*~

+ Moderador +
+ Moderador +

*~Elder Wolf~*
Masculino Mexico Virgo Cerdo
Chrome
Edad Edad : 28
Mensajes Mensajes : 366
Localización Localización : :O ala versh XD
Fecha de inscripción Fecha de inscripción : 29/01/2011

http://www.chaosserv.no-ip.info

Volver arriba Ir abajo

Volver arriba

- Temas similares

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