Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
SET THE THREAD TO PRINTABLE VERSION!

DISCLAIMER (for you coders): This piece of code is incredibly overcomplicated I'm sure.

Hi there,
As you can probably tell by the title, I've made an easy-to-use - in my opinion - Questing Interface for Essentials. I tried to make it as user-friendly as possible in terms of creating quests, but you'll have to go into the scripts for that as the event page likes to break lines. I know you can work around this, but I thought doing it in the code would be better in the first place.

Installation
Spoiler:
First of all, download these graphics and put them in Graphics/Pictures.

On to the scripting part: Two new functions for drawing text I didn't think came with Stock Essentials. These should go anywhere in the "DrawText" script:
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
Now for the main script, you want to paste this whole script ABOVE THE PSCREEN SCRIPTS, NOT ABOVE MAIN!
##=##===========================================================================
##=## Easy Questing System - made by M3rein
##=##===========================================================================
##=## Create your own quests starting from line 72. Be aware of the following:
##=## * Every quest should have a unique ID;
##=## * Every quest should be unique (at least one field has to be different);
##=## * The "Name" field can't be very long;
##=## * The "Desc" field can be quite long;
##=## * The "NPC" field is JUST a name;
##=## * The "Sprite" field is the name of the sprite in "Graphics/Characters";
##=## * The "Location" field is JUST a name;
##=## * The "Color" field is a SYMBOL (starts with ':'). List under "pbColor";
##=## * The "Time" field can be a random string for it to be "?????" in-game;
##=## * The "Completed" field can be pre-set, but is normally only changed in-game
##=##===========================================================================
class Quest
  attr_accessor :id
  attr_accessor :name
  attr_accessor :desc
  attr_accessor :npc
  attr_accessor :sprite
  attr_accessor :location
  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
    self.desc = desc
    self.npc = npc
    self.sprite = sprite
    self.location = location
    self.color = pbColor(color)
    self.time = time
    self.completed = completed
  end
end

def pbColor(color)
  # Mix your own colors: http://www.rapidtables.com/web/color/RGB_Color.htm
  return Color.new(0,0,0)         if color == :BLACK
  return Color.new(255,115,115)   if color == :LIGHTRED
  return Color.new(245,11,11)     if color == :RED
  return Color.new(164,3,3)       if color == :DARKRED
  return Color.new(47,46,46)      if color == :DARKGREY
  return Color.new(100,92,92)     if color == :LIGHTGREY
  return Color.new(226,104,250)   if color == :PINK
  return Color.new(243,154,154)   if color == :PINKTWO
  return Color.new(255,160,50)    if color == :GOLD
  return Color.new(255,186,107)   if color == :LIGHTORANGE
  return Color.new(95,54,6)       if color == :BROWN
  return Color.new(122,76,24)     if color == :LIGHTBROWN
  return Color.new(255,246,152)   if color == :LIGHTYELLOW
  return Color.new(242,222,42)    if color == :YELLOW
  return Color.new(80,111,6)      if color == :DARKGREEN
  return Color.new(154,216,8)     if color == :GREEN
  return Color.new(197,252,70)    if color == :LIGHTGREEN
  return Color.new(74,146,91)     if color == :FADEDGREEN
  return Color.new(6,128,92)      if color == :DARKLIGHTBLUE
  return Color.new(18,235,170)    if color == :LIGHTBLUE
  return Color.new(139,247,215)   if color == :SUPERLIGHTBLUE
  return Color.new(35,203,255)    if color == :BLUE
  return Color.new(3,44,114)      if color == :DARKBLUE
  return Color.new(7,3,114)       if color == :SUPERDARKBLUE
  return Color.new(63,6,121)      if color == :DARKPURPLE
  return Color.new(113,16,209)    if color == :PURPLE
  return Color.new(219,183,37)    if color == :ORANGE
  return Color.new(255,255,255)
end

QUESTS = [
# Make sure you take into account all the information given at the top of this script.
# You don't have to give the Quest a color - :SUPERLIGHTBLUE in this example. It will default to White.
   Quest.new(0, "Find a Super Rod!", "Find a Super Rod somewhere in the field. This item does not have to be handed over.", "Quest Master", "trchar039", "Queesting Town", :SUPERLIGHTBLUE),
]

class PokeBattle_Trainer
  attr_accessor :quests
end

def pbCompletedQuest?(id)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for i in 0...$Trainer.quests.size
    return true if $Trainer.quests[i].completed && $Trainer.quests[i].id == id
  end
  return false
end

def pbQuestlog
  Questlog.new
end

def pbAddQuest(id)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in QUESTS
    $Trainer.quests << q if q.id == id
  end
end

def pbDeleteQuest(id)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    $Trainer.quests.delete(q) if q.id == id
  end
end

def pbSetQuest(id, completed)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.completed = completed if q.id == id
  end
end

def pbSetQuestName(id, name)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.name = name if q.id == id
  end
end

def pbSetQuestDesc(id, desc)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.desc = desc if q.id == id
  end
end

def pbSetQuestNPC(id, npc)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.npc = npc if q.id == id
  end
end

def pbSetQuestNPCSprite(id, sprite)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.sprite = sprite if q.id == id
  end
end

def pbSetQuestLocation(id, location)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.location = location if q.id == id
  end
end

def pbSetQuestColor(id, color)
  $Trainer.quests = [] if $Trainer.quests.class == NilClass
  for q in $Trainer.quests
    q.color = pbColor(color) if q.id == id
  end
end

class QuestSprite < IconSprite
  attr_accessor :quest
end

class Questlog
  def initialize
    $Trainer.quests = [] if $Trainer.quests.class == NilClass
    @page = 0
    @sel_one = 0
    @sel_two = 0
    @scene = 0
    @mode = 0
    @box = 0
    @completed = []
    @ongoing = []
    for q in $Trainer.quests
      @ongoing << q if !q.completed
      @completed << q if q.completed
    end
    @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
    @viewport.z = 99999
    @sprites = {}
    @sprites["main"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
    @sprites["main"].z = 1
    @sprites["main"].opacity = 0
    @main = @sprites["main"].bitmap
    pbSetSystemFont(@main)
    pbDrawOutlineText(@main,0,2-178,512,384,"Quest Log",Color.new(255,255,255),Color.new(0,0,0),1)
    
    @sprites["bg0"] = IconSprite.new(0, 0, @viewport)
    @sprites["bg0"].setBitmap("Graphics/Pictures/pokegearbg")
    @sprites["bg0"].opacity = 0
    
    for i in 0..1
      @sprites["btn#{i}"] = IconSprite.new(0, 0, @viewport)
      @sprites["btn#{i}"].setBitmap("Graphics/Pictures/questBtn")
      @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)

    12.times do |i|
      Graphics.update
      @sprites["bg0"].opacity += 32 if i < 8
      @sprites["btn0"].opacity += 32 if i > 3
      @sprites["btn1"].opacity += 32 if i > 3
      @sprites["main"].opacity += 64 if i > 7
    end
    pbUpdate
  end
  
  def pbUpdate
    @frame = 0
    loop do
      @frame += 1
      Graphics.update
      Input.update
      if @scene == 0
        break if Input.trigger?(Input::B)
        pbList(@sel_one) if Input.trigger?(Input::C)
        pbSwitch(:DOWN) if Input.trigger?(Input::DOWN)
        pbSwitch(:UP) if Input.trigger?(Input::UP)
      end
      if @scene == 1
        pbMain if Input.trigger?(Input::B)
        pbMove(:DOWN) if Input.trigger?(Input::DOWN)
        pbMove(:UP) if Input.trigger?(Input::UP)
        pbLoad(0) if Input.trigger?(Input::C)
	pbArrows
      end
      if @scene == 2
        pbList(@sel_one) if Input.trigger?(Input::B)
        pbChar if @frame == 6 || @frame == 12 || @frame == 18
        pbLoad(1) if Input.trigger?(Input::RIGHT) && @page == 0
        pbLoad(2) if Input.trigger?(Input::LEFT) && @page == 1
      end
      @frame = 0 if @frame == 18
    end
    pbEnd
    pbDisposeSpriteHash(@sprites)
    @viewport.dispose
    pbWait(1)
  end
	
  def pbArrows
    if @frame == 2 || @frame == 4 || @frame == 14 || @frame == 16
      @sprites["up"].y -= 1 rescue nil
      @sprites["down"].y -= 1 rescue nil
    elsif @frame == 6 || @frame == 8 || @frame == 10 || @frame == 12
      @sprites["up"].y += 1 rescue nil
       @sprites["down"].y += 1 rescue nil
    end
  end
	
  def pbLoad(page)
    return if @mode == 0 ? @ongoing.size == 0 : @completed.size == 0
    quest = @mode == 0 ? @ongoing[@sel_two] : @completed[@sel_two]
    pbWait(1)
    if page == 0
      @scene = 2
      @sprites["bg1"] = IconSprite.new(0, 0, @viewport)
      @sprites["bg1"].setBitmap("Graphics/Pictures/questPage1")
      @sprites["bg1"].opacity = 0
      @sprites["pager"] = IconSprite.new(0, 0, @viewport)
      @sprites["pager"].setBitmap("Graphics/Pictures/questPager")
      @sprites["pager"].x = 442
      @sprites["pager"].y = 3
      @sprites["pager"].z = 1
      @sprites["pager"].opacity = 0
      8.times do
        Graphics.update
	@sprites["up"].opacity -= 32
	@sprites["down"].opacity -= 32
        @sprites["main"].opacity -= 32
        @sprites["bg1"].opacity += 32
        @sprites["pager"].opacity += 32
        @sprites["char"].opacity -= 32 rescue nil
        for i in [email protected]
	  break if i > 5
          @sprites["ongoing#{i}"].opacity -= 32 rescue nil
        end
        for i in [email protected]
	  break if i > 5
          @sprites["completed#{i}"].opacity -= 32 rescue nil
        end
      end
      @sprites["up"].dispose
      @sprites["down"].dispose
      @sprites["char"] = IconSprite.new(0, 0, @viewport)
      @sprites["char"].setBitmap("Graphics/Characters/#{quest.sprite}")
      @sprites["char"].x = 62
      @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
      drawTextExMulti(@main,188,54,318,8,quest.desc,Color.new(255,255,255),Color.new(0,0,0))
      pbDrawOutlineText(@main,188,162,512,384,"From " + quest.npc,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))
      else
        pbDrawOutlineText(@main,8,136,512,384,"Completed",pbColor(:LIGHTBLUE),Color.new(0,0,0))
      end
      10.times do |i|
        Graphics.update
        @sprites["main"].opacity += 32
        @sprites["char"].opacity += 32 if i > 1
      end
    elsif page == 1
      @page = 1
      @sprites["bg2"] = IconSprite.new(0, 0, @viewport)
      @sprites["bg2"].setBitmap("Graphics/Pictures/questPage1")
      @sprites["bg2"].x = 512
      @sprites["pager2"] = IconSprite.new(0, 0, @viewport)
      @sprites["pager2"].setBitmap("Graphics/Pictures/questPager")
      @sprites["pager2"].x = 474 + 512
      @sprites["pager2"].y = 3
      @sprites["pager2"].z = 1
      @sprites["char2"].dispose rescue nil
      @sprites["char2"] = IconSprite.new(0, 0, @viewport)
      @sprites["char2"].setBitmap("Graphics/Characters/#{quest.sprite}")
      @sprites["char2"].x = 62 + 512
      @sprites["char2"].y = 130
      @sprites["char2"].z = 1
      @sprites["char2"].src_rect.height = (@sprites["char2"].bitmap.height / 4).round
      @sprites["char2"].src_rect.width = (@sprites["char2"].bitmap.width / 4).round
      @sprites["text2"] = IconSprite.new(@viewport)
      @sprites["text2"].bitmap = Bitmap.new(Graphics.width,Graphics.height)
      @text2 = @sprites["text2"].bitmap
      pbSetSystemFont(@text2)
      pbDrawOutlineText(@text2,188,-122,512,384,"Quest received in:",Color.new(255,255,255),Color.new(0,0,0))
      pbDrawOutlineText(@text2,188,-94,512,384,quest.location,Color.new(255,172,115),Color.new(0,0,0))
      pbDrawOutlineText(@text2,188,-62,512,384,"Quest received at:",Color.new(255,255,255),Color.new(0,0,0))
      time = quest.time.to_s
      txt = time.split(' ')[1] + " " + time.split(' ')[2] + ", " + time.split(' ')[3].split(':')[0] + ":" + time.split(' ')[3].split(':')[1] rescue "?????"
      pbDrawOutlineText(@text2,188,-36,512,384,txt,Color.new(255,172,115),Color.new(0,0,0))
      pbDrawOutlineText(@text2,188,-4,512,384,"Quest received from:",Color.new(255,255,255),Color.new(0,0,0))
      pbDrawOutlineText(@text2,188,22,512,384,quest.npc,Color.new(255,172,115),Color.new(0,0,0))
      pbDrawOutlineText(@text2,188,162,512,384,"From " + quest.npc,Color.new(255,172,115),Color.new(0,0,0))
      pbDrawOutlineText(@text2,10,-178,512,384,quest.name,quest.color,Color.new(0,0,0))
      if !quest.completed
        pbDrawOutlineText(@text2,8,136,512,384,"Not Completed",pbColor(:LIGHTRED),Color.new(0,0,0))
      else
        pbDrawOutlineText(@text2,8,136,512,384,"Completed",pbColor(:LIGHTBLUE),Color.new(0,0,0))
      end
      @sprites["text2"].x = 512
      16.times do
        Graphics.update
        @sprites["bg1"].x -= (@sprites["bg1"].x + 526) * 0.2
        @sprites["pager"].x -= (@sprites["pager"].x + 526) * 0.2 rescue nil
        @sprites["char"].x -= (@sprites["char"].x + 526) * 0.2 rescue nil
        @sprites["main"].x -= (@sprites["main"].x + 526) * 0.2
        @sprites["text"].x -= (@sprites["text"].x + 526) * 0.2 rescue nil
        @sprites["bg2"].x -= (@sprites["bg2"].x + 14) * 0.2
        @sprites["pager2"].x -= (@sprites["pager2"].x - 459) * 0.2
        @sprites["text2"].x -= (@sprites["text2"].x + 14) * 0.2
        @sprites["char2"].x -= (@sprites["char2"].x - 47) * 0.2
      end
      @sprites["main"].x = 0
      @main.clear
    else
      @page = 0
      @sprites["bg1"] = IconSprite.new(0, 0, @viewport)
      @sprites["bg1"].setBitmap("Graphics/Pictures/questPage1")
      @sprites["bg1"].x = -512
      @sprites["pager"] = IconSprite.new(0, 0, @viewport)
      @sprites["pager"].setBitmap("Graphics/Pictures/questPager")
      @sprites["pager"].x = 442 - 512
      @sprites["pager"].y = 3
      @sprites["pager"].z = 1
      @sprites["text"] = IconSprite.new(@viewport)
      @sprites["text"].bitmap = Bitmap.new(Graphics.width,Graphics.height)
      @text = @sprites["text"].bitmap
      pbSetSystemFont(@text)
      @sprites["char"].dispose rescue nil
      @sprites["char"] = IconSprite.new(0, 0, @viewport)
      @sprites["char"].setBitmap("Graphics/Characters/#{quest.sprite}")
      @sprites["char"].x = 62 - 512
      @sprites["char"].y = 130
      @sprites["char"].z = 1
      @sprites["char"].src_rect.height = (@sprites["char"].bitmap.height / 4).round
      @sprites["char"].src_rect.width = (@sprites["char"].bitmap.width / 4).round
      drawTextExMulti(@text,188,54,318,8,quest.desc,Color.new(255,255,255),Color.new(0,0,0))
      pbDrawOutlineText(@text,188,162,512,384,"From " + quest.npc,Color.new(255,172,115),Color.new(0,0,0))
      pbDrawOutlineText(@text,10,-178,512,384,quest.name,quest.color,Color.new(0,0,0))
      if !quest.completed
        pbDrawOutlineText(@text,8,136,512,384,"Not Completed",pbColor(:LIGHTRED),Color.new(0,0,0))
      else
        pbDrawOutlineText(@text,8,136,512,384,"Completed",pbColor(:LIGHTBLUE),Color.new(0,0,0))
      end
      @sprites["text"].x = -512
      16.times do
        Graphics.update
        @sprites["bg1"].x -= (@sprites["bg1"].x - 14) * 0.2
        @sprites["pager"].x -= (@sprites["pager"].x - 457) * 0.2
        @sprites["bg2"].x -= (@sprites["bg2"].x - 526) * 0.2
        @sprites["pager2"].x -= (@sprites["pager2"].x - 526) * 0.2
        @sprites["char2"].x -= (@sprites["char2"].x - 526) * 0.2
        @sprites["text2"].x -= (@sprites["text2"].x - 526) * 0.2
        @sprites["text"].x -= (@sprites["text"].x - 15) * 0.2
        @sprites["char"].x -= (@sprites["char"].x - 76) * 0.2
      end
    end
  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
  end
  
  def pbMain
    pbWait(1)
    12.times do |i|
      Graphics.update
      @sprites["main"].opacity -= 32 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
      for j in [email protected]
        @sprites["ongoing#{j}"].opacity -= 32 rescue nil
      end
      for j in [email protected]
        @sprites["completed#{j}"].opacity -= 32 rescue nil
      end
    end
    @sprites["up"].dispose
    @sprites["down"].dispose
    @main.clear
    @text.clear rescue nil
    @text2.clear 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)
    12.times do |i|
      Graphics.update
      @sprites["bg0"].opacity += 32 if i < 8
      @sprites["btn0"].opacity += 32 if i > 3
      @sprites["btn1"].opacity += 32 if i > 3
      @sprites["main"].opacity += 48 if i > 5
    end
  end
  
  def pbSwitch(dir)
    if dir == :DOWN
      return if @sel_one == 1
      @sprites["btn#{@sel_one}"].src_rect.y = 0
      @sel_one += 1
      @sprites["btn#{@sel_one}"].src_rect.y = (@sprites["btn#{@sel_one}"].bitmap.height / 2).round
    else
      return if @sel_one == 0
      @sprites["btn#{@sel_one}"].src_rect.y = 0
      @sel_one -= 1
      @sprites["btn#{@sel_one}"].src_rect.y = (@sprites["btn#{@sel_one}"].bitmap.height / 2).round
    end
  end
  
  def pbMove(dir)
    pbWait(1)
    if dir == :DOWN
      return if @sel_two == @ongoing.size - 1 && @mode == 0
      return if @sel_two == @completed.size - 1 && @mode == 1
      return if @ongoing.size == 0 && @mode == 0
      return if @completed.size == 0 && @mode == 1
      @sprites["ongoing#{@box}"].src_rect.y = 0 if @mode == 0
      @sprites["completed#{@box}"].src_rect.y = 0 if @mode == 1
      @sel_two += 1
      @box += 1
      @box = 5 if @box > 5
      @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
	if @mode == 0
	  for i in [email protected]
	    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)
	  end
	  if @sprites["ongoing0"].quest != @ongoing[0]
	     @sprites["up"].visible = true
	  else
	     @sprites["up"].visible = false
	  end
	  if @sprites["ongoing5"].quest != @ongoing[@ongoing.size - 1]
	    @sprites["down"].visible = true
	  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)
	else
	  for i in [email protected]
	    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)
	  end
	  if @sprites["completed0"].quest != @completed[0]
	    @sprites["up"].visible = true
	  else
	    @sprites["up"].visible = false
	  end
	  if @sprites["completed5"].quest != @completed[@completed.size - 1]
	    @sprites["down"].visible = true
	  else
	    @sprites["down"].visible = false
	  end
	  pbDrawOutlineText(@main,0,2-178,512,384,"Completed Quests",Color.new(255,255,255),Color.new(0,0,0),1)
	end
      end
    else
      return if @sel_two == 0
      return if @ongoing.size == 0 && @mode == 0
      return if @completed.size == 0 && @mode == 1
      @sprites["ongoing#{@box}"].src_rect.y = 0 if @mode == 0
      @sprites["completed#{@box}"].src_rect.y = 0 if @mode == 1
      @sel_two -= 1
      @box -= 1
      @box = 0 if @box < 0
      @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
	if @mode == 0
	  for i in [email protected]
	    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)
	  end
	  if @sprites["ongoing5"].quest != @ongoing[0]
	    @sprites["up"].visible = true
	  else
	    @sprites["up"].visible = false
	  end
	  if @sprites["ongoing5"].quest != @ongoing[@ongoing.size - 1]
	    @sprites["down"].visible = true
	  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)
	else
	  for i in [email protected]
	    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)
	  end
	  if @sprites["completed0"].quest != @completed[0]
	    @sprites["up"].visible = true
	  else
	    @sprites["up"].visible = false
	  end
	  if @sprites["completed5"].quest != @completed[@completed.size - 1]
	    @sprites["down"].visible = true
	  else
	    @sprites["down"].visible = false
	  end
	  pbDrawOutlineText(@main,0,2-178,512,384,"Completed Quests",Color.new(255,255,255),Color.new(0,0,0),1)
	end
      end
    end
  end
  
  def pbList(id)
    pbWait(1)
    @sel_two = 0
    @page = 0
    @scene = 1
    @mode = id
    @box = 0
    @sprites["up"] = IconSprite.new(0, 0, @viewport)
    @sprites["up"].setBitmap("Graphics/Pictures/questArrow")
    @sprites["up"].zoom_x = 1.25
    @sprites["up"].zoom_y = 1.25
    @sprites["up"].x = Graphics.width / 2
    @sprites["up"].y = 36
    @sprites["up"].z = 2
    @sprites["up"].visible = false
    @sprites["down"] = IconSprite.new(0, 0, @viewport)
    @sprites["down"].setBitmap("Graphics/Pictures/questArrow")
    @sprites["down"].zoom_x = 1.25
    @sprites["down"].zoom_y = 1.25
    @sprites["down"].x = Graphics.width / 2 + 21
    @sprites["down"].y = 360
    @sprites["down"].z = 2
    @sprites["down"].angle = 180
    @sprites["down"].visible = @mode == 0 ? @ongoing.size > 6 : @completed.size > 6
    @sprites["down"].opacity = 0
    10.times do |i|
      Graphics.update
      @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["char"].opacity -= 32 rescue nil
      @sprites["char2"].opacity -= 32 rescue nil
      @sprites["text"].opacity -= 32 rescue nil if i > 1
      @sprites["text2"].opacity -= 32 rescue nil if i > 1
    end
    @main.clear
    @text.clear rescue nil 
    @text2.clear rescue nil
    if id == 0
      for i in [email protected]
	break if i > 5
        @sprites["ongoing#{i}"] = QuestSprite.new(0, 0, @viewport)
        @sprites["ongoing#{i}"].setBitmap("Graphics/Pictures/questBtn")
	@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)
      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)
      12.times do |i|
        Graphics.update
        @sprites["main"].opacity += 32 if i < 8
        for j in [email protected]
	  break if j > 5
          @sprites["ongoing#{j}"].opacity += 32 if i > 3
        end
      end
    elsif id == 1
      for i in [email protected]
	break if i > 5
        @sprites["completed#{i}"] = QuestSprite.new(0, 0, @viewport)
        @sprites["completed#{i}"].setBitmap("Graphics/Pictures/questBtn")
        @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)
      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)
      12.times do |i|
        Graphics.update
        @sprites["main"].opacity += 32 if i < 8
	@sprites["down"].opacity += 32 if i > 3
        for j in [email protected]
	  break if j > 5
          @sprites["completed#{j}"].opacity += 32 if i > 3
        end
      end
    end
  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
    end
  end
end
Last, I've set up a tutorial map on how to use this script. You can also have this interface accessible via the Pokegear if you want. Note: This is an interface script, not a system. This means the script doesn't complete the quest for you, but you can set them to completed with "pbSetQuest(id, true/false)" in an event or other script. Here is the actual map.


Guide
Spoiler:
This script contains a bunch of handy things as you might see, that will make it very easy to check/change a quest. I'll explain those here.

- pbColor. This is a method that returns a color based on the parameter passed in (color). You can mix your own colors at this website. I use this myself too.

- QUESTS, line 71. This is where you create your quests. I chose to do this in the scripts because events break lines, which looks horrible in the description for the quest. You create a quest as follows:
Quest.new(id, name, description, npc, sprite, location, color, time, completed),
A more detailed explanantion of this is at the top of the script.

- pbCompletedQuest?(id). You have to be able to check if a quest is completed or not. This method does that. If you want to test quest id 0 for if it's completed, you would do
pbCompletedQuest?(0)
This returns true if it's completed and false if it's not. If the quest doesn't exist or isn't yet given to the player, it will return false as well.

- pbAddQuest(id). This is a method that adds every quest with the id you give it. This is why you should never use duplicate IDs.

- pbDeleteQuest(id). This deletes every quest (from ongoing AND/OR completed) with the id you give it.

- pbSetQuest(id, completed). This sets every quest with the id you gave it to "true" or "false". completed should be true if you want it to be set to completed.

- pbSetQuestName(id, name). Sets every quest with the id you give it the name you give it.

- pbSetQuestDesc(id, desc). Almost same story as above.

- pbSetQuestNPC(id, npc). Almost same story as above.

- pbSetQuestNPCSprite(id, sprite). Almost same story as above.

- pbSetQuestLocation(id, location). Almost same story as above.

- pbSetQuestColor(id, color). Sets every quest with the id you give it to the color you give it. The color should be a Symbol (these start with ':'). If the color exists in "def pbColor", it will be set to that. If it doesn't, it'll be white. An example of this is:
pbSetQuestColor(0, :GREEN)
- pbQuestlog. The actual method for starting a questlog screen. You can put this anywhere you want: in the pokegear, in the overworld, on an item, etc.


Credit to Makattack202 for suggesting this (it was originally made for him) and Grace (~Angel~) for helping me test everything.

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
This is awesome! I'll be using this for sure, thanks a lot taking the time to make this!
Little side question: Should I also credit your credits when using this?
My thing with credits is usually (if I don't say otherwise), no, I won't hunt you down if you don't credit me. I released it to the public, so whatever I'd do, there would be at least someone who wouldn't listen. It's always appreciated, though.

Marty152

Male
The Netherlands
Seen May 28th, 2021
Posted November 28th, 2017
16 posts
8.5 Years
My thing with credits is usually (if I don't say otherwise), no, I won't hunt you down if you don't credit me. I released it to the public, so whatever I'd do, there would be at least someone who wouldn't listen. It's always appreciated, though.
I think you misunderstood me(probably because I didn't formulate the question well XD)
I'll credit you for sure, that's self-explanatory, but you credited 2 people in your post(MakAttack and Angel), shouldI also credit those for the quest log?

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
I think you misunderstood me(probably because I didn't formulate the question well XD)
I'll credit you for sure, that's self-explanatory, but you credited 2 people in your post(MakAttack and Angel), shouldI also credit those for the quest log?
Hah, I'm an idiot. Might as well get used to that. It sounds a little "rude" perhaps against Makattack, but I'd credit Grace because she helped testing. I just made it for Makattack, he hasn't helped with the process of creating it.

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
I added a Guide section to the main post. I also changed the code a bit so you don't have to go into 4 different script anymore; just two now. This does not add or change any of the mechanics, so if you have the previous version, you can keep this.
Seen May 8th, 2017
Posted April 26th, 2017
7 posts
4.7 Years
This is great! I will be using it for my game and giving credit.

But I got an error message when I tried to change the quest description in game.

This is the line I used:

pbSetQuestDesc(1, Testing description change)
Result:

---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 3, map 87 (Test):

Exception: SyntaxError

Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error

***Full script:

pbSetQuestDesc(1, Testing description change)




Interpreter:276:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'
EDIT:

Nevermind, I figured out how to solve it, I just had to add quotation marks. It works like a charm now.

Like this:

pbSetQuestDesc(1, "Testing description change")

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
This is great! I will be using it for my game and giving credit.

But I got an error message when I tried to change the quest description in game.

This is the line I used:

pbSetQuestDesc(1, Testing description change)
Result:

---------------------------
Pokemon Essentials
---------------------------
Exception: RuntimeError

Message: Script error within event 3, map 87 (Test):

Exception: SyntaxError

Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error

***Full script:

pbSetQuestDesc(1, Testing description change)




Interpreter:276:in `pbExecuteScript'

Interpreter:1606:in `command_355'

Interpreter:494:in `execute_command'

Interpreter:193:in `update'

Interpreter:106:in `loop'

Interpreter:198:in `update'

Scene_Map:103:in `update'

Scene_Map:101:in `loop'

Scene_Map:114:in `update'

Scene_Map:68:in `main'
EDIT:

Nevermind, I figured out how to solve it, I just had to add quotation marks. It works like a charm now.

Like this:

pbSetQuestDesc(1, "Testing description change")
I hadn't seen this post of yours, I'm sorry. And yeah, strings (series of characters) are usually surrounded with quotation marks. I assumed most people knew this because I'm a programmer. If you're not, you likely don't know this. (Don't take this personal)

This is really the best script I have ever seen!
I will give credit!!!
It works perfectly

Pokémon Rainbow
Glad it works!
Seen May 8th, 2017
Posted April 26th, 2017
7 posts
4.7 Years
I hadn't seen this post of yours, I'm sorry. And yeah, strings (series of characters) are usually surrounded with quotation marks. I assumed most people knew this because I'm a programmer. If you're not, you likely don't know this. (Don't take this personal)
I'm not a programmer, that's for sure. I just want to learn, learned a lot already in a short time.

Also had problem with changing the color of quest, didn't know you had to use a colon before the color.
Like this:

pbSetQuestColor(1, :GREEN)
These things are probably elementary for you, but for me, not at all.

Edit: I looked at the guide again, and see that you actually mentioned that, so that was just me not paying attention.
Seen July 18th, 2017
Posted July 11th, 2017
11 posts
4.6 Years
Exception: NoMethodError
Message: undefined method `quest' for nil:NilClass
System_Quests:546:in `pbMove'
System_Quests:229:in `pbUpdate'
System_Quests:216:in `loop'
System_Quests:240:in `pbUpdate'
System_Quests:211:in `initialize'
System_Quests:93:in `new'
System_Quests:93:in `pbQuestlog'
PScreen_Pokegear:166:in `update_command'
PScreen_Pokegear:165:in `pbFadeOutIn'
PScreen_Pokegear:165:in `update_command'


Please help! I got this message after opening the quests menu. (In pokegear)

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
Exception: NoMethodError
Message: undefined method `quest' for nil:NilClass
System_Quests:546:in `pbMove'
System_Quests:229:in `pbUpdate'
System_Quests:216:in `loop'
System_Quests:240:in `pbUpdate'
System_Quests:211:in `initialize'
System_Quests:93:in `new'
System_Quests:93:in `pbQuestlog'
PScreen_Pokegear:166:in `update_command'
PScreen_Pokegear:165:in `pbFadeOutIn'
PScreen_Pokegear:165:in `update_command'


Please help! I got this message after opening the quests menu. (In pokegear)
Did you have any quests already in the quest log, what do all of your quests look like, which one did you want to add, did you follow the documentation?
Seen July 18th, 2017
Posted July 11th, 2017
11 posts
4.6 Years
Did you have any quests already in the quest log, what do all of your quests look like, which one did you want to add, did you follow the documentation?
Thanks for responding that fast. This were my quests:
   Quest.new(0, "Choose a starter!", "Choose your very own starter Pokémon at the Professor's lab.", "Chansey", "113", "Poli Town", :SUPERLIGHTBLUE),
   Quest.new(1, "GS Ball Delivery", "Deliver the GS Ball to Professor Pantalon in Vulcanium City", "Professor Bramaphutra", "NPC 11", "Lab", :ORANGE),
   Quest.new(2, "Safari Game", "Play the Safari Game to obtain an award", "Professor Pantalon", "trchar069", "Vulcanium City", :BLUE),
   Quest.new(3, "The Flying Psyduck", "Catch a Psyduck for Ted, because he thinks Psyduck is a non-flying Zapdos", "Ted", "trchar009", "Route 4", :YELLOW),
When I open the Quest Menu with pbQuestlog and go back it says:
Exception: NoMethodError
Message: undefined method `main' for #<Questlog:0xbd73fe0>
PSystem_Utilities:995:in `pbLoadRpgxpScene'
PScreen_PauseMenu:168:in `pbStartPokemonMenu'
PScreen_PauseMenu:143:in `loop'
PScreen_PauseMenu:269:in `pbStartPokemonMenu'
Scene_Map:193:in `call_menu'
Scene_Map:163:in `follow_update'
Following Pokemon:1551:in `update'
Scene_Map:68:in `main'
Scene_Map:65:in `loop'
Scene_Map:72:in `main'
I added all 4 and I got the first error. When I added none I got the error above.
Thx

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
Thanks for responding that fast. This were my quests:
   Quest.new(0, "Choose a starter!", "Choose your very own starter Pokémon at the Professor's lab.", "Chansey", "113", "Poli Town", :SUPERLIGHTBLUE),
   Quest.new(1, "GS Ball Delivery", "Deliver the GS Ball to Professor Pantalon in Vulcanium City", "Professor Bramaphutra", "NPC 11", "Lab", :ORANGE),
   Quest.new(2, "Safari Game", "Play the Safari Game to obtain an award", "Professor Pantalon", "trchar069", "Vulcanium City", :BLUE),
   Quest.new(3, "The Flying Psyduck", "Catch a Psyduck for Ted, because he thinks Psyduck is a non-flying Zapdos", "Ted", "trchar009", "Route 4", :YELLOW),
When I open the Quest Menu with pbQuestlog and go back it says:
Exception: NoMethodError
Message: undefined method `main' for #<Questlog:0xbd73fe0>
PSystem_Utilities:995:in `pbLoadRpgxpScene'
PScreen_PauseMenu:168:in `pbStartPokemonMenu'
PScreen_PauseMenu:143:in `loop'
PScreen_PauseMenu:269:in `pbStartPokemonMenu'
Scene_Map:193:in `call_menu'
Scene_Map:163:in `follow_update'
Following Pokemon:1551:in `update'
Scene_Map:68:in `main'
Scene_Map:65:in `loop'
Scene_Map:72:in `main'
I added all 4 and I got the first error. When I added none I got the error above.
Thx
I, unfortunately, can't look at it in-depth today, I hope you can wait until tomorrow. A few more questions, did you already add any quests to that questlog (that would be visible in "Ongoing")? Did the closing animation play before you got that error?
Seen July 18th, 2017
Posted July 11th, 2017
11 posts
4.6 Years
I, unfortunately, can't look at it in-depth today, I hope you can wait until tomorrow. A few more questions, did you already add any quests to that questlog (that would be visible in "Ongoing")? Did the closing animation play before you got that error?
Spoiler:
I think I figured out what was wrong. I've added the quest log in the pokegear myself. It gave me errors. Do you know how I can add the quest log into the Pokégear without errors?
Thanks a lot

Update:
It helped a little, deleting the pokegear quests script.
But when I have more than 1 quests at the same time and I scroll through them I got this error:
Exception: RuntimeError
Message: Script error within event 13, map 22 (Poli Town):
Exception: NoMethodError
Message: Section130:546:in `pbMove'undefined method `quest' for nil:NilClass
***Full script:
pbQuestlog

Interpreter:243:in `pbExecuteScript'
PScreen_Quests:229:in `pbUpdate'
PScreen_Quests:216:in `loop'
PScreen_Quests:240:in `pbUpdate'
PScreen_Quests:211:in `initialize'
PScreen_Quests:93:in `new'
PScreen_Quests:93:in `pbQuestlog'
(eval):1:in `pbExecuteScript'
Interpreter:1606:in `eval'
Interpreter:243:in `pbExecuteScript'

Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `follow_update'
Scene_Map:101:in `loop'
Scene_Map:114:in `follow_update'
Following Pokemon:1551:in `update'


Another Update:
I figured it out myself. I had to delete all .quest (Only where there is a ! after .quest)
Those were causing the problem. I don't know why, but I deleted them, and the Quest Log worked perfectly again, even with the pokegear.
Maybe you should take a look at that, maybe you will get that error too.
thx again.

Marin

Age 19
Male
Seen June 27th, 2021
Posted June 27th, 2021
966 posts
5 Years
Spoiler:
I think I figured out what was wrong. I've added the quest log in the pokegear myself. It gave me errors. Do you know how I can add the quest log into the Pokégear without errors?
Thanks a lot

Update:
It helped a little, deleting the pokegear quests script.
But when I have more than 1 quests at the same time and I scroll through them I got this error:
Exception: RuntimeError
Message: Script error within event 13, map 22 (Poli Town):
Exception: NoMethodError
Message: Section130:546:in `pbMove'undefined method `quest' for nil:NilClass
***Full script:
pbQuestlog

Interpreter:243:in `pbExecuteScript'
PScreen_Quests:229:in `pbUpdate'
PScreen_Quests:216:in `loop'
PScreen_Quests:240:in `pbUpdate'
PScreen_Quests:211:in `initialize'
PScreen_Quests:93:in `new'
PScreen_Quests:93:in `pbQuestlog'
(eval):1:in `pbExecuteScript'
Interpreter:1606:in `eval'
Interpreter:243:in `pbExecuteScript'

Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:103:in `follow_update'
Scene_Map:101:in `loop'
Scene_Map:114:in `follow_update'
Following Pokemon:1551:in `update'


Another Update:
I figured it out myself. I had to delete all .quest (Only where there is a ! after .quest)
Those were causing the problem. I don't know why, but I deleted them, and the Quest Log worked perfectly again, even with the pokegear.
Maybe you should take a look at that, maybe you will get that error too.
thx again.
Do you mean "$Trainer.quests"? And do you then mean "$Trainer.quests !"? I have no idea what the issue is and, typically, removing code doesn't fix something (unless it's my stupid way of unnecessary coding again, of course). And I haven't had any errors as such - nor did the person who stress tested the system.
Male
Portugal
Seen 7 Hours Ago
Posted 3 Days Ago
212 posts
7.4 Years
Your script is awesome, it works well without any problem, for me. Anyway do you know or anyone knows a script to reduce lag caused by too many events in maps? For example: in some maps i have too many headbutt trees, like lake of rage map, or in big cities. I searched for a script for that issue but i haven't found any, at least one updated and for pokemon essentials. I'm not a programmer, but i simple made a very fews codes from the existing ones or editing the existing ones.
Seen July 18th, 2017
Posted July 11th, 2017
11 posts
4.6 Years
Do you mean "$Trainer.quests"? And do you then mean "$Trainer.quests !"? I have no idea what the issue is and, typically, removing code doesn't fix something (unless it's my stupid way of unnecessary coding again, of course). And I haven't had any errors as such - nor did the person who stress tested the system.
Lines like these:
if @sprites["ongoing0"].quest != @ongoing[0]
if @sprites["ongoing5"].quest != @ongoing[@ongoing.size - 1]

