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

Project1

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

[已经解决] 萌新请教,脚本出错

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1422
在线时间
245 小时
注册时间
2019-1-18
帖子
190
跳转到指定楼层
1
发表于 2019-4-13 14:07:37 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 造小梦 于 2019-4-13 14:18 编辑

当我测试游戏时他就显示出错,这是怎么回事
RUBY 代码复制
  1. $VIPArcherScript ||= {};$VIPArcherScript[:help_ex] = 20141007
  2. $VIPArcherScript[:equip_limit] = false #是否使用了后知后觉的装备能力限制
  3. class << DataManager
  4.   alias_method :vip_load_database, :load_database
  5.   #--------------------------------------------------------------------------
  6.   # ● 读取数据库
  7.   #--------------------------------------------------------------------------
  8.   def load_database
  9.     vip_load_database
  10.     VIPArcher::Equipplus.equiphelpready
  11.   end
  12. end
  13. module VIPArcher;end
  14. module VIPArcher::Equipplus
  15.   TIME = 60 #帮助窗口自动出现的时间(单位帧
  16.   Font_Name = Font.default_name # 推荐"微软雅黑"
  17.   Font_Size = 20   # "微软雅黑"的话就20号字体
  18.   UP   = 25 #能力值提升颜色编号
  19.   DOWN = 25 #能力值下降颜色编号
  20.   VIP  = 25 #特殊能力颜色编号
  21.   MP   = 23
  22.   TP   = 29
  23.   CODE ={
  24.     11 => "属性抗性",
  25.     12 => "弱化抗性",
  26.     13 => "状态抗性",
  27.     14 => "状态免疫",
  28.     21 => "普通能力",
  29.     22 => "添加能力",
  30.     23 => "特殊能力",
  31.     31 => "攻击属性",
  32.     32 => "附带状态",
  33.     33 => "攻击速度",
  34.     34 => "添加攻击次数",
  35.     41 => "添加技能类型",
  36.     42 => "禁用技能类型",
  37.     43 => "技能",
  38.     44 => "禁用技能",
  39.   #添加能力
  40.   XPARAM ={
  41.     0 => "物理命中几率:",
  42.     1 => "物理闪避几率:",
  43.     2 => "暴击率:",
  44.     3 => "暴击闪避:",
  45.     4 => "魔法闪避:",
  46.     5 => "魔法反射:",
  47.     6 => "物理反击:",
  48.     7 => "\\c[25]回血:",
  49.     8 => "\\c[25]回魔:",
  50.     9 => "\\c[25]无双:"}
  51.   #队伍能力
  52.   PARTY_ABILITY ={
  53.     0 => "遇敌几率减半",
  54.     1 => "随机遇敌无效",
  55.     2 => "敌人偷袭无效",
  56.     3 => "先制攻击几率上升",
  57.     4 => "获得金钱数量双倍",
  58.     5 => "物品掉落几率双倍"}
  59.   #伤害类型
  60.   DAMAGE_TYPE = {
  61.     0 => "无",
  62.     1 => "HP伤害",
  63.     2 => "SP伤害",
  64.     3 => "HP恢复",
  65.     4 => "SP恢复",
  66.     5 => "吸血",
  67.     6 => "吸魔"}
  68.   #普通能力
  69.   #这只是个示范,你也可以依照个人喜好对这些用语添加颜色控制符
  70.   @params ={
  71.     0 => "\\c[25]生命",
  72.     1 => "\\c[25]魔法",
  73.     2 => "\\c[25]物攻",
  74.     3 => "\\c[25]物防",
  75.     4 => "\\c[25]魔攻",
  76.     5 => "\\c[25]魔防",
  77.     6 => "\\c[25]速度",
  78.     7 => "\\c[25]运气"}
  79.   #我举例技能类型的原因就是因为它 短
  80.   #初始化数据,当然如果你要用上面那样的控制符改变颜色的话
  81.   #欢迎枚举格式就是上面这样用Hash,用ID做键把用语对应起来
  82.   def self.equiphelpready
  83.     params = $data_system.terms.params
  84.     elements = $data_system.elements
  85.     weapon_types = $data_system.weapon_types
  86.     armor_types = $data_system.armor_types
  87.     etypes = $data_system.terms.etypes
  88.     skill_types = $data_system.skill_types
  89.     @states       ||= {}
  90.     @params       ||= {}
  91.     @weapon_types ||= {}
  92.     @armor_types  ||= {}
  93.     @etypes       ||= {}
  94.     @skill_types  ||= {}
  95.     @elements     ||= {}
  96.     skill_types.each_with_index{|x,y| @skill_types[y] = x if !x.nil?} if @skill_types == {}
  97.     $data_states.each{|x| @states[x.id] = x.name if !x.nil?} if @states == {}
  98.     elements.each_with_index{|x,y| @elements[y] = x if !x.nil?} if @elements == {}
  99.     weapon_types.each_with_index{|x,y| @weapon_types[y] = x if !x.nil?} if @weapon_types == {}
  100.     armor_types.each_with_index{|x,y| @armor_types[y] = x if !x.nil?} if @armor_types == {}
  101.     etypes.each_with_index{|x,y| @etypes[y] = x} if @etypes == {}
  102.     params.each_with_index{|x,y| @params[y] = x} if @params == {}
  103.   end
  104.   #获取装备帮助内容
  105.   def self.getequiphelp(equip)
  106.     help = "类型 "
  107.     help += "#{Vocab::etype(equip.etype_id)}\\c[0]\n"
  108.     param = []
  109.     if $VIPArcherScript[:equip_limit] #装备能力限制
  110.       help += "\\c[16]等级需求:#{equip.level_limit}\n" if equip.level_limit > 0
  111.       param_limit = []
  112.       for i in 0..7
  113.         if equip.params_limit(i) != 0
  114.           help += "\\c[16]#{@params[i]}需求:#{equip.params_limit(i)}\\c[0]\n"
  115.         end
  116.       end
  117.     end
  118.     equip.params.each_with_index{|x,y| param.push([@params[y],x])}
  119.     param = param.select{|x| x[1] != 0}
  120.     param.each{|x| help += "\\c[#{x[1]>0? UP : DOWN}]#{x[0]}:\\c[#{x[1]>0? UP : DOWN}]#{""if x[1]>0}#{x[1].to_int.to_s}\\c[0]\n"}
  121.     features = equip.features
  122.     featuresparam = []
  123.     featuresparam.push features.select{|x| x.code == 21}
  124.     featuresparam.push features.select{|x| x.code == 22}
  125.     featuresparam.push features.select{|x| x.code == 23}
  126.     featuresparam[0].each{|x| help += "\\c[#{x.value<0?DOWN: UP}]#{@params[x.data_id]}#{x.value<0?"×":"×"}#{(x.value.abs*100).to_i}%\n"}
  127.     featuresparam[1].each{|x| help += "\\c[#{x.value<0?DOWN: UP}]#{XPARAM[x.data_id]}#{x.value<0?"×":"×"}#{(x.value.abs*100).to_i}%\n"}
  128.     featuresparam[2].each{|x| help += "\\c[#{x.value<0?DOWN: UP}]#{SPARAM[x.data_id]}#{x.value<0?"×":"×"}#{(x.value.abs*100).to_i}%\n"}
  129.     if $VIPArcherScript[:slot_type]
  130.       help += "\\c[#{VIP}]#{CODE[55]}:#{SLOT_TYPE[$1.to_i]}\\c[0]\n" if equip.note =~ /<slot_type\s*[:](.*)>/i
  131.     else
  132.       features.select{|x| x.code == 55}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:双持武器\\c[0]\n"}
  133.     end
  134.     features.select{|x| x.code == 11}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@elements[x.data_id]}×#{(x.value*100).to_i}%\\c[0]\n"}
  135.     features.select{|x| x.code == 12}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@params[x.data_id]}×#{(x.value*100).to_i}%\\c[0]\n"}
  136.     features.select{|x| x.code == 13}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@states[x.data_id]}×#{(x.value*100).to_i}%\\c[0]\n"}
  137.     features.select{|x| x.code == 14}.each{|x| help += "\\c[#{VIP}]#{CODE[x.code]}:#{@states[x.data_id]}\\c[0]\n"}
  138.     features.select{|x| x.code == 31}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@elements[x.data_id]}\\c[0]\n"}
  139.     features.select{|x| x.code == 32}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{@states[x.data_id]}#{(x.value*100).to_i}%\\c[0]\n"}
  140.     features.select{|x| x.code == 33}.each{|x| help += "\\c[#{x.value>0? UP : DOWN}]#{CODE[x.code]}:#{x.value}\\c[0]\n"}
  141.     features.select{|x| x.code == 34}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]}:#{x.value}\\c[0]\n"}
  142.     features.select{|x| x.code == 42}.each{|x| help += "\\c[#{DOWN}]#{CODE[x.code]}:#{@skill_types[x.data_id]}\\c[0]\n"}
  143.     features.select{|x| x.code == 43}.each{|x| help += "\\c[#{UP}]#{CODE[x.code]} 【#{$data_skills[x.data_id].name}】\\c[0]\n"}
  144.     features.select{|x| x.code == 44}.each{|x| help += "\\c[#{DOWN}]#{CODE[x.code]} 【#{$data_skills[x.data_id].name}】\\c[0]\n"}
  145.     help
  146.   end
  147.   #获取技能帮助内容
  148.   def self.getskillhelp(skill)
  149.     help = ""
  150.     effects = skill.effects
  151.     damage  = skill.damage
  152.     r = [skill.required_wtype_id1,skill.required_wtype_id2]
  153.     help
  154.   end
  155.   #获取道具帮助内容
  156.   def self.getitemhelp(item)
  157.     help = ""
  158.     effects = item.effects
  159.     damage  = item.damage
  160.     help += "\\c[16]类型:\\c[#{VIP}]#{"贵重物品  "if item.itype_id != 1}\\c[#{DOWN}]#{item.consumable ? "消耗品":"非消耗品"}\\c[0]\n"
  161.     help += "\\c[16]范围:#{SCOPE[item.scope]}\\c[0]\n" if item.scope != 0
  162.     help += "\\c[16]效果:#{@elements[damage.element_id]}#{DAMAGE_TYPE[damage.type]}\\c[0]\n" if damage.type != 0
  163.     effects.select{|x| x.code == 31}.each{|x| help += "\\c[#{UP}]强化:#{@params[x.data_id]} #{x.value1.to_i}回合\\c[0]\n"}
  164.     effects.select{|x| x.code == 32}.each{|x| help += "\\c[#{UP}]弱化:#{@params[x.data_id]} #{x.value1.to_i}回合\\c[0]\n"}
  165.     effects.select{|x| x.code == 33}.each{|x| help += "\\c[#{UP}]解除:强化#{@params[x.data_id]}\\c[0]\n"}
  166.     effects.select{|x| x.code == 34}.each{|x| help += "\\c[#{UP}]解除:弱化#{@params[x.data_id]}\\c[0]\n"}
  167.     effects.select{|x| x.code == 21}.each{|x| help += "\\c[#{UP}]附加:#{x.data_id == 0 ? "普通攻击" : @states[x.data_id]} #{(x.value1*100).to_i}%\\c[0]\n"}
  168.     effects.select{|x| x.code == 22}.each{|x| help += "\\c[#{UP}]解除:#{@states[x.data_id]} #{(x.value1*100).to_i}%\\c[0]\n"}
  169.     effects.select{|x| x.code == 41}.each{|x| help += "\\c[#{VIP}]特殊效果:撤退\n"}
  170.     effects.select{|x| x.code == 42}.each{|x| help += "\\c[#{VIP}]提升:#{@params[x.data_id]}#{x.value1.to_i}点\\c[0]\n"}
  171.     effects.select{|x| x.code == 43}.each{|x| help += "\\c[#{VIP}]学会:#{$data_items[x.data_id].name}\\c[0]\n"}
  172.     help += "\\c[16]场合:#{OCCASION[item.occasion]}\\c[0]\n"
  173.     help
  174.   end
  175.   #计算行数(有些字体的汉字和[字母,数字,符号]的宽度不同,
  176.   #有可能会照成行数计算不对,尽量用宽度相同的字体吧)
  177.   def self.getline(text,maxtext)
  178.     text_new = ""
  179.     xtext = []
  180.     line = 0
  181.     text.each_line{|x| text_new += x.gsub(/\\\S\[\d+\]/i){}} #去掉控制符
  182.     text_new.each_line{|x| xtext.push x.gsub(/\n/){}}        #去掉换行符
  183.     xtext.each{|x| line += (x.size / (maxtext.to_f + 1).to_i) + 1}
  184.     line
  185.   end
  186. end
  187. #==============================================================================
  188. # ■ Window_Help_Ex
  189. #------------------------------------------------------------------------------
  190. #  加强显示特技和物品等的说明
  191. #==============================================================================
  192.  
  193. class Window_Help_Ex < Window_Base
  194.   include VIPArcher::Equipplus
  195.   #--------------------------------------------------------------------------
  196.   # ● 初始化对象
  197.   #--------------------------------------------------------------------------
  198.   def initialize(line_number = 0)
  199.     super(0, 0, 210, 0)
  200.     self.z = 150
  201.     contents.font.size = 14
  202.     @time = 0
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● 设置内容
  206.   #--------------------------------------------------------------------------
  207.   def set_text(text)
  208.     @text = text
  209.     refresh
  210.   end
  211.   #--------------------------------------------------------------------------
  212.   # ● 清除
  213.   #--------------------------------------------------------------------------
  214.   def clear
  215.     set_text("")
  216.   end
  217.   #--------------------------------------------------------------------------
  218.   # ● 更新帮助位置
  219.   #--------------------------------------------------------------------------
  220.   def uppos(index,rect,window)
  221.     self.height = fitting_height_vip(VIPArcher::Equipplus.getline(@xtext,13))
  222.     create_contents
  223.     contents.font.name = Font_Name
  224.     contents.font.size = Font_Size
  225.     rect.x -= window.ox
  226.     rect.y -= window.oy
  227.     ax = rect.x + rect.width + 10
  228.     ax = rect.x - self.width + 10 if ax + self.width > window.width + 10
  229.     ax += window.x
  230.     ax = 0 if ax < 0
  231.     ay = rect.y + rect.height
  232.     ay = rect.y - self.height if ay + self.height > window.height
  233.     ay += window.y
  234.     ay = 0 if ay < 0
  235.     self.x = ax
  236.     self.y = ay
  237.     set_text(@xtext)
  238.     @time = TIME
  239.     self.show
  240.     self.openness = 0
  241.   end
  242.   #--------------------------------------------------------------------------
  243.   # ● 设置物品
  244.   #     item : 技能、物品等
  245.   #--------------------------------------------------------------------------
  246.   def set_item(item)
  247.     if item == nil
  248.       set_text("")
  249.       return
  250.     end
  251.     @xtext = ""
  252.     if $VIPArcherScript[:itemcolor] # require 物品描绘颜色脚本
  253.       @xtext = "\\c[#{VIPArcher::ItemColor::Color_Lv[item.color]}]" +
  254.       "#{item.name}  #{item.color if item.color != 0}#{"" if item.color != 0}\\c[0]\n"
  255.     else
  256.       @xtext = "#{item.name}\n"
  257.     end
  258.     @xtext += "#{item.description}\n"
  259.  
  260.     if $VIPArcherScript[:exdrop_rate]   # require 队伍掉率扩展
  261.       @xtext += "\\c[#{$2.to_i > 0 ? UP : DOWN}]#{$1}掉率: #{$2}%\\c[0]\n" if
  262.       item.note =~ /<(\W+)掉率:\s*([0-9+.-]+)%>/i
  263.     end if item.is_a?(RPG::EquipItem) || item.is_a?(RPG::Skill)
  264.     @xtext = @xtext[0,@text.size - 2] if @xtext[@xtext.size - 2,2] == "\n"
  265.     if $VIPArcherScript[:load]      # require 队伍负重脚本
  266.       @xtext += "\\c[16]价格:#{item.price} 重量:#{item.load}\\c[0]\n"
  267.     else
  268.       @xtext += item.price == 0 ? "\\c[16]价格:\\c[14]无法出售\\c[0]\n":"\\c[16]价格:#{item.price}\\c[0]\n"
  269.     end if item.is_a?(RPG::EquipItem) || item.is_a?(RPG::Item)
  270.     @xtext += VIPArcher::Equipplus.getequiphelp(item) if item.is_a?(RPG::EquipItem)
  271.     @xtext += VIPArcher::Equipplus.getskillhelp(item) if item.is_a?(RPG::Skill)
  272.     @xtext += VIPArcher::Equipplus.getitemhelp(item) if item.is_a?(RPG::Item)
  273.  
  274.   end
  275.   #--------------------------------------------------------------------------
  276.   # ● 刷新
  277.   #--------------------------------------------------------------------------
  278.   def refresh
  279.     contents.clear
  280.     self.hide if @text == ""
  281.     draw_text_vip(4, 0, @text,width,40,false)
  282.   end
  283.   #--------------------------------------------------------------------------
  284.   # ● 更新画面
  285.   #--------------------------------------------------------------------------
  286.   def update
  287.     super
  288.     @time -= 1 if @time > 0
  289.     self.open if @time == 0
  290.   end
  291. end
  292. class Window_Base < Window
  293.   #--------------------------------------------------------------------------
  294.   # ● 计算窗口显示指定行数时的应用高度2*************************
  295.   #--------------------------------------------------------------------------
  296.   def fitting_height_vip(line_number)
  297.     line_number * contents.font.size + standard_padding * 2
  298.   end
  299.   # draw_text_ex的增强,使其可以自动换行  原作者:叶子 修改:wyongcan
  300.   #--------------------------------------------------------------------------
  301.   # ● 绘制带有控制符的文本内容
  302.   #   如果传递了width参数的话,会自动换行
  303.   #--------------------------------------------------------------------------
  304.   def draw_text_vip(x, y, text, width = nil,textwidth = nil,normalfont = true)
  305.     reset_font_settings if normalfont == true
  306.     text = convert_escape_characters(text)
  307.     pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
  308.     if width != nil
  309.       pos[:height] = contents.font.size
  310.       pos[:width] = width
  311.       pos[:textwidth] = textwidth
  312.     end
  313.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  314.   end
  315.   #--------------------------------------------------------------------------
  316.   # ● 文字的处理
  317.   #     c    : 文字
  318.   #     text : 绘制处理中的字符串缓存(字符串可能会被修改)
  319.   #     pos  : 绘制位置 {:x, :y, :new_x, :height}
  320.   #--------------------------------------------------------------------------
  321.   def process_character(c, text, pos)
  322.     case c
  323.     when "\r"   # 回车
  324.       return
  325.     when "\n"   # 换行
  326.       process_new_line(text, pos)
  327.     when "\f"   # 翻页
  328.       process_new_page(text, pos)
  329.     when "\e"   # 控制符
  330.       process_escape_character(obtain_escape_code(text), text, pos)
  331.     else        # 普通文字
  332.       pos[:textwidth] == nil ? text_width = text_size(c).width : text_width = pos[:textwidth]
  333.       if pos[:width] != nil && pos[:x] - pos[:new_x] + text_width > pos[:width]
  334.         process_new_line(text, pos)
  335.       end
  336.       process_normal_character(c, pos)
  337.     end
  338.   end
  339.   #--------------------------------------------------------------------------
  340.   # ● 处理换行文字
  341.   #--------------------------------------------------------------------------
  342.   alias vip_20141007_process_new_line process_new_line
  343.   def process_new_line(text, pos)
  344.     vip_20141007_process_new_line(text, pos)
  345.     pos[:height] = contents.font.size if pos[:width] != nil
  346.   end
  347. end
  348.  
  349. #==============================================================================
  350. # ■ 设置帮助增强窗口
  351. #==============================================================================
  352. class Window_Selectable < Window_Base
  353.   attr_reader   :help_ex_window
  354.   #--------------------------------------------------------------------------
  355.   # ● 调用帮助窗口的更新方法
  356.   #--------------------------------------------------------------------------
  357.   alias help_ex_call_update_help call_update_help
  358.   def call_update_help
  359.     help_ex_call_update_help
  360.     update_ex_help if active && @help_ex_window
  361.   end
  362.   #--------------------------------------------------------------------------
  363.   # ● 更新帮助内容
  364.   #--------------------------------------------------------------------------
  365.   def update_ex_help
  366.     @help_ex_window.set_item(item) if @help_ex_window
  367.     if index != -1 && item != nil
  368.       @help_ex_window.uppos(index,item_rect(index),self)
  369.     end
  370.   end
  371.   #--------------------------------------------------------------------------
  372.   # ● 设置帮助增强窗口
  373.   #--------------------------------------------------------------------------
  374.   def help_ex_window=(help_ex_window)
  375.     @help_ex_window = help_ex_window
  376.   end
  377. end
  378. #==============================================================================
  379. # ■ 在各场景处理帮助窗口
  380. #==============================================================================
  381. class Scene_Base
  382.   #--------------------------------------------------------------------------
  383.   # ● 生成帮助增强窗口
  384.   #--------------------------------------------------------------------------
  385.   def create_help_ex
  386.     @help_ex_window  = Window_Help_Ex.new
  387.     @help_ex_window .viewport = @viewport
  388.     @item_window.help_ex_window  = @help_ex_window if @item_window
  389.     @slot_window.help_ex_window  = @help_ex_window if @slot_window
  390.     @skill_window.help_ex_window = @help_ex_window if @skill_window
  391.     @buy_window.help_ex_window   = @help_ex_window if @buy_window
  392.     @sell_window.help_ex_window  = @help_ex_window if @sell_window
  393.   end
  394. end
  395. #道具栏
  396. class Scene_Item < Scene_ItemBase
  397.   #--------------------------------------------------------------------------
  398.   # ● 开始处理
  399.   #--------------------------------------------------------------------------
  400.   alias help_ex_start start
  401.   def start
  402.     help_ex_start
  403.     create_help_ex
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # ● 物品“取消”
  407.   #--------------------------------------------------------------------------
  408.   alias help_ex_on_item_cancel on_item_cancel
  409.   def on_item_cancel
  410.     help_ex_on_item_cancel
  411.     @help_ex_window.hide
  412.   end
  413. end
  414. #装备栏
  415. class Scene_Equip < Scene_MenuBase
  416.   #--------------------------------------------------------------------------
  417.   # ● 开始处理
  418.   #--------------------------------------------------------------------------
  419.   alias help_ex_start start
  420.   def start
  421.     help_ex_start
  422.     create_help_ex
  423.   end
  424.   #--------------------------------------------------------------------------
  425.   # ● 装备栏“取消”
  426.   #--------------------------------------------------------------------------
  427.   alias help_ex_on_slot_cancel on_slot_cancel
  428.   def on_slot_cancel
  429.     help_ex_on_slot_cancel
  430.     @help_ex_window.hide
  431.   end
  432. end
  433. #技能栏
  434. class Scene_Skill < Scene_ItemBase
  435.   #--------------------------------------------------------------------------
  436.   # ● 开始处理
  437.   #--------------------------------------------------------------------------
  438.   alias help_ex_start start
  439.   def start
  440.     help_ex_start
  441.     create_help_ex
  442.   end
  443.   #--------------------------------------------------------------------------
  444.   # ● 物品“确定”
  445.   #--------------------------------------------------------------------------
  446.   alias help_ex_on_item_ok on_item_ok
  447.   def on_item_ok
  448.     help_ex_on_item_ok
  449.     @help_ex_window.hide
  450.   end
  451.   #--------------------------------------------------------------------------
  452.   # ● 物品“取消”
  453.   #--------------------------------------------------------------------------
  454.   alias help_ex_on_item_cancel on_item_cancel
  455.   def on_item_cancel
  456.     help_ex_on_item_cancel
  457.     @help_ex_window.hide
  458.   end
  459. end
  460. #战斗界面
  461. class Scene_Battle < Scene_Base
  462.   #--------------------------------------------------------------------------
  463.   # ● 开始处理
  464.   #--------------------------------------------------------------------------
  465.   alias help_ex_start start
  466.   def start
  467.     help_ex_start
  468.     create_help_ex
  469.   end
  470.   #--------------------------------------------------------------------------
  471.   # ● 技能“确定”
  472.   #--------------------------------------------------------------------------
  473.   alias help_ex_on_skill_ok on_skill_ok
  474.   def on_skill_ok
  475.     help_ex_on_skill_ok
  476.     @help_ex_window.hide
  477.   end
  478.   #--------------------------------------------------------------------------
  479.   # ● 技能“取消”
  480.   #--------------------------------------------------------------------------
  481.   alias help_ex_on_skill_cancel on_skill_cancel
  482.   def on_skill_cancel
  483.     help_ex_on_skill_cancel
  484.     @help_ex_window.hide
  485.   end
  486.   #--------------------------------------------------------------------------
  487.   # ● 物品“确定”
  488.   #--------------------------------------------------------------------------
  489.   alias help_ex_on_item_ok on_item_ok
  490.   def on_item_ok
  491.     help_ex_on_item_ok
  492.     @help_ex_window.hide
  493.   end
  494.   #--------------------------------------------------------------------------
  495.   # ● 物品“取消”
  496.   #--------------------------------------------------------------------------
  497.   alias help_ex_on_item_cancel on_item_cancel
  498.   def on_item_cancel
  499.     help_ex_on_item_cancel
  500.     @help_ex_window.hide
  501.   end
  502. end
  503. #商店界面
  504. class Scene_Shop < Scene_MenuBase
  505.   #--------------------------------------------------------------------------
  506.   # ● 开始处理
  507.   #--------------------------------------------------------------------------
  508.   alias help_ex_start start
  509.   def start
  510.     help_ex_start
  511.     create_help_ex
  512.   end
  513.   #--------------------------------------------------------------------------
  514.   # ● 买入“确定”
  515.   #--------------------------------------------------------------------------
  516.   alias help_ex_on_buy_ok on_buy_ok
  517.   def on_buy_ok
  518.     help_ex_on_buy_ok
  519.     @help_ex_window.hide
  520.   end
  521.   #--------------------------------------------------------------------------
  522.   # ● 买入“取消”
  523.   #--------------------------------------------------------------------------
  524.   alias help_ex_on_buy_cancel on_buy_cancel
  525.   def on_buy_cancel
  526.     help_ex_on_buy_cancel
  527.     @help_ex_window.hide
  528.   end
  529.   #--------------------------------------------------------------------------
  530.   # ● 卖出“确定”
  531.   #--------------------------------------------------------------------------
  532.   alias help_ex_on_sell_ok on_sell_ok
  533.   def on_sell_ok
  534.     help_ex_on_sell_ok
  535.     @help_ex_window.hide
  536.   end
  537.   #--------------------------------------------------------------------------
  538.   # ● 卖出“取消”
  539.   #--------------------------------------------------------------------------
  540.   alias help_ex_on_sell_cancel on_sell_cancel
  541.   def on_sell_cancel
  542.     help_ex_on_sell_cancel
  543.     @help_ex_window.hide
  544.   end
  545. end

Lv5.捕梦者

梦石
10
星屑
39440
在线时间
1914 小时
注册时间
2010-11-14
帖子
3315

R考场第七期纪念奖

2
发表于 2019-4-13 15:31:37 | 只看该作者
可能是38行那里你删了个东西,少了后一项和右括号
你可以把逗号去掉,加上和前面一对的括号

评分

参与人数 2星屑 +30 +1 收起 理由
VIPArcher + 30 眼尖
MCCF + 1 认可答案

查看全部评分

用头画头像,用脚写脚本
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-20 02:47

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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