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

Project1

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

[已经解决] 详尽任务显示界面脚本 如何把脚本里的默认文字色改为白色

[复制链接]

Lv3.寻梦者 (版主)

  /) /)<

梦石
0
星屑
4212
在线时间
4890 小时
注册时间
2009-2-16
帖子
8434

开拓者短篇七成年组季军

跳转到指定楼层
1
发表于 2014-5-23 13:51:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
使用了这个任务脚本……
因为用了YUKI对话框 所以windowsbase里面的默认文字色已经改成黑色了
如何单独让这个脚本 默认文字颜色为白色?
  1. =begin
  2. --------------------------------------------------------------------------
  3. 详尽任务显示界面 v2.1
  4. --------------------------------------------------------------------------
  5. By 叶子

  6. 日期与更新
  7. 3-29-2006 -v1.0
  8. 4-3-2006  -v2.0
  9. -可以改变文字颜色,显示变量,显示图标,显示图片
  10. -大幅简化了编写任务内容的过程,加入自动换行功能
  11. -精简了窗口,使其还可以用作图鉴系统、日记系统等等
  12. 4-6-2006  -v2.1
  13. -增加了获得全部任务与删除全部任务命令
  14. -改正通假字,修改了示例任务3
  15. --------------------------------------------------------------------------
  16. 顾名思义,就是显示任务资料的界面
  17. 任务资料要预先在这里设定好
  18. 下载范例工程,能帮助你更快更好地掌握使用方法
  19. --------------------------------------------------------------------------
  20. 使用方法:

  21. 1、召唤任务显示界面:$scene = Scene_Task.new

  22. 可以在事件中的“脚本”指令加入这段东西,又或者修改 Scene_Menu 来增加一个显示
  23. 任务的选项。如果是修改 Scene_Menu 增加选项的话,在脚本倒数第30行左右,
  24. 把 $scene = Scene_Map.new 修改成 $scene = Scene_Menu.new(任务界面index)

  25. 2、设置任务资料

  26.   2.1、相关内容解析
  27.   
  28.   所有内容文字必须用双引号括住
  29.   
  30.   名称:任务的名字(显示在左边窗口中),大小为208×32,如果全部为文字的话,
  31.         够放九个全角字符
  32.         
  33.   简介:任务的介绍(显示在右边窗口中),宽368,高不限
  34.   
  35.         文字可以自动换行
  36.   
  37.    2.1.1、控制码解析
  38.    
  39.    名称和内容均可用控制码,注意两条反斜线都要打!
  40.    
  41.    \\v[n] 显示n号变量
  42.    \\c[n] 改变字体颜色。
  43.           n=1~7 时同“显示文章”的\c[n],n=8 时为半透明色,n=9 时为系统色(青色)
  44.    \\n[i] 显示i号角色名字
  45.    \\i[文件名] 显示图标
  46.    \\p[文件名] 显示图片
  47.    
  48.    2.1.2、高级:内嵌表达式
  49.         
  50.    请参考帮助-脚本入门-字符串-内嵌表达式相关内容。
  51.    它可以用来在任务的名称和简介那里显示变量。
  52.    常用的表达式(注意不要漏了井号和大括号):
  53.    #{$game_variables[n]}       ——插入n号变量的值
  54.    #{$game_party.item_number(n)}  ——插入持有n号物品数量
  55.                                       同理还有weapon_number,armor_number
  56.    还可以预先定义一个变量,再插入(例子见示例任务3-灵魂线)
  57.    
  58.   2.2、注意事项
  59.   
  60.    2.2.1、括号、逗号和双引号 [ ] , " 必须使用半角符号(英文输入),
  61.           引号内的内容则没有关系
  62.          
  63.    2.2.2、单引号 ' 和双引号 " 的区别:
  64.           为了不出错误,全部用双引号吧!当然如果你对Ruby很熟悉,那就没所谓了
  65.   
  66.   2.3、开始设置吧!
  67.   从107行开始设置任务资料,可以参考示例任务来设置,请仔细阅读附加讲解
  68.   
  69. 3、接受任务

  70. 事件里的“脚本”指令输入:get_task(任务ID)
  71. 例如 get_task(1) 就是接受1号任务

  72.   3.1、获得全部任务
  73.   
  74.   事件里的“脚本”指令输入:get_all_task
  75.   这个功能基本上是用来在编写好所有任务资料后测试排版的
  76.   

  77. 4、完成/删除任务

  78. 事件里的“脚本”指令输入:finish_task(任务ID)
  79. 例如 finish_task(1) 就是完成1号任务

  80. 注意:本脚本不负责完成任务后的奖励之类的东西,请自行在事件中判断,
  81.        这里的完成任务指的是从任务列表中删去此任务

  82.   4.1、删除全部任务
  83.   
  84.   事件里的“脚本”指令输入:finish_all_task
  85.   作为获得全部任务的对应功能存在,似乎不会怎么用到
  86. =end

  87. class Scene_Task
  88.   # 这里设置任务内容翻页音效
  89.   CHANGE_PAGE_SE = "Audio/SE/s系统-光标-重-004"
  90. end

  91. class Game_Party
  92.   #--------------------------------------------------------------------------
  93.   # ● 设置任务资料
  94.   #--------------------------------------------------------------------------
  95.   def get_tasks_info
  96.     @tasks_info = []
  97.    
  98.     名称 = "\\i[108任务图标]\\c[3]悬赏任务 - 德古拉男爵"
  99.     简介 = "\\i[任务]\\c[6]悬赏任务 - 德古拉男爵\\p[分割线]
  100. \\c[0]前所未有的危机!德古拉男爵被通灵在斐扬了!必须前往消灭!

  101. 在\\c[2]斐扬僵尸洞某处\\c[0]消灭首领级魔物\\c[2]德古拉男爵\\c[0]。
  102.     "
  103.     @tasks_info[1] = Game_Task.new(名称, 简介)
  104.    
  105.    end
  106. end

  107. #==============================================================================
  108. # ■ Interpreter
  109. #------------------------------------------------------------------------------
  110. #  执行事件命令的解释器。本类在 Game_System 类
  111. # 与 Game_Event 类的内部使用。
  112. #==============================================================================

  113. class Interpreter
  114.   #--------------------------------------------------------------------------
  115.   # ● 接受任务
  116.   #--------------------------------------------------------------------------
  117.   def get_task(id)
  118.     task = $game_party.tasks_info[id]
  119.     return true if (task.nil? or $game_party.current_tasks.include?(task.id))
  120.     $game_party.current_tasks.unshift(task.id)
  121.     return true
  122.   end
  123.   #--------------------------------------------------------------------------
  124.   # ● 获得全部任务
  125.   #--------------------------------------------------------------------------
  126.   def get_all_task
  127.     # 清空当前任务
  128.     $game_party.current_tasks.clear
  129.     for task in $game_party.tasks_info
  130.       next if task.nil?
  131.       $game_party.current_tasks.unshift(task.id)
  132.     end
  133.     return true
  134.   end
  135.   #--------------------------------------------------------------------------
  136.   # ● 完成/放弃任务
  137.   #--------------------------------------------------------------------------
  138.   def finish_task(id)
  139.     task = $game_party.tasks_info[id]
  140.     return true if task.nil?
  141.     $game_party.current_tasks.delete(task.id)
  142.     return true
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● 删除全部任务
  146.   #--------------------------------------------------------------------------
  147.   def finish_all_task
  148.     $game_party.current_tasks.clear
  149.     return true
  150.   end
  151. end

  152. #==============================================================================
  153. # ■ Game_Party
  154. #------------------------------------------------------------------------------
  155. #  处理同伴的类。包含金钱以及物品的信息。本类的实例
  156. # 请参考 $game_party。
  157. #==============================================================================

  158. class Game_Party
  159.   #--------------------------------------------------------------------------
  160.   # ● 定义实例变量
  161.   #--------------------------------------------------------------------------
  162.   attr_writer     :latest_task                  # 上次查看的任务
  163.   #--------------------------------------------------------------------------
  164.   # ● 取得任务资料
  165.   #--------------------------------------------------------------------------
  166.   def tasks_info
  167.     if @tasks_info.nil?
  168.       get_tasks_info
  169.     end
  170.     return @tasks_info
  171.   end
  172.   #--------------------------------------------------------------------------
  173.   # ● 取得当前任务
  174.   #--------------------------------------------------------------------------
  175.   def current_tasks
  176.     if @current_tasks.nil?
  177.       @current_tasks = []
  178.     end
  179.     return @current_tasks
  180.   end
  181.   #--------------------------------------------------------------------------
  182.   # ● 上次查看的任务
  183.   #--------------------------------------------------------------------------
  184.   def latest_task
  185.     if !current_tasks.include?(@latest_task)
  186.       @latest_task = current_tasks[0]
  187.     end
  188.     return @latest_task
  189.   end
  190. end

  191. #==============================================================================
  192. # ■ Game_Task
  193. #------------------------------------------------------------------------------
  194. #  处理任务的类。包含任务的信息。
  195. #==============================================================================

  196. class Game_Task
  197.   attr_accessor   :name                   # 名称
  198.   attr_accessor   :briefing               # 简介
  199.   def initialize(name, briefing)
  200.     @name = name
  201.     @briefing = briefing
  202.   end
  203.   def height
  204.     text = @briefing.clone
  205.     x = 0
  206.     y = 64
  207.     min_y = 0
  208.     # 限制文字处理
  209.     begin
  210.       last_text = text.clone
  211.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  212.     end until text == last_text
  213.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  214.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  215.     end
  216.     # 为了方便、将 "\\\\" 变换为 "\000"
  217.     text.gsub!(/\\\\/) { "\000" }
  218.     # "\C" 变为 "\001"
  219.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  220.     # "\I" 变为 "\002"
  221.     text.gsub!(/\\[Ii]/) { "\002" }
  222.     # "\P" 变为 "\003"
  223.     text.gsub!(/\\[Pp]/) { "\003" }
  224.     # c 获取 1 个字 (如果不能取得文字就循环)
  225.     while ((c = text.slice!(/./m)) != nil)
  226.       # \\ 的情况下
  227.       if c == "\000"
  228.         # 还原为本来的文字
  229.         c = "\\"
  230.       end
  231.       # \C[n] 的情况下
  232.       if c == "\001"
  233.         # 更改文字色
  234.         text.sub!(/\[([0-9]+)\]/, "")
  235.         # 下面的文字
  236.         next
  237.       end
  238.       # 图标的情况下
  239.       if c == "\002"
  240.         icon_name = ''
  241.         while ((cha = text.slice!(/./m)) != ']')
  242.           next if cha == '['
  243.           icon_name += cha
  244.         end
  245.         icon = RPG::Cache.icon(icon_name)
  246.         if x + icon.width > 368
  247.           x = 0
  248.           y += [32, min_y].max
  249.           min_y = 0
  250.         end
  251.         x += 28
  252.         next
  253.       end
  254.       # 图片的情况下
  255.       if c == "\003"
  256.         pic_name = ''
  257.         while ((cha = text.slice!(/./m)) != ']')
  258.           next if cha == '['
  259.           pic_name += cha
  260.         end
  261.         pic = RPG::Cache.picture(pic_name)
  262.         if x + pic.width > 368
  263.           x = 0
  264.           y += [32, min_y].max
  265.           min_y = 0
  266.         end
  267.         x += pic.width
  268.         min_y = [pic.height, 32].max
  269.         next
  270.       end
  271.       # 另起一行文字的情况下
  272.       if c == "\n"
  273.         y += [32, min_y].max
  274.         min_y = 0
  275.         x = 0
  276.         # 下面的文字
  277.         next
  278.       end
  279.       # 自动换行处理
  280.       if x + 22 > 368
  281.         y += [32, min_y].max
  282.         min_y = 0
  283.         x = 0
  284.       end
  285.       # x 为要描绘文字的加法运算
  286.       x += 22
  287.     end
  288.     return (y + [32, min_y].max)
  289.   end
  290.   def id
  291.     return $game_party.tasks_info.index(self)
  292.   end
  293. end

  294. #==============================================================================
  295. # ■ Window_Task_Name
  296. #------------------------------------------------------------------------------
  297. #  任务名称显示窗口。
  298. #==============================================================================

  299. class Window_Task_Name < Window_Selectable
  300.   #--------------------------------------------------------------------------
  301.   # ● 初始化对像
  302.   #--------------------------------------------------------------------------
  303.   def initialize(tasks)
  304.     super(0, 0, 240, 480)
  305.     @tasks = []
  306.     for id in tasks
  307.       @tasks.push($game_party.tasks_info[id])
  308.     end
  309.     @item_max = tasks.size
  310.     self.contents = Bitmap.new(
  311.     self.width - 32, @item_max == 0 ? 32 : @item_max * 32)
  312.     refresh
  313.     self.index = 0
  314.   end
  315.   #--------------------------------------------------------------------------
  316.   # ● 刷新
  317.   #--------------------------------------------------------------------------
  318.   def refresh
  319.     self.contents.clear
  320.     if @tasks != []
  321.       for task in @tasks
  322.         draw_item(task)
  323.       end
  324.     else
  325.       draw_blank
  326.     end
  327.   end
  328.   #--------------------------------------------------------------------------
  329.   # ● 描绘项目
  330.   #--------------------------------------------------------------------------
  331.   def draw_item(task)
  332.     text = task.name.clone
  333.     x = 0
  334.     y = @tasks.index(task) * 32
  335.     # 限制文字处理
  336.     begin
  337.       last_text = text.clone
  338.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  339.     end until text == last_text
  340.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  341.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  342.     end
  343.     # 为了方便、将 "\\\\" 变换为 "\000"
  344.     text.gsub!(/\\\\/) { "\000" }
  345.     # "\\C" 变为 "\001"
  346.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  347.     # "\I" 变为 "\002"
  348.     text.gsub!(/\\[Ii]/) { "\002" }
  349.     # "\P" 变为 "\003"
  350.     text.gsub!(/\\[Pp]/) { "\003" }
  351.     # c 获取 1 个字 (如果不能取得文字就循环)
  352.     while ((c = text.slice!(/./m)) != nil)
  353.       # \\ 的情况下
  354.       if c == "\000"
  355.         # 还原为本来的文字
  356.         c = "\\"
  357.       end
  358.       # \C[n] 的情况下
  359.       if c == "\001"
  360.         # 更改文字色
  361.         text.sub!(/\[([0-9]+)\]/, "")
  362.         color = $1.to_i
  363.         if color >= 0 and color <= 7
  364.           self.contents.font.color = text_color(color)
  365.         elsif color == 8
  366.           self.contents.font.color = disabled_color
  367.         elsif color == 9
  368.           self.contents.font.color = system_color
  369.         end
  370.         # 下面的文字
  371.         next
  372.       end
  373.       # 图标的情况下
  374.       if c == "\002"
  375.         icon_name = ''
  376.         while ((cha = text.slice!(/./m)) != ']')
  377.           next if cha == '['
  378.           icon_name += cha
  379.         end
  380.         icon = RPG::Cache.icon(icon_name)
  381.         if x + icon.width > self.contents.width
  382.           x = 0
  383.           y += [32, min_y].max
  384.           min_y = 0
  385.         end
  386.         self.contents.blt(x + 4, y + 4, icon, Rect.new(0, 0, 24, 24))
  387.         x += 28
  388.         next
  389.       end
  390.       # 图片的情况下
  391.       if c == "\003"
  392.         pic_name = ''
  393.         while ((cha = text.slice!(/./m)) != ']')
  394.           next if cha == '['
  395.           pic_name += cha
  396.         end
  397.         pic = RPG::Cache.picture(pic_name)
  398.         if x + pic.width > self.contents.width
  399.           x = 0
  400.           y += [32, min_y].max
  401.           min_y = 0
  402.         end
  403.         self.contents.blt(x + 4, y, pic, Rect.new(0, 0, pic.width, pic.height))
  404.         x += pic.width
  405.         next
  406.       end
  407.       # 描绘文字
  408.       self.contents.draw_text(4 + x, y, 40, 32, c)
  409.       # x 为要描绘文字的加法运算
  410.       x += self.contents.text_size(c).width
  411.     end
  412.   end
  413.   #--------------------------------------------------------------------------
  414.   # ● 描绘空行
  415.   #--------------------------------------------------------------------------
  416.   def draw_blank
  417.     self.contents.font.color = disabled_color
  418.     rect = Rect.new(4, 0, self.contents.width - 8, 32)
  419.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  420.     self.contents.draw_text(rect, '当前没有任何任务')
  421.   end
  422.   #--------------------------------------------------------------------------
  423.   # ● 获取任务
  424.   #--------------------------------------------------------------------------
  425.   def task
  426.     return @tasks[self.index]
  427.   end
  428. end
  429.   
  430. #==============================================================================
  431. # ■ Window_Task
  432. #------------------------------------------------------------------------------
  433. #  任务内容显示窗口。
  434. #==============================================================================

  435. class Window_Task < Window_Base
  436.   #--------------------------------------------------------------------------
  437.   # ● 初始化对像
  438.   #--------------------------------------------------------------------------
  439.   def initialize(task_id)
  440.     super(240, 0, 400, 480)
  441.     refresh(task_id)
  442.   end
  443.   #--------------------------------------------------------------------------
  444.   # ● 刷新内容
  445.   #--------------------------------------------------------------------------
  446.   def refresh(task_id)
  447.     self.oy = 0
  448.     self.visible = true
  449.     return if task_id.nil?
  450.     task = $game_party.tasks_info[task_id]
  451.     if !task.nil?
  452.       self.contents = Bitmap.new(self.width - 32, task.height)
  453.     else
  454.       self.contents = Bitmap.new(self.width - 32, self.height - 32)
  455.       return
  456.     end
  457.     self.contents.font.color = normal_color
  458.     # 描绘任务内容
  459.     draw_task_info(task)
  460.   end
  461.   #--------------------------------------------------------------------------
  462.   # ● 描绘任务内容
  463.   #--------------------------------------------------------------------------
  464.   def draw_task_info(task)
  465.     # 记录文字x坐标
  466.     x = 0
  467.     # 记录文字y坐标
  468.     y = 0
  469.     # 记录换行时y坐标最小加值
  470.     min_y = 0
  471.     self.contents.font.color = normal_color
  472.     # 描绘任务简介
  473.     text = task.briefing.clone
  474.     # 限制文字处理
  475.     begin
  476.       last_text = text.clone
  477.       text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
  478.     end until text == last_text
  479.     text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
  480.       $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  481.     end
  482.     # 为了方便、将 "\\\\" 变换为 "\000"
  483.     text.gsub!(/\\\\/) { "\000" }
  484.     # "\C" 变为 "\001"
  485.     text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  486.     # "\I" 变为 "\002"
  487.     text.gsub!(/\\[Ii]/) { "\002" }
  488.     # "\P" 变为 "\003"
  489.     text.gsub!(/\\[Pp]/) { "\003" }
  490.     # c 获取 1 个字 (如果不能取得文字就循环)
  491.     while ((c = text.slice!(/./m)) != nil)
  492.       # \\ 的情况下
  493.       if c == "\000"
  494.         # 还原为本来的文字
  495.         c = "\\"
  496.       end
  497.       # \C[n] 的情况下
  498.       if c == "\001"
  499.         # 更改文字色
  500.         text.sub!(/\[([0-9]+)\]/, "")
  501.         color = $1.to_i
  502.         if color >= 0 and color <= 7
  503.           self.contents.font.color = text_color(color)
  504.         elsif color == 8
  505.           self.contents.font.color = disabled_color
  506.         elsif color == 9
  507.           self.contents.font.color = system_color
  508.         end
  509.         # 下面的文字
  510.         next
  511.       end
  512.       # 图标的情况下
  513.       if c == "\002"
  514.         icon_name = ''
  515.         while ((cha = text.slice!(/./m)) != ']')
  516.           next if cha == '['
  517.           icon_name += cha
  518.         end
  519.         icon = RPG::Cache.icon(icon_name)
  520.         if x + icon.width > self.contents.width
  521.           x = 0
  522.           y += [32, min_y].max
  523.           min_y = 0
  524.         end
  525.         self.contents.blt(x + 4, y + 4, icon, Rect.new(0, 0, 24, 24))
  526.         x += 28
  527.         next
  528.       end
  529.       # 图片的情况下
  530.       if c == "\003"
  531.         pic_name = ''
  532.         while ((cha = text.slice!(/./m)) != ']')
  533.           next if cha == '['
  534.           pic_name += cha
  535.         end
  536.         pic = RPG::Cache.picture(pic_name)
  537.         if x + pic.width > self.contents.width
  538.           x = 0
  539.           y += [32, min_y].max
  540.           min_y = 0
  541.         end
  542.         self.contents.blt(x + 4, y, pic, Rect.new(0, 0, pic.width, pic.height))
  543.         x += pic.width
  544.         min_y = [pic.height, 32].max
  545.         next
  546.       end
  547.       # 另起一行文字的情况下
  548.       if c == "\n"
  549.         y += [32, min_y].max
  550.         min_y = 0
  551.         x = 0
  552.         # 下面的文字
  553.         next
  554.       end
  555.       # 自动换行处理
  556.       if x + self.contents.text_size(c).width > self.contents.width
  557.         y += [32, min_y].max
  558.         min_y = 0
  559.         x = 0
  560.       end
  561.       # 描绘文字
  562.       self.contents.draw_text(4 + x, y, 40, 32, c)
  563.       # x 为要描绘文字的加法运算
  564.       x += self.contents.text_size(c).width
  565.     end
  566.   end
  567. end

  568. #==============================================================================
  569. # ■ Scene_Task
  570. #------------------------------------------------------------------------------
  571. #  处理任务画面的类。
  572. #==============================================================================

  573. class Scene_Task
  574.   #--------------------------------------------------------------------------
  575.   # ● 主处理
  576.   #--------------------------------------------------------------------------
  577.   def main
  578.     # 刷新任务资料
  579.     $game_party.get_tasks_info
  580.     # 生成任务名称窗口
  581.     @task_names_window = Window_Task_Name.new($game_party.current_tasks)
  582.     @task_names_window.active = true
  583.     if $game_party.current_tasks != []
  584.       @task_names_window.index = $game_party.current_tasks.index($game_party.latest_task)
  585.     end
  586.     # 生成任务内容窗口
  587.     @task_info_window = Window_Task.new($game_party.latest_task)
  588.     @task_info_window.active = true
  589.     # 执行过渡
  590.     Graphics.transition
  591.     # 主循环
  592.     loop do
  593.       # 刷新游戏画面
  594.       Graphics.update
  595.       # 刷新输入信息
  596.       Input.update
  597.       # 刷新画面
  598.       update
  599.       # 如果画面被切换的话就中断循环
  600.       if $scene != self
  601.         break
  602.       end
  603.     end
  604.     # 准备过渡
  605.     Graphics.freeze
  606.     # 释放窗口
  607.     @task_names_window.dispose
  608.     @task_info_window.dispose
  609.   end
  610.   #--------------------------------------------------------------------------
  611.   # ● 刷新画面
  612.   #--------------------------------------------------------------------------
  613.   def update
  614.     # 刷新窗口
  615.     @task_names_window.update
  616.     @task_info_window.update
  617.     update_task_names_window
  618.   end
  619.   #--------------------------------------------------------------------------
  620.   # ● 刷新任务名称窗口
  621.   #--------------------------------------------------------------------------
  622.   def update_task_names_window
  623.     # 按下 B 键的情况下
  624.     if Input.trigger?(Input::B)
  625.       # 演奏取消 SE
  626.       $game_system.se_play($data_system.cancel_se)
  627.       # 这里设置返回的场景,返回地图是Scene_Map.new,菜单是Scene_Menu.new(任务界面index)
  628.       $scene = Scene_Menu.new(4)
  629.       return
  630.     end
  631.     # 按下 C 键的情况下
  632.     if Input.trigger?(Input::C)
  633.       # 无任务可显示的话
  634.       if @task_names_window.task == nil
  635.         # 演奏冻结 SE
  636.         $game_system.se_play($data_system.buzzer_se)
  637.         return
  638.       end
  639.       # 如果光标没有移动的话,翻页
  640.       if $game_party.latest_task == @task_names_window.task.id
  641.         if @task_info_window.oy + @task_info_window.height - 32 > @task_info_window.contents.height
  642.           @task_info_window.oy = 0
  643.         else
  644.           @task_info_window.oy += 480-32
  645.         end
  646.         if @task_info_window.contents.height > @task_info_window.height - 32
  647.           # 演奏翻页 SE
  648.           Audio.se_play(CHANGE_PAGE_SE)
  649.         end
  650.       else
  651.         @task_info_window.refresh(@task_names_window.task.id)
  652.         $game_party.latest_task = @task_names_window.task.id
  653.         # 演奏确定 SE
  654.         $game_system.se_play($data_system.decision_se)
  655.       end
  656.     end
  657.   end
  658. end
