设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2416|回复: 18
打印 上一主题 下一主题

[已经解决] 求强人修改

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
跳转到指定楼层
1
发表于 2009-8-6 18:23:31 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 肖宋发 于 2009-8-7 15:51 编辑

下面的脚本是“全新世纪二(神惩的代价)1.02版”工程的东西...我要拿来用...但是老是提示
    return Quarcy::Cache.loadbitmap(path)
这部分内容出错!请强人修改下!!谢谢了!

#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
#  处理标题画面的类。
#==============================================================================

class Scene_Title
  def initialize(skip = false)
    @skip = skip
  end
  #--------------------------------------------------------------------------
  # ● 住处理
  #--------------------------------------------------------------------------
  def main
    # 战斗测试的情况下
    if $BTEST
      battle_test
      return
    end
    # 载入数据库
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes       = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items         = load_data("Data/Items.rxdata")
    $data_weapons       = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies       = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    $data_mapnames      = load_data("Data/MapInfos.rxdata")
    $game_system        = Game_System.new
    @wait_count = 0
    @index      = 0
    # 判定继续的有效性
    # 存档文件一个也不存在的时候也调查
    # 有効为 @continue_enabled 为 true、無効为 false
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save/Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    if @skip
      acting(4)
    else
      start
    end
    # 停止演奏 ME、BGS
    Audio.me_stop
    Audio.bgs_stop
    # 执行过渡
    Graphics.transition
    # 主循环
    loop do
      # 刷新游戏画面
      Graphics.update
      # 刷新输入信息
      Input.update
      # 刷新画面
      update
      # 如果画面被切换就中断循环
      if $scene != self
        break
      end
    end
    # 装备过渡
    Graphics.freeze
    5.times do |i|@pic.bitmap.dispose; @pic.dispose end
    Quarcy::Cache.clear
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  def update
    (@wait_count -= 1;return) if @wait_count > 0
    return if acting(@step)
    if Input.repeat?(Input::UP)
    if Input.trigger?(Input::UP) or true
      @index = (@index - 1)%4
      @pic[3].bitmap = loadbitmap("Graphics/Title/选项#{@index+1}")
      $game_system.se_play($data_system.cursor_se)
      
      return
    end
    end
    if Input.repeat?(Input::DOWN)
    if Input.trigger?(Input::DOWN) or true
      @index = (@index + 1)%4
      @pic[3].bitmap = loadbitmap("Graphics/Title/选项#{@index+1}")
      $game_system.se_play($data_system.cursor_se)
      return
    end
    end
   
    # 按下 C 键的情况下
    if Input.trigger?(Input::C)
      # 命令窗口的光标位置的分支
      case @index
      when 0  # 新游戏
        command_new_game
      when 1  # 继续
        command_continue
      when 2
        $scene = Scene_Reference.new
      when 3  # 退出
        command_shutdown
      end
    end
  end
  #----------------------------------------------------------------------------
  def start
    @wait_count = 40
    @step = 1
  end
  def acting(step)
    case step
    when 8
      return false
    when 1
      @pic = Sprite.new
      @pic.bitmap = loadbitmap("Graphics/Pictures/66rpg")
      @pic.opacity = 0
      @duration = 20
      @step = 2
      return true
    when 2
      if @duration > 0
        d = @duration
        @pic.opacity = (@pic.opacity * (d - 1) + 255) / d
        @duration -= 1
      else
        @step = 3
        @wait_count = 20
        @duration   = 20
      end
      return true
    when 3
      if @duration > 0
        d = @duration
        @pic.opacity = (@pic.opacity * (d - 1) + 0) / d
        @duration -= 1
      else
        @step = 4
        @wait_count = 25
      end
      return true
    when 4
      @pic.dispose if @pic !=nil
      @wait_count = 20
      @duration   = 60
      $game_system.bgm_play($data_system.title_bgm)
      @pic = []
      5.times do @pic << Sprite.new end
      i = rand(4) + 1
      @pic[0].bitmap = loadbitmap("Graphics/Title/背景#{i}")
      @pic[1].bitmap = loadbitmap("Graphics/Title/LOGO")
      actor = %w[冰儿 灵姬 苍刃 阿喵][rand(4)]
      @pic[2].bitmap = loadbitmap("Graphics/Title/#{actor}")
      if @continue_enabled
        @index = 1
        @pic[3].bitmap = loadbitmap("Graphics/Title/选项#{@index+1}")
      else
        @pic[3].bitmap = loadbitmap("Graphics/Title/选项1")
      end
      @pic[3].x = -15
      
      @pic[4].bitmap = loadbitmap("Graphics/Title/66RPG")
      @pic[4].y = 460
      5.times do |i|@pic.opacity = 0 end
      @step = 5
      return true
    when 5
      if @duration > 40
        d = @duration - 40
        @pic[0].opacity = (@pic[0].opacity * (d - 1) + 255) / d
        @pic[4].opacity = (@pic[3].opacity * (d - 1) + 255) / d
        @duration -= 1
        return true
      elsif @duration > 25
        d = @duration - 25
        @pic[1].opacity = (@pic[1].opacity * (d - 1) + 255) / d
        @pic[2].opacity = (@pic[2].opacity * (d - 1) + 255) / d
        @duration -= 1
        return true
      elsif @duration > 0
        d = @duration
        @pic[3].opacity = (@pic[3].opacity * (d - 1) + 255) / d
        @duration -= 1
        return true
      else
        @step = 8
        @wait_count = 3
      end
      return true
    when 6
      if @duration > 0
        d = @duration
        @pic[0].opacity = (@pic[0].opacity * (d - 1) + 0) / d
        @duration -= 1
      else
        @step = 7
        @duration = 20
        @pic[0].x = 0
      end
      return true
    when 7
      if @duration > 0
        d = @duration
        @pic[0].opacity = (@pic[0].opacity * (d - 1) + 255) / d
        @duration -= 1
      else
        @step = 8
      end
    else
      return true
    end
      
  end
  #----------------------------------------------------------------------------
  #--------------------------------------------------------------------------
  # ● 載入圖片并放置于緩存區
  #--------------------------------------------------------------------------
  def loadbitmap(path)
    return Quarcy::Cache.loadbitmap(path)
  end
