XP 스크립트

제작자 : 준돌






#======================================================================
# ■ Window_ShopStatus
#------------------------------------------------------------------------------
#  숍 화면에서, 아이템의 소지수나 엑터의 장비를 표시하는 윈도우입니다.
#======================================================================

class Window_ShopStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(368, 128, 272, 352)
    self.contents = Bitmap.new(width - 32, height - 32)
    @item = nil
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    if @item == nil
      return
    end
    case @item
    when RPG::Item
      number = $game_party.item_number(@item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(@item.id)
    when RPG::Armor
      number = $game_party.armor_number(@item.id)
    end
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 200, 32, "소지수")
    self.contents.font.color = normal_color
    self.contents.draw_text(204, 0, 32, 32, number.to_s, 2)
    if @item.is_a? (RPG::Item)
      return
    end
    # 장비품 추가 정보
    for i in 0...$game_party.actors.size
      # 엑터를 취득
      actor = $game_party.actors[i]
      # 장비 가능하면 통상 문자색에, 불가능하면 무효 문자색으로 설정
      if actor.equippable? (@item)
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      # 엑터의 이름을 묘화
      self.contents.draw_text(4, 64 + 64 * i, 120, 32, actor.name)
      # 현재의 장비품을 취득
      if @item.is_a? (RPG::Weapon)
        item1 = $data_weapons[actor.weapon_id]
      elsif @item.kind == 0
        item1 = $data_armors[actor.armor1_id]
      elsif @item.kind == 1
        item1 = $data_armors[actor.armor2_id]
      else
        item1 = $data_armors[actor.armor3_id]
      end
      # 장비 가능한 경우
      if actor.equippable? (@item)
        # 무기의 경우
        if @item.is_a? (RPG::Weapon)
          atk1 = item1 != nil ?  item1.atk : 0
          atk2 = @item != nil ?  @item.atk : 0
          str1 = item1 != nil ?  item1.str_plus : 0
          str2 = @item != nil ?  @item.str_plus : 0
          dex1 = item1 != nil ?  item1.dex_plus : 0
          dex2 = @item != nil ?  @item.dex_plus : 0
          agi1 = item1 != nil ?  item1.agi_plus : 0
          agi2 = @item != nil ?  @item.agi_plus : 0
          int1 = item1 != nil ?  item1.int_plus : 0
          int2 = @item != nil ?  @item.int_plus : 0
          change1 = atk2 - atk1
          change4 = str2 - str1
          change5 = dex2 - dex1
          change6 = agi2 - agi1 
          change7 = int2 - int1     
        end
        # 방어용 기구의 경우
        if @item.is_a? (RPG::Armor)
          pdef1 = item1 != nil ?  item1.pdef : 0
          mdef1 = item1 != nil ?  item1.mdef : 0
          pdef2 = @item != nil ?  @item.pdef : 0
          mdef2 = @item != nil ?  @item.mdef : 0
          str1 = item1 != nil ?  item1.str_plus : 0
          str2 = @item != nil ?  @item.str_plus : 0
          dex1 = item1 != nil ?  item1.dex_plus : 0
          dex2 = @item != nil ?  @item.dex_plus : 0
          agi1 = item1 != nil ?  item1.agi_plus : 0
          agi2 = @item != nil ?  @item.agi_plus : 0
          int1 = item1 != nil ?  item1.int_plus : 0
          int2 = @item != nil ?  @item.int_plus : 0
          change2 = pdef2 - pdef1 #+ mdef2 - mdef1
          change3 = mdef2 - mdef1
          change4 = str2 - str1
          change5 = dex2 - dex1
          change6 = agi2 - agi1 
          change7 = int2 - int1
        end
        # 파라미터의 변화치를 묘화
        self.contents.draw_text(124, 64 + 64 * i, 112, 32,
          sprintf("atk%+d", change1), 2)
        self.contents.draw_text(124, 94 + 94 * i, 112, 32,
          sprintf("pdef%+d", change2), 2)
        self.contents.draw_text(124, 124 + 124 * i, 112, 32,
          sprintf("mdef%+d", change3), 2)
        self.contents.draw_text(124, 154 + 154 * i, 112, 32,
          sprintf("str%+d", change4), 2)
        self.contents.draw_text(124, 184 + 184 * i, 112, 32,
          sprintf("dex%+d", change5), 2)
        self.contents.draw_text(124, 214 + 214 * i, 112, 32,
          sprintf("agi%+d", change6), 2)
        self.contents.draw_text(124, 244 + 244 * i, 112, 32,
          sprintf("int%+d", change7), 2)
      end
      # 아이템을 묘화
      if item1 != nil
        x = 4
        y = 64 + 64 * i + 32
        bitmap = RPG::Cache.icon(item1.icon_name)
        opacity = self.contents.font.color == normal_color ?  255 : 128
        self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
        self.contents.draw_text(x + 28, y, 212, 32, item1.name)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 설정
  #    item : 새로운 아이템
  #--------------------------------------------------------------------------
  def item=(item)
    if @item != item
      @item = item
      refresh
    end
  end
