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 5398
77 장비 Disposable Ammo(또 있는 곳을 잘 읽으셔야 합니다.) 2 Man... 2008.10.29 1696
76 기타 ActivateEvents 8 file EuclidE 2010.09.18 1692
75 맵/타일 GubiD's Isometric Maps for RPG Maker VX 1 Man... 2008.10.28 1681
74 퍼스 스크립트 5 Man... 2008.10.28 1679
73 스킬 [RPG VX] 턴알 스킬 쿨타임 스크립트! (잘돌아감) 5 듀란테 2015.08.18 1671
72 Menu Background Effects(온라인 스크립트 올릴려고 했다가 못 올렸음)아깝다.. Man... 2008.10.28 1665
71 기타 Etude87_Hangul_utf8_List 습작 2012.06.04 1664
70 AutoLight v3.7(?) 6 Man... 2008.10.27 1646
69 기타 그림자 없애기... 3 비극ㆍ 2010.04.19 1642
68 Good VS EVil? 4 Man... 2008.10.28 1641
67 그래픽 그림자 없에는 스크립트(그런것 같음) 1 Man... 2008.10.27 1641
66 장비 Multi-Slot Equipment VX 1.6 by DerVVulfman 1 file Alkaid 2010.09.02 1637
65 스킬 Simple Sort Inventory 1.3a by cozziekuns 5 file Alkaid 2010.11.10 1636
64 다운로드 링크로 가세요.(스크린 샷 올려놨음) 5 Man... 2008.10.27 1618
63 베틀 스크린 톤 체인지?? 무슨 말? 4 Man... 2008.10.28 1616
» 기타 『주석을 활용한 이벤트 커맨드 확장』스크립트 1 rukan 2009.07.02 1600
61 아이템 ~[Hide Item]~ Man... 2008.10.27 1597
60 장비 Expansion_Suite V2.1! 6 Man... 2008.10.25 1593
59 기타 OriginalWij's Script Compilation 1.2 2 Alkaid 2010.09.20 1582
58 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32