The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Scripts & Tutorials
Reload this Page Essentials Script Safari Rest Houses
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


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: 628
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 12:34 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.