赞 | 3 |
VIP | 0 |
好人卡 | 0 |
积分 | 33 |
经验 | 3139 |
最后登录 | 2024-1-23 |
在线时间 | 468 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3336
- 在线时间
- 468 小时
- 注册时间
- 2014-2-6
- 帖子
- 258
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
就是原本的系统只有一个技能栏,我想增加几个,按键我会自己想办法,但是不知道怎么改脚本,
希望大家帮帮忙,拜托。下面是脚本
#--------------------------------------------------------------------------
# ● Create Skill
#--------------------------------------------------------------------------
def create_skill
#LAYOUT ------------------------------------------------------------
@skill_layout_sprite = Sprite.new
@skill_layout_sprite.bitmap = Cache.system("XAS_Tool_Skill")
@skill_layout_sprite.z = 150
@skill_layout_sprite.x = SKILL_HUD[0] + LAYOUT[0]
@skill_layout_sprite.y = SKILL_HUD[1] + LAYOUT[1]
#ICON ------------------------------------------------------------
@old_skill = @actor.skill_id
@skill = $data_skills[@actor.skill_id]
if @skill != nil
icon_index = @skill.icon_index
@skill_mp_cost = @skill.mp_cost
else
icon_index = 0
@skill_mp_cost = 0
end
@skill_icon_sprite = Sprite.new
@skill_icon_sprite.bitmap = Bitmap.new(24,24)
bitmap_skill_rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
@skill_icon_sprite.bitmap.blt(0, 0, @icon_image, bitmap_skill_rect)
@skill_icon_sprite.z = 151
@skill_icon_sprite.x = SKILL_HUD[0] + ICON[0]
@skill_icon_sprite.y = SKILL_HUD[1] + ICON[1]
#NUMBER ------------------------------------------------------------
skill_number_bitmap = Bitmap.new(@number_image.width, @number_image.height / 3)
@skill_number_sprite = Sprite.new
@skill_number_sprite.bitmap = skill_number_bitmap
cost_split = @skill_mp_cost.to_s.split(//)
for r in 0..cost_split.size - 1
number_abs = cost_split[r].to_i
src_rect = Rect.new(@number_cw * number_abs, @number_ch, @number_cw, @number_ch)
skill_number_bitmap.blt(@number_sc * r, 0, @number_image, src_rect)
end
@skill_number_sprite.z = 152
xf = ((cost_split.size * @number_sc) / 2)
@skill_number_sprite.x = SKILL_HUD[0] + NUMBER[0] - xf
@skill_number_sprite.y = SKILL_HUD[1] + NUMBER[1]
end
拜托了!!!!!!! |
|