battle dome help thread

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

Previous topic - Next topic

nathmatt

April 17, 2009, 06:18:00 pm Last Edit: April 21, 2009, 07:53:51 pm by nathmatt
keeps telling me that teleport is comming up nill
Spoiler: ShowHide
class Game_System
  attr_accessor :terrains
 
  alias init_nathmatt_later initialize
  def initialize
    init_nathmatt_later
   @terrains1 = [ 9, 8, 5, 2, 2, 0]
   @terrains2 = [ 8, 8, 5, 2, 2, 0]
   @terrains3 = [ 7, 8, 5, 2, 2, 0]
   @terrains4 = [ 2, 8, 5, 2, 2, 0]
   @terrains5 = [ 2, 8, 5, 2, 2, 0]
   @terrains6 = [ 2, 8, 5, 2, 2, 0]
   @terrains7 = [ 2, 8, 5, 2, 2, 0]
  end
end

  class Scene_Map
   
  def call_battle
    $game_temp.battle_calling = false
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    $game_player.make_encounter_count
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    $game_system.se_play($data_system.battle_start_se)
    $game_system.bgm_play($game_system.battle_bgm)
    $game_player.straighten
    $game_temp.in_battle = true
    $game_temp.forcing_battler = nil
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    @map_id = $game_map.map_id
    @player_x = $game_player.x
    @player_y = $game_player.y
    $game_variables [1] = rand(@teleport[4]) + @teleport[5] # 1st enemy
    $game_variables [2] = rand(@teleport[4]) + @teleport[5] # 2nd Enemy
    $game_variables [3] = rand(@teleport[4]) + @teleport[5] # 3rd enemy
    $game_system.menu_disabled = true
    $game_system.caterpillar = true
    @phase = 1
  end
 
   
   alias map_update update
  def update
    map_update
      @check_terrain
      @update_phase1
      @update_phase2
      @update_phase3
      @update_phase4
    if @wait_count == nil
      @wait_count = 0
    elsif @wait_count > 0
      @wait_count -= 1
      return
    end
  end
 
  def check_terrain
     case $game_player.terrain_tag
     when 1 then @teleport  = $game_system.terrains1
     when 2 then @teleport  = $game_system.terrains2
     when 3 then @teleport  = $game_system.terrains3
     when 4 then @teleport  = $game_system.terrains4
     when 5 then @teleport  = $game_system.terrains5
     when 6 then @teleport  = $game_system.terrains6
     when 7 then @teleport  = $game_system.terrains7
     end
  end
 
def update_phase1
$game_temp.player_transferring = true
$game_temp.player_new_map_id = @teleport[0]
$game_temp.player_new_x = @teleport[1]
$game_temp.player_new_y = @teleport[2]
$game_temp.player_new_direction = @teleport[3]
@phase = 2
end

def update_phase2
if @phase == 2 
if $game_map.map_id !=  @map_id
   @wait_count = 40
   end
  if  @wait_count > 0
     enemy1
     enemy2
     enemy3
     @phase = 3
   end
end
end
   
def update_phase3
  if @phase == 3 
  if $game_variables [4]  == 3
    $game_system.me_play($game_system.battle_end_me)
    $game_system.hud = false
    $window =  Window_Result.new
    @wait_count = 40
  end
if @wait_count == 0
$window.dispose
    exp = $total1
    gold = $total2
    treasures = $total3
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
    $game_party.gain_gold(gold)
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    $total1 = 0
    $total2 = 0
    $total3 = 0
    $game_variables [4] = 0
    @phase = 4
  end
end
end
   
  def update_phase4
    if @phase == 4
   $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
    $game_system.bgm_play($game_temp.map_bgm)
    $game_system.hud = true
    $game_system.menu_disabled = false
    if $game_switches [1] == true
    $game_system.caterpillar = false
    $game_temp.in_battle = false
     end
    end
  end   
end


also would like a better way to do this

