Scripts & Tutorials 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.

Reply
 
Thread Tools
  #1    
Old February 27th, 2016 (11:16 AM).
desbrina's Avatar
desbrina desbrina is offline
Lightning Yellow Creator
     
    Join Date: Feb 2011
    Location: UK
    Gender: Female
    Nature: Quiet
    Posts: 681
    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
    __________________
    Creator of


    A Pokemon Yellow remake, using HGSS Tiles, and the ability to obtain all Kanto Pokemon as well as their previous/later evolutions.

    Reply With Quote

    Relevant Advertising!

    Reply
    Quick Reply

    Sponsored Links
    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 11:17 AM.