Project1

标题: 请问这个雇佣兵脚本如何增加第三章 [打印本页]

作者: j296196585    时间: 2016-12-6 03:05
标题: 请问这个雇佣兵脚本如何增加第三章
本帖最后由 j296196585 于 2016-12-15 00:36 编辑

RUBY 代码复制
  1. =begin 简单说明:                             【考虑到帮助窗口会盖住后边文本】
  2. 头像素材名称就是角色ID.png的图像              【所以,在系统中按下F5,会隐藏】
  3. 例如:阿尔西斯的头像素材名就该是 “1.png”    【帮助窗口(包括角色信息窗口和】
  4. 也可在脚本631行修改。                         【一般的命令选择行窗口)      】
  5. 融入了多货币系统,初始值在脚本81行修改
  6. 如果脚本有BUG欢迎联系作者薄凉看客。
  7.  
  8. $game_temp.gold_bule += 100
  9. $game_temp.gold_red += 100
  10. $game_temp.gold_yellow += 100
  11. $game_temp.gold_green += 100
  12.  
  13. =end
  14. # ------------------------------------------
  15. # * Scene_Battle
  16. # ------------------------------------------
  17. class Scene_Battle
  18.   # ------------------------------------------
  19.   # * battle_end
  20.   # ------------------------------------------
  21.   def battle_end(result)#(0:胜利 1:失败 2:逃跑)
  22.     # 清除战斗中标志
  23.     $game_temp.in_battle = false
  24.     # 清除全体同伴的行动
  25.     $game_party.clear_actions
  26.     # 解除战斗用状态
  27.     for actor in $game_party.actors
  28.       actor.remove_states_battle
  29.     end
  30.     # 清除敌人
  31.     $game_troop.enemies.clear
  32.     # 调用战斗返回
  33.     if $game_temp.battle_proc != nil
  34.       $game_temp.battle_proc.call(result)
  35.       $game_temp.battle_proc = nil
  36.     end
  37.     # 处理战斗场次
  38.     if $game_temp.actors != []
  39.       for i in $game_temp.actors
  40.       id = i.id
  41.       time = $game_temp.actors_time_2[id] -= 1
  42.       if time == 0
  43.         $game_party.remove_actor(id)
  44.         $game_temp.actors_time_2[id] = $game_temp.actors_time[id]
  45.       end
  46.       end
  47.       $game_temp.actors = []
  48.       for i in 19..39
  49.       if i == 29
  50.         next
  51.       end
  52.       if $game_party.actors.include?($game_actors[i])
  53.       $game_temp.actors << $game_actors[i]
  54.       end
  55.       end
  56.     end
  57.     # 切换到地图画面
  58.     $scene = Scene_Map.new
  59.   end
  60. end
  61. # ------------------------------------------
  62. # * Game_Temp
  63. # ------------------------------------------
  64. class Game_Temp
  65.   # ------------------------------------------
  66.   # * $gold
  67.   # ------------------------------------------
  68.   attr_accessor :gold_bule
  69.   attr_accessor :gold_red
  70.   attr_accessor :gold_yellow
  71.   attr_accessor :gold_green
  72.   # ------------------------------------------
  73.   # * $ actors
  74.   # ------------------------------------------
  75.   attr_accessor :actors#队伍中雇佣角色(actors)的数组
  76.   attr_accessor :actors_2#仓库中雇佣角色(actors)的数组
  77.   # ------------------------------------------
  78.   # * $ 剩余战斗次数
  79.   # ------------------------------------------
  80.   attr_accessor :actors_time
  81.   attr_accessor :actors_time_2
  82.   # ------------------------------------------
  83.   # * initialize
  84.   # ------------------------------------------
  85.   alias initialize_actor_shop_old_kk_ initialize
  86.   def initialize
  87.   @gold_bule = 12000
  88.   @gold_red = 12000
  89.   @gold_yellow = 12000
  90.   @gold_green = 12000
  91.   @actors = []
  92.   @actors_2 = []
  93. # 战斗场次在这里定义,前一个数字是ID后一个数字是可参与战斗场次数。
  94.   # 要改两次,下面@actors_time_2也要改,
  95.   @actors_time = {14=>5, 15=>2, 16=>3, 17=>4, 18=>5, 19=>1, 20=>2, 21=>3,
  96.   22=>4, 23=>5, 24=>1, 25=>2, 26=>3, 27=>4, 29=>5, 30=>1, 31=>2, 32=>3,
  97.   33=>4, 35=>5, 36=>5}
  98.   @actors_time_2 = {14=>5, 15=>2, 16=>3, 17=>4, 18=>5, 19=>1, 20=>2, 21=>3,
  99.   22=>4, 23=>5, 24=>1, 25=>2, 26=>3, 27=>4, 29=>5, 30=>1, 31=>2, 32=>3,
  100.   33=>4, 35=>5, 36=>5}
  101.   @actors_time_3 = {14=>5, 15=>2, 16=>3, 17=>4, 18=>5, 19=>1, 20=>2, 21=>3,
  102.   22=>4, 23=>5, 24=>1, 25=>2, 26=>3, 27=>4, 29=>5, 30=>1, 31=>2, 32=>3,
  103.   33=>4, 35=>5, 36=>5}  
  104.   initialize_actor_shop_old_kk_
  105.   end
  106. end
  107. # ------------------------------------------
  108. # * ACTORSHOP
  109. # ------------------------------------------
  110. module ACTORSHOP
  111.   # ------------------------------------------
  112.   # * actors
  113.   # ------------------------------------------
  114.   # 说明:
  115.   # ITEM = [数组1, 数组2, ``````, 数组N]
  116.   # 数组 = [角色ID, 雇佣酬金, 酬金类型, 颜色(含天气背景), 美化图标(文件名),
  117.   # 图标后的显示的文字]
  118.   # ------------------------------------------
  119.   ITEM = [[14, 100, 0, 7, "深渊の呼唤.PNG", "深渊呼唤"],
  120.           [15, 200, 1, 1, "光明神の长枪.PNG", "光明神"],
  121.           [16, 300, 2, 2, "次元双刃斧.png", "次元双刃"],
  122.           [17, 400, 3, 3, "超级烈焰大炮.PNG", "超级烈焰"],
  123.           [18, 500, 0, 4, "深海の潜伏者.png", "深海潜伏者"],
  124.           [19, 600, 1, 5, "闪耀の拉克丝手枪.png", "闪耀拉克丝"],
  125.           [20, 700, 2, 6, "慈悲者の法杖.png", "慈悲者"],
  126.           [21, 800, 3, 7, "迷惑の黑暗圣杖.png", "迷惑黑暗"],
  127.           [22, 900, 0, 1, "凶残の撕裂者.png", "凶残撕裂者"],
  128.           [23, 1000, 1, 2, "b霍波尔斯特の次元盾(三阶).PNG", "霍波尔斯特"],
  129.           [24, 1100, 0, 7, "深渊の呼唤.PNG", "深渊呼唤"],
  130.           [25, 1200, 1, 1, "光明神の长枪.PNG", "光明神"],
  131.           [26, 1300, 2, 2, "次元双刃斧.png", "次元双刃"],
  132.           [27, 1400, 3, 3, "超级烈焰大炮.PNG", "超级烈焰"],
  133.           [29, 1500, 0, 4, "深海の潜伏者.png", "深海潜伏者"],
  134.           [30, 1600, 1, 5, "闪耀の拉克丝手枪.png", "闪耀拉克丝"],
  135.           [31, 1700, 2, 6, "慈悲者の法杖.png", "慈悲者"],
  136.           [32, 1800, 3, 7, "迷惑の黑暗圣杖.png", "迷惑黑暗"],
  137.           [33, 1900, 0, 1, "凶残の撕裂者.png", "凶残撕裂者"],
  138.           [35, 1900, 0, 1, "凶残の撕裂者.png", "凶残撕裂者"],         
  139.           [36, 2000, 1, 2, "b霍波尔斯特の次元盾(三阶).PNG", "界主"]]
  140. end
  141. # ------------------------------------------
  142. # * include module and @@
  143. # ------------------------------------------
  144. class Actor_Shop_Command < Window_Selectable
  145.   include ACTORSHOP
  146.   @@item = ACTORSHOP::ITEM
  147. end
  148. class Actor_Shop_Message < Window_Base
  149.   include ACTORSHOP
  150.   @@item = ACTORSHOP::ITEM
  151. end
  152. class Scene_Actor_Shop
  153.   include ACTORSHOP
  154.   @@item = ACTORSHOP::ITEM
  155. end
  156. # ------------------------------------------
  157. # * Window_HelpCommand  # 一般命令窗体帮助
  158. # ------------------------------------------
  159. class Window_HelpCommand < Window_Base
  160.   # ------------------------------------------
  161.   # * initialize
  162.   # ------------------------------------------
  163.   def initialize
  164.     super(0, 0, 170, 96)
  165.     self.opacity= 0
  166.     self.contents_opacity= 0
  167.     self.z = 9998
  168.     self.contents = Bitmap.new(width - 32, height - 32)
  169.   end
  170.   # ------------------------------------------
  171.   # * set_text
  172.   # ------------------------------------------
  173.   def set_text(text1, text2, x, y)
  174.     if text1 != @text1 or x = @x or y = @y
  175.       self.contents.clear
  176.       self.x = x
  177.       self.y = y
  178.       self.contents.font.size = 15
  179.       self.contents.draw_text(10, 0, width - 8, 32, text1)
  180.       self.contents.draw_text(10, 32, width - 8, 32, text2)
  181.       @text1 = text1
  182.       @text2 = text2
  183.       @x = x
  184.       @y = y
  185.       @actor = nil
  186.     end
  187.     self.visible = true
  188.   end
  189. end
  190. # ------------------------------------------
  191. # * Window_Selectable # 命令窗体以及左右选
  192. # ------------------------------------------
  193. class Window_Selectable < Window_Base
  194.   # ------------------------------------------
  195.   # * update
  196.   # ------------------------------------------
  197.   def update
  198.     super
  199.     # 可以移动光标的情况下
  200.     if self.active and @item_max > 0 and @index >= 0
  201.       # 方向键下被按下的情况下
  202.       if Input.repeat?(Input::DOWN)
  203.         # 列数不是 1 并且不与方向键下的按下状态重复的情况、
  204.         # 或光标位置在(项目数-列数)之前的情况下
  205.         if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  206.            @index < @item_max - @column_max
  207.           # 光标向下移动
  208.           $game_system.se_play($data_system.cursor_se)
  209.           @index = (@index + @column_max) % @item_max
  210.         end
  211.       end
  212.       # 方向键上被按下的情况下
  213.       if Input.repeat?(Input::UP)
  214.         # 列数不是 1 并且不与方向键下的按下状态重复的情况、
  215.         # 或光标位置在列之后的情况下
  216.         if (@column_max == 1 and Input.trigger?(Input::UP)) or
  217.            @index >= @column_max
  218.           # 光标向上移动
  219.           $game_system.se_play($data_system.cursor_se)
  220.           @index = (@index - @column_max + @item_max) % @item_max
  221.         end
  222.       end
  223.       # 方向键右被按下的情况下
  224.       if Input.repeat?(Input::RIGHT)
  225.         # 列数为 2 以上并且、光标位置在(项目数 - 1)之前的情况下
  226.         if @column_max >= 2# and @index < @item_max - 1
  227.           if @index < @item_max - 1
  228.           # 光标向右移动
  229.           $game_system.se_play($data_system.cursor_se)
  230.           @index += 1
  231.           else
  232.           @index = 0
  233.           end
  234.         end
  235.       end
  236.       # 方向键左被按下的情况下
  237.       if Input.repeat?(Input::LEFT)
  238.         # 列数为 2 以上并且、光标位置在 0 之后的情况下
  239.         if @column_max >= 2# and @index > 0
  240.           if @index > 0
  241.           # 光标向左移动
  242.           $game_system.se_play($data_system.cursor_se)
  243.           @index -= 1
  244.           else
  245.           @index = @item_max - 1
  246.           end
  247.         end
  248.       end
  249.       # R 键被按下的情况下
  250.       if Input.repeat?(Input::R)
  251.         # 显示的最后行在数据中最后行上方的情况下
  252.         if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  253.           # 光标向后移动一页
  254.           $game_system.se_play($data_system.cursor_se)
  255.           @index = [@index + self.page_item_max, @item_max - 1].min
  256.           self.top_row += self.page_row_max
  257.         end
  258.       end
  259.       # L 键被按下的情况下
  260.       if Input.repeat?(Input::L)
  261.         # 显示的开头行在位置 0 之后的情况下
  262.         if self.top_row > 0
  263.           # 光标向前移动一页
  264.           $game_system.se_play($data_system.cursor_se)
  265.           @index = [@index - self.page_item_max, 0].max
  266.           self.top_row -= self.page_row_max
  267.         end
  268.       end
  269.     end
  270.     # 刷新帮助文本 (update_help 定义了继承目标)
  271.     if self.active and @help_window != nil
  272.       update_help
  273.     end
  274.     # 刷新光标矩形
  275.     update_cursor_rect
  276.   end
  277. end
  278. # ------------------------------------------
  279. # * Window_Command_Shop
  280. # ------------------------------------------
  281. class Window_Command_Shop < Window_Selectable
  282.   # ------------------------------------------
  283.   # * initialize
  284.   # ------------------------------------------
  285.   def initialize(width, commands, column_max = 1, size = 22)
  286.     super(0, 0, width, 0)
  287.     if column_max == 1
  288.       self.height = commands.size * 32 + 32
  289.     else
  290.       self.height = 64
  291.     end
  292.     @item_max = commands.size
  293.     @commands = commands
  294.     @column_max = column_max
  295.     @size = size
  296.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  297.     refresh
  298.     self.index = 0
  299.   end
  300.   # ------------------------------------------
  301.   # * refresh
  302.   # ------------------------------------------
  303.   def refresh
  304.     self.contents.clear
  305.     for i in 0...@item_max
  306.       if @column_max != 1
  307.       if i == self.index
  308.         color = text_color(2)
  309.       else
  310.         color = normal_color
  311.       end
  312.       else
  313.       color = normal_color
  314.       end
  315.       draw_item(i, color)
  316.     end
  317.   end
  318.   # ------------------------------------------
  319.   # * draw_item
  320.   # ------------------------------------------
  321.   def draw_item(index, color)
  322.     self.contents.font.color = color
  323.     self.contents.font.size = @size
  324.     if @column_max == 1
  325.     self.contents.draw_text(4, 32 * index, width - 8, 32, @commands[index])
  326.     else
  327.     if @size == 15
  328.     self.contents.draw_text(
  329.     width / @column_max * index + 50, 0, width - 8, 32, @commands[index])
  330.     else
  331.     self.contents.draw_text(
  332.     width / @column_max * index + 20, 0, width - 8, 32, @commands[index])
  333.     end
  334.     end
  335.   end
  336.   # ------------------------------------------
  337.   # * disable_item
  338.   # ------------------------------------------
  339.   def disable_item(index)
  340.     draw_item(index, disabled_color)
  341.   end
  342.   # ------------------------------------------
  343.   # * update
  344.   # ------------------------------------------
  345.   def update
  346.     super
  347.     if self.index != @old_index
  348.     refresh
  349.     @old_index = self.index
  350.     end
  351.   end
  352.   # ------------------------------------------
  353.   # * update
  354.   # ------------------------------------------
  355.   def update_help
  356.     case self.index
  357.     when 0
  358.     @help_window.set_text("进行召唤并参战", "或加入掠阵队伍", 240, 64)
  359.     when 1
  360.     @help_window.set_text("查看已经召唤的", "十二生肖的属性", 640-170, 64)
  361.     end
  362.   end
  363. end
  364. # ------------------------------------------
  365. # * Window_Command_Shop
  366. # ------------------------------------------
  367. class Window_Command_Shop_2 < Window_Selectable
  368.   # ------------------------------------------
  369.   # * initialize
  370.   # ------------------------------------------
  371.   def initialize(width, commands, column_max = 1, size = 22)
  372.     super(0, 0, width, 0)
  373.     if column_max == 1
  374.       self.height = commands.size * 32 + 32
  375.     else
  376.       self.height = 64
  377.     end
  378.     @item_max = commands.size
  379.     @commands = commands
  380.     @column_max = column_max
  381.     @size = size
  382.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  383.     refresh
  384.     self.index = 0
  385.   end
  386.   # ------------------------------------------
  387.   # * refresh
  388.   # ------------------------------------------
  389.   def refresh
  390.     self.contents.clear
  391.     for i in 0...@item_max
  392.       if @column_max != 1
  393.       if i == self.index
  394.         color = text_color(2)
  395.       else
  396.         color = normal_color
  397.       end
  398.       else
  399.       color = normal_color
  400.       end
  401.       draw_item(i, color)
  402.     end
  403.   end
  404.   # ------------------------------------------
  405.   # * draw_item
  406.   # ------------------------------------------
  407.   def draw_item(index, color)
  408.     self.contents.font.color = color
  409.     self.contents.font.size = @size
  410.     if @column_max == 1
  411.     self.contents.draw_text(4, 32 * index, width - 8, 32, @commands[index])
  412.     else
  413.     if @size == 15
  414.     self.contents.draw_text(
  415.     width / @column_max * index + 50, 0, width - 8, 32, @commands[index])
  416.     else
  417.     self.contents.draw_text(
  418.     width / @column_max * index + 20, 0, width - 8, 32, @commands[index])
  419.     end
  420.     end
  421.   end
  422.   # ------------------------------------------
  423.   # * disable_item
  424.   # ------------------------------------------
  425.   def disable_item(index)
  426.     draw_item(index, disabled_color)
  427.   end
  428.   # ------------------------------------------
  429.   # * update
  430.   # ------------------------------------------
  431.   def update
  432.     super
  433.     if self.index != @old_index
  434.     refresh
  435.     @old_index = self.index
  436.     end
  437.   end
  438.   # ------------------------------------------
  439.   # * update
  440.   # ------------------------------------------
  441.   def update_help
  442.     case self.index
  443.     when 0
  444.     @help_window.set_text("查看当前在队伍中", "的十二生肖属性", 440-170, 64)
  445.     when 1
  446.     @help_window.set_text("查看掠阵队伍中的", "十二生肖的属性", 440-170, 96)
  447.     end
  448.   end
  449. end
  450. # ------------------------------------------
  451. # * Window_Command_Shop
  452. # ------------------------------------------
  453. class Window_Command_Shop_3 < Window_Selectable
  454.   # ------------------------------------------
  455.   # * initialize
  456.   # ------------------------------------------
  457.   def initialize(width, commands, column_max = 1, size = 22)
  458.     super(0, 0, width, 0)
  459.     if column_max == 1
  460.       self.height = commands.size * 32 + 32
  461.     else
  462.       self.height = 64
  463.     end
  464.     @item_max = commands.size
  465.     @commands = commands
  466.     @column_max = column_max
  467.     @size = size
  468.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  469.     refresh
  470.     self.index = 0
  471.   end
  472.   # ------------------------------------------
  473.   # * refresh
  474.   # ------------------------------------------
  475.   def refresh
  476.     self.contents.clear
  477.     for i in 0...@item_max
  478.       if @column_max != 1
  479.       if i == self.index
  480.         color = text_color(2)
  481.       else
  482.         color = normal_color
  483.       end
  484.       else
  485.       color = normal_color
  486.       end
  487.       draw_item(i, color)
  488.     end
  489.   end
  490.   # ------------------------------------------
  491.   # * draw_item
  492.   # ------------------------------------------
  493.   def draw_item(index, color)
  494.     self.contents.font.color = color
  495.     self.contents.font.size = @size
  496.     if @column_max == 1
  497.     self.contents.draw_text(4, 32 * index, width - 8, 32, @commands[index])
  498.     else
  499.     if @size == 15
  500.     self.contents.draw_text(
  501.     width / @column_max * index + 50, 0, width - 8, 32, @commands[index])
  502.     else
  503.     self.contents.draw_text(
  504.     width / @column_max * index + 20, 0, width - 8, 32, @commands[index])
  505.     end
  506.     end
  507.   end
  508.   # ------------------------------------------
  509.   # * disable_item
  510.   # ------------------------------------------
  511.   def disable_item(index)
  512.     draw_item(index, disabled_color)
  513.   end
  514.   # ------------------------------------------
  515.   # * update
  516.   # ------------------------------------------
  517.   def update
  518.     super
  519.     if self.index != @old_index
  520.     refresh
  521.     @old_index = self.index
  522.     end
  523.   end
  524.   # ------------------------------------------
  525.   # * update
  526.   # ------------------------------------------
  527.   def update_help
  528.     case self.index
  529.     when 0
  530.     @help_window.set_text("召唤生肖兽并且", "参加战斗。", 0, 480-92*2-32)
  531.     when 1
  532.     @help_window.set_text("召唤生肖兽加入", "掠阵队伍中", 240, 480-92*2-32)
  533.     end
  534.   end
  535. end
  536. # ------------------------------------------
  537. # * Window_TipCommand_help  # 参与N场战斗的提示
  538. # ------------------------------------------
  539. class Window_TipCommand_help < Window_Base
  540.   # ------------------------------------------
  541.   # * initialize
  542.   # ------------------------------------------
  543.   def initialize
  544.     super(0, 480 - 64 - 64, 450, 64)
  545.     self.z = 9998
  546.     self.opacity = 200
  547.     self.contents = Bitmap.new(width - 32, height - 32)
  548.     refresh
  549.   end
  550.   # ------------------------------------------
  551.   # * refresh
  552.   # ------------------------------------------
  553.   def refresh(actor = $game_actors[1], color = 1)
  554.     self.contents.clear
  555.     self.contents.font.size = 15
  556.     @bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  557.     rect = Rect.new(0, 0, @bitmap.width / 4, @bitmap.height / 8)
  558.     self.contents.blt(0, 2, @bitmap, rect)
  559.     self.contents.font.color = text_color(color)
  560.     time = $game_temp.actors_time[actor.id]
  561.     text = "(只可参与#{time}场战斗)"
  562.     self.contents.draw_text(35, 0, width - 8, 32, actor.name + text)
  563.   end
  564.   # ------------------------------------------
  565.   # * dispose
  566.   # ------------------------------------------
  567.   def dispose
  568.     super
  569.     @bitmap.dispose
  570.   end
  571. end
  572. # ------------------------------------------
  573. # * Actor_Shop_Command_Help  # 雇佣兵雇佣选择列表帮助
  574. # ------------------------------------------
  575. class Actor_Shop_Command_Help < Window_Base
  576.   # ------------------------------------------
  577.   # * initialize
  578.   # ------------------------------------------
  579.   def initialize
  580.     super(150, 0, 240, 364)
  581.     self.z = 123
  582.     self.opacity = 160
  583.     self.contents = Bitmap.new(width - 32, height - 32)
  584.   end
  585.   # ------------------------------------------
  586.   # * dispose
  587.   # ------------------------------------------
  588.   def dispose
  589.     super
  590.     if @bitmap != nil
  591.     @bitmap.dispose
  592.     end
  593.     if @icon != nil
  594.     @icon.dispose
  595.     end
  596.   end
  597.   # ------------------------------------------
  598.   # * text_color
  599.   # ------------------------------------------
  600.   def text_color(n)
  601.     case n
  602.     when 0
  603.       return Color.new(255, 255, 255, 255)
  604.     when 1
  605.       return Color.new(0, 0, 255, 255)
  606.     when 2
  607.       return Color.new(255, 128, 128, 255)
  608.     when 3
  609.       return Color.new(128, 255, 128, 255)
  610.     when 4
  611.       return Color.new(128, 255, 255, 255)
  612.     when 5
  613.       return Color.new(255, 128, 255, 255)
  614.     when 6
  615.       return Color.new(255, 255, 128, 255)
  616.     when 7
  617.       return Color.new(192, 192, 192, 255)
  618.     else
  619.       normal_color
  620.     end
  621.   end
  622.   # ------------------------------------------
  623.   # * set_text
  624.   # ------------------------------------------
  625.   def set_text(actor_index, y, gold_type = nil, gold = nil, x = 150)
  626.     if actor_index != @actor_index or y != @y or gold_type != @gold_type or
  627.       gold != @gold
  628.       self.contents.clear
  629.       self.contents.font.color = normal_color
  630.       self.x = x
  631.       self.y = y
  632.       if actor_index != nil
  633.       # ------------------------------------------
  634.       # * dispose
  635.       # ------------------------------------------
  636.       if @bitmap != nil
  637.        @bitmap.dispose
  638.       end
  639.       # ------------------------------------------
  640.       # * face
  641.       # ------------------------------------------
  642.       @bitmap = RPG::Cache.picture(actor_index.id.to_s+".png")
  643.       w = @bitmap.width
  644.       h = @bitmap.height
  645.       self.contents.blt(-5, 35, @bitmap, Rect.new(0, 0, w, h), 160)
  646.       # ------------------------------------------
  647.       # * color
  648.       # ------------------------------------------
  649.       for b in 1..150
  650.       @color_2 = Color.new(255, 128, 255, 80 - b)
  651.       @color_3 = Color.new(255, 128, 255, 60 + b)
  652.       self.contents.fill_rect(
  653.       Rect.new(3 * b + 4, 0, 2, 30), @color_2)
  654.       self.contents.fill_rect(
  655.       Rect.new(3 * b + 4 - 32, 0, 2, 30), @color_3) if b < 20
  656.       @color_2 = Color.new(128, 128, 255, 80 - b)
  657.       @color_3 = Color.new(128, 128, 255, 60 + b)
  658.       self.contents.fill_rect(
  659.       Rect.new(3 * b + 96+30, 32, 2, 30), @color_2)
  660.       self.contents.fill_rect(
  661.       Rect.new(3 * b + 92, 32, 2, 30), @color_3) if b < 20
  662.       @color_2 = Color.new(255, 255, 128, 80 - b)
  663.       @color_3 = Color.new(255, 255, 128, 60 + b)
  664.       self.contents.fill_rect(
  665.       Rect.new(3 * b + 96+30, 64, 2, 30), @color_2)
  666.       self.contents.fill_rect(
  667.       Rect.new(3 * b + 92, 64, 2, 30), @color_3) if b < 20
  668.       @color_2 = Color.new(128, 255, 128, 80 - b)
  669.       @color_3 = Color.new(128, 255, 128, 60 + b)
  670.       self.contents.fill_rect(
  671.       Rect.new(3 * b + 96+30, 96, 2, 30), @color_2)
  672.       self.contents.fill_rect(
  673.       Rect.new(3 * b + 92, 96, 2, 30), @color_3) if b < 20
  674.       @color_2 = Color.new(128, 255, 255, 80 - b)
  675.       @color_3 = Color.new(128, 255, 255, 60 + b)
  676.       self.contents.fill_rect(
  677.       Rect.new(3 * b + 4, 96+32+10, 2, 30), @color_2)
  678.       self.contents.fill_rect(
  679.       Rect.new(3 * b + 4-32, 96+32+10, 2, 30), @color_3) if b < 20
  680.       @color_2 = Color.new(255, 128, 255, 80 - b)
  681.       @color_3 = Color.new(255, 128, 255, 60 + b)
  682.       self.contents.fill_rect(
  683.       Rect.new(3 * b + 4, 96+64+10, 2, 30), @color_2)
  684.       self.contents.fill_rect(
  685.       Rect.new(3 * b + 4-32, 96+64+10, 2, 30), @color_3) if b < 20
  686.       @color_2 = Color.new(255, 255, 128, 80 - b)
  687.       @color_3 = Color.new(255, 255, 128, 60 + b)
  688.       self.contents.fill_rect(
  689.       Rect.new(3 * b + 4, 96*2+10, 2, 30), @color_2)
  690.       self.contents.fill_rect(
  691.       Rect.new(3 * b + 4-32, 96*2+10, 2, 30), @color_3) if b < 20
  692.       @color_2 = Color.new(192, 192, 192, 80 - b)
  693.       @color_3 = Color.new(192, 192, 192, 60 + b)
  694.       self.contents.fill_rect(
  695.       Rect.new(3 * b + 4, 96*2+42, 2, 30), @color_2)
  696.       self.contents.fill_rect(
  697.       Rect.new(3 * b + 4-32, 96*2+42, 2, 30), @color_3) if b < 20  
  698.       @color_2 = Color.new(255, 128, 255, 80 - b)
  699.       @color_3 = Color.new(255, 128, 255, 60 + b)
  700.       self.contents.fill_rect(
  701.       Rect.new(3 * b + 4, 96*2+74, 2, 30), @color_2)
  702.       self.contents.fill_rect(
  703.       Rect.new(3 * b + 4-32, 96*2+74, 2, 30), @color_3) if b < 20  
  704.       @color_2 = Color.new(128, 255, 255, 80 - b)
  705.       @color_3 = Color.new(128, 255, 255, 60 + b)
  706.       self.contents.fill_rect(
  707.       Rect.new(3 * b + 4, 96*2+108, 2, 30), @color_2)
  708.       self.contents.fill_rect(
  709.       Rect.new(3 * b + 4-32, 96*2+108, 2, 30), @color_3) if b < 20  
  710.       end
  711.       # ------------------------------------------
  712.       # * text
  713.       # ------------------------------------------
  714.       self.contents.font.size = 15
  715.       draw_actor_name(actor_index, 4, 0)
  716.       name_x_p = contents.text_size(actor_index.name).width
  717.       self.contents.font.color = text_color(3)
  718.       self.contents.draw_text(
  719.       4+name_x_p, 0, width - 8, 32, "["<<actor_index.class_name<<"]")
  720.       draw_actor_level(actor_index, 96, 32)
  721.       self.contents.font.color = system_color
  722.       self.contents.draw_text(
  723.       96, 64, width - 8, 32, ""<<$data_system.words.hp)
  724.       self.contents.font.color = normal_color
  725.       self.contents.draw_text(
  726.       96+64, 64, width - 8, 32, actor_index.maxhp.to_s)
  727.       self.contents.font.color = system_color
  728.       self.contents.draw_text(
  729.       96, 96, width - 8, 32, ""<<$data_system.words.sp)
  730.       self.contents.font.color = normal_color
  731.       self.contents.draw_text(
  732.       96+64, 96, width - 8, 32, actor_index.maxsp.to_s)
  733.       draw_actor_parameter_new(actor_index, 4, 96+32+10, 3)
  734.       draw_actor_parameter_new(actor_index, 4, 96+64+10, 4)
  735.       draw_actor_parameter_new(actor_index, 4, 96*2+10, 5)
  736.       draw_actor_parameter_new(actor_index, 4, 96*2+32+10, 6)
  737.       draw_actor_parameter_new(actor_index, 4, 96*2+64+10, 1)
  738.       draw_actor_parameter_new(actor_index, 4, 96*3+10, 2)
  739.       # ------------------------------------------
  740.       # * gold
  741.       # ------------------------------------------
  742.       if gold_type != nil
  743.       cx = name_x_p+contents.text_size("["<<actor_index.class_name<<"]").width
  744.       @icon = RPG::Cache.icon(gold_type)
  745.       w = @icon.width
  746.       h = @icon.height
  747.       self.contents.blt(4 + cx, 3, @icon, Rect.new(0, 0, w, h))
  748.       case gold_type
  749.       when "0.PNG"
  750.       self.contents.font.color = text_color(1)
  751.       when "1.PNG"
  752.       self.contents.font.color = text_color(2)
  753.       when "2.PNG"
  754.       self.contents.font.color = text_color(6)
  755.       when "3.PNG"
  756.       self.contents.font.color = text_color(3)
  757.       end
  758.       self.contents.draw_text(4 + cx + w, 0, width - 8, 32, gold)
  759.       end
  760.       # ------------------------------------------
  761.       # * Equip
  762.       # ------------------------------------------
  763.       self.contents.font.color = system_color
  764.       self.contents.draw_text(100, 96+32+10, 96, 32, "装备")
  765.       draw_item_name($data_weapons[actor_index.weapon_id], 100, 96+64+10)
  766.       draw_item_name($data_armors[actor_index.armor1_id], 100, 96*2+10)
  767.       draw_item_name($data_armors[actor_index.armor2_id], 100, 96*2+42)
  768.       draw_item_name($data_armors[actor_index.armor3_id], 100, 96*2+64+10)
  769.       draw_item_name($data_armors[actor_index.armor4_id], 100, 96*3+10)
  770.       else
  771.       self.visible = false
  772.       end
  773.       @actor_index = actor_index
  774.       @y = y
  775.       @gold_type = gold_type
  776.       @gold = gold
  777.       @actor = nil
  778.     end
  779.     self.visible = true
  780.   end
  781.   # ------------------------------------------
  782.   # * draw_actor_parameter_new
  783.   # ------------------------------------------
  784.   def draw_actor_parameter_new(actor, x, y, type)
  785.     case type
  786.     when 0
  787.       parameter_name = $data_system.words.atk
  788.       parameter_value = actor.atk
  789.     when 1
  790.       parameter_name = $data_system.words.pdef
  791.       parameter_value = actor.pdef
  792.     when 2
  793.       parameter_name = $data_system.words.mdef
  794.       parameter_value = actor.mdef
  795.     when 3
  796.       parameter_name = $data_system.words.str
  797.       parameter_value = actor.str
  798.     when 4
  799.       parameter_name = $data_system.words.dex
  800.       parameter_value = actor.dex
  801.     when 5
  802.       parameter_name = $data_system.words.agi
  803.       parameter_value = actor.agi
  804.     when 6
  805.       parameter_name = $data_system.words.int
  806.       parameter_value = actor.int
  807.     end
  808.     self.contents.font.color = system_color
  809.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  810.     self.contents.font.color = normal_color
  811.     self.contents.draw_text(x + 30, y, 36, 32, parameter_value.to_s, 2)
  812.   end
  813. end
  814. # ------------------------------------------
  815. # * Actor_Shop_Command  # 选择雇佣兵(列表)
  816. # ------------------------------------------
  817. class Actor_Shop_Command < Window_Selectable
  818.   # ------------------------------------------
  819.   # * initialize
  820.   # ------------------------------------------
  821.   def initialize
  822.     super(0, 0, 240, 480 + 80)
  823.     self.opacity = 100
  824.     @item_max = @@item.size
  825.     if @item_max > 10
  826.     self.contents = Bitmap.new(width - 32, 10 * 46)
  827.     else
  828.     self.contents = Bitmap.new(width - 32, @item_max * 46)
  829.     end
  830.     @column_max = 1
  831.     refresh
  832.     self.index = 0
  833.   end
  834.   # ------------------------------------------
  835.   # * refresh
  836.   # ------------------------------------------
  837.   def refresh(page = 1)
  838.     self.contents.clear
  839.     @commands = []
  840.     for i in 0...@item_max
  841.     @actor = $game_actors[@@item[i][0]]
  842.     @commands[i] = @actor.name
  843.     color = text_color(@@item[i][3].to_i)
  844.     shop_draw_item(i, color, @@item[i][3].to_i, page)
  845.     end
  846.   end
  847.   # ------------------------------------------
  848.   # * shop_draw_item
  849.   # ------------------------------------------
  850.   def shop_draw_item(i, color, color_2, page)
  851.     self.contents.font.size = 15
  852.     x = 36 + i % @column_max * (288 + 32)
  853.     if page == 1
  854.     y = i / @column_max * 46
  855.     else
  856.     y = (i - 10) / @column_max * 46
  857.     end
  858.     for b in 1..150
  859.     case color_2
  860.     when 1
  861.       @color_2 = Color.new(128, 128, 255, 80 - b)
  862.       @color_3 = Color.new(128, 128, 255, 60 + b)
  863.     when 2
  864.       @color_2 = Color.new(255, 128, 128, 80 - b)
  865.       @color_3 = Color.new(255, 128, 128, 60 + b)
  866.     when 3
  867.       @color_2 = Color.new(128, 255, 128, 80 - b)
  868.       @color_3 = Color.new(128, 255, 128, 60 + b)
  869.     when 4
  870.       @color_2 = Color.new(128, 255, 255, 80 - b)
  871.       @color_3 = Color.new(128, 255, 255, 60 + b)
  872.     when 5
  873.       @color_2 = Color.new(255, 128, 255, 80 - b)
  874.       @color_3 = Color.new(255, 128, 255, 60 + b)
  875.     when 6
  876.       @color_2 = Color.new(255, 255, 128, 80 - b)
  877.       @color_3 = Color.new(255, 255, 128, 60 + b)
  878.     when 7
  879.       @color_2 = Color.new(192, 192, 192, 80 - b)
  880.       @color_3 = Color.new(192, 192, 192, 60 + b)
  881.     end
  882.     self.contents.fill_rect(
  883.     Rect.new(2 * b + x, y, 2, 30), @color_2)
  884.     self.contents.fill_rect(
  885.     Rect.new(2 * b + x - 32, y, 2, 30), @color_3) if b < 20
  886.     end
  887.     self.contents.font.color = color
  888.     @bitmap = RPG::Cache.character(@actor.character_name, @actor.character_hue)
  889.     rect = Rect.new(0, 0, @bitmap.width / 4, @bitmap.height / 8)
  890.     self.contents.blt(x - 32, y + 3, @bitmap, rect)
  891.     self.contents.draw_text(x, y, width - 8, 32, @commands[i])
  892.     cx = contents.text_size("艾斯迪儿").width - 15
  893.     @icon = RPG::Cache.icon(@@item[i][4])
  894.     w = @icon.width
  895.     h = @icon.height
  896.     self.contents.blt(x + cx + 24, y + 3, @icon, Rect.new(0, 0, w, h))
  897.     self.contents.draw_text(x + cx + 52, y, width - 8, 32, @@item[i][5].to_s)
  898.   end
  899.   # ------------------------------------------
  900.   # * dispose
  901.   # ------------------------------------------
  902.   def dispose
  903.     super
  904.     @bitmap.dispose
  905.     @icon.dispose
  906.   end
  907.   # ------------------------------------------
  908.   # * update_cursor_rect
  909.   # ------------------------------------------
  910.   def update_cursor_rect
  911.     if @index < 0
  912.       self.cursor_rect.empty
  913.     end
  914.     cursor_width = self.width / @column_max - 32
  915.     x = @index % @column_max * (cursor_width + 32)
  916.     if @index < 10
  917.     y = @index / @column_max * 46 - self.oy
  918.     if @index != @old_index_index
  919.     refresh(1)
  920.     @old_index_index = @index
  921.     end
  922.     else
  923.     if @index != @old_index_index
  924.     refresh(2)
  925.     @old_index_index = @index
  926.     end
  927.     y = (@index - 10) / @column_max * 46 - self.oy
  928.     end
  929.     self.cursor_rect.set(x, y, cursor_width, 32)
  930.   end
  931.   # ------------------------------------------
  932.   # * update_help
  933.   # ------------------------------------------
  934.   def update_help
  935.     # ------------------------------------------
  936.     # * Actors and Y and Gold
  937.     # ------------------------------------------
  938.     case self.index
  939.     when 0...2
  940.     y = self.index * 45 + 64
  941.     when 2
  942.     y = 480 - 364
  943.     when 3
  944.     y = 480 - 364
  945.     when 4
  946.     y = 32
  947.     when 5
  948.     y = 32
  949.     when 6
  950.     y = 32
  951.     when 7
  952.     y = 64
  953.     when 8
  954.     y = 480 - 364
  955.     when 9
  956.     y = 480 - 364
  957.     when 10...12
  958.     y = (self.index - 10) * 45 + 64
  959.     when 12
  960.     y = 480 - 364
  961.     when 13
  962.     y = 480 - 364
  963.     when 14
  964.     y = 32
  965.     when 15
  966.     y = 32
  967.     when 16
  968.     y = 32
  969.     when 17
  970.     y = 64
  971.     when 18
  972.     y = 480 - 364
  973.     when 19
  974.     y = 480 - 364
  975.     end
  976.     @help_window.set_text(
  977.     $game_actors[@@item[self.index][0]], y, @@item[self.index][2].to_s<<".PNG",
  978.     @@item[self.index][1].to_s)
  979.   end
  980. end
  981. # ------------------------------------------
  982. # * Actor_Shop_Window_Gold # 显示现有资源的窗口
  983. # ------------------------------------------
  984. class Actor_Shop_Window_Gold < Window_Base
  985.   # ------------------------------------------
  986.   # * initialize
  987.   # ------------------------------------------
  988.   def initialize
  989.     super(240, 480 - 64, 400, 64)
  990.     self.opacity = 100
  991.     self.contents = Bitmap.new(width - 32, height - 32)
  992.     refresh
  993.   end
  994.   # ------------------------------------------
  995.   # * dispose
  996.   # ------------------------------------------
  997.   def dispose
  998.     super
  999.     for i in 0...4
  1000.     @bitmap[i].dispose
  1001.     end
  1002.   end
  1003.   # ------------------------------------------
  1004.   # * refresh
  1005.   # ------------------------------------------
  1006.   def refresh
  1007.     self.contents.clear
  1008.     self.contents.font.size = 15
  1009.     @bitmap = []
  1010.     for i in 0...4
  1011.     @bitmap[i] = RPG::Cache.icon("#{i}.PNG")
  1012.     w = @bitmap[i].width - 5
  1013.     self.contents.blt(i * 100, 4, @bitmap[i], Rect.new(0, 0, 24, 24))
  1014.     wt = width - 8
  1015.     ht = 32
  1016.     case i
  1017.     when 0
  1018.     self.contents.font.color = text_color(1)
  1019.     self.contents.draw_text(4+w+i*100, 0, wt, ht, $game_temp.gold_bule.to_s)
  1020.     when 1
  1021.     self.contents.font.color = text_color(2)
  1022.     self.contents.draw_text(4+w+i*100, 0, wt, ht, $game_temp.gold_red.to_s)
  1023.     when 2
  1024.     self.contents.font.color = text_color(6)
  1025.     self.contents.draw_text(4+w+i*100, 0, wt, ht, $game_temp.gold_yellow.to_s)
  1026.     when 3
  1027.     self.contents.font.color = text_color(3)
  1028.     self.contents.draw_text(4+w+i*100, 0, wt, ht, $game_temp.gold_green.to_s)
  1029.     end
  1030.     end
  1031.   end
  1032. end
  1033. # ------------------------------------------
  1034. # * Actor_Shop_Message_Save_2  # 显示仓库中雇佣角色的列表
  1035. # ------------------------------------------
  1036. class Actor_Shop_Message_Save_2 < Window_Selectable
  1037.   # ------------------------------------------
  1038.   # * initialize
  1039.   # ------------------------------------------
  1040.   def initialize
  1041.     super(240, 64 + (480 - 128) / 2, 400, (480 - 128) / 2)
  1042.     self.opacity = 100
  1043.     @column_max = 1
  1044.     self.contents = Bitmap.new(width - 32, 4*32)
  1045.     refresh
  1046.   end
  1047.   # ------------------------------------------
  1048.   # * refresh
  1049.   # ------------------------------------------
  1050.   def refresh(page = 1)
  1051.     self.contents.clear
  1052.     @item_max = $game_temp.actors_2.size
  1053.     self.contents.font.size = 15
  1054.     for b in 1..150
  1055.       @color_2 = Color.new(128, 128, 255, 120 - b)
  1056.       @color_3 = Color.new(128, 128, 255, 100 + b)
  1057.       self.contents.fill_rect(
  1058.       Rect.new(2 * b + 4, 32*0, 2, 30), @color_2)
  1059.       self.contents.fill_rect(
  1060.       Rect.new(2 * b + 4 - 32, 32*0, 2, 30), @color_3) if b < 20
  1061.       @color_2 = Color.new(192, 192, 192, 120 - b)
  1062.       @color_3 = Color.new(192, 192, 192, 100 + b)
  1063.       self.contents.fill_rect(
  1064.       Rect.new(2 * b + 4, 32*1, 2, 30), @color_2)
  1065.       self.contents.fill_rect(
  1066.       Rect.new(2 * b + 4 - 32, 32*1, 2, 30), @color_3) if b < 20
  1067.       @color_2 = Color.new(255, 255, 64, 120 - b)
  1068.       @color_3 = Color.new(255, 255, 64, 100 + b)
  1069.       self.contents.fill_rect(
  1070.       Rect.new(2 * b + 4, 32*2, 2, 30), @color_2)
  1071.       self.contents.fill_rect(
  1072.       Rect.new(2 * b + 4 - 32, 32*2, 2, 30), @color_3) if b < 20
  1073.       @color_2 = Color.new(128, 255, 255, 120 - b)
  1074.       @color_3 = Color.new(128, 255, 255, 100 + b)
  1075.       self.contents.fill_rect(
  1076.       Rect.new(2 * b + 4, 32*3, 2, 30), @color_2)
  1077.       self.contents.fill_rect(
  1078.       Rect.new(2 * b + 4 - 32, 32*3, 2, 30), @color_3) if b < 20
  1079.     end
  1080.     self.contents.draw_text(4, 0, width - 8, 32, "掠阵队伍中的生肖兽")
  1081.     for i in 0...@item_max
  1082.       item_actor(i, page)
  1083.     end
  1084.   end
  1085.   # ------------------------------------------
  1086.   # * dispose
  1087.   # ------------------------------------------
  1088.   def dispose
  1089.     super
  1090.     if @bitmap != nil
  1091.     @bitmap.dispose
  1092.     end
  1093.     if @bitmap_2 != nil
  1094.       @bitmap_2.dispose
  1095.     end
  1096.   end
  1097.   # ------------------------------------------
  1098.   # * item_actor
  1099.   # ------------------------------------------
  1100.   def item_actor(i, page)
  1101.     self.contents.font.size = 15
  1102.     if $game_temp.actors_2 != []
  1103.     @bitmap = RPG::Cache.character(
  1104.     $game_temp.actors_2[i].character_name,
  1105.     $game_temp.actors_2[i].character_hue)
  1106.     rect = Rect.new(0, 0, @bitmap.width / 4, @bitmap.height / 8)
  1107.     if page == 1
  1108.     self.contents.blt(0, 32*(i+1), @bitmap, rect)
  1109.     self.contents.draw_text(
  1110.     40, 32*(i+1), width - 8, 32, $game_temp.actors_2[i].name)
  1111.     else
  1112.     if i != 2
  1113.     self.contents.blt(0, 32*(i-2), @bitmap, rect)
  1114.     self.contents.draw_text(
  1115.     40, 32*(i-2), width - 8, 32, $game_temp.actors_2[i].name)
  1116.     end
  1117.     end
  1118.     end
  1119.   end
  1120.   # ------------------------------------------
  1121.   # * update_cursor_rect
  1122.   # ------------------------------------------
  1123.   def update_cursor_rect
  1124.     if self.index != @oldold_index
  1125.     if @index >= 3
  1126.     refresh(2)
  1127.     else
  1128.     refresh(1)
  1129.     end
  1130.     @oldold_index = self.index
  1131.     end
  1132.     if @index < 0
  1133.       self.cursor_rect.empty
  1134.     else
  1135.       if @index >= 3
  1136.       self.cursor_rect.set(0, (@index-2)*32, 240, 32)
  1137.       else
  1138.       self.cursor_rect.set(0, (@index+1)*32, 240, 32)
  1139.       end
  1140.     end
  1141.   end
  1142.   # ------------------------------------------
  1143.   # * update_help
  1144.   # ------------------------------------------
  1145.   def update_help
  1146.     if $game_temp.actors_2 != [] and self.index != -1
  1147.       actor_index = $game_temp.actors_2[self.index]
  1148.       y = 0
  1149.       y = self.index * 64 if self.index < 2
  1150.       y = 480 - 364 if self.index == 2
  1151.       y = (self.index-2) * 64 if self.index == 3
  1152.       y = (self.index-3) * 64 if self.index == 4 or self.index == 5
  1153.       y = 480 - 364 if self.index == 6
  1154.       @help_window.set_text(actor_index, y, nil, nil, 640 - 240)
  1155.     end
  1156.   end
  1157. end
  1158. # ------------------------------------------
  1159. # * Actor_Shop_Message_Save # 显示参战的雇佣角色的列表
  1160. # ------------------------------------------
  1161. class Actor_Shop_Message_Save < Window_Selectable
  1162.   # ------------------------------------------
  1163.   # * initialize
  1164.   # ------------------------------------------
  1165.   def initialize
  1166.     super(240, 64, 400, (480 - 128) / 2)
  1167.     self.opacity = 100
  1168.     @column_max = 1
  1169.     self.contents = Bitmap.new(width - 32, height - 32)
  1170.     refresh
  1171.   end
  1172.   # ------------------------------------------
  1173.   # * refresh
  1174.   # ------------------------------------------
  1175.   def refresh
  1176.     self.contents.clear
  1177.     @item_max = $game_temp.actors.size
  1178.     self.contents.font.size = 15
  1179.     for b in 1..150
  1180.       @color_2 = Color.new(255, 255, 128, 120 - b)
  1181.       @color_3 = Color.new(255, 255, 128, 100 + b)
  1182.       self.contents.fill_rect(
  1183.       Rect.new(2 * b + 4, 0, 2, 30), @color_2)
  1184.       self.contents.fill_rect(
  1185.       Rect.new(2 * b + 4 - 32, 0, 2, 30), @color_3) if b < 20
  1186.       @color_2 = Color.new(255, 128, 255, 120 - b)
  1187.       @color_3 = Color.new(255, 128, 255, 100 + b)
  1188.       self.contents.fill_rect(
  1189.       Rect.new(2 * b + 4, 32, 2, 30), @color_2)
  1190.       self.contents.fill_rect(
  1191.       Rect.new(2 * b + 4 - 32, 32, 2, 30), @color_3) if b < 20
  1192.       @color_2 = Color.new(128, 255, 255, 120 - b)
  1193.       @color_3 = Color.new(128, 255, 255, 100 + b)
  1194.       self.contents.fill_rect(
  1195.       Rect.new(2 * b + 4, 64, 2, 30), @color_2)
  1196.       self.contents.fill_rect(
  1197.       Rect.new(2 * b + 4 - 32, 64, 2, 30), @color_3) if b < 20
  1198.       @color_2 = Color.new(255, 128, 128, 120 - b)
  1199.       @color_3 = Color.new(255, 128, 128, 100 + b)
  1200.       self.contents.fill_rect(
  1201.       Rect.new(2 * b + 4, 96, 2, 30), @color_2)
  1202.       self.contents.fill_rect(
  1203.       Rect.new(2 * b + 4 - 32, 96, 2, 30), @color_3) if b < 20
  1204.     end
  1205.     self.contents.draw_text(4, 0, width - 8, 32, "参战的生肖兽")
  1206.     for i in 0...@item_max
  1207.       item_actor(i)
  1208.     end
  1209.   end
  1210.   # ------------------------------------------
  1211.   # * dispose
  1212.   # ------------------------------------------
  1213.   def dispose
  1214.     super
  1215.     if @bitmap != nil
  1216.     @bitmap.dispose
  1217.     end
  1218.     if @bitmap_2 != nil
  1219.       @bitmap_2.dispose
  1220.     end
  1221.   end
  1222.   # ------------------------------------------
  1223.   # * item_actor
  1224.   # ------------------------------------------
  1225.   def item_actor(i)
  1226.     self.contents.font.size = 15
  1227.     if $game_temp.actors != []
  1228.     @bitmap = RPG::Cache.character(
  1229.     $game_temp.actors[i].character_name, $game_temp.actors[i].character_hue)
  1230.     rect = Rect.new(0, 0, @bitmap.width / 4, @bitmap.height / 8)
  1231.     self.contents.blt(0, 32*(i+1), @bitmap, rect)
  1232.     self.contents.draw_text(
  1233.     40, 32*(i+1), width - 8, 32, $game_temp.actors[i].name)
  1234.     cx = contents.text_size($game_temp.actors[i].name).width
  1235.     id = $game_temp.actors[i].id
  1236.     self.contents.draw_text(
  1237.     50+cx, 32*(i+1), width - 8, 32, "剩余战斗次数:")
  1238.     dx = contents.text_size("剩余战斗次数:").width
  1239.     self.contents.draw_text(
  1240.     50+cx+dx, 32*(i+1), width - 8, 32, $game_temp.actors_time_2[id].to_s)
  1241.     end
  1242.   end
  1243.   # ------------------------------------------
  1244.   # * update_cursor_rect
  1245.   # ------------------------------------------
  1246.   def update_cursor_rect
  1247.     if self.index != @oldold_index
  1248.     refresh
  1249.     @oldold_index = self.index
  1250.     end
  1251.     if @index < 0
  1252.       self.cursor_rect.empty
  1253.     else
  1254.       self.cursor_rect.set(0, (@index+1)*32, 240, 32)
  1255.     end
  1256.   end
  1257.   # ------------------------------------------
  1258.   # * update_help
  1259.   # ------------------------------------------
  1260.   def update_help
  1261.     if $game_temp.actors != [] and self.index != -1
  1262.       actor_index = $game_temp.actors[self.index]
  1263.       y = self.index * 64 if self.index < 2
  1264.       y = 480 - 364 if self.index == 2
  1265.       y = (self.index-2) * 64 if self.index == 3
  1266.       @help_window.set_text(actor_index, y, nil, nil, 640 - 240)
  1267.     end
  1268.   end
  1269. end
  1270. # ------------------------------------------
  1271. # * Scene_Actor_Shop
  1272. # ------------------------------------------
  1273. class Scene_Actor_Shop
  1274.   # ------------------------------------------
  1275.   # * color
  1276.   # ------------------------------------------
  1277.   def text_color(n)
  1278.     case n
  1279.     when 0
  1280.       return Color.new(255, 255, 255, 255)
  1281.     when 1
  1282.       return Color.new(128, 128, 255, 255)
  1283.     when 2
  1284.       return Color.new(255, 128, 128, 255)
  1285.     when 3
  1286.       return Color.new(128, 255, 128, 255)
  1287.     when 4
  1288.       return Color.new(128, 255, 255, 255)
  1289.     when 5
  1290.       return Color.new(255, 128, 255, 255)
  1291.     when 6
  1292.       return Color.new(255, 255, 128, 255)
  1293.     when 7
  1294.       return Color.new(192, 192, 192, 255)
  1295.     else
  1296.       normal_color
  1297.     end
  1298.   end
  1299.   # ------------------------------------------
  1300.   # * main
  1301.   # ------------------------------------------
  1302.   def main
  1303.     map = Spriteset_Map.new
  1304.     @command = Actor_Shop_Command.new
  1305.     @command.x -= 200
  1306.     @command.active = false
  1307.     @command.index = -1
  1308.     @message = Actor_Shop_Message_Save.new
  1309.     @message.active = false
  1310.     @message.index = -1
  1311.     @message.x += 200
  1312.     @message_2 = Actor_Shop_Message_Save_2.new
  1313.     @message_2.active = false
  1314.     @message_2.index = -1
  1315.     @message_2.x += 200
  1316.     @gold = Actor_Shop_Window_Gold.new
  1317.     @gold.y += 50
  1318.     @help = Actor_Shop_Command_Help.new
  1319.     @help.visible = false
  1320.     @command.help_window = @help
  1321.     @message.help_window = @help
  1322.     @message_2.help_window = @help
  1323.     @tip_c = Window_TipCommand_help.new
  1324.     @tip_c.visible = false
  1325.     @flash_viewport_time = 20
  1326.     @flash_viewport = Viewport.new(240, 0, 400, 64)
  1327.     @flash_viewport.z = 9999
  1328.     @flash_viewport_2 = Viewport.new(0, 0, 240, 480)
  1329.     @flash_viewport_2.z = 9999
  1330.     @flash_viewport_2_2 = Viewport.new(240, 64, 150, 480 - 64)
  1331.     @flash_viewport_2_2.z = 9999
  1332.     @flash_viewport_3 = Viewport.new(0, 480 - 128, 450, 128)
  1333.     @flash_viewport_3.z = 9999
  1334.     @flash_viewport_4 = Viewport.new(240, 64, 640 - 240, (480 - 128) / 2)
  1335.     @flash_viewport_4.z = 9999
  1336.     @flash_viewport_5 = Viewport.new(
  1337.     240, 64 + (480 - 128) / 2, 640 - 240, (480 - 128) / 2)
  1338.     @flash_viewport_5.z = 9999
  1339.     @flash_viewport_6 = Viewport.new(440, 64, 200, 3 * 32)
  1340.     @flash_viewport_6.z = 9999
  1341.     black = Sprite.new
  1342.     black.bitmap = Bitmap.new(
  1343.     "Graphics/Pictures/color (6).png")
  1344.     black.opacity = 160
  1345.     @black_pictrue = []
  1346.     for i in 1..7
  1347.     @black_pictrue[i] = Sprite.new
  1348.     @black_pictrue[i].bitmap = Bitmap.new(
  1349.     "Graphics/Pictures/color (#{i - 1}).png")
  1350.     @black_pictrue[i].opacity = 0
  1351.     end
  1352.     @black_pictrue[(@@item[0][3].to_i)].opacity = 50
  1353.     $game_temp.map_bgm = $game_system.playing_bgm
  1354.     $game_system.bgm_stop
  1355.     Audio.bgm_play("Audio/BGM/058-Slow01.mid")
  1356.     @command_c = Window_Command_Shop_3.new(450,
  1357.     ["  参战", "  掠阵"], 2, 15)
  1358.     @command_c.opacity = 200
  1359.     @command_c.y = 480 - 64
  1360.     @command_c.z = 9998
  1361.     @command_c.active = false
  1362.     @command_c.visible = false
  1363.     @command_c.index = -1
  1364.     @command_s = Window_Command_Shop.new(400, ["  召唤", "  状态"], 2, 15)
  1365.     @command_s.opacity = 100
  1366.     @command_s.x = 240
  1367.     @command_s.y -= 50
  1368.     @command_status = Window_Command_Shop_2.new(
  1369.     200, ["当前队伍", "掠阵队伍"], 1, 15)
  1370.     @command_status.x = 640 - 200
  1371.     @command_status.y = 64
  1372.     @command_status.opacity = 200
  1373.     @command_status.active = false
  1374.     @command_status.index = -1
  1375.     @command_status.visible = false
  1376.     @help_command = Window_HelpCommand.new
  1377.     @help_command.y = -200
  1378.     @command_s.help_window = @help_command
  1379.     @command_status.help_window = @help_command
  1380.     @command_c.help_window = @help_command
  1381.     @command_canzhan = Window_Command_Shop.new(
  1382.     110, [" 加入掠阵队伍", "  取消"], 1, 15)
  1383.     @command_canzhan.active = false
  1384.     @command_canzhan.visible = false
  1385.     @command_canzhan.index = -1
  1386.     @command_canzhan.x = 300
  1387.     @command_canzhan.y = 150
  1388.     @command_canzhan.z = 9998
  1389.     @command_canzhan2 = Window_Command_Shop.new(
  1390.     110, [" 参与战斗", "  取消"], 1, 15)
  1391.     @command_canzhan2.active = false
  1392.     @command_canzhan2.visible = false
  1393.     @command_canzhan2.index = -1
  1394.     @command_canzhan2.x = 300
  1395.     @command_canzhan2.y = 300
  1396.     @command_canzhan2.z = 9998
  1397.     Graphics.transition
  1398.     for i in 1..21
  1399.       Graphics.update
  1400.       @command_s.y += 2
  1401.       @gold.y -= 2
  1402.       @message.x -= 10
  1403.       @message_2.x -= 10
  1404.       @command.x += 10
  1405.       @help_command.opacity += 10
  1406.       @help_command.contents_opacity += 10
  1407.       if i == 21
  1408.         @command_s.y = 0
  1409.         @gold.y = 480 - 64
  1410.         @message.x = 240
  1411.         @message_2.x = 240
  1412.         @command.x = 0
  1413.         @help_command.opacity = 200
  1414.         @help_command.contents_opacity = 200
  1415.       end
  1416.     end
  1417.     @flash_viewport.flash(Color.new(255,255,255,255),20)
  1418.     loop do
  1419.       Graphics.update
  1420.       Input.update
  1421.       update
  1422.       if $scene != self
  1423.         break
  1424.       end
  1425.     end
  1426.     for i in 1..21
  1427.       Graphics.update
  1428.       @command_s.y -= 2
  1429.       @gold.y += 2
  1430.       @message.x += 10
  1431.       @command.x -= 10
  1432.       @message_2.x += 10
  1433.       @help_command.y -= 10
  1434.       if i == 21
  1435.         @command_s.y = - 50
  1436.         @gold.y = 480 - 64 + 50
  1437.         @message.x = 240 + 200
  1438.         @message_2.x = 240 + 200
  1439.         @command.x = 0 - 200
  1440.         @help_command.y = 0 - 200
  1441.       end
  1442.     end
  1443.     Graphics.freeze
  1444.     $game_system.bgm_play($game_temp.map_bgm)
  1445.     @command.dispose
  1446.     @message.dispose
  1447.     @message_2.dispose
  1448.     @help.dispose
  1449.     @gold.dispose
  1450.     black.bitmap.dispose
  1451.     black.dispose
  1452.     map.dispose
  1453.     @command_c.dispose
  1454.     @command_s.dispose
  1455.     @tip_c.dispose
  1456.     @help_command.dispose
  1457.     @command_status.dispose
  1458.     @flash_viewport_2.dispose
  1459.     @flash_viewport_2_2.dispose
  1460.     @flash_viewport_3.dispose
  1461.     @flash_viewport_4.dispose
  1462.     @flash_viewport_5.dispose
  1463.     @command_canzhan.dispose
  1464.     @command_canzhan2.dispose
  1465.     for i in 1..7
  1466.     @black_pictrue[i].bitmap.dispose
  1467.     @black_pictrue[i].dispose
  1468.     end
  1469.     for i in 0..19
  1470.       @picture[i].bitmap.dispose
  1471.       @picture[i].dispose
  1472.     end
  1473.   end
  1474.   # ------------------------------------------
  1475.   # * update
  1476.   # ------------------------------------------
  1477.   def update
  1478.     @command_c.update
  1479.     @command_canzhan.update
  1480.     @command_canzhan2.update
  1481.     @command_s.update
  1482.     @message.update
  1483.     @actor = @@item[@command.index][0]
  1484.     if @flash_viewport_time >0
  1485.       @flash_viewport_time -= 1
  1486.       @flash_viewport.update
  1487.     end
  1488.     if @command.index != @oldindex
  1489.     if @command.index != -1
  1490.     @black_pictrue[(@@item[@command.index][3].to_i)].opacity = 50
  1491.     else
  1492.     @rand_num = rand(7) + 1
  1493.     @black_pictrue[(@@item[@rand_num][3].to_i)].opacity = 50
  1494.     end
  1495.     for i in 1..7
  1496.     if @command.index != -1
  1497.     @black_pictrue[i].opacity = 0 if i != (@@item[@command.index][3].to_i)
  1498.     else
  1499.     @black_pictrue[i].opacity = 0 if i != (@@item[@rand_num][3].to_i)
  1500.     end
  1501.     end
  1502.     @oldindex = @command.index
  1503.     end
  1504.     if @true_ == nil or @command.index != @oldindex_index
  1505.       if @picture != nil
  1506.         for i in 0..19
  1507.         @picture[i].bitmap.dispose
  1508.         @picture[i].dispose
  1509.         end
  1510.       end  
  1511.     @picture = []
  1512.     if @command.index != -1
  1513.     @picture_name = @@item[@command.index][3].to_i
  1514.     else
  1515.     @picture_name = @@item[rand(7) + 1][3].to_i
  1516.     end
  1517.     for i in 0..19
  1518.     @picture[i] = Sprite.new
  1519.     @picture[i].bitmap = Bitmap.new(
  1520.     "Graphics/Pictures/chage_picture#{@picture_name}.png")
  1521.     @picture[i].x, @picture[i].y = rand(640 - @picture[i].bitmap.width * 2) +
  1522.     1, rand(480 - @picture[i].bitmap.height * 2) + 1
  1523.     if @picture_name != 2
  1524.     rand_num = rand(5)
  1525.     case rand_num
  1526.     when 0
  1527.     @picture[i].zoom_x = 0.7
  1528.     @picture[i].zoom_x = 0.7
  1529.     when 1
  1530.     @picture[i].zoom_x = 0.8
  1531.     @picture[i].zoom_x = 0.8
  1532.     when 2
  1533.     @picture[i].zoom_x = 1.2
  1534.     @picture[i].zoom_x = 1.2
  1535.     when 3
  1536.     @picture[i].zoom_x = 1.3
  1537.     @picture[i].zoom_x = 1.3
  1538.     end
  1539.     end
  1540.     @picture[i].opacity = rand(50) + 206
  1541.     end
  1542.     @rand_picture = []
  1543.     for i in 0..5
  1544.       @rand_picture[i] = i - i * 2
  1545.     end
  1546.     @true_ = true
  1547.     @oldindex_index = @command.index
  1548.     end
  1549.     for i in 0..19
  1550.     @picture[i].x += rand(10) if i <= 9
  1551.     @picture[i].y += rand(10) if i <= 9
  1552.     @picture[i].x += rand(5) if i > 9
  1553.     @picture[i].y += rand(5) if i > 9
  1554.     if @picture_name != 2
  1555.     @picture[i].angle += @rand_picture[i] if i <= 5
  1556.     end
  1557.     @picture[i].opacity -= rand(10) + 1
  1558.      if @picture[i].opacity <= 50
  1559.        @picture[i].x, @picture[i].y = rand(640) + 1, rand(480) + 1
  1560.        @picture[i].opacity = 255
  1561.      end
  1562.     end
  1563.     @command.update
  1564.     @help.update
  1565.     @command_status.update
  1566.     @message_2.update
  1567.     if @command.active
  1568.       update_command
  1569.       return
  1570.     end
  1571.     if @command_c.active
  1572.       update_command_c
  1573.       return
  1574.     end
  1575.     if @command_s.active
  1576.       update_command_s
  1577.       return
  1578.     end
  1579.     if @message.active
  1580.       update_message
  1581.       return
  1582.     end
  1583.     if @message_2.active
  1584.       update_message_2
  1585.       return
  1586.     end
  1587.     if @command_status.active
  1588.       update_command_status
  1589.       return
  1590.     end
  1591.     if @command_canzhan.active
  1592.       update_command_canzhan
  1593.       return
  1594.     end
  1595.     if @command_canzhan2.active
  1596.       update_command_canzhan2
  1597.       return
  1598.     end
  1599.   end
  1600.   # ------------------------------------------
  1601.   # * update_command_status
  1602.   # ------------------------------------------
  1603.   def update_command_status
  1604.     if Input.press?(Input::F5)
  1605.       if @f3 == nil
  1606.       $game_system.se_play($data_system.decision_se)
  1607.       for i in 1..21
  1608.         Graphics.update
  1609.         @help_command.opacity -= 10
  1610.         @help_command.contents_opacity -= 10
  1611.         if i == 21
  1612.           @help_command.opacity = 0
  1613.           @help_command.contents_opacity = 0
  1614.         end
  1615.       end
  1616.       @f3 = true
  1617.       else
  1618.       for i in 1..21
  1619.         Graphics.update
  1620.         @help_command.opacity += 10
  1621.         @help_command.contents_opacity += 10
  1622.         if i == 21
  1623.           @help_command.opacity = 200
  1624.           @help_command.contents_opacity = 200
  1625.         end
  1626.       end
  1627.       @f3 = nil
  1628.       end
  1629.     end
  1630.     if Input.trigger?(Input::B)
  1631.       $game_system.se_play($data_system.cancel_se)
  1632.       @command_status.active = false
  1633.       @command_status.index = -1
  1634.       @command_status.visible = false
  1635.       @command_s.active = true
  1636.       @flash_viewport.flash(Color.new(255,255,255,255),20)
  1637.       for i in 1..22
  1638.         Graphics.update
  1639.         @flash_viewport.update
  1640.       end
  1641.     end
  1642.     if Input.trigger?(Input::C)
  1643.       $game_system.se_play($data_system.decision_se)
  1644.       case @command_status.index
  1645.       when 0
  1646.         if $game_temp.actors.size > 0
  1647.         @command_status.active = false
  1648.         @command_status.index = -1
  1649.         @command_status.visible = false
  1650.         @message.active = true
  1651.         @message.index = 0
  1652.         @help.visible = true if $game_temp.actors != []
  1653.         @help_command.visible = false
  1654.         @flash_viewport_4.flash(Color.new(255,255,255,255),20)
  1655.         for i in 1..22
  1656.           Graphics.update
  1657.           @flash_viewport_4.update
  1658.         end
  1659.         else
  1660.         $game_system.se_play($data_system.cancel_se)
  1661.         end
  1662.       when 1
  1663.         if $game_temp.actors_2.size > 0
  1664.         @command_status.active = false
  1665.         @command_status.index = -1
  1666.         @command_status.visible = false
  1667.         @message_2.active = true
  1668.         @message_2.index = 0
  1669.         @help.visible = true if $game_temp.actors_2 != []
  1670.         @help_command.visible = false
  1671.         @flash_viewport_5.flash(Color.new(255,255,255,255),20)
  1672.         for i in 1..22
  1673.           Graphics.update
  1674.           @flash_viewport_5.update
  1675.         end
  1676.         else
  1677.         $game_system.se_play($data_system.cancel_se)
  1678.         end
  1679.       end
  1680.     end
  1681.   end
  1682.   # ------------------------------------------
  1683.   # * update_command_canzhan
  1684.   # ------------------------------------------
  1685.   def update_command_canzhan
  1686.     if Input.trigger?(Input::B)
  1687.       $game_system.se_play($data_system.cancel_se)
  1688.       @command_canzhan.active = false
  1689.       @command_canzhan.index = -1
  1690.       @command_canzhan.visible = false
  1691.       @message.active = true
  1692.       @flash_viewport_4.flash(Color.new(255,255,255,255),20)
  1693.       for i in 1..22
  1694.         Graphics.update
  1695.         @flash_viewport_4.update
  1696.       end
  1697.     end
  1698.     if Input.trigger?(Input::C)
  1699.       $game_system.se_play($data_system.decision_se)
  1700.       case @command_canzhan.index
  1701.       when 0
  1702.       if $game_temp.actors.size > 0
  1703.       $game_temp.actors_2 << $game_temp.actors[@message.index]
  1704.       $game_party.remove_actor($game_temp.actors[@message.index].id)
  1705.       $game_temp.actors = []
  1706.       for i in 0...@@item.size
  1707.         if $game_party.actors.include?($game_actors[@@item[i][0]])
  1708.           $game_temp.actors << $game_actors[@@item[i][0]]
  1709.         end
  1710.       end
  1711.       @message.refresh
  1712.       @message_2.refresh
  1713.       @command_canzhan.active = false
  1714.       @command_canzhan.index = -1
  1715.       @command_canzhan.visible = false
  1716.       @message.active = true
  1717.       @flash_viewport_4.flash(Color.new(255,255,255,255),20)
  1718.       for i in 1..22
  1719.         Graphics.update
  1720.         @flash_viewport_4.update
  1721.       end
  1722.       else
  1723.       $game_system.se_play($data_system.cancel_se)
  1724.       end
  1725.       when 1
  1726.       @command_canzhan.active = false
  1727.       @command_canzhan.index = -1
  1728.       @command_canzhan.visible = false
  1729.       @message.active = true
  1730.       @flash_viewport_4.flash(Color.new(255,255,255,255),20)
  1731.       for i in 1..22
  1732.         Graphics.update
  1733.         @flash_viewport_4.update
  1734.       end
  1735.       end
  1736.     end
  1737.   end
  1738.   # ------------------------------------------
  1739.   # * update_message
  1740.   # ------------------------------------------
  1741.   def update_message
  1742.     if Input.trigger?(Input::B)
  1743.       $game_system.se_play($data_system.cancel_se)
  1744.       @message.active = false
  1745.       @message.index = -1
  1746.       @command_s.active = true
  1747.       @help.visible = false
  1748.       @help_command.visible = true
  1749.       @flash_viewport.flash(Color.new(255,255,255,255),20)
  1750.       for i in 1..22
  1751.         Graphics.update
  1752.         @flash_viewport.update
  1753.       end
  1754.     end
  1755.     if Input.trigger?(Input::C)
  1756.       $game_system.se_play($data_system.decision_se)
  1757.       if $game_temp.actors.size > 0
  1758.       @command_canzhan.active = true
  1759.       @command_canzhan.index = 0
  1760.       @command_canzhan.visible = true
  1761.       @message.active = false
  1762.       else
  1763.       $game_system.se_play($data_system.cancel_se)
  1764.       end
  1765.     end
  1766.   end
  1767.   # ------------------------------------------
  1768.   # * update_command_canzhan2
  1769.   # ------------------------------------------
  1770.   def update_command_canzhan2
  1771.     if Input.trigger?(Input::B)
  1772.       $game_system.se_play($data_system.cancel_se)
  1773.       @command_canzhan2.active = false
  1774.       @command_canzhan2.index = -1
  1775.       @command_canzhan2.visible = false
  1776.       @message_2.active = true
  1777.       @flash_viewport_5.flash(Color.new(255,255,255,255),20)
  1778.       for i in 1..22
  1779.         Graphics.update
  1780.         @flash_viewport_5.update
  1781.       end
  1782.     end
  1783.     if Input.trigger?(Input::C)
  1784.       $game_system.se_play($data_system.cancel_se)
  1785.       case @command_canzhan2.index
  1786.       when 0
  1787.       if $game_party.actors.size < 4
  1788.       $game_temp.actors << $game_temp.actors_2[@message_2.index]
  1789.       $game_party.add_actor($game_temp.actors_2[@message_2.index].id)
  1790.       $game_temp.actors_2.delete_at(@message_2.index)
  1791.       @message.refresh
  1792.       @message_2.refresh
  1793.       @command_canzhan2.active = false
  1794.       @command_canzhan2.index = -1
  1795.       @command_canzhan2.visible = false
  1796.       @message_2.active = true
  1797.       @flash_viewport_5.flash(Color.new(255,255,255,255),20)
  1798.       for i in 1..22
  1799.         Graphics.update
  1800.         @flash_viewport_5.update
  1801.       end
  1802.       else
  1803.       $game_system.se_play($data_system.cancel_se)
  1804.       end
  1805.       when 1
  1806.       $game_system.se_play($data_system.cancel_se)
  1807.       @command_canzhan2.active = false
  1808.       @command_canzhan2.index = -1
  1809.       @command_canzhan2.visible = false
  1810.       @message_2.active = true
  1811.       @flash_viewport_5.flash(Color.new(255,255,255,255),20)
  1812.       for i in 1..22
  1813.         Graphics.update
  1814.         @flash_viewport_5.update
  1815.       end
  1816.       end
  1817.     end
  1818.   end
  1819.   # ------------------------------------------
  1820.   # * update_message_2
  1821.   # ------------------------------------------
  1822.   def update_message_2
  1823.     if Input.trigger?(Input::B)
  1824.       $game_system.se_play($data_system.cancel_se)
  1825.       @message_2.active = false
  1826.       @message_2.index = -1
  1827.       @command_s.active = true
  1828.       @help.visible = false
  1829.       @help_command.visible = true
  1830.       @flash_viewport.flash(Color.new(255,255,255,255),20)
  1831.       for i in 1..22
  1832.         Graphics.update
  1833.         @flash_viewport.update
  1834.       end
  1835.     end
  1836.     if Input.trigger?(Input::C)
  1837.       $game_system.se_play($data_system.decision_se)
  1838.       if $game_temp.actors_2.size > 0
  1839.       @command_canzhan2.active = true
  1840.       @command_canzhan2.index = 0
  1841.       @command_canzhan2.visible = true
  1842.       @message_2.active = false
  1843.       else
  1844.       $game_system.se_play($data_system.cancel_se)
  1845.       end
  1846.     end
  1847.   end
  1848.   # ------------------------------------------
  1849.   # * update_command
  1850.   # ------------------------------------------
  1851.   def update_command
  1852.     if Input.press?(Input::F5)
  1853.       if @f7 == nil
  1854.       $game_system.se_play($data_system.decision_se)
  1855.       for i in 1..21
  1856.         Graphics.update
  1857.         @help.opacity -= 10
  1858.         @help.contents_opacity -= 10
  1859.         if i == 21
  1860.           @help.opacity = 0
  1861.           @help.contents_opacity = 0
  1862.         end
  1863.       end
  1864.       @f7 = true
  1865.       else
  1866.       for i in 1..21
  1867.         Graphics.update
  1868.         @help.opacity += 10
  1869.         @help.contents_opacity += 10
  1870.         if i == 21
  1871.           @help.opacity = 200
  1872.           @help.contents_opacity = 200
  1873.         end
  1874.       end
  1875.       @f7 = nil
  1876.       end
  1877.     end
  1878.     if Input.trigger?(Input::B)
  1879.       $game_system.se_play($data_system.cancel_se)
  1880.       @command.active = false
  1881.       @command.index = -1
  1882.       @command_s.active = true
  1883.       @help.visible = false
  1884.       @help_command.visible = true
  1885.       @flash_viewport.flash(Color.new(255,255,255,255),20)
  1886.       for i in 1..22
  1887.         Graphics.update
  1888.         @flash_viewport.update
  1889.       end
  1890.     end
  1891.     if Input.trigger?(Input::C)
  1892.       $game_system.se_play($data_system.decision_se)
  1893.       @command_c.active = true
  1894.       @command_c.visible = true
  1895.       @command_c.index = 0
  1896.       @command.active = false
  1897.       @tip_c.visible = true
  1898.       @tip_c.refresh($game_actors[@actor], @@item[@command.index][3])
  1899.       @flash_viewport_3.flash(Color.new(255,255,255,255),20)
  1900.       for i in 1..22
  1901.         Graphics.update
  1902.         @flash_viewport_3.update
  1903.       end
  1904.     end
  1905.   end
  1906.   # ------------------------------------------
  1907.   # * update_command_c
  1908.   # ------------------------------------------
  1909.   def update_command_c
  1910.     if Input.press?(Input::F5)
  1911.       if @f3 == nil
  1912.       $game_system.se_play($data_system.decision_se)
  1913.       for i in 1..21
  1914.         Graphics.update
  1915.         @help_command.opacity -= 10
  1916.         @help_command.contents_opacity -= 10
  1917.         if i == 21
  1918.           @help_command.opacity = 0
  1919.           @help_command.contents_opacity = 0
  1920.         end
  1921.       end
  1922.       @f3 = true
  1923.       else
  1924.       for i in 1..21
  1925.         Graphics.update
  1926.         @help_command.opacity += 10
  1927.         @help_command.contents_opacity += 10
  1928.         if i == 21
  1929.           @help_command.opacity = 200
  1930.           @help_command.contents_opacity = 200
  1931.         end
  1932.       end
  1933.       @f3 = nil
  1934.       end
  1935.     end
  1936.     if Input.trigger?(Input::B)
  1937.       $game_system.se_play($data_system.cancel_se)
  1938.       @command_c.active = false
  1939.       @command_c.visible = false
  1940.       @command_c.index = -1
  1941.       @tip_c.visible = false
  1942.       @command.active = true
  1943.       @help_command.visible = false
  1944.       @flash_viewport_2.flash(Color.new(255,255,255,255),20)
  1945.       @flash_viewport_2_2.flash(Color.new(255,255,255,255),20)
  1946.       for i in 1..22
  1947.         Graphics.update
  1948.         @flash_viewport_2.update
  1949.         @flash_viewport_2_2.update
  1950.       end
  1951.     end
  1952.     if Input.trigger?(Input::C)
  1953.       $game_system.se_play($data_system.decision_se)
  1954.       case @command_c.index
  1955.       when 0
  1956.       case @@item[@command.index][2]
  1957.       when 0
  1958.         if $game_temp.gold_bule >= @@item[@command.index][1]
  1959.           unless $game_party.actors.include?($game_actors[@actor]) or
  1960.             $game_temp.actors.include?($game_actors[@actor]) or
  1961.             $game_temp.actors_2.include?($game_actors[@actor])
  1962.           @buy = true
  1963.           $game_temp.gold_bule -= @@item[@command.index][1]
  1964.           @gold.refresh
  1965.           else
  1966.           $game_system.se_play($data_system.buzzer_se)
  1967.           end
  1968.         else
  1969.           @buy = false  
  1970.         end
  1971.       when 1
  1972.         if $game_temp.gold_red >= @@item[@command.index][1]
  1973.           unless $game_party.actors.include?($game_actors[@actor]) or
  1974.             $game_temp.actors.include?($game_actors[@actor]) or
  1975.             $game_temp.actors_2.include?($game_actors[@actor])
  1976.           @buy = true
  1977.           $game_temp.gold_red -= @@item[@command.index][1]
  1978.           @gold.refresh
  1979.           else
  1980.           $game_system.se_play($data_system.buzzer_se)
  1981.           end
  1982.         else
  1983.           @buy = false  
  1984.         end
  1985.       when 2
  1986.         if $game_temp.gold_yellow >= @@item[@command.index][1]
  1987.           unless $game_party.actors.include?($game_actors[@actor]) or
  1988.             $game_temp.actors.include?($game_actors[@actor]) or
  1989.             $game_temp.actors_2.include?($game_actors[@actor])
  1990.           @buy = true
  1991.           $game_temp.gold_yellow -= @@item[@command.index][1]
  1992.           @gold.refresh
  1993.           else
  1994.           $game_system.se_play($data_system.buzzer_se)
  1995.           end
  1996.         else
  1997.           @buy = false  
  1998.         end
  1999.       when 3
  2000.         if $game_temp.gold_green >= @@item[@command.index][1]
  2001.           unless $game_party.actors.include?($game_actors[@actor]) or
  2002.             $game_temp.actors.include?($game_actors[@actor]) or
  2003.             $game_temp.actors_2.include?($game_actors[@actor])
  2004.           @buy = true
  2005.           $game_temp.gold_green -= @@item[@command.index][1]
  2006.           @gold.refresh
  2007.           for i in 0...6
  2008.             Graphics.update
  2009.           end
  2010.           else
  2011.           $game_system.se_play($data_system.buzzer_se)
  2012.           end
  2013.         else
  2014.           @buy = false
  2015.         end
  2016.       end
  2017.       if @buy == true
  2018.       if $game_party.actors.size < 4
  2019.       unless $game_party.actors.include?($game_actors[@actor]) or
  2020.         $game_temp.actors.include?($game_actors[@actor]) or
  2021.         $game_temp.actors_2.include?($game_actors[@actor])
  2022.       $game_party.add_actor(@actor)
  2023.       $game_temp.actors << $game_actors[@actor]
  2024.       @message.refresh
  2025.       @tip = true
  2026.       else
  2027.       @tip = nil
  2028.       end
  2029.       else
  2030.       @tip = false
  2031.       end
  2032.       tip = Window_Base.new(150, 150, 340, 64)
  2033.       tip.z = 9999
  2034.       tip.opacity = 0
  2035.       tip.contents_opacity = 0
  2036.       tip.contents = Bitmap.new(tip.width - 32, tip.height - 32)
  2037.       tip.contents.font.color = text_color(@@item[@command.index][3])
  2038.       tip.contents.draw_text(
  2039.       40, 0, tip.width - 8, 32, $game_actors[@actor].name)
  2040.       cx = tip.contents.text_size($game_actors[@actor].name).width
  2041.       tip.contents.font.color = Color.new(255, 255, 255, 255)
  2042.       if @tip == true
  2043.       tip.contents.draw_text(
  2044.       40 + cx, 0, tip.width - 8, 32, "成功加入队伍")
  2045.       elsif @tip == false
  2046.       tip.contents.draw_text(
  2047.       40 + cx, 0, tip.width - 8, 32, "无法加入队伍")
  2048.       elsif @tip == nil
  2049.       tip.contents.draw_text(
  2050.       40 + cx, 0, tip.width - 8, 32, "已经在队伍中")
  2051.       end
  2052.       bitmap = RPG::Cache.character(
  2053.       $game_actors[@actor].character_name, $game_actors[@actor].character_hue)
  2054.       rect = Rect.new(0, 0, bitmap.width / 4, bitmap.height / 8)
  2055.       tip.contents.blt(0, 3, bitmap, rect)
  2056.       for i in 1..21
  2057.         Graphics.update
  2058.         tip.opacity += 10
  2059.         tip.contents_opacity += 10
  2060.         if i == 21
  2061.           tip.opacity = 200
  2062.           tip.contents_opacity = 200
  2063.         end
  2064.       end
  2065.       for i in 1..50
  2066.         Graphics.update
  2067.       end
  2068.       for i in 1..21
  2069.         Graphics.update
  2070.         tip.opacity -= 10
  2071.         tip.contents_opacity -= 10
  2072.         if i == 21
  2073.           tip.opacity = 0
  2074.           tip.contents_opacity = 0
  2075.         end
  2076.       end
  2077.       tip.dispose
  2078.       @command_c.active = false
  2079.       @command_c.visible = false
  2080.       @command_c.index = -1
  2081.       @command.active = true
  2082.       @tip_c.visible = false
  2083.       @help_command.visible = false
  2084.       @flash_viewport_2.flash(Color.new(255,255,255,255),20)
  2085.       @flash_viewport_2_2.flash(Color.new(255,255,255,255),20)
  2086.       for i in 1..22
  2087.         Graphics.update
  2088.         @flash_viewport_2.update
  2089.         @flash_viewport_2_2.update
  2090.       end
  2091.       else
  2092.       $game_system.se_play($data_system.buzzer_se)
  2093.       end
  2094.       when 1
  2095.       case @@item[@command.index][2]
  2096.       when 0
  2097.         if $game_temp.gold_bule >= @@item[@command.index][1]
  2098.           unless $game_party.actors.include?($game_actors[@actor]) or
  2099.            $game_temp.actors.include?($game_actors[@actor]) or
  2100.            $game_temp.actors_2.include?($game_actors[@actor])
  2101.           @buy = true
  2102.           $game_temp.gold_bule -= @@item[@command.index][1]
  2103.           @gold.refresh
  2104.           else
  2105.           $game_system.se_play($data_system.buzzer_se)
  2106.           end
  2107.         else
  2108.           @buy = false  
  2109.         end
  2110.       when 1
  2111.         if $game_temp.gold_red >= @@item[@command.index][1]
  2112.           unless $game_party.actors.include?($game_actors[@actor]) or
  2113.            $game_temp.actors.include?($game_actors[@actor]) or
  2114.            $game_temp.actors_2.include?($game_actors[@actor])
  2115.           @buy = true
  2116.           $game_temp.gold_red -= @@item[@command.index][1]
  2117.           @gold.refresh
  2118.           else
  2119.           $game_system.se_play($data_system.buzzer_se)
  2120.           end
  2121.         else
  2122.           @buy = false  
  2123.         end
  2124.       when 2
  2125.         if $game_temp.gold_yellow >= @@item[@command.index][1]
  2126.           unless $game_party.actors.include?($game_actors[@actor]) or
  2127.            $game_temp.actors.include?($game_actors[@actor]) or
  2128.            $game_temp.actors_2.include?($game_actors[@actor])
  2129.           @buy = true
  2130.           $game_temp.gold_yellow -= @@item[@command.index][1]
  2131.           @gold.refresh
  2132.           else
  2133.           $game_system.se_play($data_system.buzzer_se)
  2134.           end
  2135.         else
  2136.           @buy = false  
  2137.         end
  2138.       when 3
  2139.         if $game_temp.gold_green >= @@item[@command.index][1]
  2140.           unless $game_party.actors.include?($game_actors[@actor]) or
  2141.            $game_temp.actors.include?($game_actors[@actor]) or
  2142.            $game_temp.actors_2.include?($game_actors[@actor])
  2143.           @buy = true
  2144.           $game_temp.gold_green -= @@item[@command.index][1]
  2145.           @gold.refresh
  2146.           for i in 0...6
  2147.             Graphics.update
  2148.           end
  2149.           else
  2150.           $game_system.se_play($data_system.buzzer_se)
  2151.           end
  2152.         else
  2153.           @buy = false
  2154.         end
  2155.       end
  2156.       if @buy == true
  2157.       unless $game_party.actors.include?($game_actors[@actor]) or
  2158.            $game_temp.actors.include?($game_actors[@actor]) or
  2159.            $game_temp.actors_2.include?($game_actors[@actor])
  2160.       $game_temp.actors_2 << $game_actors[@actor]
  2161.       @message_2.refresh
  2162.       @tip = true
  2163.       else
  2164.       @tip = false
  2165.       end
  2166.       tip = Window_Base.new(150, 150, 340, 64)
  2167.       tip.z = 9999
  2168.       tip.opacity = 0
  2169.       tip.contents_opacity = 0
  2170.       tip.contents = Bitmap.new(tip.width - 32, tip.height - 32)
  2171.       tip.contents.font.color = text_color(@@item[@command.index][3])
  2172.       tip.contents.draw_text(
  2173.       40, 0, tip.width - 8, 32, $game_actors[@actor].name)
  2174.       cx = tip.contents.text_size($game_actors[@actor].name).width
  2175.       tip.contents.font.color = Color.new(255, 255, 255, 255)
  2176.       if @tip == true
  2177.       tip.contents.draw_text(
  2178.       40 + cx, 0, tip.width - 8, 32, "已经加入掠阵队伍")
  2179.       elsif @tip == false
  2180.       tip.contents.draw_text(
  2181.       40 + cx, 0, tip.width - 8, 32, "无法加入掠阵队伍")
  2182.       end
  2183.       bitmap = RPG::Cache.character(
  2184.       $game_actors[@actor].character_name, $game_actors[@actor].character_hue)
  2185.       rect = Rect.new(0, 0, bitmap.width / 4, bitmap.height / 8)
  2186.       tip.contents.blt(0, 3, bitmap, rect)
  2187.       for i in 1..21
  2188.         Graphics.update
  2189.         tip.opacity += 10
  2190.         tip.contents_opacity += 10
  2191.         if i == 21
  2192.           tip.opacity = 200
  2193.           tip.contents_opacity = 200
  2194.         end
  2195.       end
  2196.       for i in 1..50
  2197.         Graphics.update
  2198.       end
  2199.       for i in 1..21
  2200.         Graphics.update
  2201.         tip.opacity -= 10
  2202.         tip.contents_opacity -= 10
  2203.         if i == 21
  2204.           tip.opacity = 0
  2205.           tip.contents_opacity = 0
  2206.         end
  2207.       end
  2208.       tip.dispose
  2209.       @command_c.active = false
  2210.       @command_c.visible = false
  2211.       @command_c.index = -1
  2212.       @command.active = true
  2213.       @tip_c.visible = false
  2214.       @help_command.visible = false
  2215.       @flash_viewport_2.flash(Color.new(255,255,255,255),20)
  2216.       @flash_viewport_2_2.flash(Color.new(255,255,255,255),20)
  2217.       for i in 1..22
  2218.         Graphics.update
  2219.         @flash_viewport_2.update
  2220.         @flash_viewport_2_2.update
  2221.       end
  2222.       else
  2223.       $game_system.se_play($data_system.buzzer_se)
  2224.       end
  2225.       end
  2226.     end
  2227.   end
  2228.   # ------------------------------------------
  2229.   # * update_command_s
  2230.   # ------------------------------------------
  2231.   def update_command_s
  2232.     if Input.press?(Input::F5)
  2233.       if @f3 == nil
  2234.       $game_system.se_play($data_system.decision_se)
  2235.       for i in 1..21
  2236.         Graphics.update
  2237.         @help_command.opacity -= 10
  2238.         @help_command.contents_opacity -= 10
  2239.         if i == 21
  2240.           @help_command.opacity = 0
  2241.           @help_command.contents_opacity = 0
  2242.         end
  2243.       end
  2244.       @f3 = true
  2245.       else
  2246.       for i in 1..21
  2247.         Graphics.update
  2248.         @help_command.opacity += 10
  2249.         @help_command.contents_opacity += 10
  2250.         if i == 21
  2251.           @help_command.opacity = 200
  2252.           @help_command.contents_opacity = 200
  2253.         end
  2254.       end
  2255.       @f3 = nil
  2256.       end
  2257.     end
  2258.     if Input.trigger?(Input::B)
  2259.       $game_system.se_play($data_system.cancel_se)
  2260.       $scene = Scene_Map.new
  2261.     end
  2262.     if Input.trigger?(Input::C)
  2263.       $game_system.se_play($data_system.decision_se)
  2264.       case @command_s.index
  2265.       when 0
  2266.         if @@item.size > 0
  2267.         @help.visible = true
  2268.         @command_s.active = false
  2269.         @command.active = true
  2270.         @command.index = 0
  2271.         @help_command.visible = false
  2272.         @flash_viewport_2.flash(Color.new(255,255,255,255),20)
  2273.         @flash_viewport_2_2.flash(Color.new(255,255,255,255),20)
  2274.         for i in 1..22
  2275.           Graphics.update
  2276.           @flash_viewport_2.update
  2277.           @flash_viewport_2_2.update
  2278.         end
  2279.         else
  2280.         $game_system.se_play($data_system.cancel_se)
  2281.         end
  2282.       when 1
  2283.         @command_status.active = true
  2284.         @command_status.visible = true
  2285.         @command_status.index = 0
  2286.         @command_s.active = false
  2287.         @flash_viewport_6.flash(Color.new(255,255,255,255),20)
  2288.         for i in 1..22
  2289.           Graphics.update
  2290.           @flash_viewport_6.update
  2291.         end
  2292.       end
  2293.     end
  2294.   end
  2295. end


难道 就没有 会╮(╯_╰)╭ 吗555

360截图20161206031539677.jpg (58.03 KB, 下载次数: 1)

360截图20161206031539677.jpg

360截图20161206031601111.jpg (61.82 KB, 下载次数: 1)

360截图20161206031601111.jpg

雇佣兵.zip

860.67 KB, 下载次数: 52


作者: j296196585    时间: 2016-12-20 15:24
@yang1zhi 求帮忙看看 这个脚本还有救吗
作者: yang1zhi    时间: 2016-12-20 16:39
j296196585 发表于 2016-12-20 15:24
@yang1zhi 求帮忙看看 这个脚本还有救吗

附件下载后提示有毒被自动删了。
在ITEM = [[14, 100, 0, 7, "深渊の呼唤.PNG", "深渊呼唤"],继续添加不行的吗
作者: j296196585    时间: 2016-12-20 18:38
yang1zhi 发表于 2016-12-20 16:39
附件下载后提示有毒被自动删了。
在ITEM = [[14, 100, 0, 7, "深渊の呼唤.PNG", "深渊呼唤"],继续添加不 ...

https://rpg.blue/forum.php?mod=viewthread&tid=334330

这是原作者  地址 。。。




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