end






이건 갈아치우기 용입니다
그냥 찔너넣지 마시고


Window_ShopStatus 섹션안에
이걸 넣으세요 (갈아치우세요)


그런데이건 칸이 모자르다보니
1인용입니다 --;ㅋ


2분만에 만든거라...

곳바로 파티모두 사용가능하게
개조해서 올리도록 하겠습니다 ^^


1인용이라두
필요하시다면
유용하게 사용하시기 바랍니다 ^^;;


(저의 경우 액알스킬의 공격력이 마력으로 지정되기떄문애...)


넣을때 조심하세요 ^^;

Who's 백호

?

이상혁입니다.

http://elab.kr

Atachment
첨부 '2'
Comment '5'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6202
741 전투 KGC_GuardRecover(방어시 HP회복) 4 백호 2009.02.22 1348
740 기타 (T-RPG) 데미지 표시 시의 폰트를 설정 백호 2009.02.22 1349
739 전투 매턴 자동 회복이나 도트힐 3 file 백호 2009.02.22 1352
738 기타 실제시간표시스크립트입니다...[중뷁이면지성;;] 4 백호 2009.02.22 1352
737 장비 KGC_EquipmentBreak(장비품 파괴) 1 백호 2009.02.22 1356
736 기타 빛의 퍼즐 -미니게임- 1 file 백호 2009.02.21 1360
735 기타 Minesweeper(지뢰찾기) by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1363
734 기타 스크린샷 찍는 스크립트 9 file 백호 2009.02.22 1364
733 변수/스위치 지정범위안에 들어오면 특정 스위치를 온/오프/교환 한다!! 2 백호 2009.02.21 1365
732 기타 Chaos Project Debug System 1.06b by Blizzard file Alkaid 2010.09.07 1370
731 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1371
730 이동 및 탈것 플레이어 텔레포트 시키기 1 백호 2009.02.22 1375
729 메뉴 Ring menu edit for SDK2 (Original by Hypershadow180) file Alkaid 2010.09.08 1376
728 기타 [All RGSS] 게임 다중 실행 방지 스크립트 1 file Cheapmunk 2014.05.24 1381
727 기타 CG모드 도입 스크립트 file 백호 2009.02.21 1383
726 이동 및 탈것 금금님 요청 대쉬 1 백호 2009.02.22 1384
725 기타 KGC_UsableWeapon file 백호 2009.02.22 1384
724 스킬 Skills_Consume_Hp[By: Gando] - HP를 소비하는 스킬 스크립트 4 쉴더 2009.02.21 1385
723 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1390
722 메뉴 링메뉴 스크립트 file 백호 2009.02.21 1392
Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ... 52 Next
/ 52