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

Ir para baixo
orodius
orodius
Novo Membro
Novo Membro
Masculino Mensagens : 115
Reputação : 26

menu new[vx] Empty menu new[vx]

Sáb maio 29, 2010 7:15 am
aew gente eu vim desponibilizar um novo menu,para quem gosta
do menu padrão do vx,pq não deixar ele mais bonito?

amostra~
Spoiler:

script
cole acima do main
Código:
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  ゲーム中のすべてのウィンドウのスーパークラスです。
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ● 定数
  #--------------------------------------------------------------------------
  WLH = 24                  # 行の高さ基準値 (Window Line Height)
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #    x      : ウィンドウの X 座標
  #    y      : ウィンドウの Y 座標
  #    width  : ウィンドウの幅
  #    height : ウィンドウの高さ
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super()
    self.windowskin = Cache.system("Window")
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
    self.back_opacity = 200
    self.openness = 255
    create_contents
    @opening = false
    @closing = false
  end
  #--------------------------------------------------------------------------
  # ● 解放
  #--------------------------------------------------------------------------
  def dispose
    self.contents.dispose
    super
  end
  #--------------------------------------------------------------------------
  # ● ウィンドウ内容の作成
  #--------------------------------------------------------------------------
  def create_contents
    self.contents.dispose
    self.contents = Bitmap.new(width - 32, height - 32)
  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
  end
  #--------------------------------------------------------------------------
  # ● ウィンドウを開く
  #--------------------------------------------------------------------------
  def open
    @opening = true if self.openness < 255
    @closing = false
  end
  #--------------------------------------------------------------------------
  # ● ウィンドウを閉じる
  #--------------------------------------------------------------------------
  def close
    @closing = true if self.openness > 0
    @opening = false
  end
  #--------------------------------------------------------------------------
  # ● 文字色取得
  #    n : 文字色番号 (0~31)
  #--------------------------------------------------------------------------
  def text_color(n)
    x = 64 + (n % 8) * 8
    y = 96 + (n / 8) * 8
    return windowskin.get_pixel(x, y)
  end
  #--------------------------------------------------------------------------
  # ● 通常文字色の取得
  #--------------------------------------------------------------------------
  def normal_color
    return text_color(0)
  end
  #--------------------------------------------------------------------------
  # ● システム文字色の取得
  #--------------------------------------------------------------------------
  def system_color
    return text_color(16)
  end
  #--------------------------------------------------------------------------
  # ● ピンチ文字色の取得
  #--------------------------------------------------------------------------
  def crisis_color
    return text_color(17)
  end
  #--------------------------------------------------------------------------
  # ● 戦闘不能文字色の取得
  #--------------------------------------------------------------------------
  def knockout_color
    return text_color(18)
  end
  #--------------------------------------------------------------------------
  # ● ゲージ背景色の取得
  #--------------------------------------------------------------------------
  def gauge_back_color
    return text_color(19)
  end
  #--------------------------------------------------------------------------
  # ● HP ゲージの色 1 の取得
  #--------------------------------------------------------------------------
  def hp_gauge_color1
    return text_color(24)#21#22
  end
  #--------------------------------------------------------------------------
  # ● HP ゲージの色 2 の取得
  #--------------------------------------------------------------------------
  def hp_gauge_color2
    return text_color(11)#17#23
  end
  #--------------------------------------------------------------------------
  # ● MP ゲージの色 1 の取得
  #--------------------------------------------------------------------------
  def mp_gauge_color1
    return text_color(22)#22#18R#24
  end
  #--------------------------------------------------------------------------
  # ● MP ゲージの色 2 の取得
  #--------------------------------------------------------------------------
  def mp_gauge_color2
    return text_color(23)#23#11
  end
  #--------------------------------------------------------------------------
  # ● 装備画面のパワーアップ色の取得
  #--------------------------------------------------------------------------
  def power_up_color
    return text_color(24)
  end
  #--------------------------------------------------------------------------
  # ● 装備画面のパワーダウン色の取得
  #--------------------------------------------------------------------------
  def power_down_color
    return text_color(25)
  end
  #--------------------------------------------------------------------------
  # ● アイコンの描画
  #    icon_index : アイコン番号
  #    x          : 描画先 X 座標
  #    y          : 描画先 Y 座標
  #    enabled    : 有効フラグ。false のとき半透明で描画
  #--------------------------------------------------------------------------
  def draw_icon(icon_index, x, y, enabled = true)
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
    self.contents.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  end
  #--------------------------------------------------------------------------
  # ● 顔グラフィックの描画
  #    face_name  : 顔グラフィック ファイル名
  #    face_index : 顔グラフィック インデックス
  #    x          : 描画先 X 座標
  #    y          : 描画先 Y 座標
  #    size      : 表示サイズ
  #--------------------------------------------------------------------------
  def draw_face(face_name, face_index, x, y, size = 96)
    bitmap = Cache.face(face_name)
    rect = Rect.new(0, 0, 0, 0)
    rect.x = face_index % 4 * 96 + (96 - size) / 2
    rect.y = face_index / 4 * 96 + (96 - size) / 2
    rect.width = size
    rect.height = size
    self.contents.blt(x, y, bitmap, rect)
    bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # ● 歩行グラフィックの描画
  #    character_name  : 歩行グラフィック ファイル名
  #    character_index : 歩行グラフィック インデックス
  #    x              : 描画先 X 座標
  #    y              : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_character(character_name, character_index, x, y)
    return if character_name == nil
    bitmap = Cache.character(character_name)
    sign = character_name[/^[\\\\\\\\!\\\\\\\\$]./]
    if sign != nil and sign.include?('$')
      cw = bitmap.width / 3
      ch = bitmap.height / 4
    else
      cw = bitmap.width / 12
      ch = bitmap.height / 8
    end
    n = character_index
    src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
  #--------------------------------------------------------------------------
  # ● HP の文字色を取得
  #    actor : アクター
  #--------------------------------------------------------------------------
  def hp_color(actor)
    return knockout_color if actor.hp == 0
    return crisis_color if actor.hp < actor.maxhp / 4
    return normal_color
  end
  #--------------------------------------------------------------------------
  # ● MP の文字色を取得
  #    actor : アクター
  #--------------------------------------------------------------------------
  def mp_color(actor)
    return crisis_color if actor.mp < actor.maxmp / 4
    return normal_color
  end
  #--------------------------------------------------------------------------
  # ● アクターの歩行グラフィック描画#    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    draw_character(actor.character_name, actor.character_index, x, y)
  end
  #--------------------------------------------------------------------------
  # ● アクターの顔グラフィック描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    size  : 表示サイズ
  #--------------------------------------------------------------------------
  def draw_actor_face(actor, x, y, size = 20)
    draw_face(actor.face_name, actor.face_index, x, y, size)
  end
  #--------------------------------------------------------------------------
  # ● 名前の描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    self.back_opacity = 100
    self.contents.font.size = 20
    self.contents.font.name = "Georgia"
    self.contents.font.color = hp_color(actor)
    self.contents.font.color = text_color(3)
    self.contents.draw_text(x, y, 108, WLH, actor.name)
  end
  #--------------------------------------------------------------------------
  # ● クラスの描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, x, y)
    self.back_opacity = 100
    self.contents.font.size = 20
    self.contents.font.name = "Georgia"
    self.contents.font.color = text_color(1)
    self.contents.draw_text(x, y, 108, WLH, actor.class.name)
  end
  #--------------------------------------------------------------------------
  # ● レベルの描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    self.contents.font.name = "Arial"
  self.contents.font.color = text_color(6)
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
  self.contents.font.color = text_color(5)
    self.contents.draw_text(x + 32, y, 24, WLH, actor.level, 2)
  end
  #--------------------------------------------------------------------------
  # ● ステートの描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    width : 描画先の幅
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 96)
    count = 0
    for state in actor.states
      draw_icon(state.icon_index, x + 24 * count, y)
      count += 1
      break if (24 * count > width - 24)
    end
  end
  #--------------------------------------------------------------------------
  # ● HP の描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 110)
  draw_actor_hp_gauge(actor, x, y, width)
    self.contents.font.color = text_color(3)
    self.contents.draw_text(x, y, 30, WLH, Vocab::hp_a)
    self.contents.font.color = hp_color(actor)
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.hp, 2)
    else
      self.contents.draw_text(xr - 90, y, 40, WLH, actor.hp, 2)
      self.contents.font.color = text_color(4)
      self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxhp, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● HP ゲージの描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_hp_gauge(actor, x, y, width = 120)
    gw = width * actor.hp / actor.maxhp
    gc1 = hp_gauge_color1
    gc2 = hp_gauge_color2
    gc3 = hp_gauge_color2
      gc4 = hp_gauge_color1
    self.contents.fill_rect(x, y + WLH - 9, width, 10, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 9, gw, 6, gc1, gc2, gc3)
  end
  #def draw_actor_hp_gauge(actor, x, y, width = 120)
    #gw = width * actor.hp / actor.maxhp
    #gc1 = hp_gauge_color1
    #gc2 = hp_gauge_color2
    #self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    #self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  #end
  #--------------------------------------------------------------------------
  # ● MP の描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, x, y, width = 110)
    draw_actor_mp_gauge(actor, x, y, width)
    self.contents.font.color = text_color(5)
    self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a)
    self.contents.font.color = mp_color(actor)
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.mp, 2)
    else
      self.contents.draw_text(xr - 90, y, 40, WLH, actor.mp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxmp, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● MP ゲージの描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    width : 幅
  #--------------------------------------------------------------------------
  def draw_actor_mp_gauge(actor, x, y, width = 120)
    gw = width * actor.mp / [actor.maxmp, 1].max
    gc1 = mp_gauge_color1
    gc2 = mp_gauge_color2
    gc3 = mp_gauge_color2
      gc4 = hp_gauge_color1
    self.contents.fill_rect(x, y + WLH - 9, width, 10, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 9, gw, 6, gc1, gc2, gc3)
  end
  #--------------------------------------------------------------------------
  # ● 能力値の描画
  #    actor : アクター
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    type  : 能力値の種類 (0~3)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = Vocab::atk
      parameter_value = actor.atk
    when 1
      parameter_name = Vocab::def
      parameter_value = actor.def
    when 2
      parameter_name = Vocab::spi
      parameter_value = actor.spi
    when 3
      parameter_name = Vocab::agi
      parameter_value = actor.agi
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, WLH, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, WLH, parameter_value, 2)
  end
  #--------------------------------------------------------------------------
  # ● アイテム名の描画
  #    item    : アイテム (スキル、武器、防具でも可)
  #    x      : 描画先 X 座標
  #    y      : 描画先 Y 座標
  #    enabled : 有効フラグ。false のとき半透明で描画
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, enabled = true)
    if item != nil
      draw_icon(item.icon_index, x, y, enabled)
      self.contents.font.color = normal_color
      self.contents.font.color.alpha = enabled ? 255 : 128
      self.contents.draw_text(x + 24, y, 172, WLH, item.name)
    end
  end
  #--------------------------------------------------------------------------
  # ● 通貨単位つきの数値描画
  #    value : 数値 (所持金など)
  #    x    : 描画先 X 座標
  #    y    : 描画先 Y 座標
  #    width : 幅
  #--------------------------------------------------------------------------
  def draw_currency_value(value, x, y, width)
    cx = contents.text_size(Vocab::gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, width, WLH, Vocab::gold, 2)
  end
end

credito
Matt

só isso galera,flws


menu new[vx] Wallpaper0506072fã final fantasy forever
Guloso's
Guloso's
Novo Membro
Novo Membro
Masculino Mensagens : 102
Reputação : 11

menu new[vx] Empty Pessoal!

Ter Jun 01, 2010 8:16 pm
como eu copio e colo issu ?

eu copio mais quando eu vou cola..

cola tudo em cima de uma linha só
orodius
orodius
Novo Membro
Novo Membro
Masculino Mensagens : 115
Reputação : 26

menu new[vx] Empty Re: menu new[vx]

Ter Jun 01, 2010 8:51 pm
Guloso's escreveu:como eu copio e colo issu ?

eu copio mais quando eu vou cola..

cola tudo em cima de uma linha só
ham??vc é novo no rpg maker?bem,é só copiar tudo criar um novo script[segundo botão do mouse]acima do main[vai ficar tudo branco]e depois é só colar normal
obs:não sei se isso que vc fez em baixo é double post....ta vazio
Guloso's
Guloso's
Novo Membro
Novo Membro
Masculino Mensagens : 102
Reputação : 11

menu new[vx] Empty Foi Mal

Ter Jun 01, 2010 9:11 pm
Foi mal net bugada ~~

cara é o seguinte so novo aqui mais eu copio seu scripts fasso tudo normal mais só
que quando eu vou colar, cola tudo em uma linha só!

