RGSS2 Tomoaky Warp

I have tomoaky's warp script but the help text is gibberish
Spoiler: code
i'd like to know how the plugin commands work..
i like to make the character move to where the mouse cursor position is.
Ruby:
#==============================================================================
# ■ RGSS2_Warp Ver1.0
# tomoaky ‚Ђ«‚à‹L(http://hikimoki.sakura.ne.jp/)
#------------------------------------------------------------------------------
# ¡‚¢‚éƒ}ƒbƒvã‚Ì’Ês‰Â”\ƒZƒ‹‚Öƒ‰ƒ“ƒ_ƒ€ˆÚ“®‚·‚é‹@”\‚ð’ljÁ‚µ‚Ü‚·A
# ˆÚ“®æ‚ÌŒó•â‚Æ‚µ‚Ä‹éŒ`—̈æ‚ðŽw’è‚·‚邱‚Æ‚à‚Å‚«‚Ü‚·B
#
# [email protected] ŒöŠJ
#
# EŽg‚¢•û
# ƒCƒxƒ“ƒgƒRƒ}ƒ“ƒhwƒXƒNƒŠƒvƒgx‚É warp ‚Æ‘‚‚¾‚¯‚ÅOK‚Å‚·A
# ˆêu‚ňړ®‚ªŠ®—¹‚µ‚Ü‚·A‰‰o“™‚͉½‚à‚È‚¢‚̂ŃCƒxƒ“ƒgƒRƒ}ƒ“ƒh‚Å
# Œø‰Ê‰¹‚âƒAƒjƒ[ƒVƒ‡ƒ“AƒEƒFƒCƒg‚ð•t‚¯‚Ä‚‚¾‚³‚¢B
#
# warp(id) ‚Ń[ƒv‚·‚é‘ÎÛ‚ðŽw’è‚Å‚«‚Ü‚·A-1 ‚È‚çƒvƒŒƒCƒ„[A
# 0 ‚Ȃ炱‚̃Cƒxƒ“ƒgA1ˆÈã ‚Å‚»‚ÌID‚ð‚à‚ƒCƒxƒ“ƒg‚ª‘ÎۂƂȂè‚Ü‚·B
#
# warp(id, x, y, width, height) ‚Æ‚·‚ê‚ÎÀ•W(x, y)‚ð¶ã‚Æ‚µ‚½
# cwidthƒZƒ‹A‰¡heightƒZƒ‹‚Ì‹éŒ`‚ðˆÚ“®æŒó•â‚Æ‚µ‚Ü‚·B
#
# warp ‚Ì‘ã‚í‚è‚É warp_jump ‚ðŽg‚¤‚ÆAuŠÔˆÚ“®‚ªƒWƒƒƒ“ƒv‚ɕω»‚µ‚Ü‚·B
#
# E’ˆÓ
# ‘ÎÛ‚ª¡‚¢‚éÀ•W‚ƃCƒxƒ“ƒg‚ª‚¢‚éÀ•W‚ÍŽ©“®“I‚ÉŒó•â‚©‚眊O‚³‚ê‚Ü‚·‚ªA
# ’nŒ`“I‚ɂǂ±‚É‚à‚‚Ȃª‚Á‚Ä‚¢‚È‚¢À•W‚ÍŒó•â‚Ɋ܂܂ê‚Ü‚·A‚±‚¤‚¢‚Á‚½ƒ}ƒbƒv‚Å‚Í
# ‹éŒ`—̈æ‚ÌŽw’è‹@”\‚ð—˜—p‚µ‚Ä‚‚¾‚³‚¢B
#
# Žw’肵‚½‹éŒ`—̈æ‚Ì‚·‚ׂẴZƒ‹‚ªƒ[ƒv•s‰ÂƒZƒ‹i’Ês•s‰ÂorƒCƒxƒ“ƒg‚ª‚¢‚éj
# ‚¾‚Á‚½ê‡‚Í¡‚¢‚éÀ•W‚ªƒ[ƒvæ‚É‘I‚΂ê‚Ü‚·B
#==============================================================================

