Project1
标题:
求得到物品自动提示的脚本。
[打印本页]
作者:
RPG_小菜
时间:
2010-7-30 14:01
标题:
求得到物品自动提示的脚本。
本帖最后由 RPG_小菜 于 2010-7-30 18:52 编辑
置顶帖找不到- -
特来求助。就是捡到个物品,自动提示捡到XX.
谢谢了
作者:
小幽的马甲
时间:
2010-7-30 14:03
6R有个功能叫搜索= =
作者:
wangswz
时间:
2010-7-30 14:05
被抢先说了
作者:
a849797000
时间:
2010-7-30 14:20
#==============================================================================
# 本脚本来自
www.66RPG.com
,使用和转载请保留此信息
#==============================================================================
# 注意!!!在对话后得到物品,请在对话后先用事件等待3帧,否则对话框来不及消失。
# 开关定义:
$不显示金钱窗口 = 41
$不显示物品窗口 = 42
$不显示武器窗口 = 43
$不显示防具窗口 = 44
# 以上开关,当打开的时候,获得物品将不会提示,比如默认打开41号开关,获得金钱不再提示
# ————————————————————————————————————
class Interpreter
#--------------------------------------------------------------------------
# ● 增减金钱
#--------------------------------------------------------------------------
def command_125
value = operate_value(@parameters[0], @parameters[1], @parameters[2])
$game_party.gain_gold(value)
if $game_switches[$不显示金钱窗口]==false
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 >= 0
carol3_66RPG.contents.draw_text(0,0,240,32,"获得金钱:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"006-System06",80,100)
else
carol3_66RPG.contents.draw_text(0,0,240,32,"失去金钱:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"005-System05",80,100)
end
carol3_66RPG.contents.draw_text(0,32,240,32,value.abs.to_s)
carol3_66RPG.contents.draw_text(0,32,140,32, $data_system.words.gold,2)
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
return true
end
#--------------------------------------------------------------------------
# ● 增减物品
#--------------------------------------------------------------------------
def command_126
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_item(@parameters[0], value)
if $game_switches[$不显示物品窗口]==false
carol3_66RPG_item = $data_items[@parameters[0]]
carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
if value >= 0
carol3_66RPG.contents.draw_text(0,0,240,32,"获得物品:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"006-System06",80,100)
else
carol3_66RPG.contents.draw_text(0,0,240,32,"失去物品:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"005-System05",80,100)
end
carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
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
return true
end
#--------------------------------------------------------------------------
# ● 增减武器
#--------------------------------------------------------------------------
def command_127
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_weapon(@parameters[0], value)
if $game_switches[$不显示武器窗口]==false
carol3_66RPG_item = $data_weapons[@parameters[0]]
carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
if value >= 0
carol3_66RPG.contents.draw_text(0,0,240,32,"获得武器:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"006-System06",80,100)
else
carol3_66RPG.contents.draw_text(0,0,240,32,"失去武器:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"005-System05",80,100)
end
carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
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
return true
end
#--------------------------------------------------------------------------
# ● 增减防具
#--------------------------------------------------------------------------
def command_128
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_party.gain_armor(@parameters[0], value)
if $game_switches[$不显示防具窗口]==false
carol3_66RPG_item = $data_armors[@parameters[0]]
carol3_66RPG = Window_Base.new((640-300)/2,128,300,100)
carol3_66RPG.contents = Bitmap.new(carol3_66RPG.width - 32, carol3_66RPG.height - 32)
if value >= 0
carol3_66RPG.contents.draw_text(0,0,240,32,"获得防具:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"006-System06",80,100)
else
carol3_66RPG.contents.draw_text(0,0,240,32,"失去防具:")
#——声效,可以自己改
Audio.se_play("Audio/SE/"+"005-System05",80,100)
end
carol3_66RPG_bitmap = RPG::Cache.icon(carol3_66RPG_item.icon_name)
carol3_66RPG.contents.blt(0, 32, carol3_66RPG_bitmap, Rect.new(0, 0, 24, 24), 255)
carol3_66RPG.contents.draw_text(0 + 28, 32, 212, 32, carol3_66RPG_item.name, 0)
carol3_66RPG.contents.draw_text(0, 32, 268, 32, "×"+value.abs.to_s, 2)
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
return true
end
end
#==============================================================================
# 本脚本来自
www.66RPG.com
,使用和转载请保留此信息
#==============================================================================
作者:
wsmyzc
时间:
2010-7-30 14:22
发脚本用code引起来啊,还有,LS忘记留QQ了
作者:
调律
时间:
2010-7-30 14:29
据在下所知VX的得失物品自动提示脚本不止一个,这个是站长66版的
#==============================================================================
# ■ Game_Interpreter
#------------------------------------------------------------------------------
# 执行事件命令的解释器。本类在 Game_System 类
# 与 Game_Event 类的内部使用。
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# ● 得失物品自动提示的刷新时间控制
#--------------------------------------------------------------------------
def call_6RgetItem(para1, para2 = nil, para3 = nil)
temp_window = Window_Gain_Item.new(para1, para2, para3)
Sound.play_shop
for i in 0..120
Graphics.update
Input.update
if Input.trigger?(Input::C) or Input.trigger?(Input::B)
Sound.play_cancel
break
end
end
for i in 0..15
temp_window.opacity -= 20
temp_window.contents_opacity -= 16
temp_window.update
Graphics.update
end
temp_window.dispose
temp_window = nil
end
#--------------------------------------------------------------------------
# ● 增减金钱
#--------------------------------------------------------------------------
def command_125
value = operate_value(@params[0], @params[1], @params[2])
$game_party.gain_gold(value)
call_6RgetItem("gold", value)
return true
end
#--------------------------------------------------------------------------
# ● 增减物品
#--------------------------------------------------------------------------
def command_126
value = operate_value(@params[1], @params[2], @params[3])
$game_party.gain_item($data_items[@params[0]], value)
$game_map.need_refresh = true
call_6RgetItem("item", $data_items[@params[0]], value)
return true
end
#--------------------------------------------------------------------------
# ● 增减武器
#--------------------------------------------------------------------------
def command_127
value = operate_value(@params[1], @params[2], @params[3])
$game_party.gain_item($data_weapons[@params[0]], value, @params[4])
call_6RgetItem("item", $data_weapons[@params[0]], value)
return true
end
#--------------------------------------------------------------------------
# ● 增减防具
#--------------------------------------------------------------------------
def command_128
value = operate_value(@params[1], @params[2], @params[3])
$game_party.gain_item($data_armors[@params[0]], value, @params[4])
call_6RgetItem("item", $data_armors[@params[0]], value)
return true
end
end
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
# 显示金钱的窗口。
#==============================================================================
class Window_Gain_Item < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
# x : 窗口的X坐标
# y : 窗口的Y坐标
#--------------------------------------------------------------------------
def initialize(para1, para2 = nil, para3 = nil)
super(0, 0, 160, WLH + 32)
self.z = 10000
case para1
when "item"
str = "获得"
if para3 < 0 then
str = "失去"
para3 = - para3
end
winwidth = contents.text_size(" 你获得了: × " + para3.to_s).width + 24 + contents.text_size(para2.name).width
self.width = winwidth + 64
self.height = 64
self.x = (Graphics.width - self.width) / 2
self.y = (Graphics.height - self.height) / 2
create_contents
self.contents.draw_text(0, 0, self.width, 32, " 你" + str + "了: ")
tx = contents.text_size(" 你" + str + "了:").width
draw_item_name(para2, tx , 0, true)
self.contents.draw_text(tx + 24, 0, self.width, 32, para2.name)
tx = contents.text_size(" 你" + str + "了: ").width + 24 + contents.text_size(para2.name).width
self.contents.draw_text(tx, 0, self.width, 32, " ×" + para3.to_s)
when "gold"
str = "获得"
if para2 < 0 then
str = "失去"
para2 = - para2
end
winwidth = contents.text_size(" 你获得了: " + Vocab.gold.to_s).width + contents.text_size(para2).width
self.width = winwidth + 64
self.height = 64
self.x = (Graphics.width - self.width) / 2
self.y = (Graphics.height - self.height) / 2
create_contents
self.contents.draw_text(0, 0, self.width, 32, " 你" + str + "了: #{para2} " + Vocab.gold.to_s)
end
end
#--------------------------------------------------------------------------
# ● 物品名的描画
# item : 物品(特技、武器、防具可)
# x : 描画目标 X 坐标
# y : 描画目标 Y 坐标
# enabled : 有效标记录。是false 的时候半透明绘画
#--------------------------------------------------------------------------
def draw_item_name(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
end
end
end
复制代码
作者:
Hanven
时间:
2010-7-30 14:34
提示:
作者被禁止或删除 内容自动屏蔽
作者:
RPG_小菜
时间:
2010-7-30 18:51
忘了- -
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1