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

Project1

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

敌人HP、SP槽 随血量改变颜色的问题

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
13 小时
注册时间
2007-7-16
帖子
32
跳转到指定楼层
1
发表于 2008-1-5 15:02:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
“敌人HP、SP槽 随血量改变颜色”这个脚本可不可以把敌人的HP、SP的具体数值去掉,不让它显示,而是现实成百分比的形式?
版务信息:本贴由楼主自主结贴~
沉默是金,我很沉默,但是很穷……

Lv1.梦旅人

梦石
0
星屑
50
在线时间
13 小时
注册时间
2007-7-16
帖子
32
2
 楼主| 发表于 2008-1-5 15:02:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
“敌人HP、SP槽 随血量改变颜色”这个脚本可不可以把敌人的HP、SP的具体数值去掉,不让它显示,而是现实成百分比的形式?
版务信息:本贴由楼主自主结贴~
沉默是金,我很沉默,但是很穷……

Lv1.梦旅人

梦石
0
星屑
111
在线时间
74 小时
注册时间
2006-5-29
帖子
453
3
发表于 2008-1-5 16:47:23 | 只看该作者
可以把脚本贴上来吗?这样方便一点,你这么说别人不一定知道{/tp}
【我的百度空间】
 不定时更新绘画或像素图~~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
13 小时
注册时间
2007-7-16
帖子
32
4
 楼主| 发表于 2008-1-5 17:12:12 | 只看该作者
http://rpg.blue/web/htm/news432.htm
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. class Window_Help < Window_Base
  5.   def set_enemy(actor)
  6.     self.contents.clear
  7.     draw_actor_name(actor, 4, 0)
  8.     draw_actor_state(actor, 140, 0)
  9.     carol3_draw_hp_bar(actor, 284, 0)
  10.     carol3_draw_sp_bar(actor, 460, 0)
  11.     @text = nil
  12.     self.visible = true
  13.   end
  14.   def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
  15.     self.contents.font.color = system_color
  16.     w = width * actor.hp / [actor.maxhp,1].max
  17.     if actor.maxhp != 0
  18.       rate = actor.hp.to_f / actor.maxhp
  19.     else
  20.       rate = 0
  21.     end
  22.     color1 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 150)
  23.     self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
  24.     self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
  25.     self.contents.fill_rect(x+1, y+17, w,6,color1)
  26.     self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
  27.     self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
  28.     self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
  29.     self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
  30.     self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
  31.     self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
  32.     self.contents.draw_text(x-53,y,128,32,$data_system.words.hp,1)
  33.     if actor.hp>actor.maxhp/3
  34.       self.contents.font.color = Color.new(255, 255, 255, 250)
  35.     end
  36.     if actor.hp>=actor.maxhp/6 and actor.maxhp/3>actor.hp
  37.       self.contents.font.color = Color.new(200, 200, 0, 255)
  38.     end
  39.     if actor.maxhp/6>actor.hp
  40.       self.contents.font.color = Color.new(200, 0, 0, 255)
  41.     end
  42.     self.contents.draw_text(x+47,y,128,32,actor.hp.to_s,1)
  43.   end
  44.   def carol3_draw_sp_bar(actor, x, y, width = 128)
  45.     self.contents.font.color = system_color
  46.     if actor.maxsp != 0
  47.       rate = actor.sp.to_f / actor.maxsp
  48.     else
  49.       rate = 0
  50.     end
  51.     color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
  52.     w = width * actor.sp / [actor.maxsp,1].max
  53.     self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
  54.     self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
  55.     self.contents.fill_rect(x+1, y+17, w,6,color2)
  56.     self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
  57.     self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
  58.     self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
  59.     self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
  60.     self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
  61.     self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
  62.     self.contents.draw_text(x-53,y,128,32,$data_system.words.sp,1)
  63.     if actor.hp>actor.maxsp/3
  64.       self.contents.font.color = Color.new(255, 255, 255, 250)
  65.     end
  66.     if actor.hp>=actor.maxsp/6 and actor.maxsp/3>actor.sp
  67.       self.contents.font.color = Color.new(200, 200, 0, 255)
  68.     end
  69.     if actor.maxsp/6>actor.sp
  70.       self.contents.font.color = Color.new(200, 0, 0, 255)
  71.     end
  72.     self.contents.draw_text(x+47,y,128,32,actor.sp.to_s,1)
  73.   end
  74. end
  75. #==============================================================================
  76. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  77. #==============================================================================
复制代码

帮帮忙~{/qiang}
沉默是金,我很沉默,但是很穷……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
111
在线时间
74 小时
注册时间
2006-5-29
帖子
453
5
发表于 2008-1-5 17:19:47 | 只看该作者
改脚本麻烦,换脚本不行么?

显示敌人血槽百分比:
第一种:http://rpg.blue/web/htm/news146.htm
第二种:http://rpg.blue/web/htm/news220.htm(宽血槽版)

{/hx}刚才没多想,早知道先找出来给你好了。
【我的百度空间】
 不定时更新绘画或像素图~~
回复 支持 反对

使用道具 举报

Lv1.梦旅人

剑·法

梦石
0
星屑
55
在线时间
12 小时
注册时间
2006-8-31
帖子
1015
6
发表于 2008-1-5 17:26:28 | 只看该作者

要去掉数值,注释掉或是删掉以下语句:
self.contents.draw_text(x-53,y,128,32,$data_system.words.hp,1)
self.contents.draw_text(x+47,y,128,32,actor.hp.to_s,1)
self.contents.draw_text(x-53,y,128,32,$data_system.words.sp,1)
self.contents.draw_text(x+47,y,128,32,actor.sp.to_s,1)

或是如LS所言,换脚本也行。

系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
复活?复活!XD
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
13 小时
注册时间
2007-7-16
帖子
32
7
 楼主| 发表于 2008-1-5 18:07:01 | 只看该作者
其实换脚本也可以,不过我用了这个脚本
http://rpg.blue/web/htm/news140.htm
为了美观,所以就用了提问时的脚本
不管怎样,谢谢了~!
沉默是金,我很沉默,但是很穷……
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2026-6-19 02:37

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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