battle dome help thread

Started by nathmatt, April 17, 2009, 06:18:00 pm

Previous topic - Next topic

nathmatt

the problem is it doesn't want to read the \e it reads the variable
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


nathmatt

July 26, 2009, 04:55:48 pm #21 Last Edit: July 26, 2009, 05:16:35 pm by nathmatt
I am trying to make my script easier to understand tell me what you think so far

Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                                    PART 1
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  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.
# # 
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Set up:
#   Start by creating a map you will use as a battle map.
#   After that creat 3 events using game variables as conditions start adding
#   a page for every enemy you want for this map then give them graphics.
#   Then setup the terrain tags below
#
#------------------------------------------------------------------------------
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/index.php?topic=3183.0
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

module Battle_Dome
     
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This controls all ur terrain_Tags :
#
#   Terrain tags are located to the right of the tileset editor.
#   This script uses them to tell the script where to take you when a battle
#   eccours.
#   You can change any of these via script call with
#   $game_system.Terrain_Tag_ID_CL (Id is the id of the trerrain_tag).
#   (CL is the configuration letter.
#   (M) is the map (X) is the X co-ordances (Y) is the Y co-ordances (R) is the
#   random number described below (E) is the added number described below
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
 
  module Terrain_tags

  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:   
  #
  # Use this to set up (terain tag 1)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  Ter_Tag1 = true  # Turn this on If you use this terrain tag
 
  Map1 = nil       # The map you go too
 
  X1 = nil         # The X co-ordances you go too
 
  Y1 = nil         # The Y co-ordances you go too
 
  D1 = nil         # The Direction you face (8) IS UP (6) IS RIGHT (2) IS DOWN
                   # (4) IS LEFT
  R1 = nil         # The range of the enemie selection (example 5 is enemies 0-5)
 
  E1 = nil         # This is used to add a number to the random number
                   # (example if u want enemies 10 - 15 then you put 10 so it
                   # adds 10 to the random number)
                   
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
  #                   
  # Use this to set up (terain tag 2)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

  Ter_Tag2 = false # Same as above
 
  Map2 = nil       # Same as above
 
  X2 = nil         # Same as above
 
  Y2 = nil         # Same as above
 
  D2 = nil         # Same as above
 
  R2 = nil         # Same as above
 
  E2 = nil         # Same as above

  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  #
  # Use this to set up (terain tag 3)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  Ter_Tag3 = false # Same as above
 
  Map3 = nil       # Same as above
 
  X3 = nil         # Same as above
 
  Y3 = nil         # Same as above
 
  D3 = nil         # Same as above
 
  R3 = nil         # Same as above
 
  E3 = nil         # Same as above

  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  #
  # Use this to set up (terain tag 4)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  Ter_Tag4 = false # Same as above
 
  Map4 = nil       # Same as above
 
  X4 = nil         # Same as above
 
  Y4 = nil         # Same as above
 
  D4 = nil         # Same as above
 
  R4 = nil         # Same as above
 
  E4 = nil         # Same as above

  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  #
  # Use this to set up (terain tag 5)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  Ter_Tag5 = false # Same as above

  Map5 = nil       # Same as above
 
  X5 = nil         # Same as above
 
  Y5 = nil         # Same as above

  D5 = nil         # Same as above
 
  R5 = nil         # Same as above
 
  E5 = nil         # Same as above

  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  #
  # Use this to set up (terain tag 6)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  Ter_Tag6 = false # Same as above
 
  Map6 = nil       # Same as above
 
  X6 = nil         # Same as above
 
  Y6 = nil         # Same as above
 
  D6 = nil         # Same as above
 
  R6 = nil         # Same as above
 
  E6 = nil         # Same as above

  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  #
  # Use this to set up  (terain tag 7)
  #
  #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

  Ter_Tag7 = false # Same as above
 
  Map7 = nil       # Same as above
 
  X7 = nil         # Same as above
 
  Y7 = nil         # Same as above
 
  D7 = nil         # Same as above
 
  R7 = nil         # Same as above
 
  E7 = nil         # Same as above
 
end
end

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Maybe using arrays instead would be better.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

July 27, 2009, 04:05:25 pm #23 Last Edit: July 27, 2009, 08:29:48 pm by nathmatt
How about this.

Edit: I am getting an error in main also im not sure why but its turning off you'r caterpillar
part 1
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                                    PART 1
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#  
#  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.
# #  
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Set up:
#   Start by creating a map you will use as a battle map.
#   After that creat 3 events using game variables as conditions start adding
#   a page for every enemy you want for this map then give them graphics.
#   Then setup the config and terrain tags below
#
#------------------------------------------------------------------------------
# If you find any bugs, please report them here:
# http://forum.chaos-project.com/index.php?topic=3183.0
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

