RPGXP 스크립트
2013.10.12 21:20

퀘스트 스크립트

조회 수 3100 추천 수 2 댓글 21
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 수정 삭제


 1.PNG

2.PNG

위에 그림처럼 나오게 합니다.

퀘스트 창 나오게 하기전에

# 주의사항 :
# 퀘스트가 하나도 없을시에는 에러가 납니다

 


# 퀘스트 로그 시스템
# game_guy 가이 만듬
# 빗자루씨 번역
# Version 3.0
#-------------------------------------------------------------------------------
# 간략한 소개:
# 퀘스트를 만들수 있는 스크립트 입니다.
#
# 구성 요소:
# 퀘스트가 완료되었을때 이름을 노란색으로 표시합니다.
# 퀘스트를 만들기 쉬워집니다.
# 존나게 긴 퀘스트를 만들수 있습니다.
# 그림을 띄워서 설명할 수 있습니다.
# 퀘스트를 추가하고 쉽게 클리어 할수 있습니다.
# 다른 쉬운 버전보다 가볍습니다.
#
# 설치방법:
# 조금 아래를 내려다보면 # 이 보입니다. 아래에 있는 대로 하세요..
# 이벤트 설정에서 스크립트 실행으로 아래를 응용할수 있습니다.
#
# 스크립트 목록:

#이벤트에 스크립트 에 써주면 됩니다.
# Quest.add(id) ~ 퀘스트(id)를 리스트에 추가합니다.
# Quest.take(id) ~ 퀘스트(id)를 리스트에서 삭제합니다.
# Quest.complete(id) ~ 퀘스트(id)를 완료합니다.
# Quest.completed?(id) ~ 퀘스트(id)를 완료했을때 값을 true로 돌립니다..
# Quest.has?(id) ~ 퀘스트(id)를 받았는지 확인합니다.
# $scene = Scene_Quest.new ~ 퀘스트 메뉴를 엽니다.

#
# 주의사항 :
# 퀘스트가 하나도 없을시에는 에러가 납니다.
# 적어도 퀘스트가 하나라도 있을때 퀘스트 창을 열수 있게 해주세요.
#
# 크레딧:
# game_guy ~ 이거 만들었습니다.
# 베타 테스터 ~ Sally and Landith
# Blizzard ~ 이 사람의 코드에서 조금 배꼈다고 하는군요.
# 빗자루씨 ~ 이거 번역한사람입네다.
#===============================================================================
module GameGuy
  #==================================================
  # Begin Config
  # UsePicture ~ true값으로 지정되었을때 그림을
  #              퀘스트창에 표시합니다만 false일때는 안합니다.
  #==================================================
  UsePicture   = false
  def self.qpicture(id)
    case id
    #==================================================
    # 퀘스트 그림
    # when x then return "그림" 방식으로 추가합니다.
    # x = id, 그림 = quotes 안에 있는 그림
    #==================================================
    when 1 then return "ghost"

    end
    return nil
  end
 
  def self.qname(id)
    case id
    #==================================================
    # 퀘스트 이름
    # when x then return "이름" 방식으로 추가합니다.
    # x = id, 이름 = quotes 안에 있는 이름
    #==================================================
    when 1 then return "첫번째 마을"
    #when 9 then return

     
    end
    return ""
  end
     $q = [0]
   for x in 1...600
   $q[x] = self.qname(x)
   end
  def self.qlocation(id)
    case id
    #==================================================
    # 퀘스트 장소
    # x = id, 장소 = quotes 안에 있는 장소
    #==================================================
    when 1 then return "마을"
    end
    return "????"
  end
 
  def self.qdescription(id)
    case id
    #==================================================
    # 퀘스트 설명
    # when x then return "설명" 방식으로 추가합니다.
    # x = id, 설명 = quotes 안에 있는 설명
    #==================================================
    when 1 then return " 나는 여행중에 첫번째 마을을 만나게될껏이다."end
    return ""
  end
 
end

module Quest
 
  def self.add(id)
    $game_party.add_quest(id)
  end
 
  def self.take(id)
    $game_party.take_quest(id)
  end
 
  def self.complete(id)
    $game_party.complete(id)
  end
 
  def self.completed?(id)
    return $game_party.completed?(id)
  end
 
  def self.has?(id)
    return $game_party.has_quest?(id)
  end
 
end
 
class Game_Party
 
  attr_accessor :quests
  attr_accessor :completed
 
  alias gg_quests_lat initialize
  def initialize
    @quests = []
    @completed = []
    gg_quests_lat
  end
 
  def add_quest(id)
    unless @quests.include?(id)
      @quests.push(id)
    end
  end
 
  def completed?(id)
    return @completed.include?(id)
  end
 
  def complete(id)
    unless @completed.include?(id)
      if @quests.include?(id)
        @completed.push(id)
      end
    end
  end
 
  def has_quest?(id)
    return @quests.include?(id)
  end
 
  def take_quest(id)
    @quests.delete(id)
    @completed.delete(id)
  end
 
end
class Scene_Quest
  def main
    @quests = []
    for i in $game_party.quests
      @quests.push(GameGuy.qname(i))
    end
    @map = Spriteset_Map.new
    @quests2 = []
    for i in $game_party.quests
      @quests2.push(i)
    end
    @quests_window = Window_Command.new(160, @quests)
    @quests_window.height = 480
    @quests_window.back_opacity = 110
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    @quests_window.dispose
    @quest_info.dispose if @quest_info != nil
    @map.dispose
  end
  def update
    @quests_window.update
    if @quests_window.active
      update_quests
      return
    end
    if @quest_info != nil
      update_info
      return
    end
  end
  def update_quests
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(1)
      return
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @quest_info = Window_QuestInfo.new(@quests2[@quests_window.index])
      @quest_info.back_opacity = 110
      @quests_window.active = false
      return
    end
  end
  def update_info
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @quests_window.active = true
      @quest_info.dispose
      @quest_info = nil
      return
    end
  end
end
class Window_QuestInfo < Window_Base
  def initialize(quest)
    super(160, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    @quest = quest
    refresh
  end
  def refresh
    self.contents.clear
    if GameGuy::UsePicture
      pic = GameGuy.qpicture(@quest)
      bitmap = RPG::Cache.picture(GameGuy.qpicture(@quest)) if pic != nil
      rect = Rect.new(0, 0, bitmap.width, bitmap.height) if pic != nil
      self.contents.blt(480-bitmap.width-32, 0, bitmap, rect) if pic != nil
    end
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 480, 32, "퀘스트:")
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 32, 480, 32, GameGuy.qname(@quest))
    self.contents.font.color = system_color
    self.contents.draw_text(0, 128, 480, 32, "장소:")
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 160, 480, 32, GameGuy.qlocation(@quest))
    self.contents.font.color = system_color
    self.contents.draw_text(0, 192, 480, 32, "완료 여부:")
    self.contents.font.color = normal_color
    if $game_party.completed.include?(@quest)
      self.contents.font.color = crisis_color
      self.contents.draw_text(0, 224, 480, 32, "완료")
    else
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 224, 480, 32, "진행중")
    end
    self.contents.font.color = system_color
    self.contents.draw_text(0, 256, 480, 32, "스토리 설명:")
    self.contents.font.color = normal_color
    text = self.contents.slice_text(GameGuy.qdescription(@quest), 460)
    text.each_index {|i|
        self.contents.draw_text(0, 288 + i*32, 460, 32, text[i])}
  end
end
class Bitmap
 
  def slice_text(text, width)
    words = text.split(' ')
    return words if words.size == 1
    result, current_text = [], words.shift
    words.each_index {|i|
        if self.text_size("#{current_text} #{words[i]}").width > width
          result.push(current_text)
          current_text = words[i]
        else
          current_text = "#{current_text} #{words[i]}"
        end
        result.push(current_text) if i >= words.size - 1}
    return result
  end

end

 

 

 

