질문과 답변

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 12392
플러그인 사용 RMMV YEP_Battle A.I core를 이용해서 적의 행동패턴을 짜다가 문제가 생겼습니다. 2 file 프랑도르 2021.07.23 90
RMVXA 이름입력의 처리에서 한 명이 아니라 여러명의 이름을 동시에 바꾸는 법 앨리스사마 2018.08.29 90
스크립트 작성 RMMV 플러그인 내에 있는 스크립트를 수정하고 싶은데 어디를 어떻게 바꿔야 할 지 모르겠습니다 1 file PPPL 2019.11.12 90
에러 해결 RMMV data 파일에있는.json파일이 깨지면 복구는 힘드나요? 폭광 2021.04.17 89
이벤트 작성 RMVX 이벤트가 이벤트를 따라가게 하기 1 수학의정석 2018.12.30 89
기본툴 사용법 RMMV 자작 맵칩을 데이터베이스에 적용하고 맵을 만들었는데 블럭이 투명화가 돼서 나와요 1 퐁핑퐁 2019.07.01 89
기타 아방스추천작에서 1 김승욱 2018.10.09 89
RMVXA 초당 마나 감소 1 퀼트 2017.09.01 89
RMVXA ace 스텟한계 돌파질문드려요 서냥 2016.12.17 89
RMMV 혹시 fly 플러그인 아는분 계세요? 잠행인 2016.10.11 89
RMVXA 게임이 도중에 멈추는데 수정을할수가없습니다 1 지나가던팬더 2016.09.18 89
RMMV Load 가 안돼여 ㅠㅠㅠ 닌텐도원숭이 2016.06.06 89
RMVXA 반복 움직임 질문 1 file 아쳐 2015.12.05 89
스크립트 작성 RMVXA 선택을 해야지 그래픽이 보이도록하고 싶습니다. 2 라임오렌지나무 2020.08.30 89
플러그인 추천 RMMV npc 이동 1 코기 2020.02.09 89
기타 RMVXA 흑백 스킬 애니메이션을 만들었는데 검은 색이 계속 투명처리가 됩니다 2 file 오황불 2020.12.31 89
RMVXA 이벤트 실행 내용에 '액터 mp증가' 적용 시키는 법 좀 알려주세요. 3 kymanj 2018.03.20 89
스크립트 사용 RMMV 스크립트의 변수,스위치 설정 단축명령어가 있을까요? 1 wkdrn33 2019.03.28 89
에러 해결 RMMV actors.json 를 읽을 수 없습니다 오류 겜만들고싶다앙 2020.09.05 89
RMMV 논 타겟 전투 플러그인이나 강좌가 있나요? najongjine 2017.03.15 89
Board Pagination Prev 1 ... 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 ... 516 Next
/ 516