o pior que eu não sei explicar direito :x
SteveTheCreeper
SteveTheCreeper
Membro
Membro
Masculino Mensagens : 476
Reputação : 24

menu new[vx] Empty Re: menu new[vx]

Qua Jun 02, 2010 1:40 pm
Gulosos
Double post

See Ya
orodius
orodius
Novo Membro
Novo Membro
Masculino Mensagens : 115
Reputação : 26

menu new[vx] Empty Re: menu new[vx]

Qua Jun 02, 2010 5:34 pm
Guloso's escreveu:cara é o seguinte so novo aqui mais eu copio seu scripts fasso tudo normal mais só
que quando eu vou colar, cola tudo em uma linha só!

o pior que eu não sei explicar direito :x
olha é só copiar cria um novo script acima do main
e colar,nã tem erro
obs:olha o double post,se quiser flar algo mais por favor edite sua
menssagem
SteveTheCreeper
SteveTheCreeper
Membro
Membro
Masculino Mensagens : 476
Reputação : 24

menu new[vx] Empty Re: menu new[vx]

Qua Jun 02, 2010 6:54 pm
o problema eh que a segunda
ta em branco ¬¬

See Ya
Guloso's
Guloso's
Novo Membro
Novo Membro
Masculino Mensagens : 102
Reputação : 11

