• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Even More Fixes and Additions to Help-14's Following Pokemon Script

18
Posts
9
Years
    • Seen Apr 18, 2015
    Does anyone know where I can find the pokemon characters?
    I found it: wwwDOTpokecommunityDOTcom/showthreadDOTphp?t=281323 (sorry but i can't post link), but the links don't work
     
    5
    Posts
    9
    Years
    • Seen Apr 13, 2015
    Hi! :D

    I have the same error:
    Script 'Following Pokemon' line 187:Syntax Error occured

    This is the Pokemon follow-script from the first post:



    Next add this as a new Script Section called Following Pokemon. Put it above Main.
    Code:
    #===============================================================================
    # * Credit to Help-14 for both the original scripts and sprites
    # * Change Log:
    #===============================================================================
    
    #===============================================================================
    # * Edited by zingzags
    #===============================================================================
    # * Fixed bugs
    # * Clean ups
    # * Fixed Surf Bug (After Surf is done)
    # * Fixed def talk_to_pokemon while in surf
    # * Fixed Surf Check
    # * Fixed Type Check
    # * Added Door Support
    # * Fixed Hp Bug
    # * Added Pokemon Center Support
    # * Animation problems
    # * Fixed Walk_time_variable problem
    # * Added random item loot
    # * Added egg check
    #===============================================================================
    
    #===============================================================================
    # * Edited by Rayd12smitty
    # * Version 1.0
    #===============================================================================
    # * Fixed Walk_Time_Variable
    # * Fixed crash when talking to Pokemon on a different map than the original
    #   they appeared on
    # * Receiving Items from Pokemon now works
    # * Improved Talk_to_Pokemon wiht more messages and special messages
    # * Added messages for all Status Conditions
    # * Added Party Rotation to switch follower
    # * Made Following Pokemon Toggleable
    # * Added Animation for Pokemon coming out of Pokeball in sprite_refresh
    # * Tidied up script layout and made more user friendly
    # * Fixed Issues with Pokemon jumping around on ledges
    # * Fixed Badge for Surf Typo in the script
    #===============================================================================
    # * Version 1.1
    #===============================================================================
    # * Fixed Surfing so Pokemon doesn't reappear on water when toggled off
    # * Changed Layout and location of Toggle Script
    #===============================================================================
    
    #===============================================================================
    # * Edited by Rayd12smitty and venom12
    # * Version 1.2
    #===============================================================================
    # * Fixed Walk step count so it doesn't add on when Pokemon is toggled off
    # * No longer have to manually set Toggle_Following_Switch and
    #   Following_Activated_Switch whenever "pbPokemonFollow(x)" is called
    # * Now supports Pokemon with multiple forms
    # * Items found on specific maps support
    # * Support for messages when on a map including a word/phrase in its name
    #   rather than a single map
    # * Added stepping animation for follower
    # * Fixed dismount bike so Pokemon reappears
    # * Fixed bike so if it couldn't be used it now can
    # * Few other small bike fixes
    #===============================================================================
    
    #===============================================================================
    # * Version 1.3
    #===============================================================================
    # * Fixed bug with surf where the Follower could block the player from being
    #   able to surf, possibly stranding the player
    # * Added script to animate all events named "Poke"
    # * Increased time to find an item. I realize now that 5000 frames is less than
    #   5 min. Way too short.
    #===============================================================================
    
    #===============================================================================
    # * To Do
    #===============================================================================
    # * When Follower is toggled off remove grass/field animations
    # * Fix up map transfers a bit more
    # * Make NPCs not able to walk over the Follower
    #===============================================================================
    
    
    
    #===============================================================================
    # * Control the following Pokemon
    # * Example:
    #     FollowingMoveRoute([
    #         PBMoveRoute::TurnRight,
    #         PBMoveRoute::Wait,4,
    #         PBMoveRoute::Jump,0,0
    #     ])
    # * The Pokemon turns Right, waits 4 frames, and then jumps
    # * Call pbPokeStep to animate all events on the map named "Poke"
    #===============================================================================
    def FollowingMoveRoute(commands,waitComplete=false)
      $PokemonTemp.dependentEvents.SetMoveRoute(commands,waitComplete)
    end
    def pbPokeStep
      for event in $game_map.events.values
        if event.name=="Poke"               
          pbMoveRoute(event,[PBMoveRoute::StepAnimeOn])
        end
      end
    end
    #===============================================================================
    # * Toggle for Following Pokemon
    #===============================================================================
    def pbToggleFollowingPokemon
      if $game_switches[Following_Activated_Switch]==true
        if $game_switches[Toggle_Following_Switch]==true
          $PokemonTemp.dependentEvents.remove_sprite(true)
          pbWait(1)
          $game_switches[Toggle_Following_Switch]=false
        else
          $FollowingFinishedSurfing = false
          $PokemonTemp.dependentEvents.refresh_sprite
          pbWait(1)
          $game_switches[Toggle_Following_Switch]=true
        end
      end
    end
    
    
    
    class DependentEvents
    #===============================================================================
    # Raises The Current Pokemon's Happiness level +1 per each time the 
    # Walk_time_Variable reachs 5000 then resets to 0
    # ItemWalk, is when the variable reaches a certain amount, that you are able 
    # to talk to your pokemon to recieve an item
    #===============================================================================
      def add_following_time
        $PokemonTemp.dependentEvents.update_stepping
        if $game_switches[Toggle_Following_Switch]==true && $Trainer.party.length>=1
          $game_variables[Walking_Time_Variable]+=1 if $game_variables[Current_Following_Variable]!=$Trainer.party.length
          $game_variables[Walking_Item_Variable]+=1 if $game_variables[Current_Following_Variable]!=$Trainer.party.length
          if $game_variables[Walking_Time_Variable]==5000
            $Trainer.party[0].happiness+=1
            $game_variables[Walking_Time_Variable]=0
          end
          if $game_variables[Walking_Item_Variable]==1000
            if $game_variables[ItemWalk]==15
            else
              $game_variables[ItemWalk]+=1
            end
            $game_variables[Walking_Item_Variable]=0
          end
        end
      end
    #===============================================================================
    # * refresh_sprite
    # * Updates the sprite sprite with an animation
    #===============================================================================
      def refresh_sprite
        if $Trainer.party.length!=$game_variables[Current_Following_Variable]
          if $Trainer.party[0].isShiny?
            shiny=true
          else
            shiny=false
          end
          if $Trainer.party[0].form>0
            form=$Trainer.party[0].form
          else
            form=nil
          end
          if $Trainer.party[0].hp>0 && !$Trainer.party[0].egg?
            events=$PokemonGlobal.dependentEvents
            for i in 0...events.length
              $scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents[i].x,@realEvents[i].y)
              pbWait(10)
            end
            change_sprite($Trainer.party[0].species, shiny, false, form)
          elsif $Trainer.party[0].hp<=0 
            remove_sprite
          end
        end
      end
    #===============================================================================
    # * change_sprite(id, shiny, animation)
    # * Example, to change sprite to shiny lugia with animation:
    #     change_sprite(249, true, true)
    # * If just change sprite:
    #     change_sprite(249)
    #===============================================================================
      def change_sprite(id, shiny=nil, animation=nil, form=nil)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            if shiny==true
              events[i][6]=sprintf("%03ds",id)
              if FileTest.image_exist?("Graphics/Characters/"+events[i][6])
                @realEvents[i].character_name=sprintf("%03ds",id)
              else
                events[i][6]=sprintf("%03d",id)
                @realEvents[i].character_name=sprintf("%03d",id)
              end
            else
              if $Trainer.party[0].form>0
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d_%d",id,$Trainer.party[0].form)
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
              end
            end
          if animation==true
            $scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents[i].x,@realEvents[i].y)
          end
          $game_variables[Walking_Time_Variable]=0
          end
        end
      end
    #===============================================================================
    # * update_stepping
    # * Adds step animation for followers
    #===============================================================================  
      def update_stepping
        FollowingMoveRoute([PBMoveRoute::StepAnimeOn])
      end
    #===============================================================================
    # * remove_sprite(animation)
    # * Example, to remove sprite with animation:
    #     remove_sprite(true)
    # * If just remove sprite:
    #     remove_sprite
    #===============================================================================
      def remove_sprite(animation=nil)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            events[i][6]=sprintf("nil")
            @realEvents[i].character_name=sprintf("nil")
            if animation==true
              $scene.spriteset.addUserAnimation(Animation_Come_In,@realEvents[i].x,@realEvents[i].y)
              pbWait(10)
            end
            $game_variables[Current_Following_Variable]=$Trainer.party[0]
            $game_variables[Walking_Time_Variable]=0
          end
        end
      end
    #===============================================================================
    # * check_surf(animation)
    # * If current Pokemon is a water Pokemon, it is still following.
    # * If current Pokemon is not a water Pokemon, remove sprite.
    # * Require Water_Pokemon_Can_Surf = true to enable
    #===============================================================================
      def check_surf(animation=nil)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            events[i][6]=sprintf("nil")
            @realEvents[i].character_name=sprintf("nil")
          else
            if $Trainer.party[0].hp>0 && !$Trainer.party[0].egg?
              if $Trainer.party[0].hasType?(:WATER)
              else
                remove_sprite
                pbWait(20)
              end
            elsif $Trainer.party[0].hp<=0 
            end
          end
        end
      end
    #===============================================================================
    # * talk_to_pokemon
    # * It will run when you talk to Pokemon following
    #===============================================================================
      def talk_to_pokemon
        e=$Trainer.party[0]
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            pos_x=@realEvents[i].x
            pos_y=@realEvents[i].y
          end
        end
        if e==0
        else
          if e.hp>0 && !$Trainer.party[0].egg?
            if $PokemonGlobal.surfing==true || $PokemonGlobal.bicycle==true
            else
    #===============================================================================
    # * Checks to make sure the Pokemon isn't blocking a surfable water surface
    # * If the water is blocked by the sprite (even though it is invisible) and
    #   the player should be able to surf, calls surf
    #===============================================================================
            terrain=Kernel.pbFacingTerrainTag
            notCliff=$game_map.passable?($game_player.x,$game_player.y,$game_player.direction)
            if pbIsWaterTag?(terrain) || !notCliff
              if !pbGetMetadata($game_map.map_id,MetadataBicycleAlways) && !$PokemonGlobal.surfing
                if $DEBUG
                  $FollowingFinishedSurfing = false
                  Kernel.pbSurf
                elsif (HIDDENMOVESCOUNTBADGES ? $Trainer.numbadges>=BADGEFORSURF : $Trainer.badges[BADGEFORSURF])
                  $FollowingFinishedSurfing = false
                  Kernel.pbSurf
                end
              end
    #===============================================================================
    # * talk_to_pokemon when possible begins here
    #===============================================================================
            elsif e!=6 && $game_switches[Toggle_Following_Switch]==true
              pbPlayCry(e.species)
              random1=rand(7) # random message if no special conditions apply
              mapname=$game_map.name # Get's current map name
    #===============================================================================
    # * Pokemon Messages when Status Condition
    #===============================================================================          
              if e.status==PBStatuses::POISON && e.hp>0 && !e.egg? # Pokemon Poisoned
                $scene.spriteset.addUserAnimation(Emo_Poison, pos_x, pos_y-2)
                pbWait(120)
                Kernel.pbMessage(_INTL("{1} is shivering with the effects of being poisoned.",e.name))
               
              elsif e.status==PBStatuses::BURN && e.hp>0 && !e.egg? # Pokemon Burned
                $scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y-2)
                pbWait(70)
                Kernel.pbMessage(_INTL("{1}'s burn looks painful.",e.name))
                
              elsif e.status==PBStatuses::FROZEN && e.hp>0 && !e.egg? # Pokemon Frozen
                $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                pbWait(100)
                Kernel.pbMessage(_INTL("{1} seems very cold. It's frozen solid!",e.name))
              
              elsif e.status==PBStatuses::SLEEP && e.hp>0 && !e.egg? # Pokemon Asleep
                $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                pbWait(100)
                Kernel.pbMessage(_INTL("{1} seems really tired.",e.name))
                
              elsif e.status==PBStatuses::PARALYSIS && e.hp>0 && !e.egg? # Pokemon Paralyzed
                $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                pbWait(100)
                Kernel.pbMessage(_INTL("{1} is standing still and twitching.",e.name))
    #===============================================================================
    # * Pokemon is holding an item on a Specific Map
    #===============================================================================           
              elsif $game_variables[ItemWalk]==15 and mapname=="Item Map" # Pokemon has item and is on map "Item Map"
                items=[:MASTERBALL,:MASTERBALL] # This array can be edited and extended. Look at the one below for a guide
                random2=0
                loop do
                  random2=rand(items.length)
                  break if hasConst?(PBItems,items[random2])
                end
                Kernel.pbMessage(_INTL("{1} seems to be holding something.",e.name))
                Kernel.pbPokemonFound(getConst(PBItems,items[random2]))
                $game_variables[ItemWalk]=0
    #===============================================================================
    # * Pokemon is holding an item on any other map
    #===============================================================================            
              elsif $game_variables[ItemWalk]==15 # Pokemon has Item
                items=[:POTION,:SUPERPOTION,:FULLRESTORE,:REVIVE,:PPUP,
                     :PPMAX,:RARECANDY,:REPEL,:MAXREPEL,:ESCAPEROPE,
                     :HONEY,:TINYMUSHROOM,:PEARL,:NUGGET,:GREATBALL,
                     :ULTRABALL,:THUNDERSTONE,:MOONSTONE,:SUNSTONE,:DUSKSTONE,
                     :REDAPRICORN,:BLUAPRICORN,:YLWAPRICORN,:GRNAPRICORN,:PNKAPRICORN,
                     :BLKAPRICORN,:WHTAPRICORN
                ]
                random2=0
                loop do
                  random2=rand(items.length)
                  break if hasConst?(PBItems,items[random2])
                end
    
                Kernel.pbMessage(_INTL("{1} seems to be holding something.",e.name))
                Kernel.pbPokemonFound(getConst(PBItems,items[random2]))
                $game_variables[ItemWalk]=0
    #===============================================================================
    # * Examples of Map Specific Messages
    #===============================================================================
              elsif mapname=="Dusk Forest" && e.hasType?(:BUG) # Bug Type in Dusk Forest
                $scene.spriteset.addUserAnimation(Emo_sing, pos_x, pos_y-2)
                pbWait(50)
                random3=rand(3)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} seems highly interested in the trees.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} seems to enjoy the buzzing of the bug Pokémon.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} is jumping around restlessly in the forest.",e.name,$Trainer.name))
                end
              
              elsif mapname=="Old Lab" # In the Old Lab
                $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                pbWait(100)
                random3=rand(3)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} is touching some kind of switch.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} has a cord in its mouth!",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} seems to want to touch the machinery.",e.name,$Trainer.name))
                end  
                
              elsif mapname=="Home" # In the Player's Home
                $scene.spriteset.addUserAnimation(Emo_Happy, pos_x, pos_y-2)
                pbWait(70)
                random3=rand(3)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} is sniffing around the room.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} noticed {2}'s mom is nearby.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} seems to want to settle down at home.",e.name,$Trainer.name))
                end
              elsif mapname.include?("Route") # On any map that includes "Route" in the name
                # Animation goes here
                # Appropriate wait time for animation goes here
                # random3=rand(x)
                # different random messages
    #===============================================================================
    # * Random Messages if none of the above apply
    #===============================================================================            
              elsif random1==0 # Music Note
                $scene.spriteset.addUserAnimation(Emo_sing, pos_x, pos_y-2)
                pbWait(50)
                random3=rand(5)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} seems to want to play with {2}.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} is singing and humming.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} is looking up at the sky.",e.name,$Trainer.name))
                elsif random3==3
                  Kernel.pbMessage(_INTL("{1} swayed and danced around as it pleased.",e.name,$Trainer.name))
                elsif random3==4
                  Kernel.pbMessage(_INTL("{1} is pulling out the grass.",e.name,$Trainer.name))
                end
                
              elsif random1==1 # Hate/Angry Face
                $scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y-2)
                pbWait(70)
                random3=rand(5)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} let out a roar!",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} is making a face like it's angry!",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} seems to be angry for some reason.",e.name,$Trainer.name))
                elsif random3==3
                  Kernel.pbMessage(_INTL("{1} chewed on your feet.",e.name,$Trainer.name))
                elsif random3==4
                  Kernel.pbMessage(_INTL("{1} is trying to be intimidating.",e.name,$Trainer.name))
                end
                
              elsif random1==2 # ... Emoji
                $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                pbWait(100)
                random3=rand(5)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} is looking down steadily.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} is sniffing at the floor.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} is concentrating deeply.",e.name,$Trainer.name))
                elsif random3==3
                  Kernel.pbMessage(_INTL("{1} faced this way and nodded.",e.name,$Trainer.name))
                elsif random3==4
                  Kernel.pbMessage(_INTL("{1} is glaring straight into {2}'s eyes.",e.name,$Trainer.name))
                end
                
              elsif random1==3 # Happy Face
                $scene.spriteset.addUserAnimation(Emo_Happy, pos_x, pos_y-2)
                pbWait(70)
                random3=rand(5)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} began poking you in the stomach.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} looks very happy.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} happily cuddled up to you.",e.name,$Trainer.name))
                elsif random3==3
                  Kernel.pbMessage(_INTL("{1} is so happy that it can't stand still.",e.name,$Trainer.name))
                elsif random3==4
                  Kernel.pbMessage(_INTL("{1} looks like it wants to lead!",e.name,$Trainer.name))
                end
                
              elsif random1==4 # Heart Emoji
                $scene.spriteset.addUserAnimation(Emo_love, pos_x, pos_y-2)
                pbWait(70)
                random3=rand(5)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} suddenly started walking closer.",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("Woah! {1} suddenly hugged {2}.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} is rubbing up against you.",e.name,$Trainer.name))
                elsif random3==3
                  Kernel.pbMessage(_INTL("{1} is keeping close to {2}.",e.name,$Trainer.name))
                elsif random3==4
                  Kernel.pbMessage(_INTL("{1} blushed.",e.name,$Trainer.name))
                end
                
              elsif random1==5 # No Emoji
                random3=rand(5)
                if random3==0
                  Kernel.pbMessage(_INTL("{1} spun around in a circle!",e.name,$Trainer.name))
                elsif random3==1
                  Kernel.pbMessage(_INTL("{1} let our a battle cry.",e.name,$Trainer.name))
                elsif random3==2
                  Kernel.pbMessage(_INTL("{1} is on the lookout!",e.name,$Trainer.name))
                elsif random3==3
                  Kernel.pbMessage(_INTL("{1} is standing patiently.",e.name,$Trainer.name))
                elsif random3==4
                  Kernel.pbMessage(_INTL("{1} is looking around restlessly.",e.name,$Trainer.name))
                end
    #===============================================================================
    # * This random message shows the Pokemon's Happiness Level
    #===============================================================================             
              elsif random1==6 # Check Happiness Level
                if e.happiness>0 && e.happiness<=50
                  $scene.spriteset.addUserAnimation(Emo_Hate, pos_x, pos_y-2)
                  pbWait(70)
                  Kernel.pbMessage(_INTL("{1} hates to travel with {2}.",e.name,$Trainer.name))
                elsif e.happiness>50 && e.happiness<=100
                  $scene.spriteset.addUserAnimation(Emo_Normal, pos_x, pos_y-2)
                  pbWait(100)
                  Kernel.pbMessage(_INTL("{1} is still unsure about  traveling with {2} is a good thing or not.",e.name,$Trainer.name))
                elsif e.happiness>100 && e.happiness<150
                  $scene.spriteset.addUserAnimation(Emo_Happy, pos_x, pos_y-2)
                  Kernel.pbMessage(_INTL("{1} is happy traveling with {2}.",e.name,$Trainer.name))
                elsif e.happiness>=150
                  $scene.spriteset.addUserAnimation(Emo_love, pos_x, pos_y-2)
                  pbWait(70)
                  Kernel.pbMessage(_INTL("{1} loves traveling with {2}.",e.name,$Trainer.name))
                end
              end
            else
            end
          end
        end
      end
    end
    #===============================================================================
    # * Pokemon reapear after using surf
    #===============================================================================
    def Come_back(shiny=nil, animation=nil)
      events=$PokemonGlobal.dependentEvents
      if $game_variables[Current_Following_Variable]==$Trainer.party.length
        remove_sprite(false)
        for i in 0...events.length 
          $scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents[i].x,@realEvents[i].y)
        end
      else
        if $Trainer.party[0].isShiny?
          shiny=true
        else
          shiny=false
        end
        change_sprite($Trainer.party[0].species, shiny, false)
      end
      for i in 0..$Trainer.party.length-1
        if $Trainer.party[i].hp>0 && !$Trainer.party[0].egg?
          $game_variables[Current_Following_Variable]=i
          refresh_sprite
          break
        end
      end
      for i in 0...events.length 
        for i in 0..$Trainer.party.length-1
          if $Trainer.party[i].hp<=0 
            id = $Trainer.party[i].species
          else
            id = $Trainer.party[i].species
          end
        end
        if events[i] && events[i][8]=="Dependent"
          if shiny==true
            events[i][6]=sprintf("%03ds",id)
            if FileTest.image_exist?("Graphics/Characters/"+events[i][6])
              @realEvents[i].character_name=sprintf("%03ds",id)
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
            end
          else
            events[i][6]=sprintf("%03d",id)
            @realEvents[i].character_name=sprintf("%03d",id)
          end
          if animation==true
          else
          end
        end 
      end 
    end
    #===============================================================================
    # * check_faint
    # * If current Pokemon is fainted, removes the sprite
    #===============================================================================
    def check_faint
      if $PokemonGlobal.surfing==true || $PokemonGlobal.bicycle==true
      else
        if $Trainer.party[0].hp<=0 
          $game_variables[Current_Following_Variable]=0 
          remove_sprite
        elsif $Trainer.party[0].hp>0 && !$Trainer.party[0].egg?
        end 
      end
    end
    #===============================================================================
    # * SetMoveRoute
    # * Used in the "Control Following Pokemon" Script listed farther above
    #===============================================================================
    def SetMoveRoute(commands,waitComplete=false)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            pbMoveRoute(@realEvents[i],commands,waitComplete)
          end
        end
      end
    end
    
    
    
    #===============================================================================
    # * Auto add Script to Kernel.pbSurf, It'll check curent Pokemon when surf
    #===============================================================================
    def Kernel.pbSurf
    #  if $game_player.pbHasDependentEvents?
    #    return false
    #  end
      if $DEBUG ||
        (HIDDENMOVESCOUNTBADGES ? $Trainer.numbadges>=BADGEFORSURF : $Trainer.badges[BADGEFORSURF])
        movefinder=Kernel.pbCheckMove(:SURF)
        if $DEBUG || movefinder
          if Kernel.pbConfirmMessage(_INTL("The water is dyed a deep blue...  Would you like to surf?"))
            speciesname=!movefinder ? $Trainer.name : movefinder.name
            Kernel.pbMessage(_INTL("{1} used Surf!",speciesname))
            pbHiddenMoveAnimation(movefinder)
    #        $PokemonTemp.dependentEvents.check_surf
            surfbgm=pbGetMetadata(0,MetadataSurfBGM)
            $PokemonTemp.dependentEvents.check_surf
            if surfbgm
              pbCueBGM(surfbgm,0.5)
            end
            pbStartSurfing()
            return true
          end
        end
      end
      return false
    end
    
    def pbStartSurfing()
      Kernel.pbCancelVehicles
      $PokemonEncounters.clearStepCount
      $PokemonGlobal.surfing=true
      Kernel.pbUpdateVehicle
      Kernel.pbJumpToward
      Kernel.pbUpdateVehicle
      $game_player.check_event_trigger_here([1,2])
    end
    #===============================================================================
    # * Auto add Script to pbEndSurf, It'll show sprite after surf
    #===============================================================================
    def pbEndSurf(xOffset,yOffset)
      return false if !$PokemonGlobal.surfing
      x=$game_player.x
      y=$game_player.y
      currentTag=$game_map.terrain_tag(x,y)
      facingTag=Kernel.pbFacingTerrainTag
      if pbIsSurfableTag?(currentTag)&&!pbIsSurfableTag?(facingTag)
        if Kernel.pbJumpToward
          Kernel.pbCancelVehicles
          $game_map.autoplayAsCue
          $game_player.increase_steps
          result=$game_player.check_event_trigger_here([1,2])
          Kernel.pbOnStepTaken(result)
          $FollowingFinishedSurfing = true
        end
        return true
      end
      return false
    end
    #===============================================================================
    # * Auto add Script to Kernel.pbCanUseHiddenMove, fix HM bug
    #===============================================================================
    def Kernel.pbCanUseHiddenMove?(pkmn,move)
      case move
        when PBMoves::FLY
          if !$DEBUG && !$Trainer.badges[BADGEFORFLY]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
       #  if $game_player.pbHasDependentEvents?
       #    Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
       #    return false
       #  end
          if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true
        when PBMoves::CUT
          if !$DEBUG && !$Trainer.badges[BADGEFORCUT]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          facingEvent=$game_player.pbFacingEvent
          if !facingEvent || facingEvent.name!="Tree"
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true
        when PBMoves::HEADBUTT
          facingEvent=$game_player.pbFacingEvent
          if !facingEvent || facingEvent.name!="HeadbuttTree"
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true
        when PBMoves::SURF
          terrain=Kernel.pbFacingTerrainTag
          if !$DEBUG && !$Trainer.badges[BADGEFORSURF]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          if $PokemonGlobal.surfing
            Kernel.pbMessage(_INTL("You're already surfing."))
            return false
          end
       #   if $game_player.pbHasDependentEvents?
       #      Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
       #      return false
       #   end
          terrain=Kernel.pbFacingTerrainTag
          if pbGetMetadata($game_map.map_id,MetadataBicycleAlways)
            Kernel.pbMessage(_INTL("Let's enjoy cycling!"))
            return false
          end
          if !pbIsWaterTag?(terrain)
            Kernel.pbMessage(_INTL("No surfing here!"))
            return false
          end
          return true
        when PBMoves::STRENGTH
          if !$DEBUG && !$Trainer.badges[BADGEFORSTRENGTH]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          facingEvent=$game_player.pbFacingEvent
          if !facingEvent || facingEvent.name!="Boulder"
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true  
        when PBMoves::ROCKSMASH
          terrain=Kernel.pbFacingTerrainTag
          if !$DEBUG && !$Trainer.badges[BADGEFORROCKSMASH]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          facingEvent=$game_player.pbFacingEvent
          if !facingEvent || facingEvent.name!="Rock"
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true  
        when PBMoves::FLASH
          if !$DEBUG && !$Trainer.badges[BADGEFORFLASH]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          if !pbGetMetadata($game_map.map_id,MetadataDarkMap)
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          if $PokemonGlobal.flashUsed
            Kernel.pbMessage(_INTL("This is in use already."))
            return false
          end
          return true
        when PBMoves::WATERFALL
          if !$DEBUG && !$Trainer.badges[BADGEFORWATERFALL]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          terrain=Kernel.pbFacingTerrainTag
          if terrain!=PBTerrain::Waterfall
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true
        when PBMoves::DIVE
          if !$DEBUG && !$Trainer.badges[BADGEFORDIVE]
            Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
            return false
          end
          if $PokemonGlobal.diving
            return true
          end
          if $game_player.terrain_tag!=PBTerrain::DeepWater
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          if !pbGetMetadata($game_map.map_id,MetadataDiveMap)
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          return true
        when PBMoves::TELEPORT
          if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
       #  if $game_player.pbHasDependentEvents?
       #    Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
       #    return false
       #  end
          healing=$PokemonGlobal.healingSpot
          if !healing
            healing=pbGetMetadata(0,MetadataHome) # Home
          end
          if healing
            mapname=pbGetMapNameFromId(healing[0])
            if Kernel.pbConfirmMessage(_INTL("Want to return to the healing spot used last in {1}?",mapname))
              return true
            end
            return false
          else
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
        when PBMoves::DIG
          escape=pbGetMetadata($game_map.map_id,MetadataEscapePoint)
          if !escape
            Kernel.pbMessage(_INTL("Can't use that here."))
            return false
          end
          if $game_player.pbHasDependentEvents?
            Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
            return false
          end
          mapname=pbGetMapNameFromId(escape[0])
          if Kernel.pbConfirmMessage(_INTL("Want to escape from here and return to {1}?",mapname))
            return true
          end
          return false
        when PBMoves::SWEETSCENT
          return true
        else
          return HiddenMoveHandlers.triggerCanUseMove(move,pkmn)
        end
      return false
    end
    
    
    
    #===============================================================================
    # * Auto add Script to Kernel.pbMountBike
    #===============================================================================
    def Kernel.pbMountBike
      return if $PokemonGlobal.bicycle
      $PokemonGlobal.bicycle=true
      if $game_switches[Toggle_Following_Switch]==true
        $PokemonTemp.dependentEvents.remove_sprite(true)
      end
      Kernel.pbUpdateVehicle
      bikebgm=pbGetMetadata(0,MetadataBicycleBGM)
      if bikebgm
        pbCueBGM(bikebgm,0.5)
      end
    end
    #===============================================================================
    # * Auto add Script to Kernel.pbDismountBike
    #===============================================================================
    def Kernel.pbDismountBike
      return if !$PokemonGlobal.bicycle
      $PokemonGlobal.bicycle=false
      $FollowingFinishedSurfing = true
      Kernel.pbUpdateVehicle
      $game_map.autoplayAsCue
    end
    #===============================================================================
    # * Auto add Script to pbBikeCheck
    #===============================================================================
    def pbBikeCheck
      if $PokemonGlobal.surfing ||
         (!$PokemonGlobal.bicycle && pbGetTerrainTag==PBTerrain::TallGrass)
        Kernel.pbMessage(_INTL("Can't use that here."))
        return false
      end
    #  if $game_player.pbHasDependentEvents?
    #    Kernel.pbMessage(_INTL("It can't be used when you have someone with you."))
    #    return false
    #  end
      if $PokemonGlobal.bicycle
        if pbGetMetadata($game_map.map_id,MetadataBicycleAlways)
          Kernel.pbMessage(_INTL("You can't dismount your Bike here."))
          return false
        end
        return true
      else
        val=pbGetMetadata($game_map.map_id,MetadataBicycle)
        val=pbGetMetadata($game_map.map_id,MetadataOutdoor) if val==nil
        if !val
          Kernel.pbMessage(_INTL("Can't use that here."))
          return false
        end
        return true
      end
    end
    
    
    
    #===============================================================================
    # * Auto add Script to pbTrainerPC
    #===============================================================================
    def pbTrainerPC
      Kernel.pbMessage(_INTL("\\se[computeropen]{1} booted up the PC.",$Trainer.name))
      pbTrainerPCMenu
      pbSEPlay("computerclose")
      $PokemonTemp.dependentEvents.refresh_sprite
    end
    #===============================================================================
    # * Auto add Script to class TrainerPC
    #===============================================================================
    class TrainerPC
      def shouldShow?
        return true
      end
    
      def name
        return _INTL("{1}'s PC",$Trainer.name)
      end
    
      def access
        Kernel.pbMessage(_INTL("\\se[accesspc]Accessed {1}'s PC.",$Trainer.name))
        pbTrainerPCMenu
        $PokemonTemp.dependentEvents.refresh_sprite
      end
    end
    #===============================================================================
    # * Auto add Script to pbPokeCenterPC
    #===============================================================================
    def pbPokeCenterPC
      Kernel.pbMessage(_INTL("\\se[computeropen]{1} booted up the PC.",$Trainer.name))
      loop do
        commands=PokemonPCList.getCommandList()
        command=Kernel.pbMessage(_INTL("Which PC should be accessed?"),
           commands,commands.length)
        if !PokemonPCList.callCommand(command)
          break
        end
      end
      pbSEPlay("computerclose")
      $PokemonTemp.dependentEvents.refresh_sprite
    end
    
    
    
    #===============================================================================
    # * Auto add Script to Events.onStepTakenFieldMovement
    # * Fixed End Surf for Toggle
    # * NEED TO FIX GRASS ANIMATION PROBLEM
    #===============================================================================
    Events.onStepTakenFieldMovement+=proc{|sender,e|
      event=e[0] # Get the event affected by field movement
      currentTag=pbGetTerrainTag(event)
      if pbGetTerrainTag(event,true)==PBTerrain::Grass  # Won't show if under bridge
        $scene.spriteset.addUserAnimation(GRASS_ANIMATION_ID,event.x,event.y)
      elsif event==$game_player && currentTag==PBTerrain::WaterfallCrest
        # Descend waterfall, but only if this event is the player
        Kernel.pbDescendWaterfall(event)
      elsif event==$game_player && currentTag==PBTerrain::Ice && !$PokemonGlobal.sliding
        Kernel.pbSlideOnIce(event)
      end
      if $FollowingFinishedSurfing==true && $game_switches[Toggle_Following_Switch]==true
        $PokemonTemp.dependentEvents.Come_back(true)
        $FollowingFinishedSurfing = false
      end
    }
    
    
    
    #===============================================================================
    # * Start Pokemon Following
    # * x is the Event ID that will become the follower
    #===============================================================================
    def pbPokemonFollow(x)
      Kernel.pbAddDependency2(x, "Dependent", CommonEvent)
      $PokemonTemp.dependentEvents.refresh_sprite
      $game_switches[Following_Activated_Switch]=true
      $game_switches[Toggle_Following_Switch]=true
    end
    Line 187 is

    if events && events[8]=="Dependent"

    here, in this area:

    Code:
    #===============================================================================
    # * change_sprite(id, shiny, animation)
    # * Example, to change sprite to shiny lugia with animation:
    #     change_sprite(249, true, true)
    # * If just change sprite:
    #     change_sprite(249)
    #===============================================================================
      def change_sprite(id, shiny=nil, animation=nil, form=nil)
        events=$PokemonGlobal.dependentEvents
        for i in 0...events.length
          if events[i] && events[i][8]=="Dependent"
            if shiny==true
              events[i][6]=sprintf("%03ds",id)
              if FileTest.image_exist?("Graphics/Characters/"+events[i][6])
                @realEvents[i].character_name=sprintf("%03ds",id)
              else
                events[i][6]=sprintf("%03d",id)
                @realEvents[i].character_name=sprintf("%03d",id)
              end
            else
              if $Trainer.party[0].form>0
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d_%d",id,$Trainer.party[0].form)
            else
              events[i][6]=sprintf("%03d",id)
              @realEvents[i].character_name=sprintf("%03d",id)
              end
            end
          if animation==true
            $scene.spriteset.addUserAnimation(Animation_Come_Out,@realEvents[i].x,@realEvents[i].y)
          end
          $game_variables[Walking_Time_Variable]=0
          end
        end
      end
    I have the scripts installed so as it is in the first post. Do I still get it wrong?


    Kikori


    PS: I use Google Translator, sorry for the bad English... :<


    _________________________________________________

    EDIT:
    Playm has made a fix:

    Den Syntaxfehler habe ich gefunden. In Zeile 100 fehlen beim String hinten die schließenden Anführungszeichen:
    if event.name=="Poke
    wodurch der Ruby-Interpreter denkt, alles folgende bis zu den ersten Anführungszeichen in Zeile 187 wäre ein String (und in dem Fall dürfte direkt "hinter" dem String nicht Dependent stehen, ohne ein Leerzeichen), deswegen wird der Fehler dort angezeigt.

    Dieser Fehler mit den fehlenden Anführungszeichen am Stringende kommt ein paar mal im Skript vor und es fehlen Zeilenumbrüche, ich habe das Skript hier nochmal korrigiert hochgeladen, wenn Du das fehlerhafte Skript einfach bei dir ersetzt, sollte das Originalprojekt starten:

    Google Translator:

    The syntax error I found. In line 100 the string back missing the closing quotation mark:

    if event.name == "Poke

    whereby the Ruby interpreter thinks all that follows up to the first quotation marks in line 187 would be a string (and in the case is expected to directly "behind" the string is not Dependent are, without a space), so the error is displayed there.
    This error with the missing quotation marks at the end of string comes a few times in the script before and there are no line breaks, I have the script here uploaded again corrected if you just replaced the faulty script with you, the original project should start:
    I can not post links, so please compose yourself:
    http: // pastebin. com / prn1npHc
     
    Last edited:
    4
    Posts
    9
    Years
    • Seen Sep 20, 2014
    Hey there, I have just one minor problem [SOLVED]:

    The Pokemon is following the player and everything works fine. The only thing that I don't like is, that the Pokemon still shows a moving animation when the player doesn't move. How can I change that? I want the Pokemon to stand still if the player isn't moving. I tried to look for a line in the script but I couldn't find it.

    To make it clear: I want the step animation turned on when moving and turned off when not moving.

    SOLVED:

    Even without any scripting knowledge I was able to make it work. This is my solution for the people who are interested:

    #===============================================================================
    # * update_stepping
    # * Adds step animation for followers
    #===============================================================================
    def update_stepping
    if $game_player.moving?
    FollowingMoveRoute([PBMoveRoute::StepAnimeOn])
    else FollowingMoveRoute([PBMoveRoute::StepAnimeOff])
    end
    end
     
    Last edited:
    5
    Posts
    9
    Years
    • Seen Apr 13, 2015
    Hi, another question! D:

    Where to adjusts that the large Pokemon can not in houses?

    And where can I set how quickly the Pokemon moves while the player is stopped?
     
    Last edited:
    4
    Posts
    9
    Years
    • Seen Sep 20, 2014
    Hey there! I'm having a problem with using Dig and the Escape Rope. When I want to use Dig I always get this error:

    SOLVED

    Message: uninitialized constant MetadataEscapePoint
    Following Pokemon:829:in `pbCanUseHiddenMove?'
    PokemonParty:1960:in `pbPokemonScreen'
    PokemonParty:1934:in `each'
    PokemonParty:1934:in `pbPokemonScreen'
    PokemonParty:1891:in `loop'
    PokemonParty:2018:in `pbPokemonScreen'
    PokemonPauseMenu:173:in `pbStartPokemonMenu'
    PokemonPauseMenu:172:in `pbFadeOutIn'
    PokemonPauseMenu:172:in `pbStartPokemonMenu'
    PokemonPauseMenu:142:in `loop'
    Exception: RuntimeError

    I checked the line 829 of the FollowingPokemon script and it should be fine:

    when PBMoves::DIG
    escape=pbGetMetadata($game_map.map_id,MetadataEscapePoint)
    if !escape
    Kernel.pbMessage(_INTL("Can't use that here."))
    return false
    end
    if $game_player.pbHasDependentEvents?
    Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
    return false
    end
    mapname=pbGetMapNameFromId(escape[0])
    if Kernel.pbConfirmMessage(_INTL("Want to escape from here and return to {1}?",mapname))
    return true
    end
    return false

    Any suggestions how to fix this?

    For the EscapeRope thing... If I want to use it it says "You can't use that if you have someone with you." and I can't use it therefore. With Dig I guess I could just erase the line in the script but I can't find the line for the EscapeRope. Anyways I am expecting to get the same error as for dig then.

    I am using pbCaveEntrance and pbCaveExit and I also tried using pbSetEscapePoint and pbEraseEscapePoint. I guess it has something to do with the DependentEvent still following me.

    Can someone help me out?

    SOLVED - SOLUTION:
    Just replaced the orange line with
    escape=($PokemonGlobal.escapePoint rescue nil)
    and erased the line
    if $game_player.pbHasDependentEvents?
    Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
    return false
    end

    Now I can use Dig with Follower. The line for the EscapeRope can be found in PokemonItemEffects where I deleted the line for the DependentEvent as well. I don't know if this causes other bugs to occur but for me it worked out.
     
    Last edited:
    14
    Posts
    9
    Years
    • Seen Sep 25, 2023
    I can not post links, so please compose yourself:
    http: // pastebin. com / prn1npHc
    This fixed worked for me, too, when I had a similar error. When I selected-and-copied Pokemon_Followers from the first post, I got errors upon errors. This seems to result from internet browsers or forum software. I assume what Rayd originally typed is not what ends up in my copy clipboard.

    By contrast, selecting-and-copying Kikori's pastebin worked perfectly for me. I'd recommend it to anyone else who has runtime errors that cannot be solved (solely) by the bug fix mentioned at the bottom of the first post.

    In any case, the script is now working for me. This should go without saying, but everyone who helped to make this has my gratitude.
     
    5
    Posts
    9
    Years
    • Seen Apr 13, 2015
    Hey! :)

    I am pleased, my link hat helped- the thanks goes to Playm! ^^

    Has anyone here for an answer to my questions?


    Where to Adjusts did the large Pokemon can not in houses?
    And where can I set how Quickly the Pokemon moves while the player is stopped?
     
    Last edited:
    1,224
    Posts
    10
    Years
  • Hey Ray, I have a decent solution to the crashing thing when you toggle the pokemon on/off.

    Instead of the line you add to PokemonSystem, add this to SceneMap instead, inside the loop

    Code:
    if Input.trigger?(Input::CTRL)# Added Toggle Following Pokemon
          pbWait(1)
          pbToggleFollowingPokemon
        end


    This should prevent crashes from it in general. The only problem I found with it is that if you exit out of a different scene using a function from a mouse module (Luka S. J.'s , for example) and start spamming the control button, the animation sometimes freezes for a second. The pbWait prevents crashes from pressing it when exiting other scenes, and it crashes because it can't find the x,y values of the events just yet.
     

    Rayd12smitty

    Shadow Maker
    645
    Posts
    12
    Years
    • Seen Feb 21, 2016
    Hey Ray, I have a decent solution to the crashing thing when you toggle the pokemon on/off.

    Instead of the line you add to PokemonSystem, add this to SceneMap instead, inside the loop

    Code:
    if Input.trigger?(Input::CTRL)# Added Toggle Following Pokemon
          pbWait(1)
          pbToggleFollowingPokemon
        end


    This should prevent crashes from it in general. The only problem I found with it is that if you exit out of a different scene using a function from a mouse module (Luka S. J.'s , for example) and start spamming the control button, the animation sometimes freezes for a second. The pbWait prevents crashes from pressing it when exiting other scenes, and it crashes because it can't find the x,y values of the events just yet.

    I'm aware, and its been fixed in my game for quite a while. I realized this script causes more problems than it helps though since it isn't super simple to run if you have no scripting knowledge and people get mad that it doesn't work when they messed something up. I am going to do one more update/release with most of these bugs fixed, and then be done with it.
     
    119
    Posts
    10
    Years
  • hey, i was just wondering how i could change it where the pokemon only displays if it like the player or not depending on its happiness without all the other random messages?
     

    ~Angel~

    Lead developer for Pokémon Millennium
    281
    Posts
    14
    Years
  • hey, i was just wondering how i could change it where the pokemon only displays if it like the player or not depending on its happiness without all the other random messages?

    I think there was an update in Pokemon Essentials DS that involved that function, as far as I know, I'm fairly certain it's in there, if you want, go take a look at it. It includes the same code as this one but with additions and fixes. I think that it's like that, not sure though.
     
    6
    Posts
    10
    Years
    • Seen Oct 29, 2014
    When I activate the event. the dependent event plays the animation, keep's repeating the animation, gets stuck in an infinite loop. Game over.

    Things I've already tried:
    Making a set of new events
    Putting all the scripts in again
    Deleting and re-downloading the Animations data file
     
    Last edited:

    Qwertyis666

    Dragon Trainer Since 1996
    60
    Posts
    10
    Years
  • Hi, i got a Syntax error in ''Pokemon Field : Line 2476''
    In this line there is : module PBMoveRoute.
    I change the PB for pb and MoveRoute for moveroute,etc but nothing work.

    Thanks in advance and sorry for my bad english
     
    1,224
    Posts
    10
    Years
  • Hi, i got a Syntax error in ''Pokemon Field : Line 2476''
    In this line there is : module PBMoveRoute.
    I change the PB for pb and MoveRoute for moveroute,etc but nothing work.

    Thanks in advance and sorry for my bad english

    I have a error :

    Script 'Pokemon Following' line 187: SyntaxError occured.

    Pokecommunity's formatting breaks scripts. Use Thread Tools << Show Printable Version and use the scripts from that instead. The text itself is stored correctly, but it's formatting removes certain characters. This really needs to be made known, since I see people having this problem with other scripts all the time.
     

    Qwertyis666

    Dragon Trainer Since 1996
    60
    Posts
    10
    Years
  • Pokecommunity's formatting breaks scripts. Use Thread Tools << Show Printable Version and use the scripts from that instead. The text itself is stored correctly, but it's formatting removes certain characters. This really needs to be made known, since I see people having this problem with other scripts all the time.
    Thanks mej71
    I recopy every scripts with the printable version and everythings work ^^
     
    2
    Posts
    9
    Years
    • Seen Nov 24, 2014
    Never mind this post was about me having problems but I have solved them :) !
     
    Last edited:
    2
    Posts
    9
    Years
    • Seen Nov 24, 2014
    Alright i'm experiencing another problem now well not really a problem but I need some help. Anyways I can get the script to work but only with the start over switch event. So basically I need help on how I could activated this script from the start so like when I choose my starter and or when i'm transferred from the intro into the game.

    Solved the first problem but now don't know if I can do anything about this or not but I can get the script to activate but in order for my Pokemon to follow me I must go in to the party and switch their place with another Pokemon, so then the Pokemon in party slot 1 will follow me and it works good from there on out but can I have them follow me with out doing that ?
    ^ DISREGARD THE ABOVE ^
    SOLVED :D
     
    Last edited:
    119
    Posts
    10
    Years
  • hi, i have an error when i remove all pokemon from my party then use pbToggleFollowingPokemon or $PokemonTemp.dependentEvents.remove_sprite(true)
    to remove the sprite
    you can see a gif of this happening below

    http://gyazo.com/a949b4f6dffb20dd8538056abcdb5b91

    here is the error code
    ---------------------------
    Pokemon Neptune
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 5, map 33 (Pokémon Lab):

    Exception: NoMethodError

    Message: Section159:284:in `talk_to_pokemon'undefined method `hp' for nil:NilClass

    ***Full script:

    $PokemonTemp.dependentEvents.talk_to_pokemon


    Interpreter:243:in `pbExecuteScript'

    (eval):1:in `pbExecuteScript'

    Interpreter:1600:in `eval'

    Interpreter:243:in `pbExecuteScript'

    Interpreter:1600:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Autosave:30:in `updateold'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1600:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Autosave:30:in `updateold'

    Autosave:28:in `loop'

    Autosave:41:in `updateold'

    Unreal Time:151:in `update'



    This exception was logged in

    C:\Users\Matthew\Saved Games/Pokemon Neptune/errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    13
    Posts
    9
    Years
    • Seen Nov 14, 2015
    Hey guys :)
    Implemented everything so far and it works like it should.
    Just wanted to ask if there is a way to make the following pokemon more like an event and not just a sprite. What i mean is that the people in my towns just walk over my pokemon :D
    Ideas?
     
    Back
    Top