Jump to content
Rpg²S Forum

*GINO_BankSystem XP


Guest gino
 Share

Recommended Posts

Guest gino

GINO_BankSystem XP

Descrizione


Permette di creare una banca che oltre al normale deposita\ritira (serve veramente a qualcosa?), aggiunge la possibilità di investire il denaro in due modi. Uno è basato sui passi percorsi dal party, uno sul tempo passato dall'inizio dell'investimento.


Autore


gino


Allegati


Chi senza demo non capisce come funziona non merita nemmeno di leggerne il codice!


Istruzioni per l'uso


inserite lo script nella sezione Materials. Per aprire la banca inserite il codice

$scene = Scene_Bank.new

in un evento tramite CallScript. Lo script legge automaticamente il nome della moneta corrente da sistema. La prima parte dello script permette di editare le scritte e le variabili usate.

 

 

#===============================================================================
# GINO_BankSystem
#===============================================================================
#
# Put the command: 
# $scene = Scene_Bank.new 
# in CallScript inside an event.
#
#===============================================================================

#===============================================================================
# EDIT HERE
#===============================================================================

module BANK
	
	#Commands' Text
	CMDTEXT = ["Deposita", #0
	"Ritira", #1
	"Investi", #2
	"Disinvesti", #3
	"Esci", #4
	"Sì", #5
	"No", #6
	"Step's Bros.", #7
	"Clock&Watch", #8
	]
	
	#Messages' Text
	MSGTEXT = ["Come posso aiutarla?", #0
	"Quanto vuole depositare?", #1
	"Sei sicuro di depositare % &?", #2
	"Spiacente, ma lei non ha % & da depositare!", #3
	"Grazie. Il suo denaro è stato depositato con successo.", #4
	"Quanto vuoi ritirare?", #5
	"Sei sicuro di voler ritirare % &?", #6
	"Grazie. Il suo denaro è stato ritirato con successo.", #7
	"Scegli quali azioni intendi comprare.", #8
	"Acquista azioni Step's Bros. Costo unitario = 100 &", #9
	"Acquista azioni Clock&Watch. Costo unitario = 100 %", #10
	"Spiacente, ma lei non ha % & da investire!", #11
	"Grazie. Il suo denaro è stato investito con successo.", #12
	"Scegli quali azioni intendi disinvestire.", #13
	"Quante azioni Step's Bros vuoi disinvestire?", #14
	"Quante azioni Clock&Watch vuoi disinvestire?", #15
	"Confermi l'acquisto di % azioni Step's Bros.?", #16
	"Confermi l'acquisto di % azioni Clock&Watch?", #17
	"Grazie. Il suo denaro è stato disinvestito con successo.", #18
	"Spiacente, ma lei non ha % & da ritirare!", #19
	"Confermi la vendita di % azioni Step's Bros.?", #20
	"Confermi la vendita di % azioni Clock&Watch?", #21
	"Non possiedi % azioni della Step's Bros.!", #22
	"Non possiedi % azioni della Clock&Watch!", #23
	]
	
	#Helps' Text
	HELPTEXT = ["Posseduti", #0
	"Depositati", #1
	"Step's Bros.", #2
	"Clock&Watch", #3
	"Investiti", #4
	]
	
	#Storage Variables
	MEMORIZE = 19 #Temporarily stores gold involved in transation
	DEPOSIT = 20 #Stores gold deposited in bank
	SSTOCKS = 25 #Stores number of Step Stocks
	TSTOCKS = 26 #Stores number of Time Stocks
	SSTEPS = 23 #Stores initial Stepcount
	TGT = 24 #Stores initial Gametime
	
end
#===============================================================================
# CAN'T TOUCH BELOW THIS LINE
#===============================================================================

#===============================================================================
# Window_Bank
#===============================================================================
class Window_Bank < Window_Base
	
	def initialize(x, y, width, heigth)
		super(x, y, width, heigth)
		self.contents = Bitmap.new(width - 32, height - 32)
		self.contents.font.name = $fontface
		self.contents.font.size = $fontsize
	end
	
	def draw_currency_value(value, x, y, width)
		cx = contents.text_size($data_system.words.gold).width
		self.contents.font.color = normal_color
		self.contents.draw_text(x, y, width-cx-2, 24, value.to_s, 2)
		self.contents.font.color = system_color
		self.contents.draw_text(x, y, width, 24, $data_system.words.gold, 2)
	end
	
