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

Project1

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

[已经过期] 请大神帮忙看看这两个脚本冲突

[复制链接]

Lv2.观梦者

秀才

梦石
0
星屑
587
在线时间
156 小时
注册时间
2008-7-23
帖子
290

贵宾

跳转到指定楼层
1
发表于 2013-6-22 17:12:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
一个是后知后觉的银行系统,另一个是电影模式脚本,这两个放一起后事件中的银行不会增加利息,求大神解决
  1. #==============================================================================
  2. # ● 银行系统 v1.2  by 后知后觉
  3. #==============================================================================
  4. =begin
  5.   说明书:
  6.       用 $scene = Scene_Bank.new 进入银行信息界面
  7.       然后在下面设置好对应的变量编号
  8.       用 $game_system.bank 可以获取到存入的本钱
  9.       用到这句的人应该不多。      
  10.       建立了多个数据库变量,可以用这些东西更加方便灵活的控制这个系统
  11.       这个是用行走步数来进行的判断
  12.       利用1个开关和1个变量来共同对刷钱行为进行控制
  13.       计算公式很简单:
  14.           增长值=本钱*利息-本钱 (结果小于0,就是负增长→亏钱)
  15.           现有积蓄+增长值=最后的积蓄(显示在窗口上的那个)
  16.       如果想对公式进行修改,主要在下面的Scene_Map里
  17.       和脚本最后的有注释的地方
  18.       如果想加入第2+n的货币、显示银行服务员画像等个性设置
  19.       那就只有你自己动动手了=v= 喵~!很简单哦~~~!
  20.   冲突可能:
  21.            基本上没有
  22. =end

  23. BANK_SWITCHES = 12  #银行系统的开关编号 打开时有效
  24.             #本开关只针对地图上的数据处理
  25.             #在某些地图开启、在某些地图关闭可以达到某种限制刷钱的效果

  26. GAIN_STEPS = 10      #接受走多少步涨一次积蓄的变量编号

  27. JIXU_VARIABLE = 11  #接受储存积蓄的变量编号
  28. LIXI_VARIABLE = 12  #接受利息的变量编号
  29.          #利息是浮点数的话、请用脚本语句进行赋值
  30.          #并且不推荐用+-*/法来对浮点数利息进行运算,
  31.          #最好用 = 直接赋值,
  32.          #就像这样 $game_variables[编号] = 数值

  33. BASE_MONEY = 13     #存钱的最低限制的变量编号
  34. BASE_MONEY_2 = 14   #取钱的最低数额的变量编号
  35.                 #以上2个不想用的话就把该变量的值赋为0


  36. BATTLE_VAR_1 = 15   #战斗胜利值的变量编号
  37. BATTLE_VAR_2 = 16   #限制值的变量编号
  38.     #当1小于2的时候 每次增加积蓄时1会加1 如果1等于2
  39.     #则不会增长积蓄 每次战斗胜利1会减1
  40.     #游戏里适当的时候把1清零一下是必要的~~或直接在脚本里添加
  41.     #如果不想要这功能 就把2设置为很大很大


  42. XIANJIN_FONT = "  现金  "        #其他的字符串可以用搜索功能
  43. JIXU_FONT = "  积蓄  "           #直接搜索到然后进行修改
  44. LIXI_FONT = "  利息  "           #主要说的是播放冻结SE是偶的
  45. CUNQIAN_FONT = "存入现金"        #提示窗口。
  46. QVQIAN_FONT = "取回积蓄"
  47. TUICHU_FONT = "离开银行"



  48. class Scene_Map
  49.   def initialize
  50.     #这个@bs是用来防止刷钱的
  51.     @bs = $game_party.steps
  52.   end
  53.   alias houzhihoujue_update update
  54.   def update
  55.     houzhihoujue_update
  56.     if $game_switches[BANK_SWITCHES] == true
  57.       bushu = $game_party.steps
  58.       # 存入银行的本钱
  59.       gold = $game_system.bank
  60.       # 代入利息变量
  61.       lixi = $game_variables[LIXI_VARIABLE]
  62.       # 增加的金额
  63.       gain = gold * lixi - gold
  64.       if @bs < bushu
  65.         if bushu % $game_variables[GAIN_STEPS] == 0
  66.           if $game_variables[BATTLE_VAR_1] < $game_variables[BATTLE_VAR_2]
  67.             # 最后的结果
  68.             $game_variables[JIXU_VARIABLE] += gain
  69.             $game_variables[BATTLE_VAR_1] += 1
  70.             # 下面这行可别动哦~
  71.             @bs = bushu
  72.           end
  73.         end
  74.       end
  75.     end
  76.   end
  77. end

  78. class Scene_Battle
  79.   alias hzhj_start_phase5 start_phase5
  80.   def start_phase5
  81.     hzhj_start_phase5
  82.     $game_variables[BATTLE_VAR_1] -= 1
  83.   end
  84. end


  85. class Game_System
  86.   attr_accessor :bank
  87.   alias hzhj_ini initialize
  88.   def initialize
  89.     hzhj_ini
  90.     [url=home.php?mod=space&uid=7863]@bank[/url] = 0
  91.   end
  92. end

  93. class Window_Bank_Message < Window_Base
  94.   def initialize(message = 0)
  95.     super(0, 0, 320, 96)
  96.     self.contents = Bitmap.new(width - 32, height - 32)
  97.     self.x = 160
  98.     self.y = 240 - self.height / 2 + 16
  99.     self.opacity = 255
  100.     self.back_opacity = 255
  101.     self.z = 9995
  102.     @msg = message
  103.     self.visible = true
  104.     refresh(@msg)
  105.   end
  106.   def refresh(msg)
  107.     self.contents.clear
  108.     case msg
  109.     when 0  # 低于存钱限制
  110.       text_1 = "根据现在的市场行情"
  111.       self.contents.font.color = system_color
  112.       self.contents.draw_text(0,0,320-32,32,text_1)
  113.       text_2 = "最低储存数额为"
  114.       self.contents.draw_text(0,32,192+24,32,text_2,2)
  115.       self.contents.font.color = Color.new(255,0,0,255)
  116.       text_3 = $game_variables[BASE_MONEY].to_s
  117.       self.contents.draw_text(192+24,32,96-24,32,text_3)
  118.     when 1  # 低于最低取钱
  119.       text_1 = "根据现在的市场行情"
  120.       self.contents.font.color = system_color
  121.       self.contents.draw_text(0,0,320-32,32,text_1)
  122.       text_2 = "最低取回数额为"
  123.       self.contents.draw_text(0,32,192+24,32,text_2,2)
  124.       self.contents.font.color = Color.new(255,0,0,255)
  125.       text_3 = $game_variables[BASE_MONEY_2].to_s
  126.       self.contents.draw_text(192+24,32,96-24,32,text_3)
  127.     when 2  # 存钱超过身上的钱
  128.       text_1 = "您身上可没那么多哦~~!"
  129.       self.contents.font.color = system_color
  130.       self.contents.draw_text(0,16,320-32,32,text_1,1)
  131.     when 3  # 取钱超过银行里的钱
  132.       text_1 = "有人抢劫啊~~!救命呐~~!"
  133.       self.contents.font.color = system_color
  134.       self.contents.draw_text(0,16,320-32,32,text_1,1)
  135.     end
  136.   end
  137. end


  138. class Window_ShuRu < Window_Selectable
  139.   def initialize
  140.     super(0, 0, 224, 96)
  141.     self.contents = Bitmap.new(width - 32, height - 32)
  142.     self.x = 320 - self.width / 2
  143.     self.y = 240 - self.height / 2 + 16
  144.     @item_max = 8
  145.     @column_max = 8
  146.     refresh
  147.     self.visible = false
  148.     self.active = false
  149.     self.index = 7
  150.     self.opacity = 255
  151.     self.back_opacity = 255
  152.     self.z = 9990
  153.   end
  154.   
  155.   def refresh(s1=0,s2=0,s3=0,s4=0,s5=0,s6=0,s7=0,s8=0)
  156.     @s1 = s1
  157.     @s2 = s2
  158.     @s3 = s3
  159.     @s4 = s4
  160.     @s5 = s5
  161.     @s6 = s6
  162.     @s7 = s7
  163.     @s8= s8
  164.     self.contents.clear
  165.     self.contents.font.color = normal_color
  166.     self.contents.draw_text(4, 0, 96, 32, "输入数值",1)
  167.     self.contents.font.color = system_color
  168.     self.contents.draw_text(0,   32, 24, 32, @s1.to_s, 1)
  169.     self.contents.draw_text(24,  32, 24, 32, @s2.to_s, 1)
  170.     self.contents.draw_text(48,  32, 24, 32, @s3.to_s, 1)
  171.     self.contents.draw_text(72,  32, 24, 32, @s4.to_s, 1)
  172.     self.contents.draw_text(96,  32, 24, 32, @s5.to_s, 1)
  173.     self.contents.draw_text(120, 32, 24, 32, @s6.to_s, 1)
  174.     self.contents.draw_text(144, 32, 24, 32, @s7.to_s, 1)
  175.     self.contents.draw_text(168, 32, 24, 32, @s8.to_s, 1)
  176.   end
  177.   
  178.   def update_cursor_rect
  179.     if @index < 0
  180.       self.cursor_rect.empty
  181.     else
  182.       self.cursor_rect.set(@index*24, 32, 24, 32)
  183.     end
  184.   end
  185. end


  186. class Window_Bank < Window_Selectable
  187.   def initialize
  188.     super(0, 0, 256, 224)
  189.     self.contents = Bitmap.new(width - 32, height - 32)
  190.     self.x = 320 - self.width / 2
  191.     self.y = 240 - self.height / 2
  192.     @item_max = 3
  193.     refresh
  194.     self.index = 0
  195.     self.opacity = 255
  196.     self.back_opacity = 160
  197.     self.z = 5555
  198.   end
  199.   
  200.   def refresh
  201.     self.contents.clear
  202.     self.contents.font.color = normal_color
  203.     self.contents.draw_text(4, 0,  96, 32, XIANJIN_FONT, 1)
  204.     self.contents.draw_text(4, 32, 96, 32, JIXU_FONT, 1)
  205.     self.contents.draw_text(4, 64, 96, 32, LIXI_FONT, 1)
  206.     self.contents.font.color = system_color
  207.     self.contents.draw_text(0,  96, 224, 32, CUNQIAN_FONT, 1)
  208.     self.contents.draw_text(0, 128, 224, 32, QVQIAN_FONT, 1)
  209.     self.contents.draw_text(0, 160, 224, 32, TUICHU_FONT, 1)
  210.     self.contents.draw_text(120, 0,  104, 32, $game_party.gold.to_s, 1)
  211.     self.contents.draw_text(120, 32, 104, 32, $game_variables[JIXU_VARIABLE].to_i.to_s, 1)
  212.     self.contents.draw_text(120, 64, 104, 32, $game_variables[LIXI_VARIABLE].to_s, 1)
  213.   end

  214.   def update_cursor_rect
  215.     if @index < 0
  216.       self.cursor_rect.empty
  217.     else
  218.       self.cursor_rect.set(0, @index*32+96, 224, 32)
  219.     end
  220.   end
  221. end


  222. class Scene_Bank
  223.   def initialize(index = 0, bank_window_index = 0)
  224.     @bank_index = index
  225.     @bank_window_index = bank_window_index
  226.     @s1 = 0
  227.     @s2 = 0
  228.     @s3 = 0
  229.     @s4 = 0
  230.     @s5 = 0
  231.     @s6 = 0
  232.     @s7 = 0
  233.     @s8 = 0
  234.     @s9 = 0
  235.   end
  236.   
  237.   def main
  238.     @shuru_window = Window_ShuRu.new
  239.     @bank_window = Window_Bank.new
  240.     @bank_window.index = @bank_window_index
  241.     @msg_window = Window_Bank_Message.new
  242.     @msg_window.visible = false
  243.     @spriteset = Spriteset_Map.new
  244.     Graphics.transition
  245.     loop do
  246.       Graphics.update
  247.       Input.update
  248.       update
  249.       break if $scene != self
  250.     end
  251.     Graphics.freeze
  252.     @shuru_window.dispose
  253.     @bank_window.dispose
  254.     @msg_window.dispose
  255.     @spriteset.dispose
  256.   end
  257.   
  258.   def update
  259.     @bank_window.update
  260.     @shuru_window.update
  261.     @msg_window.update
  262.     if @msg_window.visible
  263.       if Input.trigger?(Input::C)
  264.         @msg_window.visible = false
  265.         @shuru_window.active = true
  266.         return
  267.       end
  268.     end
  269.     if @shuru_window.active
  270.       update_shuru
  271.     end
  272.     if @bank_window.active
  273.       if Input.trigger?(Input::B)
  274.         $game_system.se_play($data_system.cancel_se)
  275.         $scene = Scene_Map.new
  276.         return
  277.       end
  278.       if Input.trigger?(Input::C)
  279.         case @bank_window.index
  280.         when 0
  281.           $game_system.se_play($data_system.decision_se)
  282.           @bank_window.active = false
  283.           @shuru_window.active = true
  284.           @shuru_window.visible = true
  285.           return
  286.         when 1
  287.           $game_system.se_play($data_system.decision_se)
  288.           @bank_window.active = false
  289.           @shuru_window.active = true
  290.           @shuru_window.visible = true
  291.           return
  292.         when 2
  293.           $game_system.se_play($data_system.decision_se)
  294.           $scene = Scene_Map.new
  295.           return
  296.         end
  297.       end
  298.     end
  299.   end

  300.   def update_shuru
  301.     if Input.trigger?(Input::B)
  302.       case @bank_window.index
  303.       when 0
  304.         $game_system.se_play($data_system.cancel_se)
  305.         @bank_index += 1
  306.         @bank_index %= 2
  307.         @bank_window_index = 0
  308.         $scene = Scene_Bank.new(@bank_index, @bank_window_index)
  309.       when 1
  310.         $game_system.se_play($data_system.cancel_se)
  311.         @bank_index += 1
  312.         @bank_index %= 2
  313.         @bank_window_index = 1
  314.         $scene = Scene_Bank.new(@bank_index, @bank_window_index)
  315.       end
  316.       return
  317.     end
  318.     if Input.trigger?(Input::UP)
  319.       $game_system.se_play($data_system.cursor_se)
  320.       case @shuru_window.index
  321.       when 0
  322.         @s1 += 1
  323.         @s1 = 0 if @s1 > 9
  324.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  325.       when 1
  326.         @s2 += 1
  327.         @s2 = 0 if @s2 > 9
  328.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  329.       when 2
  330.         @s3 += 1
  331.         @s3 = 0 if @s3 > 9
  332.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  333.       when 3
  334.         @s4 += 1
  335.         @s4 = 0 if @s4 > 9
  336.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  337.       when 4
  338.         @s5 += 1
  339.         @s5 = 0 if @s5 > 9
  340.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  341.       when 5
  342.         @s6 += 1
  343.         @s6 = 0 if @s6 > 9
  344.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  345.       when 6
  346.         @s7 += 1
  347.         @s7 = 0 if @s7 > 9
  348.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  349.       when 7
  350.         @s8 += 1
  351.         @s8 = 0 if @s8 > 9
  352.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  353.       end
  354.     end
  355.     if Input.trigger?(Input::DOWN)
  356.       $game_system.se_play($data_system.cursor_se)
  357.       case @shuru_window.index
  358.       when 0
  359.         @s1 -= 1
  360.         @s1 = 9 if @s1 < 0
  361.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  362.       when 1
  363.         @s2 -= 1
  364.         @s2 = 9 if @s2 < 0
  365.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  366.       when 2
  367.         @s3 -= 1
  368.         @s3 = 9 if @s3 < 0
  369.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  370.       when 3
  371.         @s4 -= 1
  372.         @s4 = 9 if @s4 < 0
  373.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  374.       when 4
  375.         @s5 -= 1
  376.         @s5 = 9 if @s5 < 0
  377.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  378.       when 5
  379.         @s6 -= 1
  380.         @s6 = 9 if @s6 < 0
  381.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  382.       when 6
  383.         @s7 -= 1
  384.         @s7 = 9 if @s7 < 0
  385.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  386.       when 7
  387.         @s8 -= 1
  388.         @s8 = 9 if @s8 < 0
  389.         @shuru_window.refresh(@s1,@s2,@s3,@s4,@s5,@s6,@s7,@s8)
  390.       end
  391.     end
  392.     if Input.trigger?(Input::C)
  393.       # @s9就是输入数值的最后结果
  394.       @s9=@s1*10000000+@s2*1000000+@s3*100000+@s4*10000+@s5*1000+@s6*100+@s7*10+@s8
  395.       case @bank_window.index
  396.       when 0  # 存入
  397.         # 数额大于身上的钱时
  398.         if @s9 > $game_party.gold
  399.           $game_system.se_play($data_system.buzzer_se)
  400.           @shuru_window.active = false
  401.           @msg_window.refresh(2)
  402.           @msg_window.visible = true
  403.           return
  404.         # 数额低于存钱限制时
  405.         elsif @s9 < $game_variables[BASE_MONEY]
  406.           $game_system.se_play($data_system.buzzer_se)
  407.           @shuru_window.active = false
  408.           @msg_window.refresh(0)
  409.           @msg_window.visible = true
  410.           return
  411.         else
  412.           $game_system.se_play($data_system.equip_se)
  413.           # 扣去身上相应的钱
  414.           $game_party.lose_gold(@s9)
  415.           # 增加积蓄
  416.           $game_variables[JIXU_VARIABLE] += @s9
  417.           # 替换本钱
  418.           $game_system.bank = $game_variables[JIXU_VARIABLE]
  419.           @bank_index += 1
  420.           @bank_index %= 2
  421.           @bank_window_index = 0
  422.           $scene = Scene_Bank.new(@bank_index, @bank_window_index)
  423.         end
  424.       when 1  # 取钱
  425.         # 当输入数值大于积蓄时
  426.         if @s9 > $game_variables[JIXU_VARIABLE]
  427.           $game_system.se_play($data_system.buzzer_se)
  428.           @shuru_window.active = false
  429.           @msg_window.refresh(3)
  430.           @msg_window.visible = true
  431.           return
  432.         # 低于取钱限制时
  433.         elsif @s9 < $game_variables[BASE_MONEY_2]
  434.           $game_system.se_play($data_system.buzzer_se)
  435.           @shuru_window.active = false
  436.           @msg_window.refresh(1)
  437.           @msg_window.visible = true
  438.           return
  439.         else
  440.           $game_system.se_play($data_system.equip_se)
  441.           # 增加金钱
  442.           $game_party.gain_gold(@s9)
  443.           # 积蓄减少
  444.           $game_variables[JIXU_VARIABLE] -= @s9
  445.           # 如果积蓄为0.+ 的浮点数就把他代入为0整数
  446.           if $game_variables[JIXU_VARIABLE] < 1
  447.             $game_variables[JIXU_VARIABLE] = 0
  448.           end
  449.           # 本钱代入积蓄
  450.           $game_system.bank = $game_variables[JIXU_VARIABLE].to_i
  451.           @bank_index += 1
  452.           @bank_index %= 2
  453.           @bank_window_index = 1
  454.           $scene = Scene_Bank.new(@bank_index, @bank_window_index)
  455.         end
  456.       end
  457.       return
  458.     end
  459.   end
  460. end