Spoiler: ShowHide
class Scene_Map

 
def enemy1
case$game_variables [1]
  when 0 then enemy1 = $game_map.rename_event(01, '\e[1]')
  when 1 then enemy1 = $game_map.rename_event(01, '\e[2]')
  when 2 then enemy1 = $game_map.rename_event(01, '\e[3]')
  when 3 then enemy1 = $game_map.rename_event(01, '\e[4]')
  when 4 then enemy1 = $game_map.rename_event(01, '\e[5]')
  when 5 then enemy1 = $game_map.rename_event(01, '\e[6]')
  when 6 then enemy1 = $game_map.rename_event(01, '\e[7]')
  when 7 then enemy1 = $game_map.rename_event(01, '\e[8]')
  when 8 then enemy1 = $game_map.rename_event(01, '\e[9]')
  when 9 then enemy1 = $game_map.rename_event(01, '\e[10]')
  when 10 then enemy1 = $game_map.rename_event(01, '\e[11]')
  when 11 then enemy1 = $game_map.rename_event(01, '\e[12]')
  when 12 then enemy1 = $game_map.rename_event(01, '\e[13]')
  when 13 then enemy1 = $game_map.rename_event(01, '\e[12]')
  when 14 then enemy1 = $game_map.rename_event(01, '\e[13]')
  when 15 then enemy1 = $game_map.rename_event(01, '\e[14]')
  when 16 then enemy1 = $game_map.rename_event(01, '\e[15]')
  when 17 then enemy1 = $game_map.rename_event(01, '\e[16]')
  when 16 then enemy1 = $game_map.rename_event(01, '\e[15]')
  when 17 then enemy1 = $game_map.rename_event(01, '\e[18]')
  when 18 then enemy1 = $game_map.rename_event(01, '\e[19]')
  when 19 then enemy1 = $game_map.rename_event(01, '\e[20]')
  when 20 then enemy1 = $game_map.rename_event(01, '\e[21]')
  when 21 then enemy1 = $game_map.rename_event(01, '\e[22]')
  when 22 then enemy1 = $game_map.rename_event(01, '\e[23]')
  when 23 then enemy1 = $game_map.rename_event(01, '\e[24]')
  when 24 then enemy1 = $game_map.rename_event(01, '\e[25]')
  when 25 then enemy1 = $game_map.rename_event(01, '\e[26]')
  when 26 then enemy1 = $game_map.rename_event(01, '\e[27]')
  when 27 then enemy1 = $game_map.rename_event(01, '\e[28]')
  when 28 then enemy1 = $game_map.rename_event(01, '\e[29]')
  when 29 then enemy1 = $game_map.rename_event(01, '\e[30]')
  when 30 then enemy1 = $game_map.rename_event(01, '\e[31]')
  when 31 then enemy1 = $game_map.rename_event(01, '\e[32]')
  when 32 then enemy1 = $game_map.rename_event(01, '\e[33]')
  when 33 then enemy1 = $game_map.rename_event(01, '\e[34]')
  when 34 then enemy1 = $game_map.rename_event(01, '\e[35]')
  when 35 then enemy1 = $game_map.rename_event(01, '\e[36]')
  when 36 then enemy1 = $game_map.rename_event(01, '\e[37]')
  when 37 then enemy1 = $game_map.rename_event(01, '\e[38]')
  when 38 then enemy1 = $game_map.rename_event(01, '\e[39]')
  when 39 then enemy1 = $game_map.rename_event(01, '\e[40]')
  when 40 then enemy1 = $game_map.rename_event(01, '\e[41]')
  when 41 then enemy1 = $game_map.rename_event(01, '\e[42]')
  when 42 then enemy1 = $game_map.rename_event(01, '\e[43]')
  when 43 then enemy1 = $game_map.rename_event(01, '\e[44]')
  when 44 then enemy1 = $game_map.rename_event(01, '\e[45]')
  when 45 then enemy1 = $game_map.rename_event(01, '\e[46]')
  when 46 then enemy1 = $game_map.rename_event(01, '\e[47]')
  when 47 then enemy1 = $game_map.rename_event(01, '\e[48]')
  when 48 then enemy1 = $game_map.rename_event(01, '\e[49]')
  when 49 then enemy1 = $game_map.rename_event(01, '\e[50]')
     
  end
  def enemy2
  case $game_variables [2]
  when 0 then enemy2 = $game_map.rename_event(02, '\e[1]')
  when 1 then enemy2 = $game_map.rename_event(02, '\e[2]')
  when 2 then enemy2 = $game_map.rename_event(02, '\e[3]')
  when 3 then enemy2 = $game_map.rename_event(02, '\e[4]')
  when 4 then enemy2 = $game_map.rename_event(02, '\e[5]')
  when 5 then enemy2 = $game_map.rename_event(02, '\e[6]')
  when 6 then enemy2 = $game_map.rename_event(02, '\e[7]')
  when 7 then enemy2 = $game_map.rename_event(02, '\e[8]')
  when 8 then enemy2 = $game_map.rename_event(02, '\e[9]')
  when 9 then enemy2 = $game_map.rename_event(02, '\e[10]')
  when 10 then enemy2 = $game_map.rename_event(02, '\e[11]')
  when 11 then enemy2 = $game_map.rename_event(02, '\e[12]')
  when 12 then enemy2 = $game_map.rename_event(02, '\e[13]')
  when 13 then enemy2 = $game_map.rename_event(02, '\e[12]')
  when 14 then enemy2 = $game_map.rename_event(02, '\e[13]')
  when 15 then enemy2 = $game_map.rename_event(02, '\e[14]')
  when 16 then enemy2 = $game_map.rename_event(02, '\e[15]')
  when 17 then enemy2 = $game_map.rename_event(02, '\e[16]')
  when 16 then enemy2 = $game_map.rename_event(02, '\e[15]')
  when 17 then enemy2 = $game_map.rename_event(02, '\e[18]')
  when 18 then enemy2 = $game_map.rename_event(02, '\e[19]')
  when 19 then enemy2 = $game_map.rename_event(02, '\e[20]')
  when 20 then enemy2 = $game_map.rename_event(02, '\e[21]')
  when 21 then enemy2 = $game_map.rename_event(02, '\e[22]')
  when 22 then enemy2 = $game_map.rename_event(02, '\e[23]')
  when 23 then enemy2 = $game_map.rename_event(02, '\e[24]')
  when 24 then enemy2 = $game_map.rename_event(02, '\e[25]')
  when 25 then enemy2 = $game_map.rename_event(02, '\e[26]')
  when 26 then enemy2 = $game_map.rename_event(02, '\e[27]')
  when 27 then enemy2 = $game_map.rename_event(02, '\e[28]')
  when 28 then enemy2 = $game_map.rename_event(02, '\e[29]')
  when 29 then enemy2 = $game_map.rename_event(02, '\e[30]')
  when 30 then enemy2 = $game_map.rename_event(02, '\e[31]')
  when 31 then enemy2 = $game_map.rename_event(02, '\e[32]')
  when 32 then enemy2 = $game_map.rename_event(02, '\e[33]')
  when 33 then enemy2 = $game_map.rename_event(02, '\e[34]')
  when 34 then enemy2 = $game_map.rename_event(02, '\e[35]')
  when 35 then enemy2 = $game_map.rename_event(02, '\e[36]')
  when 36 then enemy2 = $game_map.rename_event(02, '\e[37]')
  when 37 then enemy2 = $game_map.rename_event(02, '\e[38]')
  when 38 then enemy2 = $game_map.rename_event(02, '\e[39]')
  when 39 then enemy2 = $game_map.rename_event(02, '\e[40]')
  when 40 then enemy2 = $game_map.rename_event(02, '\e[41]')
  when 41 then enemy2 = $game_map.rename_event(02, '\e[42]')
  when 42 then enemy2 = $game_map.rename_event(02, '\e[43]')
  when 43 then enemy2 = $game_map.rename_event(02, '\e[44]')
  when 44 then enemy2 = $game_map.rename_event(02, '\e[45]')
  when 45 then enemy2 = $game_map.rename_event(02, '\e[46]')
  when 46 then enemy2 = $game_map.rename_event(02, '\e[47]')
  when 47 then enemy2 = $game_map.rename_event(02, '\e[48]')
  when 48 then enemy2 = $game_map.rename_event(02, '\e[49]')
  when 49 then enemy2 = $game_map.rename_event(02, '\e[50]')
  end
  def enemy3
  case $game_variables [3]
  when 0 then enemy3 = $game_map.rename_event(03, '\e[1]')
  when 1 then enemy3 = $game_map.rename_event(03, '\e[2]')
  when 2 then enemy3 = $game_map.rename_event(03, '\e[3]')
  when 3 then enemy3 = $game_map.rename_event(03, '\e[4]')
  when 4 then enemy3 = $game_map.rename_event(03, '\e[5]')
  when 5 then enemy3 = $game_map.rename_event(03, '\e[6]')
  when 6 then enemy3 = $game_map.rename_event(03, '\e[7]')
  when 7 then enemy3 = $game_map.rename_event(03, '\e[8]')
  when 8 then enemy3 = $game_map.rename_event(03, '\e[9]')
  when 9 then enemy3 = $game_map.rename_event(03, '\e[10]')
  when 10 then enemy3 = $game_map.rename_event(03, '\e[11]')
  when 11 then enemy3 = $game_map.rename_event(03, '\e[12]')
  when 12 then enemy3 = $game_map.rename_event(03, '\e[13]')
  when 13 then enemy3 = $game_map.rename_event(03, '\e[12]')
  when 14 then enemy3 = $game_map.rename_event(03, '\e[13]')
  when 15 then enemy3 = $game_map.rename_event(03, '\e[14]')
  when 16 then enemy3 = $game_map.rename_event(03, '\e[15]')
  when 17 then enemy3 = $game_map.rename_event(03, '\e[16]')
  when 16 then enemy3 = $game_map.rename_event(03, '\e[15]')
  when 17 then enemy3 = $game_map.rename_event(03, '\e[18]')
  when 18 then enemy3 = $game_map.rename_event(03, '\e[19]')
  when 19 then enemy3 = $game_map.rename_event(03, '\e[20]')
  when 20 then enemy3 = $game_map.rename_event(03, '\e[21]')
  when 21 then enemy3 = $game_map.rename_event(03, '\e[22]')
  when 22 then enemy3 = $game_map.rename_event(03, '\e[23]')
  when 23 then enemy3 = $game_map.rename_event(03, '\e[24]')
  when 24 then enemy3 = $game_map.rename_event(03, '\e[25]')
  when 25 then enemy3 = $game_map.rename_event(03, '\e[26]')
  when 26 then enemy3 = $game_map.rename_event(03, '\e[27]')
  when 27 then enemy3 = $game_map.rename_event(03, '\e[28]')
  when 28 then enemy3 = $game_map.rename_event(03, '\e[29]')
  when 29 then enemy3 = $game_map.rename_event(03, '\e[30]')
  when 30 then enemy3 = $game_map.rename_event(03, '\e[31]')
  when 31 then enemy3 = $game_map.rename_event(03, '\e[32]')
  when 32 then enemy3 = $game_map.rename_event(03, '\e[33]')
  when 33 then enemy3 = $game_map.rename_event(03, '\e[34]')
  when 34 then enemy3 = $game_map.rename_event(03, '\e[35]')
  when 35 then enemy3 = $game_map.rename_event(03, '\e[36]')
  when 36 then enemy3 = $game_map.rename_event(03, '\e[37]')
  when 37 then enemy3 = $game_map.rename_event(03, '\e[38]')
  when 38 then enemy3 = $game_map.rename_event(03, '\e[39]')
  when 39 then enemy3 = $game_map.rename_event(03, '\e[40]')
  when 40 then enemy3 = $game_map.rename_event(03, '\e[41]')
  when 41 then enemy3 = $game_map.rename_event(03, '\e[42]')
  when 42 then enemy3 = $game_map.rename_event(03, '\e[43]')
  when 43 then enemy3 = $game_map.rename_event(03, '\e[44]')
  when 44 then enemy3 = $game_map.rename_event(03, '\e[45]')
  when 45 then enemy3 = $game_map.rename_event(03, '\e[46]')
  when 46 then enemy3 = $game_map.rename_event(03, '\e[47]')
  when 47 then enemy3 = $game_map.rename_event(03, '\e[48]')
  when 48 then enemy3 = $game_map.rename_event(03, '\e[49]')
  when 49 then enemy3 = $game_map.rename_event(03, '\e[50]')
     end
    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

