• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script: Generation 9 Resource Pack [v21.1]

Hey! not sure if anyone has reported this already, but Silk Trap is not clearing at the end of the round, making Spidops immortal.

Added this line: "battler.effects[PBEffects::SilkTrap] = false"
In Generation 9 Pack Scripts\[001] Battle\[001] Battle.rb 156,3: def pbEndOfRoundPhase
And now it's working
 
Hey, not sure if anyone has posted about this one but we are getting this error on the latest version of the script. The move is for Psycho shift when the user is statused.
`Exception `ArgumentError' at [Generation 9 Pack] [000] Move Functions.rb:27 - wrong number of arguments (given 0, expected 2)`
 
Hey, not sure if anyone has posted about this one but we are getting this error on the latest version of the script. The move is for Psycho shift when the user is statused.
`Exception `ArgumentError' at [Generation 9 Pack] [000] Move Functions.rb:27 - wrong number of arguments (given 0, expected 2)`

I also have this error. Does yours keep going back to the batte screen and keep looping attempting using the attack? I deleted the move as a temporary fix.
 
I also have this error. Does yours keep going back to the batte screen and keep looping attempting using the attack? I deleted the move as a temporary fix.
I've managed to fix it, here is the code for you!
Ruby:
#===============================================================================
# Psycho Shift
#===============================================================================
# Adds messages for Drowsy/Frostbite.
#-------------------------------------------------------------------------------
class Battle::Move::GiveUserStatusToTarget < Battle::Move
  alias paldea_pbEffectAgainstTarget pbEffectAgainstTarget
  def pbEffectAgainstTarget(user, target)
    if [:DROWSY, :FROSTBITE].include?(user.status)
      case user.status
      when :DROWSY
        target.pbSleep
        user.pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} became alert again.", user.pbThis))
      when :FROSTBITE
        target.pbFreeze
        user.pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s frostbite was healed.", user.pbThis))
      end
    else
      paldea_pbEffectAgainstTarget(user, target)
    end
  end
end
 
I've managed to fix it, here is the code for you!
Ruby:
#===============================================================================
# Psycho Shift
#===============================================================================
# Adds messages for Drowsy/Frostbite.
#-------------------------------------------------------------------------------
class Battle::Move::GiveUserStatusToTarget < Battle::Move
  alias paldea_pbEffectAgainstTarget pbEffectAgainstTarget
  def pbEffectAgainstTarget(user, target)
    if [:DROWSY, :FROSTBITE].include?(user.status)
      case user.status
      when :DROWSY
        target.pbSleep
        user.pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1} became alert again.", user.pbThis))
      when :FROSTBITE
        target.pbFreeze
        user.pbCureStatus(false)
        @battle.pbDisplay(_INTL("{1}'s frostbite was healed.", user.pbThis))
      end
    else
      paldea_pbEffectAgainstTarget(user, target)
    end
  end
end
Thank you for pointing that out. Managed to do the quick fix just in case I encounter that issue.
 
Back
Top