Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # * [ACE] Tool Variable Usage for Falcao's Pearl ABS Liquid v3
- #===============================================================================
- # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
- # * Version: 1.0
- # * Updated: 06/01/2016
- # * Requires: Falcao's Pearl ABS Liquid v3
- #-------------------------------------------------------------------------------
- # * < Change Log >
- #-------------------------------------------------------------------------------
- # * Version 1.0 (06/01/2016)
- # - Initial release.
- #-------------------------------------------------------------------------------
- # * < Description >
- #-------------------------------------------------------------------------------
- # * This script lets you make tools which "use" game variables instead of
- # MP, TP or other items.
- #-------------------------------------------------------------------------------
- # * < Note-tags >
- #-------------------------------------------------------------------------------
- # * To assign a variable requirement for a tool, use this note-tag:
- #
- # <var req: variable_id>
- #
- # Replace 'variable_id' with the ID of the variable the tool will "use".
- # A tool with this note-tag will display the amount of the assigned variable
- # currently has on the toolbar.
- # The tool will automatically decrease the value of the assigned variable
- # by 1 upon usage!
- #-------------------------------------------------------------------------------
- # * < Installation >
- #-------------------------------------------------------------------------------
- # * Place this scipt below the last script from Falcao's Pearl ABS Liquid v3
- # script series but above Main!
- # * If you are using my Toolbar Addon for Falcao's ABS script, you must put
- # this one below that one!
- #-------------------------------------------------------------------------------
- # * < Compatibility Info >
- #-------------------------------------------------------------------------------
- # * No known incompatibilities.
- #-------------------------------------------------------------------------------
- # * < Known Issues >
- #-------------------------------------------------------------------------------
- # * No known issues.
- #-------------------------------------------------------------------------------
- # * < Terms of Use >
- #-------------------------------------------------------------------------------
- # * Free to use for whatever purposes you want.
- # * Credit me (Sixth) in your game, pretty please! :P
- # * Posting modified versions of this script is allowed as long as you notice me
- # about it with a link to it!
- #===============================================================================
- $imported = {} if $imported.nil?
- $imported["SixthABSToolVariables"] = true
- #===============================================================================
- # No settings! O.o
- #===============================================================================
- class RPG::BaseItem
- attr_accessor :var_req
- def var_req
- init_var_req if @var_req.nil?
- return @var_req
- end
- def init_var_req
- @var_req = 0
- @var_req = $1.to_i if @note =~ /<var req: (\d+)>/i
- end
- end
- class Game_CharacterBase
- alias set_var_req7753 load_abs_tool
- def load_abs_tool(item)
- set_var_req7753(item)
- if battler.is_a?(Game_Actor) && item
- if item.var_req != 0 && $game_variables[item.var_req] > 0
- $game_variables[item.var_req] -= 1
- end
- end
- end
- end
- class Game_BattlerBase
- alias add_var_reqs7753 usable?
- def usable?(item)
- if item && item.var_req != 0
- return false if $game_variables[item.var_req] <= 0
- end
- add_var_reqs7753(item)
- end
- end
- class Sprite_PearlTool < Sprite
- alias add_var_check8873 ammo_ready?
- def ammo_ready?(item)
- if item && item.var_req != 0
- return true
- end
- add_var_check8873(item)
- end
- alias add_var_display8832 itemcost
- def itemcost(item)
- if item && item.var_req != 0
- return $game_variables[item.var_req]
- end
- add_var_display8832(item)
- end
- end
- #==============================================================================
- # !!END OF SCRIPT - OHH, NOES!!
- #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement