Messages Basic On Screen
By: Rafidelis
About Script: This script allows the creation of windows with texts by command
Call script.
How is my first script it very simple and even ^ ^
Features: This script and super basic, so you can not show faces,
Icons, or pictures in messages.
But you can display, name of the character, amount of steps, quantity
From money, using the seguints codes in the text when calling the script:
Name of Character = $ game_party.members [ID PERSONAGEM]. Name
Quantidade_de_Gold = $ game_party.gold
Steps = $ game_party.steps
ScreenShots
Instructions: • To call the script Use Command call script and write:
• Mensagen_Basica.new (window_x,window_y,window_Width ,window_height , window_opacity , text_x,
text_y, text,size_text)
• window_x = X position of the window, namely the horizontal position of the window
• window_y = Y position of the window, or the vertical position of the window
• window_Width = Width From Window Where the text appears
• window_height = height of the window where the text appears
• window_opacity = opacity of the window, you can use from 0 to 255
• text_x = x position of the text, or horizontal position of the text
• texto_y = Position and the text, or vertical position of the text
• Text = Text to Be Displayed (must be in quotes ( "")
• size_text = size of text, you must use a number between 0 and 32
NOTE: Remember that the size of the window should be in accordance with the text size and position it,
because otherwise there will be shown only a piece of the message, for example if the text is too large,
you should create a window with a width great, because otherwise there will be shown so a part of the text.
CODE
#===============================================================================
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# MESSAGES ON SCREEN |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# BY: RAFIDELIS |
# RAFA_FIDELIS@HOTMAIL.COM | www.ReinoRpg.com | |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
#===============================================================================
|
#===============================================================================
|
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
INSTRUCTIONS # |
# • To call the script Use: |
• # Mensagen_Basica.new (Mensagen_Basica.new (window_x, window_y, window_widht, |
# window_height, window_opacity, text_x, text_y, text, size_text) |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
• window_x # = X position of the window, namely the horizontal position of the window |
• window_y # = Y position of the window, or the vertical position of the window |
• window_widht# = Width From Window Where the text appears |
• window_height# = Height of window where the text appears |
• window_opacity# = Opacity of the window, you can use from 0 to 255 |
• text_x # x = position of the text, or horizontal position of the text |
• text_y # = Position and the text, or vertical position of the text |
• Text = # Text to Be Displayed (must be in quotes ( "") |
• size_texto # = size of text, you must use a number from 0 to 32 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
# EXAMPLE OF USE |
# Mensagem_Basica.new (0,0180100255,30,0, Raphael, 32) |
# The above example will show the window in positions xeyo, the width of the window |
# Is 180, the height will be 100, the opacity of the window will be 255, the position of x |
# Text will be equal to 30, and the position and will be 0, # and the text to be displayed will be |
# Rafael in size 32. |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
class Mensagem_Basica < Window_Base
def initialize(janela_x,janela_y,janela_largura,janela_altura,opacidade_janela,texto_x,text
o_y,texto,tamanho_texto)
@opacidade_janela = opacidade_janela
@tamanho_texto = tamanho_texto
@texto_x = texto_x
@texto_y = texto_y
@texto = texto
@janela_largura = janela_largura
@janela_altura = janela_altura
super(janela_x,janela_y,janela_largura,janela_altura)
refresh
end
end
def refresh
self.contents.clear
self.opacity = @opacidade_janela
self.contents.font.size = @tamanho_texto
self.contents.draw_text(@texto_x,@texto_y,@janela_largura/2,@janela_altura/2,@texto)
end
#===============================================================================
|
# END OF SCRIPT |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
This post has been edited by Rafidelis: Sep 19 2008, 07:55 AM