질문과 답변

Extra Form

저번에 파라미터 배분 호출에 관하여 질문드렸던 RPGVX 유저입니다. ^^

파라미터를 해결하고나니 오메가퀘스트에서 발목을 또 붙잡혔네요ㅜㅜ

메뉴말고 NPC를 통해서 호출할려고 하는데

어디를 수정해야될지 난참하네요.

나름 스크립트를 많이 스크랩해가서 좀 대충(?) 어떤 줄에 어떤 내용인건

알겠지만 감으로 여러번 수정을 해보고 테스트해봤지만 계속 안되네요ㅜㅜ

 

부탁드립니다 ㅜㅜ 

 

 

 

# =============================================================================
#                Extended Omegas7's Ultimate Quest System Script.
# =============================================================================
#   Author: Leo (Original author: Omegas7)
#   Version: 1.1
#   Omega7's Site: baseomega.forumer.com
# =============================================================================
#   [오메가 퀘스트 확장판_패치 ver. 1.1 update:10.09.26]
# =============================================================================
#      > 수주한 퀘스트가 특정 갯수를 넘어가면 스크롤이 되지 않고
#         화면에서 글자가 잘리는 현상 수정
# =============================================================================
#   [오메가 퀘스트 확장판 ver. 1.0]
# =============================================================================
#   추가된 사항:
#      > Background 및 HUD 이미지를 사용하지 않음
#      > 필수퀘스트/일반퀘스트 구분 가능 (필수퀘스트 주황색, 일반퀘스트 흰색)
#      > [퀘스트 포기하기] 기능 추가 (필수퀘스트는 포기할 수 없음)
#      > 퀘스트 포기시 자동적으로 변수값 해제
#
# =============================================================================
#   [오메가 퀘스트 ver. 3.0] 특징 및 소개
# =============================================================================
#   특징:
#     > 간단한 스크립트 작성으로 퀘스트 생성 가능
#     > 스위치를 이용하지 않고 변수를 이용하는 시스템
#     > 각 퀘스트에 대한 상세내용 표시 기능.
#     > 퀘스트 내용에 변수값 표시 가능
#     > 퀘스트 완료시 자동적으로 [퀘스트 완료]에 내용 표시
#     > 글자 크기 조절 가능
# =============================================================================

module OMEGAS7
  module QUEST
    # =========================================================================
    #  Configuration Options.
    # =========================================================================
   
    #  MAP 또는 MENU 둘 중 어디로 돌아갈지 설정
    EXIT_TO = "MAP"
    # 만일 MENU라면, 어떤 slot이 나타나게 할 것인가? (시작은 0부터 )
    MENU_RETURN_SLOT = 5

    # 폰트 사이즈 설정
    QUESTS_FONT_SIZE = 13
    TASKS_FONT_SIZE = 16
   
    # 카테고리 아이콘의 인덱스 설정
    # [수주한 퀘스트,퀘스트 포기하기,완료한 퀘스트]
    CATEGORY_ICONS = [2260, 2262, 2319]
   
    # =========================================================================
    QUESTS = []               # 수정하지 마세요!!!!!!!!!!!!!!!
    TASKS = []                 # 수정하지 마세요!!!!!!!!!!!!!!!
    DESCRIPTIONS = []     # 수정하지 마세요!!!!!!!!!!!!!!!
    # =========================================================================
   
    QUESTS[0] = ['용사증명! 가고일 처치',1,nil,true]
    TASKS[0] = ['- 가고일 처치',
                        '- 퀘스트왕궁 국왕에게 보고']
    DESCRIPTIONS[0] = ['퀘스트필드에는 퀘스트왕국을 괴롭히는',
                                    '가고일이 어슬렁거리고 있다.',
                                    '가고일을 처치하여 용사임을 증명하자!']
                                   
    QUESTS[1] = ['나를 위해 꽃을!',2,3,false]
    TASKS[1] = ['- 퀘스트필드에서 분홍색 꽃 채집 (v[3]/v[4])',
                        '- 퀘스트왕궁 마법사에게 납품']
     DESCRIPTIONS[1] = ['퀘스트필드에 피는 분홍색 꽃을 꺾어',
                                    '퀘스트왕궁에 있는 마법사에게 주자']
   
    QUESTS[2] = ['멍청한 해골병사',5,6,false]
    TASKS[2] = ['- 퀘스트필드에서 해골병사 퇴치 (v[6]/v[7])',
                        '- 퀘스트왕궁 기사에게 보고']
    DESCRIPTIONS[2] = ['퀘스트필드에 멍청하게 돌아다니고 있는',
                                    '해골병사를 퇴치하자. 해골병사 앞에서',
                                    '엔터키 한번 누르면 된다. 퀘스트 완료후',
                                    '퀘스트왕궁 기사에게 보고하자']   

  end
