RPG Maker VX Brasil
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

RPG Maker VX Brasil

.:Fórum em Reforma:.
 
InícioPortalProcurarÚltimas imagensRegistarEntrar

 

 Scene_Anotações

Ir para baixo 
AutorMensagem
Silver Link
Administrador
Administrador
Silver Link


Masculino
Número de Mensagens : 43
Idade : 29
Localização : Curitiba, PR
Emprego/lazer : RPG Maker VX
Humor : Muito Bom xD
Alerta :
Scene_Anotações Left_bar_bleue0 / 1000 / 100Scene_Anotações Right_bar_bleue

Data de inscrição : 03/02/2008

Scene_Anotações Empty
MensagemAssunto: Scene_Anotações   Scene_Anotações Icon_minitime9/2/2008, 17:21

Script de Anotação criado por Dark Chocobo. Para usar, chame
$scene = Scene_Anotações.new

Código:
=begin
[  ====================================================================  ]
[  ====================================================================  ]
[  ===================  ]        SCRIPT CRIADO POR:      [  ====================    ]
[  ===================  ]                                                        [  ====================    ]
[  ===================  ]        >>> Dark Chocobo              [  ====================    ]
[  ===================  ]                                                        [  ====================    ]
[  ===================  ]                                                        [  ====================    ]
[  ===================  ]        Agradecimento à:                [  ====================    ]
[  ===================  ]          > João Rafael                    [  ====================    ]
[  ====================================================================  ]
[  ===================  ] : Comunidade RPG Maker VX : [  ====================    ]
[  =========  ] http://www.orkut.com/Community.aspx?cmm=40232098 [  ============  ]
[  ====================================================================  ]
[  ====================================================================  ]

Resumo:
 - Esse script cria uma janela para que o herói possa ver certos textos editados por você.
 - Use sua imaginação, você pode criar des de uma lista de objetivos para o jogador faser até
    uma simples e comum lista de compras.
Funções:
 - Você pode faser com que um ícone apareça para cada txto da lista
 - Você pode mudar a cor dos textos para que o mesmo fique em destaque
 - Você pode configurar um texto para aparecer somente após a ativação de uma switch,
    após uma variável ter um valor específico ou âmbos switch e variáeis terem valor específico
 - Você pode alterar os textos e as cores dos mesmos de acordo com a história de seu jogo
Instruções:
 - Você pode editar nas linhas 45, 46 e 47 as configurações de título, que aparece no topo
 - Apartir da linha 56 estam arquivados as configurações de seus textos, para adicionar novos
    textos basta criar uma nova linha em baixo e seguir o exemplo acima
    ATENÇÃO: certifique-se de que todos os cochetes( "[" e "]" ) e vírgulas( , ) estão colocadas
    de forma correta para que tudo funcione corretamente
 - Para chamar este script use o comando abaixo:
    $scene = Scene_Anotações.new
Observação Final: (apenas para quem sabe mecher em script)
 - Ao apertar o botão "B", o jogador será redirecionado à Scene_Map, se você deseja mudar
    isto vá até a linha 220 e edite isto.
=end

class Window_Base
  def color
    return self.contents.font.color
  end
end