end

#===============================================================================
# Window_BankMessage
#===============================================================================
class Window_BankMessage < Window_Bank
	
	def initialize(message)
		super(0, 0, 640, 64)
		@message = message
		refresh
	end
	
	def refresh
		self.contents.draw_text(0, 0, 608, 24, @message, 1)
	end
	
end

#===============================================================================
# Window_InHand
#===============================================================================
class Window_InHand < Window_Bank
	
	def initialize
		super(0, 0, 160, 86)
		refresh
	end
	
	def refresh
		self.contents.clear
		self.contents.font.color = system_color
		self.contents.draw_text(0, 0, 136, 24, BANK::HELPTEXT[0], 0)
		self.contents.font.color = normal_color
		draw_currency_value($game_party.gold, 4, 32, 120)
	end
	
end

#===============================================================================
# Window_InBank
#===============================================================================
class Window_InBank < Window_Bank
	
	def initialize
		super(0, 0, 160, 86)
		refresh
	end
	
	def refresh
		self.contents.clear
		self.contents.font.color = system_color
		self.contents.draw_text(0, 0, 136, 24, BANK::HELPTEXT[1], 0)
		self.contents.font.color = normal_color
		draw_currency_value($game_variables[bANK::DEPOSIT], 4, 32, 120)
	end
	
end

#===============================================================================
# Window_SInvested
#===============================================================================
class Window_SInvested < Window_Bank
	
	def initialize
		super(0, 0, 160, 86)
		refresh
	end
	
	def refresh
		self.contents.clear
		self.contents.font.color = system_color
		self.contents.draw_text(0, 0, 136, 24, BANK::HELPTEXT[2], 0)
		self.contents.font.color = normal_color
		tot = $game_variables[bANK::SSTOCKS] * 100
		draw_currency_value(tot, 4, 32, 120)
	end
	
end

#===============================================================================
# Window_TInvested
#===============================================================================
class Window_TInvested < Window_Bank
	
	def initialize
		super(0, 0, 160, 86)
		refresh
	end
	
	def refresh
		self.contents.clear
		self.contents.font.color = system_color
		self.contents.draw_text(0, 0, 136, 24, BANK::HELPTEXT[3], 0)
		self.contents.font.color = normal_color
		tot = $game_variables[bANK::TSTOCKS] * 100
		draw_currency_value(tot, 4, 32, 120)
	end
	
end

#===============================================================================
# Window_AllInvested
#===============================================================================
class Window_AllInvested < Window_Bank
	
	def initialize
		super(0, 0, 160, 86)
		refresh
	end
	
	def refresh
		self.contents.clear
		self.contents.font.color = system_color
		self.contents.draw_text(0, 0, 136, 24, BANK::HELPTEXT[4], 0)
		self.contents.font.color = normal_color
		tot = ($game_variables[bANK::SSTOCKS] + $game_variables[bANK::TSTOCKS]) * 100
		draw_currency_value(tot, 4, 32, 120)
	end
	
end

#===============================================================================
# Window_BankInput
#===============================================================================
class Window_BankInput < Window_Bank
	
	def initialize
		super(0, 0, 190, 64)
		@number = 0
		@digits_max = 6
		@index = 0
		self.opacity = 0
		self.active = false
		self.z += 9999
		refresh
		update_cursor
	end
	
	def number
		return @number
	end
	
	def number=(number)
		@number = [[number, 0].max, 10 ** @digits_max - 1].min
		@index = 0
		refresh
	end
	
	def digits_max
		return @digits_max
	end
	
	def digits_max=(digits_max)
		@digits_max = digits_max
		refresh
	end
	
	def cursor_right(wrap)
		if @index < @digits_max - 1 or wrap
			@index = (@index + 1) % @digits_max
		end
	end
	
	def cursor_left(wrap)
		if @index > 0 or wrap
			@index = (@index + @digits_max - 1) % @digits_max
		end
	end
	
	def update
		super
		if self.active
			if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
				$game_system.se_play($data_system.decision_se)
				place = 10 ** (@digits_max - 1 - @index)
				n = @number / place % 10
				@number -= n * place
				n = (n + 1) % 10 if Input.repeat?(Input::UP)
				n = (n + 9) % 10 if Input.repeat?(Input::DOWN)
				@number += n * place
				refresh
			end
			last_index = @index
			if Input.repeat?(Input::RIGHT)
				cursor_right(Input.trigger?(Input::RIGHT))
			end
			if Input.repeat?(Input::LEFT)
				cursor_left(Input.trigger?(Input::LEFT))
			end
			if @index != last_index
				$game_system.se_play($data_system.decision_se)
			end
			update_cursor
		end
	end
	
	def refresh
		self.contents.clear
		self.contents.font.color = normal_color
		s = sprintf("%0*d", @digits_max, @number)
		for i in 0...@digits_max
			self.contents.draw_text(24 + i * 16, 0, 16, 24, s[i,1], 1)
		end
	end
	
	def update_cursor
		self.cursor_rect.set(24 + @index * 16, 0, 16, 24)
	end
