05-01-2012, 06:32 AM
Hello, I'm an Argentinian trying to design an Sci Fi RPG, but i'm not good at all scripting. I've found this ABS very attractive for my game, but it crashes with some of my other scripts (many of them downloaded in Spanish pages), and I want to know if it is possible to fix some part of them so i can use them.
The scripts that I've been using are:
*an Alchemy/ Crafting script that opens an independent menu
*a Quest Log created by the scripter Falcao.
Both of them are in Spanish, and both of them are quite important to my game, specially the first one. If it is necessary, i could translate them to English.
I'm very sorry for my rudeness and Tarzan syntax, but my English is only of a High School level of formal education, and i haven't very much experience in forums.
Here are the scripts
*Alchemy
Quest Log
The scripts that I've been using are:
*an Alchemy/ Crafting script that opens an independent menu
*a Quest Log created by the scripter Falcao.
Both of them are in Spanish, and both of them are quite important to my game, specially the first one. If it is necessary, i could translate them to English.
I'm very sorry for my rudeness and Tarzan syntax, but my English is only of a High School level of formal education, and i haven't very much experience in forums.
Here are the scripts
*Alchemy
Content Hidden
#-------------------------------------------------------------------------
# Script de alquimia
#-------------------------------------------------------------------------
# - Versión: 1.2
# - Autor: Alnain (no son necesarios créditos)
# - Creado: 11 - 9 - 08 (dd - mm - aa)
# - Instrucciones:
# · Pegar encima de main.
# · Para ir a la pantalla de alquimia usa lo siguiente en un llamar
# script: $scene = Scene_Alquimia.new.
# · Selecciona el atributo ingrediente para los objetos que quieras que
# combinables
# · Edita la parte editabe a tu gusto.
class Scene_Alquimia # no editar esta línea
#-------------------------------------------------------------------------
#----EDITABLE DESDE AQUI -------------------------------------------------
#-------------------------------------------------------------------------
def initialize
# Id del atributo "Ingrediente" (editable)
$atr_ingrediente = 5
#---Combinaciones-----
@combinaciones = { # no editar esta línea
# Las comabinaciones se definen así:
#
# [ingrediente, ingrediente, ingrediente] => [resultado, resultado],
#
# La última combinación no debe llevar la coma al final.
# Ingrediente y resultado son IDs de objetos en la base de datos.
# Puedes crear tantas combinaciones como quieras.
# Puedes añadir tantos ingredientes como quieras a cada combinación.
# Puedes añadir tantos resultados como quieras a cada combinación.
[55, 56] => [2],
[22, 23] => [13],
[39, 37] => [38],
[40, 26] => [42]
} # no editar esta línea
#-------------------------------------------------------------------------
#----EDITABLE HASTA AQUI -------------------------------------------------
#-------------------------------------------------------------------------
end
def main
@items_window = Window_Items.new
@items_window.y = 64
@mezcla_window = Window_Mezcla.new
@mezcla_window.x = 320
@mezcla_window.y = 64
@mezcla_window.active = false
@command_window = Window_Inst.new
@command_window.x = 320
@command_window.y = 384
@info_window = Window_Info.new
@info_window.x = 320 - @info_window.width / 2
@info_window.y = 240 - @info_window.height / 2
@info_window.z = 9999
@info_window.visible = false
@info_window.set_info
@description_window = Window_Help.new
if not @items_window.item.nil?
@description_window.set_text (@items_window.item.description)
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
#disposes
@items_window.dispose
@mezcla_window.dispose
@command_window.dispose
@description_window.dispose
end
def update
@items_window.update
@mezcla_window.update
if @items_window.active
if not @items_window.item.nil?
@description_window.set_text (@items_window.item.description)
else
@description_window.set_text ("")
end
else
if not @mezcla_window.item.nil?
item = $data_items[@mezcla_window.item]
@description_window.set_text (item.description)
else
@description_window.set_text ("")
end
end
if Input.trigger? (Input::LEFT)
if @mezcla_window.active
@mezcla_window.active = false
@items_window.active = true
end
elsif Input.trigger? (Input::RIGHT)
if @items_window.active
@mezcla_window.active = true
@items_window.active = false
end
end
if Input.trigger? (Input::C)
if @items_window.active and not @items_window.item.nil?
@mezcla_window.añadir_ingrediente (@items_window.item.id)
@mezcla_window.refresh
$game_party.lose_item (@items_window.item.id, 1)
@items_window.index = [0, @items_window.index - 1].max
@items_window.refresh
elsif @mezcla_window.active and not @mezcla_window.item.nil?
$game_party.gain_item (@mezcla_window.item, 1)
@items_window.refresh
@mezcla_window.quitar_ingrediente
@mezcla_window.index = [0, @mezcla_window.index - 1].max
@mezcla_window.refresh
else
@items_window.active = true
@info_window.visible = false
end
end
if Input.trigger? (Input::X)
vaciar (true)
elsif Input.trigger? (Input::A)
mezclar
end
if Input.trigger? (Input::B)
vaciar (true)
$scene = Scene_Map.new
end
end
def vaciar (devolver)
items = @mezcla_window.items
for item in items
$game_party.gain_item (item, 1) if devolver
@mezcla_window.quitar_ingrediente
end
@mezcla_window.refresh
@items_window.refresh
end
def mezclar
existe = false
for combinacion in @combinaciones.keys
if @mezcla_window.items.sort == combinacion.sort
existe = true
end
end
if existe
resultado = @combinaciones[@mezcla_window.items.sort]
for item in resultado
$game_party.gain_item (item, 1)
end
else
resultado = []
end
vaciar (false)
@items_window.active = false
@mezcla_window.active = false
@info_window.visible = true
@info_window.set_info (resultado)
end
end
class Window_Info < Window_Base
def initialize
super (0, 0, 320, 128)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.font.size = 20
end
#--------------------------------------------------------------------------
def set_info (info = [])
self.contents.clear
# self.contents.fill_rect (0, 0, self.width, self.height, Color.new (0, 0, 0, 0))
if info.empty?
txt = "Combinación equivocada"
self.contents.draw_text (0, 0, self.width - 32, 32, txt, 1)
txt = "Has perdido los ingredientes"
self.contents.draw_text (0, 48, self.width - 32, 32, txt, 1)
return
end
resultados = {}
for item in info
if resultados.has_key? (item)
resultados[item] += 1
else
resultados[item] = 1
end
end
self.height = resultados.keys.size * 32 + 32 + 32 + 16
self.contents = Bitmap.new (width - 32, height - 32)
txt = "Has obtenido:"
self.contents.draw_text (0, 0, self.width - 32, 32, txt, 1)
for i in 0...resultados.keys.size
item_id = resultados.keys[i]
item = $data_items[item_id]
number = resultados[item_id]
x = 0
y = 32 + 16 + 32 * i
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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
end
#--------------------------------------------------------------------------
def draw_item(data, pos)
end
#--------------------------------------------------------------------------
end
class Window_Inst < Window_Base
def initialize
super (0, 0, 320, 96)
self.contents = Bitmap.new (width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.draw_text (0, 0, self.width - 32, 32, "A: Vaciar")
self.contents.draw_text (0, 32, self.width - 32, 32, "Z: Mezclar")
end
end
#==============================================================================
# â– Window_Item
#------------------------------------------------------------------------------
class Window_Mezcla < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 320)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@items = {}
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def añadir_ingrediente (item)
if @items[item].nil?
@items[item] = 1
else
@items[item] += 1
end
end
#--------------------------------------------------------------------------
def quitar_ingrediente
@items[item] -= 1
if @items[item] == 0
@items.delete (item)
end
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = @items.keys.size
for i in 0...@items.keys.size
if not @items.keys[i].nil?
draw_item(@items.keys[i], i)
end
end
end
#--------------------------------------------------------------------------
def draw_item(data, pos)
item = $data_items[data]
number = @items[item.id]
x = 0
y = 32 * pos
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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
#--------------------------------------------------------------------------
def items
items = []
for item in @items.keys
for g in 1..@items[item]
items.push (item)
end
end
return items
end
#--------------------------------------------------------------------------
def item
return @items.keys[self.index]
end
#--------------------------------------------------------------------------
end
#==============================================================================
# â– Window_Item
#------------------------------------------------------------------------------
class Window_Items < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@data = []
for i in 1...$data_items.size
# Script de alquimia
#-------------------------------------------------------------------------
# - Versión: 1.2
# - Autor: Alnain (no son necesarios créditos)
# - Creado: 11 - 9 - 08 (dd - mm - aa)
# - Instrucciones:
# · Pegar encima de main.
# · Para ir a la pantalla de alquimia usa lo siguiente en un llamar
# script: $scene = Scene_Alquimia.new.
# · Selecciona el atributo ingrediente para los objetos que quieras que
# combinables
# · Edita la parte editabe a tu gusto.
class Scene_Alquimia # no editar esta línea
#-------------------------------------------------------------------------
#----EDITABLE DESDE AQUI -------------------------------------------------
#-------------------------------------------------------------------------
def initialize
# Id del atributo "Ingrediente" (editable)
$atr_ingrediente = 5
#---Combinaciones-----
@combinaciones = { # no editar esta línea
# Las comabinaciones se definen así:
#
# [ingrediente, ingrediente, ingrediente] => [resultado, resultado],
#
# La última combinación no debe llevar la coma al final.
# Ingrediente y resultado son IDs de objetos en la base de datos.
# Puedes crear tantas combinaciones como quieras.
# Puedes añadir tantos ingredientes como quieras a cada combinación.
# Puedes añadir tantos resultados como quieras a cada combinación.
[55, 56] => [2],
[22, 23] => [13],
[39, 37] => [38],
[40, 26] => [42]
} # no editar esta línea
#-------------------------------------------------------------------------
#----EDITABLE HASTA AQUI -------------------------------------------------
#-------------------------------------------------------------------------
end
def main
@items_window = Window_Items.new
@items_window.y = 64
@mezcla_window = Window_Mezcla.new
@mezcla_window.x = 320
@mezcla_window.y = 64
@mezcla_window.active = false
@command_window = Window_Inst.new
@command_window.x = 320
@command_window.y = 384
@info_window = Window_Info.new
@info_window.x = 320 - @info_window.width / 2
@info_window.y = 240 - @info_window.height / 2
@info_window.z = 9999
@info_window.visible = false
@info_window.set_info
@description_window = Window_Help.new
if not @items_window.item.nil?
@description_window.set_text (@items_window.item.description)
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
#disposes
@items_window.dispose
@mezcla_window.dispose
@command_window.dispose
@description_window.dispose
end
def update
@items_window.update
@mezcla_window.update
if @items_window.active
if not @items_window.item.nil?
@description_window.set_text (@items_window.item.description)
else
@description_window.set_text ("")
end
else
if not @mezcla_window.item.nil?
item = $data_items[@mezcla_window.item]
@description_window.set_text (item.description)
else
@description_window.set_text ("")
end
end
if Input.trigger? (Input::LEFT)
if @mezcla_window.active
@mezcla_window.active = false
@items_window.active = true
end
elsif Input.trigger? (Input::RIGHT)
if @items_window.active
@mezcla_window.active = true
@items_window.active = false
end
end
if Input.trigger? (Input::C)
if @items_window.active and not @items_window.item.nil?
@mezcla_window.añadir_ingrediente (@items_window.item.id)
@mezcla_window.refresh
$game_party.lose_item (@items_window.item.id, 1)
@items_window.index = [0, @items_window.index - 1].max
@items_window.refresh
elsif @mezcla_window.active and not @mezcla_window.item.nil?
$game_party.gain_item (@mezcla_window.item, 1)
@items_window.refresh
@mezcla_window.quitar_ingrediente
@mezcla_window.index = [0, @mezcla_window.index - 1].max
@mezcla_window.refresh
else
@items_window.active = true
@info_window.visible = false
end
end
if Input.trigger? (Input::X)
vaciar (true)
elsif Input.trigger? (Input::A)
mezclar
end
if Input.trigger? (Input::B)
vaciar (true)
$scene = Scene_Map.new
end
end
def vaciar (devolver)
items = @mezcla_window.items
for item in items
$game_party.gain_item (item, 1) if devolver
@mezcla_window.quitar_ingrediente
end
@mezcla_window.refresh
@items_window.refresh
end
def mezclar
existe = false
for combinacion in @combinaciones.keys
if @mezcla_window.items.sort == combinacion.sort
existe = true
end
end
if existe
resultado = @combinaciones[@mezcla_window.items.sort]
for item in resultado
$game_party.gain_item (item, 1)
end
else
resultado = []
end
vaciar (false)
@items_window.active = false
@mezcla_window.active = false
@info_window.visible = true
@info_window.set_info (resultado)
end
end
class Window_Info < Window_Base
def initialize
super (0, 0, 320, 128)
self.contents = Bitmap.new (width - 32, height - 32)
self.contents.font.size = 20
end
#--------------------------------------------------------------------------
def set_info (info = [])
self.contents.clear
# self.contents.fill_rect (0, 0, self.width, self.height, Color.new (0, 0, 0, 0))
if info.empty?
txt = "Combinación equivocada"
self.contents.draw_text (0, 0, self.width - 32, 32, txt, 1)
txt = "Has perdido los ingredientes"
self.contents.draw_text (0, 48, self.width - 32, 32, txt, 1)
return
end
resultados = {}
for item in info
if resultados.has_key? (item)
resultados[item] += 1
else
resultados[item] = 1
end
end
self.height = resultados.keys.size * 32 + 32 + 32 + 16
self.contents = Bitmap.new (width - 32, height - 32)
txt = "Has obtenido:"
self.contents.draw_text (0, 0, self.width - 32, 32, txt, 1)
for i in 0...resultados.keys.size
item_id = resultados.keys[i]
item = $data_items[item_id]
number = resultados[item_id]
x = 0
y = 32 + 16 + 32 * i
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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
end
#--------------------------------------------------------------------------
def draw_item(data, pos)
end
#--------------------------------------------------------------------------
end
class Window_Inst < Window_Base
def initialize
super (0, 0, 320, 96)
self.contents = Bitmap.new (width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.draw_text (0, 0, self.width - 32, 32, "A: Vaciar")
self.contents.draw_text (0, 32, self.width - 32, 32, "Z: Mezclar")
end
end
#==============================================================================
# â– Window_Item
#------------------------------------------------------------------------------
class Window_Mezcla < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 320)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@items = {}
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def añadir_ingrediente (item)
if @items[item].nil?
@items[item] = 1
else
@items[item] += 1
end
end
#--------------------------------------------------------------------------
def quitar_ingrediente
@items[item] -= 1
if @items[item] == 0
@items.delete (item)
end
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = @items.keys.size
for i in 0...@items.keys.size
if not @items.keys[i].nil?
draw_item(@items.keys[i], i)
end
end
end
#--------------------------------------------------------------------------
def draw_item(data, pos)
item = $data_items[data]
number = @items[item.id]
x = 0
y = 32 * pos
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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
#--------------------------------------------------------------------------
def items
items = []
for item in @items.keys
for g in 1..@items[item]
items.push (item)
end
end
return items
end
#--------------------------------------------------------------------------
def item
return @items.keys[self.index]
end
#--------------------------------------------------------------------------
end
#==============================================================================
# â– Window_Item
#------------------------------------------------------------------------------
class Window_Items < Window_Selectable
#--------------------------------------------------------------------------
def initialize
super(0, 0, 320, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@column_max = 1
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@data = []
for i in 1...$data_items.size
Content Hidden
#========================================================================#
# #*****************# Misiones interactivas V 1.0 Falcao script #
# #*** By Falcao ***# Permite crear misiones mostrando la lista #
# #*****************# en una scene. Permite crear de 1 hasta #
# RMXP un trillon de misiones segun el caso. #
# makerpalace.onlinegoo.com Date 11/16/2009 #
#========================================================================#
#------------------------------------------------------------------------
# * Instrucciones
#
# Solo basta con copiar y pegar el script encima de main, editar las
# misiones que necesites en el module de abajo
#
# Para llamar el script basta con pulsar tecla 'A' por defecto
# pero puede ser llamado manualmente usando el siguiente codigo
#
# $scene = Scene_Mision.new
#
# Para agregar una mision ya creada al inventario hacerlo asi:
#
# Tareas.mision(id) En vez de 'id' pon el ID de mision a agregar
#
# Para completar una mision usar el siguiente comando
#
# Tareas.completar_mision(id) En vez de 'id' pon el ID de mision a
# Completar. Ejemplo: Tareas.completar_mision(1) Completa id 1
#
#
# Licensia: Puede ser usado en juegos comerciales o no comerciales
#
# Creditos: By Falcao
#
#-------------------------------------------------------------------------
module Tareas
# Nombre de la mision: A = ID de mision, B = Nombre de mision
Nombre = {
1=> 'Rescatar a Pulga',
2=> 'Ver al Presidente',
3=> 'La conquista',
4=> 'Hierba Medicinal',
}
# Descripciones: A = ID de mision, B = contenido soporta 3 lineas
Descripcion = {
1=> ['Ir al pueblo del rey Falcao, robarle las llaves reales',
'luego ir a rescatar a la princesa Pulga Barata encerrada',
'en la mazmorra oscura del castillo'],
2=> ['Una de las principales metas que tenés que cumplir es',
'darle una buena patada en el culo al presidente de',
'Enterbrain por sacar el maker mierda del vx'],
3=> ['Conquistar el mundo es una de las tareas mas difíciles',
'que sólo se le ocurren a los enfermos mentales',
'si quieres intentalo sería bueno ver el fracaso'],
4=> ['La princesa Arisleyda a sido mordida por una de las',
'serpientes más venenosas del bosque Maker Palace',
'se podrá salvar solo con la planta hierba medicinal'],
}
# Tareas de mision: A = ID de mision, B = contenido soporta 2 lineas
Pasos = {
1=> ['Robarle las llaves al rey Falcao',
'Rescatar a la prinsesa pulga barata'],
2=> ['Ir al pueblo donde se encuentra el presidente',
'Darle una buena parada al presindete'],
3=> ['Conquistar el mundo',
'none'],
4=> ['Conseguir 10 Hojas de hierva medicinal',
'Darle el antidoto a la princesa Arisleyda'],
}
# Recompensa en Items: A = ID de mision, B = [Tipo de Item, ID de Item]
Reward_Items = {
1=> ['item', 2],
2=> ['armor', 3],
3=> ['weapon', 1],
4=> ['weapon', 19],
}
# Recompensa en dinero: A = ID de mision, B = Cantidad de dinero
Reward_Gold = {
1=> 5,
2=> 10,
3=> 20,
4=> 10,
}
#-----------------------------------------------------------------------
# * Funsiones extras tu decides si las usas o no
# Items necesarios para completar una mision, esto es para realizar una
# busqueda mas avanzada,
# A = ID de mision, B = [ID de item, Cantidad necesaria]
Items_Needed = {
4=> [11, 10],
}
# Activar interruptor al completar mision, esto puede ser opcional
# A = ID de mision, B = ID de interruptor
Mision_Switch = {
3=> 50,
}
#----------------------------------------------------------------------
# *Configuracion del systema en general
# Tocar sonido ME al completar una mision, si no se quiere sonido dejar
# comillas en blanco ""
Play_Mision_Me = "015-Mystery01"
# Tiempo en segundos para mostrar la ventana cuando una mision se a
# completado
Pop_Mision_Time = 3
# Boton para llamar el script tecla 'A' del teclado
Call_Mision = Input::X
# Impedir llamar el script por medio de la tecla especificada
# Por defecto esto va desactivado false
Disable_Mision_Call = false
#-----------------------------------------------------------------------
# System
$falcao_mision = []
$falcao_completed = []
$mision_data = [id = nil, item = nil, gold = nil, pop_time = 0, show = false]
def self.mision(id)
unless $falcao_mision.include?(id)
$falcao_mision.push(id)
end
end
def self.completar_mision(mision_id)
return unless $falcao_mision.include?(mision_id)
unless $falcao_completed.include?(mision_id)
$mision_data[0] = mision_id
Reward_Items.each do |id, value|
if id == mision_id
case value[0]
when 'item'
item = $data_items[value[1]]
$game_party.gain_item(item.id, 1)
$mision_data[1] = item
when 'weapon'
weapon = $data_weapons[value[1]]
$game_party.gain_weapon(weapon.id, 1)
$mision_data[1] = weapon
when 'armor'
armor = $data_armors[value[1]]
$game_party.gain_armor(armor.id, 1)
$mision_data[1] = armor
end
end
$falcao_completed.push(mision_id)
end
#gold
Reward_Gold.each do |id, value|
if id == mision_id
$game_party.gain_gold(value)
$mision_data[2] = value
end
end
# Switch
Mision_Switch.each do |id, value|
if id == mision_id
$game_switches[value] = true
$game_map.need_refresh = true
end
end
Items_Needed.each do |id, value|
if id == mision_id
if $game_party.item_number(value[0]) < value[1]
$game_party.gain_item(value[0], value[1])
end
end
end
$mision_data[4] = true
$mision_data[3] = 40 * Pop_Mision_Time
Audio.me_play("Audio/Me/" + Play_Mision_Me)
end
end
end
class Font
alias falcaoBest_font initialize
def initialize
falcaoBest_font
if $scene.is_a?(Scene_Mision) or $mision_data[4]
self.name = "Georgia"
self.size = 20
end
end
end
class Misiones < Window_Base
include Tareas
def initialize
super(180, 64, 460, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 255
end
def refresh(mision_id)
self.contents.clear
@mision_id = mision_id
draw_grid(0,336)
draw_grid(225,336)
if $falcao_mision.include?(mision_id)
draw_mision_contents
else
self.contents.draw_text(-20, 100, self.width, 50, "No hay datos",1)
end
end
def draw_mision_contents
Nombre.each do |id, value|
if id == @mision_id
self.contents.font.color = Color.new(255, 120, 0, 255)
self.contents.draw_text(-20, 0, self.width, 50 , value,1)
end
end
Descripcion.each do |id, value|
if id == @mision_id
self.contents.font.color = system_color
self.contents.draw_text(0, 40, self.width, 50 , "Descripcion:")
self.contents.font.color = normal_color
self.contents.draw_text(0, 70, self.width, 50 , value[0])
self.contents.draw_text(0, 94, self.width, 50 , value[1])
self.contents.draw_text(0, 119, self.width, 50 , value[2])
end
end
Pasos.each do |id, value|
if id == @mision_id
self.contents.font.color = system_color
self.contents.draw_text(0, 165, self.width, 50 , "Tareas:")
self.contents.font.color = normal_color
self.contents.draw_text(0, 197, self.width, 50 ,'1- ' + value[0])
self.contents.draw_text(0, 222, self.width, 50 ,'2- ' + value[1])
end
end
Reward_Items.each do |id, value|
if id == @mision_id
case value[0]
when 'item'
item = $data_items[value[1]]
when 'weapon'
item = $data_weapons[value[1]]
when 'armor'
item = $data_armors[value[1]]
end
self.contents.font.color = system_color
self.contents.draw_text(0, 270, self.width, 50 , "Recompensa:")
self.contents.font.color = normal_color
icon = RPG::Cache.icon(item.icon_name) rescue nil
self.contents.blt(20, 344, icon, Rect.new(0, 0, 24, 24),255) rescue nil
self.contents.draw_text(50, 335, self.width, 50 , item.name)
end
end
Reward_Gold.each do |id, value|
if id == @mision_id
icon = RPG::Cache.icon("032-Item01") rescue nil
self.contents.blt(240, 344,icon,Rect.new(0, 0, 24, 24), 255) rescue nil
self.contents.draw_text(275, 335, self.width, 50,
"#{value.to_s} #{$data_system.words.gold}")
end
end
end
def draw_grid(x,y)
width = 200
color = system_color
self.contents.fill_rect(x+2, y-2, width-4, 1, color)
self.contents.fill_rect(x+1, y-1, width-2, 1, color)
self.contents.fill_rect(x, y, width, 1, color)
self.contents.fill_rect(x, y+1, 3, 45, color)
self.contents.fill_rect(x+ 197, y+1, 3, 45, color)
self.contents.fill_rect(x, y+45, width, 1, color)
self.contents.fill_rect(x+1, y+46, width-2, 1, color)
self.contents.fill_rect(x+2, y+47, width-4, 1, color)
end
end
class Mision_Indice < Window_Selectable
def initialize(x=0,y=0)
super(x, y, 180, 390)
@column_max = 1
refresh
self.index = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in Tareas::Nombre.values
@data.push(i)
end
@item_max = @data.size
$all_quests = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
nombre = @data[index]
self.contents.font.color = normal_color
x, y = 4, index * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
if $falcao_mision.include?(index + 1)
self.contents.draw_text(x, y, 212, 32, nombre)
else
self.contents.font.color = disabled_color
self.contents.draw_text(x, y, 212, 32, "Bloqueado")
end
end
end
class Mision_Help < Window_Base
def initialize(x=0,y=0,ancho=640, alto=64)
super(x, y, ancho, alto)
self.contents = Bitmap.new(width - 32, height - 32)
end
def set_progress
self.contents.clear
self.contents.draw_text(0, 0, self.width, 32 , "Misiones")
mision = $falcao_mision.size
texto = "#{"Progreso"} #{mision * 100/$all_quests}%"
self.contents.draw_text(0, 30, self.width, 32 , texto)
end
def set_status(mision_id)
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, self.width, 32 , "Mision Status:")
if $falcao_mision.include?(mision_id)
draw_needed_items(mision_id)
if $falcao_completed.include?(mision_id)
self.contents.font.color = Color.new(128, 255, 128, 255)
self.contents.draw_text(120, 0, self.width, 32 , "Completada!")
else
self.contents.font.color = normal_color
self.contents.draw_text(120, 0, self.width, 32 , "En proceso")
end
else
self.contents.font.color = disabled_color
self.contents.draw_text(120, 0, self.width, 32 , "Bloqueada")
end
end
def draw_needed_items(mision_id)
Tareas::Items_Needed.each do |id, value|
if id == mision_id
draw_grid(280,1)
item = $data_items[value[0]]
icon = RPG::Cache.icon(item.icon_name) rescue nil
self.contents.blt(290, 3, icon, Rect.new(0, 0, 24, 24), 255) rescue nil
c = $game_party.item_number(item.id); n = value[1]; w = self.width
self.contents.draw_text(340, 0, w, 32,"#{c.to_s} / #{n.to_s}")
end
end
end
def draw_grid(x,y)
width = 150
color = system_color
self.contents.fill_rect(x+2, y-2, width-4, 1, color)
self.contents.fill_rect(x+1, y-1, width-2, 1, color)
self.contents.fill_rect(x, y, width, 1, color)
self.contents.fill_rect(x, y+1, 3, 30, color)
self.contents.fill_rect(x+ 147, y+1, 3, 30, color)
self.contents.fill_rect(x, y+30, width, 1, color)
self.contents.fill_rect(x+1, y+31, width-2, 1, color)
self.contents.fill_rect(x+2, y+32, width-4, 1, color)
end
end
class Pop_Mision < Window_Base
def initialize
super(170, 0, 300, 190)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Georgia"
self.contents.font.size = 20
self.opacity = 200
refresh
end
def refresh
self.contents.clear
data = $mision_data
return unless data[4]
self.contents.font.color = normal_color
if data[3] > 0; data[3] -= 1
Tareas::Nombre.each do |id, value|
if id == data[0]
self.contents.draw_text(-20, 0,self.width,32, "#{value} Completada!",1)
end
end
self.contents.font.color = system_color
self.contents.draw_text(0, 45, self.width, 32 , "Recompensas:")
#Items
self.contents.font.color = normal_color
if data[1] != nil
icon = RPG::Cache.icon(data[1].icon_name) rescue nil
self.contents.blt(0, 85, icon, Rect.new(0, 0, 24, 24), 255) rescue nil
self.contents.draw_text(35, 85, self.width, 32 , data[1].name)
end
#Gold
if data[2] != nil
icon = RPG::Cache.icon("032-Item01") rescue nil
if data[1] == nil
x = 35; y = 85
else
x = 40; y = 121
end
self.contents.blt(0, y, icon, Rect.new(0, 0, 24, 24), 255) rescue nil
self.contents.draw_text(x, y, self.width, 32,
"#{data[2].to_s} #{$data_system.words.gold}")
end
$mision_data = [nil, nil, nil, 0, false] if data[3] == 1
end
end
end
class Scene_Mision
def main
@indice_mision = Mision_Indice.new(0,90)
@misiones = Misiones.new
@misiones.refresh(@indice_mision.index + 1)
@title = Mision_Help.new(180,0,462)
@title.set_status(@indice_mision.index + 1)
@progress = Mision_Help.new(0,0,180,90)
@progress.set_progress
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@indice_mision.dispose
@misiones.dispose
@title.dispose
@progress.dispose
end
def update
@indice_mision.update
@mision = @indice_mision.index + 1
update_parametros
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
end
def update_parametros
@misiones.refresh(@mision)
@title.set_status(@mision)
end
end
class Scene_Map
include Tareas
alias falcao_mision_main main
def main
@mision_pop = Pop_Mision.new
$mision_data[4] ? @mision_pop.visible = true : @mision_pop.visible = false
falcao_mision_main
@mision_pop.dispose
end
alias falcao_mision_update update
def update
falcao_mision_update
if $mision_data[4]
@mision_pop.refresh
@mision_pop.visible = true
else
@mision_pop.visible = false
end
if Input.trigger?(Call_Mision) and !Disable_Mision_Call
$scene = Scene_Mision.new
return
end
end
end
class Scene_Save
alias falcao_write_mision write_save_data
def write_save_data(file)
falcao_write_mision(file)
Marshal.dump($falcao_mision, file)
Marshal.dump($falcao_completed, file)
Marshal.dump($mision_data, file)
end
end
class Scene_Load
alias falcao_read_mision read_save_data
def read_save_data(file)
falcao_read_mision(file)
$falcao_mision = Marshal.load(file)
$falcao_completed = Marshal.load(file)
$mision_data = Marshal.load(file)
end
end
if $game_party.item_number(i) > 0 and
$data_items[i].element_set.include? ($atr_ingrediente)
@data.push($data_items[i])
end
end
@item_max = @data.size
if @item_max > 0
for i in 0...@data.size
draw_item(@data[i], i) if not @data[i].nil?
end
end
end
#--------------------------------------------------------------------------
def draw_item(data, pos)
item = data
number = $game_party.item_number(item.id)
x = 0
y = 32 * pos
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
end
# #*****************# Misiones interactivas V 1.0 Falcao script #
# #*** By Falcao ***# Permite crear misiones mostrando la lista #
# #*****************# en una scene. Permite crear de 1 hasta #
# RMXP un trillon de misiones segun el caso. #
# makerpalace.onlinegoo.com Date 11/16/2009 #
#========================================================================#
#------------------------------------------------------------------------
# * Instrucciones
#
# Solo basta con copiar y pegar el script encima de main, editar las
# misiones que necesites en el module de abajo
#
# Para llamar el script basta con pulsar tecla 'A' por defecto
# pero puede ser llamado manualmente usando el siguiente codigo
#
# $scene = Scene_Mision.new
#
# Para agregar una mision ya creada al inventario hacerlo asi:
#
# Tareas.mision(id) En vez de 'id' pon el ID de mision a agregar
#
# Para completar una mision usar el siguiente comando
#
# Tareas.completar_mision(id) En vez de 'id' pon el ID de mision a
# Completar. Ejemplo: Tareas.completar_mision(1) Completa id 1
#
#
# Licensia: Puede ser usado en juegos comerciales o no comerciales
#
# Creditos: By Falcao
#
#-------------------------------------------------------------------------
module Tareas
# Nombre de la mision: A = ID de mision, B = Nombre de mision
Nombre = {
1=> 'Rescatar a Pulga',
2=> 'Ver al Presidente',
3=> 'La conquista',
4=> 'Hierba Medicinal',
}
# Descripciones: A = ID de mision, B = contenido soporta 3 lineas
Descripcion = {
1=> ['Ir al pueblo del rey Falcao, robarle las llaves reales',
'luego ir a rescatar a la princesa Pulga Barata encerrada',
'en la mazmorra oscura del castillo'],
2=> ['Una de las principales metas que tenés que cumplir es',
'darle una buena patada en el culo al presidente de',
'Enterbrain por sacar el maker mierda del vx'],
3=> ['Conquistar el mundo es una de las tareas mas difíciles',
'que sólo se le ocurren a los enfermos mentales',
'si quieres intentalo sería bueno ver el fracaso'],
4=> ['La princesa Arisleyda a sido mordida por una de las',
'serpientes más venenosas del bosque Maker Palace',
'se podrá salvar solo con la planta hierba medicinal'],
}
# Tareas de mision: A = ID de mision, B = contenido soporta 2 lineas
Pasos = {
1=> ['Robarle las llaves al rey Falcao',
'Rescatar a la prinsesa pulga barata'],
2=> ['Ir al pueblo donde se encuentra el presidente',
'Darle una buena parada al presindete'],
3=> ['Conquistar el mundo',
'none'],
4=> ['Conseguir 10 Hojas de hierva medicinal',
'Darle el antidoto a la princesa Arisleyda'],
}
# Recompensa en Items: A = ID de mision, B = [Tipo de Item, ID de Item]
Reward_Items = {
1=> ['item', 2],
2=> ['armor', 3],
3=> ['weapon', 1],
4=> ['weapon', 19],
}
# Recompensa en dinero: A = ID de mision, B = Cantidad de dinero
Reward_Gold = {
1=> 5,
2=> 10,
3=> 20,
4=> 10,
}
#-----------------------------------------------------------------------
# * Funsiones extras tu decides si las usas o no
# Items necesarios para completar una mision, esto es para realizar una
# busqueda mas avanzada,
# A = ID de mision, B = [ID de item, Cantidad necesaria]
Items_Needed = {
4=> [11, 10],
}
# Activar interruptor al completar mision, esto puede ser opcional
# A = ID de mision, B = ID de interruptor
Mision_Switch = {
3=> 50,
}
#----------------------------------------------------------------------
# *Configuracion del systema en general
# Tocar sonido ME al completar una mision, si no se quiere sonido dejar
# comillas en blanco ""
Play_Mision_Me = "015-Mystery01"
# Tiempo en segundos para mostrar la ventana cuando una mision se a
# completado
Pop_Mision_Time = 3
# Boton para llamar el script tecla 'A' del teclado
Call_Mision = Input::X
# Impedir llamar el script por medio de la tecla especificada
# Por defecto esto va desactivado false
Disable_Mision_Call = false
#-----------------------------------------------------------------------
# System
$falcao_mision = []
$falcao_completed = []
$mision_data = [id = nil, item = nil, gold = nil, pop_time = 0, show = false]
def self.mision(id)
unless $falcao_mision.include?(id)
$falcao_mision.push(id)
end
end
def self.completar_mision(mision_id)
return unless $falcao_mision.include?(mision_id)
unless $falcao_completed.include?(mision_id)
$mision_data[0] = mision_id
Reward_Items.each do |id, value|
if id == mision_id
case value[0]
when 'item'
item = $data_items[value[1]]
$game_party.gain_item(item.id, 1)
$mision_data[1] = item
when 'weapon'
weapon = $data_weapons[value[1]]
$game_party.gain_weapon(weapon.id, 1)
$mision_data[1] = weapon
when 'armor'
armor = $data_armors[value[1]]
$game_party.gain_armor(armor.id, 1)
$mision_data[1] = armor
end
end
$falcao_completed.push(mision_id)
end
#gold
Reward_Gold.each do |id, value|
if id == mision_id
$game_party.gain_gold(value)
$mision_data[2] = value
end
end
# Switch
Mision_Switch.each do |id, value|
if id == mision_id
$game_switches[value] = true
$game_map.need_refresh = true
end
end
Items_Needed.each do |id, value|
if id == mision_id
if $game_party.item_number(value[0]) < value[1]
$game_party.gain_item(value[0], value[1])
end
end
end
$mision_data[4] = true
$mision_data[3] = 40 * Pop_Mision_Time
Audio.me_play("Audio/Me/" + Play_Mision_Me)
end
end
end
class Font
alias falcaoBest_font initialize
def initialize
falcaoBest_font
if $scene.is_a?(Scene_Mision) or $mision_data[4]
self.name = "Georgia"
self.size = 20
end
end
end
class Misiones < Window_Base
include Tareas
def initialize
super(180, 64, 460, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 255
end
def refresh(mision_id)
self.contents.clear
@mision_id = mision_id
draw_grid(0,336)
draw_grid(225,336)
if $falcao_mision.include?(mision_id)
draw_mision_contents
else
self.contents.draw_text(-20, 100, self.width, 50, "No hay datos",1)
end
end
def draw_mision_contents
Nombre.each do |id, value|
if id == @mision_id
self.contents.font.color = Color.new(255, 120, 0, 255)
self.contents.draw_text(-20, 0, self.width, 50 , value,1)
end
end
Descripcion.each do |id, value|
if id == @mision_id
self.contents.font.color = system_color
self.contents.draw_text(0, 40, self.width, 50 , "Descripcion:")
self.contents.font.color = normal_color
self.contents.draw_text(0, 70, self.width, 50 , value[0])
self.contents.draw_text(0, 94, self.width, 50 , value[1])
self.contents.draw_text(0, 119, self.width, 50 , value[2])
end
end
Pasos.each do |id, value|
if id == @mision_id
self.contents.font.color = system_color
self.contents.draw_text(0, 165, self.width, 50 , "Tareas:")
self.contents.font.color = normal_color
self.contents.draw_text(0, 197, self.width, 50 ,'1- ' + value[0])
self.contents.draw_text(0, 222, self.width, 50 ,'2- ' + value[1])
end
end
Reward_Items.each do |id, value|
if id == @mision_id
case value[0]
when 'item'
item = $data_items[value[1]]
when 'weapon'
item = $data_weapons[value[1]]
when 'armor'
item = $data_armors[value[1]]
end
self.contents.font.color = system_color
self.contents.draw_text(0, 270, self.width, 50 , "Recompensa:")
self.contents.font.color = normal_color
icon = RPG::Cache.icon(item.icon_name) rescue nil
self.contents.blt(20, 344, icon, Rect.new(0, 0, 24, 24),255) rescue nil
self.contents.draw_text(50, 335, self.width, 50 , item.name)
end
end
Reward_Gold.each do |id, value|
if id == @mision_id
icon = RPG::Cache.icon("032-Item01") rescue nil
self.contents.blt(240, 344,icon,Rect.new(0, 0, 24, 24), 255) rescue nil
self.contents.draw_text(275, 335, self.width, 50,
"#{value.to_s} #{$data_system.words.gold}")
end
end
end
def draw_grid(x,y)
width = 200
color = system_color
self.contents.fill_rect(x+2, y-2, width-4, 1, color)
self.contents.fill_rect(x+1, y-1, width-2, 1, color)
self.contents.fill_rect(x, y, width, 1, color)
self.contents.fill_rect(x, y+1, 3, 45, color)
self.contents.fill_rect(x+ 197, y+1, 3, 45, color)
self.contents.fill_rect(x, y+45, width, 1, color)
self.contents.fill_rect(x+1, y+46, width-2, 1, color)
self.contents.fill_rect(x+2, y+47, width-4, 1, color)
end
end
class Mision_Indice < Window_Selectable
def initialize(x=0,y=0)
super(x, y, 180, 390)
@column_max = 1
refresh
self.index = 0
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in Tareas::Nombre.values
@data.push(i)
end
@item_max = @data.size
$all_quests = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
nombre = @data[index]
self.contents.font.color = normal_color
x, y = 4, index * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
if $falcao_mision.include?(index + 1)
self.contents.draw_text(x, y, 212, 32, nombre)
else
self.contents.font.color = disabled_color
self.contents.draw_text(x, y, 212, 32, "Bloqueado")
end
end
end
class Mision_Help < Window_Base
def initialize(x=0,y=0,ancho=640, alto=64)
super(x, y, ancho, alto)
self.contents = Bitmap.new(width - 32, height - 32)
end
def set_progress
self.contents.clear
self.contents.draw_text(0, 0, self.width, 32 , "Misiones")
mision = $falcao_mision.size
texto = "#{"Progreso"} #{mision * 100/$all_quests}%"
self.contents.draw_text(0, 30, self.width, 32 , texto)
end
def set_status(mision_id)
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, self.width, 32 , "Mision Status:")
if $falcao_mision.include?(mision_id)
draw_needed_items(mision_id)
if $falcao_completed.include?(mision_id)
self.contents.font.color = Color.new(128, 255, 128, 255)
self.contents.draw_text(120, 0, self.width, 32 , "Completada!")
else
self.contents.font.color = normal_color
self.contents.draw_text(120, 0, self.width, 32 , "En proceso")
end
else
self.contents.font.color = disabled_color
self.contents.draw_text(120, 0, self.width, 32 , "Bloqueada")
end
end
def draw_needed_items(mision_id)
Tareas::Items_Needed.each do |id, value|
if id == mision_id
draw_grid(280,1)
item = $data_items[value[0]]
icon = RPG::Cache.icon(item.icon_name) rescue nil
self.contents.blt(290, 3, icon, Rect.new(0, 0, 24, 24), 255) rescue nil
c = $game_party.item_number(item.id); n = value[1]; w = self.width
self.contents.draw_text(340, 0, w, 32,"#{c.to_s} / #{n.to_s}")
end
end
end
def draw_grid(x,y)
width = 150
color = system_color
self.contents.fill_rect(x+2, y-2, width-4, 1, color)
self.contents.fill_rect(x+1, y-1, width-2, 1, color)
self.contents.fill_rect(x, y, width, 1, color)
self.contents.fill_rect(x, y+1, 3, 30, color)
self.contents.fill_rect(x+ 147, y+1, 3, 30, color)
self.contents.fill_rect(x, y+30, width, 1, color)
self.contents.fill_rect(x+1, y+31, width-2, 1, color)
self.contents.fill_rect(x+2, y+32, width-4, 1, color)
end
end
class Pop_Mision < Window_Base
def initialize
super(170, 0, 300, 190)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Georgia"
self.contents.font.size = 20
self.opacity = 200
refresh
end
def refresh
self.contents.clear
data = $mision_data
return unless data[4]
self.contents.font.color = normal_color
if data[3] > 0; data[3] -= 1
Tareas::Nombre.each do |id, value|
if id == data[0]
self.contents.draw_text(-20, 0,self.width,32, "#{value} Completada!",1)
end
end
self.contents.font.color = system_color
self.contents.draw_text(0, 45, self.width, 32 , "Recompensas:")
#Items
self.contents.font.color = normal_color
if data[1] != nil
icon = RPG::Cache.icon(data[1].icon_name) rescue nil
self.contents.blt(0, 85, icon, Rect.new(0, 0, 24, 24), 255) rescue nil
self.contents.draw_text(35, 85, self.width, 32 , data[1].name)
end
#Gold
if data[2] != nil
icon = RPG::Cache.icon("032-Item01") rescue nil
if data[1] == nil
x = 35; y = 85
else
x = 40; y = 121
end
self.contents.blt(0, y, icon, Rect.new(0, 0, 24, 24), 255) rescue nil
self.contents.draw_text(x, y, self.width, 32,
"#{data[2].to_s} #{$data_system.words.gold}")
end
$mision_data = [nil, nil, nil, 0, false] if data[3] == 1
end
end
end
class Scene_Mision
def main
@indice_mision = Mision_Indice.new(0,90)
@misiones = Misiones.new
@misiones.refresh(@indice_mision.index + 1)
@title = Mision_Help.new(180,0,462)
@title.set_status(@indice_mision.index + 1)
@progress = Mision_Help.new(0,0,180,90)
@progress.set_progress
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@indice_mision.dispose
@misiones.dispose
@title.dispose
@progress.dispose
end
def update
@indice_mision.update
@mision = @indice_mision.index + 1
update_parametros
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
end
def update_parametros
@misiones.refresh(@mision)
@title.set_status(@mision)
end
end
class Scene_Map
include Tareas
alias falcao_mision_main main
def main
@mision_pop = Pop_Mision.new
$mision_data[4] ? @mision_pop.visible = true : @mision_pop.visible = false
falcao_mision_main
@mision_pop.dispose
end
alias falcao_mision_update update
def update
falcao_mision_update
if $mision_data[4]
@mision_pop.refresh
@mision_pop.visible = true
else
@mision_pop.visible = false
end
if Input.trigger?(Call_Mision) and !Disable_Mision_Call
$scene = Scene_Mision.new
return
end
end
end
class Scene_Save
alias falcao_write_mision write_save_data
def write_save_data(file)
falcao_write_mision(file)
Marshal.dump($falcao_mision, file)
Marshal.dump($falcao_completed, file)
Marshal.dump($mision_data, file)
end
end
class Scene_Load
alias falcao_read_mision read_save_data
def read_save_data(file)
falcao_read_mision(file)
$falcao_mision = Marshal.load(file)
$falcao_completed = Marshal.load(file)
$mision_data = Marshal.load(file)
end
end
if $game_party.item_number(i) > 0 and
$data_items[i].element_set.include? ($atr_ingrediente)
@data.push($data_items[i])
end
end
@item_max = @data.size
if @item_max > 0
for i in 0...@data.size
draw_item(@data[i], i) if not @data[i].nil?
end
end
end
#--------------------------------------------------------------------------
def draw_item(data, pos)
item = data
number = $game_party.item_number(item.id)
x = 0
y = 32 * pos
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
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
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
end