Jump to content
Rpg²S Forum

*Mog Quick Save- Load V1.0


Eberk94
 Share

Recommended Posts

Mog Quick Save- Load V1.0

Descrizione

Uno script che permette di inserire nel gioco un salvataggio rapido.

Autore

Moghunter

Istruzioni per l'uso

Copiate lo script e godetevi il risultato. Premere Alt per richiamare il salvataggio rapido. Per disattivare questo sistema basta utilizzare la Switch ID 10.

Script:

 

 

#nome dei file della guida
$FILE_GUIDE = ["guida1.txt", "guida2.txt", "guida3.txt"]

class Window_Page < Window_Base
	def initialize
		super(0,63,640,417)
		self.contents = Bitmap.new(608, 385)
	end
	
	def draw_text(x, y, w, h, text)
		self.contents.font.name = "Arial"
		self.contents.font.size = 24
		self.contents.font.color = normal_color
		self.contents.draw_text(x, y, w, h, text)
	end
	
	def clear
		self.contents.clear
	end
end

class Scene_Guide
	def main
		@page = Window_Page.new
		@help = Window_Help.new
		@pnow = 0
		File.open("Guide/"+$FILE_GUIDE[@pnow]) do |f|
			f.each_line {|ln| @page.draw_text(20, (f.lineno-1)*30, 600, 32, " "+ln)}
		end
		Graphics.transition
		loop do
			Graphics.update
			Input.update
			update
			if $scene != self
				break
			end
		end
		@help.dispose
		@page.dispose
	end
	
	def update
		update_help
		if Input.trigger?(Input::B)
			$game_system.se_play($data_system.cancel_se)
			$scene = Scene_Menu.new(0)
		end
		if Input.trigger?(Input::C)
			$game_system.se_play($data_system.decision_se)
			$scene = Scene_Options.new
		end
		if Input.trigger?(Input::DOWN)
			if (@pnow < $FILE_GUIDE.size-1)
				@pnow += 1
				@page.clear
				File.open("Guide/"+$FILE_GUIDE[@pnow]) do |f|
					f.each_line {|ln| @page.draw_text(20, (f.lineno-1)*30, 600, 32, " "+ln)}
				end
			end
		end
		if Input.trigger?(Input::UP)
			if (@pnow > 0)
				@pnow -= 1
				@page.clear
				File.open("Guide/"+$FILE_GUIDE[@pnow]) do |f|
					f.each_line {|ln| @page.draw_text(20, (f.lineno-1)*30, 600, 32, " "+ln)}
				end
			end
		end
	end
	
	def update_help
		@help.set_text("Pagina "+(@pnow+1).to_s+" / "+$FILE_GUIDE.size.to_s)
	end
end

 

 




Bugs e Conflitti Noti

N/A

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...