Kain Nobel
Member
Lucky 7777 Damage
Version: 2.5
By: Kain Nobel
Introduction
If you remember, in Final Fantasy VII if one of your characters had 7777 current HP then they'd constantly do 7777 damage? Thats what this does...
Features
Screenshots
Script
Instructions
Paste this script below the SDK and above main and you should be good to go, it has an easy to customize module which is pretty self explanitory.
Terms and Conditions
Free to use in commercial and non-commercial projects so long as you don't forget to credit yours truely.
Version: 2.5
By: Kain Nobel
Introduction
If you remember, in Final Fantasy VII if one of your characters had 7777 current HP then they'd constantly do 7777 damage? Thats what this does...
Features
- Deal 7777 damage if your current HP is 7777
- Ability to determine which actors execute 7777 special (New)
- Ability to determine which enemies execute 7777 special (New)
- Ability to customize the damage display font
- Ability to customize the damage display colors
- Ability to customize the damage display message
Screenshots

Script
Code:
#===============================================================================
# ** Battle : Lucky 7777 Damage
#===============================================================================
Â
#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
SDK.log('Battle.Lucky7777Damage', 'Kain Nobel ©', 3.5, '2009.06.17')
#-------------------------------------------------------------------------------
# * SDK Enabled Test : BEGIN
#-------------------------------------------------------------------------------
if SDK.enabled?('Battle.Lucky7777Damage')
Â
#===============================================================================
# ** Lucky7777s
#===============================================================================
Â
module Lucky7777
 #-----------------------------------------------------------------------------
 # * Is an Actor allowed to execute 7777 damage?
 #-----------------------------------------------------------------------------
 Actor_Execute = Hash.new
 Actor_Execute.default = true
 #-----------------------------------------------------------------------------
 # * Is an Enemy allowed to execute 7777 damage?
 #-----------------------------------------------------------------------------
 Enemy_Execute = Hash.new
 Enemy_Execute.default = true
 #-----------------------------------------------------------------------------
 # * Font Type used to display Lucky 7777 damage
 #-----------------------------------------------------------------------------
 DamageFontName = "Arial Black"
 #-----------------------------------------------------------------------------
 # * Font Size used to display Lucky 7777 damage
 #-----------------------------------------------------------------------------
 DamageFontSize = 32
 #-----------------------------------------------------------------------------
 # * Damage String (word) used to represent Lucky 7777 damage
 #-----------------------------------------------------------------------------
 DamageString = "Lucky!"
 #-----------------------------------------------------------------------------
 # * Background Color for Lucky 7777 damage display
 #-----------------------------------------------------------------------------
 DamageColorA = Color.new(0, 160, 0)
 #-----------------------------------------------------------------------------
 # * Foreground Color for Lucky 7777 damage display
 #-----------------------------------------------------------------------------
 DamageColorB = Color.new(255, 255, 0)
end
Â
#===============================================================================
# ** Game_Battler
#===============================================================================
Â
class Game_Battler
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :lucky7s_gmbtlr_atkeff,     :attack_effect
 alias_method :lucky7s_gmbtlr_atkeffdamage,  :attack_effect_damage
 #-----------------------------------------------------------------------------
 # * Attack Effect
 #-----------------------------------------------------------------------------
 def attack_effect(attacker)
  @offense = attacker
  lucky7s_gmbtlr_atkeff(attacker)
 end
 #-----------------------------------------------------------------------------
 # * Attack Effect Critical Correction
 #-----------------------------------------------------------------------------
 def attack_effect_damage
  if @offense.execute_7777?
   self.critical = 7777
   self.damage = 7777
  end
  lucky7s_gmbtlr_atkeffdamage
 end
end
Â
#===============================================================================
# ** Game_Actor
#===============================================================================
Â
class Game_Actor < Game_Battler
 #-----------------------------------------------------------------------------
 # * Execute 7777 ?
 #-----------------------------------------------------------------------------
 def execute_7777?
  Lucky7777::Actor_Execute[id] && self.hp == 7777
 end
end
Â
#===============================================================================
# ** Game_Enemy
#===============================================================================
Â
class Game_Enemy < Game_Battler
 #-----------------------------------------------------------------------------
 # * Execute 7777 ?
 #-----------------------------------------------------------------------------
 def execute_7777?
  Lucky7777::Enemy_Execute[id] && self.hp == 7777
 end
