View Single Post
  #1    
Old September 22nd, 2010, 06:52 PM
help-14's Avatar
help-14
Trainer
 
Join Date: Jul 2007
Location: Viet Nam
Age: 22
Gender: Male
Nature: Adamant
Send a message via Windows Live Messenger to help-14
It is a easy script so i make it public. Remember to give credit :D

How to use ?
- If your tileset picture's name is Johto.png, you can make season tileset with name Spring_Johto.png, Summer_Johto.png, Autumn_Johto.png and Winter_Johto.png.
- If you don't make those season tileset file, the script will use your default tileset: Johto.png.
- Do the same things with the autotiles.


Script
For Pokemon Starter Kit version near 7th May :D
Spoiler:
Code:
#==============================================================================
# ● Pokemon Season Script by Help-14. Remember to give Credit.
#
#   - If your tileset picture's name is Johto.png, you can make season tileset
#       with name Spring_Johto.png, Summer_Johto.png, Autumn_Johto.png 
#       and Winter_Johto.png.
#
#   - If you don't make those season tileset file, the script will use your
#       default tileset: Johto.png.
#==============================================================================

  #----------------------------------------------------------------------------
  #   Tileset
  #----------------------------------------------------------------------------
  
def pbGetTileset(name,hue=0)
    if Time.now.mon==2 or Time.now.mon==3 or Time.now.mon==4
      if File.exists?("Graphics/Tilesets/Spring_"+name)
        return AnimatedBitmap.new("Graphics/Tilesets/Spring_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Tilesets/"+name,hue).deanimate
      end
    elsif Time.now.mon==5 or Time.now.mon==6 or Time.now.mon==7
      if File.exists?("Graphics/Tilesets/Summer_"+name)
        return AnimatedBitmap.new("Graphics/Tilesets/Summer_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Tilesets/"+name,hue).deanimate
      end
    elsif Time.now.mon==8 or Time.now.mon==9 or Time.now.mon==10
      if File.exists?("Graphics/Tilesets/Autumn_"+name)
        return AnimatedBitmap.new("Graphics/Tilesets/Autumn_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Tilesets/"+name,hue).deanimate
      end
    elsif Time.now.mon==11 or Time.now.mon==12 or Time.now.mon==1
      if File.exists?("Graphics/Tilesets/Winter_"+name)
        return AnimatedBitmap.new("Graphics/Tilesets/Winter_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Tilesets/"+name,hue).deanimate
      end
    else
      return AnimatedBitmap.new("Graphics/Tilesets/"+name,hue).deanimate
    end
end

  #----------------------------------------------------------------------------
  #   Autotiles
  #----------------------------------------------------------------------------

def pbGetAutotile(name,hue=0)
    if Time.now.mon==2 or Time.now.mon==3 or Time.now.mon==4
      if File.exists?("Graphics/Autotiles/Spring_"+name)
        return AnimatedBitmap.new("Graphics/Autotiles/Spring_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Autotiles/"+name,hue).deanimate
      end
    elsif Time.now.mon==5 or Time.now.mon==6 or Time.now.mon==7
      if File.exists?("Graphics/Autotiles/Summer_"+name)
        return AnimatedBitmap.new("Graphics/Autotiles/Summer_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Autotiles/"+name,hue).deanimate
      end
    elsif Time.now.mon==8 or Time.now.mon==9 or Time.now.mon==10
      if File.exists?("Graphics/Autotiles/Autumn_"+name)
        return AnimatedBitmap.new("Graphics/Autotiles/Autumn_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Autotiles/"+name,hue).deanimate
      end
    elsif Time.now.mon==11 or Time.now.mon==12 or Time.now.mon==1
      if File.exists?("Graphics/Autotiles/Winter_"+name)
        return AnimatedBitmap.new("Graphics/Autotiles/Winter_"+name,hue).deanimate
      else
        return AnimatedBitmap.new("Graphics/Autotiles/"+name,hue).deanimate
      end
    else
      return AnimatedBitmap.new("Graphics/Autotiles/"+name,hue).deanimate
    end 
end


For Pokemon Starter Kit older version :D
Spoiler:
Code:
#==============================================================================
# ● Pokemon Season Script by Help-14. Remember to give Credit.
#
#   - If your tileset picture's name is Johto.png, you can make season tileset
#       with name Spring_Johto.png, Summer_Johto.png, Autumn_Johto.png 
#       and Winter_Johto.png.
#
#   - If you don't make those season tileset file, the script will use your
#       default tileset: Johto.png.
#==============================================================================

module RPG
  module Cache
    
  #----------------------------------------------------------------------------
  #   Tileset
  #----------------------------------------------------------------------------
  
    def self.tileset(filename)
      if Time.now.mon==2 or Time.now.mon==3 or Time.now.mon==4
        if File.exists?("Graphics/Tilesets/Spring_"+ filename +".png")
          self.load_bitmap("Graphics/Tilesets/Spring_", filename)
        else
          self.load_bitmap("Graphics/Tilesets/", filename)
        end
      elsif Time.now.mon==5 or Time.now.mon==6 or Time.now.mon==7
        if File.exists?("Graphics/Tilesets/Summer_"+ filename +".png")
          self.load_bitmap("Graphics/Tilesets/Summer_", filename)
        else
          self.load_bitmap("Graphics/Tilesets/", filename)
        end
      elsif Time.now.mon==8 or Time.now.mon==9 or Time.now.mon==10
        if File.exists?("Graphics/Tilesets/Autumn_"+ filename +".png")
          self.load_bitmap("Graphics/Tilesets/Autumn_", filename)
        else
          self.load_bitmap("Graphics/Tilesets/", filename)
        end
      elsif Time.now.mon==11 or Time.now.mon==12 or Time.now.mon==1
        if File.exists?("Graphics/Tilesets/Winter_"+ filename +".png")
          self.load_bitmap("Graphics/Tilesets/Winter_", filename)
        else
          self.load_bitmap("Graphics/Tilesets/", filename)
        end
      else
        self.load_bitmap("Graphics/Tilesets/", filename)
      end
    end
    
  #----------------------------------------------------------------------------
  #   Autotiles
  #----------------------------------------------------------------------------

  def self.autotile(filename)
      if Time.now.mon==2 or Time.now.mon==3 or Time.now.mon==4
        if File.exists?("Graphics/Autotiles/Spring_"+ filename +".png")
          self.load_bitmap("Graphics/Autotiles/Spring_", filename)
        else
          self.load_bitmap("Graphics/Autotiles/", filename)
        end
      elsif Time.now.mon==5 or Time.now.mon==6 or Time.now.mon==7
        if File.exists?("Graphics/Autotiles/Summer_"+ filename +".png")
          self.load_bitmap("Graphics/Autotiles/Summer_", filename)
        else
          self.load_bitmap("Graphics/Autotiles/", filename)
        end
      elsif Time.now.mon==8 or Time.now.mon==9 or Time.now.mon==10
        if File.exists?("Graphics/Autotiles/Autumn_"+ filename +".png")
          self.load_bitmap("Graphics/Autotiles/Autumn_", filename)
        else
          self.load_bitmap("Graphics/Autotiles/", filename)
        end
      elsif Time.now.mon==11 or Time.now.mon==12 or Time.now.mon==1
        if File.exists?("Graphics/Autotiles/Winter_"+ filename +".png")
          self.load_bitmap("Graphics/Autotiles/Winter_", filename)
        else
          self.load_bitmap("Graphics/Autotiles/", filename)
        end
      else
        self.load_bitmap("Graphics/Autotiles/", filename)
      end
    end
    
  end
end


If you have an error, try the other script :D

Screenshot example:
Spoiler:




Update: Autotile supported


.
__________________
My Deviantart: help-14.deviantart.com

Last edited by help-14; September 23rd, 2010 at 04:43 PM.
Reply With Quote