end

#===============================================================================
# Scene_Bank
#===============================================================================
class Scene_Bank
	
	def terminate
		
		@command_window.dispose
		@main.dispose
		@inhand.dispose
		@inbank.dispose
		@allinvested.dispose
	end
	
	def update
		@command_window.update
		if @command_window.active
			update_command
		end
	end
	
	def create_main_windows
		@main = Window_BankMessage.new(BANK::MSGTEXT[0])
		@inhand = Window_InHand.new
		@inhand.y = (480 - @inhand.height)
		@inbank = Window_InBank.new
		@inbank.x = @inhand.width
		@inbank.y = (480 - @inbank.height)
		@allinvested = Window_AllInvested.new
		@allinvested.x = @inhand.width + @inbank.width
		@allinvested.y = (480 - @allinvested.height)
	end
	
	def create_command_window
		@command_window = Window_Command.new(160, [bANK::CMDTEXT[0], BANK::CMDTEXT[1], BANK::CMDTEXT[2], BANK::CMDTEXT[3], BANK::CMDTEXT[4]])
		@command_window.index = 0
		@command_window.y = @main.y + @main.height
	end
	
	def update_command
		if Input.trigger?(Input::B)
			$scene = Scene_Map.new
		elsif Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			case @command_window.index
			when 0
				$scene = Scene_Deposit.new
			when 1
				$scene = Scene_Withdraw.new
			when 2
				$scene = Scene_PreInvest.new
			when 3
				$scene = Scene_PreDivest.new
			when 4
				$scene = Scene_Map.new
			end
		end
	end
	
	def main
		create_main_windows
		create_command_window
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end

#===============================================================================
# Scene_Deposit
#===============================================================================
class Scene_Deposit
	
	def terminate
		@number_window.dispose
		@main.dispose
	end
	
	def update
		@number_window.update
		if Input.trigger?(Input::B)
			$scene = Scene_Bank.new
		elsif Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			$game_variables[bANK::MEMORIZE] = @number_window.number
			$scene = Scene_Confirm.new(1)
		end
	end
	
	def create_main_windows
		@main = Window_BankMessage.new(BANK::MSGTEXT[1])
		@number_window = Window_BankInput.new
		@number_window.digits_max = 7
		@number_window.active = true
		@number_window.number = $game_variables[bANK::DEPOSIT]
		@number_window.opacity = 255
		@number_window.y = @main.height
	end
	
	def main
		create_main_windows
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end

#===============================================================================
# Scene_Withdraw
#===============================================================================
class Scene_Withdraw
	
	def terminate
		@number_window.dispose
		@main.dispose
	end
	
	def update
		@number_window.update
		if Input.trigger?(Input::B)
			$scene = Scene_Bank.new
		elsif Input.trigger?(Input::C)
			$game_variables[bANK::MEMORIZE] = @number_window.number
			$scene = Scene_Confirm.new(2)
		end
	end
	
	def create_main_windows
		@main = Window_BankMessage.new(BANK::MSGTEXT[5])
		@number_window = Window_BankInput.new
		@number_window.digits_max = 7
		@number_window.active = true
		@number_window.number = $game_variables[bANK::DEPOSIT]
		@number_window.opacity = 255
		@number_window.y = @main.height
	end
	
	def main
		create_main_windows
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end

