- 57
- Posts
- 5
- Years
- Seen Apr 17, 2022
Hey i'm trying to update this script to essentials version 17.2. But there is a mistake that I don't understand. that of pbPokerus. What would be the equivalent in essentials 17.2?
The Error:
Thank you
Spoiler:
Code:
def Habilidades(pokemon)
overlay=@sprites["overlay"].bitmap
overlay.clear
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_3")
imagepos=[]
if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
status=6 if pbPokerus(pokemon)==1
[email protected] if @pokemon.status>0
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
end
if pokemon.isShiny?
imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
end
if pbPokerus(pokemon)==2
imagepos.push([sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
end
[email protected] ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
imagepos.push([ballimage,14,60,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
base=Color.new(248,248,248)
shadow=Color.new(104,104,104)
statshadows=[]
for i in 0...5; statshadows[i]=shadow; end
if !(pokemon.isShadow? rescue false) || pokemon.heartStage<=3
natup=(pokemon.nature/5).floor
natdn=(pokemon.nature%5).floor
statshadows[natup]=Color.new(136,96,72) if natup!=natdn
statshadows[natdn]=Color.new(64,120,152) if natup!=natdn
end
pbSetSystemFont(overlay)
abilityname=PBAbilities.getName(pokemon.ability)
abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
[email protected]
hiddenpower=pbHiddenPower(pokemon.iv)
#textos
textpos=[
[_INTL("INFORMACIÓN"),26,16,0,base,shadow],
[pokename,46,62,0,base,shadow],
[pokemon.level.to_s,46,92,0,base,shadow],
[_INTL("Habilidad:"),200,0,0,base,shadow],
[_INTL("EV / IV / Poder Oculto "),200,225,0,base,shadow],
[abilityname,320,0,0,base,shadow],
[_INTL(" HP "),228,260,2,base,shadow],
[sprintf("%d/%d",@pokemon.ev[0],@pokemon.iv[0]),350,260,1,Color.new(64,64,64),shadow],
[_INTL("ATAQ."),200,285,0,base,statshadows[0]],
[sprintf("%d/%d",@pokemon.ev[1],@pokemon.iv[1]),350,285,1,Color.new(64,64,64),shadow],
[_INTL("DEFE."),200,310,0,base,statshadows[1]],
[sprintf("%d/%d",@pokemon.ev[2],@pokemon.iv[2]),350,310,1,Color.new(64,64,64),shadow],
[_INTL("AT.E."),360,260,0,base,statshadows[3]],
[sprintf("%d/%d",@pokemon.ev[4],@pokemon.iv[4]),500,260,1,Color.new(64,64,64),shadow],
[_INTL("DE.E."),360,285,0,base,statshadows[4]],
[sprintf("%d/%d",@pokemon.ev[5],@pokemon.iv[5]),500,285,1,Color.new(64,64,64),shadow],
[_INTL("VELO."),360,310,0,base,statshadows[2]],
[sprintf("%d/%d",@pokemon.ev[3],@pokemon.iv[3]),500,310,1,Color.new(64,64,64),shadow],
[_INTL("Felicidad"),20,345,0,base,shadow],
[sprintf("%d",@pokemon.happiness),150,345,1,base,Color.new(255,160,122)],
[_INTL("Poder Oculto"),210,345,28,base,shadow],
[_INTL("{1}",PBTypes.getName(hiddenpower[0])),450,345,1,base,Color.new(255,160,122)]
]
if pokemon.isMale?
textpos.push([_INTL("♂"),160,62,0,Color.new(24,112,216),Color.new(136,168,208)])
elsif pokemon.isFemale?
textpos.push([_INTL("♀"),160,62,0,Color.new(248,56,32),Color.new(224,152,144)])
end
pbDrawTextPositions(overlay,textpos)
drawTextEx(overlay,200,30,310,6,abilitydesc,base,shadow)
loop do
Graphics.update
Input.update
pbUpdate
if Input.trigger?(Input::B)
Input.update
drawPageThree(pokemon)
break
elsif Input.trigger?(Input::C)
Input.update
drawPageThree(pokemon)
break
end
end
end
Spoiler:
[Pokémon Essentials version 17.2]
Exception: NoMethodError
Message: undefined method `pbPokerus' for #<PokemonSummary_Scene:0xdd48de8>
PScreen_Summary:618:in `Habilidades'
Birthsigns_Effects:4712:in `pbScene'
Birthsigns_Effects:4685:in `loop'
Birthsigns_Effects:4793:in `pbScene'
PScreen_Summary:1399:in `pbStartScreen'
PScreen_Party:728:in `pbSummary'
Birthsigns_Effects:458:in `pbPokemonScreen'
Birthsigns_Effects:41:in `loop'
Birthsigns_Effects:2638:in `pbPokemonScreen'
ModularMenu:372
Exception: NoMethodError
Message: undefined method `pbPokerus' for #<PokemonSummary_Scene:0xdd48de8>
PScreen_Summary:618:in `Habilidades'
Birthsigns_Effects:4712:in `pbScene'
Birthsigns_Effects:4685:in `loop'
Birthsigns_Effects:4793:in `pbScene'
PScreen_Summary:1399:in `pbStartScreen'
PScreen_Party:728:in `pbSummary'
Birthsigns_Effects:458:in `pbPokemonScreen'
Birthsigns_Effects:41:in `loop'
Birthsigns_Effects:2638:in `pbPokemonScreen'
ModularMenu:372
Thank you