?
  • ?
    Ruit 2013.10.12 21:41
    감사합니다
  • ?
     운 2013.10.12 21:58
    네 ㅎㅎ
  • ?
    두부 2013.10.12 21:43
    예제 파일 같은거 보여줄수 없나요?
    ㅠㅠ 어떻게 쓰는지 모르겠네요...
  • ?
     운 2013.10.12 22:15
    예제는 스크립트를사용못하거나,오류있는분들을 위해, 그의스크립트작동되는 Game.exe 입니다.
  • ?
    Ruit 2013.10.12 22:04
    ㅈ....저...이런말해도되나요..?초짜가 궁금해서..물어봅니다..ㅠ...ㅇ..예제가뭔가요..?전부터 궁금해서 미치긋음..
  • ?
     운 2013.10.13 01:10
    알겠습니다.
  • ?
    두부 2013.10.13 01:00
    여기 게시판에 올려주세여
  • ?
     운 2013.10.12 21:56
    예제 파일 어디에다 올려두는지 모르겠네요., 최신게임에 올려두기엔 그런데.,
  • ?
    카티스 2013.10.14 03:55
    으어어 사용법을 모르겟어요ㅜㅡ
  • ?
    ↑고수의길↑ 2013.10.14 04:52
    예제좀...
    True값 돌리는거 어떻게 하는지.
  • ?
    카티스 2013.10.14 06:47
    예제좀요...
    할주를 모르겟음.
  • ?
    카티스 2013.10.15 02:28
    예..예제가 필요해요..
    이해를..
  • ?
    카티스 2013.10.15 03:23
    으잇;;
  • ?
     운 2013.10.15 03:15
    나중에 예제 해드리겠습니다.
  • ?
    카티스 2013.10.15 03:05
    그러면 그럴 스크립트에넣고
    어디에 뭐라쳐야 돼는거죠;; 죄송합니다..
  • ?
     운 2013.10.15 03:01
    Xp 입니다. 모바일굳ᆞㅇ
  • ?
    카티스 2013.10.15 02:58
    rpgxp에서는 불가능한가요?
  • ?
     운 2013.10.15 02:46
    알만툴 에서 툴가시고 스크립트 가셔서,
    위에 스크립트를 복사해 , 알만툴에서 새로 스크립트 만들기 한다음, 붙여놓기
  • ?
    카티스 2013.10.15 02:42
    네..넵!
    근데 이거 사용을 어떻게 하는건지...
  • ?
     운 2013.10.15 02:39
    시간되면 예제 올리도록할게요.
  • ?
    빛소리 2014.03.01 23:57
    감사합니다.

  1. 타이틀 로고 띄우기 + 로고 SE 가능(예제있음)

    Date2013.12.13 CategoryRPGXP 스크립트 By데노제 Views2391 Votes3
    Read More
  2. 메세지에 얼굴, 이름등 다양한 기능 넣기 UMS 스크립트

    Date2013.12.10 CategoryRPGXP 스크립트 By데노제 Views1616 Votes0
    Read More
  3. 모션 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2053 Votes0
    Read More
  4. 아이템 조합 스크립트

    Date2013.12.06 CategoryRPGXP 스크립트 By 운 Views2712 Votes0
    Read More
  5. 이름조합스크립트

    Date2013.10.27 CategoryRPGXP 스크립트 ByScissor Views2764 Votes0
    Read More
  6. 문과 상자를 쉽게 만들수 있는 스크립트

    Date2013.10.21 CategoryRPGXP 스크립트 By Views2242 Votes0
    Read More
  7. 메뉴에 퀘스트 있는거

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views1957 Votes2
    Read More
  8. 퀘스트 스크립트

    Date2013.10.12 CategoryRPGXP 스크립트 By 운 Views3100 Votes2
    Read More
  9. 로고를 띄우는 스크립트

    Date2013.10.07 CategoryRPGXP 스크립트 ByXEONSOFT블로그 Views1678 Votes0
    Read More
  10. 맵이름 표시 스크립트

    Date2013.10.05 CategoryRPGXP 스크립트 By 운 Views2244 Votes0
    Read More
  11. 요청하신 게이지바 스크립트 입니다.

    Date2013.10.04 CategoryRPGXP 스크립트 By소년영남 Views1921 Votes1
    Read More
  12. 파이널 판타지 7 스타일 메뉴

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2024 Votes0
    Read More
  13. 미니맵 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2177 Votes0
    Read More
  14. 부활 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views2765 Votes0
    Read More
  15. 발소리 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1730 Votes0
    Read More
  16. 메뉴 스크립트 Zer0 CMS

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1384 Votes0
    Read More
  17. 상점에서 아이템 능력치를 표시해주는 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1656 Votes0
    Read More
  18. 대기 회복 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1076 Votes0
    Read More
  19. 복권 스크립트

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1146 Votes0
    Read More
  20. 아이템 갯수 제한

    Date2013.10.01 CategoryRPGXP 스크립트 By Views1061 Votes0
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 15 Next
/ 15






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)