menu new[vx] Empty malz

Sex Jun 04, 2010 12:04 am
Foi mal ai galera!

so novo e ja cheguei desincliribando tudo aqui!

mais pesso desculpa... em quanto o assunto de colar jamais iremos resolver!

ja tentei 1000 vezes deixa..
BRHassan
BRHassan
Novato
Novato
Mensagens : 2
Reputação : 10

menu new[vx] Empty Re: menu new[vx]

Seg Jul 26, 2010 1:41 pm
Eu tambem não consigo colar direito!
Acontece isso em todos os scripts que eu tento colar.
Jhonn
Jhonn
Novo Membro
Novo Membro
Masculino Mensagens : 114
Reputação : 48

menu new[vx] Empty Re: menu new[vx]

Sáb Jul 31, 2010 3:39 pm
Temos que comunicar o Alucard_2 ou o Fallco, depois que eles mudaram o estilo do fórum os scripts que ficam dentro da tag [code] ficaram com esse problema.
NickTheMaster
NickTheMaster
Novato
Novato
Masculino Mensagens : 87
Reputação : 22

menu new[vx] Empty Re: menu new[vx]

Seg Set 06, 2010 1:20 pm
Antes eu estava com esse problema...
Eu resolvi primeiro copiando e colando no Word depois eu copiei do word e colei no meu script, deu certo.
Conteúdo patrocinado

menu new[vx] Empty Re: menu new[vx]

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