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

Project1

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

[已经过期] 关于注释选项脚本

[复制链接]

Lv2.观梦者

梦石
0
星屑
839
在线时间
75 小时
注册时间
2022-3-19
帖子
53
跳转到指定楼层
1
发表于 2023-4-25 15:54:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
我找到一个使用注释生成选项的脚本,选项会显示在窗口左侧,想请大佬们帮我看看能不能把选项位置弄到中间。下面是代码
  1. #==============================================================================
  2. # ■ 注释选项                                                      by:celica
  3. #------------------------------------------------------------------------------
  4. #   通过在注释中填写内容达到可判断的选项
  5. #==============================================================================

  6. #==============================================================================
  7. class Game_Interpreter
  8.   #--------------------------------------------------------------------------
  9.   # ● 注释
  10.   #--------------------------------------------------------------------------
  11.   def command_108
  12.     ct = @params[0]
  13.     while next_event_code == 408 or next_event_code == 108
  14.       @index += 1
  15.       ct += @list[@index].parameters[0]
  16.     end
  17.     if ct[0,2] == "选项"
  18.       pas = []
  19.       pai = []
  20.       ct.split(/\|/).each_with_index {|par, index|
  21.         next if index == 0
  22.         if par =~ /s\[([0-9]+)\]/
  23.           next unless $game_switches[$1.to_i]
  24.         end
  25.         if par =~ /v\[([0-9]+)\]/
  26.           next unless $game_variables[$1.to_i] > 0
  27.         end
  28.         if par =~ /i\[([0-9]+)\]/
  29.           next unless $game_party.item_number($data_items[$1.to_i]) > 0
  30.         end
  31.         par.gsub!(/s\[([0-9]+)\]/,"")
  32.         par.gsub!(/v\[([0-9]+)\]/,"")
  33.         par.gsub!(/i\[([0-9]+)\]/,"")
  34.         pas.push(par)
  35.         pai.push(index)
  36.       }
  37.       return if pas.empty?
  38.       setup_choices([pas,100])
  39.       Fiber.yield while $game_message.choice?
  40.       $game_variables[10] = (@branch[@indent] == 99 ? 0 : pai[@branch[@indent]])
  41.     end
  42.   end
  43. end
复制代码



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

本版积分规则

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

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

GMT+8, 2024-5-2 03:54

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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