|
#111
|
|||
|
|||
|
Puedes poner un pantallazo Akatsuki?
¿Qué tipos de Scripts tiene (Lo mas importantes) el pack, yerko 522, podias haber sido mas especifico Un saludo, lo digo de buen rollo. Es mas que nada por saber si lo que se postea me interesa, y supongo que a los demas les pasara |
|
|
|||
|
|||
|
Aportes de Scripts RPG-Maker
|
|
#112
|
||||
|
||||
|
Cita:
cuando pueda coloco una imagen xD ------------------------------------------- Cambio de tono de la windowskin (RPGXP) DESCRIPCIóN Este script permite añadir una función gracias a la cual el jugador puede cambiar a su gusto el color de la windowskin, de forma parecida al Golden Sun. Ahora que sé utilizar el alias (gracias a un tutorial de TDS) intentaré mejorarlo para que sea más cómodo SCREENSHOT No disponible DEMO En proceso... SCRIPT
Spoiler
Y como me aburro, aquí os dejo un Scene_Menu que incluye la opción para modificar el tono de la windowskin
Spoiler
INSTRUCCIONES Pegar entre Main y Window_Base. Para cambiar el tono de la windowskin, hay que cambiar el valor de la variable $windowskin_tono. Para ello, puedes hacerlo con un llamar script utilizando $windowskin_tono más un operador matemàtico más un valor: - Para sumar: $windowskin_tono += valor - Para restar: $windowskin_tono -= valor - Para dividir: $windowskin_tono /= valor - Para multiplicar: $windowskin_tono *= valor - Para potencias: $windowskin_tono **= valor - Para sustituir: $windowskin_tono = valor Si quieres que el valor sea una variable del juego usa $game_variables[X], donde X es la ID de la variable --------------------------- Para que cada partida tenga un tono de windowskin individual, ve a Scene_Save y añade esta línea: Código:
Marshal.dump($windowskin_tono, file) Código:
Marshal.dump($game_player, file) Y luego, ve a Scene_Load y añade esto: Código:
$windowskin_tono = Marshal.load(file) [code] $game_player = Marshal.load(file)[code] (en las últimas lineas del script) CREDITOS El autor es Alnain (yo), pero no son necesarios créditos |
|
#113
|
||||
|
||||
|
MI APORTE BANCO RGSS
Este es un script para crear un banco completo, que guarde y devuelva items y dinero. Esta aun un poco verde y apreciaría comentarios: Hay que incluir en game_Temp.: Lo que está entre las lineas donde pone #banco-----.. es lo que hay que añadir. Solo teneis que usar buscar para localizar las lineas de arriba y abajo. ................ attr_accessor :battle_main_phase # Flag de Fase Principal attr_accessor :battleback_name # Nombre del Archivo "BattleBack" attr_accessor :forcing_battler # Forzar Personaje de Batalla attr_accessor :shop_calling # Llamar tienda #Banco------------------------------------------------------------------- attr_accessor :bank_calling # Llamar banco #Banco------------------------------------------------------------------- attr_accessor :shop_goods # Lista del Genero en venta y compra attr_accessor :name_calling # Intr. nombre de Flag de llamada attr_accessor :name_actor_id # Intr. nombre de ID de personaje attr_accessor :name_max_char # Intr. Num. de caracteres maximos attr_accessor :menu_calling # Flag de Llamar Menu ................................. ................................... @forcing_battler = nil @shop_calling = false @shop_id = 0 #Banco------------------------------------------------------------------- @bank_calling = false @bank_id = 0 #Banco------------------------------------------------------------------- @name_calling = false @name_actor_id = 0 @name_max_char = 0 #----------------------------------------------------- En game_party cambiar def inicialice entero por: def initialize @actors = [] @gold = 0 @steps = 0 @items = {} @weapons = {} @armors = {} #Añadir depósito de Oro adicional para el banco @gold2 = 0 #Añadir depósito de items adicional para el banco @items2 = {} @weapons2 = {} @armors2 = {} end #-------------------------- y añadir al final de la misma clase, después del resto de métodos: #-------------------------------------------------------------------------- # Métodos adicionales de control de oro e items para el banco #-------------------------------------------------------------------------- def gain_gold2(n) @gold2 = [[@gold2 + n, 0].max, 9999999].min end #-------------------------------------------------------------------------- def lose_gold2(n) gain_gold2(-n) end #-------------------------------------------------------------------------- def item_number2(item_id) return @items2.include?(item_id) ? @items2[item_id] : 0 end #-------------------------------------------------------------------------- def weapon_number2(weapon_id) return @weapons2.include?(weapon_id) ? @weapons2[weapon_id] : 0 end #-------------------------------------------------------------------------- def armor_number2(armor_id) return @armors2.include?(armor_id) ? @armors2[armor_id] : 0 end #-------------------------------------------------------------------------- def gain_item2(item_id, n) if item_id > 0 @items2[item_id] = [[item_number2(item_id) + n, 0].max, 99].min end end #-------------------------------------------------------------------------- def gain_weapon2(weapon_id, n) if weapon_id > 0 @weapons2[weapon_id] = [[weapon_number2(weapon_id) + n, 0].max, 99].min end end #-------------------------------------------------------------------------- def gain_armor2(armor_id, n) if armor_id > 0 @armors2[armor_id] = [[armor_number2(armor_id) + n, 0].max, 99].min end end #-------------------------------------------------------------------------- def lose_item2(item_id, n) gain_item2(item_id, -n) end #-------------------------------------------------------------------------- def lose_weapon2(weapon_id, n) gain_weapon2(weapon_id, -n) end #-------------------------------------------------------------------------- def lose_armor2(armor_id, n) gain_armor2(armor_id, -n) end #-------------------------------------------------------------------------- # Fin de las funciones de banco #-------------------------------------------------------------------------- Luego hay que añadir estas clases a la lista, preferentemente después de Shopstatus: #------------------------------------------------------------------------------ # Window_BankCommand #------------------------------------------------------------------------------ # Es la ventana que elige el negocio a realizar en una banco #------------------------------------------------------------------------------ class Window_BankCommand < Window_Selectable #-------------------------------------------------------------------------- # - Inicializar Objeto #-------------------------------------------------------------------------- def initialize super(0, 64, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @item_max = 4 @column_max = 4 @commands = ["Retirar", "Depositar", "Dinero", "Salir"] refresh self.index = 0 end #-------------------------------------------------------------------------- # - Refrescar #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # - Dibujado del objeto # index : número del objeto #-------------------------------------------------------------------------- def draw_item(index) x = 4 + index * 160 self.contents.draw_text(x, 0, 128, 32, @commands[index]) end end #------------------------------------------------------------------------------ # Window_Bank_Removeitem #------------------------------------------------------------------------------ # Aqui es donde eliges los objetos que vas a retirar del banco #------------------------------------------------------------------------------ class Window_Bank_Removeitem < Window_Selectable #-------------------------------------------------------------------------- # - Inicializar Objeto #-------------------------------------------------------------------------- def initialize super(0, 128, 320, 352) @column_max = 1 refresh self.index = 0 end #-------------------------------------------------------------------------- # - Adquisición del Objeto #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- #- Refrescar #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 1...$data_items.size if $game_party.item_number2(i) > 0 @data.push($data_items[i]) end end for i in 1...$data_weapons.size if $game_party.weapon_number2(i) > 0 @data.push($data_weapons[i]) end end for i in 1...$data_armors.size if $game_party.armor_number2(i) > 0 @data.push($data_armors[i]) end end # El número de objetos. Si no es cero, se dibujara un mapa de bits y se dibujaran los objetos. @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize - 5 for i in 0...@item_max draw_item(i) end end end #-------------------------------------------------------------------------- # - Dibujado del Objeto # index : Número de Objeto #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number2(item.id) when RPG::Weapon number = $game_party.weapon_number2(item.id) when RPG::Armor number = $game_party.armor_number2(item.id) end =begin x = 4 + index % 2 * (288 + 32) y = index / 2 * 32 rect = Rect.new(x, y, self.width / @column_max - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) =end x = 4 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # - Renovación del texto de ayuda #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end #------------------------------------------------------------------------------ # Window_Bank_Additem #------------------------------------------------------------------------------ # Aqui es donde eliges los objetos que vas a retirar del banco #------------------------------------------------------------------------------ class Window_Bank_Additem < Window_Selectable #-------------------------------------------------------------------------- # - Inicializar Objeto #-------------------------------------------------------------------------- def initialize super(320, 128, 320, 352) @column_max = 1 refresh self.index = 0 end #-------------------------------------------------------------------------- # - Adquisición del Objeto #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- #- Refrescar #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 1...$data_items.size if $game_party.item_number(i) > 0 @data.push($data_items[i]) end end for i in 1...$data_weapons.size if $game_party.weapon_number(i) > 0 @data.push($data_weapons[i]) end end for i in 1...$data_armors.size if $game_party.armor_number(i) > 0 @data.push($data_armors[i]) end end # El número de objetos. Si no es cero, se dibujara un mapa de bits y se dibujaran los objetos. @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize - 5 for i in 0...@item_max draw_item(i) end end end #-------------------------------------------------------------------------- # - Dibujado del Objeto # index : Número de Objeto #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] case item when RPG::Item number = $game_party.item_number(item.id) when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end x = 4 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) bitmap = RPG::Cache.icon(item.icon_name) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 240, y, 16, 32, ":", 1) self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # - Renovación del texto de ayuda #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? "" : self.item.description) end end #================================================= ============================= # Window_BankNumber #------------------------------------------------------------------------------ # Es la ventana donde se elige el número de objetos a comprar o a vender en una tienda. #================================================= ============================= class Window_BankNumber < Window_Base #-------------------------------------------------------------------------- # - Inicializar Objeto #-------------------------------------------------------------------------- def initialize super(130, 250, 378, 160) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize @item = nil @max = 1 @number = 1 end #-------------------------------------------------------------------------- # - Elección de objeto, número máximo y precio #-------------------------------------------------------------------------- def set(item, max) @item = item @max = max @number = 1 refresh end #-------------------------------------------------------------------------- # - Elegir número de entrada #-------------------------------------------------------------------------- def number return @number end #-------------------------------------------------------------------------- #- Refrescar #-------------------------------------------------------------------------- def refresh self.contents.clear draw_item_name(@item, 4, 50) self.contents.font.color = normal_color self.contents.draw_text(272, 50, 32, 32, "~") self.contents.draw_text(308, 50, 24, 32, @number.to_s, 2) self.cursor_rect.set(304, 50, 32, 32) end #-------------------------------------------------------------------------- # - Renovar Frame #-------------------------------------------------------------------------- def update super if self.active # Cursor Derecha (+1) if Input.repeat?(Input::RIGHT) and @number < @max $game_system.se_play($data_system.cursor_se) @number += 1 refresh end # Cursor Izquierda (-1) if Input.repeat?(Input::LEFT) and @number > 1 $game_system.se_play($data_system.cursor_se) @number -= 1 refresh end # En cursor (+10) if Input.repeat?(Input::UP) and @number < @max $game_system.se_play($data_system.cursor_se) @number = [@number + 10, @max].min refresh end # Bajo Cursor (-10) if Input.repeat?(Input: OWN) and @number > 1$game_system.se_play($data_system.cursor_se) @number = [@number - 10, 1].max refresh end end end end #------------------------------------------------------------------------------ # ? Window_InputNumber #------------------------------------------------------------------------------ class Window_Inputbank< Window_Base #-------------------------------------------------------------------------- #Banco....................... attr_accessor :maxi #Banco....................... def initialize(digits_max) @digits_max = digits_max #Banco....................... $maxm = maxi if $maxm = nil @number = 0 else @number = $maxm end #Banco....................... @number = 0 dummy_bitmap = Bitmap.new(32, 32) @cursor_width = dummy_bitmap.text_size("0").width + 20 dummy_bitmap.dispose super(150, 214, @cursor_width * @digits_max + 32, 64) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize self.z += 9999 self.opacity = 255 @index = 0 refresh update_cursor_rect end #-------------------------------------------------------------------------- def number return @number end #-------------------------------------------------------------------------- def dispose super end #-------------------------------------------------------------------------- def number=(number) @number = [[number, 0].max, $maxm].min refresh end #-------------------------------------------------------------------------- def update_cursor_rect self.cursor_rect.set(@index * @cursor_width, 0, @cursor_width, 32) end #-------------------------------------------------------------------------- def update super if Input.repeat?(Input::UP) or Input.repeat?(Input: OWN)$game_system.se_play($data_system.cursor_se) place = 10 ** (@digits_max - 1 - @index) n = @number / place % 10 @number -= n * place n = (n + 1) % 10 if Input.repeat?(Input::UP) n = (n + 9) % 10 if Input.repeat?(Input: OWN)@number += n * place refresh end if Input.repeat?(Input::RIGHT) if @digits_max >= 2 $game_system.se_play($data_system.cursor_se) @index = (@index + 1) % @digits_max end end if Input.repeat?(Input::LEFT) if @digits_max >= 2 $game_system.se_play($data_system.cursor_se) @index = (@index + @digits_max - 1) % @digits_max end end update_cursor_rect end #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = normal_color self.back_opacity = 255 #Comentar esta línea para que el mensaje sea translúcido s = sprintf("%0*d", @digits_max, @number) for i in 0...@digits_max self.contents.draw_text(i * @cursor_width + 4, 0, 32, 32, s[i,1]) end end end #------------------------------------------------------------------------------ # Window_MoneyCommand #------------------------------------------------------------------------------ # Es la ventana que elige el negocio a realizar en una banco #------------------------------------------------------------------------------ class Window_MoneyCommand < Window_Selectable #-------------------------------------------------------------------------- # - Inicializar Objeto #-------------------------------------------------------------------------- def initialize super(150, 278, 370, 130) self.contents = Bitmap.new(width, height) self.contents.font.name = $fontface self.contents.font.size = $fontsize @item_max = 2 @column_max = 1 @commands = ["Retirar", "Ingresar"] refresh self.index = 0 end #-------------------------------------------------------------------------- # - Refrescar #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end #-------------------------------------------------------------------------- # - Dibujado del objeto # index : número del objeto #-------------------------------------------------------------------------- def draw_item(index) x = 4 y = index * 30 self.contents.draw_text(x, y, 128, 32, @commands[index]) end end Luego teneis que cambiar esto en game_map De nuevo, lo que está entre las lineas donde pone #banco-----.. es lo que hay que añadir. Solo teneis que usar buscar para localizar las lineas de arriba y abajo. if $game_temp.battle_calling call_battle elsif $game_temp.shop_calling call_shop #Banco------------------------------------------------------------------- elsif $game_temp.bank_calling call_Bank #Banco------------------------------------------------------------------- elsif $game_temp.name_calling call_name elsif $game_temp.menu_calling call_menu elsif $game_temp.save_calling call_save elsif $game_temp.debug_calling call_debug end En penúltimo lugar, hay que añadir una nueva clase justo después de Scene_shop, que es esta: #------------------------------------------------------------------------------ # ? Scene_Bank #------------------------------------------------------------------------------ class Scene_Bank # ------------------------------------ def main @help_window = Window_Help.new @command_window = Window_BankCommand.new @dummy_window = Window_Base.new(0, 128, 640, 352) @buy_window = Window_Bank_Removeitem.new @buy_window.help_window = @help_window @sell_window = Window_Bank_Additem.new @sell_window.help_window = @help_window @number_window = Window_BankNumber.new @Money_window = Window_MoneyCommand.new @input_window = Window_Inputbank.new(6) @buy_window.active = false @buy_window.visible = true @sell_window.active = false @sell_window.visible = true @number_window.active = false @number_window.visible = false @Money_window.active = false @Money_window.visible = false @input_window.active = false @input_window.visible = false Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @help_window.dispose @command_window.dispose @dummy_window.dispose @buy_window.dispose @sell_window.dispose @number_window.dispose @Money_window.dispose @input_window.dispose end # ------------------------------------ def update @help_window.update @command_window.update @dummy_window.update @buy_window.update @sell_window.update @number_window.update @Money_window.update @input_window.update if @command_window.active update_command return end if @Money_window.active update_command2 return end if @buy_window.active update_buy return end if @sell_window.active update_sell return end if @number_window.active update_number return end if @input_window.active update_input return end end # ------------------------------------ def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) case @command_window.index when 0 $game_system.se_play($data_system.decision_se) @command_window.active = false @dummy_window.visible = false @buy_window.active = true @buy_window.visible = true @buy_window.refresh @sell_window.active = false @Money_window.active = false @Money_window.visible = false update when 1 $game_system.se_play($data_system.decision_se) @command_window.active = false @dummy_window.visible = false @sell_window.active = true @sell_window.visible = true @sell_window.refresh @buy_window.active = false @Money_window.active = false @Money_window.visible = false update when 2 @command_window.active = false @buy_window.active = false @sell_window.active = false @command_window.active = false @buy_window.active = false @sell_window.active = false @Money_window.refresh @Money_window.visible = true @Money_window.active = true when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Map.new end return end end # ------------------------------------ def update_command2 if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @dummy_window.visible = true @buy_window.active = false @buy_window.visible = true @sell_window.active = false @sell_window.visible = true @Money_window.active = false @Money_window.visible = false @help_window.set_text("") return end if Input.trigger?(Input::C) case @Money_window.index when 0 @help_window.set_text("El banco dispone de " + $game_party.gold2.to_s + " " + $data_system.words.gold) @Money_window.active = false @input_window.visible = true @input_window.max = $game_party.gold @input_window.active = true when 1 @help_window.set_text("El grupo dispone de " + $game_party.gold.to_s + " " + $data_system.words.gold) @input_window.visible = true @Money_window.active = false @input_window.max = $game_party.gold2 @input_window.active = true end return end end #-------------------------------------------------------------- def update_buy if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @dummy_window.visible = true @buy_window.active = false @buy_window.visible = true @help_window.set_text("") return end if Input.trigger?(Input::C) @item = @buy_window.item if @item == nil $game_system.se_play($data_system.buzzer_se) return end case @item when RPG::Item number = $game_party.item_number2(@item.id) when RPG::Weapon number = $game_party.weapon_number2(@item.id) when RPG::Armor number = $game_party.armor_number2(@item.id) end max = number $game_system.se_play($data_system.decision_se) @buy_window.active = false @buy_window.visible = true @number_window.set(@item, max) @number_window.active = true @number_window.visible = true end end # ------------------------------------ def update_sell if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @dummy_window.visible = true @sell_window.active = false @sell_window.visible = true @help_window.set_text("") return end if Input.trigger?(Input::C) @item = @sell_window.item if @item == nil or @item.price == 0 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) case @item when RPG::Item number = $game_party.item_number(@item.id) when RPG::Weapon number = $game_party.weapon_number(@item.id) when RPG::Armor number = $game_party.armor_number(@item.id) end max = number @sell_window.active = false @sell_window.visible = true @Money_window.active = false @Money_window.visible = false @number_window.set(@item, max) @number_window.active = true @number_window.visible = true end end # ------------------------------------ def update_number if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @number_window.active = false @number_window.visible = false case @command_window.index when 0 @buy_window.active = true @buy_window.visible = true when 1 @sell_window.active = true @sell_window.visible = true end return end if Input.trigger?(Input::C) $game_system.se_play($data_system.shop_se) @number_window.active = false @number_window.visible = false @Money_window.active = false @Money_window.visible = false case @command_window.index when 0 case @item when RPG::Item $game_party.gain_item(@item.id, @number_window.number) $game_party.lose_item2(@item.id, @number_window.number) when RPG::Weapon $game_party.gain_weapon(@item.id, @number_window.number) $game_party.lose_weapon2(@item.id, @number_window.number) when RPG::Armor $game_party.gain_armor(@item.id, @number_window.number) $game_party.lose_armor2(@item.id, @number_window.number) end @buy_window.refresh @sell_window.refresh @buy_window.active = true @buy_window.visible = true @sell_window.active =false @sell_window.visible = true @Money_window.active = false @Money_window.visible = false when 1 case @item when RPG::Item $game_party.lose_item(@item.id, @number_window.number) $game_party.gain_item2(@item.id, @number_window.number) when RPG::Weapon $game_party.lose_weapon(@item.id, @number_window.number) $game_party.gain_weapon2(@item.id, @number_window.number) when RPG::Armor $game_party.lose_armor(@item.id, @number_window.number) $game_party.gain_armor2(@item.id, @number_window.number) end @buy_window.refresh @sell_window.refresh @buy_window.active = false @buy_window.visible = true @sell_window.active = true @sell_window.visible = true @Money_window.active = false @Money_window.visible = false end return end end end #------------------------------------------------------------------------- def update_input if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @input_window.active = false @input_window.visible = false @Money_window.active = true @Money_window.visible = true @buy_window.active = false @buy_window.visible = true @sell_window.active = false @sell_window.visible = true return end if Input.trigger?(Input::C) $game_system.se_play($data_system.shop_se) @input_window.active = false @input_window.visible = false @Money_window.active = false @Money_window.visible = true case @Money_window.index when 0 $game_party.gain_gold(@input_window.number) $game_party.lose_gold2(@input_window.number) @buy_window.refresh @sell_window.refresh @buy_window.active = false @buy_window.visible = false @sell_window.active =false @sell_window.visible = false @input_window.active = false @input_window.visible = false @Money_window.active = false @Money_window.visible = false @command_window.active = true @help_window.set_text("") when 1 $game_party.gain_gold2(@input_window.number) $game_party.lose_gold(@input_window.number) @buy_window.refresh @sell_window.refresh @buy_window.active = false @buy_window.visible = false @sell_window.active =false @sell_window.visible = false @input_window.active = false @input_window.visible = false @Money_window.active = false @Money_window.visible = false @command_window.active = true @help_window.set_text("") end return end end Si todo está bien puesto, para que aparezca el menú, solo debeis hace esta llamada a script desde cualquier evento: $game_temp.bank_calling = true Espero que os valla bien, necesito ayuda para corregir todos los errores. Que haberlos, los hay ^^U.gif Un saludo |
|
#114
|
||||
|
||||
|
Inventario Avanzado
Descripción Crea un menú de objetos (inventario) más complejo dividido por categorías de objetos y con opciones de descarte de objetos y organización. Screens:
Spoiler
Script:
Spoiler
Instrucciones: 1.- El script comenzará a funcionar en cuanto lo pongas sobre Main. 2.- Puedes renombrar las opciones en las líneas 33 a 36. 3.- Puedes configurar la velocidad con la que el menú pasa entre las categorias y las opciones (entre 1 y 5) en la línea 37. Créditos: Script creado por Dark Chocobo. |
|
#115
|
||||
|
||||
|
Cita:
|
|
#116
|
||||
|
||||
|
Cita:
Cita:
|
|
#117
|
||||
|
||||
|
Cita:
Spoiler
Y el único botón que me funciona es el de salir |
|
#118
|
||||
|
||||
|
tienes que usar las teclas diagonales para seleccionar a quien quieres en el party...
|
|
#119
|
|||
|
|||
|
Lord fernando no puede descargar esos archivos por que dice ke no estan o fueron borrados!
|
|
#120
|
||||
|
||||
|
GoldenSun Intro Script v1.2
![]() ![]() este script te permite que al iniciar el juego tenga un pequeña presentación al estilo GoldenSun xD Código:
#==============================================================================
# Main
#==============================================================================
begin
# to have full screen true, to not false
Full_Screen = true
case Full_Screen
when true
$showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
$showm.call(18,0,0,0)
$showm.call(13,0,0,0)
$showm.call(13,0,2,0)
$showm.call(18,0,2,0)
end
# Font used in windows
$defaultfonttype = $fontface = $fontname = Font.default_name = "Tahoma"
# Font size used
$defaultfontsize = $fontsize = Font.default_size = 22
# トランジション準備
Graphics.freeze
# シーンオブジェクト (タイトル画面) を作成
$scene = Scene_Title.new
# $scene が有効な限り main メソッドを呼び出す
while $scene != nil
$scene.main
end
# フェードアウト
Graphics.transition(20)
rescue Errno::ENOENT
# 例外 Errno::ENOENT を補足
# ファイルがオープンできなかった場合、メッセージを表示�
�て終了する
filename = $!.message.sub("No such file or directory - ", "")
print("File #{filename} not found.")
end
=begin
=============================================================
Golden sun intro script v1.2 By AZZY9
=============================================================
if you would like to use any of my scripts please give credit
Since there have been requests, i have made a Golden Sun
Intro.
Note : the menu only appears if there is a save game, if
there isnt then straight after the intro it would begin a
new game automatically as it does in the real game.
New features
I have created a erase save game script which is working in this
edited window skin to make it more golden sun like
better icon
Problems
When you copy a save game, the duration of you selecting it will be added onto the time of the saved
game that you will create by copying
If you would like yo import this script into your game this is how you do it.
WARNING! MAY INTERFEAR WITH OTHER SCRIPTS
1. Replace scripts "Main" and "Scene_Load" in your game with the one in the script
2. Delete the script called "Scene_title"
3. copy the script "Golden Sun Intro" into your game above main.
4. copy the script "Scene_Copy" and "Scene_Erase" into your game above main.
5. copy the contents of "\Golden sun intro\Graphics\Pictures\" into your game's directory
6. copy the contents of "\Golden sun intro\Audio\BGM" into your game's directory
7. copy the contents of "\Golden sun intro\Audio\SE" into your game's directory
=end
class Scene_Title
def main
if $BTEST
battle_test
return
end
$data_actors = load_data("Data/Actors.rxdata")
$data_classes = load_data("Data/Classes.rxdata")
$data_skills = load_data("Data/Skills.rxdata")
$data_items = load_data("Data/Items.rxdata")
$data_weapons = load_data("Data/Weapons.rxdata")
$data_armors = load_data("Data/Armors.rxdata")
$data_enemies = load_data("Data/Enemies.rxdata")
$data_troops = load_data("Data/Troops.rxdata")
$data_states = load_data("Data/States.rxdata")
$data_animations = load_data("Data/Animations.rxdata")
$data_tilesets = load_data("Data/Tilesets.rxdata")
$data_common_events = load_data("Data/CommonEvents.rxdata")
$data_system = load_data("Data/System.rxdata")
$game_system = Game_System.new
@Background = Sprite.new
@Background.bitmap = RPG::Cache.picture("Nintendo")
Audio.se_play("Audio/SE/" + "Start", 100, 100)
@Background.opacity = 255
@Background_c = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@Background.dispose
Audio.bgm_stop
end
end
def update
@Background.update
@Background_c = (@Background_c + 1)
case @Background_c
when 50
@Background.bitmap = RPG::Cache.picture("Blank")
@Background.opacity = 255
when 60
@Background.bitmap = RPG::Cache.picture("CSP")
@Background.opacity = 255
when 110
@Background.bitmap = RPG::Cache.picture("Blank")
@Background.opacity = 255
Audio.bgm_play("Audio/BGM/" + "Intro", 100, 100)
when 120
@Background.bitmap = RPG::Cache.picture("Main")
@Background.opacity = 255
when 150
@Background.bitmap = RPG::Cache.picture("Mains")
@Background.opacity = 255
when 180
@Background_c = 119
end
if Input.trigger?(Input::C)
for i in 0..3
if FileTest.exist?("Save#{i+1}.sav")
@continue_enabled = true
end
end
if @continue_enabled
$scene = Menubgm.new
else
$scene = Menunew.new
end
end
end
#============================================================
class Menubgm
def main
Audio.bgm_play("Audio/BGM/" + "Menu", 100, 100)
$scene = Menu.new
end
end
class Menunew
def main
$game_system.se_play($data_system.decision_se)
Audio.bgm_stop
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id)
$game_player.moveto($data_system.start_x, $data_system.start_y)
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
end
end
#============================================================
class Menu
def main
@Background = Sprite.new
@Background.bitmap = RPG::Cache.picture("Newgames")
@Background.opacity = 255
@Background_c = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@Background.dispose
end
def update
@Background.update
@Background_c = (@Background_c + 1)
case @Background_c
when 20
@Background.bitmap = RPG::Cache.picture("Newgame")
@Background.opacity = 255
when 40
@Background.bitmap = RPG::Cache.picture("Newgames")
@Background.opacity = 255
when 60
@Background_c = 19
end
if Input.trigger?(Input::C)
$scene = Menunew.new
Audio.bgm_stop
end
if Input.trigger?(Input::RIGHT)
$scene = Continue.new
end
end
end
#============================================================
class Continue
def main
@Background = Sprite.new
@Background.bitmap = RPG::Cache.picture("Continues")
@Background.opacity = 255
@Background_c = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@Background.dispose
end
def update
@Background.update
@Background_c = (@Background_c + 1)
case @Background_c
when 20
@Background.bitmap = RPG::Cache.picture("Continue")
@Background.opacity = 255
when 40
@Background.bitmap = RPG::Cache.picture("Continues")
@Background.opacity = 255
when 60
@Background_c = 19
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
$scene = Scene_Load.new
end
if Input.trigger?(Input::LEFT)
$scene = Menu.new
end
if Input.trigger?(Input::RIGHT)
$scene = Copy.new
end
end
end
#============================================================
class Copy
def main
@Background = Sprite.new
@Background.bitmap = RPG::Cache.picture("Copys")
@Background.opacity = 255
@Background_c = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@Background.dispose
end
def update
@Background.update
@Background_c = (@Background_c + 1)
case @Background_c
when 20
@Background.bitmap = RPG::Cache.picture("Copy")
@Background.opacity = 255
when 40
@Background.bitmap = RPG::Cache.picture("Copys")
@Background.opacity = 255
when 60
@Background_c = 19
end
if Input.trigger?(Input::C)
$scene = Scene_Copy.new
end
if Input.trigger?(Input::LEFT)
$scene = Continue.new
end
if Input.trigger?(Input::RIGHT)
$scene = Erase.new
end
end
end
#============================================================
class Erase
def main
@Background = Sprite.new
@Background.bitmap = RPG::Cache.picture("Erases")
@Background.opacity = 255
@Background_c = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@Background.dispose
end
def update
@Background.update
@Background_c = (@Background_c + 1)
case @Background_c
when 20
@Background.bitmap = RPG::Cache.picture("Erase")
@Background.opacity = 255
when 40
@Background.bitmap = RPG::Cache.picture("Erases")
@Background.opacity = 255
when 60
@Background_c = 19
end
if Input.trigger?(Input::C)
$scene = Scene_Erase.new
end
if Input.trigger?(Input::LEFT)
$scene = Copy.new
end
end
end
def battle_test
$data_actors = load_data("Data/BT_Actors.rxdata")
$data_classes = load_data("Data/BT_Classes.rxdata")
$data_skills = load_data("Data/BT_Skills.rxdata")
$data_items = load_data("Data/BT_Items.rxdata")
$data_weapons = load_data("Data/BT_Weapons.rxdata")
$data_armors = load_data("Data/BT_Armors.rxdata")
$data_enemies = load_data("Data/BT_Enemies.rxdata")
$data_troops = load_data("Data/BT_Troops.rxdata")
$data_states = load_data("Data/BT_States.rxdata")
$data_animations = load_data("Data/BT_Animations.rxdata")
$data_tilesets = load_data("Data/BT_Tilesets.rxdata")
$data_common_events = load_data("Data/BT_CommonEvents.rxdata")
$data_system = load_data("Data/BT_System.rxdata")
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
$game_party.setup_battle_test_members
$game_temp.battle_troop_id = $data_system.test_troop_id
$game_temp.battle_can_escape = true
$game_map.battleback_name = $data_system.battleback_name
$game_system.se_play($data_system.battle_start_se)
$game_system.bgm_play($game_system.battle_bgm)
$scene = Scene_Battle.new
end
#==============================================================================
# Copy save Files By AZZY9 V1.0
#==============================================================================
class Scene_Copy < Scene_File
def initialize
$game_temp = Game_Temp.new
$game_temp.last_file_index = 0
latest_time = Time.at(0)
for i in 0..3
filename = make_filename(i)
if FileTest.exist?(filename)
file = File.open(filename, "r")
if file.mtime > latest_time
latest_time = file.mtime
$game_temp.last_file_index = i
end
file.close
end
end
super("Copy from which file")
end
def on_decision(filename)
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
file = File.open(filename, "rb")
read_save_data(file)
file.close
$scene = Scene_Copy2.new
end
def on_cancel
$scene = Copy.new
end
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
end
end
class Scene_Copy2 < Scene_File
def initialize
super("Copy to which file?")
end
def on_decision(filename)
$game_system.se_play($data_system.save_se)
file = File.open(filename, "wb")
write_save_data(file)
file.close
if $game_temp.save_calling
$game_temp.save_calling = false
$scene = Scene_Copy.new
return
end
$scene = Scene_Copy.new
end
def on_cancel
$game_system.se_play($data_system.cancel_se)
if $game_temp.save_calling
$game_temp.save_calling = false
return
end
$scene = Copy.new
end
def write_save_data(file)
characters = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
characters.push([actor.character_name, actor.character_hue])
end
Marshal.dump(characters, file)
Marshal.dump(Graphics.frame_count, file)
$game_system.save_count += 1
$game_system.magic_number = $data_system.magic_number
Marshal.dump($game_system, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_screen, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
end
end
#==============================================================================
# Erase save Files By AZZY9 V1.0
#==============================================================================
class Scene_Erase < Scene_File
def initialize
$game_temp = Game_Temp.new
$game_temp.last_file_index = 0
latest_time = Time.at(0)
for i in 0..3
filename = make_filename(i)
if FileTest.exist?(filename)
file = File.open(filename, "r")
if file.mtime > latest_time
latest_time = file.mtime
$game_temp.last_file_index = i
end
file.close
end
end
super("Erase which file")
end
def on_decision(filename)
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
File.delete(filename)
$scene = Scene_Erase.new
end
def on_cancel
$scene = Erase.new
end
end
#==============================================================================
# Scene_Load
#==============================================================================
class Scene_Load < Scene_File
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
# テンポラリオブジェクトを再作成
$game_temp = Game_Temp.new
# タイムスタンプが最新のファイルを選択
$game_temp.last_file_index = 0
latest_time = Time.at(0)
for i in 0..3
filename = make_filename(i)
if FileTest.exist?(filename)
file = File.open(filename, "r")
if file.mtime > latest_time
latest_time = file.mtime
$game_temp.last_file_index = i
end
file.close
end
end
super("Load from which file")
end
#--------------------------------------------------------------------------
# ● 決定時の処理
#--------------------------------------------------------------------------
def on_decision(filename)
# ファイルが存在しない場合
unless FileTest.exist?(filename)
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# ロード SE を演奏
$game_system.se_play($data_system.load_se)
# セーブデータの書き込み
file = File.open(filename, "rb")
read_save_data(file)
file.close
# BGM、BGS を復帰
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
# マップを更新 (並列イベント実行)
$game_map.update
# マップ画面に切り替え
$scene = Scene_Map.new
end
#--------------------------------------------------------------------------
# ● キャンセル時の処理
#--------------------------------------------------------------------------
def on_cancel
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# タイトル画面に切り替え
$scene = Menubgm.new
end
#--------------------------------------------------------------------------
# ● セーブデータの読み込み
# file : 読み込み用ファイルオブジェクト (オープン済み)
#--------------------------------------------------------------------------
def read_save_data(file)
# セーブファイル描画用のキャラクターデータを読み込む
characters = Marshal.load(file)
# プレイ時間計測用のフレームカウントを読み込む
Graphics.frame_count = Marshal.load(file)
# 各種ゲームオブジェクトを読み込む
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
if $game_system.magic_number != $data_system.magic_number
# マップをリロード
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
end
end
http://www.megaupload.com/?d=XO5S597W mirror: http://rapidshare.com/files/23171085..._v1.2.zip.html |
![]() |
| Herramientas | |
| Desplegado | |
|
|
Temas Similares para: Aportes de Scripts RPG-Maker
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Informacion sobre el rpg maker | polo4 | Cafetería | 3 | 20-nov-2009 05:17 |
| ¡Recopilemos Scripts! | Lord Fernando | RPG Maker | 4 | 06-dic-2008 00:54 |
| Rpg Maker Xp -TEMA OFICIAL- | neo_crimsom | RPG Maker | 1025 | 25-nov-2007 07:29 |
| Club general de Naruto | ~Xex | Zona Otaku | 2449 | 17-oct-2007 18:51 |
| Tutoriales en Video del RPG Maker xp por: savioWEB | savioWED | Añade tus manuales | 46 | 10-oct-2007 21:03 |