• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist 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.

Creating a Contest Pass (secondary Trainer Card)

Line 192 is where I put a replica of the badges but then with trophies instead.

The whole def from line 164 to 197:
Code:
  def initialize(name,trainertype)
    @name=name
    @language=pbGetLanguage()
    @trainertype=trainertype
    @id=rand(256)
    @id|=rand(256)<<8
    @id|=rand(256)<<16
    @id|=rand(256)<<24
    @seen=[]
    @owned=[]
    @shadowcaught=[]
    @formseen=[]
    @formlastseen=[]
    @badges=[]
    @trophies=[8]
    @pokedex=false
    @pokegear=false
    for i in 1..PBSpecies.maxValue
      @seen[i]=false
      @owned[i]=false
      @shadowcaught[i]=false
      @formlastseen[i]=[]
      @formseen[i]=[[],[]]
    end
    for i in 0...8
      @badges[i]=false
    end
    for i in 0...8
      [B]@tropies[i]=false[/B]
    end
    @money=INITIALMONEY
    @party=[]
  end
end

So this part has an direct influence on restarting the game. As of course, renewing a game also resets the number of badges back to zero, or as in this case, the number of trophies.

Even while I have duplicated all badge components and renamed those with trophies, there still is an error in the script. But I wonder where?
 
Spelling mistake, mate. "tropies" isn't the same as "trophies".

While you're there, you can remove the 8 from @trophies=[8]. It's not causing any harm, but there's no reason to have a number there.
 
NO WAY!!
For Bloody Damn Sake how could I have overseen a spelling mistake like that!
Thanks heaps for mentioning it, though... Damn that is of a loser-grade less than a Wobbuffet!

So I restarted a game, the $Trainer.trophies variable seems to return no problems.
However, now I can't open the card (>_<)
I keep getting this undefined local variable error in ItemEffects script
[PokeCommunity.com] Creating a Contest Pass (secondary Trainer Card)

I have checked it over and over and over and over (and that like a hundred times)
to prevail another one of these stupid overseen mistakes, but I can't figure it out. I have replicated all Townmap files (as being the most similar item in ItemEffects) and got it like this:
from line 118 to 131
Code:
ItemHandlers::UseFromBag.add(:TOWNMAP,proc{|item|
   pbShowMap(-1,false)
   next 1 # Continue
})

ItemHandlers::UseFromBag.add(:CONTESTPASS,proc{|item|
   pbContestPass
   next 1 # Continue
})

ItemHandlers::UseFromBag.add(:COINCASE,proc{|item|
   Kernel.pbMessage(_INTL("Coins: {1}",$PokemonGlobal.coins))
   next 1 # Continue
})

Followed up by
lines 965 to 976
Code:
ItemHandlers::UseInField.add(:TOWNMAP,proc{|item|
   pbShowMap(-1,false)
})

ItemHandlers::UseInField.add(:CONTESTPASS,proc{|item|
   pbContestPass
})

ItemHandlers::UseInField.add(:COINCASE,proc{|item|
   Kernel.pbMessage(_INTL("Coins: {1}",$PokemonGlobal.coins))
   next 1 # Continue
})

Can someone shed some light on this??
 
Last edited:
finally, I got it working! Was more complex than I thought :-S I placed a small def in PokemonUtilities where appeared to be the problem. In the end, I placed the card as an item of course in ItemEffects and the PBS file, I made a new script named PokemonContestPass which in fact is a replica of PokemonTrainerCard, And another smaller def in PokemonUtilities.

Now for my next great challenge is to solve the Pokemon-following problem as I placed in the script-request folder under Help-14's Pokemon following script. I hope you can help me out with that one too?
 
Thanks everyone who has helped me to perfect the concept of a Contest Card (which I later renamed Colosseum Card)
The final product (with all 10 trophies) is as follows:

[PokeCommunity.com] Creating a Contest Pass (secondary Trainer Card)


So once again, thanks heaps!
 
Back
Top