复制代码

Lv2.观梦者

无节操

梦石
0
星屑
607
在线时间
795 小时
注册时间
2009-2-6
帖子
3939

开拓者贵宾

2
发表于 2014-5-23 13:59:10 | 只看该作者
382行开始,改这段不行吗?
  1.         # 更改文字色
  2.         text.sub!(/\[([0-9]+)\]/, "")
  3.         color = $1.to_i
  4.         if color >= 0 and color <= 7
  5.           self.contents.font.color = text_color(color)
  6.         elsif color == 8
  7.           self.contents.font.color = disabled_color
  8.         elsif color == 9
  9.           self.contents.font.color = system_color
  10.         end
复制代码

点评

搞定了 谢了0 0 结贴……  发表于 2014-5-23 14:20
moy
233,那现在搞定了吧~?顺便,这么长的脚本,偶尔看漏也是常理  发表于 2014-5-23 14:17
脚本方面我基本不懂- - 之前看到/\[([0-9]+)\]/ 以为这里只是判断更改后颜色的 就没在意orz  发表于 2014-5-23 14:06

评分

参与人数 1星屑 +150 收起 理由
myownroc + 150 认可答案

查看全部评分

Brandnew day, Brandnew Life
                              实在  中
暂为素材区版主,版其  琢磨
应援一下~
RPG制作大师授权素材推广计划
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-22 05:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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