您现在看到的是 66RPG.com 的资源列表,若这些对您有帮助,
希望您以充值论坛VIP点数的方式为我们捐款,
您的捐款将用于本站的三台服务器托管费,以及网通100M带宽的租金

66RPG充值页面 66RPG充值页面

最近更新记录

  • 2012-02-14 : 新增两个音乐素材
  • 2012-02-14 : 新增一个游戏资源
  • 2012-02-10 : 新增3个素材资源
  • 2012-02-09 : 新增/更新16个资源

66RPG 站内搜索

精确(推荐) 全文

本站收集内容是为了便于让游戏制作爱好者互相学习与交流,所有内容的版权与著作权均归原作者/公司所有。如进行有可能引起纠纷的使用,建议您先与原作方沟通。
线索仓库增强版
更新:2012-01-27 12:34:38 | 点击量:764
线索仓库增强版
脚本作者:絮儿
版本更新:Ver 1.0
适用版本:RPG Maker XP
线索仓库增强版,推荐学习,不推荐使用

MS看到有人问= =最近学习脚本ing..试了一下= =
呃```MS很笨的方法= =
高手无视无视哒~~~
这个其实不止可以做线索仓库的说= =图鉴什么的都可以的说

= =````(一排汗-v-)

脚本内容

#####################################################################
#简陋的线索仓库= =
#
#偷懒用了物品栏= =
#调用$scene = Scene_Clue.new
#物品名+“,”+类别代号+“,”+颜色代号= =
#比如"照片,3,1"显示出来是照片类,粉色字= =
#类别代号:   0 :侦探小说   1 :书信  2 :日记  3 :照片  4 :备用1  5 :备用2  6 :备用3
#(名称是胡乱设的说= =可以自己改~删掉大概也米关系吧= =)
#颜色代号: 和帮助里一样的说
#如果物品设置的不能使用,按回车显示出的就是物品说明```可以使用的话就挂公共事件= =
#物品说明栏  \V[n]显示第n号变量的值
#            \E  换行
#            \C[n]换用第n号颜色
#            \N[n]显示第n号角色名称
#            \P[n]显示在cluepics里的cluepic_n图片(照片什么的用吧= =)
#暂时米想到还有什么其他的了= =
########################################################################
class Window_Clue < Window_Selectable
  def initialize
    super(160, 0, 480, 416)
    @column_max = 2
    refresh(0)
    self.index = 0
  end
  def item
    return @data[self.index]
  end
  def clear
    if self.contents != nil 
      self.contents.clear
    end
  end
  def refresh(type)
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    case type
    when 0
      for i in 1...$data_items.size
        if $data_items[i].name.split(/,/)[1] == "0" and $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
    when 1
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0 and $data_items[i].name.split(/,/)[1] == "1"
          @data.push($data_items[i])
        end
      end
    when 2
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0 and $data_items[i].name.split(/,/)[1] == "2"
          @data.push($data_items[i])
        end
      end
    when 3
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0 and $data_items[i].name.split(/,/)[1] == "3"
          @data.push($data_items[i])
        end
      end
    when 4
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0 and $data_items[i].name.split(/,/)[1] == "4"
          @data.push($data_items[i])
        end
      end
    when 5
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0 and $data_items[i].name.split(/,/)[1] == "5"
          @data.push($data_items[i])
        end
      end
    when 6
      for i in 1...$data_items.size
        if $game_party.item_number(i) > 0 and $data_items[i].name.split(/,/)[1] == "6"
          @data.push($data_items[i])
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 描绘项目
  #     index : 项目编号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    end
    self.contents.font.color = normal_color
    x = 4 + index % 2 * (205 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    if !item.name.split(/,/)[2].nil?
      self.contents.font.color = text_color(item.name.split(/,/)[2].to_i)
    else
      self.contents.font.color = text_color(7)
    end
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name.split(/,/)[0], 0)
  end
  #--------------------------------------------------------------------------
  # ● 刷新帮助文本
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end
module RPG
  module Cache
    def self.cluepic(filename)
      self.load_bitmap("Graphics/cluepics/", filename)
    end
  end
end
class Window_ClueHelp < Window_Base
  def initialize
    super(50, 50, 380, 380)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z = 99999
  end
  def clear
    self.contents.clear
  end
  def set_text(mes)
    self.contents.clear
    self.contents.font.color = normal_color
    x = y = 0
    @cursor_width = 0
    if $game_temp.choice_start == 0
      x = 8
    end
    if mes!= nil 
      text = mes.clone
      begin
        last_text = text.clone
        text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
      end until text == last_text
      text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
        $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
      end
      text.gsub!(/\\\\/) { "\000" }
      text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
      text.gsub!(/\\[Gg]/) { "\002" }
      text.gsub!(/\\[Pp]\[([0-9]+)\]/) { "\003[#{$1}]" }
      text.gsub!(/\\[Ee]/) { "\004" }
      while ((c = text.slice!(/./m)) != nil)
        if c == "\000"
          c = "\\"
        end
        if c == "\001"
          text.sub!(/\[([0-9]+)\]/, "")
          color = $1.to_i
          if color >= 0 and color <= 7
            self.contents.font.color = text_color(color)
          end
          next
        end
        if c == "\002"
          y += 1
          x = 0
          next
        end
        if c == "\003"
          text.sub!(/\[([0-9]+)\]/, "")
          t = RPG::Cache.cluepic("cluepic_#{$1}")
          self.contents.blt(x, 32 * y, t, t.rect)
          t.dispose
          next
        end
        if c == "\004"
          y += 1
          x = 0
          if y >= $game_temp.choice_start
            x = 8
          end
          next
        end
        self.contents.draw_text(4 + x, 32 * y, 40, 32, c)
        x += self.contents.text_size(c).width
      end
    end
  end
