• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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.

Random Trades

  • 32
    Posts
    5
    Years
    • Seen today
    Code:
    def pbIntercambio
       species=rand(PBSpecies.maxValue)+1
       spe=rand(PBSpecies.maxValue)+1
       solicitado=PBSpecies.getName(species)
       doy=PBSpecies.getName(spe)
       
       if Kernel.pbConfirmMessage(_INTL("Oye tienes algun {1} que me des por mi {2}",solicitado,doy))
          pbChoosePokemon(1,2)
          cancel = pbGet(1)
          pok1 = $Trainer.pokemonParty[pbGet(1)]
          pok2=pok1.species
          pok3=pok1.level
        if pok2!=species
          Kernel.pbMessage(_INTL("No es el pokemon que busco"))
        else
          pbRemovePokemonAt(pbGet(1))
          poke=pbAddPokemon(spe,pok3)
        end
        
          
         else
         Kernel.pbMessage(_INTL("Esta bien vuelve luego"))
       end
       
      end
    
    
    #Its the first version
     

    Attachments

    • [PokeCommunity.com] Random Trades
      typo.png
      24.8 KB · Views: 61
    • [PokeCommunity.com] Random Trades
      trade your pokemon.png
      23.5 KB · Views: 56
    Last edited:
    def pbIntercambio
    species=rand(PBSpecies.maxValue)+1
    spe=rand(PBSpecies.maxValue)+1
    solicitado=PBSpecies.getName(species)
    doy=PBSpecies.getName(spe)

    if Kernel.pbConfirmMessage(_INTL("Oye tienes algun {1} que me des por mi {2}",solicitado,doy))
    pbChoosePokemon(1,2)
    cancel = pbGet(1)
    pok1 = $Trainer.pokemonParty[pbGet(1)]
    pok2=pok1.species
    pok3=pok1.level
    if pok2!=species
    Kernel.pbMessage(_INTL("No es el pokemon que busco"))
    else
    pbRemovePokemonAt(pbGet(1))
    poke=pbAddPokemon(spe,pok3)
    end


    else
    Kernel.pbMessage(_INTL("Esta bien vuelve luego"))
    end

    end


    #Its the first version

    I would suggest putting your scripts in [.CODE][./CODE] blocks like this(remove the dots):
    Code:
    def pbTrade
      species=rand(PBSpecies.maxValue)+1
      spe=rand(PBSpecies.maxValue)+1
      solicitado=PBSpecies.getName(species)
      doy=PBSpecies.getName(spe)
    
      if Kernel.pbConfirmMessage(_INTL("Do you have a {1}, would you trade it for my {2}?",solicitado,doy))
        pbChoosePokemon(1,2)
        cancel = pbGet(1)
        pok1 = $Trainer.pokemonParty[pbGet(1)]
        pok2=pok1.species
        pok3=pok1.level
        if pok2!=species
        Kernel.pbMessage(_INTL("It's not the pokemon I'm looking for"))
      else
        pbRemovePokemonAt(pbGet(1))
        poke=pbAddPokemon(spe,pok3)
      end
    
    
      else
        Kernel.pbMessage(_INTL("It's okay I'll come back later"))
      end
    
    end
    anyways it's a good script
     
    Last edited:
    I would suggest putting your scripts in [.CODE][./CODE] blocks like this(remove the dots):
    Code:
    def pbTrade
      species=rand(PBSpecies.maxValue)+1
      spe=rand(PBSpecies.maxValue)+1
      solicitado=PBSpecies.getName(species)
      doy=PBSpecies.getName(spe)
    
      if Kernel.pbConfirmMessage(_INTL("Do you have a {1}, would you trade it for my {2}?",solicitado,doy))
        pbChoosePokemon(1,2)
        cancel = pbGet(1)
        pok1 = $Trainer.pokemonParty[pbGet(1)]
        pok2=pok1.species
        pok3=pok1.level
        if pok2!=species
        Kernel.pbMessage(_INTL("It's not the pokemon I'm looking for"))
      else
        pbRemovePokemonAt(pbGet(1))
        poke=pbAddPokemon(spe,pok3)
      end
    
    
      else#<----------There is an error here
        Kernel.pbMessage(_INTL("It's okay I'll come back later"))
      end
    
    end

    Thanks for this!!
     
    Back
    Top