• 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.

Safari Rest Houses

772
Posts
13
Years
    • UK
    • Seen May 7, 2024
    I noticed that while in houses in the safari zone it either cancelled the safari if you had safari set to false, or still counted down steps if it was set to true. This adds a new metadata for safarimaprest which keeps the safari running but stops the step count down

    In MiscData under
    Code:
    MetadataMapSize             = 18
    add
    Code:
    MetadataSafariMapRest       = 19

    under
    Code:
    "MapSize"=>[MetadataMapSize,"us"],
    add
    Code:
    "SafariMapRest"=>[MetadataSafariMapRest,"b"],

    In PBattle_Safari under the final end of
    Code:
    def pbInSafari?
    add the following function
    Code:
    def pbInSafariRest?
      if pbSafariState.inProgress?
        if pbGetMetadata($game_map.map_id,MetadataSafariMapRest)
          return true
        end
      end
      return false
    end

    and then replace the function
    Code:
    Events.onStepTakenTransferPossible+=proc {|sender,e|
    with
    Code:
    Events.onStepTakenTransferPossible+=proc {|sender,e|
       handled=e[0]
       next if handled[0]
       if pbInSafari? && pbSafariState.decision==0 && SAFARISTEPS>0
         if !pbInSafariRest?
           pbSafariState.steps-=1
           if pbSafariState.steps<=0
             Kernel.pbMessage(_INTL("PA:  Ding-dong!\1")) 
             Kernel.pbMessage(_INTL("PA:  Your safari game is over!"))
             pbSafariState.decision=1
             pbSafariState.pbGoToStart
             handled[0]=true
           end
         end
       end
    }

    The in the metadata file add the following to the map informaiton

    Code:
    SafariMap=true
    SafariMapRest=true
     
    Back
    Top