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

Project1

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

[已经过期] 脚本错误

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
163 小时
注册时间
2012-1-15
帖子
67
跳转到指定楼层
1
发表于 2014-2-18 15:21:29 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 fux2 于 2014-2-20 16:46 编辑

帮看一下这里怎么会这样的,是不是还缺少一个脚本呀{:2_271:}
  1. # ● 初始画对像
  2.   #     x      : 窗口的 X 坐标
  3.   #     y      : 窗口的 Y 坐标
  4.   #     width  : 窗口的宽
  5.   #     height : 窗口的高
  6.   #     css    : 窗口样式
  7.   #--------------------------------------------------------------------------
  8.   def initialize(x, y, width, height, css = "")
  9.     super(x, y, width, height,css)
  10.     @item_max = 1
  11.     @column_max = 1
  12.     [url=home.php?mod=space&uid=370741]@Index[/url] = -1
  13.   end
  14.   #--------------------------------------------------------------------------
  15.   # ● 设置光标的位置
  16.   #     index : 新的光标位置
  17.   #--------------------------------------------------------------------------
  18.   def index=(index)
  19.     @index = index
  20.     # 刷新帮助文本 (update_help 定义了继承目标)
  21.     if self.active and @help_window != nil
  22.       update_help
  23.     end
  24.     # 刷新光标矩形
  25.     update_cursor_rect
  26.   end
  27.   #--------------------------------------------------------------------------
  28.   # ● 获取行数
  29.   #--------------------------------------------------------------------------
  30.   def row_max
  31.     # 由项目数和列数计算出行数
  32.     return (@item_max + @column_max - 1) / @column_max
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # ● 获取开头行
  36.   #--------------------------------------------------------------------------
  37.   def top_row
  38.     # 将窗口内容的传送源 Y 坐标、1 行的高 32 等分
  39.     return self.oy / 80
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ● 设置开头行
  43.   #     row : 显示开头的行
  44.   #--------------------------------------------------------------------------
  45.   def top_row=(row)
  46.     # row 未满 0 的场合更正为 0
  47.     if row < 0
  48.       row = 0
  49.     end
  50.     # row 超过 row_max - 1 的情况下更正为 row_max - 1
  51.     if row > row_max - 1
  52.       row = row_max - 1
  53.     end
  54.     # row 1 行高的 32 倍、窗口内容的传送源 Y 坐标
  55.     self.oy = row * 80
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   # ● 获取 1 页可以显示的行数
  59.   #--------------------------------------------------------------------------
  60.   def page_row_max
  61.     # 窗口的高度,设置画面的高度减去 32 ,除以 1 行的高度 32
  62.     return (self.height - 32) / 80
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # ● 获取 1 页可以显示的项目数
  66.   #--------------------------------------------------------------------------
  67.   def page_item_max
  68.     # 将行数 page_row_max 乘上列数 @column_max
  69.     return page_row_max * @column_max
  70.   end
  71.   #--------------------------------------------------------------------------
  72.   # ● 帮助窗口的设置
  73.   #     help_window : 新的帮助窗口
  74.   #--------------------------------------------------------------------------
  75.   def help_window=(help_window)
  76.     @help_window = help_window
  77.     # 刷新帮助文本 (update_help 定义了继承目标)
  78.     if self.active and @help_window != nil
  79.       update_help
  80.     end
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   # ● 更新光标举行
  84.   #--------------------------------------------------------------------------
  85.   def update_cursor_rect
  86.     # 光标位置不满 0 的情况下
  87.     if @index < 0
  88.       self.cursor_rect.empty
  89.       return
  90.     end
  91.     # 获取当前的行
  92.     row = @index / @column_max
  93.     # 当前行被显示开头行前面的情况下
  94.     if row < self.top_row
  95.       # 从当前行向开头行滚动
  96.       self.top_row = row
  97.     end
  98.     # 当前行被显示末尾行之后的情况下
  99.     if row > self.top_row + (self.page_row_max - 1)
  100.       # 从当前行向末尾滚动
  101.       self.top_row = row - (self.page_row_max - 1)
  102.     end
  103.     # 计算光标的宽
  104.     cursor_width = 80
  105.     # 计算光标坐标
  106.     x = 1 + @index % @column_max * (cursor_width)
  107.     y = 1 + @index / @column_max * 80
  108.     # 更新国标矩形
  109.     self.cursor_rect.set(x, y, cursor_width, 80)
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # ● 刷新画面
  113.   #--------------------------------------------------------------------------
  114.   def update
  115.     super
  116.     # 可以移动光标的情况下
  117.     if self.active and @index >= 0
  118.       # 方向键下被按下的情况下
  119.       if Input.repeat?(Input::DOWN)
  120.         # 列数不是 1 并且方向键的下的按下状态不是重复的情况、
  121.         # 或光标位置在(项目数-列数)之前的情况下
  122.         if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  123.            @index < @item_max - @column_max
  124.           # 光标向下移动
  125.           $game_system.se_play($data_system.cursor_se)
  126.           @index = (@index + @column_max) % @item_max
  127.         end
  128.       end
  129.       # 方向键上被按下的情况下
  130.       if Input.repeat?(Input::UP)
  131.         # 列数不是 1 并且方向键的下的按下状态不是重复的情况、
  132.         # 或光标位置在列之后的情况下
  133.         if (@column_max == 1 and Input.trigger?(Input::UP)) or
  134.            @index >= @column_max
  135.           # 光标向上移动
  136.           $game_system.se_play($data_system.cursor_se)
  137.           @index = (@index - @column_max + @item_max) % @item_max
  138.         end
  139.       end
  140.       # 方向键右被按下的情况下
  141.       if Input.repeat?(Input::RIGHT)
  142.         # 列数为 2 以上并且、光标位置在(项目数 - 1)之前的情况下
  143.         if @column_max >= 2 and @index < @item_max - 1
  144.           # 光标向右移动
  145.           $game_system.se_play($data_system.cursor_se)
  146.           @index += 1
  147.         end
  148.       end
  149.       # 方向键左被按下的情况下
  150.       if Input.repeat?(Input::LEFT)
  151.         # 列数为 2 以上并且、光标位置在 0 之后的情况下
  152.         if @column_max >= 2 and @index > 0
  153.           # 光标向左移动
  154.           $game_system.se_play($data_system.cursor_se)
  155.           @index -= 1
  156.         end
  157.       end
  158.       # R 键被按下的情况下
  159.       if Input.repeat?(Input::R)
  160.         # 显示的最后行在数据中最后行上方的情况下
  161.         if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  162.           # 光标向后移动一页
  163.           $game_system.se_play($data_system.cursor_se)
  164.           @index = [@index + self.page_item_max, @item_max - 1].min
  165.           self.top_row += self.page_row_max
  166.         end
  167.       end
  168.       # L 键被按下的情况下
  169.       if Input.repeat?(Input::L)
  170.         # 显示的开头行在位置 0 之后的情况下
  171.         if self.top_row > 0
  172.           # 光标向前移动一页
  173.           $game_system.se_play($data_system.cursor_se)
  174.           @index = [@index - self.page_item_max, 0].max
  175.           self.top_row -= self.page_row_max
  176.         end
  177.       end
  178.     end
  179.      if self.active and @help_window != nil
  180.       update_help
  181.      end
  182.     # 刷新光标矩形
  183.     update_cursor_rect
  184.    if self.active and @item_max > 0
  185.       index_var = @index
  186.       tp_index = @index
  187.       mouse_x, mouse_y = Mouse.get_mouse_pos
  188.       mouse_not_in_rect = true
  189.       for i in 0...@item_max
  190.         @index = i
  191.         update_cursor_rect
  192.         top_x = self.cursor_rect.x + self.x + 16
  193.         top_y = self.cursor_rect.y + self.y + 16
  194.         bottom_x = top_x + self.cursor_rect.width
  195.         bottom_y = top_y + self.cursor_rect.height
  196.         if (mouse_x > top_x) and (mouse_y > top_y) and
  197.         (mouse_x < bottom_x) and (mouse_y < bottom_y)
  198.           mouse_not_in_rect = false
  199.           if tp_index != @index
  200.             $game_system.se_stop
  201.             tp_index = @index
  202.             $game_system.se_play($data_system.cursor_se)
  203.           end
  204.           break
  205.         end
  206.       end
  207.       if mouse_not_in_rect
  208.         @index = index_var
  209.         update_cursor_rect
  210.         Mouse.click_lock
  211.       else
  212.         Mouse.click_unlock               
  213.       end
  214.     end
  215.   end
  216. end


  217. class Window_Renwu < Window_Renwu_Selectable
  218.   #--------------------------------------------------------------------------
  219.   # ● 初始化对像
  220.   #     actor : 角色
  221.   #--------------------------------------------------------------------------
  222.   def initialize(actor)
  223.     super(242, 35, 336, 256)
  224.     self.opacity = 0
  225.     [url=home.php?mod=space&uid=95897]@actor[/url] = actor
  226.     @column_max = 4
  227.     @item_max = 0
  228.     self.index = 0
  229.     refresh
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● 刷新
  233.   #--------------------------------------------------------------------------
  234.   def refresh
  235.     if self.contents != nil
  236.       self.contents.dispose
  237.       self.contents = nil
  238.     end
  239.     @data = [0,1,2,3,4,5,6,7,8,9,10,11]
  240.     for @actor in [email protected]
  241.     @item_max = @data.size
  242.     self.index = @actor
  243.     return @data[self.index]
  244.     end
  245.     if @item_max > 0
  246.       self.contents = Bitmap.new(width - 32, row_max * 80 + 32)
  247.     end
  248.   end

  249. end


  250. class Window_Renjian < Window_Baby_Selectable
  251.   
  252.   def initialize(x, y, width, height, commands, x_jiange = 0, y_jiange=14)
  253.     super(x,y, width, height)
  254.     self.opacity = 0
  255.     @item_max = commands.size
  256.     @commands = commands
  257.     @x_jiange = x_jiange
  258.     @y_jiange = y_jiange
  259.     self.contents = Bitmap.new(width,height)
  260.     refresh
  261.   end
  262.   #--------------------------------------------------------------------------
  263.   # ● 刷新
  264.   #--------------------------------------------------------------------------
  265.   def refresh
  266.     self.contents.clear
  267.     for i in 0...@item_max
  268.       draw_name(i)
  269.     end
  270.   end
  271.   #--------------------------------------------------------------------------
  272.   # ● 描绘项目
  273.   #     index : 项目编号
  274.   #     color : 文字色
  275.   #--------------------------------------------------------------------------
  276.   def draw_name(index)
  277.     self.contents.font.name = "宋体"
  278.     self.contents.font.size = 13
  279.     w = (self.contents.width - 32) / @column_max - @column_max * @x_jiange
  280.     h = (self.contents.height- 32) / @item_max - @column_max * @y_jiange
  281.     x = index % @column_max *w  + @x_jiange
  282.     y = index / @column_max *h + @y_jiange
  283.     self.contents.draw_text(x, y, w, h, @commands[index],0)
  284.   end
  285.   #--------------------------------------------------------------------------
  286.   # ● 项目无效化
  287.   #     index : 项目编号
  288.   #--------------------------------------------------------------------------
  289.   def disable_item(index)
  290.     draw_item(index, disabled_color)
  291.   end
  292. end

  293. class Window_Jianren < Window_Base
  294.   attr_accessor :actor
  295.   
  296.   def initialize
  297.     super(0,0,640,480)
  298.     self.contents = Bitmap.new(width - 32, height - 32)
  299.     self.opacity = 0
  300.     [url=home.php?mod=space&uid=114926]@sprite[/url] = Sprite.new
  301.     @sprite.x = 232
  302.     @sprite.y = 354
  303.     @sprite2 = Sprite.new
  304.     @sprite2.x = 21
  305.     @sprite2.y = 20
  306.     @actor = actor
  307.     refresh
  308.   end
  309.   
  310.   def dispose
  311.     if @sprite.bitmap != nil
  312.       @sprite.bitmap.dispose
  313.     end
  314.     if @sprite2.bitmap != nil
  315.       @sprite2.bitmap.dispose
  316.     end
  317.   end
  318.   
  319.   def refresh
  320.     self.contents.clear
  321.     case @actor
  322.     when 0
  323.     @sprite.bitmap = Bitmap.new
  324.     @sprite2.bitmap = Bitmap.new
  325.     when 1
  326.     @sprite.bitmap = Bitmap.new
  327.     @sprite2.bitmap = Bitmap.new
  328.     when 2
  329.     @sprite.bitmap = Bitmap.new
  330.     @sprite2.bitmap = Bitmap.new
  331.     when 3
  332.     @sprite.bitmap = Bitmap.new
  333.     @sprite2.bitmap = Bitmap.new
  334.     when 4
  335.     @sprite.bitmap = Bitmap.new
  336.     @sprite2.bitmap = Bitmap.new
  337.     when 5
  338.     @sprite.bitmap = Bitmap.new
  339.     @sprite2.bitmap = Bitmap.new
  340.     when 6
  341.     @sprite.bitmap = Bitmap.new
  342.     @sprite2.bitmap = Bitmap.new
  343.     when 7
  344.     @sprite.bitmap = Bitmap.new
  345.     @sprite2.bitmap = Bitmap.new
  346.     when 8
  347.     @sprite.bitmap = Bitmap.new
  348.     @sprite2.bitmap = Bitmap.new
  349.     when 9
  350.     @sprite.bitmap = Bitmap.new
  351.     @sprite2.bitmap = Bitmap.new
  352.     when 10
  353.     @sprite.bitmap = Bitmap.new
  354.     @sprite2.bitmap = Bitmap.new
  355.     when 11
  356.     @sprite.bitmap = Bitmap.new
  357.     @sprite2.bitmap = Bitmap.new
  358.     end
  359.   end
  360.    
  361. end

  362. class Mingshuo < Window_Base
  363.   
  364.   def initialize
  365.     super(225,289,374,72)
  366.     self.contents = Bitmap.new(width - 32, height - 32)
  367.     self.opacity = 0
  368.     self.contents.font.name = "黑体"
  369.     self.contents.font.color = text_color(6)
  370.     self.contents.font.size = 25
  371.   end
  372.   def refresh(shuoming = "")
  373.     self.contents.clear
  374.     self.contents.draw_text(0,0,300,40,shuoming,1)
  375.   end
  376. end



  377. class Scene_Cjrw

  378.   def initialize(index=0)
  379.     @index = index
  380.   end

  381.   def main
  382.     # 获取角色
  383.     @window_moren = Window_Base.new(0,231,450,50)
  384.     @window_moren.contents = Bitmap.new(400,118)
  385.     @window_moren.opacity = 0
  386.     @window_moren.active = false
  387.     [url=home.php?mod=space&uid=81523]@skin[/url] = Sprite.new
  388.     @skin.bitmap = RPG::Cache.windowskin
  389.     @window2_skin = Sprite.new
  390.     @window2_skin.bitmap = RPG::Cache.windowskin
  391.     @window2_skin.x = 54
  392.     @window2_skin.y = 369
  393.     @window2_command = Window_Base.new(57,362,100,60)
  394.     @window2_command.contents = Bitmap.new(68,28)
  395.     @window2_command.opacity = 0
  396.     @window2_command.active = false
  397.     @v = Viewport.new(0,313,220,29)
  398.     @v.color.set(0,0,0,0)
  399.     $game_temp.name_max_char = 6
  400.    
  401. @tf = Type_Field.new($game_temp.name_max_char*3-4)--这里出现错误
  402.       
  403.       
  404.       
  405.     @window_ren = Window_Renwu.new(@index)
  406.     @window_ren.index = @index
  407.     @window_ren.active = true
  408.     [url=home.php?mod=space&uid=37298]@Window[/url] = Window_Jianren.new
  409.     s1 = ""
  410.     s2 = ""
  411.     @command = Window_Renjian.new(507,338,142,128,[s1,s2])
  412.     @command.index = -1
  413.     @command.active = false
  414.     @shuoming = Mingshuo.new
  415.         
  416.     # 执行过渡
  417.     Graphics.transition
  418.     # 主循环
  419.     loop do
  420.       # 刷新游戏画面
  421.       Graphics.update
  422.       # 刷新输入信息
  423.       Input.update
  424.       # 刷新信息
  425.       update
  426.       # 如果画面切换就中断循环
  427.       if $scene != self
  428.         break
  429.       end
  430.     end
  431.     # 准备过渡
  432.     Graphics.freeze
  433.     # 释放窗口
  434.     @window_moren.dispose
  435.     @skin.dispose
  436.     @window2_command.dispose
  437.     @window_ren.dispose
  438.     @command.dispose
  439.     @shuoming.dispose
  440.     @tf.dispose
  441.     @window.dispose
  442.     @window2_skin.dispose
  443.     @v.dispose
  444.   end
  445.   #--------------------------------------------------------------------------
  446.   # ● 刷新画面
  447.   #--------------------------------------------------------------------------
  448.   def update
  449.     # 刷新窗口
  450.     @window_moren.update
  451.     @window2_command.update
  452.     @window_ren.update
  453.     @command.update
  454.     @window.update
  455.       if @window_ren.active == true
  456.         @shuoming.refresh("现在请选择人物")
  457.          case @window_ren.index
  458.          when 0
  459.           @window.actor = 0
  460.           @window.refresh
  461.          when 1
  462.           @window.actor = 1
  463.           @window.refresh
  464.          when 2
  465.           @window.actor = 2
  466.           @window.refresh
  467.          when 3
  468.           @window.actor = 3
  469.           @window.refresh
  470.          when 4
  471.           @window.actor = 4
  472.           @window.refresh
  473.          when 5
  474.           @window.actor = 5
  475.           @window.refresh
  476.          when 6
  477.           @window.actor = 6
  478.           @window.refresh
  479.          when 7
  480.           @window.actor = 7
  481.           @window.refresh
  482.          when 8
  483.           @window.actor = 8
  484.           @window.refresh
  485.          when 9
  486.           @window.actor = 9
  487.           @window.refresh
  488.          when 10
  489.           @window.actor = 10
  490.           @window.refresh
  491.          when 11
  492.           @window.actor = 11
  493.           @window.refresh
  494.          end
  495.         if Input.trigger?(Input::C)
  496.           case @window_ren.index
  497.           when 0
  498.           k = $game_party.actors[0]
  499.           if k.id == 9
  500.           $game_system.se_play($data_system.decision_se)
  501.           @window_ren.active = false
  502.           @window_ren.index = -1
  503.           @window_moren.active = true
  504.           else
  505.           $game_system.se_play($data_system.decision_se)
  506.           $game_party.add_actor(9)
  507.           $game_party.remove_actor(k.id)
  508.           $game_player.refresh
  509.           @window_ren.active = false
  510.           @window_ren.index = -1
  511.           @window_moren.active = true
  512.           end
  513.           when 1
  514.           k = $game_party.actors[0]
  515.           if k.id == 10
  516.           $game_system.se_play($data_system.decision_se)
  517.           @window_ren.active = false
  518.           @window_ren.index = -1
  519.           @window_moren.active = true
  520.           else
  521.           $game_system.se_play($data_system.decision_se)
  522.           $game_party.add_actor(10)
  523.           $game_party.remove_actor(k.id)
  524.           $game_player.refresh
  525.           @window_ren.active = false
  526.           @window_ren.index = -1
  527.           @window_moren.active = true
  528.           end
  529.           when 2
  530.           k = $game_party.actors[0]
  531.           if k.id == 11
  532.           $game_system.se_play($data_system.decision_se)
  533.           @window_ren.active = false
  534.           @window_ren.index = -1
  535.           @window_moren.active = true
  536.           else
  537.           $game_system.se_play($data_system.decision_se)
  538.           $game_party.add_actor(11)
  539.           $game_party.remove_actor(k.id)
  540.           $game_player.refresh
  541.           @window_ren.active = false
  542.           @window_ren.index = -1
  543.           @window_moren.active = true
  544.           end
  545.           when 3
  546.           k = $game_party.actors[0]
  547.           if k.id == 12
  548.           $game_system.se_play($data_system.decision_se)
  549.           @window_ren.active = false
  550.           @window_ren.index = -1
  551.           @window_moren.active = true
  552.           else
  553.           $game_system.se_play($data_system.decision_se)
  554.           $game_party.add_actor(12)
  555.           $game_party.remove_actor(k.id)
  556.           $game_player.refresh
  557.           @window_ren.active = false
  558.           @window_ren.index = -1
  559.           @window_moren.active = true
  560.           end
  561.           when 4
  562.           k = $game_party.actors[0]
  563.           if k.id == 13
  564.           $game_system.se_play($data_system.decision_se)
  565.           @window_ren.active = false
  566.           @window_ren.index = -1
  567.           @window_moren.active = true
  568.           else
  569.           $game_system.se_play($data_system.decision_se)
  570.           $game_party.add_actor(13)
  571.           $game_party.remove_actor(k.id)
  572.           $game_player.refresh
  573.           @window_ren.active = false
  574.           @window_ren.index = -1
  575.           @window_moren.active = true
  576.           end
  577.           when 5
  578.           k = $game_party.actors[0]
  579.           if k.id == 14
  580.           $game_system.se_play($data_system.decision_se)
  581.           @window_ren.active = false
  582.           @window_ren.index = -1
  583.           @window_moren.active = true
  584.           else
  585.           $game_system.se_play($data_system.decision_se)
  586.           $game_party.add_actor(14)
  587.           $game_party.remove_actor(k.id)
  588.           $game_player.refresh
  589.           @window_ren.active = false
  590.           @window_ren.index = -1
  591.           @window_moren.active = true
  592.           end
  593.           when 6
  594.           k = $game_party.actors[0]
  595.           if k.id == 15
  596.           $game_system.se_play($data_system.decision_se)
  597.           @window_ren.active = false
  598.           @window_ren.index = -1
  599.           @window_moren.active = true
  600.           else
  601.           $game_system.se_play($data_system.decision_se)
  602.           $game_party.add_actor(15)
  603.           $game_party.remove_actor(k.id)
  604.           $game_player.refresh
  605.           @window_ren.active = false
  606.           @window_ren.index = -1
  607.           @window_moren.active = true
  608.           end
  609.           when 7
  610.           k = $game_party.actors[0]
  611.           if k.id == 16
  612.           $game_system.se_play($data_system.decision_se)
  613.           @window_ren.active = false
  614.           @window_ren.index = -1
  615.           @window_moren.active = true
  616.           else
  617.           $game_system.se_play($data_system.decision_se)
  618.           $game_party.add_actor(16)
  619.           $game_party.remove_actor(k.id)
  620.           $game_player.refresh
  621.           @window_ren.active = false
  622.           @window_ren.index = -1
  623.           @window_moren.active = true
  624.           end
  625.           when 8
  626.           k = $game_party.actors[0]
  627.           if k.id == 17
  628.           $game_system.se_play($data_system.decision_se)
  629.           @window_ren.active = false
  630.           @window_ren.index = -1
  631.           @window_moren.active = true
  632.           else
  633.           $game_system.se_play($data_system.decision_se)
  634.           $game_party.add_actor(17)
  635.           $game_party.remove_actor(k.id)
  636.           $game_player.refresh
  637.           @window_ren.active = false
  638.           @window_ren.index = -1
  639.           @window_moren.active = true
  640.           end
  641.           when 9
  642.           k = $game_party.actors[0]
  643.           if k.id == 18
  644.           $game_system.se_play($data_system.decision_se)
  645.           @window_ren.active = false
  646.           @window_ren.index = -1
  647.           @window_moren.active = true
  648.           else
  649.           $game_system.se_play($data_system.decision_se)
  650.           $game_party.add_actor(18)
  651.           $game_party.remove_actor(k.id)
  652.           $game_player.refresh
  653.           @window_ren.active = false
  654.           @window_ren.index = -1
  655.           @window_moren.active = true
  656.           end
  657.           when 10
  658.           k = $game_party.actors[0]
  659.           if k.id == 19
  660.           $game_system.se_play($data_system.decision_se)
  661.           @window_ren.active = false
  662.           @window_ren.index = -1
  663.           @window_moren.active = true
  664.           else
  665.           $game_system.se_play($data_system.decision_se)
  666.           $game_party.add_actor(19)
  667.           $game_party.remove_actor(k.id)
  668.           $game_player.refresh
  669.           @window_ren.active = false
  670.           @window_ren.index = -1
  671.           @window_moren.active = true
  672.           end
  673.           when 11
  674.           k = $game_party.actors[0]
  675.           if k.id == 20
  676.           $game_system.se_play($data_system.decision_se)
  677.           @window_ren.active = false
  678.           @window_ren.index = -1
  679.           @window_moren.active = true
  680.           else
  681.           $game_system.se_play($data_system.decision_se)
  682.           $game_party.add_actor(20)
  683.           $game_party.remove_actor(k.id)
  684.           $game_player.refresh
  685.           @window_ren.active = false
  686.           @window_ren.index = -1
  687.           @window_moren.active = true
  688.           end
  689.           end
  690.         end
  691.       if Input.trigger?(Input::B)
  692.        $game_system.se_play($data_system.cancel_se)
  693.          $scene = Scene_Title.new
  694.         return
  695.       end
  696.     end
  697.       
  698.     if @window2_command.active == true
  699.        @shuoming.refresh("现在请输入名字")
  700.        @window2_skin.bitmap = RPG::Cache.windowskin("创建2")
  701.        @window2_skin.x = 54
  702.        @window2_skin.y = 369
  703.        @window2_command.cursor_rect.set(0, 0, 68, 28)
  704.      if Input.trigger?(Input::C)
  705.         if @tf.get_text != ""
  706.         $game_actors[$game_party.actors[0].id].name = @tf.get_text
  707.         $game_system.se_play($data_system.decision_se)
  708.         @command.active = true
  709.         @window2_command.active = false
  710.         @window2_command.cursor_rect.set(0, 0, 0, 0)
  711.         @window2_skin.bitmap = RPG::Cache.windowskin("创建1")
  712.         @window2_skin.x = 54
  713.         @window2_skin.y = 369
  714.         else
  715.         $game_system.se_play($data_system.buzzer_se)
  716.         end
  717.     end
  718.       if Input.trigger?(Input::UP)
  719.         @window2_command.active = false
  720.         @window2_skin.bitmap = RPG::Cache.windowskin("创建1")
  721.         @window2_skin.x = 54
  722.         @window2_skin.y = 369
  723.         @window_moren.active = true
  724.         @tf.active = true
  725.         @window2_command.cursor_rect.set(0, 0, 0, 0)
  726.        end
  727.       mouse_x, mouse_y = Mouse.get_mouse_pos
  728.       if mouse_x > 70 and mouse_x < 178 and mouse_y > 313 and mouse_y < 339
  729.        @window2_command.active = false
  730.        @window2_skin.bitmap = RPG::Cache.windowskin("创建1")
  731.        @window2_skin.x = 54
  732.        @window2_skin.y = 369
  733.        @window_moren.active = true
  734.        @tf.active = true
  735.        @window2_command.cursor_rect.set(0, 0, 0, 0)
  736.        end
  737.     if Input.trigger?(Input::B)
  738.        $game_system.se_play($data_system.cancel_se)
  739.        @window_ren.active = true
  740.        @window_moren.active = false
  741.        @window2_command.active = false
  742.        @window2_command.cursor_rect.set(0, 0, 0, 0)
  743.     end
  744.   end
  745.    
  746.    if @window_moren.active == true
  747.      @shuoming.refresh("现在请输入名字")
  748.      @window_moren.cursor_rect.set(180, 65, 200, 30)
  749.      @tf.update
  750.      if Input.trigger?(Input::DOWN)
  751.        @window2_command.active = true
  752.        @window_moren.active = false
  753.        @tf.active = false
  754.        @tf.update
  755.        @window_moren.cursor_rect.set(0, 0, 0, 0)
  756.      end
  757.       mouse_x, mouse_y = Mouse.get_mouse_pos
  758.      if mouse_x > 70 and mouse_x < 160 and mouse_y > 378 and mouse_y < 431
  759.        @window2_command.active = true
  760.        @window_moren.active = false
  761.        @tf.active = false
  762.        @tf.update
  763.        @window_moren.cursor_rect.set(0, 0, 0, 0)
  764.      end
  765.      if Input.trigger?(Input::B)
  766.        $game_system.se_play($data_system.cancel_se)
  767.        @window_ren.active = true
  768.        @window_moren.active = false
  769.        @window2_command.active = false
  770.        @window_moren.cursor_rect.set(0, 0, 0, 0)
  771.     end
  772.    end
  773. end  
复制代码

Lv1.梦旅人

梦石
0
星屑
75
在线时间
241 小时
注册时间
2013-3-28
帖子
67
2
发表于 2014-2-18 17:07:53 | 只看该作者
本帖最后由 你欠抽吧 于 2014-2-18 19:59 编辑

Type_Field没初始化
这个像是输入文本用的- -
看起来像是LZ没有把整个和这段有关的脚本都复制下来
到找到这段脚本的地方再找找看有没有和Type_Field有关的东西

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1358
在线时间
1295 小时
注册时间
2012-8-4
帖子
749
3
发表于 2014-2-19 13:11:05 | 只看该作者
复制你的脚本以后错误的地方提示挺多,希望能切换到高级回复模式,使用代码功能,重新复制脚本。或者把相关脚本弄到一个新工程里发上来。
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-30 15:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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