end

class Omega_Quest < Scene_Base
  include OMEGAS7::QUEST

  def initialize
    @index = 0
    @mode = 0
    @empty_list = false
    create_menu_background   
    create_quest_list
    create_quest_commands
    create_quest_description
    create_category
  end 
  def create_quest_list
    @list = []
    @list[0] = []
    @list[1] = []
    @list[2] = []
    for i in 0...QUESTS.size
      if $game_variables[QUESTS[i][1].to_i].to_i > TASKS[i].size
        @list[2][i] = [QUESTS[i][0].to_s,true,i]
      elsif $game_variables[QUESTS[i][1].to_i].to_i > 0
        @list[0][i] = [QUESTS[i][0].to_s,false,i]
        @list[1][i] = [QUESTS[i][0].to_s,false,i]
      end
    end
    @list[0].compact!
    @list[1].compact!
    @list[2].compact!
    @list.compact!
    if @list[0].empty?
      @empty_list = true
    end
  end
  def create_quest_commands
    create_quest_list  
    @command_window = Window_Quest_Command.new(280,@list[@mode])
    @command_window.y = 56
    @command_window.x = 0
    @command_window.opacity = 255
    @index = @command_window.index
  end
  def create_quest_description
    @window_description = Window_Base.new(280,56,264,360)
    @window_description.contents.font.size = QUESTS_FONT_SIZE
    @window_description.opacity = 255
    refresh_description
  end
  def refresh_description
    @window_description.contents.clear
    if @list[@mode][@command_window.index][2] != nil
      length = DESCRIPTIONS[@list[@mode][@command_window.index][2]].size
      for i in 0...length
        txt = DESCRIPTIONS[@list[@mode][@command_window.index][2]][i].to_s
        @window_description.contents.font.color = Color.new(255,255,255)
        @window_description.contents.draw_text(0,18*i,260,18,txt.to_s)
      end
      @tasks = [] 
      for i in 0...TASKS[@list[@mode][@command_window.index][2]].size
           @tasks[i] = TASKS[@list[@mode][@command_window.index][2]][i].to_s      
      end
      @display = []    
      for i in 0...@tasks.size
        @display[i] = @tasks[i].clone
        @display[i].to_s.gsub!(/V[([0-9]+)]/i) { $game_variables[$1.to_i] }
        @display[i].to_s.gsub!(/V[([0-9]+)]/i) { $game_variables[$1.to_i] }
        if $game_variables[QUESTS[@list[@mode][@command_window.index][2]][1].to_i].to_i > i+1
          @window_description.contents.font.color = Color.new(100,100,100)
        else
          @window_description.contents.font.color = Color.new(255,255,0)
        end
        @window_description.contents.draw_text(4,18*(1+length)+18*i,260,18,@display[i].to_s)
      end
    end
  end 
  def update
    @command_window.update
    @category.update
    if @mode != @category.index
      @mode = @category.index
      @command_window.dispose
      create_quest_commands
      refresh_description
    end
    if @index != @command_window.index
      @index = @command_window.index    
      refresh_description
    end
    if Input.repeat?(Input::DOWN) ||  Input.trigger?(Input::DOWN)
        if@command_window.index == @command_window.bottom_row
          @command_window.draw_window
          @command_window.refresh
        elsif @command_window.row_max != @command_window.bottom_row+2
          @command_window.top_row = 0
          @command_window.draw_window
          @command_window.refresh
        elsif @command_window.index == @command_window.top_row
          @command_window.top_row = 0
          @command_window.draw_window
          @command_window.refresh
        end
    end
    if Input.repeat?(Input::UP) ||  Input.trigger?(Input::UP)
      if @command_window.index == @command_window.top_row
        @command_window.draw_window
        @command_window.refresh
      elsif @command_window.index ==  @command_window.bottom_row
        @command_window.top_row = @command_window.bottom_row-@command_window.page_item_max+1
        @command_window.draw_window
        @command_window.refresh
      end
    end
    if Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] != nil
      # Quest abandon window call
      if @mode == 1
          if QUESTS[@list[@mode][@command_window.index][2]][3] == false
              @command_window.dispose
              @window_description.dispose
              @category.dispose
              $scene = Quest_Abandon_View.new(250, @list[@mode][@command_window.index][2])
         else
              Sound.play_buzzer
         end
      end
    end 
    if Input.trigger?(Input::B)
      finish
    end
  end
  def create_category
    @category = Window_Categories_Command.new(544)
    @category.opacity = 255
    @category.x = 0
    @category.y = 0
  end 
  def finish   
    @command_window.dispose
    @window_description.dispose
    @category.dispose
    case EXIT_TO
    when "MENU"
      $scene = Scene_Menu.new(MENU_RETURN_SLOT)
    when "MAP"
      $scene = Scene_Map.new
    end
  end
