VX 스크립트

 

아래에 제가 올린 『대쉬금지의 변경』스크립트와 『배틀신에서 곡 넘기기』 스크립트를 사용할때 필요한 스크립트입니다.

두 스크립트중 사용하실게 하나라도 있으신분은 이 스크립트를 반드시 받아주세요

 

 출처 : http://mdc-light.jpn.org/TYPE74RX-T/index.html

 

아래부터 스크립트.

 

#    
#    주석을 활용한 이벤트 커맨드 확장용 필요 스크립트 Ver1.03(RGSS2)
#  (C)2007-2008 TYPE74RX-T
#

#==============================================================================
# ■ Game_Temp
#------------------------------------------------------------------------------
#  セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン
# スタンスは $game_temp で参照されます。
#==============================================================================

class Game_Temp
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  alias rx_rgss2ic_initialize initialize
  def initialize
    # メソッドを呼び戻す
    rx_rgss2ic_initialize
    @rx_temp_argument = 0 # ★ 一時的な引数
  end
  #--------------------------------------------------------------------------
  # ★ 一時的な引数
  #--------------------------------------------------------------------------
  def rx_temp_argument
    return @rx_temp_argument
  end
  #--------------------------------------------------------------------------
  # ★ 一時的な引数の設定
  #--------------------------------------------------------------------------
  def rx_temp_argument=(arg)
    @rx_temp_argument = arg
  end
end
   
#==============================================================================
# ■ Game_Interpreter
#------------------------------------------------------------------------------
#  イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
# Game_Troop クラス、Game_Event クラスの内部で使用されます。
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # ★ コマンドから先の文字列を全取得
  #--------------------------------------------------------------------------
  def rx_get_all_str(parameter, cmd_words)
    return parameter.slice(cmd_words.size, parameter.size)
  end
  #--------------------------------------------------------------------------
  # ★ コマンドを含めた注釈の内容を全取得
  #--------------------------------------------------------------------------
  def rx_get_all_parameter(parameter)
    # 複数行にわたって設定している場合、それらを全て変数に代入する
    rx_str = parameter
    i = 1
    loop do
      # 次の行に文字列がある場合
      if @list[@index+i].code == 408
        rx_str += @list[@index+i].parameters[0]
        i += 1
      else
        break
      end
    end
    return rx_str
  end
  #--------------------------------------------------------------------------
  # ★ コマンドを含めた注釈の内容から文字列のみ抜き出したものを配列化
  #--------------------------------------------------------------------------
  def rx_get_str_strrays(string)
    return string.split(/[s-]+/)
  end
  #--------------------------------------------------------------------------
  # ★ アクターのハッシュを生成
  #--------------------------------------------------------------------------
  def rx_make_actors_hash
    result = {}
    for i in 1...$data_actors.size
      result[$data_actors[i].name] = $data_actors[i].id
    end
    return result
  end
  #--------------------------------------------------------------------------
  # ★ 注釈から数字の文字列のみ取得し、数字の配列として返す
  #--------------------------------------------------------------------------
  def rx_get_str_arrays(string)
    rx_str = string.scan(/[-10-9]+/)
    for i in 0...rx_str.size
      rx_str[i] = rx_str[i].to_i
    end
    return rx_str
  end
  #--------------------------------------------------------------------------
  # ★ 変数の操作(独立式)
  #--------------------------------------------------------------------------
  def rx_variables_control(a, b, control, value)
    for i in a .. b   # 一括操作ループ
      case control  # 操作
      when 0  # 代入
        $game_variables[i] = value
      when 1  # 加算
        $game_variables[i] += value
      when 2  # 減算
        $game_variables[i] -= value
      when 3  # 乗算
        $game_variables[i] *= value
      when 4  # 除算
        $game_variables[i] /= value if value != 0
      when 5  # 剰余
        $game_variables[i] %= value if value != 0
      end
      if $game_variables[i] > 99999999    # 上限チェック
        $game_variables[i] = 99999999
      end
      if $game_variables[i] < -99999999   # 下限チェック
        $game_variables[i] = -99999999
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● イベントコマンドの実行
  #--------------------------------------------------------------------------
  alias rx_rgss2ic_execute_command execute_command
  def execute_command
    # 実行内容リストの最後に到達しておらず、コマンドコードが「注釈」である場合
    if not @index >= @list.size - 1 and
      @list[@index].code == 108
      # イベントコマンドのパラメータを @parameters で参照可能に
      @parameters = @list[@index].parameters
      # 「注釈」処理へ
      return command_108
    end
    # メソッドを呼び戻す
    rx_rgss2ic_execute_command
  end
  #--------------------------------------------------------------------------
  # ★ 注釈(コモンメソッド)
  #--------------------------------------------------------------------------
  def command_108
    # aliasに対応しやすくするためのコモンメソッドです。
    # 注釈を使ったオリジナルイベントコマンドに対応するため
    # このメソッド自体の末尾にはtrueもfalseも返しません。
  end
end

 


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
130 기타 회피,명중,크리 스테이트를 작성하는 스크립트 9 카르와푸딩의아틀리에 2009.06.30 2394
129 기타 확장 에러 메시지 13 file 허걱 2009.08.17 2497
128 기타 화폐단위 구분해 주는 스크립트 38 file 허걱 2010.04.13 3652
127 기타 화면에 그림 그리는 스크립트 21 file 강진수 2010.02.27 2962
126 기타 화면 확대 스크립트 12 file 에돌이 2011.07.22 3061
125 기타 화면 해상도(640 X 480) 스크립트 6 file 쿠쿠밥솥 2012.01.10 3972
124 기타 해상도 변경 스크립트 11 카리스 2011.07.19 2723
123 기타 페이드 시간 변경 2 rukan 2009.07.01 1360
122 기타 통합 스크립트(좋은 마우스 스크립트 좋은거),KGC좋은거 새로운 거 스크립트 세이브 스크립트 좋은거!~~~~~ 14 알피지GM 2010.03.07 3829
121 기타 텍스트 파일 읽어 오는 스크립트 11 아방스 2008.03.04 2878
120 기타 태양 스크립트. 15 file 할렘 2009.02.20 4463
119 기타 타격관계도 등의 한계돌파 11 시트르산 2010.09.10 2365
118 기타 클리어 횟수 기록하기 8 file 허걱 2009.08.22 2729
117 기타 커스텀 페이지 스크립트 9 file 달표범 2009.09.07 3140
116 기타 커맨드 시스템 7 file 허걱 2009.07.21 2856
115 기타 캐릭터 소개화면 16 file 좀비사냥꾼 2009.03.29 6044
114 기타 카지노 슬롯머신 15 file 아방스가 짱 2010.02.28 3023
113 기타 책 읽기 스크립트. 19 허걱 2009.01.31 4490
112 기타 책 읽기 스크립트 44 file 히류 2010.10.05 4506
111 기타 집안의 가구를 내마음대로 데코레이션하기 15 file EuclidE 2010.09.18 4303
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7