| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 1 |  
| 积分 | 4 |  
| 经验 | 868 |  
| 最后登录 | 2014-6-14 |  
| 在线时间 | 628 小时 |  
 Lv2.观梦者 
	梦石0 星屑448 在线时间628 小时注册时间2011-9-27帖子3996 | 
| 本帖最后由 小白玩家 于 2012-1-3 18:03 编辑 
 没明白~不就是物品得失提示脚本吗?地图上画个水井,用宝箱事件,图形改成无呗,事件放到水井上面~
 确定键触发,和你图里那样也可以啊,第一页结尾加个独立开关,第二页空白,触发条件独立开关打开(不然按一次确定键,增加一次物品~
 
 ![]() 
 ![]() 
 ![]() 复制代码#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
class Game_Interpreter
UnShowSwitch = 5 #禁止显示提示开关
GainSe = "Audio/SE/Recovery.ogg"
LoseSe = "Audio/SE/Raise2.ogg"
  #--------------------------------------------------------------------------
  # ● 增减金钱
  #--------------------------------------------------------------------------
  def command_125
    value = operate_value(@params[0], @params[1], @params[2])
    $game_party.gain_gold(value)
    show_window(0,value) unless $game_switches[UnShowSwitch]
    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
    show_window(1,value,@params[0]) unless $game_switches[UnShowSwitch]
    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])
    show_window(2,value,@params[0]) unless $game_switches[UnShowSwitch]
    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])
    show_window(3,value,@params[0]) unless $game_switches[UnShowSwitch]
    return true
  end
  def show_window(type,value,id = 0)  
    if type == 0
      item = "gold"
    else #物品,武器,防具
      if type == 1
      item = $data_items[id]
      elsif type == 2
      item = $data_weapons[id]
      else
      item = $data_armors[id]
      end 
    end      
      width = 150 + (type == 0 ? value.to_s.size * 7 - 16 : item.name.size * 7)
      w = Window_Base.new((640-width)/2 - 85 ,110,width,64)
      w.windowskin = Cache.system("Window")
      w.contents = Bitmap.new(w.width - 32, w.height - 32)
      w.contents.font.color = w.text_color(1)
      w.contents.fill_rect(w.contents.rect,w.text_color(0))
      w.opacity = w.contents_opacity =0   
      for i in 0..10
        w.opacity += 26
        w.contents_opacity += 26
        w.x += 3
        Graphics.update
      end       
      if value >= 0
        w.contents.draw_text(0,4,48,24,"得到")    
        Audio.se_play(GainSe)
      else
        w.contents.draw_text(0,4,48,24,"失去")    
        Audio.se_play(LoseSe)
      end
        if type != 0
        w.draw_item_name_c(item,50, 4 ,type + 23)
        w.opacity = w.back_opacity = 255
        w.contents.font.color = w.text_color(14) 
        w.contents.draw_text(width - 72 , 4, 40, 24, "× " + value.abs.to_s ,2)
        else  
        bitmap = Cache.system("gold")
        w.contents.blt(50, 4 ,bitmap , bitmap.rect)
        w.contents.font.color = w.text_color(14)  
        w.contents.draw_text(width - 112 , 4, 72, 24, " " + value.abs.to_s ,2)
        end
      for i in 0..50
        Graphics.update
      end
      for i in 0..20
        w.opacity -= 13
        w.contents_opacity -= 13
        w.x += 2
        Graphics.update
      end
      w.dispose
  end
end
class Window_Base
  def draw_item_name_c(item, x, y , color)
    if item != nil
      draw_icon(item.icon_index, x, y, true)
      self.contents.font.color = self.text_color(color)
      self.contents.draw_text(x + 24, y, 172, WLH, item.name)
    end
  end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
 | 
 |