Admit it, there are times when you wish that you could simply bribe your foes during battle.
Well, now you can do it!
Oh and it is also possible to get an estimate of how much it might cost you!
By the way, it is not a Plug & Play script because you can customize several things like where to show the currency symbol, etc. So do not forget to check out the KBribe module, guys!
The Script
Code:
# * KBribe XP
# Scripter : Kyonides Arkanthes
# v1.0.0 - 2022-07-14
# * Non Plug & Play Script * #
# Now you can bribe your foes during battles!
# You can learn how much it might cost the party to bribe a given foe.
# Just check out the skill description to find it out. ;)
# It is also possible to exclude certain monsters like bosses if needed.
# In the KBribe module you can find several CONSTANTS where you can set the
# initial values for the hit rate, damage percent, etc.
# * Script Calls * #
# $game_party.bribe_hit = Percent
# $game_party.bribe_gold_percent = Percent
# $game_party.bribe_dmg_percent = Percent
# $game_party.bribe_gold_min = Coins
# $game_party.bribe_show_dmg_pop = true or false
module KBribe
SKILL_ID = 81
# Bribing Hero's Failure Animation
ANIMATION_ID = 101
START_HIT_RATE = 33
START_GOLD_PERCENT = 5
FAILURE_DMG_PERCENT = 25
GOLD_MIN = 50
SHOW_DMG_POP_UP = true
CURRENCY_SYMBOL_FIRST = false
SKILL_COST_TEXT = "Est. Cost: "
SUCCESS_LABEL = "Bribed"
# Add as many MonsterID's as needed
EXCLUDE_BOSSES = []
extend self
@battlers = []
@escaped = []
def add(battler, do_escape)
@battlers << battler
@escaped << do_escape
end
def battlers_reaction
@battlers.each do |btlr|
btlr.animation_id = ANIMATION_ID
btlr.animation_hit = true
end
end
def hurt!
@battlers.size.times do |n|
btlr = @battlers[n]
btlr.damage_pop = $game_party.bribe_show_dmg_pop
btlr.escape if @escaped[n]
end
@battlers.clear
@escaped.clear
end
def skill_description
text = " " + KBribe::SKILL_COST_TEXT
if CURRENCY_SYMBOL_FIRST
text += $data_system.words.gold + @amount.to_s
else
text += @amount.to_s + $data_system.words.gold
end
end
def set_bribe_estimate() @amount = $game_party.calculate_bribe end
def exclude?(mob_id) !EXCLUDE_BOSSES.include?(mob_id) end