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
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
$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
[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
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
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
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
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
$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
________________________ ...Amelanduil & FireBlade words will be remembered... ...Amelanduil & FireBlade acts will be remembered... ...Amelanduil & FireBlade never gonna die...
Ż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)?
________________________ ...Amelanduil & FireBlade words will be remembered... ...Amelanduil & FireBlade acts will be remembered... ...Amelanduil & FireBlade never gonna die...
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
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
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 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