Second one.

  def enemy(id)
    $game_map.rename_event(id, "\e[#{$game_variables[id]}]")
  end


And never use leading zeroes.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

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

Lol, wait, I made a mistake.

  def enemy(event_id, id)
    $game_map.rename_event(event_id, "\e[#{id}]")
  end


This is much better. event_id is the event's ID and id is the new enemy ID.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

April 18, 2009, 01:34:49 pm #4 Last Edit: April 18, 2009, 01:54:35 pm by nathmatt
i tryed it its not working i did this enemy(1, $gamevariables[1])
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

April 19, 2009, 05:29:59 am #5 Last Edit: April 19, 2009, 05:45:12 am by Blizzard
event_id and enemy id. It has nothing to do with the variables.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

April 21, 2009, 10:56:52 am #6 Last Edit: April 21, 2009, 07:56:16 pm by nathmatt
but i need the new enemies id to =the $game_variable

im also have trouble making it where they do not drop items u get them at the end of the battle any suggestions


edit y does this stay on

Spoiler: ShowHide
class Hud < Sprite
alias nathmatt_hud_update draw_basic
  def draw_basic
    if Nathmatt::Battle_skills == false
      nathmatt_hud_update
    end
    # fill with grey rectangle
    self.bitmap.fill_rect(0, 0, self.bitmap.width, self.bitmap.height,
        Color.new(0, 0, 0, 128))
    # determine color depending on HUD style
    color = case BlizzABS::Config::HUD_TYPE
    when 0 then Color.new(255, 255, 255, 192)
    when 1 then Color.new(0, 0, 0, 0)
    end
    # if color exists
    if color.is_a?(Color)
      # draw outline in color
      self.bitmap.fill_rect(@hp_x+32, @hp_y+3, 116, 14, color)
      # draw outline in color
      self.bitmap.fill_rect(@sp_x+32, @sp_y+3, 116, 14, color)
    end
    # set font color
    self.bitmap.font.color = system_color
    # draw "LV"
    self.bitmap.draw_text_full(@level_x, @level_y, 20, 20, 'LV')
    # if direct hotkey option is turned off
    unless BlizzABS::Config::DIRECT_HOTKEYS
      # draw "Skill:"
      self.bitmap.draw_text_full(@hot_x, @hot_y, 48, 20, 'Skill:')
      self.bitmap.draw_text_full(@hot_x+76, @hot_y, 48, 20, 'Skill2:')
    end
    # draw "HP"
    self.bitmap.draw_text_full(@hp_x, @hp_y, 32, 20, $data_system.words.hp)
    # draw "SP"
    self.bitmap.draw_text_full(@sp_x, @sp_y, 32, 20, $data_system.words.sp)
  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

  def enemy(event_id, variable_id)
    $game_map.rename_event(event_id, "\e[#{$game_variables[variable_id]}]")
  end


