Ayene's Quest Log
Aktualny czas: 28-04-26, 08:23 Witaj! Przejdź do zakładki Logowanie lub Rejestracja


Odpowiedz 
[XP] Ayene's Quest Log
Chyziu Offline
*


Liczba postów: 39
Dołączył: 26-03-14

Pomógł: 0



Post: #11
RE: Ayene's Quest Log

Chciałbym żeby po dodaniu wpisu do dziennika pojawił mi się napis informujący o tym. Da radę jakoś to zrobić?
31-01-15 23:17
Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
Adrapnikram Offline
*


Liczba postów: 571
Dołączył: 04-10-13

Pomógł: 45



Post: #12
RE: Ayene's Quest Log

Odegraj SE: "Jakiś odgłos kartki"
"Wiadomość: Nowy wpis w dzienniku"
Ew. Możesz zrobić na obrazkach np.
Odegraj SE: "Jakiś odgłos kartki"
Pokaż obrazek 1: "Nowy wpis w dzienniku"
Usuń obrazek: 1

Wstaw to po komendzie skryptu. I następnym razem pomyśl zanim o coś poprosisz...
02-02-15 20:21
Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
Athanor Offline
*


Liczba postów: 143
Dołączył: 10-11-13

Pomógł: 7



Post: #13
RE: Ayene's Quest Log

Szybkie i głupie pytanie, można sprawić, aby tylko w tym skrypcie była inna czcionka? Ponieważ ta która używam trochę zmniejsza tekst, oraz nie pasuje też wizualnie.

To jest sygnatura która nikogo nie obchodzi, bo informacje tutaj wypisane są kłamstwem.
Slave:
Gra nigdy nie wyjdzie. Demo gotowe do wrzucenia.
Pożoga:
Gra ma wyjść przed końcem roku (prawdopodobnie).
The Room:
Ruszyły pierwsze szkice.
11-03-15 01:32
Odwiedź stronę użytkownika Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
Ayene Offline
*


Liczba postów: 758
Dołączył: 09-04-13

Pomógł: 112



Post: #14
RE: Ayene's Quest Log

Dodaj w konfiguracji, np. pod:
FAILED_COLOR = Color.new(80, 255, 80, 255)   # Nieudane
linijkę:
FONT_NAME = "Comic Sans MS"
Następnie skrypt dziennika zamień na poniższy:
#==============================================================================
#  Ayene's Quest Log
#  Author: Ayene
#  Wersja: 1.0
#  forum.ultimateam.pl
#==============================================================================
# ** Game_Quests
#==============================================================================
class Game_Quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  attr_reader   :name
  attr_reader   :description
  attr_reader   :tasks
  attr_reader   :actived
  attr_reader   :completed
  attr_reader   :failed  
  attr_reader   :difficulty
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def initialize(id)
    @id = id
    @name, @description, @tasks, @difficulty = AYENE::QuestLogConfig.quest(id)
    @actived = []
    @completed = []
    @failed = []
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * New Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def new(index)
    return unless index < @tasks.size
    @actived |= [index]
    @actived.sort!
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Complete Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def complete(index)
    return unless index < @tasks.size
    return if @failed.include?(index)
    new(index) unless @actived.include?(index)    
    @completed |= [index]    
    @completed.sort!
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Uncomplete Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def uncomplete(index)
    @complete.delete(index)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Fail Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def fail(index)
    return unless index < @tasks.size
    new(index) unless @actived.include?(index)
    @failed |= [index]
    @failed.sort!
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Unfail Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def unfail(index)
    @failed.delete(index)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Active?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def active?
    return @actived != []
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Active?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def actived?(index)
    return @actived.include?(index)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Complete?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def complete?
    return @completed.size == @tasks.size
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Failed?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def failed?
    return @failed != []
  end
end