I have removed (only) the .quest from them and the script worked perfectly again. Maybe the error was caused by some other scripts I am using. But removing the .quest from these kind of lines helped. (Only lines with a ! after them). I don't know what this exactly does, because I'm quite new at scripting, but removing them helped.

Ik zag dat je Nederlands bent. Erg goeie script.
Seen March 30th, 2018
Posted March 28th, 2018
15 posts
4.8 Years
Hi I love the script! I added a quest correctly and everything worked well but I get this error when I try to scroll through the quests.

Any ideas on why/how to fix it?

***I FIGURED IT OUT FOR NOW BY LOOKING ABOVE NVM***
Seen April 9th, 2021
Posted June 24th, 2019
1 posts
2.8 Years
Hello there!

I know this post is quite old but I still hope that somebody can help me. The script is awesome and I haven't experienced any issues until now when I used it in Pokemon Essential 17.2.
The main issue is here that you can actually scroll between the quests but the game crashes when you want to go back to the first quest in the list.
It's not because of the first quest since I tested it out. So what do I have to change to get it working?
Here is the error code and thanks for your help.

Exception: NoMethodError
Message: undefined method `quest' for nil:NilClass
System_Quests:550:in `pbMove'
System_Quests:233:in `pbUpdate'
System_Quests:220:in `loop'
System_Quests:244:in `pbUpdate'
System_Quests:215:in `initialize'
System_Quests:97:in `new'
System_Quests:97:in `pbQuestlog'
Modular Pause Menu:418
Modular Pause Menua:417: in `call'
Modular Pause Menu: in `runAction'

It can be also my fault if I've implemented it wrong in Lucas S.Js script.
# QuestLog
MenuHandlers.addEntry(:QUEST,_INTL("Quest Log"),"menuQuest",proc{|menu|
pbQuestlog
menu.pbShowMenu
},proc{ return true })

Thank you in advance and keep up your great work. :-)