And what do you mean with "Why does it stay on"?
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

April 22, 2009, 09:36:51 am #8 Last Edit: April 22, 2009, 09:50:14 am by nathmatt
sorry i mean even if Nathmatt::Battle_skills = false the whole thing runs

also that still dosent work maybe im using it wrong or somthing look

Spoiler: ShowHide
 module Nathmatt
#WILL OVERRIDE THE PRE_MENU####
#&WILL RE WRITE THE DIRRCT HOTKEYS##
#LEAVING ONLY 2 SKILLS 4 EASY USE###
   Battle_skills = true
end

class Game_System
  attr_accessor :terrains1
  attr_accessor :terrains2
  attr_accessor :terrains3
  attr_accessor :terrains4
  attr_accessor :terrains5
  attr_accessor :terrains6
  attr_accessor :terrains7
 
 
  alias init_nathmatt_later initialize
  def initialize
    init_nathmatt_later
    @terrains1 = [ 9, 8, 5, 2, 2, 0]
    @terrains2 = [ 8, 8, 5, 2, 2, 0]
    @terrains3 = [ 7, 8, 5, 2, 2, 0]
    @terrains4 = [ 2, 8, 5, 2, 2, 0]
    @terrains5 = [ 2, 8, 5, 2, 2, 0]
    @terrains6 = [ 2, 8, 5, 2, 2, 0]
    @terrains7 = [ 2, 8, 5, 2, 2, 0]
  end
end

  class Scene_Map
   
  def call_battle
    $game_temp.battle_calling = false
    $game_temp.menu_calling = false
    $game_temp.menu_beep = false
    $game_player.make_encounter_count
    $game_temp.map_bgm = $game_system.playing_bgm
    $game_system.bgm_stop
    $game_system.se_play($data_system.battle_start_se)
    $game_system.bgm_play($game_system.battle_bgm)
    $game_player.straighten
    $game_temp.in_battle = true
    $game_temp.forcing_battler = nil
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    @map_id = $game_map.map_id
    @player_x = $game_player.x
    @player_y = $game_player.y
    $game_variables [1] = rand(@teleport[4]) + @teleport[5] # 1st enemy
    $game_variables [2] = rand(@teleport[4]) + @teleport[5] # 2nd Enemy
    $game_variables [3] = rand(@teleport[4]) + @teleport[5] # 3rd enemy
    $game_system.menu_disabled = true
    $game_system.caterpillar = true
    @phase = 1
  end
 
  def enemy(event_id, variable_id)
    $game_map.rename_event(event_id, "\e[#{$game_variables[variable_id]}]")
  end
   
  alias map_update update
  def update
    map_update
    if @check == nil
    $game_system.caterpillar = true
    $total1 = 0
    $total2 = 0
    @enemies = 0
    @wait_count = 0
    @check = 0
  end
  if @wait_count > 0
    @wait_count -= 1
    end
    case $game_player.terrain_tag
     when 1 then @teleport  = $game_system.terrains1
     when 2 then @teleport  = $game_system.terrains2
     when 3 then @teleport  = $game_system.terrains3
     when 4 then @teleport  = $game_system.terrains4
     when 5 then @teleport  = $game_system.terrains5
     when 6 then @teleport  = $game_system.terrains6
     when 7 then @teleport  = $game_system.terrains7
     end
     if @phase == 1
      $game_temp.player_transferring = true
      $game_temp.player_new_map_id = @teleport[0]
      $game_temp.player_new_x = @teleport[1]
      $game_temp.player_new_y = @teleport[2]
      $game_temp.player_new_direction = @teleport[3]
      @phase = 2
    end
    if @phase == 2
    if $game_map.map_id !=  @map_id && @enemies == 0..99
     enemy(1, 1)
     enemy(2, 2)
     enemy(3, 3)
    @enemies +=1
  end
  if @enemies > 0 && $game_map.battlers.size == 0 && @enemies == 99
    $game_system.me_play($game_system.battle_end_me)
    $game_system.hud = false
    exp = $total1
    gold = $total2
    treasures = $total3
    $game_party.gain_exp(exp)
    $game_party.gain_gold(gold)
    $total1 = 0
    $total2 = 0
    $total3 = 0
    @phase = 0
    @enemies = 0
    $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
    $game_system.bgm_play($game_temp.map_bgm)
    $game_system.hud = true
    $game_system.menu_disabled = false
       end
      end
     end
   end
   
class Game_Party
attr_reader   :exp
alias init_nathmatt_later initialize
  def initialize
    init_nathmatt_later
    @exp = 0
  end
 
  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

    if Nathmatt::Battle_skills == false
      nathmatt_hud_update
    end


It needs to be:

    if Nathmatt::Battle_skills == false
      nathmatt_hud_update
      return
    end
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

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

April 24, 2009, 06:05:44 pm #11 Last Edit: April 24, 2009, 07:26:46 pm by nathmatt
how would i add a skill strait to the HUD ?

& whats wrong with this i get a wrong number of arguments error

Spoiler: ShowHide
 alias nathmatt_name_check check_event_name
  def check_event_name(event_id)
     nathmatt_name_check
     if event.name.clone.gsub!(/\\[Mm]\[(\d+)\]/) {"#[$1]"}
        # get enemy pick setting
        $game_system.pick = $1.to_i
        folow = true
      end
     if folow == true
    $distances[event_id] = Math.hypot($game_map.events[event_id].x, $game_map.events[event_id].y - $game_player.x, $game_player.y)
  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

"nathmatt_name_check" should be "nathmatt_name_check(event_id)"

The skill drawing method is a complex one. It draws the skill icon (draw_hskill). Then there's another method (draw_lskill) that draws how much skill uses you have left. What exactly do you want to do?
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

April 25, 2009, 07:36:22 am #13 Last Edit: April 25, 2009, 07:42:58 am by nathmatt
ok im trying to skip hot hotkeys to put skills directly in the HUD also the other thing im trying to make it where is there a way to make that where when the enemies hear or see u that ran at u but dont att u so they can call my battle so ppl can see there enemies that what i was trying to do with the event name thing
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

Quote from: nathmatt on April 25, 2009, 07:36:22 am
ok im trying to skip hot hotkeys to put skills directly in the HUD


Just turn on the Direct Hotkeys option and no hotkeys will be used. Instead the skills and items will be used as soon as you press a number button.

Quote from: nathmatt on April 25, 2009, 07:36:22 am
also the other thing im trying to make it where is there a way to make that where when the enemies hear or see u that ran at u but dont att u so they can call my battle so ppl can see there enemies that what i was trying to do with the event name thing


Just give them the escape action.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

will they still run into u so u can use the when here touch ?

& also on the hot key thing i though about that but i don't like where u have to use number keys i wanted to change that but couldn't figure out how
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

Then you need a custom hotkeys handling. :P

If you give enemies the action escape, they will escape as soon as they spot you. If you come from behind and surprise them, you can still trigger their events by touch.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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

April 25, 2009, 12:21:57 pm #17 Last Edit: April 27, 2009, 11:46:57 am by nathmatt
how would i go about making that?

what if i come in front of them tho

edit ok heres what i have so far two problems im trying to get the direct to come on when its active & when its off i keep getting uninitializeed error on this part
 Nathmatt_Hotkeys_main


Spoiler: ShowHide
class BlizzABS::Cache
if Nathmatt::Battle_skills == true
HotkeyRange = 1..2
end
end

module Config
if Nathmatt::Battle_skills == true
DIRECT_HOTKEYS = true
end
end
 
    class Scene_Hotkeys
     alias Nathmatt_Hotkeys_main main
      def main
    if Nathmatt::Battle_skills == false
     Nathmatt_Hotkeys_main
      return
    end
      # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 640, 480)
    # set tone to current screen tone
    @view.tone = @tone.clone
    # create HUD if HUD is turned on and HUD active
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    # if ASSIGNMENT is turned
    if BlizzABS::Config::HOTKEYS
      # create assignment display
      @hotkeys = Hotkey_Assignment.new
      # set z position
      @hotkeys.z = 5000
    end
    # if MINIMAP is turned on and minimap active
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      # create HUD
      @minimap = Minimap.new
    end
    # create sprite
    @choice = Sprite.new
    # create bitmap
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    # set x, y and z positions
    @choice.x, @choice.y, @choice.z, @choice.opacity = 160, 40, 500, 128
    # set x position offset
    @choice.ox = -8
    # set active flag
    @active = true
    # set index
    @index = 0
    # set up mode flag
    @up_mode = true
    # create modified skill window
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    @skill_window.y = 100
    # create modified item window
    @item_window = Window_Item_Hotkey.new
    @item_window.y = 100
    # set last active
    @last_active = true
    # transtition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # frame update
      update
      # stop if chosen an option
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delet spriteset
    @spriteset.dispose
    # delete HUD elements that exist
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    # delete choice sprite
    @choice.dispose
    # delete skill window
    @skill_window.dispose
    # delete item window
    @item_window.dispose
    # delete viewport
    @view.dispose
  end
   
   alias Nathmatt_Hotkeys_update update_choice
      def update_choice
          if Nathmatt::Battle_skills == false
      Nathmatt_Hotkeys_update
      return
      end
    # set x position
    @choice.x, @choice.y = 0 + @index * 32, 80
    # if pressed B
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Map.new
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # not active
      @active = false
      # the one that was active the last time is now active
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    # if RIGHT is being pressed
    elsif Input.repeat?(Input::RIGHT)
      # if RIGHT is pressed or index is less than 9
      if Input.trigger?(Input::RIGHT) || @index < 9
        if @index == 1
          @index = -1
        end
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 1) % 10
      end
    # if LEFT is being pressed
    elsif Input.repeat?(Input::LEFT)
      # if LEFT is pressed or index is equal or greater than 1
      if Input.trigger?(Input::LEFT) || @index >= 1
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 9) % 10
     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

You need to edit BlizzABS::Controls#update_skill and BlizzABS::Controls#update_item. It's the part where the number keys are checked for input.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

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 18, 2009, 08:56:52 am #19 Last Edit: July 18, 2009, 10:28:37 am by nathmatt
since i couldn't get ur name changer to work right y couldn't i just change it the way u check it

Spoiler: ShowHide
def enemy(event_id)
   event = $game_map.map.events[event_id]
   event.name.gsub!(/\\[Ee]\[(\d+)\]/) {"#$game_variables[event_id]"}
 end


but that doesn't work either any ideas
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

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 our game brands:

Daygames
Game Night Games
Chugnar Games

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 our game brands:

Daygames
Game Night Games
Chugnar Games

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 our game brands:

Daygames
Game Night Games
Chugnar Games

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