#===============================================================================
# Scene_PreInvest
#===============================================================================
class Scene_PreInvest
	
	def terminate
		@command_window.dispose
		@main.dispose
		@sinvested.dispose
		@tinvested.dispose
	end
	
	def update
		@command_window.update
		if @command_window.active
			update_command
		end
	end
	
	def create_main_windows
		@main = Window_BankMessage.new(BANK::MSGTEXT[8])
		@sinvested = Window_SInvested.new
		@sinvested.y = (480 - @sinvested.height)
		@tinvested = Window_TInvested.new
		@tinvested.x = @sinvested.width
		@tinvested.y = (480 - @tinvested.height)
	end
	
	def create_command_window
		@command_window = Window_Command.new(180, [bANK::CMDTEXT[7], BANK::CMDTEXT[8], BANK::CMDTEXT[4]])
		@command_window.index = 0
		@command_window.y = @main.y + @main.height
	end
	
	def update_command
		if Input.trigger?(Input::B)
			$scene = Scene_Bank.new
		elsif Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			case @command_window.index
			when 0
				$scene = Scene_Invest.new(1)
			when 1
				$scene = Scene_Invest.new(2)
			when 2
				$scene = Scene_Bank.new
			end
		end
	end
	
	def main
		create_main_windows
		create_command_window
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end

#===============================================================================
# Scene_PreDivest
#===============================================================================
class Scene_PreDivest
	
	def start
		create_command_window
	end
	
	def terminate
		@command_window.dispose
		@main.dispose
		@sinvested.dispose
		@tinvested.dispose
	end
	
	def update
		@command_window.update
		if @command_window.active
			update_command
		end
	end
	
	def create_main_windows
		@main = Window_BankMessage.new(BANK::MSGTEXT[13])
		@sinvested = Window_SInvested.new
		@sinvested.y = (480 - @sinvested.height)
		@tinvested = Window_TInvested.new
		@tinvested.x = @sinvested.width
		@tinvested.y = (480 - @tinvested.height)
	end
	
	def create_command_window
		@command_window = Window_Command.new(160, [bANK::CMDTEXT[7], BANK::CMDTEXT[8], BANK::CMDTEXT[4]])
		@command_window.index = 0
		@command_window.y = @main.y + @main.height
		#semi-transparent button if there's no stock
		@command_window.disable_item(0) if $game_variables[bANK::SSTOCKS] == 0
		@command_window.disable_item(1) if $game_variables[bANK::TSTOCKS] == 0
		#@@
	end
	
	def update_command
		if Input.trigger?(Input::B)
			$scene = Scene_Map.new
		elsif Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			case @command_window.index
			when 0
				if $game_variables[bANK::SSTOCKS] != 0
					$scene = Scene_Divest.new(1)
				else
					$game_system.se_play($data_system.buzzer_se)
				end
			when 1
				if $game_variables[bANK::TSTOCKS] != 0
					$scene = Scene_Divest.new(2)
				else
					$game_system.se_play($data_system.buzzer_se)
				end
			when 2
				$scene = Scene_Bank.new
			end
		end
	end
	
	def main
		create_main_windows
		create_command_window
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end

#===============================================================================
# Scene_Invest
#===============================================================================
class Scene_Invest
	
	def initialize(scene)
		@scene = scene
	end
	
	def terminate
		@main.dispose
		@sinvested.dispose
		@tinvested.dispose
		@number_window.dispose
	end
	
	def update
		@number_window.update
		if Input.trigger?(Input::B)
			$scene = Scene_PreInvest.new
		elsif Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			$game_variables[bANK::MEMORIZE] = @number_window.number
			$scene = Scene_Confirm.new(2 + @scene)
		end
	end
	
	def create_main_windows
		if @scene == 1 #Step Invest
			@main = Window_BankMessage.new(BANK::MSGTEXT[9].gsub(/&/) {$data_system.words.gold})
			@number_window = Window_BankInput.new
			@number_window.digits_max = 5
			@number_window.active = true
			@number_window.number = 0
			@number_window.opacity = 255
			@number_window.y = @main.height
		elsif @scene == 2 #Time Invest
			@main = Window_BankMessage.new(BANK::MSGTEXT[10].gsub(/%/) {$data_system.words.gold})
			@number_window = Window_BankInput.new
			@number_window.digits_max = 5
			@number_window.active = true
			@number_window.number = 0
			@number_window.opacity = 255
			@number_window.y = @main.height
		end
		@sinvested = Window_SInvested.new
		@sinvested.y = (480 - @sinvested.height)
		@tinvested = Window_TInvested.new
		@tinvested.x = @sinvested.width
		@tinvested.y = (480 - @tinvested.height)
	end
	
	def main
		create_main_windows
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end #class

