设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2158|回复: 2
打印 上一主题 下一主题

[已经解决] 新人想弄一个XP的整队系统

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2323
在线时间
207 小时
注册时间
2019-3-30
帖子
171
跳转到指定楼层
1
发表于 2019-4-7 12:56:03 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
我是一个不懂脚本的脚本盲,就是想弄一个整队系统的脚本

捕获.PNG (251.04 KB, 下载次数: 11)

捕获.PNG

Lv5.捕梦者

梦石
0
星屑
33168
在线时间
10488 小时
注册时间
2009-3-15
帖子
4756
2
发表于 2019-4-7 14:45:42 | 只看该作者
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #==============================================================================  
  4.  
  5. # ▼▲▼ XRXS26. 人物扩张系统 ver..05 ▼▲▼
  6. # by 桜雅 在土
  7.  
  8. #==============================================================================
  9. # □ 初始化定义
  10. #==============================================================================
  11. module XRXS26
  12.   FRONT_MEMBER_LIMIT    = 4     # 战斗参战人数最大值
  13.   BACKWARD_MEMBER_LIMIT = 99    # 待机人数最大值
  14.   BACKWARD_EXP_GAINABLE = true     # 待机人物是否获得经验
  15.   MENU_STATUS_STRETCH   = false    # 3人以下的时候,菜单是否拉伸大小
  16. end
  17. #------------------------------------------------------------------------------
  18. # 菜单页面状态
  19. #------------------------------------------------------------------------------
  20. class Window_MenuStatus < Window_Selectable
  21.   # 列数
  22.   COLUMN_MAX = 1
  23.   # 光标高度
  24.   CURSOR_HEIGHT = 96
  25.   # 一行的高度
  26.   LINE_HEIGHT = 116
  27. end
  28. #------------------------------------------------------------------------------
  29. # 菜单场景
  30. #------------------------------------------------------------------------------
  31. class Scene_Menu
  32.   MENU_MEMBER_CHANGE_KEY_GO    = Input::RIGHT # 进入键
  33.   MENU_MEMBER_CHANGE_KEY_END   = Input::LEFT  # 离开键
  34.   MENU_MEMBER_CHANGE_INDEX_MIN = 0            # 可更换角色最小编号
  35.   FORCETOBATTLE_ACTORS         = []           # 不能待机的角色编号
  36.   UMBATTLABLE_ACTORS           = []           # 不能加入战斗的角色编号
  37.   UNMOVABLE_ACTORS             = []           # 不能移动的角色编号
  38. end
  39. #------------------------------------------------------------------------------
  40. #
  41. # 解説
  42. #    Game_Partyの @actors のうち先頭から↑FRONT_MEMBER_LIMIT番目までのアクターを
  43. #   戦闘メンバーとして、それ以上を待機メンバーとして扱います。
  44. #
  45. #==============================================================================
  46. # ■ Game_Party
  47. #==============================================================================
  48. class Game_Party
  49.   #--------------------------------------------------------------------------
  50.   # ○ インクルード
  51.   #--------------------------------------------------------------------------
  52.   include XRXS26
  53.   #--------------------------------------------------------------------------
  54.   # ○ 公開インスタンス変数
  55.   #--------------------------------------------------------------------------
  56.   attr_reader   :backword_actors          # 待機アクター
  57.   #--------------------------------------------------------------------------
  58.   # ● オブジェクト初期化
  59.   #--------------------------------------------------------------------------
  60.   alias xrxs26_initialize initialize
  61.   def initialize
  62.     xrxs26_initialize
  63.     # 待機メンバー配列を初期化
  64.     @backword_actors = []
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● アクターを加える
  68.   #--------------------------------------------------------------------------
  69.   def add_actor(actor_id)
  70.     # アクターを取得
  71.     actor = $game_actors[actor_id]
  72.     # このアクターがパーティにいない場合
  73.     if not @actors.include?(actor)
  74.       # 満員でないならメンバーに追加
  75.       if @actors.size < (FRONT_MEMBER_LIMIT + BACKWARD_MEMBER_LIMIT)
  76.         # アクターを追加
  77.         @actors.push(actor)
  78.         # プレイヤーをリフレッシュ
  79.         $game_player.refresh
  80.       end
  81.     end
  82.   end
  83. end
  84. #==============================================================================
  85. # ■ Spriteset_Battle
  86. #==============================================================================
  87. class Spriteset_Battle
  88.   #--------------------------------------------------------------------------
  89.   # ● インクルード
  90.   #--------------------------------------------------------------------------
  91.   include XRXS26
  92.   #--------------------------------------------------------------------------
  93.   # ● フレーム更新
  94.   #--------------------------------------------------------------------------
  95.   alias xrxs26_initialize initialize
  96.   def initialize
  97.     xrxs26_initialize
  98.     #
  99.     # 以下、五人目以降のアクタースプライトの追加処理---
  100.     #
  101.     # アクターが表示されるビューポートを、とりあえず先頭の人から取得しとく(素
  102.     actor_viewport = @actor_sprites[0].viewport
  103.     # 戦闘参加メンバーが5人以上の場合
  104.     if FRONT_MEMBER_LIMIT > 4
  105.       for i in 5..FRONT_MEMBER_LIMIT
  106.         # アクタースプライトを追加
  107.         @actor_sprites.push(Sprite_Battler.new(actor_viewport))
  108.         @actor_sprites[i-1].battler = $game_party.actors[i-1]
  109.       end
  110.     end
  111.     # ビューポートを更新
  112.     actor_viewport.update
  113.   end
  114. end
  115. #==============================================================================
  116. # ■ Scene_Battle
  117. #==============================================================================
  118. class Scene_Battle
  119.   #--------------------------------------------------------------------------
  120.   # ● インクルード
  121.   #--------------------------------------------------------------------------
  122.   include XRXS26
  123.   #--------------------------------------------------------------------------
  124.   # ● メイン処理 をパーティメンバー処理ではさむ
  125.   #--------------------------------------------------------------------------
  126.   alias xrxs26_main main
  127.   def main
  128.     # 待機メンバーへ退避----------
  129.     $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  130.     $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  131.     $game_party.actors.compact!
  132.     # メイン処理
  133.     xrxs26_main
  134.     # 待機メンバーから復帰
  135.     $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  136.     $game_party.backword_actors.clear
  137.   end
  138.   #--------------------------------------------------------------------------
  139.   # ● アフターバトルフェーズ開始
  140.   #--------------------------------------------------------------------------
  141.   alias xrxs26_start_phase5 start_phase5
  142.   def start_phase5
  143.     # 「待機メンバー経験値獲得」が有効 and 待機アクターが一人以上いる
  144.     if BACKWARD_EXP_GAINABLE and $game_party.backword_actors.size >= 1
  145.       # 待機メンバーから復帰
  146.       $game_party.actors[$game_party.actors.size,0] = $game_party.backword_actors
  147.       $game_party.backword_actors.clear
  148.       # 呼び戻す
  149.       xrxs26_start_phase5
  150.       # 待機メンバーへ退避----------
  151.       $game_party.backword_actors[0,0] = $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT]
  152.       $game_party.actors[FRONT_MEMBER_LIMIT, BACKWARD_MEMBER_LIMIT] = nil
  153.       $game_party.actors.compact!
  154.     else
  155.       # 呼び戻す
  156.       xrxs26_start_phase5
  157.     end
  158.   end
  159. end
  160. # ▽△▽ XRXL 4. 第二カーソル 機構 ▽△▽
  161. # by 桜雅 在土
  162.  
  163. #==============================================================================
  164. # --- XRXS. 第二カーソル 機構 ---
  165. #------------------------------------------------------------------------------
  166. #     ウィンドウに .index2 プロパティを追加します。
  167. #==============================================================================
  168. module XRXS_Cursor2
  169.   #--------------------------------------------------------------------------
  170.   # ● オブジェクト初期化
  171.   #--------------------------------------------------------------------------
  172.   def initialize(x, y, w, h)
  173.     super(x, y, h, w)
  174.     # 補助ウィンドウ(透明)を作成:カーソル専用
  175.     @xrxsc2_window = Window_Selectable.new(self.x, self.y, self.width, self.height)
  176.     @xrxsc2_window.opacity = 0
  177.     @xrxsc2_window.active = false
  178.     @xrxsc2_window.index = -1
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ○ 第二カーソルの設置
  182.   #--------------------------------------------------------------------------
  183.   def index2
  184.     return @xrxsc2_window.index
  185.   end
  186.   def index2=(index)
  187.     @xrxsc2_window.index = index
  188.     if index == -1
  189.       @xrxsc2_window.cursor_rect.empty
  190.     else
  191.       @xrxsc2_window.x = self.x
  192.       @xrxsc2_window.y = self.y
  193.       @xrxsc2_window.cursor_rect = self.cursor_rect
  194.     end
  195.   end
  196.   #--------------------------------------------------------------------------
  197.   # ○ 先頭の行の設定
  198.   #--------------------------------------------------------------------------
  199.   def top_row=(row)
  200.     super
  201.     # 補助ウィンドウの oy を更新
  202.     pre_oy = @xrxsc2_window.oy
  203.     @xrxsc2_window.oy = self.oy
  204.     @xrxsc2_window.cursor_rect.y -= self.oy - pre_oy
  205.   end
  206.   #--------------------------------------------------------------------------
  207.   # ○ 解放
  208.   #--------------------------------------------------------------------------
  209.   def dispose
  210.     @xrxsc2_window.dispose
  211.     super
  212.   end
  213.   #--------------------------------------------------------------------------
  214.   # ○ X, Y 座標
  215.   #--------------------------------------------------------------------------
  216.   def x=(n)
  217.     super
  218.     @xrxsc2_window.x = self.x unless @xrxsc2_window.nil?
  219.   end
  220.   def y=(n)
  221.     super
  222.     @xrxsc2_window.y = self.y unless @xrxsc2_window.nil?
  223.   end
  224. end
  225. # ▼▲▼ XRXS26AX. +入れ替えメニュー ver.2 ▼▲▼ built 081113
  226. # by 桜雅 在土
  227.  
  228. #==============================================================================
  229. # ■ Window_MenuStatus
  230. #==============================================================================
  231. class Window_MenuStatus < Window_Selectable
  232.   #--------------------------------------------------------------------------
  233.   # ○ インクルード
  234.   #--------------------------------------------------------------------------
  235.   include XRXS26
  236.   include XRXS_Cursor2
  237.   #--------------------------------------------------------------------------
  238.   # ● 公開インスタンス変数
  239.   #--------------------------------------------------------------------------
  240.   attr_reader   :column_max             # 列数
  241.   #--------------------------------------------------------------------------
  242.   # ● オブジェクト初期化
  243.   #--------------------------------------------------------------------------
  244.   def initialize
  245.     h = 480
  246.     if MENU_STATUS_STRETCH
  247.       h = FRONT_MEMBER_LIMIT * 116 + 16
  248.     end
  249.     super(0, 0, 480, h)
  250.     h = ($game_party.actors.size - 1) * LINE_HEIGHT + CURSOR_HEIGHT
  251.     self.contents = Bitmap.new(width - 32, h)
  252.     refresh
  253.     self.active = false
  254.     self.index = -1
  255.   end
  256.   #--------------------------------------------------------------------------
  257.   # ○ 1 ページに表示できる行数の取得
  258.   #--------------------------------------------------------------------------
  259.   def page_row_max
  260.     if MENU_STATUS_STRETCH
  261.       return FRONT_MEMBER_LIMIT          # 戦闘パーティ最大数
  262.     else
  263.       return [FRONT_MEMBER_LIMIT, 4].max # 戦闘パーティ最大数(最低4)
  264.     end
  265.   end
  266.   #--------------------------------------------------------------------------
  267.   # ○ 先頭の行の取得
  268.   #--------------------------------------------------------------------------
  269.   def top_row
  270.     # ウィンドウ内容の転送元 Y 座標を、1 行の高さ LINE_HEIGHT で割る
  271.     return self.oy / LINE_HEIGHT
  272.   end
  273.   #--------------------------------------------------------------------------
  274.   # ○ 先頭の行の設定
  275.   #--------------------------------------------------------------------------
  276.   def top_row=(row)
  277.     super
  278.     self.oy = self.oy/32 * LINE_HEIGHT
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # ● カーソルの矩形更新
  282.   #--------------------------------------------------------------------------
  283.   def update_cursor_rect
  284.     super
  285.     unless @index < 0
  286.       y = (self.cursor_rect.y + self.oy) * LINE_HEIGHT/32 - self.oy
  287.       self.cursor_rect.set(0, y, self.cursor_rect.width, CURSOR_HEIGHT)
  288.     end
  289.   end
  290. end
  291. #==============================================================================
  292. # ■ Scene_Menu
  293. #==============================================================================
  294. class Scene_Menu
  295.   #--------------------------------------------------------------------------
  296.   # ○ インクルード
  297.   #--------------------------------------------------------------------------
  298.   include XRXS26
  299.   #--------------------------------------------------------------------------
  300.   # ● フレーム更新
  301.   #--------------------------------------------------------------------------
  302.   alias xrxs26ax_update update
  303.   def update
  304.     # インデックスを保存
  305.     @status_index = @status_window.index
  306.     # 呼び戻す
  307.     xrxs26ax_update
  308.   end
  309.   #--------------------------------------------------------------------------
  310.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  311.   #--------------------------------------------------------------------------
  312.   alias xrxs26ax_update_command update_command
  313.   def update_command
  314.     # 呼び戻す
  315.     xrxs26ax_update_command
  316.     # 入れ替え移行キーが押されたとき、@command_window.indexが設定値以上
  317.     if Input.trigger?(MENU_MEMBER_CHANGE_KEY_GO) and
  318.        @command_window.index >= MENU_MEMBER_CHANGE_INDEX_MIN
  319.       # 決定 SE を演奏
  320.       $game_system.se_play($data_system.decision_se)
  321.       # カーソル位置を記憶
  322.       @command_index_before_menu_member_change = @command_window.index
  323.       # 入れ替えウィンドウへ移行
  324.       @command_window.active = false
  325.       @command_window.index = -1
  326.       @status_window.active = true
  327.       @status_window.index = 0
  328.     end
  329.   end
  330.   #--------------------------------------------------------------------------
  331.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  332.   #--------------------------------------------------------------------------
  333.   alias xrxs26ax_update_status update_status
  334.   def update_status
  335.     # 呼び戻す
  336.     if @command_window.index != -1
  337.       xrxs26ax_update_status
  338.       return
  339.     end
  340.     # B ボタンか入れ替え終了キーが押されたとき
  341.     if ((Input.trigger?(Input::B) or Input.trigger?(MENU_MEMBER_CHANGE_KEY_END)) and
  342.         @status_window.index2 == -1 and
  343.         @status_index%@status_window.column_max == 0)
  344.       # キャンセル SE を演奏
  345.       $game_system.se_play($data_system.cancel_se)
  346.       # コマンドウィンドウをアクティブにする
  347.       @command_window.active = true
  348.       @command_window.index = 0
  349.       @status_window.active = false
  350.       @status_window.index = -1
  351.       return
  352.     end
  353.     # B ボタンが押されたとき
  354.     if Input.trigger?(Input::B) and @status_window.index2 >= 0
  355.       @status_window.index = @status_window.index2
  356.       @status_window.index2 = -1
  357.       return
  358.     end
  359.     # 決定キーが押されたとき
  360.     if Input.trigger?(Input::C)
  361.       if @status_window.index2 == -1
  362.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  363.           # ブザー SE を演奏
  364.           $game_system.se_play($data_system.buzzer_se)
  365.           return
  366.         end
  367.         # 決定 SE を演奏
  368.         $game_system.se_play($data_system.decision_se)
  369.         # メンバーの入れ替え一人目の決定
  370.         @status_window.index2 = @status_window.index
  371.       else
  372.         if UNMOVABLE_ACTORS.include?($game_party.actors[@status_window.index].id)
  373.           # ブザー SE を演奏
  374.           $game_system.se_play($data_system.buzzer_se)
  375.           return
  376.         end
  377.         # どちらかが戦闘メンバー かつ どちらかが戦闘禁止アクター の場合
  378.         if (@status_window.index < FRONT_MEMBER_LIMIT or
  379.             @status_window.index2 < FRONT_MEMBER_LIMIT) and
  380.            (UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  381.             UMBATTLABLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  382.           # ブザー SE を演奏
  383.           $game_system.se_play($data_system.buzzer_se)
  384.           return
  385.         end
  386.         # どちらかが待機メンバー かつ どちらかが待機禁止アクター の場合
  387.         if (@status_window.index >= FRONT_MEMBER_LIMIT or
  388.             @status_window.index2 >= FRONT_MEMBER_LIMIT) and
  389.            (FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index].id) or
  390.             FORCETOBATTLE_ACTORS.include?($game_party.actors[@status_window.index2].id))
  391.           # ブザー SE を演奏
  392.           $game_system.se_play($data_system.buzzer_se)
  393.           return
  394.         end
  395.         # 決定 SE を演奏
  396.         $game_system.se_play($data_system.decision_se)
  397.         # メンバーの入れ替え二人目の決定と入れ替えの実行
  398.         actor2 = $game_party.actors[@status_window.index]
  399.         actor = $game_party.actors[@status_window.index2]
  400.         $game_party.actors[@status_window.index2] = actor2
  401.         $game_party.actors[@status_window.index] = actor
  402.         @status_window.index = @status_window.index2
  403.         @status_window.index2 = -1
  404.         # プレイヤーをリフレッシュ
  405.         $game_player.refresh
  406.         # ステータスウィンドウをリフレッシュ
  407.         @status_window.refresh
  408.       end
  409.       return
  410.     end
  411.   end
  412. end
  413.  
  414.  
  415.  
  416.  
  417. #============================================================================================
  418. # 本脚本来自[url]www.66RPG.com[/url],转载和使用请保留此信息
  419. #============================================================================================
  420.  
  421. # ▼▲▼ XRXS26BX. +BUZZデザイン ▼▲▼ built 033109
  422. # by 桜雅 在土
  423.  
  424. #==============================================================================
  425. # □ 初始化定义
  426. #==============================================================================
  427. class Window_MenuStatus < Window_Selectable
  428.   #
  429.   # 不显示能力值的角色编号
  430.   #
  431.   NO_PARAMETER_ACTORS = []
  432. end
  433. #==============================================================================
  434. # ■ Window_MenuStatus
  435. #==============================================================================
  436. class Window_MenuStatus < Window_Selectable
  437.   #--------------------------------------------------------------------------
  438.   # ○ インクルード
  439.   #--------------------------------------------------------------------------
  440.   include XRXS26
  441.   #--------------------------------------------------------------------------
  442.   # ● 公開インスタンス変数
  443.   #--------------------------------------------------------------------------
  444.   attr_reader   :newitem_window
  445.   attr_reader   :bottomkeyhelp_window
  446.   #--------------------------------------------------------------------------
  447.   # ● オブジェクト初期化
  448.   #--------------------------------------------------------------------------
  449.   alias xrxs26bx_initialize initialize
  450.   def initialize
  451.     # 呼び戻す
  452.     xrxs26bx_initialize
  453.     # 寄生してウィンドウを作成
  454.     # ボトルキーヘルプウィンドウ
  455.     @bottomkeyhelp_window = Window_BottomKeyHelp.new
  456.     @bottomkeyhelp_window.visible = false
  457.     # 設定変更
  458.     self.height   = 448
  459.     self.contents = Bitmap.new(width - 32, height - 32)
  460.     self.opacity = 160
  461.     refresh
  462.   end
  463.   #--------------------------------------------------------------------------
  464.   # ● リフレッシュ
  465.   #--------------------------------------------------------------------------
  466.   def refresh
  467.     self.contents.clear
  468.     @item_max = $game_party.actors.size
  469.     @column_max = 2
  470.     y = (FRONT_MEMBER_LIMIT+1)/2 * 64 + 28
  471.     self.contents.font.size = 16
  472.     self.contents.font.color = system_color
  473.     self.contents.draw_text(4, 0, 92, 28, "战斗人数")
  474.     self.contents.draw_text(4, y, 92, 28, "待机人数")
  475.     for i in 0...$game_party.actors.size
  476.       x = 64 + i%2 * 224
  477.       y = i/2 *  72 + 24
  478.       actor = $game_party.actors[i]
  479.       if i >= FRONT_MEMBER_LIMIT
  480.         y += 32
  481.         self.contents.font.color = disabled_color
  482.         self.contents.draw_text(x, y, 120, 32, actor.name)
  483.       else
  484.         draw_actor_name(actor   , x     , y     )
  485.       end
  486.       draw_actor_graphic(actor, x - 40, y + 64)
  487.       unless NO_PARAMETER_ACTORS.include?(actor.id)
  488.         draw_actor_level(actor  , x + 94, y     )
  489.         draw_actor_hp(actor     , x, y + 16)
  490.         draw_actor_sp(actor     , x, y + 32)
  491.         draw_actor_state(actor  , x, y + 48)
  492.       end
  493.     end
  494.   end
  495.   #--------------------------------------------------------------------------
  496.   # ○ フレーム更新
  497.   #--------------------------------------------------------------------------
  498.   def update
  499.     # ウィンドウを更新
  500.     @bottomkeyhelp_window.update
  501.     super
  502.   end
  503.   #--------------------------------------------------------------------------
  504.   # ○ 解放
  505.   #--------------------------------------------------------------------------
  506.   def dispose
  507.     @bottomkeyhelp_window.dispose
  508.     super
  509.   end
  510.   #--------------------------------------------------------------------------
  511.   # ● カーソルの矩形更新
  512.   #--------------------------------------------------------------------------
  513.   def update_cursor_rect
  514.     if @index < 0
  515.       self.cursor_rect.empty
  516.     else
  517.       y = @index/2 * 72 + 28
  518.       if @index >= FRONT_MEMBER_LIMIT
  519.         y += 32
  520.       end
  521.       self.cursor_rect.set(@index%2 * 224, y, 224, 72)
  522.     end
  523.   end
  524. end
  525. #==============================================================================
  526. # ■ Scene_Menu
  527. #==============================================================================
  528. class Scene_Menu
  529.   #--------------------------------------------------------------------------
  530.   # ● フレーム更新
  531.   #--------------------------------------------------------------------------
  532.   alias xrxs26bx_update update
  533.   def update
  534.     # 登録
  535.     if @bottomkeyhelp_window.nil?
  536.       @bottomkeyhelp_window = @status_window.bottomkeyhelp_window
  537.       @bottomkeyhelp_window.visible = true
  538.       set_keyhelp1
  539.     end
  540.     # 呼び戻す
  541.     xrxs26bx_update
  542.   end
  543.   #--------------------------------------------------------------------------
  544.   # ● フレーム更新 (コマンドウィンドウがアクティブの場合)
  545.   #--------------------------------------------------------------------------
  546.   alias xrxs26bx_update_command update_command
  547.   def update_command
  548.     # 呼び戻す
  549.     xrxs26bx_update_command
  550.     # 入れ替え移行キーが押されたとき
  551.     if @command_window.index == -1 and @status_window.active
  552.       set_keyhelp2
  553.     end
  554.   end
  555.   #--------------------------------------------------------------------------
  556.   # ● フレーム更新 (ステータスウィンドウがアクティブの場合)
  557.   #--------------------------------------------------------------------------
  558.   alias xrxs26bx_update_status update_status
  559.   def update_status
  560.     # 保存
  561.     last_index = @status_window.index2
  562.     # 呼び戻す
  563.     xrxs26bx_update_status
  564.     #
  565.     if last_index != @status_window.index2
  566.       # 一人目を選択した場合
  567.       if @status_window.index2 >= 0
  568.         set_keyhelp3
  569.       else
  570.         set_keyhelp2
  571.       end
  572.     end
  573.     # 戻った場合
  574.     unless @status_window.active
  575.       set_keyhelp1
  576.     end
  577.   end
  578.   #--------------------------------------------------------------------------
  579.   # ○ キーヘルプを設定 1
  580.   #--------------------------------------------------------------------------
  581.   def set_keyhelp1
  582.     @bottomkeyhelp_window.clear
  583.     @bottomkeyhelp_window.add("B","关闭本窗口")
  584.     @bottomkeyhelp_window.add("C","确定")
  585.     @bottomkeyhelp_window.add("→","人物顺序调整")
  586.   end
  587.   #--------------------------------------------------------------------------
  588.   # ○ キーヘルプを設定 2
  589.   #--------------------------------------------------------------------------
  590.   def set_keyhelp2
  591.     @bottomkeyhelp_window.clear
  592.     @bottomkeyhelp_window.add("←,B","返回")
  593.     @bottomkeyhelp_window.add("C","第一个人物确定")
  594.   end
  595.   #--------------------------------------------------------------------------
  596.   # ○ キーヘルプを設定 3
  597.   #--------------------------------------------------------------------------
  598.   def set_keyhelp3
  599.     @bottomkeyhelp_window.clear
  600.     @bottomkeyhelp_window.add("B","返回")
  601.     @bottomkeyhelp_window.add("C","第二个人物确定")
  602.   end
  603. end
  604.  
  605.  
  606.  
  607. #==============================================================================
  608. # □ Window_BottomKeyHelp
  609. #------------------------------------------------------------------------------
  610. #     画面下で操作説明をする透明なウィンドウです。
  611. #==============================================================================
  612. class Window_BottomKeyHelp < Window_Base
  613.   #--------------------------------------------------------------------------
  614.   # ○ オブジェクト初期化
  615.   #--------------------------------------------------------------------------
  616.   def initialize
  617.     super(0, 432, 640, 64)
  618.     self.contents = Bitmap.new(width - 32, height - 32)
  619.     self.opacity = 0
  620.     clear
  621.   end
  622.   #--------------------------------------------------------------------------
  623.   # ○ クリア
  624.   #--------------------------------------------------------------------------
  625.   def clear
  626.     self.contents.clear
  627.     @now_x = 608
  628.   end
  629.   #--------------------------------------------------------------------------
  630.   # ○ 追加
  631.   #--------------------------------------------------------------------------
  632.   def add(key, explanation)
  633.     # 計算
  634.     self.contents.font.size = 20
  635.     x  = self.contents.text_size(key).width
  636.     self.contents.font.size = 16
  637.     x += self.contents.text_size(explanation).width + 8
  638.     @now_x -= x
  639.     # 描写
  640.     self.contents.font.size = 20
  641.     self.contents.font.color = system_color
  642.     self.contents.draw_text(@now_x, 0, x, 32, key, 0)
  643.     self.contents.font.size = 16
  644.     self.contents.font.color = normal_color
  645.     self.contents.draw_text(@now_x, 0, x, 32, explanation, 2)
  646.     # 余白
  647.     @now_x -= 32
  648.   end
  649. end
  650.  
  651. #==============================================================================
  652. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  653. #==============================================================================

评分

参与人数 1星屑 +50 收起 理由
RyanBern + 50 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2323
在线时间
207 小时
注册时间
2019-3-30
帖子
171
3
 楼主| 发表于 2019-4-7 18:16:52 | 只看该作者
soulsaga 发表于 2019-4-7 14:45
#==============================================================================
# 本脚本来自www.66RP ...

好了,感谢大佬的帮助
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-25 05:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表