Project1
标题:
关于得到某物品不提示
[打印本页]
作者:
千夙
时间:
2014-7-29 15:06
标题:
关于得到某物品不提示
如题,得到物品怎么才能不提示??
搜了一大堆都是要提示的。。{:2_272:}
作者:
余烬之中
时间:
2014-7-29 15:16
本来就不会提示
作者:
千夙
时间:
2014-7-29 15:33
这样啊我去找找差了什么
作者:
千夙
时间:
2014-7-29 15:41
千夙 发表于 2014-7-29 15:33
这样啊我去找找差了什么
这就是得失代码,怎么弄?
#==============================================================================
# 本腳本來自www.66RPG.com,使用和轉載請保留此信息
#==============================================================================
# 注意!!!在對話後得到物品,請在對話後先用事件等待3幀,否則對話框來不及消失。
# 開關定義:
$noshowgold = 41 # 不显示金钱得失
$noshowitem = 42 # 不显示物品得失
$noshowweapon = 43 # 不显示武器得失
$noshowarmor = 44 # 不显示防具得失
# 以上開關,當打開的時候,獲得物品將不會提示,比如默認打開41號開關,獲得金錢不再提示
# 不想提示等级升降时,就在事件命令直接选择是否显示就行了。
#——聲效,可以自己改
folder = "Audio/SE/"
$gain_gold_se = folder +"Shop" # 获得金钱声效
$loss_gold_se = folder +"Blow2" # 失去金钱声效
$gain_item_se = folder +"Item1" # 获得物品声效
$loss_item_se = folder +"Blow2" # 失去物品声效
$gain_weapon_se = folder +"Item1" # 获得武器声效
$loss_weapon_se = folder +"Blow2" # 失去武器声效
$gain_armor_se = folder +"Item1" # 获得防具声效
$loss_armor_se = folder +"Blow2" # 失去防具声效
$gain_lv_se = folder +"Item1" # 提升等级声效
$loss_lv_se = folder +"Blow2" # 降低等级声效
# ————————————————————————————————————
class Game_Interpreter
#--------------------------------------------------------------------------
# ● 增減金錢
#--------------------------------------------------------------------------
def command_125
value = operate_value(@params[0], @params[1], @params[2])
$game_party.gain_gold(value)
if $game_switches[$noshowgold]==false
show_gain_window(0, value)
end
return true
end
#--------------------------------------------------------------------------
# ● 增減物品
#--------------------------------------------------------------------------
def command_126
value = operate_value(@params[1], @params[2], @params[3])
$game_party.gain_item($data_items[@params[0]], value)
if $game_switches[$noshowitem]==false
show_gain_window(1, value)
end
$game_map.need_refresh = true
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])
if $game_switches[$noshowweapon]==false
show_gain_window(2, value)
end
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])
if $game_switches[$noshowarmor]==false
show_gain_window(3, value)
end
return true
end
#--------------------------------------------------------------------------
# ● 等级増減
#--------------------------------------------------------------------------
def command_316
value = operate_value(@params[2], @params[3], @params[4])
iterate_actor_var(@params[0], @params[1]) do |actor|
actor.change_level(actor.level + value, @params[5])
if @params[4]
show_gain_level_window(actor,value)
end
end
return true
end
def show_gain_window(type, value)
snstar2006_66rpg_item = $data_armors[@params[0]]
snstar2006_66rpg = Window_Base.new((640-300)/2,128,200,100)
snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 32, snstar2006_66rpg.height - 32)
if value >= 0
gain_text = "获得"
else
gain_text = "失去"
end
case type
when 0
gain_type = "金钱"
if value >=0
Audio.se_play($gain_gold_se,80,100)
else
Audio.se_play("Audio/SE/"+"Item1",80,100)
end
when 1
gain_type = "物品"
string = $data_items[@params[0]]
if value >=0
Audio.se_play($gain_item_se,80,100)
else
Audio.se_play($loss_item_se,80,100)
end
when 2
gain_type = "武器"
string = $data_weapons[@params[0]]
if value >=0
Audio.se_play($gain_weapon_se,80,100)
else
Audio.se_play($loss_weapon_se,80,100)
end
when 3
gain_type = "防具"
string = $data_armors[@params[0]]
if value >=0
Audio.se_play($gain_armor_se,80,100)
else
Audio.se_play($loss_armor_se,80,100)
end
end
snstar2006_66rpg.contents.draw_text(0,0,160,30,gain_text+gain_type+":")
unless type == 0
snstar2006_66rpg.draw_item_name(string, 0, 30, true)
snstar2006_66rpg.contents.draw_text(0, 30, 160, 30, "×"+value.abs.to_s, 2)
else
snstar2006_66rpg.contents.draw_text(0,30,165,30,value.abs.to_s + " "+ Vocab.currency_unit, 2)
end
snstar2006_66rpg.opacity = 160
for i in 0..50
Graphics.update
end
for i in 0..10
snstar2006_66rpg.opacity -= 10
snstar2006_66rpg.contents_opacity -= 10
Graphics.update
end
snstar2006_66rpg.dispose
end
def show_gain_level_window(actor,value)
lvstring = Vocab::level
snstar2006_66rpg = Window_Base.new((640-300)/2,128,200,100)
snstar2006_66rpg.contents = Bitmap.new(snstar2006_66rpg.width - 30, snstar2006_66rpg.height - 30)
if value >= 0
gain_text = "提升"
Audio.se_play($gain_lv_se,80,100)
else
gain_text = "降低"
Audio.se_play($loss_lv_se,80,100)
end
snstar2006_66rpg.contents.draw_text(0, 0, 110, 30, actor.name)
string = lvstring+gain_text+value.abs.to_s+"级"
snstar2006_66rpg.contents.draw_text(0,30,160,30,string, 2)
snstar2006_66rpg.opacity = 160
for i in 0..50
Graphics.update
end
for i in 0..10
snstar2006_66rpg.opacity -= 10
snstar2006_66rpg.contents_opacity -= 10
Graphics.update
end
snstar2006_66rpg.dispose
end
end
#==============================================================================
# 本腳本來自www.66RPG.com,使用和轉載請保留此信息
#==============================================================================
复制代码
作者:
zhaoxun96
时间:
2014-7-29 16:10
把原来的物品得失删了,用这个新的物品得失插在你脚本main前
#==============================================================================
# ☆ HAR - 得失物品脚本(v1.01a)
# 日期:2012/09/23
#==============================================================================
# -- 作者: Harinlen
# -- 等级: 普通级
# -- 依赖关系: 无
# -- 适用范围: RPG Maker VX Ace
# -- 不兼容脚本: 暂无
#==============================================================================
# ☆ 声明
# 此脚本参考了[PS0]双默认脚本的长度测量函数。
#==============================================================================
# ☆ 脚本使用说明
# 此脚本无需额外代码即可使用,使用事件调用增减金钱、增减武器、增减防具和增减物品的
# 时候会显示一个对话框显示得失物品情况。
#
# ☆ 脚本的启用
# 修改对应等号后面对应的数值为对应的开关序号,在事件中直接对开关进行判定即可:
#
# $window_tips_gold = 10 #金钱窗口提示的开关
# $window_tips_item = 11 #物品窗口提示的开关
# $window_tips_weapon = 12 #武器窗口提示的开关
# $window_tips_armor = 13 #防具窗口提示的开关
#
# ☆ 脚本的自定义
# 请修改下方的音效设定部分,将对应的音效更改成自己想要的音效即可。
# 音效名的获取请使用媒体库进行查看。只能使用SE中的音效。
#==============================================================================
#==============================================================================
# ■ 提示开关定义
#------------------------------------------------------------------------------
# 用于定义是否显示Window
#==============================================================================
$window_tips_gold = 101
$window_tips_item = 102
$window_tips_weapon = 103
$window_tips_armor = 104
#==============================================================================
# ■ 音效设定
#------------------------------------------------------------------------------
# 设定对应的音效播放效果
#==============================================================================
$SE_Gold_Gain = "Shop" # 获得金钱声效
$SE_Gold_Loss = "Blow2" # 失去金钱声效
$SE_Item_Gain = "Item1" # 获得物品声效
$SE_Item_Loss = "Blow2" # 失去物品声效
$SE_Weapon_Gain = "Item1" # 获得武器声效
$SE_Weapon_Loss = "Blow2" # 失去武器声效
$SE_Armor_Gain = "Item1" # 获得防具声效
$SE_Armor_Loss = "Blow2" # 失去防具声效
#==============================================================================
# ■ Window_Tips
#------------------------------------------------------------------------------
# 显示增减物品、金钱和装备的窗口
#==============================================================================
class Window_Tips < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x = 170, y = 128, width = 300, height = 96)
super
end
#--------------------------------------------------------------------------
# ● 增强绘制物品名称
#--------------------------------------------------------------------------
def adv_draw_item_name(item, x, y)
return unless item
draw_icon(item.icon_index, x, y, true)
change_color(normal_color, true)
draw_text(x + 24, y, width, line_height, item.name)
end
end
class Game_Interpreter
#--------------------------------------------------------------------------
# ● 增减金钱
#--------------------------------------------------------------------------
def command_125
value = operate_value(@params[0], @params[1], @params[2])
$game_party.gain_gold(value)
if $game_switches[$window_tips_gold] == true
show_tips_window(0, value)
end
return true
end
#--------------------------------------------------------------------------
# ● 增减物品
#--------------------------------------------------------------------------
def command_126
value = operate_value(@params[1], @params[2], @params[3])
$game_party.gain_item($data_items[@params[0]], value)
if $game_switches[$window_tips_item] == true
show_tips_window(1, value)
end
$game_map.need_refresh = true
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])
if $game_switches[$window_tips_weapon] == true
show_tips_window(2, value)
end
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])
if $game_switches[$window_tips_armor] == true
show_tips_window(3, value)
end
return true
end
#--------------------------------------------------------------------------
# ● 显示增减提示窗口
#--------------------------------------------------------------------------
def show_tips_window(type, value)
case type
when 0
item_type = Vocab::currency_unit
if value >= 0
Audio.se_play("Audio/SE/" + $SE_Gold_Gain, 100, 100)
else
Audio.se_play("Audio/SE/" + "Item1", 100, 100)
end
when 1
item_type = Vocab::item
processed_items = $data_items[@params[0]]
if value >= 0
Audio.se_play("Audio/SE/" + $SE_Item_Gain, 100, 100)
else
Audio.se_play("Audio/SE/" + $SE_Item_Loss, 100, 100)
end
when 2
item_type = Vocab::weapon
processed_items = $data_weapons[@params[0]]
if value >= 0
Audio.se_play("Audio/SE/" + $SE_Weapon_Gain, 100, 100)
else
Audio.se_play("Audio/SE/" + $SE_Weapon_Loss, 100, 100)
end
when 3
item_type = Vocab::armor
processed_items = $data_armors[@params[0]]
if value >= 0
Audio.se_play("Audio/SE/" + $SE_Armor_Gain, 100, 100)
else
Audio.se_play("Audio/SE/" + $SE_Armor_Loss, 100, 100)
end
end
if value >= 0
tips_processed_text = "获得"
else
tips_processed_text = "失去"
end
if type != 0
text_value = "×" + value.abs.to_s
bitmap = Bitmap.new(100, 100)
itemwidth = bitmap.text_size(processed_items.name).width + 95
valuewidth = bitmap.text_size(text_value).width
itempop_window = Window_Tips.new((544 - itemwidth - valuewidth) / 2, 128, itemwidth + valuewidth, 88)
itempop_window.contents = Bitmap.new(itempop_window.width - 32, itempop_window.height - 32)
itempop_window.contents.draw_text(0, 0, 160, 32, tips_processed_text + item_type+":")
itempop_window.adv_draw_item_name(processed_items, 28, 32)
itempop_window.contents.draw_text(0, 30, itemwidth, 32, "×" + value.abs.to_s, 2)
else
text_value = value.abs.to_s + " " + Vocab::currency_unit
bitmap = Bitmap.new(100, 100)
textwidth = bitmap.text_size(text_value).width + 95
itempop_window = Window_Tips.new(170, 128, textwidth, 88)
itempop_window.contents = Bitmap.new(itempop_window.width - 32, itempop_window.height - 32)
itempop_window.contents.draw_text(0, 0, 160, 32, tips_processed_text + item_type+":")
itempop_window.contents.draw_text(32, 32, 240, 32, value.abs.to_s + " " + Vocab::currency_unit)
end
for i in 0..60
Graphics.update
end
for i in 0..10
itempop_window.opacity -= 30
itempop_window.contents_opacity -= 30
Graphics.update
end
itempop_window.dispose
for i in 0..3
Graphics.update
end
end
end
复制代码
不需要通知的时候就“关闭四个开关,获得物品,开启四个开关”
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1