end

#--------------------------------------------------------------------------
# ● 퀘스트 포기 화면 출력
#--------------------------------------------------------------------------
class Quest_Abandon_View < Scene_Base
  include OMEGAS7::QUEST
  def initialize(width, id)
    @width = width
    @id = id
    @index=1
    create_window
  end
  def create_window  
    @window = Quest_Abandon_Command.new(@width)
    @window.index = @index
    @quest_title= Window_Base.new(48,112,496,64)
    @quest_title.opacity = 0
    @quest_title.contents.font.color = Color.new(255,0,0)
    @quest_title.contents.draw_text(0,0,496,32,QUESTS[@id][0].to_s)
  end
  def update
    @window.update
    if @index != @window.index
      @index = @window.index
    end
    if Input.trigger?(Input::C)
      if @index != 1
        $game_variables[QUESTS[@id][1].to_i]=0
        $game_variables[QUESTS[@id][2].to_i]=0  if QUESTS[@id][2] != nil
      end
      @window.dispose
      @quest_title.dispose
      $scene = Omega_Quest.new
    end
    if Input.trigger?(Input::B)
      @window.dispose
      @quest_title.dispose
      $scene = Omega_Quest.new
    end
  end
end

#--------------------------------------------------------------------------
# ● 퀘스트 포기 화면 처리
#--------------------------------------------------------------------------
class Quest_Abandon_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, column_max = 2, row_max = 1, spacing = 32)
    super((544/2)-(width/2), (416/2)-((row_max * WLH + 32)/2), width, row_max * WLH + 32, spacing)
    @commands = [' 확 인 ',' 취 소 ']
    @item_max = commands.size
    @column_max = column_max
    @width=width
    draw_window 
    refresh
    self.index = 0
  end
  def draw_window
     self.contents = Bitmap.new(width - 32,  (bottom_row+1) * WLH)
  end  
  def refresh
    self.contents.clear
    for i in top_row...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.size = 18
    self.contents.draw_text(rect.x,rect.y,@width/2,24,@commands[index]) 
  end
end

#--------------------------------------------------------------------------
# ● 퀘스트 수락/완료 항목 표시
#--------------------------------------------------------------------------
class Window_Quest_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
    @commands = commands
    @is_empty = 1
    if @commands.empty?
      @commands[0] = ["임무가 없습니다.",false]
      @is_empty = 0
    end  
    if row_max == 0
      row_max = (@commands.size + column_max - 1) / column_max
    end
    super(0, 0, width, 360, spacing)
    @item_max = commands.size
    @column_max = column_max
    draw_window   
    refresh
    self.index = 0
  end
  def draw_window
     self.contents = Bitmap.new(width - 32,  (bottom_row+1) * WLH)
     self.contents.font.size = TASKS_FONT_SIZE   
  end  
  def refresh
    self.contents.clear
    for i in top_row...@item_max
      draw_item(i)
    end
  end
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    if @is_empty == 1
      if QUESTS[@commands[index][2]][3] == true
         self.contents.font.color = Color.new(255,100,0)
      else
         self.contents.font.color = Color.new(255,255,255)
       end
    else
       self.contents.font.color = Color.new(255,255,255)
    end
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index][0].to_s)
  end
 
end


#--------------------------------------------------------------------------
# ● 완료/진행중/수주 카테고리 표시
#--------------------------------------------------------------------------
class Window_Categories_Command < Window_Selectable
  include OMEGAS7::QUEST

  attr_reader   :commands

  def initialize(width, column_max = 3, row_max = 1, spacing = 32)
    super(0, 0, width, row_max * WLH + 32, spacing)
    @commands = [' 수락한 임무',' 임무 포기하기',' 완료한 임무']
    @item_max = commands.size
    @column_max = column_max
    @icons = CATEGORY_ICONS   
    refresh
    self.index = 0
  end 
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i)
    end
  end

  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    draw_icon(@icons[index],rect.x,rect.y)
    self.contents.font.size = 16
    self.contents.draw_text(rect.x+24,rect.y,132,24,@commands[index]) 
  end
