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

Project1

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

[有事请教] 套装效果脚本融合 不显示内容249行出错

[复制链接]

Lv4.逐梦者

梦石
0
星屑
6301
在线时间
1104 小时
注册时间
2015-8-15
帖子
658
跳转到指定楼层
1
发表于 2024-4-18 08:25:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 金芒芒 于 2024-4-18 09:05 编辑

第一个脚本精灵不能显示第二脚本的装备属性内容了

RUBY 代码复制
  1. #==============================================================================
  2. # 〓 套装 〓  <显示>                     Author : 芯☆淡茹水
  3. #==============================================================================
  4. # 套装说明窗口
  5. #==============================================================================
  6. class Suit_Help < Sprite
  7.   #--------------------------------------------------------------------------
  8.   attr_reader :actor_index, :suit_id
  9.   #--------------------------------------------------------------------------
  10.   # 初始化
  11.   #--------------------------------------------------------------------------
  12.   def initialize(actor_index)
  13.     super()
  14.     @actor_index = actor_index
  15.     @suit_id = 0
  16.     @contents = Sprite.new
  17.     @help_width = XdRs_Suit::Help_Width
  18.     hide
  19.   end
  20.   #--------------------------------------------------------------------------
  21.   # 释放
  22.   #--------------------------------------------------------------------------
  23.   def dispose
  24.     dispose_bitmap
  25.     @contents.dispose
  26.     super
  27.   end
  28.   #--------------------------------------------------------------------------
  29.   # 释放位图
  30.   #--------------------------------------------------------------------------
  31.   def dispose_bitmap
  32.     @contents.bitmap && @contents.bitmap.dispose
  33.     self.bitmap && self.bitmap.dispose
  34.   end
  35.   #--------------------------------------------------------------------------
  36.   # 隐藏
  37.   #--------------------------------------------------------------------------
  38.   def hide;  self.visible = @contents.visible = false; end
  39.   #--------------------------------------------------------------------------
  40.   # 显示
  41.   #--------------------------------------------------------------------------
  42.   def show;  self.visible = @contents.visible = true;  end
  43.   #--------------------------------------------------------------------------
  44.   # 角色实例
  45.   #--------------------------------------------------------------------------
  46.   def actor; return $game_party.actors[@actor_index];  end
  47.   #--------------------------------------------------------------------------
  48.   # 设置角色索引
  49.   #--------------------------------------------------------------------------
  50.   def set_actor(index);@actor_index != index && refresh(index, @suit_id);end
  51.   #--------------------------------------------------------------------------
  52.   # 设置套装ID
  53.   #--------------------------------------------------------------------------
  54.   def set_suit_id(id); @suit_id != id && refresh(@actor_index, id);      end
  55.   #--------------------------------------------------------------------------
  56.   # 设置位置
  57.   #--------------------------------------------------------------------------
  58.   def set_place(x, y)
  59.     gw = XdRs_Suit::Graphics_Width
  60.     gh = XdRs_Suit::Graphics_Height
  61.     x = self.bitmap ? [[0, x].max, gw - self.bitmap.width].min : x
  62.     y = self.bitmap ? [[0, y].max, gh - self.bitmap.height].min : y
  63.     self.x = @contents.x = x
  64.     self.y = @contents.y = y
  65.     self.z = 998; @contents.z = 999
  66.   end
  67.   #--------------------------------------------------------------------------
  68.   # 刷新
  69.   #--------------------------------------------------------------------------
  70.   def refresh(index, id)
  71.     hide
  72.     @actor_index = index
  73.     @suit_id = id
  74.     return if !actor || @suit_id == 0
  75.     setup_effects
  76.     recreate_image
  77.     draw_all
  78.     show
  79.   end
  80.   #--------------------------------------------------------------------------
  81.   # 设置套装效果
  82.   #--------------------------------------------------------------------------
  83.   def setup_effects
  84.     @effect = Suit_Effect.new(@suit_id, actor.suit_num(@suit_id))
  85.     @all_equips = XdRs_Suit.suits(@suit_id)
  86.     @words = []
  87.     (@all_equips.size-1).times{|i| @words.push(@effect.words(i))}
  88.     @words = @words.find_all{|w| w != ""}
  89.     @all_equips = XdRs_Suit.suits(@suit_id)
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # 重新生成图像
  93.   #--------------------------------------------------------------------------
  94.   def recreate_image
  95.     dispose_bitmap
  96.     height = height_count
  97.     self.bitmap = Bitmap.new(@help_width, height)
  98.     @contents.bitmap = Bitmap.new(@help_width, height)
  99.     @contents.bitmap.font.bold = true
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # 高度计算
  103.   #--------------------------------------------------------------------------
  104.   def height_count
  105.     height = 100
  106.     @words.each do |w|
  107.       height += [w.size, 1].max * 22 + 22
  108.     end
  109.     return height + @all_equips.size * 22
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # 设置文字颜色
  113.   #--------------------------------------------------------------------------
  114.   def set_font_color(color)
  115.     @contents.bitmap.font.color = color
  116.   end
  117.   #--------------------------------------------------------------------------
  118.   # 描绘文字
  119.   #--------------------------------------------------------------------------
  120.   def draw_text(x, y, w, h, text, a=0)
  121.     last_color = @contents.bitmap.font.color.clone
  122.     ow = XdRs_Suit.out_line_width
  123.     set_font_color(Color.new(0,0,0,160))
  124.     @contents.bitmap.draw_text(x+ow, y, w, h, text, a)
  125.     @contents.bitmap.draw_text(x-ow, y, w, h, text, a)
  126.     @contents.bitmap.draw_text(x, y+ow, w, h, text, a)
  127.     @contents.bitmap.draw_text(x, y-ow, w, h, text, a)
  128.     @contents.bitmap.draw_text(x+ow, y+ow, w, h, text, a)
  129.     @contents.bitmap.draw_text(x-ow, y-ow, w, h, text, a)
  130.     set_font_color(last_color)
  131.     @contents.bitmap.draw_text(x, y, w, h, text, a)
  132.   end
  133.   #--------------------------------------------------------------------------
  134.   # 描绘所有内容
  135.   #--------------------------------------------------------------------------
  136.   def draw_all
  137.     draw_bg
  138.     draw_words
  139.   end
  140.   #--------------------------------------------------------------------------
  141.   # 描绘背景
  142.   #--------------------------------------------------------------------------
  143.   def draw_bg
  144.     color = XdRs_Suit.get_color(0)
  145.     color.alpha = 10
  146.     x = y = 0; w = self.bitmap.width; h = self.bitmap.height
  147.     5.times do |i|
  148.       self.bitmap.fill_rect(x,y,w,h,color)
  149.       color.alpha += 30
  150.       x+=1;y+=1;w-=2;h-=2
  151.     end
  152.     self.bitmap.fill_rect(5,7,@help_width-10,30,XdRs_Suit.get_color(3))
  153.   end
  154.   #--------------------------------------------------------------------------
  155.   # 描绘效果语言文本
  156.   #--------------------------------------------------------------------------
  157.   def draw_words
  158.     return if !actor || @suit_id == 0 || !@contents.bitmap
  159.     @contents.bitmap.clear
  160.     y = 10
  161.     @contents.bitmap.font.size = 20
  162.     set_font_color(XdRs_Suit.get_color(1))
  163.     text = XdRs_Suit::Tit_Word.gsub("\name",  @effect.name)
  164.     draw_text(0, y, @help_width, 24, text, 1)
  165.     y += 28
  166.     set_font_color(XdRs_Suit.get_color(3))
  167.     @contents.bitmap.font.size = 16
  168.     draw_text(0, y, @help_width, 20, XdRs_Suit.suit_num_text(@suit_id, actor), 1)
  169.     y += 24
  170.     size = @all_equips.size - 1
  171.     size.times{|i| y = draw_stage(i, y)}
  172.     y += 10
  173.     @all_equips.size.times do |i|
  174.       draw_equip(@all_equips[i], y+i*22)
  175.     end
  176.   end
  177.   #--------------------------------------------------------------------------
  178.   # 检查角色件数阶段是否激活效果
  179.   #--------------------------------------------------------------------------
  180.   def is_act?(num, n)
  181.     return (num - 2 - n) >= 0
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # 描绘件数阶段效果
  185.   #--------------------------------------------------------------------------
  186.   def draw_stage(index, y)
  187.     num = actor.suit_num(@suit_id)
  188.     set_font_color(XdRs_Suit.get_color(is_act?(num, index) ? 2 : 4))
  189.     a = ["天书坎","天书坤","天书震","天书巽","天书中宫""天书乾"][index]
  190.     draw_text(0, y, @help_width, 20, a, 1)
  191. #   draw_text(0, y, @help_width, 20, "装备 #{index+2} 件", 1)
  192.     y += 22
  193.     word = @words[index]
  194.     if (word.size == 0)
  195.       set_font_color(XdRs_Suit.get_color(4))
  196.       draw_text(0, y, @help_width, 20, "(无)", 1)
  197.       y += 20
  198.     else
  199.       set_font_color(XdRs_Suit.get_color(is_act?(num, index) ? 3 : 4))
  200.       word.each do |e|
  201.         e == "" && next
  202.         draw_text(0, y, @help_width, 20, e, 1)
  203.         y += 20
  204.       end
  205.     end
  206.     return y + 10
  207.   end
  208.   #--------------------------------------------------------------------------
  209.   # 描绘装备
  210.   #--------------------------------------------------------------------------
  211.   def draw_equip(equip, y)
  212.     set_font_color(XdRs_Suit.get_color(actor.is_equiped?(equip) ? 3 : 4))
  213.     cw = @contents.bitmap.text_size(equip.name).width + 4
  214.     x = (@help_width - cw - 24) / 2
  215.     bitmap = RPG::Cache.icon(equip.icon_name)
  216.     size = XdRs_Suit::Icon_Size
  217.     rect1 = Rect.new(x, y, 20, 20)
  218.     rect2 = Rect.new(0, 0, size, size)
  219.     @contents.bitmap.stretch_blt(rect1, bitmap, rect2)
  220.     draw_text(x+24, y+3, cw, 20, equip.name)
  221.   end
  222. end
  223. #==============================================================================
  224. class Scene_Equip
  225.   #--------------------------------------------------------------------------
  226.   # 更改主程序
  227.   #--------------------------------------------------------------------------
  228.   alias xdrs_suit_main main
  229.   def main
  230.     @suit_help = Suit_Help.new(@actor_index)
  231.     xdrs_suit_main
  232.     @suit_help.dispose
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # 更改刷新
  236.   #--------------------------------------------------------------------------
  237.   alias xdrs_suit_update update
  238.   def update
  239.     update_suit_help
  240.     xdrs_suit_update
  241.   end
  242.   #--------------------------------------------------------------------------
  243.   # 刷新套装说明窗口
  244.   #--------------------------------------------------------------------------
  245.   def update_suit_help
  246.     @suit_help.set_actor(@actor.index)
  247.     if @right_window.active
  248.       equip = @right_window.item
  249.     elsif @item_window.active
  250.       equip = @item_window.item
  251.     end
  252.     @suit_help.set_suit_id(XdRs_Suit.suit_id(equip))
  253.     update_place
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # 刷新套装说明窗口位置
  257.   #--------------------------------------------------------------------------
  258.   def update_place
  259.     return unless @suit_help.visible
  260.     if @right_window.active
  261.       x = @right_window.x - XdRs_Suit::Help_Width
  262.       y = @right_window.index * 32 + @right_window.y
  263.     elsif @item_window.active
  264.       index = @item_window.index
  265.       x = @item_window.x + (index+1) % 2 * @item_window.width / 2
  266.       y = @item_window.y + index / 2 * 32
  267.     end
  268.     @suit_help.set_place(x, y)
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   # 更改刷新项目
  272.   #--------------------------------------------------------------------------
  273.   alias xdrs_suit_update_item update_item
  274.   def update_item
  275.     xdrs_suit_update_item
  276.     Input.trigger?(Input::C) && @suit_help.draw_words
  277.   end
  278. end