end
Â
#===============================================================================
# ** RPG::Sprite
#===============================================================================
Â
class RPG::Sprite < ::Sprite
 #-----------------------------------------------------------------------------
 # * Alias Listings
 #-----------------------------------------------------------------------------
 alias_method :lucky7s_rpgsprite_damage, :damage
 #-----------------------------------------------------------------------------
 # * Damage
 #-----------------------------------------------------------------------------
 def damage(value, critical)
  if critical != 7777
   lucky7s_rpgsprite_damage(value, critical)
   return
  end
  dispose_damage
  bitmap = Bitmap.new(160, 96)
  if value.is_a?(Numeric)
   damage_value = value.abs.to_s + 's'
  else
   damage_value = value.to_s + 's'
  end
  bitmap.font.name = Lucky7777::DamageFontName
  bitmap.font.size = Lucky7777::DamageFontSize
  bitmap.font.color = Lucky7777::DamageColorA
  bitmap.draw_text(-1, 12-1, 160, 36, Lucky7777::DamageString, 1)
  bitmap.draw_text(+1, 12-1, 160, 36, Lucky7777::DamageString, 1)
  bitmap.draw_text(-1, 12+1, 160, 36, Lucky7777::DamageString, 1)
  bitmap.draw_text(+1, 12+1, 160, 36, Lucky7777::DamageString, 1)
  bitmap.draw_text(-1, 32-1, 160, 36, damage_value, 1)
  bitmap.draw_text(+1, 32-1, 160, 36, damage_value, 1)
  bitmap.draw_text(-1, 32+1, 160, 36, damage_value, 1)
  bitmap.draw_text(+1, 32+1, 160, 36, damage_value, 1)
  bitmap.font.color = Lucky7777::DamageColorB
  bitmap.draw_text(0, 12, 160, 36, Lucky7777::DamageString, 1)
  bitmap.draw_text(0, 32, 160, 36, damage_value, 1)
  @_damage_sprite = ::Sprite.new(self.viewport)
  @_damage_sprite.bitmap = bitmap
  @_damage_sprite.ox = 80
  @_damage_sprite.oy = 20
  @_damage_sprite.x = self.x
  @_damage_sprite.y = self.y - self.oy / 2
  @_damage_sprite.z = 10000
  @_damage_duration = 40
 end
end
Â
#-------------------------------------------------------------------------------
# * SDK Enabled Test : END
#-------------------------------------------------------------------------------
end
If you don't use SDK, replace the entire Game_Battler class in the script above, and replace it with this...
Also, you'll need to delete the SDK.log, SDK.enabled? test and the last end in the script.
Code:
#===============================================================================
# ** Game_Battler
#===============================================================================
Â
class Game_Battler
 #-----------------------------------------------------------------------------
 # * Attack Effect
 #-----------------------------------------------------------------------------
 def attack_effect(attacker)
  self.critical = false
  hit_result = (rand(100) < attacker.hit)
  if hit_result == true
   atk = [attacker.atk - self.pdef / 2, 0].max
   self.damage = atk * (20 + attacker.str) / 20
   self.damage *= elements_correct(attacker.element_set)
   self.damage /= 100
   if self.damage > 0
    if rand(100) < 4 * attacker.dex / self.agi
     self.damage *= 2
     self.critical = true
    end
    if self.guarding?
     self.damage /= 2
    end
   end
   if self.damage.abs > 0
    amp = [self.damage.abs * 15 / 100, 1].max
    self.damage += rand(amp+1) + rand(amp+1) - amp
   end
   eva = 8 * self.agi / attacker.dex + self.eva
   hit = self.damage < 0 ? 100 : 100 - eva
   hit = self.cant_evade? ? 100 : hit
   hit_result = (rand(100) < hit)
  end
  if hit_result == true
   #### 7777 Damage Addition : BEGIN ###
   if @offense.execute_7777?
    self.critical = 7777
    self.damage = 7777
   end
   #### 7777 Damage Addition : END ####
   remove_states_shock
   self.hp -= self.damage
   @state_changed = false
   states_plus(attacker.plus_state_set)
   states_minus(attacker.minus_state_set)
  else
   self.damage = "Miss"
   self.critical = false
  end
  return true
 end
end
Also, you'll need to delete the SDK.log, SDK.enabled? test and the last end in the script.
Instructions
Paste this script below the SDK and above main and you should be good to go, it has an easy to customize module which is pretty self explanitory.
Terms and Conditions
Free to use in commercial and non-commercial projects so long as you don't forget to credit yours truely.