mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes quest journal
This commit is contained in:
@@ -1240,3 +1240,37 @@ def pbDrawImagePositions(bitmap,textpos)
|
||||
srcbitmap.dispose
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#added for quest log script ( edit )
|
||||
def renderMultiLine(bitmap,xDst,yDst,normtext,maxheight,baseColor,shadowColor)
|
||||
for i in 0...normtext.length
|
||||
width=normtext[i][3]
|
||||
textx=normtext[i][1]+xDst
|
||||
texty=normtext[i][2]+yDst
|
||||
if shadowColor
|
||||
height=normtext[i][4]
|
||||
text=normtext[i][0]
|
||||
bitmap.font.color=shadowColor
|
||||
bitmap.draw_text(textx-2,texty-2,width,height,text,0)
|
||||
bitmap.draw_text(textx,texty-2,width,height,text,0)
|
||||
bitmap.draw_text(textx+2,texty-2,width,height,text,0)
|
||||
bitmap.draw_text(textx-2,texty,width,height,text,0)
|
||||
bitmap.draw_text(textx+2,texty,width,height,text,0)
|
||||
bitmap.draw_text(textx-2,texty+2,width,height,text,0)
|
||||
bitmap.draw_text(textx,texty+2,width,height,text,0)
|
||||
bitmap.draw_text(textx+2,texty+2,width,height,text,0)
|
||||
end
|
||||
if baseColor
|
||||
height=normtext[i][4]
|
||||
text=normtext[i][0]
|
||||
bitmap.font.color=baseColor
|
||||
bitmap.draw_text(textx,texty,width,height,text,0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def drawTextExMulti(bitmap,x,y,width,numlines,text,baseColor,shadowColor)
|
||||
normtext=getLineBrokenChunks(bitmap,text,width,nil,true)
|
||||
renderMultiLine(bitmap,x,y,normtext,numlines*32,baseColor,shadowColor)
|
||||
end
|
||||
@@ -23,6 +23,7 @@ class Quest
|
||||
attr_accessor :color
|
||||
attr_accessor :time
|
||||
attr_accessor :completed
|
||||
|
||||
def initialize(id, name, desc, npc, sprite, location, color = :WHITE, time = Time.now, completed = false)
|
||||
self.id = id
|
||||
self.name = name
|
||||
@@ -183,7 +184,6 @@ def isQuestAlreadyAccepted?(id)
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
def finishQuest(id)
|
||||
$game_variables[222] += 1 # karma
|
||||
$game_variables[97] -= 1 #nb. quests active
|
||||
@@ -191,7 +191,6 @@ def finishQuest(id)
|
||||
pbSetQuest(id, true)
|
||||
end
|
||||
|
||||
|
||||
def pbCompletedQuest?(id)
|
||||
$Trainer.quests = [] if $Trainer.quests.class == NilClass
|
||||
for i in 0...$Trainer.quests.size
|
||||
@@ -201,9 +200,9 @@ def pbCompletedQuest?(id)
|
||||
end
|
||||
|
||||
def pbQuestlog
|
||||
pbMessage(_INTL("The quest log has been temporarily removed from the game and is planned to be added back in a future update"))
|
||||
return
|
||||
#Questlog.new
|
||||
# pbMessage(_INTL("The quest log has been temporarily removed from the game and is planned to be added back in a future update"))
|
||||
# return
|
||||
Questlog.new
|
||||
end
|
||||
|
||||
def pbAddQuest(id)
|
||||
@@ -304,15 +303,18 @@ class Questlog
|
||||
|
||||
for i in 0..1
|
||||
@sprites["btn#{i}"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["btn#{i}"].setBitmap("Graphics/Pictures/EQI/questBtn")
|
||||
@sprites["btn#{i}"].setBitmap("Graphics/Pictures/eqi/quest_button")
|
||||
@sprites["btn#{i}"].x = 84
|
||||
@sprites["btn#{i}"].y = 130 + 56 * i
|
||||
@sprites["btn#{i}"].src_rect.height = (@sprites["btn#{i}"].bitmap.height / 2).round
|
||||
@sprites["btn#{i}"].src_rect.y = i == 0 ? (@sprites["btn#{i}"].bitmap.height / 2).round : 0
|
||||
@sprites["btn#{i}"].opacity = 0
|
||||
end
|
||||
pbDrawOutlineText(@main,0,142-178,512,384,"Ongoing: " + @ongoing.size.to_s,Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main,0,198-178,512,384,"Completed: " + @completed.size.to_s,Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
#pbDrawOutlineText(@main, 0, 142 - 178, 512, 384, "Ongoing: " + @ongoing.size.to_s, Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
#pbDrawOutlineText(@main, 0, 198 - 178, 512, 384, "Completed: " + @completed.size.to_s, Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
pbDrawOutlineText(@main, 0, 142, 512, 384, "Ongoing: " + @ongoing.size.to_s, Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
pbDrawOutlineText(@main, 0, 198, 512, 384, "Completed: " + @completed.size.to_s, Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
|
||||
|
||||
12.times do |i|
|
||||
Graphics.update
|
||||
@@ -359,11 +361,11 @@ class Questlog
|
||||
|
||||
def pbArrows
|
||||
if @frame == 2 || @frame == 4 || @frame == 14 || @frame == 16
|
||||
@sprites["up"].y -= 1 rescue nil
|
||||
@sprites["down"].y -= 1 rescue nil
|
||||
@sprites["up"].y -= 1 if @sprites["up"] rescue nil
|
||||
@sprites["down"].y -= 1 if @sprites["down"] rescue nil
|
||||
elsif @frame == 6 || @frame == 8 || @frame == 10 || @frame == 12
|
||||
@sprites["up"].y += 1 rescue nil
|
||||
@sprites["down"].y += 1 rescue nil
|
||||
@sprites["up"].y += 1 if @sprites["up"] rescue nil
|
||||
@sprites["down"].y += 1 if @sprites["down"] rescue nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -373,11 +375,13 @@ class Questlog
|
||||
pbWait(1)
|
||||
if page == 0
|
||||
@scene = 2
|
||||
if @sprites["bg1"]
|
||||
@sprites["bg1"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["bg1"].setBitmap("Graphics/Pictures/EQI/questPage1")
|
||||
@sprites["bg1"].setBitmap("Graphics/Pictures/EQI/quest_page1")
|
||||
@sprites["bg1"].opacity = 0
|
||||
end
|
||||
@sprites["pager"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["pager"].setBitmap("Graphics/Pictures/EQI/questPager")
|
||||
@sprites["pager"].setBitmap("Graphics/Pictures/EQI/quest_pager")
|
||||
@sprites["pager"].x = 442
|
||||
@sprites["pager"].y = 3
|
||||
@sprites["pager"].z = 1
|
||||
@@ -387,16 +391,16 @@ class Questlog
|
||||
@sprites["up"].opacity -= 32
|
||||
@sprites["down"].opacity -= 32
|
||||
@sprites["main"].opacity -= 32
|
||||
@sprites["bg1"].opacity += 32
|
||||
@sprites["pager"].opacity =0
|
||||
@sprites["char"].opacity -= 32 rescue nil
|
||||
@sprites["bg1"].opacity += 32 if @sprites["bg1"]
|
||||
@sprites["pager"].opacity = 0 if @sprites["pager"]
|
||||
@sprites["char"].opacity -= 32 if @sprites["char"] rescue nil
|
||||
for i in 0...@ongoing.size
|
||||
break if i > 5
|
||||
@sprites["ongoing#{i}"].opacity -= 32 rescue nil
|
||||
@sprites["ongoing#{i}"].opacity -= 32 if @sprites["ongoing#{i}"] rescue nil
|
||||
end
|
||||
for i in 0...@completed.size
|
||||
break if i > 5
|
||||
@sprites["completed#{i}"].opacity -= 32 rescue nil
|
||||
@sprites["completed#{i}"].opacity -= 32 if @sprites["completed#{i}"] rescue nil
|
||||
end
|
||||
end
|
||||
@sprites["up"].dispose
|
||||
@@ -407,17 +411,17 @@ class Questlog
|
||||
@sprites["char"].y = 130
|
||||
@sprites["char"].src_rect.height = (@sprites["char"].bitmap.height / 4).round
|
||||
@sprites["char"].src_rect.width = (@sprites["char"].bitmap.width / 4).round
|
||||
@sprites["char"].opacity = 0
|
||||
@main.clear
|
||||
@text.clear rescue nil
|
||||
@text2.clear rescue nil
|
||||
@sprites["char"].opacity = 0 if @sprites["char"].opacity
|
||||
@main.clear if @main
|
||||
@text.clear if @text rescue nil
|
||||
@text2.clear if @text2 rescue nil
|
||||
drawTextExMulti(@main, 188, 54, 318, 8, quest.desc, Color.new(255, 255, 255), Color.new(0, 0, 0))
|
||||
pbDrawOutlineText(@main,188,162,512,384,quest.location,Color.new(255,172,115),Color.new(0,0,0))
|
||||
pbDrawOutlineText(@main, 188, 330, 512, 384, quest.location, Color.new(255, 172, 115), Color.new(0, 0, 0))
|
||||
pbDrawOutlineText(@main, 10, -178, 512, 384, quest.name, quest.color, Color.new(0, 0, 0))
|
||||
if !quest.completed
|
||||
pbDrawOutlineText(@main,8,136,512,384,"Not Completed",pbColor(:LIGHTRED),Color.new(0,0,0))
|
||||
pbDrawOutlineText(@main, 8, 250, 512, 384, "Not Completed", pbColor(:LIGHTRED), Color.new(0, 0, 0))
|
||||
else
|
||||
pbDrawOutlineText(@main,8,136,512,384,"Completed",pbColor(:LIGHTBLUE),Color.new(0,0,0))
|
||||
pbDrawOutlineText(@main, 8, 250, 512, 384, "Completed", pbColor(:LIGHTBLUE), Color.new(0, 0, 0))
|
||||
end
|
||||
10.times do |i|
|
||||
Graphics.update
|
||||
@@ -428,10 +432,10 @@ class Questlog
|
||||
elsif page == 1
|
||||
@page = 1
|
||||
@sprites["bg2"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["bg2"].setBitmap("Graphics/Pictures/EQI/questPage1")
|
||||
@sprites["bg2"].setBitmap("Graphics/Pictures/EQI/quest_page1")
|
||||
@sprites["bg2"].x = 512
|
||||
@sprites["pager2"] = IconSprite.new(0, 0, @viewport)
|
||||
#@sprites["pager2"].setBitmap("Graphics/Pictures/EQI/questPager")
|
||||
#@sprites["pager2"].setBitmap("Graphics/Pictures/EQI/quest_pager")
|
||||
#@sprites["pager2"].x = 474 + 512
|
||||
#@sprites["pager2"].y = 3
|
||||
#@sprites["pager2"].z = 1
|
||||
@@ -476,16 +480,15 @@ class Questlog
|
||||
@sprites["char2"].x -= (@sprites["char2"].x - 47) * 0.2
|
||||
end
|
||||
@sprites["main"].x = 0
|
||||
@main.clear
|
||||
@main.clear if @main
|
||||
else
|
||||
|
||||
|
||||
@page = 0
|
||||
@sprites["bg1"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["bg1"].setBitmap("Graphics/Pictures/EQI/questPage1")
|
||||
@sprites["bg1"].setBitmap("Graphics/Pictures/EQI/quest_page1")
|
||||
@sprites["bg1"].x = -512
|
||||
@sprites["pager"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["pager"].setBitmap("Graphics/Pictures/EQI/questPager")
|
||||
@sprites["pager"].setBitmap("Graphics/Pictures/EQI/quest_pager")
|
||||
@sprites["pager"].x = 442 - 512
|
||||
@sprites["pager"].y = 3
|
||||
@sprites["pager"].z = 1
|
||||
@@ -525,44 +528,44 @@ class Questlog
|
||||
end
|
||||
|
||||
def pbChar
|
||||
@sprites["char"].src_rect.x += (@sprites["char"].bitmap.width / 4).round rescue nil
|
||||
@sprites["char"].src_rect.x = 0 if @sprites["char"].src_rect.x >= @sprites["char"].bitmap.width rescue nil
|
||||
@sprites["char2"].src_rect.x += (@sprites["char2"].bitmap.width / 4).round rescue nil
|
||||
@sprites["char2"].src_rect.x = 0 if @sprites["char2"].src_rect.x >= @sprites["char2"].bitmap.width rescue nil
|
||||
@sprites["char"].src_rect.x += (@sprites["char"].bitmap.width / 4).round if @sprites["char"] rescue nil
|
||||
@sprites["char"].src_rect.x = 0 if @sprites["char"].src_rect.x >= @sprites["char"].bitmap.width if @sprites["char"] rescue nil
|
||||
@sprites["char2"].src_rect.x += (@sprites["char2"].bitmap.width / 4).round if @sprites["char2"] rescue nil
|
||||
@sprites["char2"].src_rect.x = 0 if @sprites["char2"].src_rect.x >= @sprites["char2"].bitmap.width if @sprites["char2"] rescue nil
|
||||
end
|
||||
|
||||
def pbMain
|
||||
pbWait(1)
|
||||
12.times do |i|
|
||||
Graphics.update
|
||||
@sprites["main"].opacity -= 32 rescue nil
|
||||
@sprites["main"].opacity -= 32 if @sprites["main"] rescue nil
|
||||
@sprites["bg0"].opacity += 32 if @sprites["bg0"].opacity < 255
|
||||
@sprites["bg1"].opacity -= 32 rescue nil if i > 3
|
||||
@sprites["bg2"].opacity -= 32 rescue nil if i > 3
|
||||
@sprites["pager"].opacity -= 32 rescue nil if i > 3
|
||||
@sprites["pager2"].opacity -= 32 rescue nil if i > 3
|
||||
@sprites["char"].opacity -= 32 rescue nil
|
||||
@sprites["char2"].opacity -= 32 rescue nil
|
||||
@sprites["text"].opacity -= 32 rescue nil
|
||||
@sprites["up"].opacity -= 32
|
||||
@sprites["down"].opacity -= 32
|
||||
@sprites["bg1"].opacity -= 32 if @sprites["bg1"] rescue nil if i > 3
|
||||
@sprites["bg2"].opacity -= 32 if @sprites["bg2"] rescue nil if i > 3
|
||||
@sprites["pager"].opacity -= 32 if @sprites["pager"] rescue nil if i > 3
|
||||
@sprites["pager2"].opacity -= 32 if @sprites["pager2"] rescue nil if i > 3
|
||||
@sprites["char"].opacity -= 32 if @sprites["char"] rescue nil
|
||||
@sprites["char2"].opacity -= 32 if @sprites["char2"] rescue nil
|
||||
@sprites["text"].opacity -= 32 if @sprites["text"] rescue nil
|
||||
@sprites["up"].opacity -= 32 if @sprites["up"]
|
||||
@sprites["down"].opacity -= 32 if @sprites["down"]
|
||||
for j in 0...@ongoing.size
|
||||
@sprites["ongoing#{j}"].opacity -= 32 rescue nil
|
||||
@sprites["ongoing#{j}"].opacity -= 32 if @sprites["ongoing#{j}"] rescue nil
|
||||
end
|
||||
for j in 0...@completed.size
|
||||
@sprites["completed#{j}"].opacity -= 32 rescue nil
|
||||
@sprites["completed#{j}"].opacity -= 32 if @sprites["completed#{j}"] rescue nil
|
||||
end
|
||||
end
|
||||
@sprites["up"].dispose
|
||||
@sprites["down"].dispose
|
||||
@main.clear
|
||||
@text.clear rescue nil
|
||||
@text2.clear rescue nil
|
||||
@main.clear if @main
|
||||
@text.clear if @text rescue nil
|
||||
@text2.clear if @text2 rescue nil
|
||||
@sel_two = 0
|
||||
@scene = 0
|
||||
pbDrawOutlineText(@main,0,2-178,512,384,"Quest Log",Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main,0,142-178,512,384,"Ongoing: " + @ongoing.size.to_s,Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main,0,198-178,512,384,"Completed: " + @completed.size.to_s,Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 0, 2, 512, 384, "Quest Log", Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
pbDrawOutlineText(@main, 0, 142, 512, 384, "Ongoing: " + @ongoing.size.to_s, Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
pbDrawOutlineText(@main, 0, 198, 512, 384, "Completed: " + @completed.size.to_s, Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
12.times do |i|
|
||||
Graphics.update
|
||||
@sprites["bg0"].opacity += 32 if i < 8
|
||||
@@ -601,13 +604,13 @@ class Questlog
|
||||
@sprites["ongoing#{@box}"].src_rect.y = (@sprites["ongoing#{@box}"].bitmap.height / 2).round if @mode == 0
|
||||
@sprites["completed#{@box}"].src_rect.y = (@sprites["completed#{@box}"].bitmap.height / 2).round if @mode == 1
|
||||
if @box == 5
|
||||
@main.clear
|
||||
@main.clear if @main
|
||||
if @mode == 0
|
||||
for i in 0...@ongoing.size
|
||||
break if i > 5
|
||||
j = (i == 0 ? -5 : (i == 1 ? -4 : (i == 2 ? -3 : (i == 3 ? -2 : (i == 4 ? -1 : 0)))))
|
||||
@sprites["ongoing#{i}"].quest = @ongoing[@sel_two + j]
|
||||
pbDrawOutlineText(@main,11,-124+52*i,512,384,@ongoing[@sel_two+j].name,@ongoing[@sel_two+j].color,Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 11, getCellYPosition(i), 512, 384, @ongoing[@sel_two + j].name, @ongoing[@sel_two + j].color, Color.new(0, 0, 0), 1)
|
||||
end
|
||||
if @sprites["ongoing0"] != @ongoing[0]
|
||||
@sprites["up"].visible = true
|
||||
@@ -619,13 +622,13 @@ class Questlog
|
||||
else
|
||||
@sprites["down"].visible = false
|
||||
end
|
||||
pbDrawOutlineText(@main,0,2-178,512,384,"Ongoing Quests",Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 0, 2, 512, 384, "Ongoing Quests", Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
else
|
||||
for i in 0...@completed.size
|
||||
break if i > 5
|
||||
j = (i == 0 ? -5 : (i == 1 ? -4 : (i == 2 ? -3 : (i == 3 ? -2 : (i == 4 ? -1 : 0)))))
|
||||
@sprites["completed#{i}"].quest = @completed[@sel_two + j]
|
||||
pbDrawOutlineText(@main,11,-124+52*i,512,384,@completed[@sel_two+j].name,@completed[@sel_two+j].color,Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 11, getCellYPosition(i), 512, 384, @completed[@sel_two + j].name, @completed[@sel_two + j].color, Color.new(0, 0, 0), 1)
|
||||
end
|
||||
if @sprites["completed0"] != @completed[0]
|
||||
@sprites["up"].visible = true
|
||||
@@ -652,12 +655,12 @@ class Questlog
|
||||
@sprites["ongoing#{@box}"].src_rect.y = (@sprites["ongoing#{@box}"].bitmap.height / 2).round if @mode == 0
|
||||
@sprites["completed#{@box}"].src_rect.y = (@sprites["completed#{@box}"].bitmap.height / 2).round if @mode == 1
|
||||
if @box == 0
|
||||
@main.clear
|
||||
@main.clear if @main
|
||||
if @mode == 0
|
||||
for i in 0...@ongoing.size
|
||||
break if i > 5
|
||||
@sprites["ongoing#{i}"].quest = @ongoing[@sel_two + i]
|
||||
pbDrawOutlineText(@main,11,-124+52*i,512,384,@ongoing[@sel_two+i].name,@ongoing[@sel_two+i].color,Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 11, getCellYPosition(i), 512, 384, @ongoing[@sel_two + i].name, @ongoing[@sel_two + i].color, Color.new(0, 0, 0), 1)
|
||||
end
|
||||
if @sprites["ongoing5"] != @ongoing[0]
|
||||
@sprites["up"].visible = true
|
||||
@@ -669,12 +672,12 @@ class Questlog
|
||||
else
|
||||
@sprites["down"].visible = false
|
||||
end
|
||||
pbDrawOutlineText(@main,0,2-178,512,384,"Ongoing Quests",Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 0, 2, 512, 384, "Ongoing Quests", Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
else
|
||||
for i in 0...@completed.size
|
||||
break if i > 5
|
||||
@sprites["completed#{i}"].quest = @completed[@sel_two + i]
|
||||
pbDrawOutlineText(@main,11,-124+52*i,512,384,@completed[@sel_two+i].name,@completed[@sel_two+i].color,Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 11, getCellYPosition(i), 512, 384, @completed[@sel_two + i].name, @completed[@sel_two + i].color, Color.new(0, 0, 0), 1)
|
||||
end
|
||||
if @sprites["completed0"] != @completed[0]
|
||||
@sprites["up"].visible = true
|
||||
@@ -700,7 +703,7 @@ class Questlog
|
||||
@mode = id
|
||||
@box = 0
|
||||
@sprites["up"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["up"].setBitmap("Graphics/Pictures/EQI/questArrow")
|
||||
@sprites["up"].setBitmap("Graphics/Pictures/EQI/quest_arrow")
|
||||
@sprites["up"].zoom_x = 1.25
|
||||
@sprites["up"].zoom_y = 1.25
|
||||
@sprites["up"].x = Graphics.width / 2
|
||||
@@ -708,7 +711,7 @@ class Questlog
|
||||
@sprites["up"].z = 2
|
||||
@sprites["up"].visible = false
|
||||
@sprites["down"] = IconSprite.new(0, 0, @viewport)
|
||||
@sprites["down"].setBitmap("Graphics/Pictures/EQI/questArrow")
|
||||
@sprites["down"].setBitmap("Graphics/Pictures/EQI/quest_arrow")
|
||||
@sprites["down"].zoom_x = 1.25
|
||||
@sprites["down"].zoom_y = 1.25
|
||||
@sprites["down"].x = Graphics.width / 2 + 21
|
||||
@@ -722,37 +725,40 @@ class Questlog
|
||||
@sprites["btn0"].opacity -= 32 if i > 1
|
||||
@sprites["btn1"].opacity -= 32 if i > 1
|
||||
@sprites["main"].opacity -= 32 if i > 1
|
||||
@sprites["bg1"].opacity -= 32 rescue nil if i > 1
|
||||
@sprites["bg2"].opacity -= 32 rescue nil if i > 1
|
||||
@sprites["pager"].opacity -= 32 rescue nil if i > 1
|
||||
@sprites["pager2"].opacity -= 32 rescue nil if i > 1
|
||||
@sprites["bg1"].opacity -= 32 if @sprites["bg1"] rescue nil if i > 1
|
||||
@sprites["bg2"].opacity -= 32 if @sprites["bg2"] rescue nil if i > 1
|
||||
@sprites["pager"].opacity -= 32 if @sprites["pager"] rescue nil if i > 1
|
||||
@sprites["pager2"].opacity -= 32 if @sprites["pager2"] rescue nil if i > 1
|
||||
if @sprites["char"]
|
||||
@sprites["char"].opacity -= 32 rescue nil
|
||||
end
|
||||
if @sprites["char2"]
|
||||
@sprites["char2"].opacity -= 32 rescue nil
|
||||
end
|
||||
@sprites["text"].opacity -= 32 rescue nil if i > 1
|
||||
@sprites["text2"].opacity -= 32 rescue nil if i > 1
|
||||
@sprites["text"].opacity -= 32 if @sprites["text"] rescue nil if i > 1
|
||||
@sprites["text2"].opacity -= 32 if @sprites["text"] rescue nil if i > 1
|
||||
end
|
||||
@main.clear
|
||||
@text.clear rescue nil
|
||||
@text2.clear rescue nil
|
||||
|
||||
@main.clear if @main
|
||||
@text.clear if @text rescue nil
|
||||
@text2.clear if @text2 rescue nil
|
||||
if id == 0
|
||||
for i in 0...@ongoing.size
|
||||
break if i > 5
|
||||
@sprites["ongoing#{i}"] = QuestSprite.new(0, 0, @viewport)
|
||||
@sprites["ongoing#{i}"].setBitmap("Graphics/Pictures/EQI/questBtn")
|
||||
@sprites["ongoing#{i}"].setBitmap("Graphics/Pictures/EQI/quest_button")
|
||||
@sprites["ongoing#{i}"].quest = @ongoing[i]
|
||||
@sprites["ongoing#{i}"].x = 94
|
||||
@sprites["ongoing#{i}"].y = 42 + 52 * i
|
||||
@sprites["ongoing#{i}"].src_rect.height = (@sprites["ongoing#{i}"].bitmap.height / 2).round
|
||||
@sprites["ongoing#{i}"].src_rect.y = (@sprites["ongoing#{i}"].bitmap.height / 2).round if i == @sel_two
|
||||
@sprites["ongoing#{i}"].opacity = 0
|
||||
pbDrawOutlineText(@main,11,-124+52*i,512,384,@ongoing[i].name,@ongoing[i].color,Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 11, getCellYPosition(i), 512, 384, @ongoing[i].name, @ongoing[i].color, Color.new(0, 0, 0), 1)
|
||||
|
||||
#pbDrawOutlineText(@main, 11, -124 + 52 * i, 512, 384, @ongoing[i].name, @ongoing[i].color, Color.new(0, 0, 0), 1)
|
||||
end
|
||||
pbDrawOutlineText(@main,0,0,512,384,"No ongoing quests",pbColor(:WHITE),pbColor(:BLACK),1) if @ongoing.size == 0
|
||||
pbDrawOutlineText(@main,0,2-178,512,384,"Ongoing Quests",Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 0, 175, 512, 384, "No ongoing quests", pbColor(:WHITE), pbColor(:BLACK), 1) if @ongoing.size == 0
|
||||
pbDrawOutlineText(@main, 0, 2, 512, 384, "Ongoing Quests", Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
12.times do |i|
|
||||
Graphics.update
|
||||
@sprites["main"].opacity += 32 if i < 8
|
||||
@@ -765,16 +771,19 @@ class Questlog
|
||||
for i in 0...@completed.size
|
||||
break if i > 5
|
||||
@sprites["completed#{i}"] = QuestSprite.new(0, 0, @viewport)
|
||||
@sprites["completed#{i}"].setBitmap("Graphics/Pictures/EQI/questBtn")
|
||||
@sprites["completed#{i}"].setBitmap("Graphics/Pictures/EQI/quest_button")
|
||||
@sprites["completed#{i}"].x = 94
|
||||
@sprites["completed#{i}"].y = 42 + 52 * i
|
||||
@sprites["completed#{i}"].src_rect.height = (@sprites["completed#{i}"].bitmap.height / 2).round
|
||||
@sprites["completed#{i}"].src_rect.y = (@sprites["completed#{i}"].bitmap.height / 2).round if i == @sel_two
|
||||
@sprites["completed#{i}"].opacity = 0
|
||||
pbDrawOutlineText(@main,11,-124+52*i,512,384,@completed[i].name,@completed[i].color,Color.new(0,0,0),1)
|
||||
pbDrawOutlineText(@main, 11,getCellYPosition(i), 512, 384, @completed[i].name, @completed[i].color, Color.new(0, 0, 0), 1)
|
||||
end
|
||||
pbDrawOutlineText(@main,0,0,512,384,"No completed quests",pbColor(:WHITE),pbColor(:BLACK),1) if @completed.size == 0
|
||||
pbDrawOutlineText(@main,0,2-178,512,384,"Completed Quests",Color.new(255,255,255),Color.new(0,0,0),1)
|
||||
|
||||
|
||||
|
||||
pbDrawOutlineText(@main, 0, 175, 512, 384, "No completed quests", pbColor(:WHITE), pbColor(:BLACK), 1) if @completed.size == 0
|
||||
pbDrawOutlineText(@main, 0, 2, 512, 384, "Completed Quests", Color.new(255, 255, 255), Color.new(0, 0, 0), 1)
|
||||
12.times do |i|
|
||||
Graphics.update
|
||||
@sprites["main"].opacity += 32 if i < 8
|
||||
@@ -787,20 +796,23 @@ class Questlog
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def getCellYPosition(i)
|
||||
return 56 + (52 * i)
|
||||
end
|
||||
def pbEnd
|
||||
12.times do |i|
|
||||
Graphics.update
|
||||
@sprites["bg0"].opacity -= 32 if i > 3
|
||||
@sprites["btn0"].opacity -= 32
|
||||
@sprites["btn1"].opacity -= 32
|
||||
@sprites["main"].opacity -= 32
|
||||
@sprites["char"].opacity -= 40 rescue nil
|
||||
@sprites["char2"].opacity -= 40 rescue nil
|
||||
@sprites["bg0"].opacity -= 32 if @sprites["bg0"] && i > 3
|
||||
@sprites["btn0"].opacity -= 32 if @sprites["btn0"]
|
||||
@sprites["btn1"].opacity -= 32 if @sprites["btn1"]
|
||||
@sprites["main"].opacity -= 32 if @sprites["main"]
|
||||
@sprites["char"].opacity -= 40 if @sprites["char"]rescue nil
|
||||
@sprites["char2"].opacity -= 40 if @sprites["char2"] rescue nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
#TODO: à terminer
|
||||
def pbSynchronizeQuestLog()
|
||||
########################
|
||||
@@ -868,7 +880,6 @@ def pbSynchronizeQuestLog()
|
||||
pbSetQuest(40, true) if $game_switches[526]
|
||||
pbSetQuest(41, true) if $game_self_switches[[565, 10, "A"]]
|
||||
|
||||
|
||||
########################
|
||||
### Quest finished ###
|
||||
########################
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user