[RMXP] Help with "Escape Enabling Spells by LilBrudder917"

Started by bnecitizen, April 10, 2013, 11:09:37 pm

Previous topic - Next topic

bnecitizen

RMXP

Hi, Can someone please help me out.
I'm trying to create an escape skill for an enemy, I have found this script but once I configure it, I get an error message.

Error:
Script 'Escape Enabling Spells' line68: ArgumentError occurred.
wrong number of arguments (0 for 4)


This happened when I adjusted the: '#Chance' and '#OutOf'

Is there any support for this script that could offer help?

Find original post here: http://forum.chaos-project.com/index.php?topic=5769.0

Find My Code Edit Below:

#==============================================================================#
#                Escape Enabling Spells by LilBrudder917                       #
#                             v1.1 | 3-6-10                                    #
#==============================================================================#
# What it Does:                                                                #
#     +Allows player to use Skills that allow them to activate the             #
#      -Escape option.                                                         #
#                                                                              #
# Features:                                                                    #
#  + Multiple Escaping Skills                                                  #
#  + Sound to be played if you can Escape                                      #
#  + Sound to be played if you can't Escape                                    #
#  + Can change Chances of Activating                                          #
#  + Can use a Switch to disable Escape Attempts                               #
#                                                                              #
# Possibilities for an Update:                                                 #
#  + Different Skills can have Different Chances                               #
#                                                                              #
# Version History:                                                             #
#  + 1.1 : Uses 2 less Global Variables.                                       #
#==============================================================================#
module Escaping_Skills
#------------------------------------------------------------------------------#
#                              Configuration                                   #
#------------------------------------------------------------------------------#
ESCAPE_SKILLS = 1
Escape_Sound   = "!Escape Battle"
NoEscape_Sound = "045-Push01"
NoEscapeSwitch = 100
Chance = 100
OutOf = 90
#------------------------------------------------------------------------------#
# Script Below : Don't Touch Unless you know what You're Doing                 #
#------------------------------------------------------------------------------#
end

class Scene_Battle

  alias start_escaping main
  def main
    start_escaping
    @ESCAPED = 0
  end

  alias escape_skill make_skill_action_result
  def make_skill_action_result
    escape_skill
      if @active_battler.current_action.skill_id = Escaping_Skills::ESCAPE_SKILLS
        if !$game_switches[Escaping_Skills::NoEscapeSwitch]
          @ESCAPED = rand(Escaping_Skills::Chance)       
          if @ESCAPED <= Escaping_Skills::OutOf
            Audio.se_play("Audio/SE/"+Escaping_Skills::NoEscape_Sound, 100, 100)
            $game_temp.battle_can_escape = false
            @party_command_window = Window_PartyCommand.new
          else
            Audio.se_play("Audio/SE/"+Escaping_Skills::Escape_Sound, 100, 100)
            $game_temp.battle_can_escape = true
            @party_command_window = Window_PartyCommand.new
          end
        end
      end
    end
  end
 
class Window_PartyCommand < Window_Selectable
  alias escape_fix initialize
  def initialize
    escape_fix
    if $game_temp.battle_can_escape
    draw_item(1, normal_color)
    end
  end
end


Zexion


bnecitizen

Thats true!
The original number from Script Writer was:

Quote
#Chance = 100
#OutOf = 50


Very strange indeed.
I have tried changing numbers like #Chance = 100 #OutOf = 100
Still no luck  >:(

KK20

That error is pointing to the line escape_fix, yes? I've tried your edit and I didn't get that error. Are you using any other scripts, perhaps one that modifies class Window_PartyCommand?

But looking at the script as a whole, and reading the original post, I can tell this guy was at the infancy of programming. There are a number of bad syntax throughout the script to where it doesn't work as it says it should.

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!

bnecitizen

Hi, thank you for your speedy reply, and the info about the quality of the script.
Yes I had SDK2.3, as soon as i took it out, the script allowed me to play, but the the Escape Skill Script didn't work, the enemy just keeps on "miss' ing.
Maybe I shouldn't use the script then... I'm trying to make a Cactuar style opponent that runs away, but still run battle results after he disappears. Aborting the battle just stops the battle totally. Is there any other way?

Thanks :)

KK20

Is there any reason why you can't use the built-in 'Escape' action for the enemy?

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!

bnecitizen

OH MY GOD! You are amazing. Totally didn't know that was inbuilt there :) Hahaha how dumb of me. THANK A HEAP!!!