VX 스크립트

SephirothSpawn's Slanted Bars in VX 1.1
by Kylock (Based on SephirothSpawn's Original Slanted Bars)

Inspired by Syvkal (http://rmvxpuniverse.com) who ported Cogwheel Style bars to VX, I realized how much I missed Seph's Slanted Bars. So here they are. Just add this script and it'll automagically transform your HP and MP bars. Installation instructions are in the header of the script.

If you wanna know what it looks like, its pretty much like this:

#==============================================================================
# ■ SephirothSpawn's Slanted bars in VX
#     25.4.2008
#------------------------------------------------------------------------------
#  Script by: Kylock (Based on SephirothSpawn's Original Slanted Bars)
#==============================================================================
#    Inspired by Syvkal (http://rmvxpuniverse.com) who ported Cogwheel Style
#  bars to VX, I realized how much I missed Seph's Slanted Bars.  So here they
#  are.  Just add this script and it'll automagically transform your HP and MP
#  bars.  Bar colors are easily customized in the following module.
#==============================================================================
#  Change Log
#  1.0 - Original Release.
#  1.1 - Added option to use default window skin colors.
#==============================================================================

module SLANT_BARS
  USE_WINDOWSKIN = false  # If set to true, the colors will be taken from the
                          #  current system skin and the following settings
                          #  will be ignored.
  
  DEFAULT_HP_BAR_COLOR = Color.new(150,0,0,255)   # Beginning color of HP bar
  DEFAULT_HP_END_COLOR = Color.new(255,192,0,255) # Ending color of HP bar
  
  DEFAULT_MP_BAR_COLOR = Color.new(0,0,150,255)   # Begenning color of MP bar
  DEFAULT_MP_END_COLOR = Color.new(0,150,200,255) # Ending color of MP bar
end

class Window_Base < Window
  #==========================================================================
  # * Draw Slant Bar(by SephirothSpawn)
  #==========================================================================
  def draw_slant_bar(x, y, min, max, width = 152, height = 6,
    bar_color = Color.new(150, 0, 0, 255),
    end_color = Color.new(255, 255, 60, 255))
    # Draw Border
    for i in 0..height
      self.contents.fill_rect(x + i, y + height - i, width + 1, 1,
        Color.new(50, 50, 50, 255))
    end
    # Draw Background
    for i in 1..(height - 1)
      r = 100 * (height - i) / height + 0 * i / height
      g = 100 * (height - i) / height + 0 * i / height
      b = 100 * (height - i) / height + 0 * i / height
      a = 255 * (height - i) / height + 255 * i / height
      self.contents.fill_rect(x + i, y + height - i, width, 1,
        Color.new(r, b, g, a))
    end
    # Draws Bar
    for i in 1..( (min / max.to_f) * width - 1)
      for j in 1..(height - 1)
        r = bar_color.red * (width - i) / width + end_color.red * i / width
        g = bar_color.green * (width - i) / width + end_color.green * i / width
        b = bar_color.blue * (width - i) / width + end_color.blue * i / width
        a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
        self.contents.fill_rect(x + i + j, y + height - j, 1, 1,
          Color.new(r, g, b, a))
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw HP gauge
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_hp_gauge(actor, x, y, width = 131)
    if SLANT_BARS::USE_WINDOWSKIN
      draw_slant_bar(x-3,y+13,actor.hp,actor.maxhp,width,8,
        hp_gauge_color1,hp_gauge_color2)
    else
      draw_slant_bar(x-3,y+13,actor.hp,actor.maxhp,width,8,
        SLANT_BARS::DEFAULT_HP_BAR_COLOR,SLANT_BARS::DEFAULT_HP_END_COLOR)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw MP Gauge
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : Width
  #--------------------------------------------------------------------------
  def draw_actor_mp_gauge(actor, x, y, width = 131)
    if SLANT_BARS::USE_WINDOWSKIN
      draw_slant_bar(x-3,y+13,actor.mp,actor.maxmp,width,8,
        mp_gauge_color1,mp_gauge_color2)
    else
      draw_slant_bar(x-3,y+13,actor.mp,actor.maxmp,width,8,
        SLANT_BARS::DEFAULT_MP_BAR_COLOR,SLANT_BARS::DEFAULT_MP_END_COLOR)
    end
  end
end
Comment '2'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
57 미니맵 미니맵 스크립트(아랫거랑 다른거) 75 file 츠키아 2008.08.08 6145
56 맵/타일 새로운 월드맵 만들기 (로맨싱사가풍) 37 file 078656577er 2009.10.09 6151
55 메뉴 스테이터스 창을 멋있게 쿨하게~!전신을 보여주자. 24 file 할렘 2009.02.06 6236
54 메시지 메시지 표시 시스템 [NMS3] 31 아방스 2009.01.24 6248
53 메뉴 파이날 판타지 IX 메뉴. 12 file 할렘 2009.02.06 6286
52 상점 상점을 색다르게 바꿔주는 스크립트 34 file 할렘 2009.02.02 6301
51 온라인 온라인입니다 4 file 알피지GM 2010.03.07 6358
50 메뉴 김태히님이 개조한 모그메뉴 스텟화면 43 file RPGbooster 2008.10.08 6360
49 온라인 net VX[ RPGVX 온라인 스크립트 ] 19 file 제로스S2 2009.08.03 6391
48 HUD KH HUD (HP MP 게이지바 스크립트) 41 아방스 2010.12.17 6422
47 전투 RPG Tankentai SBS 3.4d + ATB 1.2c Kaduki 18 시트르산 2010.09.10 6449
46 메시지 캐릭터 대화상자 - Character's Textbox ver 1.0 6 아방스 2010.12.17 6455
45 맵/타일 추가 맵칩 사용 - 공개 34 file 허걱 2009.08.19 6491
44 이동 및 탈것 동료가 따라다니게 하는 스크립트 59 file 아방스 2008.01.23 6516
43 미니맵 KGC 미니맵 스크립트 (한글번역) 45 file 레오 2009.02.01 6555
42 메뉴 매우 간단명료한 메뉴. 32 file 비극ㆍ 2010.04.23 6619
41 상점 스킬 샾 스크립트 2.0 48 아방스 2008.03.05 6628
40 스텟포인트 배분하기 88 file RPGbooster 2008.10.08 6637
39 이름입력 한글로 이름 입력하는 스크립트입니다. 55 file 헤르코스 2009.03.18 6662
38 온라인 넷VX - 온라인 스크립트 29 아방스 2009.01.06 6749
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32