#==============================================================================
# ** Game_Party
#==============================================================================
class Game_Party
  include AYENE::QuestLogConfig
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Public Instance Variables
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  attr_reader   :quests
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Object Initialization (aliased method)
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  alias aye_quest_gmparty_ini initialize
  def initialize  
    aye_quest_gmparty_ini    
    @quests = {}
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Get Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest(id)
    @quests[id] = Game_Quests.new(id) if @quests[id] == nil
    return @quests[id]
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Get Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quests_list
    return @quests.values
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Completed Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def completed_quests_list
    list = []
    quests_list.each {|quest| list.push(quest) if quest.complete? }
    return list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Failed Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def failed_quests_list
    list = []
    quests_list.each {|quest| list.push(quest) if quest.failed? }
    return list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Active Quest List
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def active_quests_list
    return quests_list - completed_quests_list - failed_quests_list
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Delete Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def delete_quest(id)
    @quests.delete(id)
  end
end

#==============================================================================
# ** Interpreter
#==============================================================================
class Interpreter
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Add New Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_new(id)
    $game_party.quest(id).tasks.each_index {|i| $game_party.quest(id).new(i)}
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Complete Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_complete(id)
    $game_party.quest(id).tasks.each_index {|i| $game_party.quest(id).complete(i)}
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Add New Task to the Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_task_new(id, task)
    $game_party.quest(id).new(task)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Complete Quest Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_task_complete(id, task)
    $game_party.quest(id).complete(task)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Fail Quest Task
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_task_fail(id, task)
    $game_party.quest(id).fail(task)
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Check Quest Active?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_active?(id)
    $game_party.quests[id].active? unless $game_party.quests[id].nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Check Quest Task Active?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_task_active?(id, task)
    $game_party.quests[id].actived?(task) unless $game_party.quests[id].nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Check Quest Complete?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_complete?(id)
    $game_party.quests[id].complete? unless $game_party.quests[id].nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Check Quest Failed?
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_failed?(id)
    $game_party.quests[id].failed? unless $game_party.quests[id].nil?
  end
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Delete Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest_delete(id)
    $game_party.delete_quest(id)
  end
end

#==============================================================================
# ** Window_QuestHelp
#==============================================================================
class Window_QuestHelp < Window_Help
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def initialize
    super()
    w, h = 224, 64
    self.x, self.y, self.width, self.height = 0, 0, w, h
    contents.dispose
    self.contents = Bitmap.new (w - 32, h - 32)
  end
  #--------------------------------------------------------------------------
  # * Set Text
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    font = self.contents.font
    self.contents.font.name = AYENE::QuestLogConfig::FONT_NAME
    super(text, 1)
    self.contents.font.name = font
  end
end

#==============================================================================
# ** Window_QuestCategory
#==============================================================================
class Window_QuestCategory < Window_Selectable
  include AYENE::QuestLogConfig
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize    
    super(0, 64, 224, 64)
    @item_max = 4
    @column_max = @item_max
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max.times {|i| draw_item(i)}
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = Rect.new(0 + 32 * index, 0, 32, 32)
    bitmap = RPG::Cache.icon(QUEST_CAT_ICONS)
    self.contents.blt(8 + 48 * index, 0, bitmap, rect)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    self.cursor_rect.set(8 + @index * 48, 0, 32, 32)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.index > 4 ? "" : LANG_CATEGORY_NAME[index])
  end
end

#==============================================================================
# ** Window_QuestList
#==============================================================================
class Window_QuestList < Window_Selectable
  include AYENE::QuestLogConfig
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 128, 224, 352)
    refresh
    self.index = 0    
  end  
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  # * Quest
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~​
  def quest
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(category = 0)
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    case category
    when 0
      @data = $game_party.active_quests_list
    when 1
      @data = $game_party.completed_quests_list
    when 2
      @data = $game_party.failed_quests_list
    when 3
      @data = $game_party.quests_list
    end    
    @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
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    quest = @data[index]
    y = index * 32
    font = self.contents.font
    self.contents.font.name = FONT_NAME
    self.contents.font.color = normal_color
    if quest.complete?
      self.contents.font.color = FAILED_COLOR
    end  
    if quest.failed?
      self.contents.font.color = COMPLETE_COLOR
    end
    self.contents.draw_text(4, y, 204, 32, quest.name, 0)
    self.contents.font.name = font
  end