end
class Window_Item
  alias new_refresh refresh
  def refresh
    @data = []
    # 添加报务
    for i in 1...$data_items.size
      unless $data_items[i].name.split(/,/)
        if $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
    end
  end
end
class Window_ShopBuy
  alias new_refresh refresh
  def refresh
    @data = []
    for goods_item in @shop_goods
      case goods_item[0]
      when 0
        item = $data_items[goods_item[1]]
      when 1
        item = $data_weapons[goods_item[1]]
      when 2
        item = $data_armors[goods_item[1]]
      end
      if item != nil 
        unless item.name.split(/,/)
          @data.push(item)
        end
      end
    end
  end
end
class Window_ShopSell
  alias new_refresh refresh
  def refresh
    @data = []
    for i in 1...$data_items.size
      unless $data_items[i].name.split(/,/)
        if $game_party.item_number(i) > 0
          @data.push($data_items[i])
        end
      end
    end
  end
end
class Scene_Clue
  def main
    @spriteset = Spriteset_Map.new
    @help_window = Window_ClueHelp.new
    @help_window.visible = false
    @clue_window = Window_Clue.new
    @clue_window.opacity = 160
    @clue_window.index = -1
    @clue_window.clear
    @clue_window.active = false
    @class_window = Window_Command.new(160, ["侦探小说", "书信", "日记", "照片", "备用1", "备用2", "备用3"])
    @class_window.opacity = 160
    @clue_window.help_window = @help_window
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @spriteset.dispose
    @help_window.dispose
    @clue_window.dispose
    @class_window.dispose
  end  
  def update
    @help_window.update
    @clue_window.update
    @class_window.update
    if @class_window.active
      update_class
      return
    end
    if @clue_window.active
      update_clue
      return
    end
    if @help_window.active
      update_help
      return
    end
  end
  def update_class
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    end
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @class_window.active = false
      @clue_window.active = true
      @clue_window.index = 0
      @clue_window.refresh(@class_window.index)
      @help_window.visible = false
    end
    if Input.dir4 !=0
      @clue_window.refresh(@class_window.index)
    end
  end
  def update_clue
    @help_window.visible = false
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @help_window.clear
      @help_window.visible = false
      @clue_window.active = false
      @class_window.active = true
      @clue_window.index = -1
    end
    if Input.trigger?(Input::C)
      @item = @clue_window.item
      unless @item.is_a?(RPG::Item)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      if $game_party.item_can_use?(@item.id)
        $game_system.se_play(@item.menu_se)
        if @item.consumable
          $game_party.lose_item(@item.id, 1)
          @clue_window.draw_item(@clue_window.index)
        end
        if $game_party.all_dead?
          $scene = Scene_Gameover.new
          return
        end
        if @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $scene = Scene_Map.new
          return
        end
        return
      else
        $game_system.se_play($data_system.decision_se)
        @clue_window.active = false
        @help_window.visible = true
        @help_window.active = true
        return
      end
    end
  end
  def update_help
    @help_window.active = true
    @help_window.visible = true
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      @help_window.active = false
      @help_window.visible = false
      @clue_window.active = true
    end
  end
end

搜到一些相关内容,看看有没有有用的:

教程 : 个性化商店教程 : 自定义多货币脚本教程 : 跟隨光标自修正位置的详细帮助窗..素材 : 《炼金术士梅露露~亚兰德的炼金..教程 : 显示ARPG用的窗口教程 : 新人入门录像1 初识RMXP游戏 : 赠予新手们的修改脚本的教程教程 : 大地图制作教程教程 : KKME整合系统教程 : 2种敌人战斗新的死法- -||..教程 : 人物能力状态图的多边形网状绘制教程 : 美化的动态选项窗口游戏 : 《OZ大乱斗:梦想与传说的延续..教程 : PS去行走图底色教程教程 : 日夜控制系统完美版教程 : 神秘羊皮纸教程 : RM反沉迷系统教程 : 动态选项光标教程 : 用流星当板擦,擦出Title标..教程 : 数据包的制作、加密以及解压运行教程 : 物品技能介绍加强(多行显示)教程 : ikki的敌人等级设定教程教程 : 显示对话人物头像教程 : 截图+档位扩展50+存档提示+..教程 : 使用自带字体[功能完善]教程 : fuki对话框(又名呼出对话框..教程 : RMXP在游戏运行中制作事件教程 : 行走图横版战斗-改进版教程 : 导出工程中全部对话文字教程 : 线索仓库增强版

没找到你想要的?可以使用搜索功能 ↓

66RPG 站内搜索

精确(推荐) 全文

评论啦