I found this script on the web earlier but don't know how to use it. Can anyone help?
# Keep_Items
#
#
module Keep_Items_Module
class Keep_Items
class Keep_Item
def initialize(name)
@name = name
@items = {}
@weapons = {}
@armors = {}
@gold = 0
end
def add_item(item)
@items[item.id] = [] if @items[item.id].nil?
@items[item.id].push item
end
def add_weapon(item)
@weapons[item.id] = [] if @weapons[item.id].nil?
@weapons[item.id].push item
end
def add_armor(item)
@armors[item.id] = [] if @armors[item.id].nil?
@armors[item.id].push item
end
def add(item)
case item
when RPG::Item
add_item item
when RPG::Weapon
add_weapon item
when RPG::Armor
add_armor item
end
end
def remove_item(item)
return if @items[item.id].nil?
@items[item.id].pop
end
def remove_weapon(item)
return if @weapons[item.id].nil?
@weapons[item.id].pop
end
def remove_armor(item)
return if @armors[item.id].nil?
@armors[item.id].pop
end
def remove(item)
case item
when RPG::Item
remove_item item
when RPG::Weapon
remove_weapon item
when RPG::Armor
remove_armor item
end
end
def item_number(id)
return @items[id].nil? ? 0 : @items[id].size
end
def weapon_number(id)
return @weapons[id].nil? ? 0 : @weapons[id].size
end
def armor_number(id)
return @armors[id].nil? ? 0 : @armors[id].size
end
def gold
return @gold
end
def gain_item(id,num)
(0...num).each {add_item $data_items[id]}
end
def gain_weapon(id,num)
(0...num).each {add_weapon $data_weapons[id]}
end
def gain_armor(id,num)
(0...num).each {add_armor $data_armors[id]}
end
def gain_gold(gold)
@gold += gold
end
def lose_item(id,num)
(0...num).each {remove_item $data_items[id]}
end
def lose_weapon(id,num)
(0...num).each {remove_weapon $data_weapons[id]}
end
def lose_armor(id,num)
(0...num).each {remove_armor $data_armors[id]}
end
def lose_gold(gold)
@gold -= gold
end
end
def initialize
@keep_items = {}
end
def [](name)
if @keep_items[name].nil?
@keep_items[name] = Keep_Item.new name
end
return @keep_items[name]
end
end
module Game_Party
def keep_items
if @keep_items.nil?
@keep_items = Keep_Items.new
end
return @keep_items
end
def swap_keep_item(name1,name2)
Keep_Items_Module.swap_keep_item(self,self.keep_items[name1])
Keep_Items_Module.swap_keep_item(self.keep_items[name2],self)
end
end
def swap_keep_item(keep_item_a,keep_item_b)
# ã,¢ã,¤ãƒ†ãƒ ã,'追åŠ
for i in 1...$data_items.size
num = keep_item_a.item_number(i)
if num > 0
keep_item_b.gain_item(i,num)
keep_item_a.lose_item(i,num)
end
end
for i in 1...$data_weapons.size
num = keep_item_a.weapon_number(i)
if num > 0
keep_item_b.gain_weapon(i,num)
keep_item_a.lose_weapon(i,num)
end
end
for i in 1...$data_armors.size
num = keep_item_a.armor_number(i)
if num > 0
keep_item_b.gain_armor(i,num)
keep_item_a.lose_armor(i,num)
end
end
gold = keep_item_a.gold
keep_item_b.gain_gold(gold)
keep_item_a.lose_gold(gold)
end
module_function :swap_keep_item
end # module Keep_Items_Module
class Game_Party
include Keep_Items_Module::Game_Party
end
# Keep_Items
# Scene_Framework
#
#
#
if true
#==============================================================================
# â– ã,·ãƒ¼ãƒ³ãƒ•レームワーã,¯
#==============================================================================
module Scene_Framework
module Window_Menu
NAME = 'name'
HELP = 'help'
PROC = 'proc'
def add_menu(name,menu_item)
@menu_list = [] if @menu_list.nil?
menu_item[NAME] = name
@menu_list.push menu_item
end
def menu_names
names = []
@menu_list.each {|menu| names.push menu[NAME]}
return names
end
def menu_call(index)
@menu_list[index][PROC].call if not @menu_list[index][PROC].nil?
end
def menu_help(index)
return @menu_list[index][HELP].nil? ? '' : @menu_list[index][HELP]
end
def input_c
menu_call(@index)
end
def start_active_window
self.index = 0
end
def help_text
return menu_help(@index)
end
def update_help
@help_window.set_text help_text
end
end
module Window_Module
def buzzer_se
# ブã,¶ãƒ¼ SE ã,'æ¼"å¥
$game_system.se_play($data_system.buzzer_se)
end
def decision_se
# 決定 SE ã,'æ¼"å¥
$game_system.se_play($data_system.decision_se)
end
def cancel_se
# ã,ャンã,»ãƒ« SE ã,'æ¼"å¥
$game_system.se_play($data_system.cancel_se)
end
def cursor_se
# ã,«ãƒ¼ã,½ãƒ« SE ã,'æ¼"å¥
$game_system.se_play($data_system.cursor_se)
end
def shop_se
# ã,·ãƒ§ãƒƒãƒ— SE ã,'æ¼"å¥
$game_system.se_play($data_system.shop_se)
end
def center
self.x = 640 / 2 - self.width / 2
self.y = 480 / 2 - self.height / 2
end
def cancel?
# B ボã,¿ãƒ³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
if Input.trigger?(Input::B)
cancel_se
return true
end
return false
end
def select?
# C ボã,¿ãƒ³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
return Input.trigger?(Input::C)
end
attr_reader :input_hander
def setup_default_input_hander
return if not @input_hander.nil?
@input_hander = {}
handers = {
Input::A => 'input_a',
Input::B => 'input_b',
Input::C => 'input_c',
Input::X => 'input_x',
Input::Y => 'input_y',
Input::Z => 'input_z',
Input::LEFT => 'input_left',
Input::RIGHT => 'input_right',
Input::UP => 'input_up',
Input::DOWN => 'input_down',
}
handers.each do |code,method_name|
if not self.methods.index(method_name).nil?
@input_hander[code] = self.method(method_name)
end
end
end
def input_b
cancel_se
$scene.back_window
end
def update_active_window
if @input_hander.nil?
setup_default_input_hander
end
input_hander.each do |code,method_name|
if Input.repeat?(code)
method_name.call
end
end
end
end
class Window_YesNo < Window_Command
include Scene_Framework::Window_Module
attr_accessor :select_proc
attr_accessor :cancel_proc
def initialize
super(100,['Select','Cancel'])
@select_proc = nil
@cancel_proc = nil
center
end
def yes?
return @index == 0
end
def no?
return @index == 1
end
def update_active_window
if cancel?
@cancel_proc.call if not cancel_proc.nil?
$scene.back_window
return
end
if select? and no?
@cancel_proc.call if not cancel_proc.nil?
cancel_se
$scene.back_window
return
end
if select? and yes?
@select_proc.call if not @select_proc.nil?
return
end
end
end
attr_reader :windows
#--------------------------------------------------------------------------
# åˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
@windows = {}
@active_windows = []
@visible_windows = []
end
#--------------------------------------------------------------------------
# ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®è¿½åŠ
#--------------------------------------------------------------------------
def add_window(name, window, visible = false)
@windows[name] = window
if visible
@visible_windows.push window
end
update_visibility
return window
end
#--------------------------------------------------------------------------
# 次ã®ã,¦ã,£ãƒ³ãƒ‰ã,¦
#--------------------------------------------------------------------------
def next_window(name)
active_window = windows[name]
@active_windows.push active_window
update_activity_window_z
if not active_window.methods.index('start_active_window').nil?
active_window.start_active_window
end
update_visibility
update_activity
end
#--------------------------------------------------------------------------
# 戻ã,‹
#--------------------------------------------------------------------------
def back_window
active_window = @active_windows[@active_windows.size - 1]
if not active_window.methods.index('end_active_window').nil?
active_window.end_active_window
end
@active_windows.pop
update_visibility
update_activity
end
#--------------------------------------------------------------------------
# 表示固定ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®è¨å®š
#--------------------------------------------------------------------------
def set_visible_window(name,visible=true)
if visible
if @visible_windows.index(windows[name]).nil?
@visible_windows.push windows[name]
end
else
@visible_windows.delete windows[name]
end
update_visibility
end
#--------------------------------------------------------------------------
# z index æ›´æ–°
#--------------------------------------------------------------------------
def update_activity_window_z
z = 100
@active_windows.each do |window|
window.z = z
z += 10
end
end
#--------------------------------------------------------------------------
# 表示状æ...‹æ›´æ–°
#--------------------------------------------------------------------------
def update_visibility
windows.each_value do |window|
window.visible = false
end
@visible_windows.each do |window|
window.visible = true
end
@active_windows.each do |window|
window.visible = true
end
end
#--------------------------------------------------------------------------
# ã,¢ã,¯ãƒ†ã,£ãƒ–状æ...‹æ›´æ–°
#--------------------------------------------------------------------------
def update_activity
windows.each_value do |window|
window.active = false
end
active_window = @active_windows[@active_windows.size - 1]
active_window.active = true if not active_window.nil?
end
#--------------------------------------------------------------------------
# メã,¤ãƒ³åˆæœŸå‡¦ç†
#--------------------------------------------------------------------------
def main_start
end
#--------------------------------------------------------------------------
# メã,¤ãƒ³å¾Œå‡¦ç†
#--------------------------------------------------------------------------
def main_end
windows.each_value do |window|
window.dispose
end
end
#--------------------------------------------------------------------------
# ã,¦ã,£ãƒ³ãƒ‰ã,¦æ›´æ–°
#--------------------------------------------------------------------------
def update_window
windows.each_value do |window|
window.update if window.visible
end
end
#--------------------------------------------------------------------------
# ã,¢ã,¯ãƒ†ã,£ãƒ–ã,¦ã,£ãƒ³ãƒ‰ã,¦å‡¦ç†
#--------------------------------------------------------------------------
def update_active_window
if @active_windows.empty?
$scene = Scene_Map.new
return
end
active_window = @active_windows[@active_windows.size - 1]
active_window.update_active_window
end
#--------------------------------------------------------------------------
# メã,¤ãƒ³å‡¦ç†
#--------------------------------------------------------------------------
def main
# メã,¤ãƒ³ã,¹ã,¿ãƒ¼ãƒˆ
main_start
# トランã,¸ã,·ãƒ§ãƒ³å®Ÿè¡Œ
Graphics.transition
# メã,¤ãƒ³ãƒ«ãƒ¼ãƒ—
loop do
# ã,²ãƒ¼ãƒ ç"»é¢ã,'æ›´æ–°
Graphics.update
# å...¥åŠ›æƒ...å ±ã,'æ›´æ–°
Input.update
# フレーム更新
update
# ç"»é¢ãŒåˆ‡ã,Šæ›¿ã,ã£ãŸã,‰ãƒ«ãƒ¼ãƒ—ã,'䏿–
if $scene != self
break
end
end
# トランã,¸ã,·ãƒ§ãƒ³æº–å,™
Graphics.freeze
# メã,¤ãƒ³ã,¨ãƒ³ãƒ‰
main_end
end
#--------------------------------------------------------------------------
# フレーム更新
#--------------------------------------------------------------------------
def update
# ã,¦ã,£ãƒ³ãƒ‰ã,¦ã,'æ›´æ–°
update_window
# ã,¢ã,¯ãƒ†ã,£ãƒ–ã,¦ã,£ãƒ³ãƒ‰ã,¦å‡¦ç†
update_active_window
end
end
end
# Scene_Framework
# Scene_Keep_Item
#
#
class Scene_Keep_Item
include Scene_Framework
class Main_Menu < Window_Command
include Scene_Framework::Window_Module
def initialize
super(160,['Storage','Remove','Cancel'])
@menu_hander = []
@menu_hander[0] = proc {decision_se; $scene.next_window :Item_Kind_Menu}
@menu_hander[1] = proc {decision_se; $scene.next_window :Item_Kind_Menu}
@menu_hander[2] = proc {cancel_se; $scene.back_window}
center
@help_window = $scene.windows[:Window_Help]
end
def start_active_window
@index = 0
end
def input_c
@menu_hander[@index].call
end
def push?
return @index == 0
end
def pop?
return @index == 1
end
def help_text
return "" if @index == 2
return @commands[@index]
end
def update_help
@help_window.set_text(help_text)
end
end
class Item_Kind_Menu < Window_Command
include Scene_Framework::Window_Module
def initialize
super(160,[
$data_system.words.item,
$data_system.words.weapon,
'Armor',
'Money',
'Cancel'
])
@menu_hander = []
@menu_hander[0] = proc {decision_se; $scene.next_window :Item_Select}
@menu_hander[1] = proc {decision_se; $scene.next_window :Item_Select}
@menu_hander[2] = proc {decision_se; $scene.next_window :Item_Select}
@menu_hander[3] = proc {decision_se; $scene.next_window :Gold_Number}
@menu_hander[4] = proc {cancel_se; $scene.back_window}
center
@help_window = $scene.windows[:Window_Help]
end
def start_active_window
@index = 0
end
def input_c
@menu_hander[@index].call
end
def item?
return @index == 0
end
def weapon?
return @index == 1
end
def armor?
return @index == 2
end
def help_text
return "" if @index == 4
return "#{@commands[@index]}ã,'#{$scene.windows[:Main_Menu].help_text}"
end
def update_help
@help_window.set_text(help_text)
end
end
#--------------------------------------------------------------------------
# â— ã,¢ã,¤ãƒ†ãƒ é¸æŠžã,¦ã,£ãƒ³ãƒ‰ã,¦
#--------------------------------------------------------------------------
class Item_Select < Window_Item
include Scene_Framework::Window_Module
def initialize
super
@keep_item = nil
@help_window = $scene.windows[:Window_Help]
end
def input_c
if not item.nil?
$scene.next_window :Item_Number
end
end
def item_number
return $scene.item_number(@keep_item,item)
end
def start_active_window
@index = 0
if $scene.windows[:Main_Menu].push?
@keep_item = $game_party
end
if $scene.windows[:Main_Menu].pop?
@keep_item = $scene.keep_item
end
refresh
end
#--------------------------------------------------------------------------
# â— ã,¢ã,¤ãƒ†ãƒ リフレッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_items
return if @keep_item.nil?
# ã,¢ã,¤ãƒ†ãƒ ã,'追åŠ
for i in 1...$data_items.size
if @keep_item.item_number(i) > 0
@data.push($data_items)
end
end
end
#--------------------------------------------------------------------------
# â— æ¦å™¨ãƒªãƒ•レッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_weapons
return if @keep_item.nil?
for i in 1...$data_weapons.size
if @keep_item.weapon_number(i) > 0
@data.push($data_weapons)
end
end
end
#--------------------------------------------------------------------------
# ◠防å...·ãƒªãƒ•レッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_armors
return if @keep_item.nil?
for i in 1...$data_armors.size
if @keep_item.armor_number(i) > 0
@data.push($data_armors)
end
end
end
#--------------------------------------------------------------------------
# â— å...¨ã¦ãƒªãƒ•レッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_all
refresh_items
refresh_weapons
refresh_armors
end
#--------------------------------------------------------------------------
# â— ã,³ãƒ³ãƒ†ãƒ³ãƒ,,リフレッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh_contents
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
end
end
#--------------------------------------------------------------------------
# ◠リフレッã,·ãƒ¥
#--------------------------------------------------------------------------
def refresh
@data = []
item_kind_menu = $scene.windows[:Item_Kind_Menu]
if item_kind_menu.item?
refresh_items
end
if item_kind_menu.weapon?
refresh_weapons
end
if item_kind_menu.armor?
refresh_armors
end
refresh_contents
draw_all
end
#--------------------------------------------------------------------------
# â— æç"»
#--------------------------------------------------------------------------
def draw_all
# é ...目数㌠0 ã§ãªã'ã,Œã°ãƒ"ットマップã,'作æˆã—ã€å...¨é ...ç›®ã,'æç"»
if @item_max > 0
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# â— é ...ç›®ã®æç"»
# index : é ...目番å·
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = @keep_item.item_number(item.id)
when RPG::Weapon
number = @keep_item.weapon_number(item.id)
when RPG::Armor
number = @keep_item.armor_number(item.id)
end
self.contents.font.color = normal_color
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.font.name = $fontface
self.contents.font.size = $fontsize
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
class Gold_Number < Window_InputNumber
include Scene_Framework::Window_Module
def initialize
super(9)
self.opacity = 255
center
@help_window = $scene.windows[:Window_Help]
end
def help_text
return "#{$scene.windows[:Item_Kind_Menu].help_text}"+
" (#{$scene.pop_keep_item.gold}#{$data_system.words.gold})"
end
def update
super
@help_window.set_text(help_text)
end
def input_c
if $scene.pop_keep_item.gold < number
buzzer_se
return
end
$scene.push_keep_item.gain_gold number
$scene.pop_keep_item.lose_gold number
decision_se
$scene.back_window
end
end
class Item_Number < Window_InputNumber
include Scene_Framework::Window_Module
def initialize
super(2)
self.opacity = 255
center
@help_window = $scene.windows[:Window_Help]
end
def help_text
item_select = $scene.windows[:Item_Select]
item = item_select.item
return "#{item.name} #{item_select.item_number}個"
end
def update
super
@help_window.set_text(help_text)
end
def input_c
item_select = $scene.windows[:Item_Select]
if item_select.item_number < number
buzzer_se
return
end
item = item_select.item
if ($scene.item_number($scene.push_keep_item,item) + number) > 99
buzzer_se
return
end
item_kind_menu = $scene.windows[:Item_Kind_Menu]
if item_kind_menu.item?
kind_name = 'item'
elsif item_kind_menu.weapon?
kind_name = 'weapon'
elsif item_kind_menu.armor?
kind_name = 'armor'
end
$scene.push_keep_item.method("gain_#{kind_name}").call(item.id,number)
$scene.pop_keep_item.method("lose_#{kind_name}").call(item.id,number)
item_select.refresh
decision_se
$scene.back_window
end
end
attr_reader :keep_item
def initialize(name)
super()
@keep_item = $game_party.keep_items[name]
end
def main_start
super
window = add_window(:Window_Help,Window_Help.new,true)
window = add_window(:Main_Menu,Main_Menu.new)
window = add_window(:Item_Kind_Menu,Item_Kind_Menu.new)
window = add_window(:Item_Select,Item_Select.new)
window = add_window(:Gold_Number,Gold_Number.new)
window = add_window(:Item_Number,Item_Number.new)
next_window(:Main_Menu)
end
def push_keep_item
main_menu = $scene.windows[:Main_Menu]
if main_menu.push?
return $scene.keep_item
end
if main_menu.pop?
return $game_party
end
return nil
end
def pop_keep_item
main_menu = $scene.windows[:Main_Menu]
if main_menu.push?
return $game_party
end
if main_menu.pop?
return $scene.keep_item
end
return nil
end
def item_number(keep_item,item)
case item
when RPG::Item
return keep_item.item_number(item.id)
when RPG::Weapon
return keep_item.weapon_number(item.id)
when RPG::Armor
return keep_item.armor_number(item.id)
end
return 0
end
module Event_Script
def check_room(name)
$scene = Scene_Keep_Item.new(name)
end
def check_room_run(name)
$scene = Scene_Keep_Item.new(name)
$scene.main
end
end
end
class Interpreter
include Scene_Keep_Item::Event_Script
end
# Scene_Keep_Item
Also, do you make your own scripts?
well, there needs to be a window script for it, this one says what the window does, however a window needs to exist.
you use a call script event.
def menu_call(index)
@menu_list[index][PROC].call if not
@menu_list[index][PROC].nil?
end
as of now, but it does nothing, because the window does not exist
he's right why didn't the maker make a window....
Perhaps the script is not supposed to make a window.
Maybe if you told us what it was supposed to do, then we'd have a better understanding of what might be wrong.
I'm assuming it makes a bank... considering it's called banking script...
Banks don't have to open windows. :roll:
ya, but for some reason the ting does nothing, perhaps if Syrathor2 posts where he found the script, we could find how to use it
of course that's what he was doing when he made this topic... we could always ask the author of the script however. :?
doi :lol: this person created a scene, and the windows. but I'm not familiar of how to call a module scene... also, the script is not in the correct order, and he's mixing scenes with widows and such, including bad syntax...
I have been looking for a banking script. Can anyone put this in order?
You don't need to use a script for a bank i've made a call event that works flawlessly. If you would like I can paste the Event image of the bank on here and you can go from there.
- #==============================================================================
# Banking System
#--------------------------------------------------------------------------
# Created By SephirothSpawn (12.03.05)
# Last Updated: 12.03.05
#==============================================================================
#==============================================================================
# ** Scene_Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias Command: New Game
#--------------------------------------------------------------------------
alias bank_command_new_game command_new_game
#--------------------------------------------------------------------------
# * Command: New Game
#--------------------------------------------------------------------------
def command_new_game
$game_bank = Game_BankSystem.new
bank_command_new_game
end
end
#==============================================================================
# ** Window_RefreshCommand
#==============================================================================
class Window_RefreshCommand < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# width : window width
# commands : command text string array
#--------------------------------------------------------------------------
def initialize(width, commands)
# Compute window height from command quantity
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(commands = @commands)
@commands = commands
@item_max = commands.size
if self.contents != nil
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(width - 32, @item_max * 32)
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# * Draw Item
# index : item number
# color : text color
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
self.contents.draw_text(0, 32 * index, self.contents.width - 8, 32, @commands[index], 1)
end
#--------------------------------------------------------------------------
# * Disable Item
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
#--------------------------------------------------------------------------
# * Undisable Item
# index : item number
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, normal_color)
end
end
#==============================================================================
# ** Game_BankSystem
#==============================================================================
class Game_BankSystem
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :account_balance
attr_accessor :interest_rate
attr_accessor :saving_bonds
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@account_balance = 0
@interest_rate = 1
@saving_bonds = []
@last_interest_time = 0
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Updates Deposited Amount
interest_time = (Graphics.frame_count / Graphics.frame_rate - @last_interest_time) / 3600.0
interest_amt = (@account_balance * @interest_rate / 100.0 * interest_time).to_i
if interest_amt > 0
@last_interest_time = Graphics.frame_count / Graphics.frame_rate
@account_balance += interest_amt
# Refreshes Data Windows
$scene.refresh_windows
end
end
#--------------------------------------------------------------------------
# * Deposit
#--------------------------------------------------------------------------
def deposit(amount)
$game_party.lose_gold(amount)
@account_balance += amount
end
#--------------------------------------------------------------------------
# * Withdraw
#--------------------------------------------------------------------------
def withdraw(amount)
@account_balance -= amount
$game_party.gain_gold(amount)
end
#--------------------------------------------------------------------------
# * Add Savings Bond
#--------------------------------------------------------------------------
def add_bond(bond)
@saving_bonds.push(bond)
@saving_bonds.sort! {|a, b| a.name <=> b.name}
end
end
#==============================================================================
# ** Savings_Bond
#==============================================================================
class Savings_Bond
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :name
attr_accessor :cost
attr_accessor :interest_rate
attr_accessor :length
attr_accessor :time_bought
attr_accessor :time_finished
attr_accessor :mature_value
#--------------------------------------------------------------------------
# * Object Initialization
# name : Savings Bond Name
# cost : Savings Bond Cost
# interest_rate : Savings Bond Interest Rate (In Percent)
# length : Length of Hours until Mature
#--------------------------------------------------------------------------
def initialize(name, cost, interest_rate, length)
@name = name
@cost = cost
@interest_rate = interest_rate
@length = length
@mature_value = (@cost * (1+ @interest_rate / 100.0)).to_i
end
#--------------------------------------------------------------------------
# * Set Times
#--------------------------------------------------------------------------
def set_times
@time_bought = Graphics.frame_count / Graphics.frame_rate
@time_finished = @time_bought + @length * 3600
end
#--------------------------------------------------------------------------
# * Make Time to HH:MM:SS
#--------------------------------------------------------------------------
def return_time(time)
hours = time / 60 / 60
minutes = time / 60 % 60
seconds = time % 60
return sprintf("%02d:%02d:%02d", hours, minutes, seconds)
end
end
#==============================================================================
# ** Window_BankNumber
#==============================================================================
class Window_BankNumber < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(640, 272, 240, 192)
self.opacity = 175
self.contents = Bitmap.new(width - 32, height - 32)
end
#--------------------------------------------------------------------------
# * Refresh
# money : Gold being...
# type : Deposit or Withdraw
#--------------------------------------------------------------------------
def refresh(money, type)
contents.clear
# Deposit or Withdraw
contents.font.color = system_color
contents.draw_text(0, 0, contents.width, 24, "Amount to #{type}", 1)
if type == "Deposit"
# Draws Game Party Gold
contents.draw_text(4, 48, contents.width, 24, "Current #{$data_system.words.gold}:")
contents.font.color = normal_color
contents.draw_text(-4, 48, contents.width, 24, $game_party.gold.to_s, 2)
else
# Draws Account Balance
contents.draw_text(4, 48, contents.width, 24, "Account Balance:")
contents.font.color = normal_color
contents.draw_text(-4, 48, contents.width, 24, $game_bank.account_balance.to_s, 2)
end
# Draws Money Being Deposited or Withdrawn
contents.font.color = system_color
contents.draw_text(4, 72, contents.width, 24, "#{type} Amount:")
contents.font.color = normal_color
contents.draw_text(-4, 72, contents.width, 24, "- #{money}", 2)
# Draws Line
line = ""
while contents.text_size(line).width < contents.width
line += "-"
end
contents.draw_text(0, 96, contents.width, 24, line, 2)
# Draws Game Party Gold Amont
contents.font.color = system_color
contents.draw_text(4, 112, contents.width, 32, "#{$data_system.words.gold} After:")
amount = $game_party.gold
amount += type == "Deposit" ? -money : money
contents.font.color = normal_color
contents.draw_text(-4, 112, contents.width, 32, amount.to_s, 2)
# Draws Deposit Amont
amount = $game_bank.account_balance
amount += type == "Deposit" ? money : -money
contents.font.color = system_color
contents.draw_text(4, 136, contents.width, 32, "Balance After:")
contents.font.color = normal_color
contents.draw_text(-4, 136, contents.width, 32, amount.to_s, 2)
end
end
#==============================================================================
# ** Window_BankBio
#==============================================================================
class Window_BankBio < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-240, 272, 240, 192)
self.opacity = 175
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
# Deposit or Withdraw
contents.font.color = system_color
# Draws Actor Name in Postition 1
contents.font.color = normal_color
contents.draw_text(0, 0, contents.width, 24, "#{$game_party.actors[0].name}", 1)
# Draws Game Party Gold
contents.font.color = system_color
contents.draw_text(4, 32, contents.width, 24, "Current #{$data_system.words.gold}:")
contents.font.color = normal_color
contents.draw_text(-4, 32, contents.width, 24, $game_party.gold.to_s, 2)
# Draws Account Balance
contents.font.color = system_color
contents.draw_text(4, 56, contents.width, 24, "Account Balance:")
contents.font.color = normal_color
contents.draw_text(-4, 56, contents.width, 24, $game_bank.account_balance.to_s, 2)
# Draws Number of Savings Bond's
contents.font.color = system_color
contents.draw_text(4, 80, contents.width, 24, "Bonds Owned:")
contents.font.color = normal_color
contents.draw_text(-4, 80, contents.width, 24, $game_bank.saving_bonds.size.to_s, 2)
# Draws Value of Savings Bond's
value = 0
$game_bank.saving_bonds.each { |x| value += x.mature_value}
contents.font.color = system_color
contents.draw_text(4, 104, contents.width, 24, "Bonds Value:")
contents.font.color = normal_color
contents.draw_text(-4, 104, contents.width, 24, value.to_s, 2)
# Draws Current Interest Rate
contents.font.color = system_color
contents.draw_text(4, 136, contents.width, 24, "Interest Rate:")
contents.font.color = normal_color
contents.draw_text(-4, 136, contents.width, 24, "#{$game_bank.interest_rate} %", 2)
end
end
#==============================================================================
# ** Window_Bond
#==============================================================================
class Window_Bond < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-240, 264, 240, 200)
self.opacity = 175
self.contents = Bitmap.new(width - 32, height - 32)
end
#--------------------------------------------------------------------------
# * Refresh
# bond : Savings Bond
#--------------------------------------------------------------------------
def refresh(bond, bought = false)
contents.clear
unless bond == nil
# Draws Bond Name
contents.font.color = system_color
contents.draw_text(0, 0, contents.width, 24, bond.name, 1)
# Draws Bond Cost
contents.font.color = system_color
contents.draw_text(4, 24, contents.width, 24, "Bond Cost:")
contents.font.color = normal_color
contents.draw_text(-4, 24, contents.width, 24, bond.cost.to_s, 2)
# Draws Bond Mature Value
contents.font.color = system_color
contents.draw_text(4, 48, contents.width, 24, "Mature Value:")
contents.font.color = normal_color
contents.draw_text(-4, 48, contents.width, 24, "#{bond.mature_value}", 2)
# Draws Bond Interest Rate
contents.font.color = system_color
contents.draw_text(4, 72, contents.width, 24, "Interest Rate:")
contents.font.color = normal_color
contents.draw_text(-4, 72, contents.width, 24, "#{bond.interest_rate} %", 2)
# Draws Length until Maturity
contents.font.color = system_color
contents.draw_text(4, 96, contents.width, 24, "Maturity Time:")
contents.font.color = normal_color
contents.draw_text(-4, 96, contents.width, 24, "#{bond.length} Hours", 2)
# Display only if Purchased CD
if bought
# Draws Time Bought
contents.font.color = system_color
contents.draw_text(4, 120, contents.width, 24, "Time Bought:")
contents.font.color = normal_color
contents.draw_text(-4, 120, contents.width, 24, bond.return_time(bond.time_bought), 2)
# Draws Time Finished
contents.font.color = system_color
contents.draw_text(4, 144, contents.width, 24, "Time Finished:")
contents.font.color = normal_color
contents.draw_text(-4, 144, contents.width, 24, bond.return_time(bond.time_finished), 2)
end
end
end
end
#==============================================================================
# ** Scene_Bank
#==============================================================================
class Scene_Bank
#--------------------------------------------------------------------------
# * Object Initialization
# interest rate : Changes Current Interest Rate (Leave 0 for no Change)
# bonds : Avaliable CD's For Purchasing
#--------------------------------------------------------------------------
def initialize(interest_rate = $game_bank.interest_rate,
bonds = [ Savings_Bond.new("CD-7", 100, 7.5, 7), Savings_Bond.new("CD-14", 500, 15, 14)])
$game_bank.interest_rate = interest_rate unless interest_rate == 0
@bonds = bonds
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Current Phase
@phase = -1
# Refreshing Variables
@amount, @depositing = 0, true
@current_bond, @bond_bought = nil, false
# Make sprite set
@spriteset = Spriteset_Map.new
# Help Window
@help_window = Window_Help.new
@help_window.y, @help_window.opacity = -64, 175
@help_window.set_text("Welcome to the Bank", 1)
# Bank Bio
@bank_bio_window = Window_BankBio.new
# Avaliable Bond Information Display Window
@av_bond_display_window = Window_Bond.new
# Owned Bond Information Display Window
@own_bond_display_window = Window_Bond.new
# Main Command
@main_command = Window_RefreshCommand.new(180, [
"Deposit #{g_word = $data_system.words.gold}",
"Withdraw #{g_word}", "Purchase Bond", "Get Mature Bond", "Exit"])
@main_command.x, @main_command.y, @main_command.opacity = 644, 272, 175
@main_command.active = false
# Bank Number Window
@bank_number_window = Window_BankNumber.new
# Avaliable Bonds Command
commands = []
@bonds.each {|x| commands.push(x.name)}; commands.push("Back")
@av_bond_command = Window_RefreshCommand.new(180, commands)
@av_bond_command.x, @av_bond_command.y = 644, 272
@av_bond_command.height, @av_bond_command.opacity = 192, 175
@av_bond_command.active = false
# CD's Have
@own_bond_command = Window_RefreshCommand.new(180, get_cd_list)
@own_bond_command.x, @own_bond_command.y = 644, 272
@own_bond_command.height, @own_bond_command.opacity = 192, 175
@own_bond_command.active = false
# Scene Objects
@objects = [@spriteset, @help_window, @bank_bio_window, @av_bond_display_window,
@own_bond_display_window, @main_command, @bank_number_window,
@av_bond_command, @own_bond_command]
# Execute transition
Graphics.transition
# Main loop
while $scene == self
# Update game screen
Graphics.update
# Update input information
Input.update
# Update Objects
@objects.each {|x| x.update}
# Updates Bank System
$game_bank.update
# Frame update
update
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@objects.each {|x| x.dispose}
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Splits Phases Up
case @phase
when -1 # Intro Phase
intro_update
when 0 # Main Phase
main_update
when 1 # Deposit or Withdraw Phase
account_update
when 2 # Buy CD Phase
buy_bond_update
when 3 # Get Mature CD Phse
get_bond_update
when 99 # Exit Phase
exit_update
end
end
#--------------------------------------------------------------------------
# * Intro Update
#--------------------------------------------------------------------------
def intro_update
# Moves Window Down
@help_window.y += 4 if @help_window.y < 0
if @help_window.y == 0
# Input Processing
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
# Returns to Scene
@phase = 99
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
# Switchs to Main Phase
@phase = 0
end
end
end
#--------------------------------------------------------------------------
# * Main Update
#--------------------------------------------------------------------------
def main_update
# Turns On Main Command
@main_command.active = true
# Turns Off Other Command Windows
@av_bond_command.active = @own_bond_command.active = false
# Moves In Active Windows
@bank_bio_window.z = @main_command.z = 9999
@bank_bio_window.x += 32 if @bank_bio_window.x < 16
@main_command.x -= 25 if @main_command.x > 444
# Moves Out Inactive Windows
@av_bond_display_window.x -= 32 if @av_bond_display_window.x > - 240
[@av_bond_display_window, @own_bond_display_window, @bank_number_window,
@av_bond_command, @own_bond_command].each {|window| window.z = 9995}
[@av_bond_command, @own_bond_command].each {|command|
command.x += 25 if command.x < 644}
@own_bond_display_window.x -= 25 if @own_bond_display_window.x > - 240
@bank_number_window.x += 32 if @bank_number_window.x < 640
# Sets Help Window
case @main_command.index
when 0; @help_window.set_text("Deposit Money Into your Account", 1)
when 1; @help_window.set_text("Withdraw Money From your Account", 1)
when 2; @help_window.set_text("Purchase a Savings Bond", 1)
when 3; @help_window.set_text("Take Out Mature Savings Bond", 1)
when 4; @help_window.set_text("Exit Bank", 1)
end
# Input Processing
if Input.trigger?(Input::B) # Returns to Map
$game_system.se_play($data_system.cancel_se)
@phase = 99
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
case @main_command.index
when 0 # Deposit
@amount, @depositing = 0, true
refresh_windows
@help_window.set_text("Deposit #{@amount} #{$data_system.words.gold}", 1)
@phase = 1
when 1 # Withdraw
@amount, @depositing = 0, false
refresh_windows
@help_window.set_text("Withdraw #{@amount} #{$data_system.words.gold}", 1)
@phase = 1
when 2 # Buy CD
@current_bond = @bonds[@av_bond_command.index]
@bond_bought = false
refresh_windows
@phase = 2
when 3 # Get CD
@current_bond = $game_bank.saving_bonds[@own_bond_command.index]
@bond_bought = true
refresh_windows
@phase = 3
when 4 # Exit Bank
@phase = 99
end
end
end
#--------------------------------------------------------------------------
# * Accpunt Update
#--------------------------------------------------------------------------
def account_update
# Turns Off Command Windows
@main_command.active = @av_bond_command.active = @own_bond_command.active = false
# Moves In Active Windows
@bank_bio_window.z = @bank_number_window.z = 9999
@bank_bio_window.x += 32 if @bank_bio_window.x < 16
@bank_number_window.x -= 32 if @bank_number_window.x > 384
# Moves Out Inactive Windows
@av_bond_display_window.z = @own_bond_display_window.z =
@main_command.z = @av_bond_command.z = @own_bond_command.z = 9995
@av_bond_display_window.x -= 32 if @av_bond_display_window.x > - 240
[@own_bond_display_window].each {|window| window.x -= 25 if window.x > - 240}
[@main_command, @av_bond_command, @own_bond_command].each {|command|
command.x += 25 if command.x < 644}
# Input Processing
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@phase = 0
elsif Input.trigger?(Input::C)
$game_system.se_play($data_system.shop_se)
if @depositing
$game_bank.deposit(@amount)
refresh_windows
@phase = 0
else
$game_bank.withdraw(@amount)
refresh_windows
@phase = 0
end
elsif Input.repeat?(Input::LEFT) && Input.press?(Input::LEFT)
if @amount > 0
$game_system.se_play($data_system.cursor_se)
@amount -= 1
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
elsif Input.repeat?(Input::RIGHT) && Input.press?(Input::RIGHT)
if @depositing
if @amount < $game_party.gold
$game_system.se_play($data_system.cursor_se)
@amount += 1
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
else
if @amount < $game_bank.account_balance
$game_system.se_play($data_system.cursor_se)
@amount += 1
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
end
elsif Input.repeat?(Input::UP) && Input.press?(Input::UP)
if @amount == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.cursor_se)
@amount > 10 ? @amount -= 10 : @amount = 0
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
end
elsif Input.repeat?(Input::DOWN) && Input.press?(Input::DOWN)
if @depositing
if @amount < $game_party.gold
$game_system.se_play($data_system.cursor_se)
@amount < $game_party.gold - 10 ? @amount += 10 : @amount = $game_party.gold
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
else
if @amount < $game_bank.account_balance
$game_system.se_play($data_system.cursor_se)
@amount < $game_bank.account_balance - 10 ? @amount += 10 : @amount = $game_bank.account_balance
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
end
elsif Input.repeat?(Input::L) && Input.press?(Input::L)
if @amount == 0
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.cursor_se)
@amount > 100 ? @amount -= 100 : @amount = 0
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
end
elsif Input.repeat?(Input::R) && Input.press?(Input::R)
if @depositing
if @amount < $game_party.gold
$game_system.se_play($data_system.cursor_se)
@amount < $game_party.gold - 100 ? @amount += 100 : @amount = $game_party.gold
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
else
if @amount < $game_bank.account_balance
$game_system.se_play($data_system.cursor_se)
@amount < $game_bank.account_balance - 100 ? @amount += 100 : @amount = $game_bank.account_balance
refresh_windows
@help_window.set_text("#{@depositing ? 'Deposit' : 'Withdraw'} #{@amount} #{$data_system.words.gold}", 1)
else
$game_system.se_play($data_system.buzzer_se)
end
end
end
end
#--------------------------------------------------------------------------
# * Buy Bond Update
#--------------------------------------------------------------------------
def buy_bond_update
# Turns On Avaliable Bond Window
@av_bond_command.active = true
# Turns Off Other Command Windows
@main_command.active = @own_bond_command.active = false
# Moves In Active Windows
@av_bond_display_window.z = @av_bond_command.z = 9999
@av_bond_display_window.x += 32 if @av_bond_display_window.x < 16
@av_bond_command.x -= 25 if @av_bond_command.x > 444
# Moves Out Inactive Windows
[@bank_bio_window, @bank_number_window, @own_bond_display_window,
@main_command, @own_bond_command].each {|window| window.z = 9995}
@bank_bio_window.x -= 32 if @bank_bio_window.x > - 240
@bank_number_window.x += 32 if @bank_number_window.x < 640
@own_bond_display_window.x -= 25 if @own_bond_display_window.x > - 240
[@main_command, @own_bond_command].each {|command| command.x += 25 if command.x < 644}
# Input Processing
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@phase = 0
elsif Input.trigger?(Input::C)
if @av_bond_command.index == @bonds.size
$game_system.se_play($data_system.cancel_se)
@phase = 0
else
current_bond = @bonds[@av_bond_command.index].dup
if current_bond.cost > $game_party.gold
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
$game_party.lose_gold(current_bond.cost)
current_bond.set_times
$game_bank.add_bond(current_bond)
refresh_windows
@phase = 0
end
end
# Updates Current Bond
elsif Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@current_bond = @bonds[@av_bond_command.index]
refresh_windows
end
end
#--------------------------------------------------------------------------
# * Get Bond Update
#--------------------------------------------------------------------------
def get_bond_update
# Turns On Avaliable Bond Window
@own_bond_command.active = true
# Turns Off Other Command Windows
@main_command.active = @av_bond_command.active = false
# Moves In Active Windows
[@own_bond_display_window, @own_bond_command].each {|window| window.z = 9999}
@own_bond_display_window.x += 32 if @own_bond_display_window.x < 16
@own_bond_command.x -= 25 if @own_bond_command.x > 444
# Moves Out Inactive Windows
[@bank_bio_window, @av_bond_display_window, @main_command, @bank_number_window,
@av_bond_command].each {|window| window.z = 9995}
[@bank_bio_window, @av_bond_display_window].each {|window|
window.x -= 32 if window.x > - 240}
[@main_command, @av_bond_command].each {|window|
window.x += 25 if window.x < 640}
@bank_number_window.x += 32 if @bank_number_window.x < 640
# Input Processing
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@phase = 0
elsif Input.trigger?(Input::C)
if @own_bond_command.index == $game_bank.saving_bonds.size
$game_system.se_play($data_system.cancel_se)
@phase = 0
else
current_bond = $game_bank.saving_bonds[@own_bond_command.index]
if current_bond.time_finished > Graphics.frame_count / Graphics.frame_rate
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text("Savings Bond Not Mature Yet!", 1)
else
$game_system.se_play($data_system.decision_se)
$game_party.gain_gold(current_bond.mature_value)
$game_bank.saving_bonds.delete_at[@own_bond_command.index]
refresh_windows
@phase = 0
end
end
elsif Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@current_bond = $game_bank.saving_bonds[@own_bond_command.index]
refresh_windows
end
end
#--------------------------------------------------------------------------
# * Exit Update
#--------------------------------------------------------------------------
def exit_update
# Moves Out Windows
@help_window.y -= 4 if @help_window.y > - 64
[@bank_bio_window, @av_bond_display_window].each {|window| window.x -= 32 if window.x > - 240}
[@own_bond_display_window].each {|window| window.x -= 25 if window.x > - 240}
[@main_command, @bank_number_window, @av_bond_command,
@own_bond_command].each {|window| window.x += 25 if window.x < 640}
# Checks To Make Sure All Windows Are Out
if @help_window.y <= - 64 && @bank_bio_window.x <= - 240 && @av_bond_display_window.x <= - 240 &&
@own_bond_display_window.x <= - 240 && @main_command.x >= 644 &&
@bank_number_window.x >= 640 && @av_bond_command.x >= 640 && @own_bond_command.x >= 640
$scene = Scene_Map.new
end
end
#--------------------------------------------------------------------------
# * Get CD List
#--------------------------------------------------------------------------
def get_cd_list
commands = []
$game_bank.saving_bonds.each {|x| commands.push(x.name)}
commands.push("Back")
return commands
end
#--------------------------------------------------------------------------
# * Refresh Windows
#--------------------------------------------------------------------------
def refresh_windows
@bank_bio_window.refresh
@av_bond_display_window.refresh(@current_bond, @bond_bought)
@own_bond_display_window.refresh(@current_bond, @bond_bought)
@bank_number_window.refresh(@amount, @depositing ? "Deposit" : "Withdraw")
@own_bond_command.refresh(get_cd_list)
end
end
here is a banking script only for money
if you want to call it you must make a event with a script in it that says
$scene = Scene_Bank.new
Why don´t you just make it with events? It´s a lot more simple.
dis one has rent and that sort of stuf
I´d say, it´s a LITTLE bit exaggarated to make an entire script for a banking system that could have been completely done with only one common event and one variable in less than half an hour. Sorry, but that´s my opinion. And you could have added tons of other additional functions with maybe only a few more variables.
This script rocks!
Next time put it in a code box by hitting the code box number symbol thingy... ;D