Scripts, Tutorials & Tools This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.

Ad Content
Reply
 
Thread Tools
  #26   Link to this post, but load the entire thread.  
Old October 9th, 2018 (11:13 AM). Edited October 9th, 2018 by mgriffin.
mgriffin's Avatar
mgriffin mgriffin is offline
     
    Join Date: Apr 2014
    Posts: 195
    Quote:
    Originally Posted by WolfPP View Post
    Now i want to know how to put a switch to make a encounter by type
    like, if i stay in volcano area, switch x will appears only fire type, or in a sky pillar will appears only fly type, you know?
    Maybe you can do something like:

    Code:
      BlackListedPokemonDefault = [...].map { ... }
      BlackListedPokemonGrass = [...].map { ... }
      BlackListedPokemonVolcano = [...].map { ... }
      ...
    
      def BlackListedPokemon
        case mySwitch
        when 0: return BlackListedPokemonGrass
        when 1: return BlackListedPokemonVolcano
        ...
        else: return BlackListedPokemonDefault
        end
      end
    I don't know about switches, but I guess you know how to set mySwitch when a player enters an area? Or maybe there is some way to find out what route the player is on, and switch on that instead?

    EDIT: Maybe it is easier to use whitelist for these kinds of things? Probably it will be less typing.
    Reply With Quote
      #27   Link to this post, but load the entire thread.  
    Old October 9th, 2018 (12:33 PM).
    WolfPP's Avatar
    WolfPP WolfPP is online now
       
      Join Date: Aug 2018
      Location: Brazil
      Gender: Male
      Nature: Jolly
      Posts: 180
      Quote:
      Originally Posted by mgriffin View Post

      EDIT: Maybe it is easier to use whitelist for these kinds of things? Probably it will be less typing.
      I agree, but how can i put Types? Like egg generator by FL:

      Code:
      def randomEggBasedOnTypeEntered(helptext)
        typeName = pbEnterText(helptext,0,8)
        typeValidNumber = nil 
        typeAvailable = [:NORMAL,:FIGHTING,:FLYING,:POISON,:GROUND,
            :ROCK,:BUG,:GHOST,:STEEL,:FIRE,:WATER,:GRASS,:ELECTRIC,:PSYCHIC,
            :ICE,:DRAGON,:DARK,:FAIRY]
        for typeSymbol in typeAvailable
          type = getID(PBTypes,typeSymbol)
          if PBTypes.getName(type).downcase == typeName.strip.downcase
            typeValidNumber = type 
            break
          end
        end
        if typeValidNumber
          randomEggGenerator([],false,typeValidNumber)
          return true
        end
        return false
      end
      about the switch, yes, i know how to put it. Player touch etc :D

      ty ty!
      Reply With Quote
        #28   Link to this post, but load the entire thread.  
      Old October 9th, 2018 (12:55 PM). Edited October 9th, 2018 by mgriffin.
      mgriffin's Avatar
      mgriffin mgriffin is offline
         
        Join Date: Apr 2014
        Posts: 195
        Quote:
        Originally Posted by WolfPP View Post
        I agree, but how can i put Types?
        Oh right, I misunderstood.

        Maybe you can use select?

        e.g.

        Code:
        [1, 2, 3].select { |i| i < 3 }
        Returns [1, 2].

        So you could use a select that checks the type of the species?
        Reply With Quote
          #29   Link to this post, but load the entire thread.  
        Old October 11th, 2018 (5:48 AM).
        WolfPP's Avatar
        WolfPP WolfPP is online now
           
          Join Date: Aug 2018
          Location: Brazil
          Gender: Male
          Nature: Jolly
          Posts: 180
          Quote:
          Originally Posted by mgriffin View Post
          Oh right, I misunderstood.

          Maybe you can use select?

          e.g.

          Code:
          [1, 2, 3].select { |i| i < 3 }
          Returns [1, 2].

          So you could use a select that checks the type of the species?
          I didnt :/

          And, unfortunately, i found a treecko in a wild encounter :///////// To sad...
          Reply With Quote
            #30   Link to this post, but load the entire thread.  
          Old November 28th, 2018 (12:42 PM).
          PKLetsGoSuk5 PKLetsGoSuk5 is offline
             
            Join Date: Nov 2018
            Posts: 1
            What about a Form Randomizer, which picks a random form of those that are available for each pokemon; or select a range of numbers to randomize, returning the number that will specify the pokemon's form? With that it would be possible to battle Megas and other forms of Arceus/Genesect/Silvally...and so on...

            Thanks for your time! :thumbsup:
            Reply With Quote
            Reply

            Quick Reply

            Join the conversation!

            Create an account to post a reply in this thread, participate in other discussions, and more!

            Create a PokéCommunity Account
            Ad Content
            Thread Tools

            Posting Rules
            You may not post new threads
            You may not post replies
            You may not post attachments
            You may not edit your posts

            BB code is On
            Smilies are On
            [IMG] code is On
            HTML code is Off

            Forum Jump


            All times are GMT -8. The time now is 6:52 AM.