class Battle
   
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This controls the terrain :
#
#   To use these you use the call script $scene = Battle.Terrain_ID (ID) is
#   what terrain you want it to call.
#   You only need to add this once until you want to change it.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 

 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # Copy this before the last end to add more terrains change the (ID) to the
 # number you want to call to use that terrain
 #
 # def self.Terrain_ID
 #
 # @Teleport = [
 #
 # M,        # Replace the (M) with the map id you want to go to
 #
 # X,        # Replace the (X) with the X co-ordances you want go to
 #
 # Y,        # Replace the (Y) with the  Y co-ordances you go to
 #
 # D,        # Replace the (D) with the direction youwant to face
 #           # (8) IS UP (6) IS RIGHT (2) IS DOWN (4) IS LEFT
 # R,        # Replace the (R) with the range of the enemie selection
 #           # (example 5 is enemies 0-5)
 #
 # E         # Replace the (R) with the number you want to add to the random  
 # ]         # number (example if u want enemies 10 - 15 then you put 10 so it
 #           # adds 10 to the random number)
 # end
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 
 def self.Terrain_1
 
 $Bteleport = [
 
 2,        # Replace the (M) with the map id you want to go to

 9,        # Replace the (X) with the X co-ordances you want go to
 
 8,        # Replace the (Y) with the  Y co-ordances you go to
 
 2,        # Replace the (D) with the direction youwant to face
           # (8) IS UP (6) IS RIGHT (2) IS DOWN (4) IS LEFT
 2,        # Replace the (R) with the range of the enemie selection
           # (example 5 is enemies 0-5)
 
 0         # Replace the (R) with the number you want to add to the random  
 ]         # number (example if u want enemies 10 - 15 then you put 10 so it
           # adds 10 to the random number)
                 
end


end


part 2
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#                                    PART 2
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#  
#  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.
# #  
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#  This is the part of the script that runs everything.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

class Battle_Dome
 
 
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This is used to call my battle.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   def self.battle
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This sets all my variables.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $total1, $total2, @enemies_called, = 0, 0, false
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This checks whether caterpillar is true or false so it can fix it after
   # the battle ends.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   if $game_system.caterpillar == true
     caterpillar = true
   else
     caterpillar = false
  end
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This prevents battles while in battle and resets the battle step count.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $game_temp.battle_calling = false
   $game_player.make_encounter_count
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This prevents the menu from calling while n battle.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $game_temp.menu_calling = false
   $game_temp.menu_beep = false
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This stores the current BGN (Back Ground Music) to play it back when you
   # finish the battle.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $game_temp.map_bgm = $game_system.playing_bgm
   $game_system.bgm_stop
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This plays the start and battle BGM. (Back Ground Music)
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $game_system.se_play($data_system.battle_start_se)
   $game_system.bgm_play($game_system.battle_bgm)
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This tells the script you are in battle and prevents the event or
   # script battle call.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $game_temp.in_battle = true
   $game_temp.forcing_battler = nil
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This stores your location to take you back after the battle ends.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   @map_id = $game_map.map_id
   @player_x = $game_player.x
   @player_y = $game_player.y
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This creates the random numbers for enemy you get when you battle.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   $game_variables [1] = rand($Bteleport[4]) + $Bteleport[5] # 1st enemy
   $game_variables [2] = rand($Bteleport[4]) + $Bteleport[5] # 2nd Enemy
   $game_variables [3] = rand($Bteleport[4]) + $Bteleport[5] # 3rd enemy
   $Bwait_count = 20
   end
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This waits 20 frames ( secounds) and checks to see if you are already ther
   # before taking you to ur battle map.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   def to_battle
     $game_temp.player_transferring = true
     $game_temp.player_new_map_id = $Bteleport[0]
     $game_temp.player_new_x = $Bteleport[1]
     $game_temp.player_new_y = $Bteleport[2]
     $game_temp.player_new_direction = $Bteleport[3]
   end
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   #
   # This checks if you are on the battle map and if the enemies have already
   # been called then calls them.
   #
   #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
   def call_enemies
    enemy1
    enemy2
    enemy3
    @enemies_called = true
   end
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    #
    # This checks to see if the enemies have been called and if they have
    # checks to see if all the enenies have been killed.
    # If they have then gives you the exp,and gold.
    # Will add items when i can fix the item gain.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    def call_battle_end
    exp = $total1
    gold = $total2
    treasures = $total3
    $game_party.gain_exp(exp)
    $game_party.gain_gold(gold)
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    #
    # This checks to see if the cattipillar was true or false and if it wasn't
    # true turns it back off.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    if caterpillar == false
      $game_system.caterpillar = false
     end
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    #
    # This takes you back wheere you where before the battle started.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
    $game_temp.player_transferring = true
    $game_temp.player_new_map_id = @map_id
    $game_temp.player_new_x = @player_x
    $game_temp.player_new_y = @player_y
    $game_temp.player_new_direction = 2
  end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This Modifies scene_map
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

