Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ╔═════════════════════════════════════╦════════════════════╗
- # ║ Title: Escape Skill ║ Version: 1.00 ║
- # ║ Author: Roninator2 ║ ║
- # ╠═════════════════════════════════════╬════════════════════╣
- # ║ Function: ║ Date Created ║
- # ║ Scene_BattleManager ╠════════════════════╣
- # ║ Process run away skill ║ 01 Nov 2020 ║
- # ╚═════════════════════════════════════╩════════════════════╝
- # ╔══════════════════════════════════════════════════════════╗
- # ║ Specify a skill that will be your escape skill ║
- # ║ Set it to run a common event ║
- # ║ Put the following code into a script command ║
- # ║ ║
- # ║ escape_successfull = ($game_variables[54] >= rand(100)) ║
- # ║ if escape_successfull ║
- # ║ BattleManager.process_grabandrun ║
- # ║ else ║
- # ║ $game_message.add("Failed to run away") ║
- # ║ end ║
- # ║ ║
- # ║ The variable used will determine the chance of escape ║
- # ║ Set the variable to what value you want 0 - 100 ║
- # ║ If successful the party will run away ║
- # ║ and collect exp and gold for any enemies killed. ║
- # ╚══════════════════════════════════════════════════════════╝
- # ╔═════════════════════════════════════╗
- # ║ Terms of use: ║
- # ║ Free for all uses in RPG Maker ║
- # ╚═════════════════════════════════════╝
- module Vocab
- Grabandrun = "%s took what they could get!"
- end
- module BattleManager
- def self.process_grabandrun
- play_battle_end_me
- replay_bgm_and_bgs
- $game_message.add(sprintf(Vocab::Grabandrun, $game_party.name))
- display_exp
- gain_gold
- gain_drop_items
- gain_exp
- SceneManager.return
- battle_end(0)
- return true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement