Eventers Lab & G+ Games (ELG+)
Olá, se você já é cadastrado no nosso fórum, faça seu login, se ainda não é, não perca tempo! Cadastre-se já!

Participe do fórum, é rápido e fácil

Eventers Lab & G+ Games (ELG+)
Olá, se você já é cadastrado no nosso fórum, faça seu login, se ainda não é, não perca tempo! Cadastre-se já!
Eventers Lab & G+ Games (ELG+)
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Entrar

Esqueci-me da senha

Últimos assuntos
» 2 Players no jogo (Backup RMB)
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 5:39 pm por Rodrigo Vernaschi

» Chamar Bote
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 5:16 pm por Rodrigo Vernaschi

» Caixa de Texto Acima do Personagem
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 4:56 pm por Rodrigo Vernaschi

» Auto-Tile Speed
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 4:49 pm por Rodrigo Vernaschi

» Apresentação Antes do Title
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 4:35 pm por Rodrigo Vernaschi

» Anti-Hack System (Silver Link/Gold Link)
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 4:26 pm por Rodrigo Vernaschi

» Anti Hack (AMIGO X)
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 4:19 pm por Rodrigo Vernaschi

» Ajustar Volume Durante o Jogo
Caixa de Texto Acima do Personagem EmptyDom Jul 31, 2011 3:58 pm por Rodrigo Vernaschi

» Músicas e poemas
Caixa de Texto Acima do Personagem EmptyQua Out 20, 2010 8:19 pm por Memories


Caixa de Texto Acima do Personagem

Ir para baixo

Caixa de Texto Acima do Personagem Empty Caixa de Texto Acima do Personagem

Mensagem por Rodrigo Vernaschi Dom Jul 31, 2011 4:56 pm

Character's Textbox
por Woratana

Características: Exibe uma caixa de texto acima do personagem e/ou evento.

Instruções: Cole acima do main e leia o começo do script para informações de como operá-lo.

Código:
Código:
#===============================================================
# ● [VX] ◦ Character's Textbox ◦ □
# * Show textbox above character *
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 21/05/2008
# ◦ Version: 1.0
# Traduçao para português: Rafidelis
# www.ReinoRpg.com
#--------------------------------------------------------------

#==================================================================
# ** RECURSOS **
#-----------------------------------------------------------------
#- Mostrar  Caixa de texto acima do personagem (Player e / ou Evento)
#- Alterar a opacidade  e a posição do texto  (no script)
#- Utilizar efeito sonoro quando for mostrar texto (no script)

#==================================================================
# **COMO USAR **
# * Use o Evento Chamar Script...' para a linha abaixo de qualquer script ~ ~
#-----------------------------------------------------------------
# 1. Configure este Script na parte inferior do SETUP
# 2.Para mostrar a caixa de texto no character,chame o Script:
#  set_text(character, new_text)
#
# * character: Em qual character você deseja mostrar a Caixa de Texto?
# ** -1Para o "jogador", 0 para "este evento', e 1 mais para o ID do Evento
# * new_text: Qual o texto que você deseja Exibir??
# ** Escrever o texto assim 'text here' or "text here"

# Exemplo:
#  set_text(10,'Olá')
# *O Script acima ira mostrar o texto "Olá "no evento 10.
#
# 3. Para deletar/limpa a caixa de texto use o comando chamar Script e escreva:
#  set_text(character, '')
#==================================================================

module Wora_CTB
  #================================================================
  # ** [START] Character's Overhead Textbox SETUP
  #----------------------------------------------------------------
  SAVE_TEXT = true # Savar texto na cixa de texto~? (true ou false)
  # Se salvar,o texto velho sera exibido quando você se teleportar novamente para o mapa~
 
  TEXTBOX_SKIN = 'Window' #Nome da WindowSkin,deve estar na pasta System.
  TEXTBOX_OPACITY = 0 # Opacidade do Texto (0 - 255)
  TEXTBOX_X_OFFSET = 0 #Mover o texto para a horizontal (+ or -)
  TEXTBOX_Y_OFFSET = -1 # Mover texto para a vertical (+ or -)
 
  TEXTBOX_POPSOUND_MODE = 2 # SE (Efeito de Som) para tocar quando o texto aparecer,
  # ou mudar o texto~
  # 0 para sem Som, 1 para usar som quando o primeiro texto aparecer,
  # & para usar o som quando o primeiro testo aparecer e mudar o texto.
 
  TEXTBOX_POPSOUND = 'Decision1' # Nome d SE
  TEXTBOX_POPSOUND_VOLUME = 80 # Volume Da SE
  TEXTBOX_POPSOUND_PITCH = 100 # SE pitch
  #----------------------------------------------------------------
  # ** [END] Character's Overhead Textbox SETUP
  #================================================================
end