end

 

#--------------------------------------------------------------------------
# ● Scene_menu에 '퀘스트' 항목 추가
#--------------------------------------------------------------------------
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # ● 커멘드 윈도우의 작성
  #--------------------------------------------------------------------------
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = '퀘스트'
    s7 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6,s7])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # 파티 인원수가 0 명의 경우
      @command_window.draw_item(0, false)     # 아이템을 무효화
      @command_window.draw_item(1, false)     # 스킬을 무효화
      @command_window.draw_item(2, false)     # 장비를 무효화
      @command_window.draw_item(3, false)     # 스테이터스를 무효화
    end
    if $game_system.save_disabled             # 세이브 금지의 경우
      @command_window.draw_item(4, false)     # 세이브를 무효화
    end
  end
  #--------------------------------------------------------------------------
  # ● 커멘드 선택의 갱신
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0      # 아이템
        $scene = Scene_Item.new
      when 1,2,3  # 스킬, 장비, 스테이터스
        start_actor_selection
      when 4      # 세이브
        $scene = Scene_File.new(true, false, false)
      when 5      # 퀘스트
        $scene = Omega_Quest.new
      when 6      # 게임 종료
        $scene = Scene_End.new
      end
    end
  end 
end

Comment '1'
  • profile
    쉰라면블랙 2012.01.09 22:41

     $scene = Omega_Quest.new
    이벤트 스크립트에 갔다 밖으면 100퍼 됍니다.

    이거는 스크립트마다 다 달라요.. 저기 님이 올리신 위 스크립트에 찾으면 나옵니다.

    다른 것도 이렇게 찾아서 하면돼요.


List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12456
RMVXA 갑작스럽게 스크립트가 되지 않는 것 같습니다. Nagunt 2014.11.15 272
여러분들 제가 rpg xp 정품을삿는데요.. 4 제시오니 2016.02.10 272
RMVXA 던전크롤이나 기타로그라이크에서처럼 제가 한번 움직이면 적도 한번 움직이는 턴제를 구현할 수 있나요? 4 unknown 2015.03.01 272
플러그인 사용 RMMV 게임 중에 시스템의 효과음을 바꾸고 싶습니다. 2 JDG 2020.11.22 272
RMMV 윈도우의 안쪽이 투명하게 나와요 6 file 구슯 2018.06.10 273
RMVXA 그림 선택지를 만들고 싶은데 어떻게 만들어야 하나요? 3 피로zzZ 2015.09.17 273
RMVXA 특정 장소로 달려가는 이벤트를 많이 만들고 싶습니다 1 커세어리버 2014.11.24 273
RMVXA 페이스칩 크기 어떻게 늘리나요?(수정) 1 국허 2015.05.26 273
RMVXA 알만툴에서 스태미나 시스템이나 육성 요소를 구현할 수 있나요? 2 샤나이엘 2015.07.10 273
RMVXA 하... 참 이거 어찌하나요? 4 file 게임만들고싶어요 2016.05.05 273
RMVXA vxa하면서 이런오류는 처음입니다 도와주세요!@ 2 file 기커스토리 2014.12.19 274
RMVX 안드로이드 버전 제작 툴은 따로 있는건가요? 6 위리리릴 2015.03.21 274
XP툴 한글패치 질문 1 홈쇼핑 2015.05.30 274
RMVXA 캐릭터의 상태를 메뉴창에 작게 표시하는 방법이나 스크랩트 file 말린귤 2018.02.14 275
RMVX VX 실행오류 tmdgjs9525 2014.11.15 275
기타 rpgvx ace게임 글씨가 너무 어두워서 보이지 않습니다 file nientette 2014.11.18 275
에러 해결 RMMV 실행도중 멈춤 1 Bigorca 2020.11.08 275
기타 RMMV 손전등 효과 화면 중앙으로... 2 MyRPGmaker명작 2020.11.26 275
게임 배포 RMVXA 일본어로 만들어진 게임을 깨지지 않게 배포하려면 어떻게 하나요? 2 퐁이 2022.01.02 275
이벤트 작성 RMMV 조건에 스위치를 3개이상 둘수는 없는건가요? 4 bug 2020.08.24 276
Board Pagination Prev 1 ... 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 ... 516 Next
/ 516