Últimos temas
» Script de menupor maxi Jue 04 Dic 2014, 1:44 pm
» Ayuda intro animado!!!
por maxi Miér 03 Dic 2014, 9:41 pm
» ayuda con este engin
por maxi Miér 03 Dic 2014, 8:42 am
» Hud de Vida 100% Personalizable - Engine Sencillo! Sin Scripts :)
por davidaikago Jue 20 Nov 2014, 10:58 am
» Ultimate parallax control by:GDS [ace]
por arellano Miér 08 Oct 2014, 8:28 pm
» Script Touhou (animated) Map name (v1.4)
por davidaikago Miér 08 Oct 2014, 2:09 pm
» tutorial puerta nueva
por davidaikago Miér 08 Oct 2014, 9:08 am
» cámara de fotos
por davidaikago Miér 08 Oct 2014, 9:05 am
» Imperial Action System II Demo
por davidaikago Miér 08 Oct 2014, 8:47 am
» VE Batalla animada [ACE]
por FhierusIV Jue 18 Sep 2014, 10:57 am
» Nuevo Reglamento del Foro [Vigente desde Septiembre 2014]
por maxi Miér 17 Sep 2014, 8:37 am
» MOG|Animated Title
por Souta21 Mar 09 Sep 2014, 7:24 pm
» Tutorial Engine - Cambiar Character al Equipar Objeto
por maxi Lun 21 Jul 2014, 10:19 am
» Script de climas
por gambasoxd Sáb 19 Jul 2014, 8:58 am
» Script de contraseña(codigo) para abrir un cofre
por rpgame Jue 03 Jul 2014, 6:03 pm
¿Quién está en línea?
En total hay 1 usuario en línea: 0 Registrados, 0 Ocultos y 1 Invitado Ninguno
El record de usuarios en línea fue de 117 durante el Mar 09 Ago 2011, 3:39 pm
Script de Trucos...
3 participantes
RPG maker VX :: Scripts ::
Página 1 de 1.
Script de Trucos...
Hola a todos denuevo, queria compartirles mi Script para poder insertarle trucos a sus juegos...
(Claro que es la version beta, y solo les permitira Ganar Dinero, o Agregarles Partys)
Bueno, Aqui esta mi Script:
(Claro que es la version beta, y solo les permitira Ganar Dinero, o Agregarles Partys)
Bueno, Aqui esta mi Script:
- Código:
# Sistema de Trucos por Maxinm. (Versión Beta)
# Scene_Cheats
#==============================================================================
# para llamarlo: $scene = Scene_Cheats.new
#==============================================================================
class Scene_Cheats
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make windows
@edit_window = Window_CheatsEdit.new
@input_window = Window_CheatsInput.new
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@edit_window.dispose
@input_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@edit_window.update
@input_window.update
# If B button was pressed
if Input.repeat?(Input::B)
# If cursor position is at 0
if @edit_window.index == 0
return
end
# Play cancel SE
$data_system.sounds[2].play
# Delete text
@edit_window.back
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# If cursor position is at [OK]
if @input_window.character == nil
@cheat_word = @edit_window.cheat.downcase
# Aca se empieza a editar
# Para ganar tanta cantidad de Oro...:
# $game_party.gain_gold(How many)
#Para aderir a tal party...:
# $game_party.add_actor(id)
#Donde dice "@cheat_word == "XXXX" las X serian el codigo que deven introducir
# Hasta nueve Digitos. (Para aceptar/Cancelar simplemente apretar Enter en un lugar Vacio)
if @cheat_word == "XXXX"
$game_party.gain_gold(500)
$data_system.sounds[1].play
elsif @cheat_word == "XXXX"
$game_party.add_actor(2)
$data_system.sounds[1].play
elsif @cheat_word == "0"
# Hasta aca se puede editar
else
# Play buzzer SE
$data_system.sounds[3].play
end
# Switch to map screen
$scene = Scene_Map.new
return
end
# If text character is empty
if @input_window.character == ""
# Play buzzer SE
$data_system.sounds[3].play
return
end
# Play decision SE
$data_system.sounds[1].play
# Add text character
@edit_window.add(@input_window.character)
return
end
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# by BudsieBuds
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Graphic
# icon : icon
# x : draw spot x-coordinate
# y : draw spot y-coordinate
#--------------------------------------------------------------------------
def draw_icon_graphic(icon, x, y)
bitmap = Cache.system("")
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
#==============================================================================
# ** Window_CheatsEdit
#------------------------------------------------------------------------------
# by BudsieBuds
#==============================================================================
class Window_CheatsEdit < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :cheat # cheat
attr_reader :index # cursor position
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 128)
self.contents = Bitmap.new(width - 32, height - 32)
@max_char = 9
@index = 0
@cheat = ""
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# * Add Character
# character : text character to be added
#--------------------------------------------------------------------------
def add(character)
if @index < @max_char and character != ""
@cheat += character
@index += 1
refresh
update_cursor_rect
end
end
#--------------------------------------------------------------------------
# * Delete Character
#--------------------------------------------------------------------------
def back
if @index > 0
# Delete 1 text character
name_array = @cheat.split(//)
@cheat = ""
for i in 0...name_array.size-1
@cheat += name_array[i]
end
@index -= 1
refresh
update_cursor_rect
end
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Draw cheat
name_array = @cheat.split(//)
for i in 0...@max_char
c = name_array[i]
if c == nil
c = "_"
end
x = (i + 1) * 32
self.contents.draw_text(x, 32, 28, 32, c, 1)
end
# Draw graphic
draw_icon_graphic("cheat", 16, 60)
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
x = (@index + 1) * 32
self.cursor_rect.set(x, 32, 28, 32)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_cursor_rect
end
end
#==============================================================================
# ** Window_CheatsInput
#------------------------------------------------------------------------------
# by BudsieBuds
#==============================================================================
class Window_CheatsInput < Window_Base
CHARACTER_TABLE = [ '0', '1', '2', '3', '4', '5', '6', '7', '8','9']
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 128, 640, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@index = 0
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# * Text Character Acquisition
#--------------------------------------------------------------------------
def character
return CHARACTER_TABLE[@index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...90
x = 140 + i / 5 / 9 * 180 + i % 5 * 32
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 32, 32, CHARACTER_TABLE[i], 1)
end
self.contents.draw_text(428, 9 * 32, 48, 32, "OK", 1)
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
# If cursor is positioned on [OK]
if @index >= 90
self.cursor_rect.set(428, 9 * 32, 48, 32)
# If cursor is positioned on anything other than [OK]
else
x = 140 + @index / 5 / 9 * 180 + @index % 5 * 32
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 32, 32)
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
# If cursor is positioned on [OK]
if @index >= 90
# Cursor down
if Input.trigger?(Input::DOWN)
$data_system.sounds[0].play
@index -= 90
end
# Cursor up
if Input.repeat?(Input::UP)
$data_system.sounds[0].play
@index -= 90 - 40
end
# If cursor is positioned on anything other than [OK]
else
# If right directional button is pushed
if Input.repeat?(Input::RIGHT)
# If directional button pressed down is not a repeat, or
# cursor is not positioned on the right edge
if Input.trigger?(Input::RIGHT) or
@index / 45 < 3 or @index % 5 < 4
# Move cursor to right
$data_system.sounds[0].play
if @index % 5 < 4
@index += 1
else
@index += 45 - 4
end
if @index >= 90
@index -= 90
end
end
end
# If left directional button is pushed
if Input.repeat?(Input::LEFT)
# If directional button pressed down is not a repeat, or
# cursor is not positioned on the left edge
if Input.trigger?(Input::LEFT) or
@index / 45 > 0 or @index % 5 > 0
# Move cursor to left
$data_system.sounds[0].play
if @index % 5 > 0
@index -= 1
else
@index -= 45 - 4
end
if @index < 0
@index += 90
end
end
end
# If down directional button is pushed
if Input.repeat?(Input::DOWN)
# Move cursor down
$data_system.sounds[0].play
if @index % 45 < 40
@index += 5
else
@index += 90 - 40
end
end
# If up directional button is pushed
if Input.repeat?(Input::UP)
# If directional button pressed down is not a repeat, or
# cursor is not positioned on the upper edge
if Input.trigger?(Input::UP) or @index % 45 >= 5
# Move cursor up
$data_system.sounds[0].play
if @index % 45 >= 5
@index -= 5
else
@index += 90
end
end
end
# If L or R button was pressed
if Input.repeat?(Input::L) or Input.repeat?(Input::R)
# Move capital / small
$game_system.se_play($data_system.cursor_se)
if @index < 45
@index += 45
else
@index -= 45
end
end
end
update_cursor_rect
end
end
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de Trucos...
Me gustan que los juegos que no contengan trucos, sin embargo buen script, pero lo siento.
Borre- 500
-
38
1660
1362
41
Extras
Sobre mí::
Re: Script de Trucos...
me imagino, pero igual cada uno tiene su imaginación y hace las cosas como el quiere.
Saludos XD
Saludos XD
maxi- Moderador
-
28
908
1673
156
Extras
Sobre mí:: ¿Necesitas Una Mano en el Maker VX o VX ACE? ¡Ponte en Contacto Conmigo! :)
Re: Script de Trucos...
yo tengo eso mismo, pero con un Engine, pero = +1 :)
edddiego- 220
-
32
261
346
21
Temas similares
» sistema de Cheats (trucos)
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» Script de video 100% funcional
» 3D Dungeon script
» Script: contraataque
» Script: Cambio de Clase Sencillo(CCS) V.1.0.0Mi primer script.
» Script de video 100% funcional
» 3D Dungeon script
» Script: contraataque
RPG maker VX :: Scripts ::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.