$worale = {} if $worale.nil?
$worale['Chartbox'] = true

class Game_Interpreter
  def set_text(evid, new_text)
  target = get_character(evid)
  target.text = new_text
  end
end

class Sprite_Character < Sprite_Base
  alias wora_chartbox_sprcha_upd update
  alias wora_chartbox_sprcha_dis dispose
 
  def update
  wora_chartbox_sprcha_upd
  @chartext = '' if @chartext.nil?
  if @character.text != @chartext # If there is new text
    @chartext = @character.text
    $game_system.chartbox = {} if $game_system.chartbox.nil?
    case @character.class
    when Game_Player; char_id = -1
    when Game_Event; char_id = @character.id
    end
    # Save new text
    $game_system.chartbox[[$game_map.map_id, char_id]] = @chartext
    if @chartext == '' # If new text is empty? ('')
      @textbox.visible = false if !@textbox.nil?
    else # If new text is not empty~ change text
      if @textbox.nil?
        @textbox = Window_CharTBox.new
        RPG::SE.new(Wora_CTB::TEXTBOX_POPSOUND, Wora_CTB::TEXTBOX_POPSOUND_VOLUME,
Wora_CTB::TEXTBOX_POPSOUND_PITCH).play if Wora_CTB::TEXTBOX_POPSOUND_MODE > 0
      else
        RPG::SE.new(Wora_CTB::TEXTBOX_POPSOUND, Wora_CTB::TEXTBOX_POPSOUND_VOLUME,
  Wora_CTB::TEXTBOX_POPSOUND_PITCH).play if Wora_CTB::TEXTBOX_POPSOUND_MODE == 2
      end
      @textbox.set_text(@chartext)
      @textbox.visible = true
    end
  end
  if @chartext != ''
    @textbox.x = self.x - (@textbox.width / 2) + Wora_CTB::TEXTBOX_X_OFFSET
    @textbox.y = self.y - self.oy - @textbox.height + Wora_CTB::TEXTBOX_Y_OFFSET
  end
  end
 
  def dispose
  @textbox.dispose if !@textbox.nil?
  wora_chartbox_sprcha_dis
  end
end

class Game_Character
  attr_accessor :text
  alias wora_chartbox_gamcha_ini initialize
  def initialize(*args)
  wora_chartbox_gamcha_ini(*args)
  $game_system.chartbox = {} if $game_system.chartbox.nil?
  case self.class
  when Game_Player
    my_text = $game_system.chartbox[[$game_map.map_id, -1]] if
!$game_system.chartbox[[$game_map.map_id, -1]].nil?
  when Game_Event
    my_text = $game_system.chartbox[[$game_map.map_id, @id]] if
!$game_system.chartbox[[$game_map.map_id, @id]].nil?
  end
  @text = my_text.nil? ? '' : my_text
  end
end

class Game_System
  attr_accessor :chartbox
end

unless Wora_CTB::SAVE_TEXT
  class Game_Interpreter
  alias wora_chartbox_gamint_com201 command_201 unless $@
  def command_201
    if $game_map.fog_reset
      if @params[0] == 0; id_map = @params[1]
      else; id_map = $game_variables[@params[1]]
      end
      $game_system.chartbox = {} if id_map != @map_id
    end
    wora_chartbox_gamint_com201
  end
  end
end
#===============================================================
# Window_CharTBox: Edited version of Window_Help
#===============================================================
class Window_CharTBox < Window_Base
  def initialize(x = 0, y = 0, w = 66, h = WLH+32)
  super(x,y,w,h)
  self.windowskin = Cache.system(Wora_CTB::TEXTBOX_SKIN)
  self.opacity = Wora_CTB::TEXTBOX_OPACITY
  end

  def set_text(text)
  if text != @text
    text_w = self.contents.text_size(text).width
    self.width = text_w + 32
    create_contents
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, self.contents.width, WLH, text, 1)
    @text = text
  end
  end
end
#==================================================================
# [END] VX Character Textbox by Woratana [woratana@hotmail.com]
#==================================================================

Créditos:
Woratana
Rafidelis (Tradutor)
www.ReinoRpg.com


FUI!!!
Rodrigo Vernaschi
Rodrigo Vernaschi
Administrador
Administrador

Número de Mensagens : 113
Idade : 31
Localização : Mauá-SP
Respeito às regras : Caixa de Texto Acima do Personagem 111010
Premios : Caixa de Texto Acima do Personagem Medal_gold_3: 0 Caixa de Texto Acima do Personagem Medal_silver_3: 0 Caixa de Texto Acima do Personagem Medal_bronze_3: 0
Reputação : 3
Pontos : 251
Data de inscrição : 27/02/2009

Ficha do personagem
Raça: Humano
Nível Maker: Experiente
Mensagem Pessoal: Leiam as regras!

https://eventerslab.forumakers.com

Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos