赞 | 14 |
VIP | 0 |
好人卡 | 0 |
积分 | 6 |
经验 | 44782 |
最后登录 | 2022-9-28 |
在线时间 | 797 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 596
- 在线时间
- 797 小时
- 注册时间
- 2014-7-1
- 帖子
- 578
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 jiushiainilip19 于 2016-5-9 00:16 编辑
自己摸索了一下午 搜索了一些资料 结果改成这样 。。。不知道还有方法更简便一点吗?
还是想问下如何直接将变量里面的文字说明直接输出来!
#开关显示窗口 $不显示金钱窗口=1073 #需要显示的变量号 #XX是变量对应游戏的文字数值 $需求=[27,57,32,60,59,58,3841,99,3883,1107] class Game_Variables def []=(variable_id, value) if variable_id <= 5000 # 变量获得提示 $需求.each do |x| if variable_id == x && $game_switches[$不显示金钱窗口]==false unless $game_temp.in_battle old_value = self[variable_id] value_changed = value - old_value carol3_66RPG = Window_Base.new((640-160)/2,128,180,100) carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32) if value_changed >= 0 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==27 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==57 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==32 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==60 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==59 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==58 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==3841 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==99 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==3883 carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==1107 #——声效,可以自己改 Audio.se_play("Audio/SE/"+"006-System06",80,100) else carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==27 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==57 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==32 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==60 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==59 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==58 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==3841 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==3841 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==99 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==3883 carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==1107 #——声效,可以自己改 Audio.se_play("Audio/SE/"+"005-System05",80,100) end carol3_66RPG.opacity = 160 for i in 0..30 Graphics.update end for i in 0..10 carol3_66RPG.opacity -= 30 carol3_66RPG.contents_opacity -= 30 Graphics.update end carol3_66RPG.dispose end end end @data[variable_id] = value end end end
#开关显示窗口
$不显示金钱窗口=1073
#需要显示的变量号
#XX是变量对应游戏的文字数值
$需求=[27,57,32,60,59,58,3841,99,3883,1107]
class Game_Variables
def []=(variable_id, value)
if variable_id <= 5000
# 变量获得提示
$需求.each do |x|
if variable_id == x && $game_switches[$不显示金钱窗口]==false
unless $game_temp.in_battle
old_value = self[variable_id]
value_changed = value - old_value
carol3_66RPG = Window_Base.new((640-160)/2,128,180,100)
carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
if value_changed >= 0
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==27
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==57
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==32
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==60
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==59
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==58
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==3841
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==99
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==3883
carol3_66RPG.contents.draw_text(0,0,240,32,"XX+:"+value_changed.abs.to_s) if variable_id ==1107
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"006-System06",80,100)
else
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==27
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==57
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==32
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==60
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==59
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==58
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==3841
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==3841
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==99
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==3883
carol3_66RPG.contents.draw_text(0,0,240,32,"XX-:"+value_changed.abs.to_s) if variable_id ==1107
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"005-System05",80,100)
end
carol3_66RPG.opacity = 160
for i in 0..30
Graphics.update
end
for i in 0..10
carol3_66RPG.opacity -= 30
carol3_66RPG.contents_opacity -= 30
Graphics.update
end
carol3_66RPG.dispose
end
end
end
@data[variable_id] = value
end
end
end
|
评分
-
查看全部评分
|