Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- # V's Item Experience #
- # Version 0.4 #
- # #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Written By: V #
- # Last Edited: January 30, 2013 #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#
- # #
- #==============================================================================#
- #------------------------------------------------------------------------------#
- # ** Disclaimer #
- #------------------------------------------------------------------------------#
- # #
- # This script was intended for Non-commercial use only, if you wish to use #
- # this script in a commercial game please PM me at which ever site you found #
- # this script. Either way please give me credit in your game script as the #
- # writer of this script, and send me a PM abuot the release of the game/demo. #
- # #
- #------------------------------------------------------------------------------#
- # ** How To Use #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # #
- # * Use this tag in an items notebox if you wish to recive exp when using that #
- # item. #
- # <Item_XP: Amount> #
- # <XP_Pot: Amount> #
- # #
- #------------------------------------------------------------------------------#
- # ** Description #
- #------------------------------------------------------------------------------#
- # #
- # v0.1 #
- # ~=~=~=~ #
- # #
- # * This script allows the actor to gain experience for using set items. #
- # #
- # v0.2 #
- # ~=~=~=~ #
- # #
- # * Bugs Fixed. #
- # #
- # v0.3 #
- # ~=~=~=~ #
- # #
- # * Bugs Fixed. #
- # #
- # v0.4 #
- # ~=~=~=~ #
- # #
- # * I added an option to create experience potion too. # #
- # #
- #------------------------------------------------------------------------------#
- #==============================================================================#
- #==============================================================================
- # ** V's Item Experience
- #==============================================================================
- #==============================================================================
- # ** Game_Actor
- #------------------------------------------------------------------------------
- # This class handles actors. It is used within the Game_Actors class
- # ($game_actors) and is also referenced from the Game_Party class ($game_party).
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- # * Aliasing Method: Show Level Up Message
- #--------------------------------------------------------------------------
- alias :gadlu454535344 :display_level_up
- #--------------------------------------------------------------------------
- # * Show Level Up Message
- # new_skills : Array of newly learned skills
- #--------------------------------------------------------------------------
- def display_level_up(new_skills)
- gadlu454535344(new_skills) unless SceneManager.scene_is?(Scene_Battle)
- end
- #--------------------------------------------------------------------------
- # * XP Pot
- #--------------------------------------------------------------------------
- def xp_pot(item)
- note = /<XP_Pot:\s*(\d*)>/i
- item.note.scan(note)
- if $1 && $1 != ""
- item_xp = $1.to_i
- gain_exp(item_xp)
- end
- end
- #--------------------------------------------------------------------------
- # * Gain Item Experience
- #--------------------------------------------------------------------------
- def gain_item_xp(item)
- note = /<Item_XP:\s*(\d*)>/i
- item.note.scan(note)
- if $1 && $1 != ""
- item_xp = $1.to_i
- gain_exp(item_xp)
- end
- end
- end
- #==============================================================================
- # ** Scene_Item
- #------------------------------------------------------------------------------
- # This class performs the item screen processing.
- #==============================================================================
- class Scene_Item < Scene_ItemBase
- #--------------------------------------------------------------------------
- # * Aliasing Method: Use Item
- #--------------------------------------------------------------------------
- alias :siui454343413 :use_item
- #--------------------------------------------------------------------------
- # * Use Item
- #--------------------------------------------------------------------------
- def use_item
- item_target_actors.each { |i| i.xp_pot(item) }
- @actor.gain_item_xp(item)
- siui454343413()
- end
- end
- #==============================================================================
- # ** Scene_Battle
- #------------------------------------------------------------------------------
- # This class performs battle screen processing.
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # * Aliasing Method: Use Item
- #--------------------------------------------------------------------------
- alias :sbui5245245278 :use_item
- #--------------------------------------------------------------------------
- # * Use Skill/Item
- #--------------------------------------------------------------------------
- def use_item
- @target.xp_pot(@subject.current_action.item) unless @target.is_a?(Game_Enemy)
- @subject.gain_item_xp(@subject.current_action.item) unless @subject.is_a?(Game_Enemy)
- sbui5245245278()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment