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