class Window_Anotações < Window_Base
 
  # editável abaixo
 
  Tittle =        "Anotações"              #Título da página
  SubTittle = "Seus Objetivos"      #Subtítulo
  Y =              32 * 1                        #distância do topo da tela com qual seu título será exibido
 
  # editável acima
 
  def load_itens
    item = [
   
  #ex:
  #["Textos Aqui"  , ["IconSet"      , icone_x, icone_y], color, switch, [var_id, var_val],  trigger]
    ["Texto 01"        , ["IconSet"      , 0          , 0          ], 0      , 0        , [ 0      , 0          ],    false],
    ["Texto 02"        , ["IconSet"      , 0          , 0          ], 0      , 0        , [ 0      , 0          ],    false],
    ["Texto 03"        , ["IconSet"      , 0          , 0          ], 0      , 0        , [ 0      , 0          ],    false],
    ["Texto 04"        , ["IconSet"      , 0          , 0          ], 0      , 0        , [ 0      , 0          ],    false],
    ["Texto 05"        , ["IconSet"      , 0          , 0          ], 0      , 0        , [ 0      , 0          ],    false],
   
    ]
   
    return item
   
  end
 
  def text
    item = load_itens
    size = item.size
    $text = []
    for i in 0 ... size
      $text[i] = item[i][0]
    end
    $text_icon_set = []
    for i in 0 ... size
      $text_icon_set[i] = item[i][1][0]
    end
    $text_icon_x = []
    for i in 0 ... size
      $text_icon_x[i] = item[i][1][1]
    end
    $text_icon_y = []
    for i in 0 ... size
      $text_icon_y[i] = item[i][1][2]
    end
    $text_color = []
    for i in 0 ... size
      $text_color[i] = item[i][2]
    end
    $text_switch = []
    for i in 0 ... size
      $text_switch[i] = item[i][3]
    end
    $text_var_id = []
    for i in 0 ... size
      $text_var_id[i] = item[i][4][0]
    end   
    $text_var_val = []
    for i in 0 ... size
      $text_var_val[i] = item[i][4][1]
    end
    $text_trigger = []
    for i in 0 ... size
      $text_trigger[i] = item[i][5]
    end
   
  end
 
  def initialize
    super(0,0,544, 416)
    super()
    self.windowskin = Cache.system("Window")
    self.x = 0
    self.y = 0
    self.width = 544
    self.height = 416
    self.z = 100
    self.back_opacity = 200
    self.openness = 255
    create_contents
    @opening = false
    @closing = false
    open
    if $text == nil
      text
    end
    first
  end
  def first(v = 0)
    color = system_color
    self.contents.draw_text(0,Y+v,self.width,WLH,Tittle,1)
    self.contents.draw_text(0,Y+WLH+v,self.contentswidth,WLH,SubTittle,1)
    color = normal_color
    n = 0 + v
    for i in 0 ... $text.size
    y = i * WLH + Y + WLH*2 + n
    if $text_trigger(i) == true
      if set_switch(i) == false and set_var(i) == false
        n  -= WLH
        return
      end
    else
      if set_switch(i) == false or set_var(i) == false
        n  -= WLH
        return
      end
    end
      set_color(i)
      set_icon(i,y)
      self.contents.draw_text(32, y, self.contents.width, WLH, $text[i])
      color = normal
    end
  end
 
  def set_color(i)
    color = text_color($text_color[i])
  end
  def set_icon(i,y)
    bitmap = Cache.system($text_icon[i][0])
    rect = Rect.new(4, y, 24, 24)
    self.contents.blt(4, y, bitmap, rect, 128)
  end
  def set_switch(i)
    if  $text_switch[i] == 0 or $game_switches[$text_switch[i]] == true
      return true
    else
      return false
    end
  end
  def set_var(i)
    if $text_var_id[i] == 0 or $game_variables[$text_var_id[i]] >= $text_var_val[i]
      return true
    else
      return false
    end
  end
 
 
 
  def update
    super
    if @opening
      self.openness += 48
      @opening = false if self.openness == 255
    elsif @closing
      self.openness -= 48
      @closing = false if self.openness == 0
    end
    if $text.size * WLH + Y + WLH*2 < 416
      return
    end
    if Input.trigger?(Input::UP)
      first(WLH)
    end
    if Input.trigger?(Input::DOWN)
      first(+WLH)
    end
  end
end

###################################
###################################
###################################

class Scene_Anotações
  def start
    @note = Window_Anotações.new
  end
  def update
    @note.update
    if Input.trigger?(Input::B)
      $scene =
     
      Scene_Map.new
     
    end
  end
  def terminate
    @note.dispose
  end
end

Mais explicações no script. Fui!
Ir para o topo Ir para baixo
https://rpgmakervxbr.forumeiros.com
 
Scene_Anotações
Ir para o topo 
Página 1 de 1

Permissões neste sub-fórumNão podes responder a tópicos
RPG Maker VX Brasil :: RGSS2 :: Scripts sem Demo-
Ir para: