- 1,224
- Posts
- 11
- Years
- Omnipresence
- Seen Aug 8, 2023
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
and change the arrays datafiles and textfiles (located right above def pbGenerateMoveRoute(commands) to this
and lastly, inside def pbCompileAllData(mustcompile) add the part in red
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
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"
]
Code:
# Depends on PBSpecies, PBMoves
yield(_INTL("Compiling shadow move data"))
pbCompileShadowMoves
[COLOR="Red"]#Depends on PBContestMoves
yield(_INTL("Compiling contest moves"))
pbCompileContestMoves[/COLOR]
Code:
ContestMoves = 23
ContestMoveDescriptions = 24
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 (broken link removed)
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([COLOR="Red"]50[/COLOR],[COLOR="Blue"]PBSpecies::CHARIZARD[/COLOR],[COLOR="Magenta"]20[/COLOR],[COLOR="blue"]PBSpecies::SQUIRTLE[/COLOR],
[COLOR="Magenta"]20[/COLOR],[COLOR="blue"]PBSpecies::HITMONTOP[/COLOR],[COLOR="Magenta"]20[/COLOR],[COLOR="Cyan"]1[/COLOR])
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)
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
Code:
pbMixer
Using the Berry High Score thing
Just call
Code:
pbBerryScores
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)
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.
Last edited: