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

Project1

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

[已经解决] 求战斗时显示血条,还有战斗的菜单的脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
14 小时
注册时间
2015-8-8
帖子
28
跳转到指定楼层
1
发表于 2015-8-8 16:56:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
如题,战斗时看阿拉伯数字不好受,还有那种叫你选择用攻击还是特技还是逃跑的菜单的脚本,只希望改善一下!

评分

参与人数 1星屑 +35 收起 理由
RyanBern + 35 手动认可奖励

查看全部评分

Lv4.逐梦者

梦石
0
星屑
6115
在线时间
1443 小时
注册时间
2015-7-25
帖子
614

极短25参与开拓者

2
发表于 2015-8-8 19:40:55 | 只看该作者
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
class Window_Help < Window_Base
def set_enemy(actor)
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
carol3_draw_hp_bar(actor, 284, 0)
carol3_draw_sp_bar(actor, 460, 0)
@text = nil
self.visible = true
end
def carol3_draw_hp_bar(actor, x, y, width = 128) #宽度可调
self.contents.font.color = system_color
w = width * actor.hp / [actor.maxhp,1].max
if actor.maxhp != 0
rate = actor.hp.to_f / actor.maxhp
else
rate = 0
end
color1 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 150)
self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x+1, y+17, w,6,color1)
self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
self.contents.draw_text(x-53,y,128,32,$data_system.words.hp,1)
if actor.hp>actor.maxhp/3
self.contents.font.color = Color.new(255, 255, 255, 250)
end
if actor.hp>=actor.maxhp/6 and actor.maxhp/3>actor.hp
self.contents.font.color = Color.new(200, 200, 0, 255)
end
if actor.maxhp/6>actor.hp
self.contents.font.color = Color.new(200, 0, 0, 255)
end
self.contents.draw_text(x+47,y,128,32,actor.hp.to_s,1)
end
def carol3_draw_sp_bar(actor, x, y, width = 128)
self.contents.font.color = system_color
if actor.maxsp != 0
rate = actor.sp.to_f / actor.maxsp
else
rate = 0
end
color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
w = width * actor.sp / [actor.maxsp,1].max
self.contents.fill_rect(x+1, y+15, width+2,1, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x+1, y+16, width+2,1, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x+1, y+17, w,6,color2)
self.contents.fill_rect(x+1, y+23, width+2,1, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x+1, y+24, width+2,1, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y+16, 1,8, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x-1, y+15, 1,10, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x+129, y+16, 1,8, Color.new(255, 255, 192, 192))
self.contents.fill_rect(x+130, y+15, 1,10, Color.new(0, 0, 0, 255))
self.contents.draw_text(x-53,y,128,32,$data_system.words.sp,1)
if actor.hp>actor.maxsp/3
self.contents.font.color = Color.new(255, 255, 255, 250)
end
if actor.hp>=actor.maxsp/6 and actor.maxsp/3>actor.sp
self.contents.font.color = Color.new(200, 200, 0, 255)
end
if actor.maxsp/6>actor.sp
self.contents.font.color = Color.new(200, 0, 0, 255)
end
self.contents.draw_text(x+47,y,128,32,actor.sp.to_s,1)
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================

看看这个行不行

评分

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

查看全部评分

目前的坑
??? #像素风OC游戏 准备中 短篇-约5小时
花城梦之心 #像素风OC游戏 系统开发+素材绘制中
【不可思议的迷宫】幽灵契约外传:歌莉娅 v0.32 (但文件尚未上传,请稍等...
同时更新中~
这是属于笨肉包一个人的旅行~(再见了...蚊子湯,七重酱,笨肉包永远想你们!TwT
旅途的最终目标~ ???(保密~
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

梦石
0
星屑
9532
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

3
发表于 2015-8-8 19:43:25 | 只看该作者
楼主直接用楼上的脚本可以,如果想要学习的话,可以看看这个视频:
https://rpg.blue/thread-381015-1-1.html
里面的RB脚本教学视频第二辑:战斗美化

评分

参与人数 1星屑 +6 收起 理由
龙和许也 + 6 认可答案 :P

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
9 小时
注册时间
2014-9-4
帖子
11
4
发表于 2015-8-18 20:32:54 | 只看该作者
答谢2楼!!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-4-22 02:56

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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