Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ################################################################################
- ################################################################################
- # DatabaseIncreaseSE 1.0 # #
- # By: Ixfuru #
- # 2/26/2012 #
- ################################################################################
- ################################################################################
- ################################################################################
- # #
- # This somewhat pointless little script will play a different SE #
- # whenever the "Change Item", "Change Gold", "Change Weapon", "Change Armor" #
- # and "Change Skills" commands are used to INCREASE the current amount. #
- ################################################################################
- ################################################################################
- # Use this script if you want. Just don't claim you made it. If you use #
- # it, you can send me a link so I can check it out. #
- ################################################################################
- ################################################################################
- # This is the first edition of the script, if you have ideas about #
- # improving it and/or a problem using it, please contact me on the forums #
- # through "The Finish Line" user forum, by PM-ing me, or by leaving a comment #
- # in this topic. #
- ################################################################################
- ################################################################################
- # Thanks to GuyverBane whose CRITICAL SE script was the inspiration #
- # for trying short script. Also, to ModernAlgebra, whose EquipmentSets script #
- # has led me to believe I can vastly improve it. (Which I will do upon further#
- # edumacations. #
- ################################################################################
- # CONFIGURATIONS #
- ################################################################################
- module Dise
- GOLD_SE = "Shop" #SE you want to play when gaining gold
- GSEV = 85 #Volume of SE upon gold gain
- GSEP = 100 #Pitch of SE upon gold gain
- ITEM_SE = "Item1" #SE to play when Item is gained.
- ISEV = 85
- ISEP = 100
- WEAPON_SE = "Sword3" #SE to play when Weapon is gained
- WSEV = 85
- WSEP = 100
- ARMOR_SE = "Close2" #SE to play when Armor is found
- ASEV = 85
- ASEP = 100
- SKILL_SE = "Magic" #SE to play when a Skill is learned via command
- SSEV = 85
- SSEP = 100
- end
- ###############################################################################
- # The following sectin isn't finished. Thus it is commented out. #
- # Probably best to leave it that way until I further #
- # understand RegExp enough to finish it. #
- ###############################################################################
- #~ CUSTOM_SE = ["Key", "Saint1", "Absorb1"]
- #~
- #~ def initialize
- #~ @dbkind = 0
- #~ @custom = check_database
- #~ @custom_se = check_regexp_custom
- #~ end
- #~
- #~ def check_database
- #~ if @dbkind == 1
- #~ dbk = $data_items[id]
- #~ if self.note.scan[dbk](/<custom[[d,\s]+\]/i).include?
- #~ return true
- #~ check_regexp_custom
- #~ end
- #~ elsif @dbkind == 2
- #~ dbk = $data_weapons[id]
- #~ if self.note.scan[dbk](/<custom[[d,\s]+\]/i).include?
- #~ return true
- #~ check_regexp_custom
- #~ end
- #~ elsif @dbkind == 3
- #~ dbk = $data_armors[id]
- #~ if self.note.scan[dbk](/<custom[[d,\s]+\]/i).include?
- #~ return true
- #~ check_regexp_custom
- #~ end
- #~ elsif @dbkind == 4
- #~ dbk = $data_skills[id](/<custom[[d,\s]+\]/i).include?
- #~ return true
- #~ check_regexp_custom
- #~ end
- #~ else
- #~ return false
- #~ end
- #~
- #~ def check_regexp_custom
- #~ if @custom == true
- #~ i = Dise::CUSTOM_SE[id]
- #~ return i
- #~ else
- #~ return 0
- #~ end
- #~ end
- #~
- #~ end
- ################################################################################
- # !!!Edit below with caution!!!
- ################################################################################
- class Game_Interpreter
- alias Ix_Dise_125 command_125
- def command_125
- value = operate_value(@params[0], @params[1], @params[2])
- Audio.se_play('AUDIO/SE/' + Dise::GOLD_SE, Dise::GSEV, Dise::GSEP)
- $game_party.gain_gold(value)
- return true
- end
- alias Ix_Dise_126 command_126
- def command_126
- value = operate_value(@params[1], @params[2], @params[3])
- Audio.se_play('AUDIO/SE/' + Dise::ITEM_SE, Dise::ISEV, Dise::ISEP)
- $game_party.gain_item($data_items[@params[0]], value)
- $game_map.need_refresh = true
- return true
- end
- alias Ix_Dise_127 command_127
- def command_127
- value = operate_value(@params[1], @params[2], @params[3])
- Audio.se_play('AUDIO/SE/' + Dise::WEAPON_SE, Dise::WSEV, Dise::WSEP)
- $game_party.gain_item($data_weapons[@params[0]], value, @params[4])
- return true
- end
- alias Ix_Dise_128 command_128
- def command_128
- value = operate_value(@params[1], @params[2], @params[3])
- Audio.se_play('AUDIO/SE/' + Dise::ARMOR_SE, Dise::ASEV, Dise::ASEP)
- $game_party.gain_item($data_armors[@params[0]], value, @params[4])
- return true
- end
- alias Ix_Dise_318 command_318
- def command_318
- actor = $game_actors[@params[0]]
- if actor != nil
- if @params[1] == 0
- Audio.se_play('AUDIO/SE/' + Dise::SKILL_SE, Dise::SSEV, Dise::SSEP)
- actor.learn_skill(@params[2])
- else
- actor.forget_skill(@params[2])
- end
- end
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment