Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
[RGSS] HellKiller's QuestLog
Autor Wiadomość
HellKiller 



Preferowany:
RPG Maker XP

Dołączył: 10 Kwi 2010
Posty: 11
Wysłany: Wto 03 Sie, 2010 07:18
[RGSS] HellKiller's QuestLog
Witam przedstawiam wam QuestLog, mojego autorstwa, wygląd "zgapiłem" z Melvina QuestLoga, więc dla niego podziękowania.

Screen:
Spoiler:



Sorry za jakość, ale chciałem żeby mniej ważyło.

Skrypt wymaga ATP by Samo, The thief.

ATP:
Spoiler:


Kod:
=begin

ATP(Advanced Text Paragrapher) V1.0 by Samo, The thief

Ok, Something of The Scripters do normally to draw a text in form of a paragraph is
doing an array [] that contains each line. The Time Has come For
This Microsoft Word Effect!
This Script Just need a Long String and it will paragraph it!

How to call it?

paragraph = str_paragraph(string, width of the paragraph.)

Example :

@my_paragraph = str_paragraph("La la la la la la la la la , This is a Looooong Strriiiing!", 120)


Returns an Array with each line separately.

How to draw it?

draw_paragraph(x,y,width,height, paragraph)

width and height for each line, not for the paragraph.

.::-NOTE-::.

If you put a ' ^ '(must be between spaces), the text will pass to the next line.
This Symbol Won't be drawed.

Reminder: Always use '' instead of ""! It works faster!

=end


class Window_Base < Window
#--------------------------------------------------
  def str_paragraph(str_old, width)
    temp_str = ''
    str = '' + str_old
    words = []
    size = 0
    str_size = 0
    #
    while ((c = str.slice!(/./m)) != nil)
      temp_str += c
      str_size += 1
      if c == ' '
        words.push(temp_str)
        temp_str = ''
      end
      if str.size == 0
        words.push(temp_str)
        temp_str = ''
      end
    end
    lines = []
    for i in 0...words.size
      word = words[i]
      if word == '^ '
        lines.push(temp_str)
        temp_str = ''
        next
      end
      temp_str += word
      size = contents.text_size(temp_str).width
      if size > width - contents.text_size(' ').width
        for i in 1..word.size
          temp_str = temp_str.chop
        end
        lines.push(temp_str)
        temp_str = ''
        temp_str += word
      end
    end
    words = words.compact
    if temp_str != ''
      lines.push(temp_str)
    end
    return lines
  end
#---------------------------------------------------------------------
  def draw_paragraph(x,y,width,height,lines,align = 0)
    for i in 0...lines.size
      self.contents.draw_text(x, y + i * self.contents.font.size + 1, width, height, lines[i], align)
    end
  end
#-----------------------------------------------------------------
end



QuestLog wersja poprawiona:
Spoiler:


Kod:

=begin
Author: HellKiller
Version: 1.01
=end

Ikona = "032-item01"

class Game_Party
  alias :questlog_hellkiller_initialize :initialize
  attr_accessor :all_quest
  def initialize
    questlog_hellkiller_initialize
    # $quest = ["nazwa", "opis", kasa, "nagroda", trudnosc]
    @quest = []
    @quest_done = []
    @all_quest = 1
  end
  def quest
    return @quest
  end
  def quest_done
    return @quest_done
  end
  def add_quest(quest)
    @quest.push(quest) if not @quest.include?(quest)
  end
    def add_quest_done(quest)
    @quest_done.push(quest) if @quest.include?(quest)
    @quest.delete(quest)
    end
  end
 
class Quest_Command < Window_Selectable
 
  def initialize
    super(0, 64, 180, 320)
    @column_max = 1
    refresh
    self.index = 0
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...$game_party.quest.size
        @data.push($game_party.quest[i])
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $defaultfonttype  # "Items" window font
      self.contents.font.size = $defaultfontsize
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
 
  def draw_item(index)
    item = @data[index]
    x = 8
    y = index * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(x , y, 212, 32, item[0], 0)
  end
end

class QuestLog
  def initialize
    @quest = $game_party.quest
  end
 
  def main
    @command_window = Quest_Command.new
    @command_window.x = 0
    @command_window.y = 0
    @index = @command_window.index
    @window_qd = Window_Quest_Done.new
    @window_qd.y = 320
    @window_qu = Window_Quest_Unlock.new
    @window_qu.y = 400
    if @quest.size > 0
    @opis = @quest[@index][1]
    @money = @quest[@index][2]
    @prize = @quest[@index][3]
    @dificulty = @quest[@index][4]
  else
    @opis = ""
    @money = 0
    @prize = ""
    @dificulty = 0
    end
    @window_quest_description = Window_Quest_Description.new(@opis)
    @window_quest_description.x = 180
    @window_qm = Window_Quest_Money.new(@money)
    @window_qm.x = 180
    @window_qm.y = 400
    @window_qp = Window_Quest_Prize.new(@prize)
    @window_qp.x = 180
    @window_qp.y = 320
    @window_qt = Window_Quest_Dificulty.new(@dificulty)
    @window_qt.y = 400
    @window_qt.x = 360
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
   
    @command_window.dispose
    @window_qd.dispose
    @window_qu.dispose
    @window_quest_description.dispose
    @window_qm.dispose
    @window_qp.dispose
    @window_qt.dispose
   
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
 
  def update
    @window_qd.update
    @command_window.update
    @window_qu.update
   
    @window_qp.dispose
    @window_qt.dispose
    @window_qd.dispose
    @window_qu.dispose
    @window_quest_description.dispose
    @window_qm.dispose
    @index = @command_window.index
    @window_qd = Window_Quest_Done.new
    @window_qd.y = 320
    @window_qu = Window_Quest_Unlock.new
    @window_qu.y = 400
    if @quest.size > 0
    @opis = @quest[@index][1]
    @money = @quest[@index][2]
    @prize = @quest[@index][3]
    @dificulty = @quest[@index][4]
  else
    @opis = ""
    @money = 0
    @prize = ""
    @dificulty = 0
    end
    @window_quest_description = Window_Quest_Description.new(@opis)
    @window_quest_description.x = 180
    @window_qm = Window_Quest_Money.new(@money)
    @window_qm.x = 180
    @window_qm.y = 400
    @window_qp = Window_Quest_Prize.new(@prize)
    @window_qp.x = 180
    @window_qp.y = 320
    @window_qt = Window_Quest_Dificulty.new(@dificulty)
    @window_qt.y = 400
    @window_qt.x = 360
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
  end
end


