질문과 답변

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 12391
RMVX NPC 머리위에 이름 팝업시키는 스크립트.. 스트링호 2011.01.09 624
RMXP 캐릭터 만드는 법 4 file choi 2011.01.09 786
RMVX 완전초보자를 위한 강의좀 2 구운사과 2011.01.09 662
RMVX VX심각합니다. 여적만든게 물거품이 되는순간 2 file fwnekf 2011.01.09 606
RMVX 오메가퀘스트 메뉴에서호출말고 NPC를 통해서 호출이요~ 1 스트링호 2011.01.09 636
RMXP 캐릭터 만드는 법 4 file choi 2011.01.09 736
RMXP 장비고정에관하여... 1 M4A1 Blcak Custom 2011.01.09 583
RMVX 전투시 공격 기술과 스킬기술 알3 2011.01.09 535
RMVX 어떤 상태일때 표적율올리는 스크립트(패시브 x ) 있나요? 스트링호 2011.01.09 480
RMVX KGC 파라미터 배분 09/07/25 을 NPC통해 불러오기 스크립트 수정좀도와주세요ㅜ 2 스트링호 2011.01.09 562
RMXP 월드맵 관련해서 질문합니다. 2 RMadrid 2011.01.09 584
RMVX 메모 같은것 보기.... 1 프라임헌터즈 2011.01.08 520
RMXP 통행 설정할때요.. 3 삼국지짱 2011.01.08 555
RMVX 게임의 색조변경, 게임 내 아이템 장착과 사용에 관한 질문(꼭 답해주세요!!!) 1 비공개아이디 2011.01.08 596
RMVX 기초 1 아방스친구 2011.01.08 424
RMVX 주인공캐릭터 2 아방스친구 2011.01.08 627
RMXP 아이템 줍는법 3 오니다운중''' 2011.01.08 965
RMXP 동료 오니다운중''' 2011.01.08 627
RM2k 지도관련문제 1 adfgh 2011.01.08 1251
RMVX 오메가퀘스트나 KGC파라미터배분 메뉴말고 NPC나아이템통해서 불러오기.. 1 스트링호 2011.01.07 719
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