#==============================================================================
# ¡ ƒRƒ}ƒ“ƒh
#==============================================================================
module TWARP
module Commands
  module_function
  def warp(id = -1, x = nil, y = nil, width = 1, height = 1)
    character = $game_map.interpreter.get_character(id)
    x, y = $game_map.warp_pos(character, x, y, width, height)
    character.moveto(x, y)
    $game_player.clear_target   # ターゲットを解除
    #$game_player.set_target_pos_screen(mouse_x, mouse_y)
  end
  def warp_jump(id = -1, x = nil, y = nil, width = 1, height = 1)
    character = $game_map.interpreter.get_character(id)
    x, y = $game_map.warp_pos(character, x, y, width, height)
    character.jump(x - character.x, y - character.y)
    $game_player.clear_target   # ターゲットを解除
    #$game_player.set_target_pos_screen(mouse_x, mouse_y)
  end
end
end

#==============================================================================
# ¡ Game_Interpreter
#==============================================================================
class Game_Interpreter
  include TWARP::Commands
end

#==============================================================================
# ¡ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # œ alias setup
  #--------------------------------------------------------------------------
  alias twarp_game_map_setup setup
  def setup(map_id)
    twarp_game_map_setup(map_id)
    @twarp_pos = []
    for x in 0...width
      for y in 0...height
        for i in [2, 1, 0]                      # ƒŒƒCƒ„[‚Ìã‚©‚燂ɒ²‚ׂé
          tile_id = @map.data[x, y, i]          # ƒ^ƒCƒ‹ ID ‚ðŽæ“¾
          next if tile_id == nil                # ƒ^ƒCƒ‹ ID Žæ“¾Ž¸”s : ’Ês•s‰Â
          pass = @passages[tile_id]             # ’Ês‘®«‚ðŽæ“¾
          next if pass & 0x10 == 0x10           # [™] : ’Ês‚ɉe‹¿‚µ‚È‚¢
          @twarp_pos.push([x, y]) unless pass & 0x01 == 0x01
          break
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # › warp pos
  #--------------------------------------------------------------------------
  def warp_pos(character, x, y, width, height)
    if x == nil
      begin
        pos = @twarp_pos[rand(@twarp_pos.size)]
      end while !can_warp?(character, pos[0], pos[1])
    else
      a = []
      for i in x...x + width
        for j in y...y + height
          a.push([i, j]) if can_warp?(character, i, j)
        end
      end
      return character.x, character.y if a.empty?
      pos = a[rand(a.size)]
    end
    return pos[0], pos[1]
  end
  #--------------------------------------------------------------------------
  # › can warp?
  #--------------------------------------------------------------------------
  def can_warp?(character, x, y)
    return false unless events_xy(x, y).empty?
    return false if $game_player.pos?(x, y)
    return true
  end
end
Where did you find the script? Might be better to search the original site.
Of course using the wayback machine.
Nevermind, found it
Spoiler: tomoaky warp
Ruby:
#==============================================================================
# ★ RGSS2_ワープ Ver1.0
#==============================================================================
=begin