class Window_Quest_Done < Window_Base
 
  def initialize
    super(0, 0, 180, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Ukończone")
    self.contents.font.color = normal_color
    self.contents.draw_text(20, 0, 120, 32, $game_party.quest_done.size.to_s + " / " + $game_party.all_quest.to_s, 2)
  end
  def update
    refresh
  end
end

class Window_Quest_Unlock < Window_Base
 
  def initialize
    super(0, 0, 180, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Odblokowano")
    self.contents.font.color = normal_color
    self.contents.draw_text(20, 0, 120, 32, $game_party.quest.size.to_s + " / " + $game_party.all_quest.to_s, 2)
  end
  def update
    refresh
  end
end

class Window_Quest_Description < Window_Base
 
  def initialize(quest)
    super(0, 0, 460, 320)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, 120, 32, "Opis")
    self.contents.font.color = system_color
    paragraph = str_paragraph(@quest,430)
    draw_paragraph(0,-110,430,290, paragraph)
  end
  def update
    refresh
  end
end

class Window_Quest_Money < Window_Base
 
  def initialize(quest)
    super(0, 0, 180, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    bitmap = RPG::Cache.icon(Ikona)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    self.contents.draw_text(60, 0, 120, 32, @quest.to_s)
  end
  def update
    refresh
  end
end

class Window_Quest_Prize < Window_Base
 
  def initialize(quest)
    super(0, 0, 460, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Nagroda:")
    self.contents.font.color = normal_color
    self.contents.draw_text(30, 0, 120, 32, @quest)
  end
  def update
    refresh
  end
end

class Window_Quest_Dificulty < Window_Base
 
  def initialize(quest)
    super(0, 0, 300, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Trudnosc:")
    self.contents.font.color = normal_color
    self.contents.draw_text(90, 0, 120, 32, "Bardzo łatwy") if @quest == 0
    self.contents.draw_text(90, 0, 120, 32, "Łatwy") if @quest == 1
    self.contents.draw_text(90, 0, 120, 32, "Średni") if @quest == 2
    self.contents.draw_text(90, 0, 120, 32, "Trudny") if @quest == 3
    self.contents.draw_text(90, 0, 120, 32, "Bardzo trudny") if @quest == 4
    self.contents.draw_text(90, 0, 120, 32, "Hiper Trudny") if @quest == 5
  end
  def update
    refresh
  end
end


Żeby zadziałało potrzeba wkleić do main:
Kod:
    $defaultfonttype = "Times New Roman"
  $defaultfontsize = 26


FAQ:
1: "Jak dodajemy zadania" ?
- dodajemy je poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest(quest)
, gdzie quest w nawiasie oznacza nazwę zadania
2: "Jak robić zadania" ?
- dobrze jest założyć pustą kartę i w niej wpisywać, według wzoru:
Kod:
$quest = ["nazwa", "opis", kasa, "nagroda", trudnosc]

$quest należy zmieniać na np. $quest1, $quest2 itd., żeby nie nastąpiły jakieś komplikacje.
3 "Jak zmienić ikonę" ?
- w jednej z pierwszych linijek jest
Kod:
Ikona
w niej jest podana nazwa ikony, zmień ją i ciesz się nową ikoną.

Credits:
HellKiller
Melvin - wzorowałem się wyglądowo na jego skrypcie (nie wiem czy go dawać, ale ,żeby nie było :D)
Ostatnio zmieniony przez Nhadala Wto 03 Sie, 2010 10:23, w całości zmieniany 2 razy  
 
 
SonyPL 



Preferowany:
RPG Maker XP

Dołączył: 05 Sie 2010
Posty: 16
Skąd: Poznań
Wysłany: Czw 09 Wrz, 2010 19:49
Można prosić o demko?
 
 
PaKiTos 




Preferowany:
RPG Maker 2003

Ranga RM:
2 gry

Pomógł: 16 razy
Dołączył: 05 Lis 2009
Posty: 359
Skąd: spytaj innych
Wysłany: Pią 10 Wrz, 2010 15:16
na co ci? :lol: skrypt fajny i łatwy w obsłudze!
________________________
po co to kopiujesz? ;d
Spoiler:

Fakty:
1.Widzisz mój podpis
2.Jesteś w internecie
3.Czytasz
4.Siedzisz przy komputerze
5.Jesteś na UltimaForum
6.Twój nick to Gość


kiedys tu bylo fajniej... coz gospoda rma forever
chwala tym ktorzy nadal robia w 2k
 
 
SonyPL 



Preferowany:
RPG Maker XP

Dołączył: 05 Sie 2010
Posty: 16
Skąd: Poznań
Wysłany: Pią 10 Wrz, 2010 16:36
PaKiTos chcę demko ponieważ gdy dodaje questa nie ma go w dzienniku
 
 
HellKiller 



Preferowany:
RPG Maker XP

Dołączył: 10 Kwi 2010
Posty: 11
Wysłany: Sob 25 Wrz, 2010 11:08
Witam przedstawiam wam QuestLog, mojego autorstwa.

[size=14pt]Zmiany w 1.5:[/size]
- możliwość wyłączenia dwóch okienek odpowiedzialne za informowanie o wszystkich zadaniach i o ilości ukończonych zadaniach
- zmieniony wygląd
- pokazywanie obrazka
- poprawione błędy
- zmienione tworzenie zadań - szczegóły FAQ pytanie #2


Skrypt od czasu do czasu będzie ulepszany.

Screen z wersji 1.0:

Przepraszam za stary screen ,ale nie mam możliwości wrzucić nowego.

Skrypt wymaga ATP by Samo, The thief.

ATP:
Spoiler:

Kod:
=begin

ATP(Advanced Text Paragrapher) V1.0 by Samo, The thief

Ok, Something of The Scripters do normally to draw a text in form of a paragraph is
doing an array [] that contains each line. The Time Has come For
This Microsoft Word Effect!
This Script Just need a Long String and it will paragraph it!

How to call it?

paragraph = str_paragraph(string, width of the paragraph.)

Example :

@my_paragraph = str_paragraph("La la la la la la la la la , This is a Looooong Strriiiing!", 120)


Returns an Array with each line separately.

How to draw it?

draw_paragraph(x,y,width,height, paragraph)

width and height for each line, not for the paragraph.

.::-NOTE-::.

If you put a ' ^ '(must be between spaces), the text will pass to the next line.
This Symbol Won't be drawed.

Reminder: Always use '' instead of ""! It works faster!

=end


class Window_Base < Window
#--------------------------------------------------
  def str_paragraph(str_old, width)
    temp_str = ''
    str = '' + str_old
    words = []
    size = 0
    str_size = 0
    #
    while ((c = str.slice!(/./m)) != nil)
      temp_str += c
      str_size += 1
      if c == ' '
        words.push(temp_str)
        temp_str = ''
      end
      if str.size == 0
        words.push(temp_str)
        temp_str = ''
      end
    end
    lines = []
    for i in 0...words.size
      word = words[i]
      if word == '^ '
        lines.push(temp_str)
        temp_str = ''
        next
      end
      temp_str += word
      size = contents.text_size(temp_str).width
      if size > width - contents.text_size(' ').width
        for i in 1..word.size
          temp_str = temp_str.chop
        end
        lines.push(temp_str)
        temp_str = ''
        temp_str += word
      end
    end
    words = words.compact
    if temp_str != ''
      lines.push(temp_str)
    end
    return lines
  end
#---------------------------------------------------------------------
  def draw_paragraph(x,y,width,height,lines,align = 0)
    for i in 0...lines.size
      self.contents.draw_text(x, y + i * self.contents.font.size + 1, width, height, lines[i], align)
    end
  end
#-----------------------------------------------------------------
end



QuestLog wersja poprawiona:
Spoiler:

Kod:
=begin
Author: HellKiller
Version: 1.5
=end

Ikona = "032-item01"
Opacity_window = 180
Okienko_z_ukonczonymi_widac = false
Okienko_z_wszystkimi_zadaniami_widac = false

class Game_Party
  alias :questlog_hellkiller_initialize :initialize
  attr_accessor :all_quest
  def initialize
    questlog_hellkiller_initialize
    # $quest = ["nazwa", "opis", kasa, "nagroda", trudnosc, "obrazek"]
    @quest = []
    @quest_done = []
    @quest_x = []
    @all_quest = 1
  end
  def quest_x
    return @quest_x
  end
  def quest
    return @quest
  end
  def quest_done
    return @quest_done
  end
  def add_quest(quest)
    @quest.push(quest) if not @quest.include?(quest)
  end
    def add_quest_done(quest)
    @quest_done.push(quest) if @quest.include?(quest)
    @quest.delete(quest)
  end
  def add_quest_x(quest)
    @quest_x.push(quest) if @quest.include?(quest)
    @quest.delete(quest)
    end
  end
 
class Quest_Command < Window_Selectable
 
  def initialize
    super(0, 64, 180, 320)
    @column_max = 1
    @opacity = Opacity_window
    refresh
    self.index = 0
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...$game_party.quest.size
        @data.push($game_party.quest[i])
      end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $defaultfonttype  # "Items" window font
      self.contents.font.size = $defaultfontsize
      for i in 0...@item_max
        draw_item(i)
      end
      end
  end
 
  def draw_item(index)
    item = @data[index]
    x = 8
    y = index * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    if @item_max > 0
    self.contents.draw_text(x , y, 212, 32, item[0], 0)
  else
    self.contents.draw_text(x , y, 212, 32, item, 0)
    end
  end
end

class Quest_Command_Done < Window_Selectable
 
  def initialize
    super(0, 64, 180, 320)
    @column_max = 1
    refresh
    self.index = 0
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...$game_party.quest_done.size
        @data.push($game_party.quest_done[i])
      end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $defaultfonttype  # "Items" window font
      self.contents.font.size = $defaultfontsize
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
 
    def draw_item(index)
    item = @data[index]
    x = 8
    y = index * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    if @item_max > 0
    self.contents.draw_text(x , y, 212, 32, item[0], 0)
  else
    self.contents.draw_text(x , y, 212, 32, item, 0)
    end
  end
end
 
  class Quest_Command_X < Window_Selectable
 
  def initialize
    super(0, 64, 180, 320)
    @column_max = 1
    refresh
    self.index = 0
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...$game_party.quest_x.size
        @data.push($game_party.quest_x[i])
      end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = $defaultfonttype  # "Items" window font
      self.contents.font.size = $defaultfontsize
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end

  def draw_item(index)
    item = @data[index]
    x = 8
    y = index * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    if @item_max > 0
    self.contents.draw_text(x , y, 212, 32, item[0], 0)
  else
    self.contents.draw_text(x , y, 212, 32, item, 0)
    end
  end
end

class QuestLog
  def initialize
    @quest = $game_party.quest
  end
 
  def main
    @spriteset = Spriteset_Map.new
    @start = true
    s1 = "Zadania"
    s2 = "Zadania Ukończone"
    s3 = "Zadania Zniszczone"
    @choice = Window_Command.new(192, [s1, s2, s3])
    @choice.opacity = Opacity_window
    @choice.x = 320 - @choice.width / 2
    @choice.y = 288
    @okienko = Window_Empty.new
    @okienko.x = 180 + 19
    @okienko.y = 6
    @okienko.z = 101
    @okienko.opacity = Opacity_window
    @window_qd = Window_Quest_Done.new
    @window_qd.y = 360
    @window_qd.opacity = Opacity_window
    @window_qu = Window_Quest_Unlock.new
    @window_qu.y = 420
    @window_qd.opacity = Opacity_window
    @window_qu.visible = Okienko_z_wszystkimi_zadaniami_widac
    @window_qd.visible = Okienko_z_ukonczonymi_widac
    @window_qu.opacity = Opacity_window
    if @quest.size > 0 and not @index == nil
    @opis = @quest[@index][1]
    @money = @quest[@index][2]
    @prize = @quest[@index][3]
    @dificulty = @quest[@index][4]
    @picture = @quest[@index][5]
  else
    @opis = ""
    @money = 0
    @prize = ""
    @dificulty = 0
    @picture = ""
    end
    @window_quest_description = Window_Quest_Description.new(@opis,@picture)
    @window_quest_description.x = 180
    @window_quest_description.opacity = Opacity_window
    @window_qm = Window_Quest_Money.new(@money)
    @window_qm.x = 180
    @window_qm.y = 420
    @window_qm.opacity = Opacity_window
    @window_qp = Window_Quest_Prize.new(@prize)
    @window_qp.x = 180
    @window_qp.y = 360
    @window_qp.opacity = Opacity_window
    @window_qt = Window_Quest_Dificulty.new(@dificulty)
    @window_qt.y = 420
    @window_qt.x = 360
    @window_qt.opacity = Opacity_window
    @window_qu.visible = false
    @window_qd.visible = false
    @window_qt.visible = false
    @window_qp.visible = false
    @window_qm.visible =  false
    @window_quest_description.visible = false
    @okienko.visible = false
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @window_qd.dispose
    @window_qu.dispose
    @window_quest_description.dispose
    @window_qm.dispose
    @window_qp.dispose
    @window_qt.dispose
    @spriteset.dispose
    @choice.dispose
    @okienko.dispose
    if not @command_window == nil
    @command_window.dispose
    end
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
 
  def update
    @choice.update
    if @start == true
    @window_qu.visible = false
    @window_qd.visible = false
    @window_qt.visible = false
    @window_qp.visible = false
    @window_qm.visible =  false
    @window_quest_description.visible = false
    @okienko.visible = false
   
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      case @choice.index
      when 0  # &#12491;&#12517;&#12540;&#12466;&#12540;&#12512;
    @command_window = Quest_Command.new
    @command_window.x = 0
    @command_window.y = 0
    @command_window.opacity = Opacity_window
    @command_window.visible = true
    @choice.visible = false
    @quest = $game_party.quest
    @start = false
    return
      when 1  # &#12467;&#12531;&#12486;&#12451;&#12491;&#12517;&#12540;
    @command_window = Quest_Command_Done.new
    @command_window.x = 0
    @command_window.y = 0
    @command_window.opacity = Opacity_window
    @command_window.visible = true
    @start = false
    @choice.visible = false
    @quest = $game_party.quest_done
    @start = false
    return
      when 2  # &#12471;&#12515;&#12483;&#12488;&#12480;&#12454;&#12531;
    @command_window = Quest_Command_X.new
    @command_window.x = 0
    @command_window.y = 0
    @command_window.opacity = Opacity_window
    @command_window.visible = true
    @start = false
    @choice.visible = false
    @quest = $game_party.quest_done
    @start = false
      end
  end
end
  if @start == false
    @window_qu.visible = Okienko_z_wszystkimi_zadaniami_widac
    @window_qd.visible = Okienko_z_ukonczonymi_widac
    @window_qt.visible = true
    @window_qp.visible = true
    @window_qm.visible =  true
    @command_window.visible = true
    @command_window.active = true
    @window_quest_description.visible = true
    @okienko.visible = true
end
  if @start == false
    @window_qd.update
    @command_window.update
    @window_qu.update
    @window_qp.dispose
    @window_qt.dispose
    @window_qd.dispose
    @window_qu.dispose
    @window_quest_description.dispose
    @window_qm.dispose
    @index = @command_window.index
    @window_qd = Window_Quest_Done.new
    @window_qd.y = 360
    @window_qu = Window_Quest_Unlock.new
    @window_qu.y = 420
    if @quest.size > 0
    @opis = @quest[@index][1]
    @money = @quest[@index][2]
    @prize = @quest[@index][3]
    @dificulty = @quest[@index][4]
    @picture = @quest[@index][5]
  else
    @opis = ""
    @money = 0
    @prize = ""
    @dificulty = 0
    @picture = ""
    end
    @window_quest_description = Window_Quest_Description.new(@opis,@picture)
    @window_quest_description.x = 180
    @window_quest_description.opacity = Opacity_window
    @window_qm = Window_Quest_Money.new(@money)
    @window_qm.x = 180
    @window_qm.y = 420
    @window_qp = Window_Quest_Prize.new(@prize)
    @window_qp.x = 180
    @window_qp.y = 360
    @window_qt = Window_Quest_Dificulty.new(@dificulty)
    @window_qt.y = 420
    @window_qt.x = 360
    @window_qu.opacity = Opacity_window
    @window_qd.opacity = Opacity_window
    @window_qt.opacity = Opacity_window
    @window_qp.opacity = Opacity_window
    @window_qm.opacity = Opacity_window
    @window_qd.opacity = Opacity_window
    @window_qu.visible = Okienko_z_wszystkimi_zadaniami_widac
    @window_qd.visible = Okienko_z_ukonczonymi_widac
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
  end
end


class Window_Quest_Done < Window_Base
 
  def initialize
    super(0, 0, 180, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Ukończone")
    self.contents.font.color = normal_color
    self.contents.draw_text(20, 0, 120, 32, $game_party.quest_done.size.to_s + " / " + $game_party.all_quest.to_s, 2)
  end
  def update
    refresh
  end
end

class Window_Quest_Unlock < Window_Base
 
  def initialize
    super(0, 0, 180, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Odblokowano")
    self.contents.font.color = normal_color
    self.contents.draw_text(20, 0, 120, 32, $game_party.quest.size.to_s + " / " + $game_party.all_quest.to_s, 2)
  end
  def update
    refresh
  end
end

class Window_Quest_Description < Window_Base
 
  def initialize(quest,picture)
    super(0, 0, 460, 320)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    @picture = picture
    refresh
  end
 
  def refresh
    self.contents.clear
    bitmap = RPG::Cache.picture(@picture)
    self.contents.blt(14, 0, bitmap, Rect.new(0, 0, 400, 100), 200)
    self.contents.font.color = system_color
    self.contents.draw_text(0, 128, 120, 32, "Opis")
    self.contents.font.color = normal_color
    paragraph = str_paragraph(@quest,430)
    draw_paragraph(0,18,430,290, paragraph)
  end
  def update
    refresh
  end
end

class Window_Quest_Money < Window_Base
 
  def initialize(quest)
    super(0, 0, 180, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    bitmap = RPG::Cache.icon(Ikona)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    self.contents.draw_text(60, 0, 120, 32, @quest.to_s)
  end
  def update
    refresh
  end
end

class Window_Quest_Prize < Window_Base
 
  def initialize(quest)
    super(0, 0, 460, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Nagroda:")
    self.contents.font.color = normal_color
    self.contents.draw_text(80, 0, 350, 32, @quest)
  end
  def update
    refresh
  end
end

class Window_Quest_Dificulty < Window_Base
 
  def initialize(quest)
    super(0, 0, 300, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype 
    self.contents.font.size = 16
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Trudnosc:")
    self.contents.font.color = normal_color
    self.contents.draw_text(90, 0, 120, 32, "Bardzo łatwy") if @quest == 0
    self.contents.draw_text(90, 0, 120, 32, "Łatwy") if @quest == 1
    self.contents.draw_text(90, 0, 120, 32, "Średni") if @quest == 2
    self.contents.draw_text(90, 0, 120, 32, "Trudny") if @quest == 3
    self.contents.draw_text(90, 0, 120, 32, "Bardzo trudny") if @quest == 4
    self.contents.draw_text(90, 0, 120, 32, "Hiper Trudny") if @quest == 5
  end
  def update
    refresh
  end
end

class Window_Empty < Window_Base
 
  def initialize
    super(0, 0, 420, 120)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $defaultfonttype
    self.contents.font.size = $defaultfontsize
    refresh
  end
 
  def refresh
    self.contents.clear
   
  end
end


Żeby zadziałało potrzeba wkleić do main:
Kod:
    $defaultfonttype = "Times New Roman"
  $defaultfontsize = 26


FAQ:
1: "Jak dodajemy zadania" ?
- dodajemy je poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest(quest)
, gdzie quest w nawiasie oznacza nazwę zadania
2: "Jak robić zadania" ?
- dobrze jest założyć pustą kartę i w niej wpisywać, według wzoru:
Kod:
$quest = ["nazwa", "opis", kasa, "nagroda", trudnosc, "obrazek"]

$quest należy zmieniać na np. $quest1, $quest2 itd., żeby nie nastąpiły jakieś komplikacje.
3 "Jak zmienić ikonę" ?
- w jednej z pierwszych linijek jest
Kod:
Ikona
w niej jest podana nazwa ikony, zmień ją i ciesz się nową ikoną.
4. "Jak wywołać dziennik ?"
- wystarczy że wywołasz skrypt i wpiszesz
Kod:
$scene = QuestLog.new

5. "Jak dodać zadania ukończone ?"
dodajemy je podobnie jak z zwykłym zadaniem poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest_done(quest)
, gdzie quest w nawiasie oznacza nazwę zadania
6 "Jak dodać zniszczone(?) zadania" ?
dodajemy je podobnie jak z zwykłym zadaniem poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest_x(quest)
, gdzie quest w nawiasie oznacza nazwę zadania

Credits:
HellKiller
Ostatnio zmieniony przez kamillo112 Pią 03 Gru, 2010 15:34, w całości zmieniany 1 raz  
 
 
kubica5050 



Dołączył: 01 Gru 2010
Posty: 2
Wysłany: Pią 03 Gru, 2010 14:48
Mam jedno pytanie jak się wywołuje okno skryptu? :?:
 
 
HellKiller 



Preferowany:
RPG Maker XP

Dołączył: 10 Kwi 2010
Posty: 11
Wysłany: Wto 07 Gru, 2010 00:47
FAQ punkt 4
 
 
Bulooo 




Preferowany:
RPG Maker XP

Pomógł: 3 razy
Dołączył: 27 Gru 2009
Posty: 79
Skąd: Wodzisław Śląski
Wysłany: Sro 22 Gru, 2010 16:14
mógł bym poprosić o demo, mi coś to nie wyszło
________________________

Wiem że chcesz zagrać, a nie chce ci się przepisywać ip, Skopiuj: 80.72.37.12:27025

http://grawbank.tk/276/bulo < Zbieram na xBoxa
 
 
Czeliosss 



Ranga RM:
1 gra

Pomógł: 49 razy
Dołączył: 02 Lis 2009
Posty: 661
Skąd: Wa-wa
Wysłany: Czw 23 Gru, 2010 13:56
Łapcie demo
http://www.speedyshare.co...estLog_Demo.exe
________________________
...Amelanduil & FireBlade words will be remembered...
...Amelanduil & FireBlade acts will be remembered...
...Amelanduil & FireBlade never gonna die...

Nie pisać, bo nie odpiszę.
 
 
Bulooo 




Preferowany:
RPG Maker XP

Pomógł: 3 razy
Dołączył: 27 Gru 2009
Posty: 79
Skąd: Wodzisław Śląski
Wysłany: Czw 23 Gru, 2010 14:00
Dzięki
________________________

Wiem że chcesz zagrać, a nie chce ci się przepisywać ip, Skopiuj: 80.72.37.12:27025

http://grawbank.tk/276/bulo < Zbieram na xBoxa
 
 
Noyas 



Dołączył: 29 Gru 2010
Posty: 5
Wysłany: Czw 30 Gru, 2010 20:06
Malutkie pytanko:
Cytat:
Żeby zadziałało potrzeba wkleić do main:
Kod:
$defaultfonttype = "Times New Roman"
$defaultfontsize = 26


Nie działa( wręcz wyskakuje błąd)

Kod:
1: "Jak dodajemy zadania" ?
- dodajemy je poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest(quest)
, gdzie quest w nawiasie oznacza nazwę zadania
2: "Jak robić zadania" ?
- dobrze jest założyć pustą kartę i w niej wpisywać, według wzoru:
Kod:
$quest = ["nazwa", "opis", kasa, "nagroda", trudnosc, "obrazek"]

$quest należy zmieniać na np. $quest1, $quest2 itd., żeby nie nastąpiły jakieś komplikacje.
3 "Jak zmienić ikonę" ?
- w jednej z pierwszych linijek jest
Kod:
Ikona
w niej jest podana nazwa ikony, zmień ją i ciesz się nową ikoną.
4. "Jak wywołać dziennik ?"
- wystarczy że wywołasz skrypt i wpiszesz
Kod:
$scene = QuestLog.new

5. "Jak dodać zadania ukończone ?"
dodajemy je podobnie jak z zwykłym zadaniem poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest_done(quest)
, gdzie quest w nawiasie oznacza nazwę zadania
6 "Jak dodać zniszczone(?) zadania" ?
dodajemy je podobnie jak z zwykłym zadaniem poprzez wywołanie skryptu i wpisaniu:
Kod:
$game_party.add_quest_x(quest)
, gdzie quest w nawiasie oznacza nazwę zadania


Nie działa (wyskakuje jeszcze inny błąd)

A problem jest taki że działało przez moment, a potem się wyłączyło.

Czy mogę prosić o konkretne rady typu:
-Jak założyć pustą kartę i w niej wpisywać, według wzoru [...] ?
- jak wywołać dziennik ( ta opcja nie działa w ogóle)?

byłbym wdzięczny za szybką odpowiedź
 
 
Czeliosss 



Ranga RM:
1 gra

Pomógł: 49 razy
Dołączył: 02 Lis 2009
Posty: 661
Skąd: Wa-wa
Wysłany: Czw 30 Gru, 2010 21:06
Masz wszystko w demie 2 posty wyżej.
________________________
...Amelanduil & FireBlade words will be remembered...
...Amelanduil & FireBlade acts will be remembered...
...Amelanduil & FireBlade never gonna die...

Nie pisać, bo nie odpiszę.
 
 
David 




Preferowany:
RPG Maker XP

Dołączył: 23 Lip 2010
Posty: 26
Wysłany: Czw 30 Gru, 2010 21:49
Pozwoliłem sobie przeedytować, tak żeby działało także na angielskim makerze:
Spoiler:

Kod:

=begin
Author: HellKiller
Version: 1.01
=end

Ikona = "032-item01"

class Game_Party
  alias :questlog_hellkiller_initialize :initialize
  attr_accessor :all_quest
  def initialize
    questlog_hellkiller_initialize
    # $quest = ["nazwa", "opis", kasa, "nagroda", trudnosc]
    @quest = []
    @quest_done = []
    @all_quest = 1
  end
  def quest
    return @quest
  end
  def quest_done
    return @quest_done
  end
  def add_quest(quest)
    @quest.push(quest) if not @quest.include?(quest)
  end
    def add_quest_done(quest)
    @quest_done.push(quest) if @quest.include?(quest)
    @quest.delete(quest)
    end
  end
 
class Quest_Command < Window_Selectable
 
  def initialize
    super(0, 64, 180, 320)
    @column_max = 1
    refresh
    self.index = 0
  end
 
  def item
    return @data[self.index]
  end
 
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...$game_party.quest.size
        @data.push($game_party.quest[i])
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      self.contents.font.name = "Comic Sans MS"
      self.contents.font.size = 22
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
 
  def draw_item(index)
    item = @data[index]
    x = 8
    y = index * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(x , y, 212, 32, item[0], 0)
  end
end

class QuestLog
  def initialize
    @quest = $game_party.quest
  end
 
  def main
    @command_window = Quest_Command.new
    @command_window.x = 0
    @command_window.y = 0
    @index = @command_window.index
    @window_qd = Window_Quest_Done.new
    @window_qd.y = 320
    @window_qu = Window_Quest_Unlock.new
    @window_qu.y = 400
    if @quest.size > 0
    @opis = @quest[@index][1]
    @money = @quest[@index][2]
    @prize = @quest[@index][3]
    @dificulty = @quest[@index][4]
  else
    @opis = ""
    @money = 0
    @prize = ""
    @dificulty = 0
    end
    @window_quest_description = Window_Quest_Description.new(@opis)
    @window_quest_description.x = 180
    @window_qm = Window_Quest_Money.new(@money)
    @window_qm.x = 180
    @window_qm.y = 400
    @window_qp = Window_Quest_Prize.new(@prize)
    @window_qp.x = 180
    @window_qp.y = 320
    @window_qt = Window_Quest_Dificulty.new(@dificulty)
    @window_qt.y = 400
    @window_qt.x = 360
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
   
    @command_window.dispose
    @window_qd.dispose
    @window_qu.dispose
    @window_quest_description.dispose
    @window_qm.dispose
    @window_qp.dispose
    @window_qt.dispose
   
    if $scene.is_a?(Scene_Title)
      Graphics.transition
      Graphics.freeze
    end
  end
 
  def update
    @window_qd.update
    @command_window.update
    @window_qu.update
   
    @window_qp.dispose
    @window_qt.dispose
    @window_qd.dispose
    @window_qu.dispose
    @window_quest_description.dispose
    @window_qm.dispose
    @index = @command_window.index
    @window_qd = Window_Quest_Done.new
    @window_qd.y = 320
    @window_qu = Window_Quest_Unlock.new
    @window_qu.y = 400
    if @quest.size > 0
    @opis = @quest[@index][1]
    @money = @quest[@index][2]
    @prize = @quest[@index][3]
    @dificulty = @quest[@index][4]
  else
    @opis = ""
    @money = 0
    @prize = ""
    @dificulty = 0
    end
    @window_quest_description = Window_Quest_Description.new(@opis)
    @window_quest_description.x = 180
    @window_qm = Window_Quest_Money.new(@money)
    @window_qm.x = 180
    @window_qm.y = 400
    @window_qp = Window_Quest_Prize.new(@prize)
    @window_qp.x = 180
    @window_qp.y = 320
    @window_qt = Window_Quest_Dificulty.new(@dificulty)
    @window_qt.y = 400
    @window_qt.x = 360
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
  end
end


class Window_Quest_Done < Window_Base
 
  def initialize
    super(0, 0, 180, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Comic Sans MS"
    self.contents.font.size = 22
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Ukończone")
    self.contents.font.color = normal_color
    self.contents.draw_text(20, 0, 120, 32, $game_party.quest_done.size.to_s + " / " + $game_party.all_quest.to_s, 2)
  end
  def update
    refresh
  end
end

class Window_Quest_Unlock < Window_Base
 
  def initialize
    super(0, 0, 180, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Comic Sans MS"
    self.contents.font.size = 22
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Odblokowano")
    self.contents.font.color = normal_color
    self.contents.draw_text(20, 0, 120, 32, $game_party.quest.size.to_s + " / " + $game_party.all_quest.to_s, 2)
  end
  def update
    refresh
  end
end

class Window_Quest_Description < Window_Base
 
  def initialize(quest)
    super(0, 0, 460, 320)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Comic Sans MS"
    self.contents.font.size = 20
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, 120, 32, "Opis")
    self.contents.font.color = system_color
    paragraph = str_paragraph(@quest,430)
    draw_paragraph(0,-110,430,290, paragraph)
  end
  def update
    refresh
  end
end

class Window_Quest_Money < Window_Base
 
  def initialize(quest)
    super(0, 0, 180, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Comic Sans MS"
    self.contents.font.size = 22
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    bitmap = RPG::Cache.icon(Ikona)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    self.contents.draw_text(60, 0, 120, 32, @quest.to_s)
  end
  def update
    refresh
  end
end

class Window_Quest_Prize < Window_Base
 
  def initialize(quest)
    super(0, 0, 460, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Comic Sans MS"
    self.contents.font.size = 22
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Nagroda:")
    self.contents.font.color = normal_color
    self.contents.draw_text(100, 0, 120, 32, @quest)
  end
  def update
    refresh
  end
end

class Window_Quest_Dificulty < Window_Base
 
  def initialize(quest)
    super(0, 0, 300, 80)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Comic Sans MS"
    self.contents.font.size = 22
    @quest = quest
    refresh
  end
 
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, 80, 32, "Trudność:")
    self.contents.font.color = normal_color
    self.contents.draw_text(90, 0, 120, 32, "Bardzo łatwy") if @quest == 0
    self.contents.draw_text(90, 0, 120, 32, "Łatwy") if @quest == 1
    self.contents.draw_text(90, 0, 120, 32, "Średni") if @quest == 2
    self.contents.draw_text(90, 0, 120, 32, "Trudny") if @quest == 3
    self.contents.draw_text(90, 0, 120, 32, "Bardzo trudny") if @quest == 4
    self.contents.draw_text(90, 0, 120, 32, "Hiper Trudny") if @quest == 5
  end
  def update
    refresh
  end
end

________________________
Potrzebuję mappera do gry!
 
 
 
Noyas 



Dołączył: 29 Gru 2010
Posty: 5
Wysłany: Czw 30 Gru, 2010 23:17
Czeliosss napisał/a:
Masz wszystko w demie 2 posty wyżej.

No właśnie demo mi nie działa :D :mrgreen: :mrgreen:
 
 
Czeliosss 



Ranga RM:
1 gra

Pomógł: 49 razy
Dołączył: 02 Lis 2009
Posty: 661
Skąd: Wa-wa
Wysłany: Czw 30 Gru, 2010 23:19
To zgaduję że masz polską wersję. Jedyną radą jest to, żebyś ściągnął sobie angielską wersję.
________________________
...Amelanduil & FireBlade words will be remembered...
...Amelanduil & FireBlade acts will be remembered...
...Amelanduil & FireBlade never gonna die...

Nie pisać, bo nie odpiszę.
 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene