Sign in to follow this  
Followers 0
Fegarur

Tahoma

6 posts in this topic

Descripción:
Clásico juego en el que tienes que voltear el mayor número posible de fichas a tu color, ahora en RPG Maker. Hay otra versión en el foro llamada Reflexion.

Screen:
[spoiler]user posted image[/spoiler]

Recursos Necesarios:
user posted image Un archivo de sonido llamado 'No' para cuando ganes en la carpeta Me, y otro (por defecto también llamado No) en los BGM, Este último sonará durante la partida.
user posted image Estos recursos en Pictures:
Descargar de Megaupload
Descargar de Mediafire
Descargar de Savefile
Descargar de Rapidshare

Script:
CODE
class Window_Command2 < Window_Selectable

def initialize
super(144, 64, 352, 352)
@column_max = 5
@item_max = 25
self.windowskin = RPG::Cache.windowskin("")
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.opacity = 0
self.contents.clear
self.index = 0
end

end

#========================================================================
#========================================================================
class Window_Light < Window_Base

def initialize(x,y)
super(80 + x*64, y*64, 96, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Tahoma"
self.contents.font.size = 18
self.opacity = 0
@x = x
@y = y
refresh
end

def refresh
self.contents.clear
@switch_id = 1000 + @x + (5*(@y-1))
if $game_switches[@switch_id]
self.contents.blt(0, 0, RPG::Cache.picture("on"), Rect.new(0,0,96,96), 255)
else
self.contents.blt(0, 0, RPG::Cache.picture("off"), Rect.new(0,0,96,96), 255)
end
end

end

#========================================================================
#========================================================================
class Scene_Lights_Out

#--------------------------------------------------------
# Begin / Pocz±tek
#--------------------------------------------------------
def main
Audio.bgm_play("Audio/BGM/No", 100, 100) # <--- BGM
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("grad")
@sum = 0
@alert = 0
@switch = 0
@select = Window_Command2.new
@cursor = Sprite.new
@cursor.bitmap = RPG::Cache.picture("cursor")
@cursor.z = 2000
light_initialize
light_update
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@background.dispose
@select.dispose
light_dispose
@cursor.dispose
end
#--------------------------------------------------------
# Update / Od¶wie¿anie co klatkê
#--------------------------------------------------------
def update
@select.update
@cursor.x = @select.index%5 * 64 + 160
@cursor.y = @select.index/5 * 64 + 80
if Input.trigger?(Input::C) and @alert > 0
$game_system.se_play($data_system.decision_se)
turn_light
light_update
@alert = 2
end
unless @switch == 25
@switch += 1
case rand(2)
when 1
$game_switches[1000 + @switch] = false
when 0
$game_switches[1000 + @switch] = true
end
end
if @switch == 25 and @alert == 0
$game_system.se_play($data_system.buzzer_se)
light_update
@alert = 1
end
if Input.trigger?(Input::X) and $DEBUG
$game_switches[@select.index + 1001] = false
light_update
end
judge
if @sum == 0 and @alert == 2
fanfare
end
end
#--------------------------------------------------------
# Initializing windows for the lights / Pierwsze wywo³anie ¶wiate³
#--------------------------------------------------------
def light_initialize
@light_1 = Window_Light.new(1,1)
@light_2 = Window_Light.new(2,1)
@light_3 = Window_Light.new(3,1)
@light_4 = Window_Light.new(4,1)
@light_5 = Window_Light.new(5,1)
@light_6 = Window_Light.new(1,2)
@light_7 = Window_Light.new(2,2)
@light_8 = Window_Light.new(3,2)
@light_9 = Window_Light.new(4,2)
@light_10 = Window_Light.new(5,2)
@light_11 = Window_Light.new(1,3)
@light_12 = Window_Light.new(2,3)
@light_13 = Window_Light.new(3,3)
@light_14 = Window_Light.new(4,3)
@light_15 = Window_Light.new(5,3)
@light_16 = Window_Light.new(1,4)
@light_17 = Window_Light.new(2,4)
@light_18 = Window_Light.new(3,4)
@light_19 = Window_Light.new(4,4)
@light_20 = Window_Light.new(5,4)
@light_21 = Window_Light.new(1,5)
@light_22 = Window_Light.new(2,5)
@light_23 = Window_Light.new(3,5)
@light_24 = Window_Light.new(4,5)
@light_25 = Window_Light.new(5,5)
end
#--------------------------------------------------------
# Refreshing all the windows standing for the lights / Od¶wie¿anie ¶wiate³
#--------------------------------------------------------
def light_update
@light_1.refresh
@light_2.refresh
@light_3.refresh
@light_4.refresh
@light_5.refresh
@light_6.refresh
@light_7.refresh
@light_8.refresh
@light_9.refresh
@light_10.refresh
@light_11.refresh
@light_12.refresh
@light_13.refresh
@light_14.refresh
@light_15.refresh
@light_16.refresh
@light_17.refresh
@light_18.refresh
@light_19.refresh
@light_20.refresh
@light_21.refresh
@light_22.refresh
@light_23.refresh
@light_24.refresh
@light_25.refresh
end
#--------------------------------------------------------
# Disposing all the windows standing for the lights / Usuwanie ¶wiate³
#--------------------------------------------------------
def light_dispose
@light_1.dispose
@light_2.dispose
@light_3.dispose
@light_4.dispose
@light_5.dispose
@light_6.dispose
@light_7.dispose
@light_8.dispose
@light_9.dispose
@light_10.dispose
@light_11.dispose
@light_12.dispose
@light_13.dispose
@light_14.dispose
@light_15.dispose
@light_16.dispose
@light_17.dispose
@light_18.dispose
@light_19.dispose
@light_20.dispose
@light_21.dispose
@light_22.dispose
@light_23.dispose
@light_24.dispose
@light_25.dispose
end
#--------------------------------------------------------
# Pointing switches that are to be turned / Wskazanie, które ¶wiat³a maj± zostaæ prze³±czone
#--------------------------------------------------------
def turn_light
case @select.index
when 0
perform_light_switching(1,2,6)
when 1
perform_light_switching(1,2,3,7)
when 2
perform_light_switching(2,3,4,8)
when 3
perform_light_switching(3,4,5,9)
when 4
perform_light_switching(4,5,10)
when 5
perform_light_switching(1,6,7,11)
when 6
perform_light_switching(2,6,7,8,12)
when 7
perform_light_switching(3,7,8,9,13)
when 8
perform_light_switching(4,8,9,10,14)
when 9
perform_light_switching(5,9,10,15)
when 10
perform_light_switching(6,11,12,16)
when 11
perform_light_switching(7,11,12,13,17)
when 12
perform_light_switching(8,12,13,14,18)
when 13
perform_light_switching(9,13,14,15,19)
when 14
perform_light_switching(10,14,15,20)
when 15
perform_light_switching(11,16,17,21)
when 16
perform_light_switching(12,16,17,18,22)
when 17
perform_light_switching(13,17,18,19,23)
when 18
perform_light_switching(14,18,19,20,24)
when 19
perform_light_switching(15,19,20,25)
when 20
perform_light_switching(16,21,22)
when 21
perform_light_switching(17,21,22,23)
when 22
perform_light_switching(18,22,23,24)
when 23
perform_light_switching(19,23,24,25)
when 24
perform_light_switching(20,24,25)
end
end
#--------------------------------------------------------
# Turning the switches / Zmiana stanu prze³±czników
#--------------------------------------------------------
def perform_light_switching(a=0, b=0, c=0, d=0, e=0)
if $game_switches[1000 + a] == true
$game_switches[1000 + a] = false
else
$game_switches[1000 + a] = true
end

if $game_switches[1000 + b] == true
$game_switches[1000 + b] = false
else
$game_switches[1000 + b] = true
end

if $game_switches[1000 + c] == true
$game_switches[1000 + c] = false
else
$game_switches[1000 + c] = true
end

if $game_switches[1000 + d] == true
$game_switches[1000 + d] = false
else
$game_switches[1000 + d] = true
end

if $game_switches[1000 + e] == true
$game_switches[1000 + e] = false
else
$game_switches[1000 + e] = true
end
end
#--------------------------------------------------------
# Checking winning conditions / Sprawdzanie warunków wygranej
#--------------------------------------------------------
def judge
@sum = 0
for i in 1001..1025
if $game_switches[i] == true
@sum += 1
end
end
end
#--------------------------------------------------------
# This happens when you turn all the lights off / Co dzieje siê po zgaszeniu wszystkich ¶wiate³ :)
#--------------------------------------------------------
def fanfare
$scene = Scene_Map.new
Audio.bgm_stop
Audio.me_play("Audio/ME/No", 100, 100) # <--- ME
$scene = Scene_Map.new
end
end


Instrucciones:
user posted image Para usarlo utiliza llamar script:
QUOTE
$scene = Scene_Lights_Out.new


Crédito:
Script creado por: iconne. Edited by Fegarur
0

Share this post


Link to post
Share on other sites
Esta muy bien el script icon13.gif Pero, de donde sacas tantos minijuegos? xD

Dew flame.gif
0

Share this post


Link to post
Share on other sites
xd muy bueno el script estan muy bien los minijuegos que pones tu muerte.gif
0

Share this post


Link to post
Share on other sites
Algunos (este, el de Puzzle y otro que no me acuerdo ahora de cuál es) los puso TN-69 en un mismo tema hace tiempo. Los he posteado en temas separados para que sea más fácil localizarlos. Además, así es más sencillo ponerlos y localizarlos en la Recopilación.
0

Share this post


Link to post
Share on other sites
Vale, en el post que puse, aunque algo escondidito ya que sliver copio y pego de arcadium sin dejarme que arreglara ese post - .- Se nombra al autor, es: iconne

Por lo demas lo veo todo correcto =P
0

Share this post


Link to post
Share on other sites
Gracias, por postearlo la primera vez y por decir el autor.
Lo que me parece un milagro es que todavía se puedan descargar los recursos, teniendo en cuenta lo rápido que suelen borrar las cosas. tongue.gif
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0