作者:tomoaky
webサイト:ひきも記 (http://hikimoki.sakura.ne.jp/)

今いるマップ上の通行可能セルへランダム移動する機能を追加します、
移動先の候補として矩形領域を指定することもできます。

使い方
  イベントコマンド『スクリプト』に warp と書くだけでOKです、
  一瞬で移動が完了します、演出等は何もないのでイベントコマンドで
  効果音やアニメーション、ウェイトを付けてください。

  warp(id) でワープする対象を指定できます、-1 ならプレイヤー、
  0 ならこのイベント、1以上 でそのIDをもつイベントが対象となります。

  warp(id, x, y, width, height) とすれば座標(x, y)を左上とした
  縦widthセル、横heightセルの矩形を移動先候補とします。

  warp の代わりに warp_jump を使うと、瞬間移動がジャンプに変化します。

注意点
  対象が今いる座標とイベントがいる座標は自動的に候補から除外されますが、
  地形的にどこにもつながっていない座標は候補に含まれます、こういったマップでは
  矩形領域の指定機能を利用してください。

  指定した矩形領域のすべてのセルがワープ不可セル(通行不可orイベントがいる)
  だった場合は今いる座標がワープ先に選ばれます。

2010.06.15 Ver1.0
  公開

=end

#==============================================================================
# ■ コマンド
#==============================================================================
module TWARP
module Commands
  module_function
  def warp(id = -1, x = nil, y = nil, width = 1, height = 1)
    character = $game_map.interpreter.get_character(id)
    x, y = $game_map.warp_pos(character, x, y, width, height)
    character.moveto(x, y)
  end
  def warp_jump(id = -1, x = nil, y = nil, width = 1, height = 1)
    character = $game_map.interpreter.get_character(id)
    x, y = $game_map.warp_pos(character, x, y, width, height)
    character.jump(x - character.x, y - character.y)
  end
end
end

#==============================================================================
# ■ Game_Interpreter
#==============================================================================
class Game_Interpreter
  include TWARP::Commands
end

#==============================================================================
# ■ Game_Map
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # ● セットアップ
  #--------------------------------------------------------------------------
  alias twarp_game_map_setup setup
  def setup(map_id)
    twarp_game_map_setup(map_id)
    @twarp_pos = []
    for x in 0...width
      for y in 0...height
        for i in [2, 1, 0]                      # レイヤーの上から順に調べる
          tile_id = @map.data[x, y, i]          # タイル ID を取得
          next if tile_id == nil                # タイル ID 取得失敗 : 通行不可
          pass = @passages[tile_id]             # 通行属性を取得
          next if pass & 0x10 == 0x10           # [☆] : 通行に影響しない
          @twarp_pos.push([x, y]) unless pass & 0x01 == 0x01
          break
        end
      end
    end
  end
  #--------------------------------------------------------------------------
  # ○ ワープ先座標を返す
  #--------------------------------------------------------------------------
  def warp_pos(character, x, y, width, height)
    if x == nil
      begin
        pos = @twarp_pos[rand(@twarp_pos.size)]
      end while !can_warp?(character, pos[0], pos[1])
    else
      a = []
      for i in x...x + width
        for j in y...y + height
          a.push([i, j]) if can_warp?(character, i, j)
        end
      end
      return character.x, character.y if a.empty?
      pos = a[rand(a.size)]
    end
    return pos[0], pos[1]
  end
  #--------------------------------------------------------------------------
  # ○ ワープ可能な座標かどうかを返す(現在の座標とイベントがいる座標を除外)
  #--------------------------------------------------------------------------
  def can_warp?(character, x, y)
    return false unless events_xy(x, y).empty?
    return false if $game_player.pos?(x, y)
    return true
  end
end
Where did you find the script? Might be better to search the original site.
Of course using the wayback machine.
Nevermind, found it

thanks, what address you put in wayback?
download the sample project and it was in there.
I have this mouse input script.. I want to make where the mouse position is, the character will warp there.. setting the coords x,y to Input.mouse_pos return x, y on the warp(id, x, y, width, height) does not make it.. what am i doing wrong?
Spoiler: code
Ruby:
#==============================================================================
# ■ module Input.mouse
#------------------------------------------------------------------------------
#  マウス入力情報を取得
#==============================================================================

=begin
  key = "MLB" or "MRB" or "MMB"
  Input.mouse_trigger?(key, ignore_swap = false)
  Input.mouse_press?(key, ignore_swap = false)
  Input.mouse_repeat?(key, ignore_swap = false)
  Input.mouse_pos    return x, y
=end

module Input
  @mouse_name = {"MLB"=>0, "MRB"=>1, "MMB"=>2}
  VK_LBUTTON = 1
  VK_RBUTTON = 2
  VK_MBUTTON = 4
  SM_SWAPBUTTON = 23
  @mouse_status = [[0, VK_LBUTTON, false], [0, VK_RBUTTON, false],
  [0, VK_MBUTTON, false]]

  # システム状態の検出
  gsm = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')

  # マウスカーソルの表示切替
  ShowCursor = Win32API.new("user32", "ShowCursor", "i", "i")

  # クラス変数
  # マウスボタンの左右の入れ替えの可否
  @swapped = gsm.call(SM_SWAPBUTTON) != 0
  # キー(ボタン)状態取得
  @gaks = Win32API.new('user32', 'GetAsyncKeyState', 'i', 'i')
  # マウスカーソル座標の取得
  @cursor_pos = Win32API.new('user32', 'GetCursorPos', 'p', 'i')
 
  # スクリーン座標からクライアント座標へ変換
  $scr2cli = Win32API.new('user32', 'ScreenToClient', %w(l p), 'i')
  #クライアント領域取得
  $client_rect = Win32API.new('user32', 'GetClientRect', %w(l p), 'i')
  # iniファイル読み込み
  $readini = Win32API.new('kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l')
  # ウィンドウハンドル取得
  $findwindow = Win32API.new('user32', 'FindWindowA', %w(p p), 'l')

  module_function
  #--------------------------------------------------------------------------
  # ● マウスのスクリーン座標
  #--------------------------------------------------------------------------
  def mouse_global_pos
    pos = [0, 0].pack('ll')
    # 呼び出しに成功した場合
    if @cursor_pos.call(pos) != 0
      return pos.unpack('ll')
    # 失敗した場合
    else
      return nil
    end
  end
  #--------------------------------------------------------------------------
  # ● マウスのクライアント座標
  #     catch_anywhere : ウィンドウ外にカーソルがあっても構わず座標を返す
  #--------------------------------------------------------------------------
  def mouse_pos(catch_anywhere = false)
    # スクリーン上のマウスカーソルの座標をクライアント座標に
    x, y = screen_to_client(*mouse_global_pos)
    # クライアント領域の大きさを取得
    width, height = client_size
    # 画面外でも構わない場合か画面内にカーソルがある場合
    if catch_anywhere or (x >= 0 and y >= 0 and x < width and y < height)
      return x, y
    else
      return nil
    end
  end
  #----------------------------------------------------------
  # ● 更新
  #----------------------------------------------------------
  def mouse_update
    for i in @mouse_status
      num1 = false
      num2 = @gaks.call(i[1])
      if num2 != 1 and num2 != 0
        num1 = true
      end
      if num1 == false
        if i[0] > 0
          i[2] = (i[0] < 25)    # シングルクリック判定
          i[0] = i[0] * -1
        else
          i[2] = false
          i[0] = 0
        end
      else
        if i[0] > 0
          i[0] += 1
        else
          i[2] = false
          i[0] = 1
        end
      end
    end
  end
  #----------------------------------------------------------
  # ● キー情報を返す。Inputとおなじ。
  #     id   キーID   ignore_swap 入れ替えを許可するかしないか
  #----------------------------------------------------------
  def mouse_press?(value, ignore_swap = false)
    id = @mouse_name[value]
    id = @mouse_name["MRB"] if value == "MLB" && @swapped && ignore_swap
    id = @mouse_name["MLB"] if value == "MRB" && @swapped && ignore_swap
    if @mouse_status[id][0] > 0
      return true
    else
      return false
    end
  end
  def mouse_trigger?(value, ignore_swap = false)
    id = @mouse_name[value]
    id = @mouse_name["MRB"] if value == "MLB" && @swapped && ignore_swap
    id = @mouse_name["MLB"] if value == "MRB" && @swapped && ignore_swap
    if @mouse_status[id][0] == 1
      return true
    else
      return false
    end
  end
  def mouse_repeat?(value, ignore_swap = false)
    id = @mouse_name[value]
    id = @mouse_name["MRB"] if value == "MLB" && @swapped && ignore_swap
    id = @mouse_name["MLB"] if value == "MRB" && @swapped && ignore_swap
    if @mouse_status[id][0] <= 0
      return false
    else
      if @mouse_status[id][0] % 5 == 1 and @mouse_status[id][0] / 5 != 1
        return true
      else
        return false
      end
    end
  end
  def mouse_single_click?(value, ignore_swap = false)
    id = @mouse_name[value]
    id = @mouse_name["MRB"] if value == "MLB" && @swapped && ignore_swap
    id = @mouse_name["MLB"] if value == "MRB" && @swapped && ignore_swap
    return @mouse_status[id][2]
  end
  #--------------------------------------------------------------------------
  # ● スクリーン座標からクライアント座標へ変換
  #     x, y : スクリーン座標
  #--------------------------------------------------------------------------
  def screen_to_client(x, y)
    # 座標が無効なら失敗
    return nil unless x and y
    pos = [x, y].pack('ll')
    # 呼び出しに成功した場合
    if $scr2cli.call(hwnd, pos) != 0
      return pos.unpack('ll')
    # 失敗した場合
    else
      return nil
    end
  end
  #--------------------------------------------------------------------------
  # ● ウィンドウハンドル取得
  #--------------------------------------------------------------------------
  def hwnd
    # ゲーム名を取得する
    game_name = "\0" * 256
    $readini.call('Game', 'Title', '', game_name, 255, ".\\Game.ini")
    game_name.delete!("\0")
    # ウィンドウハンドルを取得
    h = $findwindow.call('RGSS Player', game_name)
    if h == 0
      h = $findwindow.call('RGSS Player', nil)
    end
    return h
  end
  #--------------------------------------------------------------------------
  # ● クライアント領域取得
  #--------------------------------------------------------------------------
  def client_size
    rect = [0, 0, 0, 0].pack('l4')
    $client_rect.call(hwnd, rect)
    # topとleftは常に0なので省略
    right, bottom = rect.unpack('l4')[2..3]
    return right, bottom
  end
end

class Scene_Map
  alias mouse_update update
  def update
    Input.mouse_update
    mouse_update
  end
end
class Scene_Battle
  alias mouse_update update
  def update
    Input.mouse_update
    mouse_update
  end
end


#==============================================================================
# ■ Window_Message
#------------------------------------------------------------------------------
#  文章表示に使うメッセージウィンドウです。
#==============================================================================

class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  alias mmo_window_message_update update
  def update
    if cursor_movable?
      last_index = @index
      mx, my = Input.mouse_pos(true)
      x = $game_message.face_name.empty? ? 16 : 128
      y = self.y + 16 + $game_message.choice_start * WLH
      if my >= y and my < y + @item_max * WLH and mx >= x and mx < 528
        @index = (my - y) / WLH
      end
      Sound.play_cursor if @index != last_index
    end
    mmo_window_message_update
  end
  #--------------------------------------------------------------------------
  # ● 選択肢の入力処理
  #--------------------------------------------------------------------------
  def input_choice
    if Input.mouse_trigger?("MRB")
      if $game_message.choice_cancel_type > 0
        Sound.play_cancel
        $game_message.choice_proc.call($game_message.choice_cancel_type - 1)
        terminate_message
      end
    elsif Input.mouse_trigger?("MLB")
      # マウスカーソルが選択肢上にある場合のみ有効
      mx, my = Input.mouse_pos(true)
      x = $game_message.face_name.empty? ? 16 : 128
      y = self.y + 16 + $game_message.choice_start * WLH
      if my >= y and my < y + @item_max * WLH and mx >= x and mx < 528
        Sound.play_decision
        $game_message.choice_proc.call(self.index)
        terminate_message
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 文章送りの入力処理
  #--------------------------------------------------------------------------
  def input_pause
    if Input.mouse_trigger?("MRB") or Input.mouse_trigger?("MLB")
      self.pause = false
      if @text != nil and not @text.empty?
        new_page if @line_count >= MAX_LINE
      else
        terminate_message
      end
    end
  end
end
By the default the script should only work if you are watching a dialog window (aka player having a conversation with some NPC) on screen. It is supposed to run while on the map and in battle, but it doesn't specify what anybody there should do about your clicks.
By the default the script should only work if you are watching a dialog window (aka player having a conversation with some NPC) on screen. It is supposed to run while on the map and in battle, but it doesn't specify what anybody there should do about your clicks.
i see thank you. I'm using Tomoaky's MMO-style script..
i was thinking it would be very compatible. do you have any idea how to use the plugin command so that the mouse cursor position can be used?

there's only this lines i found related under Game_Character
Ruby:
  #--------------------------------------------------------------------------
  # ● 移動先座標の設定
  #--------------------------------------------------------------------------
  def set_target_pos(x, y)
    @target_pos_x = x
    @target_pos_y = y
    angle = Math.atan2(@target_pos_y - @real_y, @target_pos_x - @real_x )
    @vx = (Math.cos(angle) * battler.move_speed).to_i
    @vy = (Math.sin(angle) * battler.move_speed).to_i
    turn_forward    # 移動方向を向く
    update_bush_depth
  end
  #--------------------------------------------------------------------------
  # ● 移動先座標の設定(スクリーン座標で指定)
  #--------------------------------------------------------------------------
  def set_target_pos_screen(x, y)
    set_target_pos(@real_x + ((x - screen_x) << 3), @real_y + ((y - screen_y + 16) << 3))
  end
  #--------------------------------------------------------------------------
  # ● 移動先座標を返す
  #--------------------------------------------------------------------------
  def get_target_pos
    return @target_pos_x, @target_pos_y
  end

Original thread: https://forums.rpgmakerweb.com/threads/rgss2-tomoaky-warp.154218/