The PokéCommunity Forums Fan Games Game Development Scripts & Tutorials
Essentials Script Pokemon Contests Script 1.5

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.


Reply
 
Thread Tools
  #1    
Old July 23rd, 2014 (12:24 PM). Edited November 5th, 2014 by mej71.
mej71's Avatar
mej71 mej71 is offline
     
    Join Date: Mar 2014
    Location: Omnipresence
    Gender: Male
    Posts: 1,226
    Pokemon Contests Script 1.5

    Tested and working for v14. Complete zipped v14 version to come.
    Brand new update (and possibly last) for you guys. See changelog for details, but this has a ton of new stuff and fixes. I don't believe the links below will go down for any reason, but someone let me know if they do.

    Complete Zipped Version(includes everything)
    If you want to not have to do any work, here is a vanilla version of Essentials v13 with everything necessary in it.
    Will upload a complete zipped for v14 hopefully tomorrow
    Mediafire Link

    If you want to move these scripts into an existing project, it's going to take a little work. Please follow these instructions as thoroughly as possible

    Graphics File
    First thing's first, you will need this small zip of graphics and PBS files. Instructions on where to put these is included in a txt in the zip
    Mediafire Link

    Okay, now here are some scripts that you will need to add above the main (you can click on main and his insert, if you don't know how to do this.)

    These are all mandatory.

    Note: Always just copy/paste from the Raw Paste Data, not the formatted version. Unlikely, but formatted versions can occasionally mess up code.
    Spoiler:

    Main Contest script
    Pastebin Link

    Berry Mixer script
    Pastebin Link

    Berry High Scores
    Pastebin Link

    PBContestMove (this can go right above PBMove)
    Pastebin Link




    Other Mandatory Changes (IMPORTANT edit: forgot to include change to PokemonMessages)

    Spoiler:


    PokemonMessages

    Use this Pastebin Link and skip the next two segments if you haven't made any changes to it yourself.

    add this method
    Spoiler:
    Code:
    def Kernel.pbCustomMessage(message,skin=nil,newx=nil,newwidth=nil,&block)
      ret=0
      msgwindow=Kernel.pbCreateMessageWindow(nil,skin)
      msgwindow.x=newx if newx!=nil
      if newwidth!=nil
        msgwindow.width=newwidth
      else
      msgwindow.width=Graphics.width-msgwindow.x
    end
      Kernel.pbMessageDisplay(msgwindow,message,&block)
      Kernel.pbDisposeMessageWindow(msgwindow)
      Input.update
      return ret
    end


    and replace def Kernel.pbMessageDisplay with the following (incidentally, gives you the ability to customize the y positions of any message with //q[yvalue]

    Spoiler:
    Code:
    def Kernel.pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
      return if !msgwindow
      oldletterbyletter=msgwindow.letterbyletter
      msgwindow.letterbyletter=(letterbyletter ? true : false)
      ret=nil
      count=0
      commands=nil
      facewindow=nil
      goldwindow=nil
      coinwindow=nil
      cmdvariable=0
      cmdIfCancel=0
      msgwindow.waitcount=0
      autoresume=false
      text=message.clone
      msgback=nil
      linecount=(Graphics.height>400) ? 3 : 2
      ### Text replacement
      text.gsub!(/\\\\/,"\5")
      if $game_actors
        text.gsub!(/\\[Nn]\[([1-8])\]/){ 
           m=$1.to_i
           next $game_actors[m].name
        }
      end
      text.gsub!(/\\[Ss][Ii][Gg][Nn]\[([^\]]*)\]/){ 
         next "\\op\\cl\\ts[]\\w["+$1+"]"
      }
      text.gsub!(/\\[Pp][Nn]/,$Trainer.name) if $Trainer
      text.gsub!(/\\[Pp][Mm]/,_INTL("${1}",$Trainer.money)) if $Trainer
      text.gsub!(/\\[Nn]/,"\n")
      text.gsub!(/\\\[([0-9A-Fa-f]{8,8})\]/){ "<c2="+$1+">" }
      text.gsub!(/\\[Pp][Gg]/,"\\b") if $Trainer && $Trainer.gender==0
      text.gsub!(/\\[Pp][Gg]/,"\\r") if $Trainer && $Trainer.gender==1
      text.gsub!(/\\[Pp][Oo][Gg]/,"\\r") if $Trainer && $Trainer.gender==0
      text.gsub!(/\\[Pp][Oo][Gg]/,"\\b") if $Trainer && $Trainer.gender==1
      text.gsub!(/\\[Pp][Gg]/,"")
      text.gsub!(/\\[Pp][Oo][Gg]/,"")
      text.gsub!(/\\[Bb]/,"<c2=6546675A>")
      text.gsub!(/\\[Rr]/,"<c2=043C675A>")
      text.gsub!(/\\1/,"\1")
      colortag=""
      isDarkSkin=isDarkWindowskin(msgwindow.windowskin)
      if ($game_message && $game_message.background>0) ||
         ($game_system && $game_system.respond_to?("message_frame") &&
          $game_system.message_frame != 0)
        colortag=getSkinColor(msgwindow.windowskin,0,true)
      else
        colortag=getSkinColor(msgwindow.windowskin,0,isDarkSkin)
      end
      text.gsub!(/\\[Cc]\[([0-9]+)\]/){ 
         m=$1.to_i
         next getSkinColor(msgwindow.windowskin,m,isDarkSkin)
      }
      begin
        last_text = text.clone
        text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
      end until text == last_text
      begin
        last_text = text.clone
        text.gsub!(/\\[Ll]\[([0-9]+)\]/) { 
           linecount=[1,$1.to_i].max;
           next "" 
        }
      end until text == last_text
      text=colortag+text
      ### Controls
      textchunks=[]
      controls=[]
      while text[/(?:\\([WwFf]|[Ff][Ff]|[Tt][Ss]|[Cc][Ll]|[Mm][Ee]|[Ss][Ee]|[Ww][Tt]|[Ww][Tt][Nn][Pp]|[Cc][Hh]|[Qq])\[([^\]]*)\]|\\([Gg]|[Cc][Nn]|[Ww][Dd]|[Ww][Mm]|[Oo][Pp]|[Cc][Ll]|[Ww][Uu]|[\.]|[\|]|[\!]|[\x5E])())/i]
        textchunks.push($~.pre_match)
        if $~[1]
          controls.push([$~[1].downcase,$~[2],-1])
        else
          controls.push([$~[3].downcase,"",-1])
        end
        text=$~.post_match
      end
      textchunks.push(text)
      for chunk in textchunks
        chunk.gsub!(/\005/,"\\")
      end
      textlen=0
      for i in 0...controls.length
        control=controls[i][0]
        if control=="wt" || control=="wtnp" || control=="." || control=="|"
          textchunks[i]+="\2"
        elsif control=="!"
          textchunks[i]+="\1"
        end
        textlen+=toUnformattedText(textchunks[i]).scan(/./m).length
        controls[i][2]=textlen
      end
      text=textchunks.join("")
      unformattedText=toUnformattedText(text)
      signWaitCount=0
      haveSpecialClose=false
      specialCloseSE=""
      for i in 0...controls.length
        control=controls[i][0]
        param=controls[i][1]
        if control=="f"
          facewindow.dispose if facewindow
          facewindow=PictureWindow.new("Graphics/Pictures/#{param}")
        elsif control=="op"
          signWaitCount=21
        elsif control=="cl"
          text=text.sub(/\001\z/,"") # fix: '$' can match end of line as well
          haveSpecialClose=true
          specialCloseSE=param
        elsif control=="se" && controls[i][2]==0
          startSE=param
          controls[i]=nil
        elsif control=="ff"
          facewindow.dispose if facewindow
          facewindow=FaceWindowVX.new(param)
        elsif control=="q"
          yval=param.to_i  
        elsif control=="ch"
          cmds=param.clone
          cmdvariable=pbCsvPosInt!(cmds)
          cmdIfCancel=pbCsvField!(cmds).to_i
          commands=[]
          while cmds.length>0
            commands.push(pbCsvField!(cmds))
          end
        elsif control=="wtnp" || control=="^"
          text=text.sub(/\001\z/,"") # fix: '$' can match end of line as well
        end
      end
      if startSE!=nil
        pbSEPlay(pbStringToAudioFile(startSE))
      elsif signWaitCount==0 && letterbyletter
        pbPlayDecisionSE()
      end
      ########## Position message window  ##############
      pbRepositionMessageWindow(msgwindow,linecount)
      if $game_message && $game_message.background==1
        msgback=IconSprite.new(0,msgwindow.y,msgwindow.viewport)
        msgback.z=msgwindow.z-1
        msgback.setBitmap("Graphics/System/MessageBack")
      end
      if facewindow
        pbPositionNearMsgWindow(facewindow,msgwindow,:left)
        facewindow.viewport=msgwindow.viewport
        facewindow.z=msgwindow.z
      end
      atTop=(msgwindow.y==0)
      ########## Show text #############################
      msgwindow.text=text
      Graphics.frame_reset if Graphics.frame_rate>40
      begin
        if signWaitCount>0
          signWaitCount-=1
          if atTop
            msgwindow.y=-(msgwindow.height*(signWaitCount)/20)
          else
            msgwindow.y=Graphics.height-(msgwindow.height*(20-signWaitCount)/20)
          end
        end
        for i in 0...controls.length
          if controls[i] && controls[i][2]<=msgwindow.position && msgwindow.waitcount==0
            control=controls[i][0]
            param=controls[i][1]
            if control=="f"
              facewindow.dispose if facewindow
              facewindow=PictureWindow.new("Graphics/Pictures/#{param}")
              pbPositionNearMsgWindow(facewindow,msgwindow,:left)
              facewindow.viewport=msgwindow.viewport
              facewindow.z=msgwindow.z
            elsif control=="ts"
              if param==""
                msgwindow.textspeed=-999
              else
                msgwindow.textspeed=param.to_i
              end
            elsif control=="ff"
              facewindow.dispose if facewindow
              facewindow=FaceWindowVX.new(param)
              pbPositionNearMsgWindow(facewindow,msgwindow,:left)
              facewindow.viewport=msgwindow.viewport
              facewindow.z=msgwindow.z
            elsif control=="g" # Display gold window
              goldwindow.dispose if goldwindow
              goldwindow=pbDisplayGoldWindow(msgwindow)
            elsif control=="cn" # Display coins window
              coinwindow.dispose if coinwindow
              coinwindow=pbDisplayCoinsWindow(msgwindow,goldwindow)
            elsif control=="wu"
              msgwindow.y=0
              atTop=true
              msgback.y=msgwindow.y if msgback
              pbPositionNearMsgWindow(facewindow,msgwindow,:left)
              msgwindow.y=-(msgwindow.height*(signWaitCount)/20)
            elsif control=="wm"
              atTop=false
              msgwindow.y=(Graphics.height/2)-(msgwindow.height/2)
              msgback.y=msgwindow.y if msgback
              pbPositionNearMsgWindow(facewindow,msgwindow,:left)
            elsif control=="wd"
              atTop=false
              msgwindow.y=(Graphics.height)-(msgwindow.height)
              msgback.y=msgwindow.y if msgback
              pbPositionNearMsgWindow(facewindow,msgwindow,:left)
              msgwindow.y=Graphics.height-(msgwindow.height*(20-signWaitCount)/20)
            elsif control=="."
              msgwindow.waitcount+=Graphics.frame_rate/4
            elsif control=="|"
              msgwindow.waitcount+=Graphics.frame_rate
            elsif control=="wt" # Wait
              param=param.sub(/\A\s+/,"").sub(/\s+\z/,"")
              msgwindow.waitcount+=param.to_i*2
            elsif control=="w" # Windowskin
              if param==""
                msgwindow.windowskin=nil
              else
                msgwindow.setSkin("Graphics/Windowskins/#{param}")
              end
              msgwindow.width=msgwindow.width  # Necessary evil
            elsif control=="^" # Wait, no pause
              autoresume=true
            elsif control=="wtnp" # Wait, no pause
              param=param.sub(/\A\s+/,"").sub(/\s+\z/,"")
              msgwindow.waitcount=param.to_i*2
              autoresume=true
            elsif control=="se" # Play SE
              pbSEPlay(pbStringToAudioFile(param))
            elsif control=="me" # Play ME
              pbMEPlay(pbStringToAudioFile(param))
            end
            controls[i]=nil
          end
        end
        break if !letterbyletter
        if yval
            msgwindow.y=yval
        end
        Graphics.update
        Input.update
        facewindow.update if facewindow
        if $DEBUG && Input.trigger?(Input::F6)
          pbRecord(unformattedText)
        end
        if autoresume && msgwindow.waitcount==0
          msgwindow.resume if msgwindow.busy?
          break if !msgwindow.busy?
        end
        if (Input.trigger?(Input::C) || Input.trigger?(Input::B))
          if msgwindow.busy?
            pbPlayDecisionSE() if msgwindow.pausing?
            msgwindow.resume
          else
            break if signWaitCount==0
          end
        end
        pbUpdateSceneMap
        msgwindow.update
        yield if block_given?
      end until (!letterbyletter || commandProc || commands) && !msgwindow.busy?
      Input.update # Must call Input.update again to avoid extra triggers
      msgwindow.letterbyletter=oldletterbyletter
      if commands
        $game_variables[cmdvariable]=Kernel.pbShowCommands(
           msgwindow,commands,cmdIfCancel)
        $game_map.need_refresh = true if $game_map
      end
      if commandProc
        ret=commandProc.call(msgwindow)
      end
      msgback.dispose if msgback
      goldwindow.dispose if goldwindow
      coinwindow.dispose if coinwindow
      facewindow.dispose if facewindow
      if haveSpecialClose
        pbSEPlay(pbStringToAudioFile(specialCloseSE))
        atTop=(msgwindow.y==0)
        for i in 0..20
          if atTop
            msgwindow.y=-(msgwindow.height*(i)/20)
          else
            msgwindow.y=Graphics.height-(msgwindow.height*(20-i)/20)
          end
          Graphics.update
          Input.update
          pbUpdateSceneMap
          msgwindow.update
        end
      end
      return ret
    end




    Replacing/editing the compiler. If you don't want to mess with the compiler, here's a pastebin of mine
    Pastebin Link

    If you have made changes to yours, or simply want to, here's the parts to add
    Spoiler:
    Under def pbCompileMoves add this method
    Code:
    def pbCompileContestMoves
      records=[]
      contestmovenames=[]
      contestmovedescs=[]
      contestmovedata=[]
      maxValue=0
      haveRsAttacks=pbRgssExists?("Data/rsattacks.dat")
      pbCompilerEachPreppedLine("PBS/contestmoves.txt"){|line,lineno|
         thisline=line.clone
         record=[]
         flags=0
    
           record=pbGetCsvRecord(line,lineno,[0,"vnseUUUs",
              nil,nil,nil,["Cool","Beauty","Cute","Smart","Tough"],nil,nil,nil,nil
           ])
         
         maxValue=[maxValue,record[0]].max
         contestmovedata[record[0]]=[
            record[3],  # Contest Type
            record[4],  # Hearts
            record[5],  # Jam
            record[6]   # Function Code
         ].pack("CCCC")
         contestmovenames[record[0]]=record[2]  # Name
         contestmovedescs[record[0]]=record[7] # Description
         records.push(record)
         }
      defaultdata=[0,0,0,0].pack("CCCC")
      File.open("Data/contestmoves.dat","wb"){|file|
         for i in 0...contestmovedata.length
           file.write(contestmovedata[i] ? contestmovedata[i] : defaultdata)
         end
      }
      MessageTypes.setMessages(MessageTypes::ContestMoves,contestmovenames)
      MessageTypes.setMessages(MessageTypes::ContestMoveDescriptions,contestmovedescs)
      code="class PBContestMoves\r\n"
      for rec in records
        code+="#{rec[1]}=#{rec[0]}\r\n"
      end
      code+="\r\ndef self.getName(id)\r\nreturn pbGetMessage(MessageTypes::Moves,id)\r\nend"
      code+="\r\ndef self.getCount\r\nreturn #{records.length}\r\nend"
      code+="\r\ndef self.maxValue\r\nreturn #{maxValue}\r\nend\r\nend"
      eval(code)
      pbAddScript(code,"PBContestMoves")
    end
    and change the arrays datafiles and textfiles (located right above def pbGenerateMoveRoute(commands) to this
    Code:
    datafiles=[
       "encounters.dat",
       "trainertypes.dat",
       "connections.dat",
       "items.dat",
       "metadata.dat",
       "townmap.dat",
       "trainers.dat",
       "attacksRS.dat",
       "dexdata.dat",
       "eggEmerald.dat",
       "evolutions.dat",
       "regionals.dat",
       "types.dat",
       "tm.dat",
       "phone.dat",
       "trainerlists.dat",
       "shadowmoves.dat",
       "contestmoves.dat",
       "Constants.rxdata"
    ]
    
    textfiles=[
       "moves.txt",
       "abilities.txt",
       "encounters.txt",
       "trainers.txt",
       "trainertypes.txt",
       "items.txt",
       "connections.txt",
       "metadata.txt",
       "townmap.txt",
       "pokemon.txt",
       "phone.txt",
       "trainerlists.txt",
       "shadowmoves.txt",
       "tm.txt",
       "contestmoves.txt",
       "types.txt"
    ]
    and lastly, inside def pbCompileAllData(mustcompile) add the part in red
    Code:
        # Depends on PBSpecies, PBMoves
        yield(_INTL("Compiling shadow move data"))
        pbCompileShadowMoves
        #Depends on PBContestMoves
        yield(_INTL("Compiling contest moves"))
        pbCompileContestMoves

    In PBIntl you'll find Module MessageTypes, add these lines to it's list of types (fairly obvious)
    Code:
    ContestMoves      = 23
    ContestMoveDescriptions = 24
    The numbers don't have to be the same as mine, but they should be sequential with the rest.


    Optional fun things:
    Spoiler:

    This one's not mine, but FL's Species Intro script makes it very easy to display the pokemon for the preliminary round (like in the official games)
    I changed one line Pastebin Link
    Also located on the wiki

    This is a modified version of Pokemon Summary, which includes a separate page for contest moves/information, and an vastly improved version of the ribbon page.
    Pastebin Link


    Berry Item Effects (add to PokemonItemEffects, right below the code for DNA Splicers)
    Spoiler:
    Code:
    ItemHandlers::UseOnPokemon.add(:REDPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool==255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==1 || pokemon.nature==2|| pokemon.nature==3|| pokemon.nature==4)
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==5 || pokemon.nature==10|| pokemon.nature==15|| pokemon.nature==20)
           pokemon.cool+=3.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cool+=5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:REDPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool==255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==1 || pokemon.nature==2|| pokemon.nature==3|| pokemon.nature==4)
           pokemon.cool+=20
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==5 || pokemon.nature==10|| pokemon.nature==15|| pokemon.nature==20)       
           pokemon.cool+=5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
          scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255   
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:REDPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool==255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==1 || pokemon.nature==2|| pokemon.nature==3|| pokemon.nature==4)
           pokemon.cool+=30
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
                  scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==5 || pokemon.nature==10|| pokemon.nature==15|| pokemon.nature==20)
           pokemon.cool+=7.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cool+=15
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255 
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BLUEPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty==255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==15 || pokemon.nature==16|| pokemon.nature==17|| pokemon.nature==19)
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==3 || pokemon.nature==8 || pokemon.nature==13 || pokemon.nature==24)
           pokemon.beauty+=3.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.beauty+=5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BLUEPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty==255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==15 || pokemon.nature==16|| pokemon.nature==17|| pokemon.nature==19)
           pokemon.beauty+=20
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==3 || pokemon.nature==8 || pokemon.nature==13 || pokemon.nature==24)
           pokemon.beauty+=5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
          scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255   
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BLUEPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==15 || pokemon.nature==16|| pokemon.nature==17|| pokemon.nature==19)
           pokemon.beauty+=30
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
                  scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==3 || pokemon.nature==8|| pokemon.nature==13|| pokemon.nature==24)
           pokemon.beauty+=7.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.beauty+=15
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255 
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:PINKPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute==255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==10 || pokemon.nature==11|| pokemon.nature==13|| pokemon.nature==14)
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==2 || pokemon.nature==7|| pokemon.nature==17|| pokemon.nature==22)
           pokemon.cute+=3.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cute+=5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:PINKPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute==255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==10 || pokemon.nature==11|| pokemon.nature==13|| pokemon.nature==14)
           pokemon.cute+=20
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==2 || pokemon.nature==7|| pokemon.nature==17|| pokemon.nature==22)
           pokemon.cute+=5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
          scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255   
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:PINKPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==10 || pokemon.nature==11|| pokemon.nature==13|| pokemon.nature==14)
           pokemon.cute+=30
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
                  scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==2 || pokemon.nature==7|| pokemon.nature==17|| pokemon.nature==22)
           pokemon.cute+=7.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cute+=15
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255 
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:GREENPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart==255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==20 || pokemon.nature==21|| pokemon.nature==22|| pokemon.nature==23)
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==4 || pokemon.nature==9|| pokemon.nature==14|| pokemon.nature==19)
           pokemon.smart+=3.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.smart+=5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GREENPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart==255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==20 || pokemon.nature==21|| pokemon.nature==22|| pokemon.nature==23)
           pokemon.smart+=20
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==4 || pokemon.nature==9|| pokemon.nature==14|| pokemon.nature==19)
           pokemon.smart+=5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
          scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255   
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GREENPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==20 || pokemon.nature==21|| pokemon.nature==22|| pokemon.nature==23)
           pokemon.smart+=30
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
                  scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==4 || pokemon.nature==9|| pokemon.nature==14|| pokemon.nature==19)
           pokemon.smart+=7.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.smart+=15
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255 
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:YELLOWPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough==255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==5 || pokemon.nature==7|| pokemon.nature==8|| pokemon.nature==9)
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==1 || pokemon.nature==11|| pokemon.nature==16|| pokemon.nature==21)
           pokemon.tough+=3.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.tough+=5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:YELLOWPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen==255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough==255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==5 || pokemon.nature==7|| pokemon.nature==8|| pokemon.nature==9)
           pokemon.tough+=20
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==1 || pokemon.nature==11|| pokemon.nature==16|| pokemon.nature==21)
           pokemon.tough+=5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
          scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255   
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:YELLOWPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       else
         if (pokemon.nature==5 || pokemon.nature==7|| pokemon.nature==8|| pokemon.nature==9)
           pokemon.tough+=30
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
                  scene.pbDisplay(_INTL("{1} happily ate the {2}",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==1 || pokemon.nature==11|| pokemon.nature==16|| pokemon.nature==21)
           pokemon.tough+=7.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.tough+=15
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255 
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:PURPLEPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==1 || pokemon.nature==2|| pokemon.nature==3|| pokemon.nature==4)
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cute>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==5 || pokemon.nature==10|| pokemon.nature==15|| pokemon.nature==20)
           pokemon.cool+=3.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=3.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cool+=5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:PURPLEPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==1 || pokemon.nature==2|| pokemon.nature==3|| pokemon.nature==4)
           pokemon.cool+=20
           pokemon.cool=255 if pokemon.cute>255
           pokemon.cute+=20
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==5 || pokemon.nature==10|| pokemon.nature==15|| pokemon.nature==20)
           pokemon.cool+=5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:PURPLEPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==1 || pokemon.nature==2|| pokemon.nature==3|| pokemon.nature==4)
           pokemon.cool+=30
           pokemon.cool=255 if pokemon.cute>255
           pokemon.cute+=30
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==5 || pokemon.nature==10|| pokemon.nature==15|| pokemon.nature==20)
           pokemon.cool+=7.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=7.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cool+=15
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=15
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:INDIGOPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==15 || pokemon.nature==16|| pokemon.nature==17|| pokemon.nature==19)
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==3 || pokemon.nature==8|| pokemon.nature==13|| pokemon.nature==24)
           pokemon.beauty+=3.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=3.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.beauty+=5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:INDIGOPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==15 || pokemon.nature==16|| pokemon.nature==17|| pokemon.nature==19)
           pokemon.beauty+=20
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=20
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==3 || pokemon.nature==8|| pokemon.nature==13|| pokemon.nature==24)
           pokemon.beauty+=5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:INDIGOPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==15 || pokemon.nature==16|| pokemon.nature==17|| pokemon.nature==19)
           pokemon.beauty+=30
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=30
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==3 || pokemon.nature==8|| pokemon.nature==13|| pokemon.nature==24)
           pokemon.beauty+=7.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=7.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.beauty+=15
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.smart+=15
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BROWNPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==10 || pokemon.nature==11|| pokemon.nature==13|| pokemon.nature==14)
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==2 || pokemon.nature==7|| pokemon.nature==17|| pokemon.nature==22)
           pokemon.cute+=3.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=3.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cute+=5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BROWNPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==10 || pokemon.nature==11|| pokemon.nature==13|| pokemon.nature==14)
           pokemon.cute+=20
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=20
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==2 || pokemon.nature==7|| pokemon.nature==17|| pokemon.nature==22)
           pokemon.cute+=5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BROWNPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==10 || pokemon.nature==11|| pokemon.nature==13|| pokemon.nature==14)
           pokemon.cute+=30
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=30
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==2 || pokemon.nature==7|| pokemon.nature==17|| pokemon.nature==22)
           pokemon.cute+=7.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=7.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.cute+=15
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=15
           pokemon.tough=255 if pokemon.tough>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:LITEBLUEPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==20 || pokemon.nature==21|| pokemon.nature==22|| pokemon.nature==23)
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==4 || pokemon.nature==9|| pokemon.nature==14|| pokemon.nature==19)
           pokemon.smart+=3.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=3.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.smart+=5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:LITEBLUEPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==20 || pokemon.nature==21|| pokemon.nature==22|| pokemon.nature==23)
           pokemon.smart+=20
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=20
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==4 || pokemon.nature==9|| pokemon.nature==14|| pokemon.nature==19)
           pokemon.smart+=5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:LITEBLUEPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==20 || pokemon.nature==21|| pokemon.nature==22|| pokemon.nature==23)
           pokemon.smart+=30
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=30
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==4 || pokemon.nature==9|| pokemon.nature==14|| pokemon.nature==19)
           pokemon.smart+=7.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=7.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.smart+=15
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cool+=15
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:OLIVEPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==5 || pokemon.nature==7|| pokemon.nature==8|| pokemon.nature==9)
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==1 || pokemon.nature==11|| pokemon.nature==16|| pokemon.nature==21)
           pokemon.tough+=3.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=3.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.tough+=5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:OLIVEPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==5 || pokemon.nature==7|| pokemon.nature==8|| pokemon.nature==9)
           pokemon.tough+=20
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=20
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==1 || pokemon.nature==11|| pokemon.nature==16|| pokemon.nature==21)
           pokemon.tough+=5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:OLIVEPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0  
       else
         if (pokemon.nature==5 || pokemon.nature==7|| pokemon.nature==8|| pokemon.nature==9)
           pokemon.tough+=30
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=30
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=17
           pokemon.sheen=255 if pokemon.sheen>255
            scene.pbDisplay(_INTL("{1} happily ate the {2}!",pokemon.name,PBItems.getName(item)))
         elsif (pokemon.nature==1 || pokemon.nature==11|| pokemon.nature==16|| pokemon.nature==21)
           pokemon.tough+=7.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=7.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=4.25
           pokemon.sheen=255 if pokemon.sheen>255
           scene.pbDisplay(_INTL("{1} reluctantly ate the {2}!",pokemon.name,PBItems.getName(item)))
         else
           pokemon.tough+=15
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=15
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems indifferent to the taste.",pokemon.name,PBItems.getName(item)))
         end 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:WHITEPOKEBLOCK,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0 
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0 
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0 
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0  
       else
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item))) 
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK1,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK2,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    }) 
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK3,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK4,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK5,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK6,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cool+=10
           pokemon.cool=255 if pokemon.cool>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK7,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK8,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       else
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK9,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
           pokemon.beauty+=10
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:GOLDPOKEBLOCK10,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0  
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0
       else
           pokemon.cute+=10
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=10
           pokemon.tough=255 if pokemon.tough>255
           pokemon.smart+=10
           pokemon.smart=255 if pokemon.smart>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to enjoy the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })
    ItemHandlers::UseOnPokemon.add(:BLACPOKEBLOCK,proc{|item,pokemon,scene|
       if pokemon.sheen>=255 
         scene.pbDisplay(_INTL("{1} can't eat anymore Pokéblocks",pokemon.name))
         return 0
       elsif pokemon.tough>=255
         scene.pbDisplay(_INTL("{1}'s toughness can't go any higher",pokemon.name))
         return 0
       elsif pokemon.beauty>=255
         scene.pbDisplay(_INTL("{1}'s beauty can't go any higher",pokemon.name))
         return 0 
       elsif pokemon.smart>=255
         scene.pbDisplay(_INTL("{1}'s intelligence can't go any higher",pokemon.name))
         return 0 
       elsif pokemon.cute>=255
         scene.pbDisplay(_INTL("{1}'s cuteness can't go any higher",pokemon.name))
         return 0 
       elsif pokemon.cool>=255
         scene.pbDisplay(_INTL("{1}'s coolness can't go any higher",pokemon.name))
         return 0    
       else
           pokemon.cute+=3.5
           pokemon.cute=255 if pokemon.cute>255
           pokemon.tough+=3.5
           pokemon.tough=255 if pokemon.tough>255
           pokemon.smart+=3.5
           pokemon.smart=255 if pokemon.smart>255
           pokemon.beauty+=3.5
           pokemon.beauty=255 if pokemon.beauty>255
           pokemon.cool+=3.5
           pokemon.cool=255 if pokemon.cool>255
           pokemon.sheen+=8.5
           pokemon.sheen=255 if pokemon.sheen>255  
           scene.pbDisplay(_INTL("{1} ate the {2}!  It seems to dislike the taste.",pokemon.name,PBItems.getName(item)))
      return 3
      end
    })


    Note that these use game variables 35 and 36. If you have something else in these, you have to either change yours, or go through these scripts and search/replace them with your chosen number.

    Calling the Contest
    So now that you have everything installed, how does one use these? Actually pretty simple.
    To start a contest (assuming your variables 35 and 36(or your equivalents) are set to something other than 0), use something like this
    Code:
    pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,
    20,PBSpecies::HITMONTOP,20,1)
    The red number is the difficulty level. Higher difficulties will improve the AI, and give the opponent pokemon more preliminary points, as well as a higher likelihood to have a scarf (even more preliminary points). 100 is the max value that matters and 0 is the lowest, though having higher or lower numbers won't break the script.

    The blue parts are your opponent pokemon. You can name them by species, as shown, or by species number (i.e. 9 instead of PBSpecies::CHARIZARD). List 3.

    The purple numbers are the levels of your opponent's pokemon. The only thing this really does is change the moveset of the pokemon (though you can change it manually, I'll get to that later.).

    The last number, the light blue one, is the ribbon rewarded to your pokemon if it wins. 1 is the Normal Rank Cool Ribbon. You can find the numbered list of ribbons in PBRibbons.

    Nicknaming Opponents, and specifying their movesets
    To specify movesets for your opponent, use this handy tool.
    Code:
    pbAddContestMove(2,1,2,3,7)
    The first number is which opponent (you're 1, the next one you list when you call it is 2, etc.), and the rest are the numbers correlating to the number of which move you want to give them. See moves.txt to see how these are numbered.

    To nickname an opponent is quite the same. Specify which contestant, and then the nickname you'd like to give them.
    Code:
    pbChangeContestName(2,"Butterscortch")
    Note that these functions should be called before the contest script is called. The contest script will reset them (they're stored as global variables) when it is finished.

    So calling a contest with these should look something like this.
    Code:
    pbAddContestMove(2,1,2,3,7)
    pbChangeContestName(2,"Butterscortch")
    pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20,1)
    Using the Berry Mixer

    All you have to do for this is call
    Code:
    mixer
    or
    Code:
    pbMixer
    Using the Berry High Score thing
    Just call
    Code:
    pbBerryScores
    That's it. To change the names is pretty easy, you can see them listed along lines 42-45.

    Setting up the Events in the Contest Hall
    Spoiler:

    Mediafire Link to Contest Hall map data
    Sorry, nothing else here yet. Will take lots of screenshots and do this properly when I have a bit more time


    FAQ/Common bugs and problems
    Spoiler:

    Q:"I'm getting a Syntax error..."
    A:You probably copied the formatted version on either here or pastebin. If pastebin, copy the Raw Paste Data instead, if here click Thread Tools and select Printable Version and copy using that.
    Q: I'm getting an error with $game_variables[35/36]
    A: These are variables used by my scripts, you more than likely have them set to something else.
    Q:Some of these graphics suck. Why?
    A:I know. Many of them I made or found ripped on the internet, and I do not have much graphical talent (i.e. see Pokeblock icons).
    Q: The hearts for the fourth pokemon sometimes linger for longer than they should, why is that?
    A: I have no clue, I can't figure it out.
    Q: How are you so awesome?
    A: Just born with it I guess (or maybe it's Maybelline)
    More questions will go here as they come to mind or are asked


    Credits
    Spoiler:

    Maruno, FL, JV, and Umbreon/Hansiec for answering my questions
    Fl-Species Intro script
    Super Dedenne - help with Berry Mixer, explaining the intricacies of pokeblocks, and fixing up the ribbon summary page
    DL Kurosh -initial help with the berry mixer
    Deorro -for some of the berry mixer graphics
    Saving Raven -Contest Hall tileset
    The PokeCommunity in general
    (If I've left anybody off, I'm very sorry, PM me and I'll make sure to add you)


    Screenshot album.
    Will add more eventually.

    Changelog:
    Spoiler:

    Current Update:
    Berry Mixer
    Berry Record/Scoreboard thing
    Fixed bugs with order
    Order done using hearts (in addition to move effects)
    Preliminary Round scoring
    Final score scene
    Implemented all Pokeblocks
    Debug feature: Hold Ctrl at beginning of contest to skip all of it and win, or hold Ctrl and the end of round one to skip the rest and win.
    Ability to nickname contestants.
    Ability to give contestants specified moves.
    Various bug fixes
    Made sure all messages use _INTL thanks to FL, because I honestly didn't realize that was required for translation.
    Fixed a bug where shuffling the pokemon messes up the internal order (who gets what hearts, etc)
    Fixed a bug that would occasionally allow a blank move to be selected by the AI
    Fixed a bug that would decrease the pokemon's hearts if it couldn't move that turn (i.e. Missed Turn or couldn't make any more moves)
    Fixed the berry script so you don't have to call it in a conditional. Also gave it an alias of pbMixer as a more standard call format.
    Fixed the berry high scores so that some values are assigned even if the play doesn't have any pokemon, since the amounts are based around player's pokemon's levels
    Added the line
    Code:
    pbFadeOutAndHide(@heartsprites)
    to def pbResetHearts to try and fix the thing where the fourth pokemon's hearts don't get removed. Doesn't really work, I have no idea why. Looks mildly nice though, can't decide if I like it or not really. Keeping it for now.
    Made AI slightly less likely to choose a move it chose last round.
    Contest script returns a simple true/false in regards as to whether your pokemon won (if you want something to happen if you win a specific contest)




    Update 4: Created AI for opponent's pokemon (let me know how well this works. Are opponents too hard? Too easy?)
    Added Pokemon Summary Page for Contest Moves
    Fixed Messages that display to be a small enough width to not hide the fourth pokemon.
    Fixed the ordering of the pokemon (haven't made it order them by hearts yet, but that will come)
    Various bug fixes
    Fixed Move Animations so they should all work properly now.

    Update 3: Implemented move animations, fixed a bug with checking for combos, reduced the turn processing to one method instead of 4 separate ones, for easier and more consistent debugging/errors. Also reduces the script by about 600 lines. Pretty much all that's left now is just a couple graphical components, the end scene, and potentially debugging how some effects work and junk like that. Hopefully for the latter part I can get some feedback.

    Also added a lot better commenting for easy navigation of the scripts functions.

    Update 2: Added combos, fixed some smaller bugs, added in the part where it checks if you used the move on the previous turn and deducts points for it, as well as dimming the move you used on the previous turn in the move selection.

    Update: Added basic functioning Contest Hall, with RSE style tiles thanks to Saving Raven. Fixed a couple bugs, including a couple game crashing ones.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old July 23rd, 2014 (1:07 PM).
    Radical Raptr's Avatar
    Radical Raptr Radical Raptr is online now
    #BAMFPokemonNerd
       
      Join Date: Mar 2011
      Location: everywhere
      Age: 23
      Gender: Male
      Nature: Sassy
      Posts: 1,120
      I'll get a tileset ready for you.
      __________________

      ~My Deviantart - Litharreon Wiki - Litharreon Game Download~

      Reply With Quote
        #3    
      Old July 23rd, 2014 (1:18 PM).
      mej71's Avatar
      mej71 mej71 is offline
         
        Join Date: Mar 2014
        Location: Omnipresence
        Gender: Male
        Posts: 1,226
        Quote:
        Originally Posted by Saving Raven View Post
        I'll get a tileset ready for you.
        Thank you very much! That will be quite helpful
        Reply With Quote
          #4    
        Old July 23rd, 2014 (3:03 PM).
        Radical Raptr's Avatar
        Radical Raptr Radical Raptr is online now
        #BAMFPokemonNerd
           
          Join Date: Mar 2011
          Location: everywhere
          Age: 23
          Gender: Male
          Nature: Sassy
          Posts: 1,120
          Here is the link to the Contest Hall tileset. Just credit me if you use it.
          __________________

          ~My Deviantart - Litharreon Wiki - Litharreon Game Download~

          Reply With Quote
            #5    
          Old July 25th, 2014 (2:15 PM). Edited July 25th, 2014 by mej71.
          mej71's Avatar
          mej71 mej71 is offline
             
            Join Date: Mar 2014
            Location: Omnipresence
            Gender: Male
            Posts: 1,226
            Update 2: Added combos, fixed some smaller bugs, added in the part where it checks if you used the move on the previous turn and deducts points for it, as well as dimming the move you used on the previous turn in the move selection.

            Edit: Note that in the combos, I spell Feint Attack with an "e". If you want to use the older spelling you just have to find these ( i think there's 2 instances) under the combos and change them.
            Reply With Quote
              #6    
            Old July 25th, 2014 (10:01 PM).
            mej71's Avatar
            mej71 mej71 is offline
               
              Join Date: Mar 2014
              Location: Omnipresence
              Gender: Male
              Posts: 1,226
              Update 3: Implemented move animations, fixed a bug with checking for combos, reduced the turn processing to one method instead of 4 separate ones, for easier and more consistent debugging/errors. Also reduces the script by about 600 lines. Pretty much all that's left now is just a couple graphical components, the end scene, and potentially debugging how some effects work and junk like that. Hopefully for the latter part I can get some feedback.

              Also added a lot better commenting for easy navigation of the scripts functions.
              Reply With Quote
                #7    
              Old July 26th, 2014 (11:55 AM).
              mej71's Avatar
              mej71 mej71 is offline
                 
                Join Date: Mar 2014
                Location: Omnipresence
                Gender: Male
                Posts: 1,226
                Next update will include more bug fixes(did a bit, I'll see if I can find more),graphical support for the stars earned(haven't made the graphics, but finished the methods for them), a fix so that self targeting moves (Harden, Focus Energy,etc) will display the animation on the user(done), hopefully a reorganization of how the ordering for turns happens(haven't started yet), and an AI system for the opponent's pokemon (also haven't started).
                Reply With Quote
                  #8    
                Old July 26th, 2014 (2:27 PM).
                DL Kurosh's Avatar
                DL Kurosh DL Kurosh is offline
                   
                  Join Date: May 2014
                  Posts: 95
                  That thing that looks like a badge on the right side of the map was like a thing to record the records of the Berry Mixer (or whatever it's name is). Basically, who pressed A faster or something like that =P

                  Asides from that, sadly, I can't help you more except from maybe getting you the end scene graphics. What do you exactly need?
                  Reply With Quote
                    #9    
                  Old July 26th, 2014 (5:27 PM). Edited July 26th, 2014 by mej71.
                  mej71's Avatar
                  mej71 mej71 is offline
                     
                    Join Date: Mar 2014
                    Location: Omnipresence
                    Gender: Male
                    Posts: 1,226
                    Quote:
                    Originally Posted by DL Kurosh View Post
                    That thing that looks like a badge on the right side of the map was like a thing to record the records of the Berry Mixer (or whatever it's name is). Basically, who pressed A faster or something like that =P

                    Asides from that, sadly, I can't help you more except from maybe getting you the end scene graphics. What do you exactly need?
                    Oh, I'll probably just get rid of that then unless somebody makes the berry mixer things (I don't really feel like doing those but I'll help somebody with the coding if they do the brunt of the work :P).

                    Basically most of the scene I can make myself, except for the background for it. It was an animated thing of the different colored versions of the Contest logo sliding towards the top right.

                    I'm just not very good at making graphics/I don't enjoy that part much, so combining that with my natural laziness it just takes a while to get that stuff done. That's why most of the graphics I made for this look pretty unprofessional.

                    Edit: I did find resources for some of the contest winner pictures (up to gen 3, and only for I think 3 of the categories) at spriters resource. If you guys think it's worth it to create the picture thing then I'll do that I guess, and people can hopefully add to the picture resources.
                    Reply With Quote
                      #10    
                    Old July 27th, 2014 (5:09 AM).
                    Derxwna Kapsyla's Avatar
                    Derxwna Kapsyla Derxwna Kapsyla is offline
                    Derxwna "The Badman" Kapsyla
                       
                      Join Date: Jun 2011
                      Location: Margate, FL
                      Age: 25
                      Gender: Male
                      Nature: Lax
                      Posts: 405
                      If I may some suggestions and feedback, after trying out the scripts myself:
                      • I would suggest removing the text box when displaying the text for contests - instead, having a text box drawn into the contest related image itself, and having text displayed there. It would require some tweaking to make it work correctly, but it would look better than having the text box cover the fourth person in the contest. Alternatively, streamline the GUI (If you can) so it can still fit between the top of the post and the text box.
                      • Another thing I noticed is that the font for when contests are going on is not any of the Pokemon fonts, but is instead the default RPG Maker XP Font (Aka: The font that happens when you don't have the proper fonts installed). I'd look into checking that out, maybe?
                      • Also uh, I'd honestly recommend uploading the files you've directly modified (the scripts file, the images, etc) instead of a fresh copy of Essentials with the files added. Saves on compression time, saves on upload time, saves on download time. I don't think people would like having to re-download the base essentials every time to check out the scripts, not to mention hunt around for the new and modified files.
                      Aside from that, everything seems to be running smoothly. Any other suggestions and feedback I could provide right now would be me nitpicking at the smallest of things. All in all, good work you've done so far, keep it up, and here's hoping this sees full completion!
                      __________________
                      Development Blog:
                      For more information future news and updates to any projects, the following blogs are where I post information. You can usually hit me with a message there when it comes to bug reports or feedback, or general conversation about something.
                      Game Projects:
                      In Progress:
                      Reply With Quote
                        #11    
                      Old July 27th, 2014 (7:17 AM).
                      mej71's Avatar
                      mej71 mej71 is offline
                         
                        Join Date: Mar 2014
                        Location: Omnipresence
                        Gender: Male
                        Posts: 1,226
                        Quote:
                        Originally Posted by Derxwna Kapsyla View Post
                        If I may some suggestions and feedback, after trying out the scripts myself:
                        • I would suggest removing the text box when displaying the text for contests - instead, having a text box drawn into the contest related image itself, and having text displayed there. It would require some tweaking to make it work correctly, but it would look better than having the text box cover the fourth person in the contest. Alternatively, streamline the GUI (If you can) so it can still fit between the top of the post and the text box.
                        • Another thing I noticed is that the font for when contests are going on is not any of the Pokemon fonts, but is instead the default RPG Maker XP Font (Aka: The font that happens when you don't have the proper fonts installed). I'd look into checking that out, maybe?
                        • Also uh, I'd honestly recommend uploading the files you've directly modified (the scripts file, the images, etc) instead of a fresh copy of Essentials with the files added. Saves on compression time, saves on upload time, saves on download time. I don't think people would like having to re-download the base essentials every time to check out the scripts, not to mention hunt around for the new and modified files.
                        Aside from that, everything seems to be running smoothly. Any other suggestions and feedback I could provide right now would be me nitpicking at the smallest of things. All in all, good work you've done so far, keep it up, and here's hoping this sees full completion!
                        I've actually already solved the text box for the next update. I didn't notice the font, I'll check that out. The reason I didn't just upload the scripts is for a couple reasons. Main one being that I've overwritten several classes (the compiler, I just added in a summary screen for the contest moves, Pokemon Messages because I added in some stuff to make the textbox fit, etc). Second being the example map I've made which is quite a bit of work to explain step by step how to create the events for it. I guess I'll upload the scripts separately as well for the next update since people seem to want that.
                        Reply With Quote
                          #12    
                        Old July 27th, 2014 (9:35 AM).
                        Derxwna Kapsyla's Avatar
                        Derxwna Kapsyla Derxwna Kapsyla is offline
                        Derxwna "The Badman" Kapsyla
                           
                          Join Date: Jun 2011
                          Location: Margate, FL
                          Age: 25
                          Gender: Male
                          Nature: Lax
                          Posts: 405
                          Uploading the scripts file would make it easier on people who just want to download the scripts, and not redownload the entire essentials base engine, which is why I suggested it primarily.
                          Good to know though that the text box issue is resolved, that was my biggest concern with the scripts. That and it always kept saying "Round One" despite it not being Round One.
                          __________________
                          Development Blog:
                          For more information future news and updates to any projects, the following blogs are where I post information. You can usually hit me with a message there when it comes to bug reports or feedback, or general conversation about something.
                          Game Projects:
                          In Progress:
                          Reply With Quote
                            #13    
                          Old July 27th, 2014 (11:49 AM).
                          mej71's Avatar
                          mej71 mej71 is offline
                             
                            Join Date: Mar 2014
                            Location: Omnipresence
                            Gender: Male
                            Posts: 1,226
                            Quote:
                            Originally Posted by Derxwna Kapsyla View Post
                            Uploading the scripts file would make it easier on people who just want to download the scripts, and not redownload the entire essentials base engine, which is why I suggested it primarily.
                            Good to know though that the text box issue is resolved, that was my biggest concern with the scripts. That and it always kept saying "Round One" despite it not being Round One.
                            The round one thing is just because I hadn't made the graphics for the other rounds, it knew which round it was on. I've made them now (they look dumb but eh).

                            I guess I'll make a tutorial for the example map too, and I'll just leave the zip up in case anyone wants that or has problems. Next update is almost done, just working on writing an AI for the opponent's pokemon and then I'll release that.
                            Reply With Quote
                              #14    
                            Old July 27th, 2014 (5:16 PM).
                            mej71's Avatar
                            mej71 mej71 is offline
                               
                              Join Date: Mar 2014
                              Location: Omnipresence
                              Gender: Male
                              Posts: 1,226
                              Update 1.4 ready, see main post. If a tutorial on creating the events for the competition are needed, I can do that. Just ask
                              Reply With Quote
                                #15    
                              Old August 4th, 2014 (12:54 AM).
                              Richard PT's Avatar
                              Richard PT Richard PT is online now
                                 
                                Join Date: Aug 2014
                                Location: Portugal
                                Gender: Male
                                Nature: Calm
                                Posts: 115
                                Hi, your pokemon contest system works fine in my project, but the game crashes when i'm using the move MAGNITUDE, if you can fix this it will be great.
                                Thanks to share this. If you want the graphics of Pokemon contests from Emerald i can post here for you.
                                __________________
                                Reply With Quote
                                  #16    
                                Old August 4th, 2014 (1:23 AM).
                                mej71's Avatar
                                mej71 mej71 is offline
                                   
                                  Join Date: Mar 2014
                                  Location: Omnipresence
                                  Gender: Male
                                  Posts: 1,226
                                  Quote:
                                  Originally Posted by Richard PT View Post
                                  Hi, your pokemon contest system works fine in my project, but the game crashes when i'm using the move MAGNITUDE, if you can fix this it will be great.
                                  Thanks to share this. If you want the graphics of Pokemon contests from Emerald i can post here for you.
                                  Could you post the error message for me? I think I see what might make it go wrong, but it's much easier to do if I know exactly where it crashes.


                                  As a separate, general note: going to add in a berry mixer of sorts in for the next update to create pokeblocks, as well as a fix for Pokemon Summary so that you can actually scroll through your ribbons. And likewise, initial judging will be implemented in accordance with your pokemon's attributes.
                                  Reply With Quote
                                    #17    
                                  Old August 4th, 2014 (7:03 AM).
                                  Radical Raptr's Avatar
                                  Radical Raptr Radical Raptr is online now
                                  #BAMFPokemonNerd
                                     
                                    Join Date: Mar 2011
                                    Location: everywhere
                                    Age: 23
                                    Gender: Male
                                    Nature: Sassy
                                    Posts: 1,120
                                    What would also be cool is an alternate move menu, maybe even activated by a button, that shows whether the moves are cool, tough, smart, etc like it did in the R/S/E
                                    __________________

                                    ~My Deviantart - Litharreon Wiki - Litharreon Game Download~

                                    Reply With Quote
                                      #18    
                                    Old August 4th, 2014 (7:12 AM).
                                    mej71's Avatar
                                    mej71 mej71 is offline
                                       
                                      Join Date: Mar 2014
                                      Location: Omnipresence
                                      Gender: Male
                                      Posts: 1,226
                                      Quote:
                                      Originally Posted by Saving Raven View Post
                                      What would also be cool is an alternate move menu, maybe even activated by a button, that shows whether the moves are cool, tough, smart, etc like it did in the R/S/E
                                      That was included in the latest update...
                                      Reply With Quote
                                        #19    
                                      Old August 4th, 2014 (7:14 AM).
                                      Radical Raptr's Avatar
                                      Radical Raptr Radical Raptr is online now
                                      #BAMFPokemonNerd
                                         
                                        Join Date: Mar 2011
                                        Location: everywhere
                                        Age: 23
                                        Gender: Male
                                        Nature: Sassy
                                        Posts: 1,120
                                        Quote:
                                        Originally Posted by mej71 View Post
                                        That was included in the latest update...
                                        Wow, I have not been keeping up with this, sorry about that
                                        __________________

                                        ~My Deviantart - Litharreon Wiki - Litharreon Game Download~

                                        Reply With Quote
                                          #20    
                                        Old August 4th, 2014 (7:22 AM).
                                        mej71's Avatar
                                        mej71 mej71 is offline
                                           
                                          Join Date: Mar 2014
                                          Location: Omnipresence
                                          Gender: Male
                                          Posts: 1,226
                                          Quote:
                                          Originally Posted by Saving Raven View Post
                                          Wow, I have not been keeping up with this, sorry about that
                                          It's all good. The page could probably use some visual improvement, but it's there.
                                          Reply With Quote
                                            #21    
                                          Old August 10th, 2014 (11:47 AM). Edited August 10th, 2014 by LenSho.
                                          LenSho's Avatar
                                          LenSho LenSho is offline
                                             
                                            Join Date: Sep 2012
                                            Gender: Male
                                            Nature: Modest
                                            Posts: 94
                                            This is awesome!

                                            Is there a way to edit the opponent Pokémon's moves?

                                            EDIT: I'm getting this error (in an unedited version) in Round 2 in Porygon's turn (Smart contest)



                                            Only when it's Porygon's turn
                                            __________________
                                            Reply With Quote
                                              #22    
                                            Old August 10th, 2014 (7:34 PM).
                                            mej71's Avatar
                                            mej71 mej71 is offline
                                               
                                              Join Date: Mar 2014
                                              Location: Omnipresence
                                              Gender: Male
                                              Posts: 1,226
                                              Quote:
                                              Originally Posted by LenSho View Post
                                              This is awesome!

                                              Is there a way to edit the opponent Pokémon's moves?

                                              EDIT: I'm getting this error (in an unedited version) in Round 2 in Porygon's turn (Smart contest)

                                              Only when it's Porygon's turn
                                              Thought I fixed that. It's just a typo though.

                                              Code:
                                              if pbDoubleNext==true  #check for double hearts
                                                      @currenthears*=2
                                                      pbReverseDoubleNext
                                              red is 415. should be @currenthearts*=2
                                              Only occurs for Porygon because he's the only one that knows a move that activates pbDoubleNext and goes fourth.

                                              I haven't yet put in a way, but it shouldn't be too hard I don't believe. I'd like to make the player able to set anything they want in a .txt document, but I really don't want to mess with the compiler more. That was not much fun. I could just incorporate it into the main script call, though that's getting really long lol. I guess that's not really much of an issue though. I'll try and have it in the next update. Got a guy helping me with the graphical components for making a berry mixer-type deal (it's more of a crafting table, instead of what the original is), so that and the end scene and some stuff by Super Dedenne for the summary pages should be what's in the next update. Can't think of much to do after that.
                                              Reply With Quote
                                                #23    
                                              Old August 10th, 2014 (8:36 PM).
                                              LenSho's Avatar
                                              LenSho LenSho is offline
                                                 
                                                Join Date: Sep 2012
                                                Gender: Male
                                                Nature: Modest
                                                Posts: 94
                                                Oh ok, thanks.

                                                By the way, what does the 50 and the 20 mean in the lines:

                                                (50,PBSpecies::MILOTIC,20,PBSpecies::MAGMAR,20,PBSpecies::VILEPLUME,20)

                                                Is that their level?
                                                __________________
                                                Reply With Quote
                                                  #24    
                                                Old August 10th, 2014 (10:50 PM).
                                                mej71's Avatar
                                                mej71 mej71 is offline
                                                   
                                                  Join Date: Mar 2014
                                                  Location: Omnipresence
                                                  Gender: Male
                                                  Posts: 1,226
                                                  The 20's are the level, the first number is the difficulty for the AI. Only the 25, 50, and 75 ranges actually change anything. Difficulty above 25 removes the lowest scoring move for the round and chooses, above 75 removes the lowest two. The difficulty also determines how many chances it has to choose from the modified set (with the lower moves set to nil. This choice will fail if it chooses a nil move.) before choosing from the full move set instead.
                                                  Reply With Quote
                                                    #25    
                                                  Old August 17th, 2014 (8:30 PM).
                                                  bbwong91900 bbwong91900 is offline
                                                     
                                                    Join Date: Dec 2013
                                                    Gender: Male
                                                    Posts: 15
                                                    Im getting this error when I'm trying to call up the script:

                                                    Code:
                                                    ---------------------------
                                                    Pokemon Essentials
                                                    ---------------------------
                                                    Exception: RuntimeError
                                                    
                                                    Message: Script error within event 5, map 2 (Ingori Town):
                                                    
                                                    Exception: TypeError
                                                    
                                                    Message: Section160:62:in `[]'cannot convert PokeBattle_Pokemon into Integer
                                                    
                                                    ***Full script:
                                                    
                                                    pbContest(50,PBSpecies::CHARIZARD,20,PBSpecies::SQUIRTLE,20,PBSpecies::HITMONTOP,20)
                                                    
                                                    
                                                    Interpreter:243:in `pbExecuteScript'
                                                    
                                                    Contests:62:in `pbStartContest'
                                                    
                                                    Contests:2180:in `pbStartContest'
                                                    
                                                    Contests:2190:in `pbContest'
                                                    
                                                    (eval):1:in `pbExecuteScript'
                                                    
                                                    Interpreter:1600:in `eval'
                                                    
                                                    Interpreter:243:in `pbExecuteScript'
                                                    
                                                    Interpreter:1600:in `command_355'
                                                    
                                                    Interpreter:494:in `execute_command'
                                                    
                                                    Interpreter:193:in `update'
                                                    
                                                    
                                                    
                                                    Interpreter:276:in `pbExecuteScript'
                                                    
                                                    Interpreter:1600: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'
                                                    
                                                    
                                                    
                                                    This exception was logged in 
                                                    
                                                    C:\Users\Wong\Saved Games/Pokemon Essentials/errorlog.txt.
                                                    
                                                    Press Ctrl+C to copy this message to the clipboard.
                                                    ---------------------------
                                                    OK   
                                                    ---------------------------
                                                    Have tested it on the clean version and it works fine. Can't seem to figure what's causing this error.
                                                    Reply With Quote
                                                    Reply

                                                    Quick Reply

                                                    Join the conversation!

                                                    Create an account to post a reply in this thread, participate in other discussions, and more!

                                                    Create a PokéCommunity Account

                                                    Sponsored Links
                                                    Thread Tools

                                                    Posting Rules
                                                    You may not post new threads
                                                    You may not post replies
                                                    You may not post attachments
                                                    You may not edit your posts

                                                    BB code is On
                                                    Smilies are On
                                                    [IMG] code is On
                                                    HTML code is Off

                                                    Forum Jump


                                                    All times are GMT -8. The time now is 12:45 PM.