질문과 답변

Extra Form

상점에서 되팔기를 하면 보통 2분의 1 가격으로 되팔기가 되잖아요.

이걸 4분의 1 가격으로 조정하려는데 어떻게 해야할지 감이 안잡히네요

스크립트로 해보려고 열어봤는데..

window_shopsell 스크립트를 한번 올려볼게요

 

 

#==============================================================================
# ■ Window_ShopSell
#------------------------------------------------------------------------------
#  숍 화면에서, 매각을 위해서 소지 아이템의 일람을 표시하는 윈도우입니다.
#==============================================================================

class Window_ShopSell < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 640, 352)
    @column_max = 2
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● 아이템의 취득
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    for i in 1...$data_weapons.size
      if $game_party.weapon_number(i) > 0
        @data.push($data_weapons[i])
      end
    end
    for i in 1...$data_armors.size
      if $game_party.armor_number(i) > 0
        @data.push($data_armors[i])
      end
    end
    # 항목수가 0 이 아니면 비트 맵을 작성해, 전항목을 묘화
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 항목의 묘화
  #     index : 항목 번호
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    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
    # 매각 가능하면 통상 문자색에, 그렇지 않으면 무효 문자색으로 설정
    if item.price > 0
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.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, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● 헬프 텍스트 갱신
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

 

어딜 손대야 하는지 모르겠더라구요 ~

2라는 2는 죄다 4로도 바꾸어봤는데...

아니면 다른 스크립트를 고쳐야하는건가요 ?


 

Comment '1'
  • ?
    타케찌 2011.04.18 05:40

    아 죄송합니다.. 저는 스크립트 왕초보라서 답변을 못드리겠군요..ㅠㅠ


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12451
RMXP RPG XP 게임을 역전재판 처럼 만드는법 5 RPGXPMAN 2011.01.05 1754
RMXP RPG XP 게임실행 오류... 도와주세요!!! 1 file 블라블라 2012.01.08 4833
RMXP rpg xp 게임 실행 6 file SerenJU 2013.02.22 3048
RMXP RPG XP 게임 시작하기 전에 안내문 만드는데 스크립트 사용에 대해 4 허곰탱 2014.03.04 993
툴선택 RPG XP VS RPG VX ACE 5 Mr멜론 2013.10.24 2095
RMXP rpg xp rpg vx 캐릭터 질문 2 레고 2012.10.02 5314
RMXP rpg xp bgm me가 전혀 들리지 않네요 ㅠㅅㅠ 3 진공청소기 2016.02.17 194
RMXP rpg xp ASX를 기반으로 만드는법 1 티케이 2011.01.31 511
RMXP RPG XP 2003(?)에서 이벤트로 거울을 만들었습니다만, 거울을 몇번 엔터키를 누르면 갑자기 다른말이 나오게 하고 싶습니다 1 비두 2016.07.10 254
RMXP rpg xp 1.02버전 있나요? 1.00버전말고! 2 오매갓 2012.01.18 2571
RMXP RPG XP ) 메뉴스크립트 오류 5 file ABIS 2013.07.25 1040
GM RPG XP 3 file 준규오니 2011.02.15 2033
RMXP RPG xp 3 dkfdktyq 2012.01.17 2781
RMVX rpg vx타일관련해서,.. 2 file 모시코 2015.03.12 237
RMVX rpg vx에서 파일이 사라지는 현상 l아방스l 2011.09.22 1440
RMVX rpg vx에서 이동속도를 6보다 높게 만들고싶습니다. 1 감사,합니다 2014.01.24 1691
RMVX rpg vx에서 액알 가능 하나요? 4 file 사현 2014.04.12 1621
RMVXA rpg vx에서 쓰던 스크립트를 ace에서 쓸수있나요? 3 슈퍼메이저 2012.07.28 1651
RMVX RPG VX에서 몬스터칩 삽입하는 방법좀요 7 file SimSimiRPG 2013.01.16 2937
RMVX RPG VX에서 "레벨업 퀘스트" 나 "레벨 마크" 정하는 방법 있을까여?.? 2 쿠쿠밥솥 2011.09.25 1998
Board Pagination Prev 1 ... 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 ... 516 Next
/ 516