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

Project1

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

[已经解决] 可以帮我改一下脚本吗?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
310
在线时间
11 小时
注册时间
2010-11-29
帖子
4
跳转到指定楼层
1
发表于 2010-12-19 21:18:40 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 Firaga 于 2010-12-20 13:21 编辑

可以帮我改一下脚本吗?因为不管我怎么改也······

变成这样···


脚本:

  1. #==============================================================================
  2. # ■ 显示进度脚本  by StarWatcher
  3. #------------------------------------------------------------------------------
  4. #  1-插入此段脚本到Main前面
  5. #   2-仔细设置下面的变量
  6. #   3-启用方式$Scene=Scene_Progress.new
  7. #   4-如果有其他什么问题(如何插入菜单)请自行寻找教程
  8. #==============================================================================

  9. #==============================================================================
  10. # ■ Scene_Progress
  11. #------------------------------------------------------------------------------
  12. #  显示进度的脚本
  13. #==============================================================================
  14. class Scene_Progress<Scene_Base
  15.   def initialize(menu_index = 0)
  16.     #下面设置返回菜单的选项序号
  17.     $backindex=5
  18.     #下面设置的是如何返回,false返回菜单,true返回地图
  19.     $FromMap=false
  20.     #下面设置总共进度的选项卡数
  21.     $MaxIndex=5
  22.     #下面设置控制游戏进度的变量号
  23.     $UseIndex=101
  24.     #介绍:变量的值-1为什么都没有达成
  25.     #0..x则分别达成了1~x+1的进度
  26.     #下面的请无视他
  27.     $indexer=0
  28.     $ConIndex=0
  29.     #下面设置每一个进度的名称
  30.     #=后面格式["进度1内容","进度2内容","进度3内容"……]
  31.     $ChapNa=["序章:启程、前往异空间","第一章:碧海之心"]
  32.     #下面设置每一个进度的介绍
  33.     #=后面格式[["进度1介绍1","进度1介绍2","进度1介绍3"],[],[]…………]
  34.     $InfoMa=[["发现了异空间的秘密,还有幽灵阿塞米的阴谋。","于是瓦拉齐和卡西亚就踏上了恢复人类的旅途。",""],
  35.     ["被传送到了亚玛西海域后,他们遇到了盗贼丝拉尔","都是工会的成员瓦拉齐和丝拉尔","进入了工会大门,开始解决事情……"]]
  36.     #下面设置每一个进度如果没有达成显示的内容
  37.     $Nothing="未达成"
  38.     #下面设置每一个进度如果没有达成显示的介绍
  39.     $Nothing2="未达成"
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ● 开始后处理
  43.   #--------------------------------------------------------------------------
  44.      
  45.   def start
  46.     super
  47.     create_menu_background
  48.     @progress = Progress.new
  49.     @progressinf = ProgressInf.new
  50.     @progressinf2 = ProgressInf2.new
  51.     @progressinf.active=false
  52.     @progressinf2.active=false
  53.     @progress.active=true
  54.   end
  55.   #--------------------------------------------------------------------------
  56.   # ● 结束后处理
  57.   #--------------------------------------------------------------------------
  58.    
  59.   def terminate
  60.     super
  61.     dispose_menu_background
  62.     @progress.dispose
  63.     @progressinf.dispose
  64.     @progressinf2.dispose
  65.   end
  66.   #--------------------------------------------------------------------------
  67.   # ● 更新
  68.   #--------------------------------------------------------------------------
  69.   
  70.   def update
  71.     super
  72.     update_menu_background
  73.     [email protected]
  74.     @progress.update
  75.     if $indexer!=j then
  76.       [email protected]
  77.       @progress.refresh
  78.       @progressinf.update
  79.     end
  80.     update_window_selection
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● 更新选项卡
  84.   #--------------------------------------------------------------------------
  85.   
  86. def update_window_selection
  87.     if Input.trigger?(Input::B)
  88.       Sound.play_cancel
  89.       if $FromMap then
  90.         $scene = Scene_Map.new
  91.       else
  92.         $scene = Scene_Menu.new($backindex)  
  93.       end
  94.     end
  95.   end
  96. end

  97. #==============================================================================
  98. # ■ Progress
  99. #------------------------------------------------------------------------------
  100. #  选择进度查看的窗体
  101. #==============================================================================

  102. class Progress<Window_Selectable
  103.   #--------------------------------------------------------------------------
  104.   # ● 初始化
  105.   #--------------------------------------------------------------------------
  106.   
  107.   def initialize
  108.     super(0,0,544,200)
  109.     @item_max = $MaxIndex  
  110.     @column_max = 2
  111.     @row_max=$MaxIndex / 2 +1
  112.     self.index = 0
  113.     refresh
  114.   end
  115.   #--------------------------------------------------------------------------
  116.   # ● 请无视
  117.   #--------------------------------------------------------------------------
  118.    
  119.   def getindex
  120.     return @index
  121.   end
  122.   
  123.   #--------------------------------------------------------------------------
  124.   # ● 刷新
  125.   #--------------------------------------------------------------------------
  126.   
  127.   def refresh
  128.     $s=@index
  129.     self.contents.clear  
  130.     self.contents.font.size = 20
  131.     self.contents.font.name = "微软雅黑"
  132.     for i in $ConIndex..$ConIndex+7
  133.       xx=(i-$ConIndex) % 2 * 257+30
  134.       yy=((i-$ConIndex) / 2 ).to_i*30+20
  135.       if i<=$game_variables[$UseIndex] then
  136.           self.contents.draw_text(xx,yy,250,30,$ChapNa)
  137.         else
  138.           if i<$MaxIndex then
  139.             self.contents.draw_text(xx,yy,250,30,$Nothing)
  140.           end
  141.       end
  142.     end
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● 更新
  146.   #--------------------------------------------------------------------------
  147.   
  148.   def update
  149.     super
  150.   end
  151.   #--------------------------------------------------------------------------
  152.   # ● 更新指针
  153.   #--------------------------------------------------------------------------
  154.    
  155.   def update_cursor
  156.     $ConIndex+=2 if @index-$ConIndex>=8
  157.     $ConIndex-=2 if @index-$ConIndex<=-1
  158.     i= @index-$ConIndex
  159.     xxx=i % 2 * 257+20
  160.     yyy=(i / 2).to_i*30+20
  161.     self.cursor_rect.set(xxx,yyy,230,30)
  162.   end
  163. end
  164. #==============================================================================
  165. # ■ ProgressInf
  166. #------------------------------------------------------------------------------
  167. #  进度的具体内容显示
  168. #==============================================================================

  169. class ProgressInf<Window_Base
  170.   def initialize
  171.     super(0,201,544,150)
  172.     refresh(0)
  173.   end
  174.   
  175.   #--------------------------------------------------------------------------
  176.   # ● 刷新(参数请无视)
  177.   #--------------------------------------------------------------------------
  178.   
  179.   def refresh (ab)
  180.     self.contents.clear
  181.     self.contents.font.size = 20
  182.     self.contents.font.name = "微软雅黑"
  183.     if ab<=$game_variables[$UseIndex] then
  184.       for i in 0..2
  185.         self.contents.draw_text(20,20+contents.text_size($InfoMa[ab]).height*i,494,contents.text_size($InfoMa[ab]).height,$InfoMa[ab])
  186.       end
  187.     else
  188.       self.contents.draw_text(20,20,494,30,$Nothing2)
  189.     end
  190.   end
  191.   #--------------------------------------------------------------------------
  192.   # ● 更新
  193.   #--------------------------------------------------------------------------
  194.      
  195.   def update
  196.     super
  197.     refresh($s)
  198.   end
  199.   
  200. end

  201. #==============================================================================
  202. # ■ ProgressInf2
  203. #------------------------------------------------------------------------------
  204. #  『脚本内容』显示
  205. #==============================================================================

  206. class ProgressInf2<Window_Base

  207.   #--------------------------------------------------------------------------
  208.   # ● 初始化
  209.   #--------------------------------------------------------------------------
  210.   
  211.   
  212.   def initialize
  213.     super(0,352,544,64)
  214.     refresh
  215.   end

  216.   #--------------------------------------------------------------------------
  217.   # ● 刷新
  218.   #--------------------------------------------------------------------------
  219.   
  220.   def refresh
  221.     self.contents.font.size = 20 #字体大小
  222.     self.contents.font.name = "微软雅黑"
  223.     self.contents.draw_text(227,5,504,24,"游戏进度")
  224.   end
  225.   
  226.   #--------------------------------------------------------------------------
  227.   # ● 更新
  228.   #--------------------------------------------------------------------------
  229.    
  230.   def update
  231.     super #调用父类中的方法
  232.     refresh
  233.   end
  234.   
  235. end
复制代码

Lv2.观梦者

天仙

梦石
0
星屑
615
在线时间
184 小时
注册时间
2008-4-15
帖子
5023

贵宾

2
发表于 2010-12-19 22:35:39 | 只看该作者
1. 第139行 self.contents.draw_text(xx,yy,250,30,$ChapNa)
改成
self.contents.draw_text(xx,yy,250,30,$ChapNa[i])

2. 第189行 self.contents.draw_text(20,20+contents.text_size($InfoMa[ab]).height*i,494,contents.text_size($InfoMa[ab]).height,$InfoMa[ab])
改成
self.contents.draw_text(20,20+contents.text_size($InfoMa[i]).height*i,494,contents.text_size($InfoMa[i]).height,$InfoMa[i])
VA脚本开工中...
偷窃脚本1.0 - 已完成
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
310
在线时间
11 小时
注册时间
2010-11-29
帖子
4
3
 楼主| 发表于 2010-12-20 13:20:15 | 只看该作者
谢谢了~
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-24 02:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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