赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 10002 |
最后登录 | 2024-7-12 |
在线时间 | 120 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 148
- 在线时间
- 120 小时
- 注册时间
- 2011-9-4
- 帖子
- 91
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#==============================================================================
# 新·得失物品 By Sunny Boy
#==============================================================================
class Interpreter
def sunnyboy_getitem_ani_1
@sunnyboy_getitem_block = Sprite.new
@sunnyboy_getitem_block.bitmap = RPG::Cache.picture($SUNNYBOY_GETITEM_小块图片)
@sunnyboy_getitem_block.x = 640
@sunnyboy_getitem_block.y = 320
@sunnyboy_getitem_block.z = 9998
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
if @sunnyboy_getitem_block.x > 619 then
for i in 1...5
@sunnyboy_getitem_block.x -= 1 if @sunnyboy_getitem_block.x > 619
end
else
break
end
end
@sunnyboy_getitem_back = Sprite.new
@sunnyboy_getitem_back.bitmap = RPG::Cache.picture($SUNNYBOY_GETITEM_背景图片)
@sunnyboy_getitem_back.x = 619
@sunnyboy_getitem_back.y = 320
@sunnyboy_getitem_back.z = 9997
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
if @sunnyboy_getitem_back.x > 370 then
for i in 1...10
@sunnyboy_getitem_back.x -= 1 if @sunnyboy_getitem_back.x > 370
end
else
break
end
end
@sunnyboy_getitem_text = Sprite.new
@sunnyboy_getitem_text.opacity = 0
@sunnyboy_getitem_text.x = @sunnyboy_getitem_back.x
@sunnyboy_getitem_text.y = @sunnyboy_getitem_back.y
@sunnyboy_getitem_text.z = 9999
@sunnyboy_getitem_text.bitmap = Bitmap.new(249, 49)
@sunnyboy_getitem_text.bitmap.font.size = 16
return @sunnyboy_getitem_text.bitmap
end
def sunnyboy_getitem_ani_2
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
if @sunnyboy_getitem_text.opacity != 255 then
@sunnyboy_getitem_text.opacity += 10
else
break
end
end
frame_count = 0
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
frame_count += 1
break if frame_count == 40
end
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
if @sunnyboy_getitem_text.opacity != 0 then
@sunnyboy_getitem_text.opacity -= 10
else
break
end
end
@sunnyboy_getitem_text.dispose
@sunnyboy_getitem_text = nil
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
if @sunnyboy_getitem_back.x != 619 then
for i in 1...10
@sunnyboy_getitem_back.x += 1 if @sunnyboy_getitem_back.x != 619
end
else
break
end
end
@sunnyboy_getitem_back.dispose
@sunnyboy_getitem_back = nil
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
if @sunnyboy_getitem_block.x != 640 then
for i in 1...5
@sunnyboy_getitem_block.x += 1 if @sunnyboy_getitem_block.x != 640
end
else
break
end
end
@sunnyboy_getitem_block.dispose
@sunnyboy_getitem_block = nil
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
以上是核心动画脚本
不知道在哪里可以修改下速度呢?
还是说要在这里改。。
#==============================================================================
# 新·得失物品 By Sunny Boy
#==============================================================================
class Interpreter
def command_126
# 获取要操作的值
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
# 增减物品
$game_party.gain_item(@parameters[0], value)
if !sunnyboy_getitem_switch?(1) then
text = sunnyboy_getitem_ani_1
item = $data_items[@parameters[0]]
if value >= 1 then
text.draw_text(6, 6, 237, 16, "得到物品:")
text.draw_text(34, 22, 209, 24, "× " + value.to_s, 2)
sunnyboy_getitem_playsound(1)
else
text.draw_text(6, 6, 237, 16, "失去物品:")
text.draw_text(34, 22, 209, 24, "× " + (0 - value).to_s, 2)
sunnyboy_getitem_playsound(2)
end
bitmap = RPG::Cache.icon(item.icon_name)
text.blt(6, 22, bitmap, Rect.new(0, 0, 24, 24))
text.draw_text(34, 22, 209, 24, item.name)
sunnyboy_getitem_ani_2
end
# 继续
return true
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
这个是得失物品脚本 |
|