| 
 
| 赞 | 13 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 21 |  
| 经验 | 70950 |  
| 最后登录 | 2025-3-14 |  
| 在线时间 | 740 小时 |  
 Lv3.寻梦者 
	梦石0 星屑2147 在线时间740 小时注册时间2010-9-6帖子338 | 
9楼
 
 
 楼主|
发表于 2016-2-19 20:47:01
|
只看该作者 
| 1243852 发表于 2016-2-19 08:56 ![]() 没有办法修改吗?修改成能够显示随机装备?
新的脚本,替换应该就行了
 复制代码=begin
================================
  道具提示系统 2   By 804173948
================================
  基本的使用方法和得失物品大致相同
  效果和道具提示系统 1 大致相同
  
  使用方法:
    直接在事件中用【增减物品】,【增减武器】,【增减护甲】,【增减金钱】,【增减等级】
    等指令即可出现提示框
    物品提示框持续时间可以通过 事件-脚本:$game_itemprompt.dis_count = 持续帧数
      【注意,只对当前显示的内容有效,一般都是自动计算持续时间,
      计算公式在 NIS_ItemPromptGroup 脚本的 81 行】
    文字提示框持续时间可以通过 事件-脚本:$game_message2.dis_count = 持续帧数
      【注意,只对当前显示的内容有效,一般都是自动计算持续时间,
      计算公式在 NIS_Message 脚本的 66 行】
    提示框可以通过按下确认键或取消键让其消失,可以在本脚本 43~44 行设置
    
    使用事件-脚本:show_prompt 可以强行显示提示框【虽然不建议这么做而且也没意义】
    
    使用事件-脚本:clear_get_prompt 可以清除“得到道具”的提示框的内容并关闭该提示框
    使用事件-脚本:clear_lose_prompt 可以清除“失去道具”的提示框的内容并关闭该提示框
    使用事件-脚本:clear_all_prompt 可以清除所有提示框的内容并关闭所有提示框
    
    使用事件-脚本:$game_itemprompt.create_prompt(提示框x坐标,提示框y坐标,提示框头文字,提示框默认持续时间,提示框初始道具) 
      可以新建一个提示框(虽然感觉这没什么用),提示框最多 8 个
      因为这个功能没什么用所以就不讲解啦【因为我不知道怎么说- -】
      
    更多功能请参考 NIS_ItemPromptGroup 类
    
=end
# 開關定義:
module Prompt
  Noshowgold = 97                        # 不显示金钱得失
  Noshowitem = 98                        # 不显示物品得失
  Noshowweapon = 99                      # 不显示武器得失
  Noshowarmor = 100                      # 不显示防具得失
  # 以上開關,當打開的時候,獲得物品將不會提示,比如默認打開41號開關,獲得金錢不再提示
  # 不想提示等级升降时,就在事件命令直接选择是否显示就行了。
  #——聲效,可以自己改
  Gain_gold_se   = "Audio/SE/Shop"      # 获得金钱声效
  Lose_gold_se   = "Audio/SE/Blow2"     # 失去金钱声效
  Show_prompt_se = "Audio/SE/Item1"     # 显示物品提示声效
  Gain_lv_se     = "Audio/SE/Item1"     # 提升等级声效
  Lose_lv_se     = "Audio/SE/Blow2"     # 降低等级声效
  
  Show_help      = true                 # 提示窗口显示帮助
  
  OK_back        = true                 # 提示窗口中,按确认键关闭窗口
  Cancel_back    = true                 # 提示窗口中,按取消键关闭窗口
