The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Scripts Database => Topic started by: Falcon on August 26, 2007, 10:31:52 PM

Title: Falcon's Small Scripts
Post by: Falcon on August 26, 2007, 10:31:52 PM
Well, I'll be stealing Modern's idea of posting simple scripts in one topic, so here are my simple scripts.

Spoiler for Experience Boosting Potions:
Demo: http://www.mediafire.com/?6yxlyzyxi43
Paste this above main:
Code: [Select]
#==============================================================================
# Experience Boosting Potions
#------------------------------------------------------------------------------
# By The_Falcon
# Requested by doodley at rmrk.net
#------------------------------------------------------------------------------
# This script should only be found at the following places:
# rmrk.net
# rmrevolution.rmrk.net
# hbgames.org
#==============================================================================
class Game_System
  attr_accessor   :experience_boost      # how much the exp increases
  attr_accessor   :exp_boost_turns       # how many battles the boost will last
  # Alias the initialize method
  alias exp_boost_initialize initialize
  def initialize
    # Use the old method
    exp_boost_initialize
    # Set both new variables
    @experience_boost = 0.0
    @exp_boost_turns = 0
  end
end
Now, replace this in Scene_Battle 2:
Code: [Select]
    # Obtaining EXP
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
With this:
Code: [Select]
    #-----------------------------------------
    # Experience Potion Additions
    #-----------------------------------------
    if $game_system.exp_boost_turns > 0
      exp += Integer(exp * $game_system.experience_boost)
      exp.round
      $game_system.exp_boost_turns -= 1
    end
    # Obtaining EXP
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
Then make common events which the experience potions call. The common events should have the following:
Code: [Select]
$game_system.experience_boost = X
$game_system.exp_boost_turns = Y
Where X is the percent (be sure to have a 0 in front of the percent decimals) and Y is the turns the boost will last.
Free to use in any project, as long as I am credited.
Spoiler for Map BGM carry through battle:
Replace the battle call method with this in Scene_Map. Change the switch to whatever switch you want to trigger then BGM.
Code: [Select]
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    if $game_switches[1] == false
      # Memorize map BGM and stop BGM
      $game_temp.map_bgm = $game_system.playing_bgm
      $game_system.bgm_stop
      # Play battle start SE
      $game_system.se_play($data_system.battle_start_se)
      # Play battle BGM
      $game_system.bgm_play($game_system.battle_bgm)
    else
      # Play battle start SE
      $game_system.se_play($data_system.battle_start_se)
      $game_temp.map_bgm = $game_system.playing_bgm
    end
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
Free to use in any project without giving me credit.
Spoiler for Skill Overwrite System:
To use this, just set a bunch of skills to have the same name, whenever the actor learns one of the skills, the other ones with the same name will be deleted from their skill array.
http://falcon.rmrk.net/skilloverwrite.txt
Free to use in any project, as long as I am credited.
Title: Re: Falcon's Small Scripts
Post by: modern algebra on August 26, 2007, 11:04:06 PM
Thief :P

I like that little script. It's an interesting type of item. It allows for some neat stuff. Good job.
Title: Re: Falcon's Small Scripts
Post by: Falcon on August 26, 2007, 11:15:47 PM
*picks Modern's pocket*

Now....what to do for the next script....
Title: Re: Falcon's Small Scripts
Post by: :) on August 27, 2007, 03:42:22 AM
sweet.  :D
can't wait to see more!

Title: Re: Falcon's Small Scripts
Post by: Falcon on September 14, 2008, 04:18:41 PM
New script up.
Title: Re: Falcon's Small Scripts
Post by: ChaosSpartan28 on September 15, 2008, 12:00:03 AM
Well, I'll be stealing Modern's idea of posting simple scripts in one topic, so here are my simple scripts.


Spoiler for Map BGM carry through battle:
Replace the battle call method with this in Scene_Map. Change the switch to whatever switch you want to trigger then BGM.
Code: [Select]
  #--------------------------------------------------------------------------
  # * Battle Call
  #--------------------------------------------------------------------------
  def call_battle
    # Clear battle calling flag
    $game_temp.battle_calling = false
    # Clear menu calling flag
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    # Make encounter count
    $game_player.make_encounter_count
    if $game_switches[1] == false
      # Memorize map BGM and stop BGM
      $game_temp.map_bgm = $game_system.playing_bgm
      $game_system.bgm_stop
      # Play battle start SE
      $game_system.se_play($data_system.battle_start_se)
      # Play battle BGM
      $game_system.bgm_play($game_system.battle_bgm)
    else
      # Play battle start SE
      $game_system.se_play($data_system.battle_start_se)
      $game_temp.map_bgm = $game_system.playing_bgm
    end
    # Straighten player position
    $game_player.straighten
    # Switch to battle screen
    $scene = Scene_Battle.new
  end
Free to use in any project without giving me credit.



Nice. I think I requested something like this either last year or sometime around january but no one could figure it out.
When you say "carry through" do you mean that the Map BGM will play through the fight as well or it will pick-up where it left off before the fight.

Either way, thanks Falcon. I needed this for a game I am working on for my senior project at school.
Title: Re: Falcon's Small Scripts
Post by: Falcon on September 15, 2008, 12:08:37 AM
Pick-up where it left is not possible. If Blizzard couldn't do it, there's no way no one else would.
Title: Re: Falcon's Small Scripts
Post by: ChaosSpartan28 on September 18, 2008, 02:36:17 AM
Pick-up where it left is not possible. If Blizzard couldn't do it, there's no way no one else would.

...appearantly, it is now.

http://www.hbgames.org/forums/index.php?topic=55486.0
Title: Re: Falcon's Small Scripts
Post by: Falcon on September 18, 2008, 03:20:17 AM
Yeah, someone posted that like, the day I said that, lol.
Title: Re: Falcon's Small Scripts
Post by: tSwitch on September 18, 2008, 11:36:53 AM
Irony

edit: doesn't RMXP already support .ogg files?
nvm, fancy looping
Title: Re: Falcon's Small Scripts
Post by: Falcon on October 04, 2008, 02:41:05 PM
New Script.
Title: The years bread-winner, naprosyn generic curative: fractures?
Post by: odomajiwuqi on August 23, 2019, 06:42:35 PM
Dysuria, jep.bsaz.rmrk.net.upt.pf visualized naprosyn (http://antonioscollegestation.com/naprosyn/) what is lasix for heartworms (http://vintagepowderpuff.com/lasix/) viagra pharmacy canada (http://puresportsnetwork.com/pharmacy/) cialis without prescription (http://vowsbridalandformals.com/cialis-20mg/) antivert (http://disasterlesskerala.org/antivert/) call originate single-gene <a href="http://antonioscollegestation.com/naprosyn/">naprosyn without a prescription</a> <a href="http://vintagepowderpuff.com/lasix/">price of furosemide</a> <a href="http://puresportsnetwork.com/pharmacy/">online pharmacy</a> <a href="http://vowsbridalandformals.com/cialis-20mg/">buy cialis uk</a> <a href="http://disasterlesskerala.org/antivert/">buy antivert</a> cancel streptococcus intact: http://antonioscollegestation.com/naprosyn/ naprosyn without a prescription http://vintagepowderpuff.com/lasix/ lasix http://puresportsnetwork.com/pharmacy/ canadian pharmacy cialis http://vowsbridalandformals.com/cialis-20mg/ cialis 20mg http://disasterlesskerala.org/antivert/ antivert pills velocity microvasculature.