[unsolved] item use = crash

Started by TrueCynder, May 31, 2014, 07:52:10 am

Previous topic - Next topic

TrueCynder

Hey there.
The Title says it all realy.

I´m using parts of the Tons of add ons.
To be more exact the additional status conditions.
Now when I try to use an Item I get this error message



Any idea why this happends ? :(

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Tons of Add-ons by Blizzard
# Version: 7.65b
# Type: Add-on Collection Control Script
# Date v7.65b:  11.04.2013
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                                    PART 3
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# VERY IMPORTANT NOTE:
#
#   Tons of Add-ons now has to be used as 3-parts script because of a weird
#   behaviour of RMXP during bug detection. Insert the 3 parts in the correct
#   order and the system should work without problems. Do NOT remove any of the
#   parts, the script NEEDS all 3 parts to work with other systems.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
#                                                                             #
#   ###   ###  #   # #####  #   #### #   # ####   ###  #####  #   ###  #   #  #
#  #   # #   # ##  # #      #  #     #   # #   # #   #   #    #  #   # ##  #  #
#  #     #   # # # # ####   #  #  ## #   # ####  #   #   #    #  #   # # # #  #
#  #   # #   # #  ## #      #  #   # #   # #   # #####   #    #  #   # #  ##  #
#   ###   ###  #   # #      #   ####  ###  #   # #   #   #    #   ###  #   #  #
#                                                                             #
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#

#==============================================================================
# Game_System
#==============================================================================

class Game_System
 
  alias init_tons_of_addons3_later initialize
  def initialize
    init_tons_of_addons3_later
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration 3-2, STATUS EFFECT and SKILL add-ons
#
#   You can enable/disable any add-on here if you wish. Set the value to false
#   to disable it initially. To turn it on/off ingame, just use the Call script
#   command with one of these syntaxes:
#
#     $game_system.NAME_OF_THE_ADDON = true
#     $game_system.NAME_OF_THE_ADDON = false
#
#   where NAME_OF_THE_ADDON is the same variable as the one used below.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    # the STATUS EFFECT add-ons
    @ZOMBIE_STATUS       = true
    @REGEN_STATUS        = true
    @AUTO_REVIVE         = true
    @FURY_STATUS         = true
    @INVINCIBLE_STATUS   = true
    @FROZEN              = true
    @DOOM_STATUS         = true
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration 3-2
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  end
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# I suggest you don't edit anything below this line except for the
# configurations for the add-ons.
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

  attr_accessor :ZOMBIE_STATUS
  attr_accessor :REGEN_STATUS
  attr_accessor :AUTO_REVIVE
  attr_accessor :FURY_STATUS
  attr_accessor :INVINCIBLE_STATUS
  attr_accessor :FROZEN
  attr_accessor :DOOM_STATUS
 
end

#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
#                                                                             #
#  ##### #####  ###  ##### #   # #####    ##### ##### ##### #####  ###  ##### #
#  #       #   #   #   #   #   # #        #     #     #     #     #   #   #   #
#  #####   #   #   #   #   #   # #####    ####  ####  ####  ####  #       #   #
#      #   #   #####   #   #   #     #    #     #     #     #     #   #   #   #
#  #####   #   #   #   #    ###  #####    ##### #     #     #####  ###    #   #
#                                                                             #
#:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Zombie Status Effect by Blizzard
# Version: 1.3b
# Type: Game Experience Improvement
# Date: 26.9.2006
# Date v1.1b: 18.3.2007
# Date v1.2b: 13.11.2007
# Date v1.3b: 19.10.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v1.1b:
#   - working itself without you needing to do anything except the
#     configuration
#   - actual code
#   - works with attacks and items now as well
#
# new in v1.2b:
#   - improved coding
#   - now possible to have more than one zombie status
#
# new in v1.3b:
#   - improved coding
#   - fixed possible problems
#
#
# Configuration:
#
#   ZOMBIE_IDS       - the IDs of the Zombie status effects
#   LIGHT_ELEMENT_ID - the ID of the light element
#   ZOMBIE_POWER     - how much stronger should light attacks be
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

ZOMBIE_IDS = [5]
LIGHT_ELEMENT_ID = 5
ZOMBIE_POWER = 1.5

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
  alias attack_effect_zombie_later attack_effect
  def attack_effect(attacker)
    last_hp = self.hp
    last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
    result = attack_effect_zombie_later(attacker)
    zombie_effect(last_hp, last_sr, attacker) if self.damage.is_a?(Numeric)
    return result
  end
 
  alias skill_effect_zombie_later skill_effect
  def skill_effect(user, skill)
    last_hp = self.hp
    last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
    result = skill_effect_zombie_later(user, skill)
    zombie_effect(last_hp, last_sr, skill) if self.damage.is_a?(Numeric)
    return result
  end
 
  alias item_effect_zombie_later item_effect
  def item_effect(item, battler = nil)
    if $game_system.ACTOR_ITEMS && self.is_a?(Game_Actor)
      return false if !FTSConfigs.item_can_consume?(self.id, item.id)
    end
    last_hp = self.hp
    last_sr = (($crls && self.is_a?(Game_Actor)) ? self.sr : nil)
    if battler == nil
      result = item_effect_zombie_later(item)
    else
      result = item_effect_zombie_later(item, battler)
    end
    zombie_effect(last_hp, last_sr, item) if self.damage.is_a?(Numeric)
    return result
  end
 
  def zombie_effect(last_hp, last_sr, object)
    if $game_system.ZOMBIE_STATUS && ZOMBIE_IDS.any? {|i| @states.include?(i)}
      self.hp = last_hp
      self.hp = self.hp
      self.sr = last_sr if last_sr != nil
      if self.damage.is_a?(Numeric) && self.damage < 0
        self.damage = -self.damage
      end
      if object.element_set.include?(LIGHT_ELEMENT_ID)
        self.damage = (self.damage * ZOMBIE_POWER).to_i
      end
      self.hp -= self.damage
    end
  end
 
end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Regen Status Effect by Blizzard
# Version: 2.0b
# Type: Game Experience Improvement
# Date: 4.5.2006
# Date v1.1b: 12.1.2007
# Date v2.0: 22.10.2007
# Date v2.0b: 13.11.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v1.1b:
#   - fixed glitches, improved code and made it possible to have Regen and
#     Poison at the same time (they nullificate each other on the map, but not
#     in battle)
#
# new in v2.0:
#   - overworked system
#   - added SP Regen effect
#   - added SP Poison effect
#   
# new in v2.0b:
#   - fixed eventual bugs
#   - now possible to have more than one Regen status effect
#   - now beta
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

HP_REGEN_IDS = [6] # add any status effect IDs that will be HP Regen
SP_REGEN_IDS = [6] # add any status effect IDs that will be SP Regen
SP_POISON_IDS = [6] # add any status effect IDs that will be SP Poison

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Party
#==============================================================================

class Game_Party
 
  alias check_map_slip_damage_regen_later check_map_slip_damage
  def check_map_slip_damage
    check_map_slip_damage_regen_later
    if $game_system.REGEN_STATUS
      @actors.each {|actor|
          if actor.hp > 0
            if HP_REGEN_IDS.any? {|i| actor.states.include?(i)}
              actor.hp += [actor.maxhp / 100, 1].max
            end
            if SP_REGEN_IDS.any? {|i| actor.states.include?(i)}
              actor.sp += [actor.maxsp / 100, 1].max
            end
            if SP_POISON_IDS.any? {|i| actor.states.include?(i)}
              actor.sp -= [actor.maxsp / 100, 0].max
            end
          end}
    end
  end
 
end

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler

  alias slip_damage_regen_later? slip_damage?
  def slip_damage?
    if $game_system.REGEN_STATUS && !$scene.is_a?(Scene_Map) &&
        (HP_REGEN_IDS + SP_REGEN_IDS + SP_POISON_IDS).any? {|i| @states.include?(i)}
      return true
    end
    return slip_damage_regen_later?
  end
 
  alias slip_damage_effect_regen_later slip_damage_effect
  def slip_damage_effect
    if $game_system.REGEN_STATUS
      if !(HP_REGEN_IDS.any? {|i| @states.include?(i)}) &&
          slip_damage_regen_later?
        slip_damage_effect_regen_later
      elsif (HP_REGEN_IDS.any? {|i| @states.include?(i)}) &&
          !slip_damage_regen_later?
        dam = -self.maxhp / 10
        if dam.abs > 0
          amp = [dam.abs * 15 / 100, 1].max
          dam -= rand(amp+1) + rand(amp+1) - amp
        end
        self.hp -= dam
        self.damage = 0 if self.damage == nil
        self.damage += dam
      end
      if (SP_REGEN_IDS.any? {|i| @states.include?(i)}) !=
          (SP_POISON_IDS.any? {|i| @states.include?(i)})
        dam = self.maxsp / 10
        if dam > 0
          amp = [dam * 15 / 100, 1].max
          dam += rand(amp+1) + rand(amp+1) + amp
        end
        dam = -dam if SP_REGEN_IDS.any? {|i| @states.include?(i)}
        self.sp -= dam
        self.damage = 0 if self.damage == nil
        self.damage += dam
      end
    else
      slip_damage_effect_regen_later
    end
  end

end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Auto-Revive Status Effect by Blizzard
# Version: 1.25b
# Type: Game Experience Improvement
# Date: 5.6.2006
# Date v1.2b: 14.11.2006
# Date v1.21b: 12.1.2007
# Date v1.22b: 13.11.2007
# Date v1.23b: 19.11.2007
# Date v1.24b: 10.12.2007
# Date v1.25b: 19.10.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v1.2b:
#   - less and better code, much more compatible, easier to use
#
# new in v1.21b:
#   - removed an obsolete constant
#
# new in v1.22b:
#   - now possible to have more than one Auto-Revive status effect
#
# new in v1.23b:
#   - fixed bug where game over would be automatically initiated when in battle
#
# new in v1.24b:
#   - fixed bug due to typing mistake
#
# new in v1.25b:
#   - fixed bug with RTAB
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

AUTO_REVIVE_IDS = [7] # IDs of status effects
REVIVE_ANIMATION_ID = 25 # ID of the Revive animation
REVIVE_TEXT = "Returns" # text displayed
DEAD_ID = 1 # ID of the "dead" status effect

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#==============================================================================
# Game_Party
#==============================================================================

class Game_Party

  alias all_dead_autorevive_later? all_dead?
  def all_dead?
    if $game_system.AUTO_REVIVE && (@actors.any? {|a| AUTO_REVIVE_IDS.any? {|i|
        a.states.include?(i)}})
      return false
    end
    return all_dead_autorevive_later?
  end

end

#==============================================================================
# Sprite
#==============================================================================

class RPG::Sprite
 
  alias damage_regen_later damage
  def damage(damage, critical, type = nil)
    if damage == REVIVE_TEXT
      dispose_damage
      bitmap = Bitmap.new(160, 48)
      bitmap.font.name, bitmap.font.size = '8bitoperator', 25
      bitmap.font.color.set(0, 0, 0)
      bitmap.draw_text_shaded_later(-1, 12-1, 160, 36, REVIVE_TEXT, 1)
      bitmap.draw_text_shaded_later(-1, 12+1, 160, 36, REVIVE_TEXT, 1)
      bitmap.draw_text_shaded_later(1, 12-1, 160, 36, REVIVE_TEXT, 1)
      bitmap.draw_text_shaded_later(1, 12+1, 160, 36, REVIVE_TEXT, 1)
      bitmap.font.color.set(0, 192, 255)
      bitmap.font.size = 32
      bitmap.draw_text_shaded_later(0, 12, 160, 36, REVIVE_TEXT, 1)
      @_damage_sprite = ::Sprite.new(self.viewport)
      @_damage_sprite.bitmap = bitmap
      @_damage_sprite.ox, @_damage_sprite.oy = 80, 20
      @_damage_sprite.x, @_damage_sprite.y = self.x, self.y-self.oy/2
      @_damage_sprite.z, @_damage_duration = 3000, 40
    elsif type != nil
      damage_regen_later(damage, critical, type)
    else
      damage_regen_later(damage, critical)
    end
  end

end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle

  alias judge_autorevive_later judge
  def judge
    if $game_system.AUTO_REVIVE
      flag = false
      $game_party.actors.each {|actor|
          if actor.hp == 0 && AUTO_REVIVE_IDS.any? {|i| actor.states.include?(i)}
            actor.hp += actor.maxhp / 5
            (AUTO_REVIVE_IDS + [DEAD_ID]).each {|i| actor.remove_state(i)}
            actor.animation_id, actor.damage = REVIVE_ANIMATION_ID, REVIVE_TEXT
            actor.damage_pop = flag = true
          end}
      @status_window.refresh if flag
    end
    return judge_autorevive_later
  end

end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Fury Status Effect by Blizzard
# Version: 1.1b
# Type: Game Experience Improvement
# Date: 10.10.2006
# Date 1.1b: 4.7.2008
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 70% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# new in v1.1b:
#   - compatible with Blizz-ABS 1.99 and higher
#
#
# Instructions:
#
# - Explanation:
#
#   This add-on will make specific characters get inflicted with the status
#   effect called "Fury" if another specific character gets killed during battle.
#   Also make the status effect end after the battle is over.
#
# - Configuration:
#
#   Configure your database further below like this template:
#
#     when X then return Y
#
#   X - ID of the dead character
#   Y - ID of the character who will inflicted with Fury.
#   
#   Set FURY_ID to the status effect ID.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

FURY_ID = 4

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG
 
  def self.fury_database(id)
    case id
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Fury Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    when 1 then return 2,3,4,5,6,7,8,9,10,11,12
    when 2 then return 1,3,4,5,6,7,8,9,10,11,12
    when 3 then return 1,2,4,5,6,7,8,9,10,11,12
    when 4 then return 1,2,3,5,6,7,8,9,10,11,12
      #and so on -_-"
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Fury Database
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    else
      return 0
    end
  end
 
  def self.fury_execution
    ids = []
    $game_party.actors.each {|a| ids.push(self.fury_database(a.id)) if a.dead?}
    $game_party.actors.each {|a| a.remove_state(FURY_ID)}
    ids.each {|id|
        if $game_actors[id] != nil && $game_party.actors.include?($game_actors[id])
          $game_actors[id].add_state(FURY_ID) unless $game_actors[id].dead?
        end}
  end
 
end
 
#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias upd_fury_later update
  def update
    BlizzCFG.fury_execution if $game_system.FURY_STATUS
    upd_fury_later
  end
 
end

#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Invincible Status Effect by Blizzard
# Version: 2.0b
# Type: Game Experience Improvement
# Date: 4.12.2006
# Date v2.0b: 13.11.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v2.0b:
#   - overworked for more convenience
#   - added possibility to have more than one Invincible status effect
#   - improved compatbility
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 70% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
#   This add-on will allow having a status effect that makes a character
#   invincible. Add any status effect IDs into INVINCIBLE_IDS.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

INVINCIBLE_IDS = [8]

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler

  alias hp_actor_invincible_later hp=
  def hp=(val)
    if $game_system.INVINCIBLE_STATUS && val < @hp
      return if INVINCIBLE_IDS.any? {|i| @states.include?(i)}
    end
    hp_actor_invincible_later(val)
  end
 
  alias damage_is_invincible_later damage=
  def damage=(val)
    if $game_system.INVINCIBLE_STATUS && val.is_a?(Numeric) && val > 0 &&
        INVINCIBLE_IDS.any? {|i| @states.include?(i)}
      damage_is_invincible_later(0)
    else
      damage_is_invincible_later(val)
    end
  end

end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Frozen Status Effect by Blizzard
# Version: 1.0b
# Type: Game Experience Improvement
# Date: 20.10.2007
# Date v1.0b: 13.11.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v1.0b:
#   - possible to have more than one Frozen Status effect
#   - now beta
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
#   This add-on will allow having a status effect that makes a character die as
#   soon as he get damaged. Set FROZEN_ID to the status effect ID. Keep in mind
#   that the battler who has this status inflicted cannot act, so set it up
#   correctly in your database.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

FROZEN_IDS = [9]

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
  alias hp_actor_frozen_later hp=
  def hp=(val)
    if $game_system.FROZEN && val < @hp && FROZEN_IDS.any? {|i| @states.include?(i)}
      hp_actor_frozen_later(0)
    else
      hp_actor_invincible_later(val)
    end
  end
 
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Doom Status Effect by Blizzard
# Version: 1.0b
# Type: Enhanced Status Effect
# Date: 20.10.2007
# Date v1.0b: 28.10.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Explanation:
#
#   With this add-on you are able to create "Doom" skills. Doom skills inflict
#   a status effect that kills the inflicted character after a defined number
#   of turns. Usually a timer is displayed.
#
# new in v1.0b:
#   - timer appears now when damage is supposed to appear
#   - actors get killed as soon as the counter reaches zero and not as soon
#     they try to act while the counter is zero
#   - actor who killed the last enemy doesn't die
#   - now beta
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 90% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Configuration 
#   
#   DOOM_IDS            - include any IDs of Doom status effects and separate
#                         them with commas (i.e. [24, 25, 26])
#   DOOM_TIMER_VISIBLE  - set it to either true or false whether you want to
#                         display the timer or not
#   DOOM_TIMER_POSITION - set this value to 0 to display it "above" the sprite,
#                         set it to 1 to display it on top of the sprite or set
#                         it to 2 to display it at the center of the sprite
#   
#   You need to create status effects and set up the "Release Conditions".
#   Set the condition "Release at the end of battle" and set the X in "After X
#   turns 100% chance" to the number of turns available for this specific
#   status effect (it is important that the probability is 100%). This way you
#   are able to create more than one Doom Effect, each Doom Effect can have a
#   different countdown starting number. All that is left to do is to create
#   skills that inflict those status effects.
#   
#
# Important note:
#   
#   It is recommended that you make the status effects "Non-resistance" and
#   that you make them cancel each other. Also should the "Death" status effect
#   cancel Doom, otherwise the timer will not disappear. Also, make the status
#   effect wear off after battle for convenience.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

DOOM_IDS = [10]
DOOM_TIMER_VISIBLE = true
DOOM_TIMER_POSITION = 1
DOOM_FONT = '8bitoperator'
DOOM_SIZE = 25

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler
 
  attr_reader :states_turn
 
end

#==============================================================================
# Sprite_Battler
#==============================================================================

class Sprite_Battler
 
  alias upd_doomskill_later update
  def update
    upd_doomskill_later
    return unless @battler && $game_system.DOOM_STATUS && DOOM_TIMER_VISIBLE
    dooms = @battler.states.find_all {|i| DOOM_IDS.include?(i)}
    if dooms != []
      if $scene.is_a?(Scene_Battle) && $scene.phase4_step == 6
        if @doom == nil
          @doom = Sprite.new
          @doom.bitmap = Bitmap.new(48, 48)
          @doom.bitmap.font.name, @doom.bitmap.font.size = DOOM_FONT, DOOM_SIZE
          @doom.x, @doom.z, @doom.ox, @doom.oy = self.x, self.z + 100, 24, 48
          @doom.y = case DOOM_TIMER_POSITION
          when 0 then self.y - self.oy
          when 1 then self.y - self.oy+24
          when 2 then self.y - self.oy/2
          end
        end
        if @turns_left != @battler.states_turn[dooms[0]]
          @turns_left = @battler.states_turn[dooms[0]]
          @doom.bitmap.clear
          if @turns_left == 0 && $game_troop.enemies.any? {|enemy| enemy.exist?}
            @battler.hp = 0
          end
          if $Blizz_Art
            @doom.bitmap.draw_text_full(0, 0, 48, 32, @turns_left.to_s, 1)
          else
            @doom.bitmap.draw_text(0, 0, 48, 32, @turns_left.to_s, 1)
          end
        end
      end
    elsif @doom != nil && $scene.is_a?(Scene_Battle) && $scene.phase4_step == 2
      @doom.dispose
      @doom = nil
    end
  end
 
  alias disp_doomskill_later dispose
  def dispose
    unless @doom == nil || @doom.disposed?
      @doom.dispose
      @doom = nil
    end
    disp_doomskill_later
  end
 
end

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
  attr_reader :phase4_step
 
end

Soulshaker3

May 31, 2014, 09:16:41 am #1 Last Edit: May 31, 2014, 09:24:15 am by soulshaker3
You seem to be missing code your script has about 797 lines roughly and the 3rd part of tons of add ons is 2502 lines.

Edit. if you can upload one demo i can try to see whwat is the problem if that doesn't work
Hellow?

G_G

All three parts of Tons of Add-ons have to be in the game in order for it to work.

TrueCynder

 :O.o: since when ? a few days ago it worked just fine
but okay let me see if that fixes the problem

KK20

No idea how this was working "just fine". ACTOR_ITEMS is defined in Part 2 of Tons. Without it, Part 3 has no idea what ACTOR_ITEMS is and errors.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!