end
class Game_Interpreter
  include Prompt
  #--------------------------------------------------------------------------
  # ● 增減金錢
  #--------------------------------------------------------------------------
  def command_125
    value = operate_value(@params[0], @params[1], @params[2])
    $game_message2.text ||= ""
    $game_party.gain_gold(value)
    if !$game_switches[Noshowgold]
      $game_message2.text += (value >= 0 ? "\001[255,255,128]获得了 " : "\001[255,128,128]失去了 ")+value.abs.to_s+" "+Vocab.currency_unit+"\n"
      value >=0 ? Audio.se_play(Gain_gold_se,80,100) : Audio.se_play(Lose_gold_se,80,100)
    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|
      $game_message2.text ||= ""
      actor.change_level(actor.level + value, @params[5])
      if @params[4]
        $game_message2.text += (value >= 0 ? "\001[255,255,128]"+actor.name+" 提升了 " : "\001[255,128,128]"+actor.name+" 降低了 ")+value.abs.to_s+" "+Vocab.level+"\n"
        value >=0 ? Audio.se_play(Gain_lv_se,80,100) : Audio.se_play(Lose_lv_se,80,100)
      end
    end
    return true
  end
  
  #--------------------------------------------------------------------------
  # ● 显示提示
  #--------------------------------------------------------------------------
  def show_prompt
    Audio.se_play(Show_prompt_se,80,100)
    $game_itemprompt.show_prompt($game_itemprompt.get_index)
    $game_itemprompt.show_prompt($game_itemprompt.lose_index)
  end
  #--------------------------------------------------------------------------
  # ● 清除获得提示
  #--------------------------------------------------------------------------
  def clear_get_prompt
    $game_itemprompt.clear_prompt($game_itemprompt.get_index)
    $game_itemprompt.hide_prompt($game_itemprompt.get_index)
  end
  #--------------------------------------------------------------------------
  # ● 清除失去提示
  #--------------------------------------------------------------------------
  def clear_lose_prompt
    $game_itemprompt.clear_prompt($game_itemprompt.lose_index)
    $game_itemprompt.hide_prompt($game_itemprompt.lose_index)
  end
  #--------------------------------------------------------------------------
  # ● 清除所有提示
  #--------------------------------------------------------------------------
  def clear_all_prompt
    $game_itemprompt.clear_all_prompt
    $game_itemprompt.hide_all_prompt
  end
  
end
#encoding:utf-8
#==============================================================================
# ■ Scene_Base
#------------------------------------------------------------------------------
#  游戏中所有 Scene 类(场景类)的父类
#==============================================================================
class Scene_Base
  #--------------------------------------------------------------------------
  # ● 更新所有窗口
  #--------------------------------------------------------------------------
  alias old_update_all_windows update_all_windows
  def update_all_windows
    old_update_all_windows
    $game_message2.update
    $game_itemprompt.update
  end
end
module DataManager
  class << self
    alias :old_create_game_objects :create_game_objects unless method_defined?(:old_create_game_objects)
  end
  #--------------------------------------------------------------------------
  # ● 初始化得失提示
  #--------------------------------------------------------------------------
  def self.create_game_objects
    old_create_game_objects
    $game_message2      = NIS_Message.new
    $game_itemprompt    = NIS_ItemPromptGroup.new
  end
end
class Game_Party
  #--------------------------------------------------------------------------
  # ● 增加/减少物品
  #     include_equip : 是否包括装备
  #--------------------------------------------------------------------------
  def gain_item(item, amount, include_equip = false)
    container = item_container(item.class)
    return unless container
    show_prompt = false
    case item.class.to_s
    when "RPG::Item"
      show_prompt = !$game_switches[Prompt::Noshowitem]
    when "RPG::Weapon"
      show_prompt = !$game_switches[Prompt::Noshowweapon]
    when "RPG::Armor"
      show_prompt = !$game_switches[Prompt::Noshowarmor]
    end
    if show_prompt
      v = amount.abs
      v.times{ $game_itemprompt.push_item_to_prompt(item,amount >= 0 ? $game_itemprompt.get_index : $game_itemprompt.lose_index) }
      prompt_show
    end
    last_number = item_number(item)
    new_number = last_number + amount
    container[item.id] = [[new_number, 0].max, max_item_number(item)].min
    container.delete(item.id) if container[item.id] == 0
    if include_equip && new_number < 0
      discard_members_equip(item, -new_number)
    end
    $game_map.need_refresh = true
  end
  
  #--------------------------------------------------------------------------
  # ● 显示提示
  #--------------------------------------------------------------------------
  def prompt_show
    Audio.se_play(Prompt::Show_prompt_se,80,100)
    $game_itemprompt.show_prompt($game_itemprompt.get_index)
    $game_itemprompt.show_prompt($game_itemprompt.lose_index)
  end
end
 | 
 |