end

#==============================================================================
# ** Window_QuestInfo_Name
#==============================================================================
class Window_QuestInfo_Name < Window_Selectable
  include AYENE::QuestLogConfig
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(224, 0, 416, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(quest = nil)
    self.contents.clear
    return if quest == nil
    self.contents.font.color = system_color
    font = self.contents.font
    self.contents.font.name = FONT_NAME
    self.contents.draw_text(4, 0, 196, 32, quest.name, 0)    
    text = LANG_DIFFICULTY    
    w = self.contents.text_size(text).width
    self.contents.draw_text(196, 0, w, 32, text, 0)
    self.contents.font.name = font
    quest.difficulty.times {|i| draw_icon(196 + w + i*24, 0, 0)}
  end
  #--------------------------------------------------------------------------
  # * Draw Icon
  #--------------------------------------------------------------------------
  def draw_icon(x, y, index)
    rect = Rect.new(128 + 32 * index, 0, 32, 32)
    bitmap = RPG::Cache.icon(QUEST_CAT_ICONS)
    self.contents.blt(x, y, bitmap, rect)
  end  
end

#==============================================================================
# ** Window_QuestInfo_Description
#==============================================================================
class Window_QuestInfo_Description < Window_Selectable
  include AYENE::QuestLogConfig
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(224, 64, 416, 128)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(quest = nil)
    self.contents.clear
    return if quest == nil
    self.contents.font.color = crisis_color
    font = self.contents.font
    self.contents.font.name = FONT_NAME
    self.contents.draw_text(4, 0, self.width - 40, 32, LANG_DESCRIPTION, 0)
    self.contents.font.color = normal_color  
    self.contents.font.size -= 4    
    desc = quest.description.split(/\|/)
    for i in 0...desc.size
      self.contents.draw_text(4, 32 + i * 32, self.width - 40, 32, desc[i], 0)
    end    
    self.contents.font.size += 4
    self.contents.font.name = font
  end
end

#==============================================================================
# ** Window_QuestInfo_Tasks
#==============================================================================
class Window_QuestInfo_Tasks < Window_Selectable
  include AYENE::QuestLogConfig
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(224, 192, 416, 288)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(quest = nil)
    self.contents.clear
    return if quest == nil
    self.contents.font.color = crisis_color
    font = self.contents.font
    self.contents.font.name = FONT_NAME
    self.contents.draw_text(4, 0, self.width - 40, 32, LANG_TASKS, 0)
    self.contents.font.color = normal_color  
    self.contents.font.size -= 4
    y = 32    
    quest.actived.each {|i|
      task = quest.tasks[i]
      self.contents.font.color = normal_color  
      if quest.completed.include?(i)
        self.contents.font.color = FAILED_COLOR
        draw_icon(0, y, 2)
      elsif quest.failed.include?(i)
        self.contents.font.color = COMPLETE_COLOR
        draw_icon(0, y, 3)
      else
        draw_icon(0, y, 1)
      end
      self.contents.draw_text(32, y, self.width - 40, 32, task.to_s, 0)
      y += 24
    }
    self.contents.font.size += 4
    self.contents.font.name = font
  end
  #--------------------------------------------------------------------------
  # * Draw Icon
  #--------------------------------------------------------------------------
  def draw_icon(x, y, index)
    rect = Rect.new(128 + 32 * index, 0, 32, 32)
    bitmap = RPG::Cache.icon(QUEST_CAT_ICONS)
    self.contents.blt(x, y, bitmap, rect)
  end  
end

#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map  
  #--------------------------------------------------------------------------
  # * Frame Update (aliased method)
  #--------------------------------------------------------------------------
  alias aye_quest_scmap_update update
  def update
    aye_quest_scmap_update
    if $game_temp.message_window_showing
      return
    end    
    return if !AYENE::QuestLogConfig::MAPKEY or $game_party.quests_list.empty? or $game_switches[AYENE::QuestLogConfig::DISABLED_SWITCH_ID]
    if Input.trigger?(AYENE::QuestLogConfig::MAPKEY_BUTTON)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Quest.new
    end
  end
end

#==============================================================================
# ** Scene_Quest
#==============================================================================
class Scene_Quest
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main    
    @help_window = Window_QuestHelp.new
    @category = Window_QuestCategory.new
    @category.help_window = @help_window
    @quest_list = Window_QuestList.new
    @quest_info_name = Window_QuestInfo_Name.new    
    @quest_info_description = Window_QuestInfo_Description.new  
    @quest_info_tasks = Window_QuestInfo_Tasks.new
    refresh_windows
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    @category.dispose
    @quest_list.dispose
    @quest_info_name.dispose
    @quest_info_description.dispose
    @quest_info_tasks.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    @category.update
    @help_window.update
    @quest_list.update  
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::LEFT) or Input.trigger?(Input::RIGHT)
      @quest_list.index = 0
      @quest_list.refresh(@category.index)
      refresh_windows
    elsif Input.trigger?(Input::DOWN) or Input.trigger?(Input::UP)
      refresh_windows
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh Windows
  #--------------------------------------------------------------------------
  def refresh_windows
    @quest_info_name.refresh(@quest_list.quest)
    @quest_info_description.refresh(@quest_list.quest)
    @quest_info_tasks.refresh(@quest_list.quest)
  end  
