SCREENSHOTS / VIDEOS
Inside the DEMO.
INTRODUCTION
Inside the script.
DEMO
Link 1
SCRIPT
CODE
#=============================================================================
#
# Mattfriends's Simple Message Box
#
# Introduction:
# Place the script above Main.
#
# How to use:
# Use this to call the script,
# $scene = Scene_Message.new
#
# To add texts in the message use this,
# MyMessage.setText("LINE 1","LINE 2","LINE 3","LINE 4","LINE 5")
#
# Don't forget to set the title,
# MyMessage.setTitle("TITLE TEXTS")
#
# If you want the picture in it use this,
# MyMessage.setSprite("PIC_NAME.png")
# The picture need to stay in the Battlers folder.
#
# This is what the picture will look like.
# --------------------------------------------------------
# | Picture | Picture | Picture | Picture | Picture |
# | Frame | Frame | Frame | Frame | Frame |
# | 1 | 2 | 3 | 4 | 5 |
# --------------------------------------------------------
#
# Examples:
# MyMessage.setTitle("Return the book.")
# MyMessage.setText(
# "Please reture the book",
# "back to the library and",
# "pay $5 for the fee.",
# "",
# "")
# MyMessage.setSprite("Book.png")
#
# Credit:
# mattfriends for making it
#
# PLEASE GIVE CREDITS AFTER USING IT
#
#=============================================================================
class ThisDesc < 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($msgTitle).width
self.contents.draw_text(0, 0, cx, 37, $msgTitle)
end
end
class ThisMain < Window_Base
def initialize
#+-----------------------------------------------------+
#| Blank Picture when you haven't set the picture yet. |
#+-----------------------------------------------------+
$BLANK_PIC = ""
super(0, 70, 640, 410)
self.contents = Bitmap.new(width - 32, height - 32)
@frame = 0
@frames = 0
@frame_count = Graphics.frame_count
@frame_width = 0
@frame_height = 0
if $sprite!=nil and $sprite!=""
@bitmap = RPG::Cache.battler($sprite, 0)
else
@bitmap = RPG::Cache.battler($BLANK_PIC, 0)
end
get_settings
update
end
def get_settings
#Gets the number of frames from the image
@frames = @bitmap.width / @bitmap.height
#Get's the frame height
@frame_height = @bitmap.height
#Get's the frame width;
@frame_width = @bitmap.width / @frames
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size($ln1).width
self.contents.draw_text(0, 0, cx, 32, $ln1)
cx = contents.text_size($ln2).width
self.contents.draw_text(0, 32, cx, 32, $ln2)
cx = contents.text_size($ln3).width
self.contents.draw_text(0, 64, cx, 32, $ln3)
cx = contents.text_size($ln4).width
self.contents.draw_text(0, 96, cx, 32, $ln4)
cx = contents.text_size($ln5).width
self.contents.draw_text(0, 128, cx, 32, $ln5)
time = Graphics.frame_count - @frame_count
if time >= 10
#Save the current frame count
@frame_count = Graphics.frame_count
#Get the next frame
rect = Rect.new(@frame * @frame_width, 0, @frame_width, @frame_height)
#Displays the image
self.contents.blt(width/3, 160, @bitmap, rect, 160)
#Increase the current frame
@frame += 1
# if its the end of the frame
if @frame == @frames
@frame = 0
end
else #if its the same frame;
#Get the next frame
rect = Rect.new(@frame * @frame_width, 0, @frame_width, @frame_height)
#Displays the image
self.contents.blt(width/3, 160, @bitmap, rect, 160)
end
end
end
class Scene_Message
def main
@windowDesc = ThisDesc.new
@windowMain = ThisMain.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
$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
class MyMessage
def self.setTitle(text)
$msgTitle = text
end
def self.setText(ln1,ln2,ln3,ln4,ln5)
$ln1 = ln1
$ln2 = ln2
$ln3 = ln3
$ln4 = ln4
$ln5 = ln5
end
def self.setSprite(sprite)
$sprite = sprite
end
end
#
# Mattfriends's Simple Message Box
#
# Introduction:
# Place the script above Main.
#
# How to use:
# Use this to call the script,
# $scene = Scene_Message.new
#
# To add texts in the message use this,
# MyMessage.setText("LINE 1","LINE 2","LINE 3","LINE 4","LINE 5")
#
# Don't forget to set the title,
# MyMessage.setTitle("TITLE TEXTS")
#
# If you want the picture in it use this,
# MyMessage.setSprite("PIC_NAME.png")
# The picture need to stay in the Battlers folder.
#
# This is what the picture will look like.
# --------------------------------------------------------
# | Picture | Picture | Picture | Picture | Picture |
# | Frame | Frame | Frame | Frame | Frame |
# | 1 | 2 | 3 | 4 | 5 |
# --------------------------------------------------------
#
# Examples:
# MyMessage.setTitle("Return the book.")
# MyMessage.setText(
# "Please reture the book",
# "back to the library and",
# "pay $5 for the fee.",
# "",
# "")
# MyMessage.setSprite("Book.png")
#
# Credit:
# mattfriends for making it
#
# PLEASE GIVE CREDITS AFTER USING IT
#
#=============================================================================
class ThisDesc < 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($msgTitle).width
self.contents.draw_text(0, 0, cx, 37, $msgTitle)
end
end
class ThisMain < Window_Base
def initialize
#+-----------------------------------------------------+
#| Blank Picture when you haven't set the picture yet. |
#+-----------------------------------------------------+
$BLANK_PIC = ""
super(0, 70, 640, 410)
self.contents = Bitmap.new(width - 32, height - 32)
@frame = 0
@frames = 0
@frame_count = Graphics.frame_count
@frame_width = 0
@frame_height = 0
if $sprite!=nil and $sprite!=""
@bitmap = RPG::Cache.battler($sprite, 0)
else
@bitmap = RPG::Cache.battler($BLANK_PIC, 0)
end
get_settings
update
end
def get_settings
#Gets the number of frames from the image
@frames = @bitmap.width / @bitmap.height
#Get's the frame height
@frame_height = @bitmap.height
#Get's the frame width;
@frame_width = @bitmap.width / @frames
end
def update
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
cx = contents.text_size($ln1).width
self.contents.draw_text(0, 0, cx, 32, $ln1)
cx = contents.text_size($ln2).width
self.contents.draw_text(0, 32, cx, 32, $ln2)
cx = contents.text_size($ln3).width
self.contents.draw_text(0, 64, cx, 32, $ln3)
cx = contents.text_size($ln4).width
self.contents.draw_text(0, 96, cx, 32, $ln4)
cx = contents.text_size($ln5).width
self.contents.draw_text(0, 128, cx, 32, $ln5)
time = Graphics.frame_count - @frame_count
if time >= 10
#Save the current frame count
@frame_count = Graphics.frame_count
#Get the next frame
rect = Rect.new(@frame * @frame_width, 0, @frame_width, @frame_height)
#Displays the image
self.contents.blt(width/3, 160, @bitmap, rect, 160)
#Increase the current frame
@frame += 1
# if its the end of the frame
if @frame == @frames
@frame = 0
end
else #if its the same frame;
#Get the next frame
rect = Rect.new(@frame * @frame_width, 0, @frame_width, @frame_height)
#Displays the image
self.contents.blt(width/3, 160, @bitmap, rect, 160)
end
end
end
class Scene_Message
def main
@windowDesc = ThisDesc.new
@windowMain = ThisMain.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
if Input.trigger?(Input::B) or Input.trigger?(Input::C)
$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
class MyMessage
def self.setTitle(text)
$msgTitle = text
end
def self.setText(ln1,ln2,ln3,ln4,ln5)
$ln1 = ln1
$ln2 = ln2
$ln3 = ln3
$ln4 = ln4
$ln5 = ln5
end
def self.setSprite(sprite)
$sprite = sprite
end
end
CREDIT
Me - For making all of the script.
I hope you will use it or at least interest.