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

Project1

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

[已经解决] 求一个显血脚本貌似叫什么KW脚本以前电脑有的不知道怎么呢没呢

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
65
在线时间
10 小时
注册时间
2011-9-6
帖子
14
跳转到指定楼层
1
发表于 2011-11-21 14:33:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

Lv2.观梦者

梦石
0
星屑
602
在线时间
374 小时
注册时间
2011-10-11
帖子
311
2
发表于 2011-11-21 14:39:12 | 只看该作者
  1. class Window_Help < Window_Base
  2. def set_enemy(actor)
  3.     self.contents.clear
  4.     draw_actor_name(actor, 4, 0)
  5.     draw_actor_state(actor, 140, 0)
  6.     carol3_draw_hp_bar(actor, 284, 0)
  7.     carol3_draw_sp_bar(actor, 460, 0)
  8.     @text = nil
  9.     self.visible = true
  10. end
  11. def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
  12.     self.contents.font.color = system_color
  13.     w = width * actor.hp / [actor.maxhp,1].max
  14.     if actor.maxhp != 0
  15.       rate = actor.hp.to_f / actor.maxhp
  16.     else
  17.       rate = 0
  18.     end
  19.     color1 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 150)
  20.     self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
  21.     self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
  22.     self.contents.fill_rect(x+1, y+17, w,6,color1)
  23.     self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
  24.     self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
  25.     self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
  26.     self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
  27.     self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
  28.     self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
  29.     self.contents.draw_text(x-53,y,128,32,$data_system.words.hp,1)
  30.     if actor.hp>actor.maxhp/3
  31.       self.contents.font.color = Color.new(255, 255, 255, 250)
  32.     end
  33.     if actor.hp>=actor.maxhp/6 and actor.maxhp/3>actor.hp
  34.       self.contents.font.color = Color.new(200, 200, 0, 255)
  35.     end
  36.     if actor.maxhp/6>actor.hp
  37.       self.contents.font.color = Color.new(200, 0, 0, 255)
  38.     end
  39.     self.contents.draw_text(x+47,y,128,32,actor.hp.to_s,1)
  40. end
  41. def carol3_draw_sp_bar(actor, x, y, width = 128)
  42.     self.contents.font.color = system_color
  43.     if actor.maxsp != 0
  44.       rate = actor.sp.to_f / actor.maxsp
  45.     else
  46.       rate = 0
  47.     end
  48.     color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
  49.     w = width * actor.sp / [actor.maxsp,1].max
  50.     self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
  51.     self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
  52.     self.contents.fill_rect(x+1, y+17, w,6,color2)
  53.     self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
  54.     self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
  55.     self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
  56.     self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
  57.     self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
  58.     self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
  59.     self.contents.draw_text(x-53,y,128,32,$data_system.words.sp,1)
  60.     if actor.hp>actor.maxsp/3
  61.       self.contents.font.color = Color.new(255, 255, 255, 250)
  62.     end
  63.     if actor.hp>=actor.maxsp/6 and actor.maxsp/3>actor.sp
  64.       self.contents.font.color = Color.new(200, 200, 0, 255)
  65.     end
  66.     if actor.maxsp/6>actor.sp
  67.       self.contents.font.color = Color.new(200, 0, 0, 255)
  68.     end
  69.     self.contents.draw_text(x+47,y,128,32,actor.sp.to_s,1)
  70. end
  71. end
复制代码
你说的可是这段脚本?


月下黄昏于2011-11-21 17:01补充以下内容:
补充下:其实这段脚本你大可不必发帖提问。你只要在搜索栏上打关于血量的脚本就有大可不必如此动神
啊我多嘴啦!


LL0077330
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-24 04:12

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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