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

Project1

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

[已经解决] 帮忙改个脚本

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1346
在线时间
806 小时
注册时间
2013-8-3
帖子
455
跳转到指定楼层
1
发表于 2016-3-24 11:06:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
帮忙把显示经验值改成显示幸运值,谢谢{:2_282:}
RUBY 代码复制
  1. #==============================================================================
  2. # F06 - 队伍状态窗口显示改造 - By芙蕾娅
  3. #------------------------------------------------------------------------------
  4. #  ★ - 新增  ☆ - 修改  ■ - 删除 ● - 无变更
  5. #==============================================================================
  6. module Freya
  7.   ExpGaugeColor1 = Color.new(192,128,255)
  8.   ExpGaugeColor2 = Color.new(204,192,255)
  9. end
  10. #==============================================================================
  11. # ■ Window_Base
  12. #------------------------------------------------------------------------------
  13. #  游戏中所有窗口的父类
  14. #==============================================================================
  15. class Window_Base < Window
  16.   #--------------------------------------------------------------------------
  17.   # ● 绘制等级
  18.   #--------------------------------------------------------------------------
  19.   def draw_actor_level(actor, x, y)
  20.     a = actor.next_level_exp - actor.current_level_exp
  21.     b = actor.next_level_exp - actor.exp
  22.     rate = 1 - (b.to_f / a)
  23.     draw_gauge(x, y, 96, rate,Freya::ExpGaugeColor1, Freya::ExpGaugeColor2)
  24.     change_color(system_color)
  25.     draw_text(x, y, 32, line_height, Vocab::level_a)
  26.     change_color(normal_color)
  27.     draw_text(x + 32, y, 24, line_height, actor.level, 2)
  28.   end
  29.   #--------------------------------------------------------------------------
  30.   # ● 绘制简单的状态
  31.   #--------------------------------------------------------------------------
  32.   def draw_actor_simple_status(actor, x, y)
  33.     draw_actor_name(actor, x, y)
  34.     draw_actor_level(actor, x, y + line_height * 1)
  35.     draw_actor_icons(actor, x - 107, y + line_height * 2 + 12)
  36.     draw_actor_class(actor, x + 120, y)
  37.     draw_actor_hp(actor, x + 120, y + line_height * 1)
  38.     draw_actor_mp(actor, x + 120, y + line_height * 2)
  39.   end
  40. end

【同人游戏】勇者斗恶龙TG
欢迎加入游戏测试群333599798
如有需私聊请加QQ:516425000

Lv3.寻梦者 (版主)

梦石
0
星屑
2315
在线时间
5539 小时
注册时间
2011-1-10
帖子
6619

青铜编剧史诗剧作家剧作品鉴家

2
发表于 2016-3-24 23:51:39 | 只看该作者
本帖最后由 H·H·Y 于 2016-3-24 23:53 编辑

胡乱改的……

RUBY 代码复制
  1. #==============================================================================
  2. # F06 - 队伍状态窗口显示改造 - By芙蕾娅
  3. #------------------------------------------------------------------------------
  4. #  ★ - 新增  ☆ - 修改  ■ - 删除 ● - 无变更
  5. #==============================================================================
  6. #==============================================================================
  7. # ■ Window_Base
  8. #------------------------------------------------------------------------------
  9. #  游戏中所有窗口的父类
  10. #==============================================================================
  11. class Window_Base < Window
  12.   #--------------------------------------------------------------------------
  13.   # ● 绘制等级
  14.   #--------------------------------------------------------------------------
  15.   def draw_actor_level(actor, x, y)
  16.     change_color(system_color)
  17.     draw_text(x, y, 32, line_height, "幸运")
  18.     change_color(normal_color)
  19.     draw_text(x + 32, y, 24, line_height, actor.luk, 2)
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● 绘制简单的状态
  23.   #--------------------------------------------------------------------------
  24.   def draw_actor_simple_status(actor, x, y)
  25.     draw_actor_name(actor, x, y)
  26.     draw_actor_level(actor, x, y + line_height * 1)
  27.     draw_actor_icons(actor, x - 107, y + line_height * 2 + 12)
  28.     draw_actor_class(actor, x + 120, y)
  29.     draw_actor_hp(actor, x + 120, y + line_height * 1)
  30.     draw_actor_mp(actor, x + 120, y + line_height * 2)
  31.   end
  32. end

点评

……我就是想象不出幸运值怎么显示成槽条才去掉的…………  发表于 2016-3-25 21:58
显示条槽图自己研究解决了!谢谢  发表于 2016-3-25 11:15
只能显示数字!!能显示槽条吗?  发表于 2016-3-25 09:21

评分

参与人数 1梦石 +1 收起 理由
丿梁丶小柒 + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-28 08:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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