RUBY 代码复制
  1. #==============================================================================
  2. # ■ Scene_Equip
  3. #------------------------------------------------------------------------------
  4. #  处理装备画面的类。
  5. #==============================================================================
  6.  
  7. class Scene_Equip
  8.   #--------------------------------------------------------------------------
  9.   # ● 初始化对像
  10.   #     actor_index : 角色索引
  11.   #     equip_index : 装备索引
  12.   #--------------------------------------------------------------------------
  13.   def initialize(actor_index = 0)
  14.     @actor_index = actor_index
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ● 主处理
  18.   #--------------------------------------------------------------------------
  19.   def main
  20.     # 生成地图背景
  21.     @menuXiaoLiu_TransparentBackground = Spriteset_Map.new
  22.     # 获取角色
  23.     @actor = $game_party.actors[@actor_index]
  24.     @right_window = Window_EquipRight.new(@actor)#右边窗口=
  25.     @right_window.set_new_parameters(nil)
  26.     @item_window1 = Window_EquipItem.new(@actor, 1)
  27.     @item_window2 = Window_EquipItem.new(@actor, 0)
  28.     @item_window3 = Window_EquipItem.new(@actor, 2)
  29.     @item_window4 = Window_EquipItem.new(@actor, 4)
  30.     @item_window5 = Window_EquipItem.new(@actor, 3)
  31.     @item_window6 = Window_EquipItem.new(@actor, 5)
  32.     @item_window7 = Window_EquipItem.new(@actor, 6)
  33.  
  34.  
  35.  
  36.     @menuXiaoLiu_HelpText = XiaoLiu_Window_HelpText.new
  37.     @menuXiaoLiu_HelpText.set_text = "确认进入该选项    取消返回地图"
  38.  
  39.     @equipXiaoLiu_IndexCommand = XiaoLiu_Window_EquipCommand.new
  40.  
  41.  
  42.     @item_window1.visible = true
  43.     @item_window2.visible = false
  44.     @item_window3.visible = false
  45.     @item_window4.visible = false
  46.     @item_window5.visible = false
  47.     @item_window6.visible = false
  48.     @item_window7.visible = false
  49.     # 执行过渡
  50.     Graphics.transition
  51.     # 主循环
  52.     loop do
  53.       # 刷新游戏画面
  54.       Graphics.update
  55.       # 刷新输入信息
  56.       Input.update
  57.       # 刷新画面
  58.       update
  59.       # 如果画面切换的话的就中断循环
  60.       if $scene != self
  61.         break
  62.       end
  63.     end
  64.     # 准备过渡
  65.     Graphics.freeze
  66.     # 释放窗口
  67.     @right_window.dispose
  68.     @item_window1.dispose
  69.     @item_window2.dispose
  70.     @item_window3.dispose
  71.     @item_window4.dispose
  72.     @item_window5.dispose
  73.     @item_window6.dispose
  74.     @item_window7.dispose
  75.     @menuXiaoLiu_HelpText.dispose
  76.     @equipXiaoLiu_IndexCommand.dispose
  77.     @menuXiaoLiu_TransparentBackground.dispose
  78.   end
  79.   #--------------------------------------------------------------------------
  80.   # ● 刷新
  81.   #--------------------------------------------------------------------------
  82.   def refresh
  83.     case @equipXiaoLiu_IndexCommand.index
  84.     when 0
  85.       # 设置物品窗口的可视状态
  86.       @item_window1.visible = (@right_window.index == 0)
  87.       @item_window2.visible = (@right_window.index == 1)
  88.       @item_window3.visible = (@right_window.index == 2)
  89.       @item_window4.visible = (@right_window.index == 3)
  90.       @item_window5.visible = (@right_window.index == 4)
  91.       @item_window6.visible = false
  92.       @item_window7.visible = false
  93.     when 1
  94.       @item_window1.visible = false
  95.       @item_window2.visible = false
  96.       @item_window3.visible = false
  97.       @item_window4.visible = false
  98.       @item_window5.visible = false
  99.       @item_window6.visible = true
  100.       @item_window7.visible = false
  101.     when 2
  102.       @item_window1.visible = false
  103.       @item_window2.visible = false
  104.       @item_window3.visible = false
  105.       @item_window4.visible = false
  106.       @item_window5.visible = false
  107.       @item_window6.visible = false
  108.       @item_window7.visible = true
  109.     end
  110.  
  111.     # 获取当前装备中的物品
  112.     item1 = @right_window.item
  113.     # 设置当前的物品窗口到 @item_window
  114.     case @equipXiaoLiu_IndexCommand.index
  115.     when 0
  116.       case @right_window.index
  117.       when 0
  118.         @item_window = @item_window1
  119.       when 1
  120.         @item_window = @item_window2
  121.       when 2
  122.         @item_window = @item_window3
  123.       when 3
  124.         @item_window = @item_window4
  125.       when 4
  126.         @item_window = @item_window5
  127.       end
  128.     when 1
  129.       @item_window = @item_window6
  130.     when 2
  131.       @item_window = @item_window7
  132.     end
  133.  
  134.     # 右窗口被激活的情况下
  135.     if @right_window.active
  136.       # 删除变更装备后的能力
  137.       @right_window.set_new_parameters(nil)
  138.     end
  139.     # 物品窗口被激活的情况下
  140.     if @item_window.active
  141.       # 获取现在选中的物品
  142.       item2 = @item_window.item
  143.       # 变更装备
  144.       last_hp = @actor.hp
  145.       last_sp = @actor.sp
  146.       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
  147.       # 获取变更装备后的能力值
  148.       new_atk = @actor.atk
  149.       new_pdef = @actor.pdef
  150.       new_mdef = @actor.mdef
  151.       @nePar = []
  152.       @nePar.push(@actor.atk)
  153.       @nePar.push(@actor.pdef)
  154.       @nePar.push(@actor.mdef)
  155.       @nePar.push(@actor.str)
  156.       @nePar.push(@actor.dex)
  157.       @nePar.push(@actor.agi)
  158.       @nePar.push(@actor.int)
  159.       # 返回到装备
  160.       @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
  161.       @actor.hp = last_hp
  162.       @actor.sp = last_sp
  163.       # 描画左窗口
  164.       @right_window.set_new_parameters(@nePar)
  165.     end
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # ● 刷新画面
  169.   #--------------------------------------------------------------------------
  170.   def update
  171.     @equipXiaoLiu_IndexCommand.update
  172.     # 右侧窗口被激活的情况下: 调用 update_right
  173.     if @right_window.active
  174.       update_right
  175.       return
  176.     end
  177.     # 物品窗口被激活的情况下: 调用 update_item
  178.     if @item_window != nil and @item_window.active
  179.       update_item
  180.       return
  181.     end
  182.  
  183.     return xiaoliuUpdate_IndexCommand if @equipXiaoLiu_IndexCommand.active
  184.   end
  185.   def xiaoliuUpdate_IndexCommand
  186.     @item_window1.visible = (@equipXiaoLiu_IndexCommand.index == 0)
  187.     @item_window6.visible = (@equipXiaoLiu_IndexCommand.index == 1)
  188.     @item_window7.visible = (@equipXiaoLiu_IndexCommand.index == 2)
  189.     # 按下 R 键的情况下
  190.     if Input.trigger?(Input::R)
  191.       # 演奏光标 SE
  192.       $game_system.se_play($data_system.cursor_se)
  193.       # 移至下一位角色
  194.       @actor_index += 1
  195.       @actor_index %= $game_party.actors.size
  196.       # 切换到别的装备画面
  197.       $scene = Scene_Equip.new(@actor_index)
  198.       return
  199.     end
  200.     # 按下 L 键的情况下
  201.     if Input.trigger?(Input::L)
  202.       # 演奏光标 SE
  203.       $game_system.se_play($data_system.cursor_se)
  204.       # 移至上一位角色
  205.       @actor_index += $game_party.actors.size - 1
  206.       @actor_index %= $game_party.actors.size
  207.       # 切换到别的装备画面
  208.       $scene = Scene_Equip.new(@actor_index)
  209.       return
  210.     end
  211.     # 按下 B 键的情况下
  212.     if Input.trigger?(Input::B)
  213.       # 演奏取消 SE
  214.       $game_system.se_play($data_system.cancel_se)
  215.       # 切换到菜单画面
  216.       $scene = Scene_Menu.new(2)
  217.       return
  218.     end
  219.     if Input.trigger?(Input::C)
  220.       $game_system.se_play($data_system.decision_se)
  221.       @equipXiaoLiu_IndexCommand.active = false
  222.       @right_window.active = true
  223.       @right_window.index = 0
  224.       return
  225.     end
  226.  
  227.   end
  228.  
  229.   #--------------------------------------------------------------------------
  230.   # ● 刷新画面 (右侧窗口被激活的情况下)
  231.   #--------------------------------------------------------------------------
  232.   def update_right
  233.     refresh
  234.     @right_window.update
  235.     @right_window.set_index = @equipXiaoLiu_IndexCommand.index
  236.     # 按下 B 键的情况下
  237.     if Input.trigger?(Input::B)
  238.       # 演奏取消 SE
  239.       $game_system.se_play($data_system.cancel_se)
  240.       @equipXiaoLiu_IndexCommand.active = true
  241.       @right_window.active = false
  242.       @right_window.index = -1
  243.       @item_window2.visible = false
  244.       @item_window3.visible = false
  245.       @item_window4.visible = false
  246.       @item_window5.visible = false
  247.       return
  248.     end
  249.     if Input.trigger?(Input::X)
  250.  
  251.       p @right_window.index
  252.     end
  253.  
  254.     # 按下 C 键的情况下
  255.     if Input.trigger?(Input::C)
  256.       # 固定装备的情况下
  257.       if @actor.equip_fix?(@right_window.index)
  258.         # 演奏冻结 SE
  259.         $game_system.se_play($data_system.buzzer_se)
  260.         return
  261.       end
  262.       # 演奏确定 SE
  263.       $game_system.se_play($data_system.decision_se)
  264.       # 激活物品窗口
  265.       @right_window.active = false
  266.       @item_window.active = true
  267.       @item_window.index = 0
  268.       return
  269.     end
  270.   end
  271.   #--------------------------------------------------------------------------
  272.   # ● 刷新画面 (物品窗口被激活的情况下)
  273.   #--------------------------------------------------------------------------
  274.   def update_item
  275.     refresh
  276.     @item_window.update
  277.     # 按下 B 键的情况下
  278.     if Input.trigger?(Input::B)
  279.       # 演奏取消 SE
  280.       $game_system.se_play($data_system.cancel_se)
  281.       # 激活右侧窗口
  282.       @right_window.active = true
  283.       @item_window.active = false
  284.       @item_window.index = -1
  285.       return
  286.     end
  287.     # 按下 C 键的情况下
  288.     if Input.trigger?(Input::C)
  289.       $game_system.se_play($data_system.equip_se)
  290.       case @equipXiaoLiu_IndexCommand.index
  291.       when 0
  292.         item = @item_window.item
  293.         @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  294.       when 1
  295.         item_rune = @item_window.item
  296.         case @right_window.index
  297.         when 0  #  符文1槽
  298.           body_rune = @actor.rune1
  299.           $game_party.gain_item(body_rune.id, 1) if body_rune != nil
  300.           @actor.rune1 = item_rune
  301.           $game_party.lose_item(item_rune.id, 1)
  302.         when 1  #  符文2槽
  303.           body_rune = @actor.rune2
  304.           $game_party.gain_item(body_rune.id, 1) if body_rune != nil
  305.           @actor.rune2 = item_rune
  306.           $game_party.lose_item(item_rune.id, 1)
  307.         when 2  #  符文3槽
  308.           body_rune = @actor.rune3
  309.           $game_party.gain_item(body_rune.id, 1) if body_rune != nil
  310.           @actor.rune3 = item_rune
  311.           $game_party.lose_item(item_rune.id, 1)
  312.         end
  313.       when 2
  314.         item_stone = @item_window.item
  315.         case @right_window.index
  316.         when 0  #  宝石1槽
  317.           body_stone = @actor.stone1
  318.           $game_party.gain_item(body_stone.id, 1) if body_stone != nil
  319.           @actor.stone1 = item_stone
  320.           $game_party.lose_item(body_stone.id, 1)
  321.         when 1  #  宝石2槽
  322.           body_stone = @actor.stone2
  323.           $game_party.gain_item(body_stone.id, 1) if body_stone != nil
  324.           @actor.stone2 = item_stone
  325.           $game_party.lose_item(body_stone.id, 1)
  326.         when 2  #  宝石3槽
  327.           body_stone = @actor.stone3
  328.           $game_party.gain_item(body_stone.id, 1) if body_stone != nil
  329.           @actor.stone3 = item_stone
  330.           $game_party.lose_item(body_stone.id, 1)
  331.         when 3  #  宝石4槽
  332.           body_stone = @actor.stone4
  333.           $game_party.gain_item(body_stone.id, 1) if body_stone != nil
  334.           @actor.stone4 = item_stone
  335.           $game_party.lose_item(body_stone.id, 1)
  336.         when 4  #  宝石5槽
  337.           body_stone = @actor.stone5
  338.           $game_party.gain_item(body_stone.id, 1) if body_stone != nil
  339.           @actor.stone5 = item_stone
  340.           $game_party.lose_item(body_stone.id, 1)
  341.         when 5  #  宝石6槽
  342.           body_stone = @actor.stone6
  343.           $game_party.gain_item(body_stone.id, 1) if body_stone != nil
  344.           @actor.stone6 = item_stone
  345.           $game_party.lose_item(body_stone.id, 1)
  346.         end
  347.       end
  348.       @right_window.active = true
  349.       @item_window.active = false
  350.       @item_window.index = -1
  351.       @right_window.refresh
  352.       @item_window.refresh
  353.       return
  354.     end
  355.   end
  356. end

Lv3.寻梦者

梦石
0
星屑
3841
在线时间
1966 小时
注册时间
2013-1-3
帖子
9536
2
发表于 2024-4-18 15:14:03 | 只看该作者
复制一下我在其他帖子里的回复
我是否真的需要这个功能?这个功能有没有其他替代方案?这个功能能不能由我自己实现?

LZ在论坛也求助这么多次了,真的想想:是为了消遣时间还是真的做出一个游戏?
拿出成品比任何提问任何构想都有价值

点评

战斗篇已经完成,现在部分是装备部分,和装备套装技能,装备等级颜色区分,个人目标是完成一个成品,人傻毅力强的那种  发表于 2024-4-19 07:21
《宿愿·寻剑篇》正式版已经发布!快去看看!点击进入论坛发布贴
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-2 02:00

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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