Project1

标题: 各位大大有没有换领队的脚本 [打印本页]

作者: 花归葬。    时间: 2013-8-27 08:34
标题: 各位大大有没有换领队的脚本
RT  注意是在菜单里更换领队 不是在游戏画面按键更换   我记得以前6R有这个脚本 但我TM删了。。现在找不到了{:2_270:}
作者: 小小猪猪    时间: 2013-8-27 10:30
本帖最后由 小小猪猪 于 2013-8-27 10:31 编辑


请LZ善用搜索
脚本功能
菜单中调整队伍顺序,非常简单易用

使用方法
全选后插入在main的前面。如果仅需算法,请自己看脚本(黑暗圣剑传说就是单独用了这个的算法,其实简单得要命= =)

脚本内容:
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  3. #==============================================================================
  4. class Scene_Menu
  5. # --------------------------------
  6.   def initialize(menu_index = 0)
  7.     @menu_index = menu_index
  8.     @changer = 0
  9.     @where = 0
  10.     @checker = 0
  11.   end
  12. # --------------------------------
  13.   def main
  14.     s1 = $data_system.words.item
  15.     s2 = $data_system.words.skill
  16.     s3 = $data_system.words.equip
  17.     s4 = "状态"
  18.     s5 = "储存进度"
  19.     s6 = "离开游戏"
  20.     s7 = "调整队伍"
  21.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
  22.     @command_window.index = @menu_index
  23.     if $game_party.actors.size == 0
  24.       @command_window.disable_item(0)
  25.       @command_window.disable_item(1)
  26.       @command_window.disable_item(2)
  27.       @command_window.disable_item(3)
  28.     end
  29.     if $game_system.save_disabled
  30.       @command_window.disable_item(4)
  31.     end
  32.     if $game_party.actors.size == 1
  33.       @command_window.disable_item(6)
  34.     end
  35.     @playtime_window = Window_PlayTime.new
  36.     @playtime_window.x = 0
  37.     @playtime_window.y = 256
  38.     @gold_window = Window_Gold.new
  39.     @gold_window.x = 0
  40.     @gold_window.y = 416
  41.     @status_window = Window_MenuStatus.new
  42.     @status_window.x = 160
  43.     @status_window.y = 0
  44.     Graphics.transition
  45.     loop do
  46.       Graphics.update
  47.       Input.update
  48.       update
  49.       if $scene != self
  50.         break
  51.       end
  52.     end
  53.     Graphics.freeze
  54.     @command_window.dispose
  55.     @playtime_window.dispose
  56.     @gold_window.dispose
  57.     @status_window.dispose
  58.   end
  59. # --------------------------------
  60.   def update
  61.     @command_window.update
  62.     @playtime_window.update
  63.     @gold_window.update
  64.     @status_window.update
  65.     if @command_window.active
  66.       update_command
  67.       return
  68.     end
  69.     if @status_window.active
  70.       update_status
  71.       return
  72.     end
  73.   end
  74. # --------------------------------
  75.   def update_command
  76.     if Input.trigger?(Input::B)
  77.       $game_system.se_play($data_system.cancel_se)
  78.       $scene = Scene_Map.new
  79.       return
  80.     end
  81.     if Input.trigger?(Input::C)
  82.       if $game_party.actors.size == 0 and @command_window.index < 4
  83.         $game_system.se_play($data_system.buzzer_se)
  84.         return
  85.       end
  86.       if $game_party.actors.size == 1 and @command_window.index ==6
  87.         $game_system.se_play($data_system.buzzer_se)
  88.         return
  89.       end
  90.       case @command_window.index
  91.       when 0
  92.         $game_system.se_play($data_system.decision_se)
  93.         $scene = Scene_Item.new
  94.       when 1
  95.         $game_system.se_play($data_system.decision_se)
  96.         @command_window.active = false
  97.         @status_window.active = true
  98.         @status_window.index = 0
  99.       when 2
  100.         $game_system.se_play($data_system.decision_se)
  101.         @command_window.active = false
  102.         @status_window.active = true
  103.         @status_window.index = 0
  104.       when 3
  105.         $game_system.se_play($data_system.decision_se)
  106.         @command_window.active = false
  107.         @status_window.active = true
  108.         @status_window.index = 0
  109.       when 4
  110.         if $game_system.save_disabled
  111.           $game_system.se_play($data_system.buzzer_se)
  112.           return
  113.         end
  114.         $game_system.se_play($data_system.decision_se)
  115.         $scene = Scene_Save.new
  116.       when 5
  117.         $game_system.se_play($data_system.decision_se)
  118.         $scene = Scene_End.new
  119.       when 6
  120.         $game_system.se_play($data_system.decision_se)
  121.         @checker = 0
  122.         @command_window.active = false
  123.         @status_window.active = true
  124.         @status_window.index = 0
  125.       end
  126.       return
  127.     end
  128.   end
  129. # --------------------------------
  130.   def update_status
  131.     if Input.trigger?(Input::B)
  132.       $game_system.se_play($data_system.cancel_se)
  133.       @command_window.active = true
  134.       @status_window.active = false
  135.       @status_window.index = -1
  136.       return
  137.     end
  138.     if Input.trigger?(Input::C)
  139.       case @command_window.index
  140.       when 1
  141.         if $game_party.actors[@status_window.index].restriction >= 2
  142.           $game_system.se_play($data_system.buzzer_se)
  143.           return
  144.         end
  145.         $game_system.se_play($data_system.decision_se)
  146.         $scene = Scene_Skill.new(@status_window.index)
  147.       when 2
  148.         $game_system.se_play($data_system.decision_se)
  149.         $scene = Scene_Equip.new(@status_window.index)
  150.       when 3
  151.         $game_system.se_play($data_system.decision_se)
  152.         $scene = Scene_Status.new(@status_window.index)
  153.       when 6
  154.         $game_system.se_play($data_system.decision_se)
  155.         if @checker == 0
  156.           @changer = $game_party.actors[@status_window.index]
  157.           @where = @status_window.index
  158.           @checker = 1
  159.         else
  160.           $game_party.actors[@where] = $game_party.actors[@status_window.index]
  161.           $game_party.actors[@status_window.index] = @changer
  162.           @checker = 0
  163.           @status_window.refresh
  164.         end
  165.       end
  166.       return
  167.     end
  168.   end
  169. end
  170. #==============================================================================
  171. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  172. #==============================================================================


作者: 花归葬。    时间: 2013-8-27 10:57
小小猪猪 发表于 2013-8-27 10:30
请LZ善用搜索
脚本功能
菜单中调整队伍顺序,非常简单易用

我的意思是地图上显示的人物像素图能这样变化  你这个脚本已经有了




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1