#===============================================================================
# Scene_Divest
#===============================================================================
class Scene_Divest
	
	def initialize(scene)
		@scene = scene
	end
	
	def terminate
		@main.dispose
		@sinvested.dispose
		@tinvested.dispose
		@number_window.dispose
	end
	
	def update
		@number_window.update
		if Input.trigger?(Input::B)
			$scene = Scene_PreDivest.new
		elsif Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			$game_variables[bANK::MEMORIZE] = @number_window.number
			$scene = Scene_Confirm.new(4 + @scene)
		end
	end
	
	def create_main_windows
		if @scene == 1 #Step Divest
			@main = Window_BankMessage.new(BANK::MSGTEXT[14])
			@number_window = Window_BankInput.new
			@number_window.digits_max = 5
			@number_window.active = true
			@number_window.number = 0
			@number_window.opacity = 255
			@number_window.y = @main.height
		elsif @scene == 2 #Time Divest
			@main = Window_BankMessage.new(BANK::MSGTEXT[15])
			@number_window = Window_BankInput.new
			@number_window.digits_max = 5
			@number_window.active = true
			@number_window.number = 0
			@number_window.opacity = 255
			@number_window.y = @main.height
		end
		@sinvested = Window_SInvested.new
		@sinvested.y = (480 - @sinvested.height)
		@tinvested = Window_TInvested.new
		@tinvested.x = @sinvested.width
		@tinvested.y = (480 - @tinvested.height)
	end
	
	def main
		create_main_windows
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end #class

