Group: Member
Posts: 43
Type: Scripter
RM Skill: Advanced
Mattfriends's Diary System Script Authors: Mattfriends Type: Diary System
Introduction
This script allow you to create a great simple diary.
Features
Add an event into a diary with one short script.
Easily to call the script.
Screenshots
None
Demo
None
Script
Version 1
CODE
#============================================================================= # # Mattfriends's Diary # # Introduction: # Place the script above Main. # # How to use: # You need to call this script once and at the start of the game. # Diary.setup() # # Use this to call the script, # $scene = Scene_Diary.new # # To add event into the diary use this, # Diary.add("TEXT") # # Examples: # Diary.add("Went to bed.") # # Credit: # mattfriends for making it # # PLEASE GIVE CREDITS AFTER USING IT # #=============================================================================
class DiaryBox < Window_Base def initialize super(0, 0, 640, 70) self.contents = Bitmap.new(width - 32, height - 32) update end def update self.contents.clear self.contents.font.color = normal_color self.contents.font.size = 25 cx = contents.text_size("Diary").width self.contents.draw_text(0, 0, cx, 37, "Diary") end end
class DiaryMain < Window_Base def initialize super(0, 70, 640, 410) self.contents = Bitmap.new(width - 32, height - 32) update end
class Scene_Diary def main @windowDesc = DiaryBox.new @windowMain = DiaryMain.new Graphics.transition loop do Graphics.update Input.update update if $scene != self break end if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new break end end Graphics.freeze @windowDesc.dispose @windowMain.dispose end
def update @windowDesc.update @windowMain.update end end
#============================================================================= # # Mattfriends's Diary v2 # # Introduction: # Place the script above Main. # # How to use: # Use this to call the script, # $scene = Scene_Diary.new # # To add event into the diary use this, # Diary.add("TEXT") # # Examples: # Diary.add("Went to bed.") # # Credit: # mattfriends for making it # # PLEASE GIVE CREDITS AFTER USING IT # #=============================================================================