end
class Scene_Reference
  #--------------------------------------------------------------------------
  # ● 主处理
  #--------------------------------------------------------------------------
  def main
    bg_sprite = Sprite.new()
    bg_sprite.bitmap = Quarcy::Cache.loadbitmap("Graphics/menu/制作人员列表.png")
    # 执行过渡
    Graphics.transition
    # 主循环
    loop do
      # 刷新游戏画面
      Graphics.update
      # 刷新输入信息
      Input.update
      if Input.trigger?(Input::C) or Input.trigger?(Input::B)
        $scene = Scene_Title.new(true)
      end
      # 如果画面被切换就中断循环
      if $scene != self
        break
      end
    end
    bg_sprite.dispose()
    # 装备过渡
    Graphics.freeze
    Quarcy::Cache.clear
  end
end

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
2
 楼主| 发表于 2009-8-7 15:51:39 | 显示全部楼层
6R强人,怎么弄啊???????
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
3
 楼主| 发表于 2009-8-7 16:03:38 | 显示全部楼层
那要怎么复制啊?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
4
 楼主| 发表于 2009-8-7 16:14:50 | 显示全部楼层
「旅」 没有啊module Quarcy!!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
5
 楼主| 发表于 2009-8-7 17:10:07 | 显示全部楼层
恩,那这个怎么修改啊?
bg_sprite.bitmap = Quarcy::Cache.loadbitmap("Graphics/menu/制作人员列表.png")
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
6
 楼主| 发表于 2009-8-7 17:21:01 | 显示全部楼层
本帖最后由 肖宋发 于 2009-8-7 17:47 编辑

不可以啊!!!求强人再改改!!

Scripts.rar

254.79 KB, 下载次数: 14

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
7
 楼主| 发表于 2009-8-9 16:10:33 | 显示全部楼层
没有强人会的吗?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
8
 楼主| 发表于 2009-8-10 17:13:16 | 显示全部楼层
要不module Quarcy
  module Cache
    @cache = {}
    def self.load_bitmap(path, hue = 0)
      if not @cache.include?(path) or @cache[path].disposed?
        if path != ""
          @cache[path] = Bit ...
goahead 发表于 2009-8-10 09:22

好了,但是又报错....
下面这项怎么修改啊???
bg_sprite.bitmap = Quarcy::Cache.loadbitmap("Graphics/menu/制作人员列表.png")
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
4 小时
注册时间
2008-6-5
帖子
312
9
 楼主| 发表于 2009-8-12 12:49:45 | 显示全部楼层
那是缺文件吧~~~~Graphics/menu/制作人员列表.png这个文件你有没有?
goahead 发表于 2009-8-10 17:22

这个我有啊?
是出现“bg_sprite.bitmap = Quarcy::Cache.loadbitmap”错误............
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-6-9 23:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表