#===============================================================================
# Scene_Confirm
#===============================================================================
class Scene_Confirm
	
	def get_time_int(stocks)
		time = Graphics.frame_count / Graphics.frame_rate - $game_variables[bANK::TGT]
		return (time / 144) * stocks
	end
	
	def get_step_int(stocks)
		steps = $game_party.steps - $game_variables[bANK::SSTEPS]
		return (steps / 288) * stocks
	end
	
	def initialize(scene)
		@scene = scene
		@wait_count = 0
	end
	
	def start
		create_main_windows
	end
	
	def terminate
		@main.dispose
		@command_window.dispose
	end
	
	def update
		@command_window.update
		if @command_window.active
			update_command
		end
	end
	
	def wait(num)
		while num > 0
			Graphics.update
			num -= 1
		end
	end
	
	def create_main_windows
		if @scene == 1 #deposit
			@main = Window_BankMessage.new(BANK::MSGTEXT[2].gsub(/% &/) {$game_variables[bANK::MEMORIZE].to_s + " " + $data_system.words.gold})
		elsif @scene == 2 #withdraw
			@main = Window_BankMessage.new(BANK::MSGTEXT[6].gsub(/% &/) {$game_variables[bANK::MEMORIZE].to_s + " " + $data_system.words.gold})
		elsif @scene == 3 #step_invest
			@main = Window_BankMessage.new(BANK::MSGTEXT[16].gsub(/%/) {$game_variables[bANK::MEMORIZE].to_s})
		elsif @scene == 4 #time_invest
			@main = Window_BankMessage.new(BANK::MSGTEXT[17].gsub(/%/) {$game_variables[bANK::MEMORIZE].to_s})
		elsif @scene == 5 #step_divest
			@main = Window_BankMessage.new(BANK::MSGTEXT[20].gsub(/%/) {$game_variables[bANK::MEMORIZE].to_s})
		elsif @scene == 6 #time_divest
			@main = Window_BankMessage.new(BANK::MSGTEXT[21].gsub(/%/) {$game_variables[bANK::MEMORIZE].to_s})
		end
		@command_window = Window_Command.new(160, [bANK::CMDTEXT[5], BANK::CMDTEXT[6]])
		@command_window.x = (544 - @command_window.width) / 2
		@command_window.y = 200
	end
	
	def update_command
		if Input.trigger?(Input::B)
			if @scene == 1 #deposit
				$scene = Scene_Deposit.new
			elsif @scene == 2 #withdraw
				$scene = Scene_Withdraw.new
			elsif @scene == 3 #step_invest
				$scene = Scene_Invest.new(1)
			elsif @scene == 4 #time_invest
				$scene = Scene_Invest.new(2)
			elsif @scene == 5 #step_divest
				$scene = Scene_Divest.new(1)
			elsif @scene == 6 #time_divest
				$scene = Scene_Divest.new(2)
			end
		elsif Input.trigger?(Input::C)
			case @command_window.index
			when 0
				if @scene == 1 #deposit
					if $game_variables[bANK::MEMORIZE] > $game_party.gold
						$game_system.se_play($data_system.buzzer_se)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[3].gsub(/% &/) {$game_variables[bANK::MEMORIZE].to_s + " " + $data_system.words.gold})
						self.wait(60)#cazzo me invento
						$scene = Scene_Deposit.new
					elsif $game_variables[bANK::MEMORIZE] <= $game_party.gold
						$game_system.se_play($data_system.shop_se)
						$game_variables[bANK::DEPOSIT] += $game_variables[bANK::MEMORIZE]
						$game_party.lose_gold($game_variables[bANK::MEMORIZE])
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[4])
						self.wait(60)#cazzo me invento
						self.wait(60)
						$scene = Scene_Bank.new
					end #if
				elsif @scene == 2 #withdraw
					if $game_variables[bANK::MEMORIZE] > $game_variables[bANK::DEPOSIT]
						$game_system.se_play($data_system.buzzer_se)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[19].gsub(/% &/) {$game_variables[bANK::MEMORIZE].to_s + " " + $data_system.words.gold})
						self.wait(60)#cazzo me invento
						$scene = Scene_Withdraw.new
					elsif $game_variables[bANK::MEMORIZE] <= $game_variables[bANK::DEPOSIT]
						$game_system.se_play($data_system.shop_se)
						$game_party.gain_gold($game_variables[bANK::MEMORIZE])
						$game_variables[bANK::DEPOSIT] -= $game_variables[bANK::MEMORIZE]
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[7])
						self.wait(60)#cazzo me invento
						$scene = Scene_Bank.new
					end
				elsif @scene == 3 #step_invest
					if $game_variables[bANK::SSTOCKS] > 0
						int = get_step_int($game_variables[bANK::SSTOCKS])
						$game_system.se_play($data_system.shop_se)
						$game_party.gain_gold(int)
						self.wait(60)#cazzo me invento
					end
					value = $game_variables[bANK::MEMORIZE] * 100
					if value > $game_party.gold
						$game_system.se_play($data_system.buzzer_se)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[11].gsub(/% &/) {value.to_s + " " + $data_system.words.gold})
						self.wait(60)#cazzo me invento
						$scene = Scene_Invest.new(1)
					elsif value <= $game_party.gold
						$game_system.se_play($data_system.shop_se)
						$game_variables[bANK::SSTOCKS] += $game_variables[bANK::MEMORIZE]
						$game_party.lose_gold(value)
						$game_variables[bANK::SSTEPS] = $game_party.steps
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[12])
						self.wait(60)#cazzo me invento
						$scene = Scene_Bank.new
					end #if
				elsif @scene == 4 #time_invest
					if $game_variables[bANK::TSTOCKS] > 0
						int = get_time_int($game_variables[bANK::TSTOCKS])
						$game_system.se_play($data_system.shop_se)
						$game_party.gain_gold(int)
						self.wait(60)#cazzo me invento
					end
					value = $game_variables[bANK::MEMORIZE] * 100
					if value > $game_party.gold
						$game_system.se_play($data_system.buzzer_se)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[11].gsub(/% &/) {value.to_s + " " + $data_system.words.gold})
						self.wait(60)#cazzo me invento
						$scene = Scene_Invest.new(2)
					elsif value <= $game_party.gold
						$game_system.se_play($data_system.shop_se)
						$game_variables[bANK::TSTOCKS] += $game_variables[bANK::MEMORIZE]
						$game_party.lose_gold(value)
						$game_variables[bANK::TGT] = Graphics.frame_count / Graphics.frame_rate
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[12])
						self.wait(60)#cazzo me invento
						$scene = Scene_Bank.new
					end #if
				elsif @scene == 5 #step_divest
					if $game_variables[bANK::MEMORIZE] > $game_variables[bANK::SSTOCKS]
						$game_system.se_play($data_system.buzzer_se)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[22].gsub(/%/) {$game_variables[bANK::MEMORIZE].to_s})
						self.wait(60)#cazzo me invento
						$scene = Scene_Divest.new(1)
					elsif $game_variables[bANK::MEMORIZE] <= $game_variables[bANK::SSTOCKS]
						int = get_step_int($game_variables[bANK::SSTOCKS])
						int += 100 * $game_variables[bANK::MEMORIZE]
						$game_system.se_play($data_system.shop_se)
						$game_variables[bANK::SSTOCKS] -= $game_variables[bANK::MEMORIZE]
						$game_party.gain_gold(int)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[18])
						self.wait(60)#cazzo me invento
						$scene = Scene_Bank.new
					end
				elsif @scene == 6 #time_divest
					if $game_variables[bANK::MEMORIZE] > $game_variables[bANK::TSTOCKS]
						$game_system.se_play($data_system.buzzer_se)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[23].gsub(/%/) {$game_variables[bANK::MEMORIZE].to_s})
						self.wait(60)#cazzo me invento
						$scene = Scene_Divest.new(2)
					elsif $game_variables[bANK::MEMORIZE] <= $game_variables[bANK::TSTOCKS]
						int = get_time_int($game_variables[bANK::TSTOCKS])
						int += 100 * $game_variables[bANK::MEMORIZE]
						$game_system.se_play($data_system.shop_se)
						$game_variables[bANK::TSTOCKS] -= $game_variables[bANK::MEMORIZE]
						$game_party.gain_gold(int)
						@main.dispose
						@main = Window_BankMessage.new(BANK::MSGTEXT[18])
						self.wait(60)#cazzo me invento
						$scene = Scene_Bank.new
					end
				end #if 
			when 1
				if @scene == 1 #deposit
					$scene = Scene_Deposit.new
				elsif @scene == 2 #withdraw
					$scene = Scene_Withdraw.new
				elsif @scene == 3 #step_invest
					$scene = Scene_Invest.new(1)
				elsif @scene == 4 #time_invest
					$scene = Scene_Invest.new(2)
				elsif @scene == 5 #step_divest
					$scene = Scene_Divest.new(1)
				elsif @scene == 6 #time_divest
					$scene = Scene_Divest.new(2)
				end #if
			end #case
		end #if
	end #def
	
	def main
		create_main_windows
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		Graphics.freeze
		self.terminate
	end
	