复制代码
电影脚本
  1. #==============================================================================
  2. # ■ Window_MSGMovie
  3. #------------------------------------------------------------------------------
  4. #  电影模式下显示文章的信息窗口。
  5. #==============================================================================

  6. # 电影模式开关  默认为 50号开关
  7. $movie_switches = 100
  8. # 电影模式下等待关闭文字 默认 50号变量
  9. $close_speak = 100


  10. class Window_MSGMovie < Window_Base
  11.   #--------------------------------------------------------------------------
  12.   # ● 初始化状态
  13.   #--------------------------------------------------------------------------
  14.   def initialize
  15.     super(0,400,640,80)
  16.     self.contents = Bitmap.new(width, height)
  17.     self.windowskin = Bitmap.new(30,30)
  18.     $game_temp.message_window_showing = false
  19.     self.z = 199
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● 处理信息结束
  23.   #--------------------------------------------------------------------------
  24.   def end_MSG
  25.     self.active = false
  26.     self.pause = false
  27.     self.contents.clear
  28.     # 呼叫信息调用
  29.     if $game_temp.message_proc != nil
  30.       $game_temp.message_proc.call
  31.     end
  32.     # 清除文章、选择项、输入数值的相关变量
  33.     $game_temp.message_text = nil
  34.     $game_temp.message_proc = nil
  35.     $game_temp.choice_start = 99
  36.     $game_temp.choice_max = 0
  37.     $game_temp.choice_cancel_type = 0
  38.     $game_temp.choice_proc = nil
  39.     $game_temp.num_input_start = 99
  40.     $game_temp.num_input_variable_id = 0
  41.     $game_temp.num_input_digits_max = 0
  42.   end
  43.   #--------------------------------------------------------------------------
  44.   # ● 刷新
  45.   #--------------------------------------------------------------------------
  46.   def refresh
  47.     self.contents.clear
  48.     x = 0
  49.     if $game_temp.message_text != nil
  50.       temp_text = $game_temp.message_text.clone
  51.       movie_text = $game_temp.message_text.clone
  52.       # 模拟执行(计算文字位置)
  53.       text = ""
  54.       # 转换字符
  55.       temp_text.gsub!(/\\\\/) { "\000" }
  56.       temp_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  57.       temp_text.gsub!(/\\[Vv]\[([0-9]+)\]/) { "\002[#{$1}]" }
  58.       temp_text.gsub!(/\\[Nn]\[([0-9]+)\]/) { "\003[#{$1}]" }
  59.       while((c = temp_text.slice!(/./m)) != nil)
  60.         if c == "\000"
  61.           c = "\\"
  62.         end
  63.         if c == "\001"
  64.           # 更改文字色
  65.           temp_text.sub!(/\[([0-9]+)\]/, "")
  66.           color = $1.to_i
  67.           c = ""
  68.           text += c
  69.           next
  70.         end
  71.         if c == "\002"
  72.           c = $game_variables[$1.to_i].to_s
  73.           temp_text.sub!(/\[([0-9]+)\]/, "")
  74.           text += c
  75.           next
  76.         end
  77.         if c == "\003"
  78.           temp_text.sub!(/\[([0-9]+)\]/, "")
  79.           c = $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  80.           text += c
  81.           next
  82.         end
  83.         if c == "\n"
  84.           c = ""
  85.           text += c
  86.           next
  87.         end
  88.         text += c
  89.       end
  90.       # 计算文字居中位置
  91.       move_x = (640 - self.contents.text_size(text).width) / 2 -20
  92.       # 执行 (显示文字)
  93.       movie_text.gsub!(/\\\\/) { "\000" }
  94.       movie_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
  95.       movie_text.gsub!(/\\[Vv]\[([0-9]+)\]/) { "\002[#{$1}]" }
  96.       movie_text.gsub!(/\\[Nn]\[([0-9]+)\]/) { "\003[#{$1}]" }
  97.       while((m = movie_text.slice!(/./m)) != nil)
  98.         if m == "\000"
  99.           m = "\\"
  100.         end
  101.         if m == "\001"
  102.           # 更改文字色
  103.           movie_text.sub!(/\[([0-9]+)\]/, "")
  104.           color = $1.to_i
  105.           if color >= 0 and color <= 7
  106.             self.contents.font.color = text_color(color)
  107.           end
  108.           # 下面的文字
  109.           next
  110.         end
  111.         if m == "\002"
  112.           m = $game_variables[$1.to_i].to_s
  113.           movie_text.sub!(/\[([0-9]+)\]/, "")
  114.         end
  115.         if m == "\003"
  116.           movie_text.sub!(/\[([0-9]+)\]/, "")
  117.           m = $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
  118.         end
  119.         if m == "\n"
  120.           m = ""
  121.         end
  122.         self.contents.draw_text(move_x + x,0,self.contents.text_size(m).width,32,m)
  123.         x += self.contents.text_size(m).width
  124.       end
  125.       # 返回系统文字颜色
  126.       self.contents.font.color = normal_color
  127.       # 清理显示文字
  128.       $game_temp.message_text = nil
  129.     end
  130.   end
  131.   #--------------------------------------------------------------------------
  132.   # ● 刷新画面
  133.   #--------------------------------------------------------------------------
  134.   def update
  135.     super
  136.     # 等待循环
  137.     if $game_variables[$close_speak] >= 2
  138.       $game_variables[$close_speak] -= 1
  139.     end
  140.     if $game_variables[$close_speak] == 1
  141.       $game_variables[$close_speak] = 0
  142.       end_MSG
  143.     end
  144.     # 当C键按下时
  145.     if Input.trigger?(Input::C) and $game_variables[$close_speak] == 0
  146.       end_MSG
  147.     end
  148.     # 显示文字
  149.     if $game_temp.message_text != nil
  150.       refresh
  151.       return
  152.     end
  153.   end
  154. end

  155. # --重定义Scene_Map类
  156. class Scene_Map
  157.   #--------------------------------------------------------------------------
  158.   # ● 主处理
  159.   #--------------------------------------------------------------------------
  160.   def main
  161.     # 生成活动块
  162.     @spriteset = Spriteset_Map.new
  163.     # 生成信息窗口
  164.     @message_window = Window_Message.new
  165.     # 生成电影模式对话窗口
  166.     @MSG_Movie_Window = Window_MSGMovie.new
  167.     # 电影模式黑框
  168.     [url=home.php?mod=space&uid=8407]@black[/url] = Sprite.new
  169.     @black.bitmap = Bitmap.new(640,480)
  170.     @black.bitmap.fill_rect(0,0,640,50,Color.new(25,25,25,255))
  171.     @black.bitmap.fill_rect(0,400,640,80,Color.new(25,25,25,255))
  172.     @black.opacity = 0
  173.     # 执行过渡
  174.     Graphics.transition
  175.     # 主循环
  176.     loop do
  177.       # 刷新游戏画面
  178.       Graphics.update
  179.       # 刷新输入信息
  180.       Input.update
  181.       # 刷新画面
  182.       update
  183.       # 如果画面切换的话就中断循环
  184.       if $scene != self
  185.         break
  186.       end
  187.     end
  188.     # 准备过渡
  189.     Graphics.freeze
  190.     # 释放活动块
  191.     @spriteset.dispose
  192.     # 释放信息窗口
  193.     @message_window.dispose
  194.     # 释放信息窗口
  195.     @MSG_Movie_Window.dispose
  196.     # 标题画面切换中的情况下
  197.     if $scene.is_a?(Scene_Title)
  198.       # 淡入淡出画面
  199.       Graphics.transition
  200.       Graphics.freeze
  201.     end
  202.   end
  203.   #--------------------------------------------------------------------------
  204.   # ● 刷新画面
  205.   #--------------------------------------------------------------------------
  206.   def update
  207.     # 循环
  208.     loop do
  209.       # 按照地图、实例、主角的顺序刷新
  210.       # (本更新顺序不会在的满足事件的执行条件下成为给予角色瞬间移动
  211.       #  的机会的重要因素)
  212.       $game_map.update
  213.       $game_system.map_interpreter.update
  214.       $game_player.update
  215.       # 系统 (计时器)、画面刷新
  216.       $game_system.update
  217.       $game_screen.update
  218.       # 如果主角在场所移动中就中断循环
  219.       unless $game_temp.player_transferring
  220.         break
  221.       end
  222.       # 执行场所移动
  223.       transfer_player
  224.       # 处理过渡中的情况下、中断循环
  225.       if $game_temp.transition_processing
  226.         break
  227.       end
  228.     end
  229.     # 刷新活动块
  230.     @spriteset.update
  231.     # 选择刷新
  232.     if $game_switches[$movie_switches] == false
  233.       # 刷新信息窗口
  234.       @message_window.update
  235.       # 电影模式的黑框
  236.       @black.opacity = 0
  237.     else
  238.       # 刷新电影模式信息
  239.       @MSG_Movie_Window.update
  240.       # 电影模式的黑框
  241.       @black.opacity = 250
  242.     end
  243.     # 游戏结束的情况下
  244.     if $game_temp.gameover
  245.       # 切换的游戏结束画面
  246.       $scene = Scene_Gameover.new
  247.       return
  248.     end
  249.     # 返回标题画面的情况下
  250.     if $game_temp.to_title
  251.       # 切换到标题画面
  252.       $scene = Scene_Title.new
  253.       return
  254.     end
  255.     # 处理过渡中的情况下
  256.     if $game_temp.transition_processing
  257.       # 清除过渡处理中标志
  258.       $game_temp.transition_processing = false
  259.       # 执行过渡
  260.       if $game_temp.transition_name == ""
  261.         Graphics.transition(20)
  262.       else
  263.         Graphics.transition(40, "Graphics/Transitions/" +
  264.           $game_temp.transition_name)
  265.       end
  266.     end
  267.     # 显示信息窗口中的情况下
  268.     if $game_temp.message_window_showing
  269.       return
  270.     end
  271.     # 遇敌计数为 0 且、且遇敌列表不为空的情况下
  272.     if $game_player.encounter_count == 0 and $game_map.encounter_list != []
  273.       # 不是在事件执行中或者禁止遇敌中
  274.       unless $game_system.map_interpreter.running? or
  275.              $game_system.encounter_disabled
  276.         # 确定队伍
  277.         n = rand($game_map.encounter_list.size)
  278.         troop_id = $game_map.encounter_list[n]
  279.         # 队伍有效的话
  280.         if $data_troops[troop_id] != nil
  281.           # 设置调用战斗标志
  282.           $game_temp.battle_calling = true
  283.           $game_temp.battle_troop_id = troop_id
  284.           $game_temp.battle_can_escape = true
  285.           $game_temp.battle_can_lose = false
  286.           $game_temp.battle_proc = nil
  287.         end
  288.       end
  289.     end
  290.     # 按下 B 键的情况下
  291.     if Input.trigger?(Input::B)
  292.       # 不是在事件执行中或菜单禁止中
  293.       unless $game_system.map_interpreter.running? or
  294.              $game_system.menu_disabled
  295.         # 设置菜单调用标志以及 SE 演奏
  296.         $game_temp.menu_calling = true
  297.         $game_temp.menu_beep = true
  298.       end
  299.     end
  300.     # 调试模式为 ON 并且按下 F9 键的情况下
  301.     if $DEBUG and Input.press?(Input::F9)
  302.       # 设置调用调试标志
  303.       $game_temp.debug_calling = true
  304.     end
  305.     # 不在主角移动中的情况下
  306.     unless $game_player.moving?
  307.       # 执行各种画面的调用
  308.       if $game_temp.battle_calling
  309.         call_battle
  310.       elsif $game_temp.shop_calling
  311.         call_shop
  312.       elsif $game_temp.name_calling
  313.         call_name
  314.       elsif $game_temp.menu_calling
  315.         call_menu
  316.       elsif $game_temp.save_calling
  317.         call_save
  318.       elsif $game_temp.debug_calling
  319.         call_debug
  320.       end
  321.     end
  322.   end
  323. end
  324. #=============================================================================
  325. # 本脚本来自66RPG,如使用请保留此信息
  326. #[癫狂侠客]书写脚本
  327. #=============================================================================
复制代码
这个问题真心求解决

Lv2.观梦者

梦石
0
星屑
260
在线时间
1373 小时
注册时间
2005-10-16
帖子
5113

贵宾

2
发表于 2013-6-22 17:46:42 | 只看该作者
应该没什么冲突吧,自己试一下不就知道了么

电影放上面,银行放下面
我只个搬答案的
叔叔我已经当爹了~
婚后闪人了……
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-30 01:28

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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