class Scene_Map
 
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # This initializes wait count to prevent a no method error.
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 def initialize
   $Bwait_count = 0
 end
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # This checks all my conditions
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
  alias map_update update
   def update
     map_update
     if $Bwait_count != 0
       $Bwait_count -= 1
   end
     if $Bwait_count == 0 && $game_map.map_id == @map_id
     to_battle
   end
     if $game_map.map_id !=  @map_id && @enemies_called == false
     call_enemies
   end
     if @enemies_called == true && $game_map.battlers.size == 0
     call_battle_end
   end
 end
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # This calls my battle scene when a battle occurs
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 def call_battle
   $scene = Battle_Dome.battle
 end
end
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# This Modifies Game_Party
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=  
 class Game_Party
 
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # This stores exp in a global variable to be called later.
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 attr_reader   :exp
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # This initializes exp to prevent a no method error.
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 alias init_nathmatt_later initialize
 def initialize
   init_nathmatt_later
   @exp = 0
 end
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 #
 # This makes it either to add exp to all party members in script.
 #
 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
 def gain_exp(n)
    for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     if actor.cant_get_exp? == false
       actor.exp += n
       end
     end
   end
 end

Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

Sorry, your script is way too messed up (and you overcomplicated it way too much). I can't figure out what it does in short time so I'm giving up on it.

As for the caterpillar, I noticed that you are turning it on/off somewhere. You should probably take a look at that. The caterpillar only appears on the map which means it requires Spriteset_Map.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

how about now
error no map 0

Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# Battle Dome by Nathmatt
# Version: 1.02
# Type: Add On
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
#                                    PART 2
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#   
#  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.
# # 
# #-----------------------------------------------------------------------------
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
#
#  This is the part of the script that runs everything.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:

class Scene_Map
     
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This is used to call my battle.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    def call_battle
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This prevents battles while in battle and resets the battle step count.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    $game_temp.battle_calling = false
    $game_player.make_encounter_count
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This prevents the menu from calling while n battle.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This stores the current BGN (Back Ground Music) to play it back when you
    # finish the battle.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This plays the start and battle BGM. (Back Ground Music)
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    $game_system.se_play($data_system.battle_start_se)
    $game_system.bgm_play($game_system.battle_bgm)
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This tells the script you are in battle and prevents the event or
    # script battle call.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    @in_battle = true
    $game_temp.forcing_battler = nil
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This stores your location to take you back after the battle ends.
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    @map_id = $game_map.map_id
    @player_x = $game_player.x
    @player_y = $game_player.y
    @player_d = $game_player.direction
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
    #
    # This takes you to the battle map
    #
    #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      $game_temp.player_transferring = true
      $game_temp.player_new_map_id = $Bteleport[0]
      $game_temp.player_new_x = $Bteleport[1]
      $game_temp.player_new_y = $Bteleport[2]
      $game_temp.player_new_direction = $Bteleport[3]
    end
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      #
      # This is the update method of my system
      #
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
       alias map_update update
        def update
          map_update
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      #
      # This sets all my variables if they hane not already been set.
      #
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      if @variable_set != true
      @variable_set, $total1, $total2, @enemies_called = true, 0, 0, false
     end
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      #
      # This creates the random numbers for enemy you get when you battle.
      #
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      if @in_battle != true
      $game_variables [1] = rand($Bteleport[4]) + $Bteleport[5] # 1st enemy
      $game_variables [2] = rand($Bteleport[4]) + $Bteleport[5] # 2nd Enemy
      $game_variables [3] = rand($Bteleport[4]) + $Bteleport[5] # 3rd enemy
     end
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      #
      # This checks if you are on the battle map and if the enemies have already
      # been called then calls them.
      #
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      if $game_map.map_id !=  @map_id && @enemies_called != true
       enemy1
       enemy2
       enemy3
       @enemies_called = true
     end
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      #
      # This checks to see if the enemies have been called and if they have
      # checks to see if all the enenies have been killed.
      # If they have then gives you the exp,and gold.
      # Will add items when i can fix the item gain.
      # Then takes you back wheere you where before the battle started.
      #
      #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
      if @enemies_called == true && $game_map.battlers.size == 0
       $game_temp.battle_calling = true
       $game_temp.menu_calling = true
       $game_temp.menu_beep = true
       $game_temp.in_battle = false
      for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        actor.exp += $total1
      end
       $game_party.gain_gold($total2)
       $game_temp.player_transferring = true
       $game_temp.player_new_map_id = @map_id
       $game_temp.player_new_x = @player_x
       $game_temp.player_new_y = @player_y
       $game_temp.player_new_direction = @player_d
     end
    end
   end
  end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Blizzard

What it said. There is no map 0 which means that you either called map 0 or you didn't set it right or you didn't code it right.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

nathmatt

July 29, 2009, 07:57:46 am #27 Last Edit: July 29, 2009, 10:58:34 am by nathmatt
fixed
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script