end

[Obrazek: aye_furniture_pres.png]
11-03-15 09:49
Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
Chyziu Offline
*


Liczba postów: 39
Dołączył: 26-03-14

Pomógł: 0



Post: #15
RE: Ayene's Quest Log

Mam taki problem, że nie wyświetla mi się żaden tekst w tym dzienniku. Jakieś porady?
16-07-15 22:31
Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
dudekmenPL Offline
*


Liczba postów: 93
Dołączył: 11-08-15

Pomógł: 1



Post: #16
RE: Ayene's Quest Log

skrypt/questlock
Ayene napisał(a):Albo przyciskiem SHIFT, albo możesz skorzystać z polecenia Scripts i wpisać kod:
$scene = Scene_Quest.new

Mam problem mianowicie po wciśnięciu shiftu nie wyskakuje

@RE: Już działa

Obecny projekt INVISUS
Fp : https://www.facebook.com/TheGameProject/
(Ten post był ostatnio modyfikowany: 18-12-15 11:27 przez dudekmenPL.)
18-12-15 11:17
Odwiedź stronę użytkownika Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
MrLimon Offline
*


Liczba postów: 9
Dołączył: 17-10-14

Pomógł: 0



Post: #17
RE: Ayene's Quest Log

Dałoby radę dodać do tego skryptu by pod zadaniami było jeszcze jaka jest nagroda za wykonanie questa?
20-12-15 16:33
Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
Adrapnikram Offline
*


Liczba postów: 571
Dołączył: 04-10-13

Pomógł: 45



Post: #18
RE: Ayene's Quest Log

Dałoby się ;D
Ale nie możesz dać po prostu nagród w opisie. O wiele krócej by było.
Ew. w tych "etapach" wykonywania zadania.
20-12-15 19:44
Znajdź wszystkie posty użytkownika Odpowiedz cytując ten post
"Pomógł" przyznał(a):
Odpowiedz 


Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości

Kontakt | Ultima Forum | Wróć do góry | Wróć do forów | Wersja bez grafiki | RSS
Powered By MyBB. © 2013 MyBB Group. All Rights Reserved.
Skórka by Ayene.