end #class

 



Bugs e Conflitti Noti


Difficile che abbia conflitti, ma se ne trovate... che si fa?


Altri Dettagli


Nel momento stesso in cui ho pubblicato su internet questo script l'ho condannato a subire abusi di ogni sorta. Quindi creditate, non creditate, spacciatelo per vostro, dite che ve l'ha programmato il cane. Chissenefrega!
PS: QUESTO SCRIPT È MEDIOCRE! LO SO CHE LA VOSTRA BANCA È DIFFERENTE!

Edited by Dilos
Script monoriga sistemato.
Link to comment
Share on other sites

Grazie gino.. :smile: :smile:

Ora lo provo e ti faccio sapere.. :smile:

 

 

 

 

EDIT: scusate la troppa niub. ma ho un problema per inserire lo script dentro l'editor rgss.

nel senso.. che si visualizza tutto su un unica riga. e questa prima riga sovraccarica di tutti quei dati

rende i codici della stringa invisibili.

come sconfiggere l'insano problema?? :smile:

Edited by Lomax af

......

Cospladya 2011

La mia Lightning:

 

http://img69.imageshack.us/img69/4672/43078798.png

 

........

Nissa comix 2011vincitori come miglior gruppo:

http://img521.imageshack.us/img521/668/migliorgrupponissacomix.png

Link to comment
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...