- 153
- Posts
- 4
- Years
- Seen Feb 4, 2020
Hello guys(/girls?),
I have an unexpected bug using this script. I wanted to have adapting level for wild bosses and if the one boss is a scizor then teach it the moves. Though now that this works perfectly I suddenly realise that any time the switch all pokemon encountered are Scizors even though they keep their names (for example mewtwo when meeting it or even krabby while walking on the seashore) and they have the moves I wanted Scizor to learn.
I don't understand why this line "if pokemon.species==212" is turning every poke in 212 instead of just checking if it is a scizor or not.
Thank you for your help
I have an unexpected bug using this script. I wanted to have adapting level for wild bosses and if the one boss is a scizor then teach it the moves. Though now that this works perfectly I suddenly realise that any time the switch all pokemon encountered are Scizors even though they keep their names (for example mewtwo when meeting it or even krabby while walking on the seashore) and they have the moves I wanted Scizor to learn.
I don't understand why this line "if pokemon.species==212" is turning every poke in 212 instead of just checking if it is a scizor or not.
Thank you for your help
Code:
if $game_switches[89] and if pbBalancedLevel($Trainer.party)>1
newlevel=pbBalancedLevel($Trainer.party) + 1
if pbBalancedLevel($Trainer.party)>10
newlevel=pbBalancedLevel($Trainer.party) + 2
end
if pbBalancedLevel($Trainer.party)>20
newlevel=pbBalancedLevel($Trainer.party) + 4
end
if pbBalancedLevel($Trainer.party)>30
newlevel=pbBalancedLevel($Trainer.party) + 6
end
if pbBalancedLevel($Trainer.party)>40
newlevel=pbBalancedLevel($Trainer.party) + 8
end
if pbBalancedLevel($Trainer.party)>50
newlevel=pbBalancedLevel($Trainer.party) + 10
end
if pbBalancedLevel($Trainer.party)>60
newlevel=pbBalancedLevel($Trainer.party) + 12
end
if pbBalancedLevel($Trainer.party)>70
newlevel=pbBalancedLevel($Trainer.party) + 14
end
if pbBalancedLevel($Trainer.party)>80
newlevel=pbBalancedLevel($Trainer.party) + 16
end
if pbBalancedLevel($Trainer.party)>90
newlevel=pbBalancedLevel($Trainer.party) + 10
end
newlevel=PBExperience::MAXLEVEL if newlevel>PBExperience::MAXLEVEL
pokemon.level=newlevel
end
if pokemon.species=212 #edit: the error is here, needs "==" instead of "="
pokemon.pbLearnMove(:METALCLAW)
pokemon.pbLearnMove(:ICEPUNCH)
pokemon.pbLearnMove(:THUNDERPUNCH)
end
end
}
Last edited: