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

Project1

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

[已经解决] 厚颜无耻的求个RMXP防卡脚本

[复制链接]

Lv3.寻梦者

梦石
0
星屑
4444
在线时间
1916 小时
注册时间
2010-8-16
帖子
847

短篇八RM组季军

跳转到指定楼层
1
发表于 2014-5-7 23:20:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
论坛搜索都是VX的,跪求{:5_159:}{:5_159:}
Steam页面:
http://store.steampowered.com/app/486850
https://store.steampowered.com/app/865180/
志同道合QQ&E-mail:[email protected]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
865 小时
注册时间
2010-6-27
帖子
131
2
发表于 2014-5-8 08:59:49 | 只看该作者
  1. #======================================
  2. # ■ Anti Event Lag Script
  3. #======================================
  4. #  By: Near Fantastica
  5. #   Date: 12.06.05
  6. #   Version: 3
  7. #======================================

  8. #======================================
  9. # ■ Game_Map
  10. #======================================

  11. class Game_Map
  12. #--------------------------------------------------------------------------
  13. def in_range?(object)
  14. screne_x = $game_map.display_x
  15. screne_x -= 256
  16. screne_y = $game_map.display_y
  17. screne_y -= 256
  18. screne_width = $game_map.display_x
  19. screne_width += 2816
  20. screne_height = $game_map.display_y
  21. screne_height += 2376
  22. return false if object.real_x <= screne_x
  23. return false if object.real_x >= screne_width
  24. return false if object.real_y <= screne_y
  25. return false if object.real_y >= screne_height
  26. return true
  27. end
  28. #--------------------------------------------------------------------------
  29. def update
  30. if $game_map.need_refresh
  31.    refresh
  32. end
  33. if @scroll_rest > 0
  34.    distance = 2 ** @scroll_speed
  35.    case @scroll_direction
  36.    when 2
  37.      scroll_down(distance)
  38.    when 4
  39.      scroll_left(distance)
  40.    when 6  
  41.      scroll_right(distance)
  42.    when 8  
  43.      scroll_up(distance)
  44.    end
  45.    @scroll_rest -= distance
  46. end
  47. for event in @events.values
  48.    if in_range?(event) or event.trigger == 3 or event.trigger == 4
  49.      event.update
  50.    end
  51. end
  52. for common_event in @common_events.values
  53.    common_event.update
  54. end
  55. @fog_ox -= @fog_sx / 8.0
  56. @fog_oy -= @fog_sy / 8.0
  57. if @fog_tone_duration >= 1
  58.    d = @fog_tone_duration
  59.    target = @fog_tone_target
  60.    @fog_tone.red = (@fog_tone.red * (d - 1) + target.red) / d
  61.    @fog_tone.green = (@fog_tone.green * (d - 1) + target.green) / d
  62.    @fog_tone.blue = (@fog_tone.blue * (d - 1) + target.blue) / d
  63.    @fog_tone.gray = (@fog_tone.gray * (d - 1) + target.gray) / d
  64.    @fog_tone_duration -= 1
  65. end
  66. if @fog_opacity_duration >= 1
  67.    d = @fog_opacity_duration
  68.    @fog_opacity = (@fog_opacity * (d - 1) + @fog_opacity_target) / d
  69.    @fog_opacity_duration -= 1
  70. end
  71. end
  72. end

  73. #======================================
  74. # ■ Spriteset_Map
  75. #======================================

  76. class Spriteset_Map
  77. #--------------------------------------------------------------------------
  78. def in_range?(object)
  79. screne_x = $game_map.display_x
  80. screne_x -= 512
  81. screne_y = $game_map.display_y
  82. screne_y -= 512
  83. screne_width = $game_map.display_x
  84. screne_width += 2816
  85. screne_height = $game_map.display_y
  86. screne_height += 2332
  87. return false if object.real_x <= screne_x
  88. return false if object.real_x >= screne_width
  89. return false if object.real_y <= screne_y
  90. return false if object.real_y >= screne_height
  91. return true
  92. end
  93. #--------------------------------------------------------------------------
  94. def update
  95. if @panorama_name != $game_map.panorama_name or
  96.     @panorama_hue != $game_map.panorama_hue
  97.    @panorama_name = $game_map.panorama_name
  98.    @panorama_hue = $game_map.panorama_hue
  99.    if @panorama.bitmap != nil
  100.      @panorama.bitmap.dispose
  101.      @panorama.bitmap = nil
  102.    end
  103.    if @panorama_name != ""
  104.      @panorama.bitmap = RPG::Cache.panorama(@panorama_name, @panorama_hue)
  105.    end
  106.    Graphics.frame_reset
  107. end
  108. if @fog_name != $game_map.fog_name or @fog_hue != $game_map.fog_hue
  109.    @fog_name = $game_map.fog_name
  110.    @fog_hue = $game_map.fog_hue
  111.    if @fog.bitmap != nil
  112.      @fog.bitmap.dispose
  113.      @fog.bitmap = nil
  114.    end
  115.    if @fog_name != ""
  116.      @fog.bitmap = RPG::Cache.fog(@fog_name, @fog_hue)
  117.    end
  118.    Graphics.frame_reset
  119. end
  120. @tilemap.ox = $game_map.display_x / 4
  121. @tilemap.oy = $game_map.display_y / 4
  122. @tilemap.update
  123. @panorama.ox = $game_map.display_x / 8
  124. @panorama.oy = $game_map.display_y / 8
  125. @fog.zoom_x = $game_map.fog_zoom / 100.0
  126. @fog.zoom_y = $game_map.fog_zoom / 100.0
  127. @fog.opacity = $game_map.fog_opacity
  128. @fog.blend_type = $game_map.fog_blend_type
  129. @fog.ox = $game_map.display_x / 4 + $game_map.fog_ox
  130. @fog.oy = $game_map.display_y / 4 + $game_map.fog_oy
  131. @fog.tone = $game_map.fog_tone
  132. i=0
  133. for sprite in @character_sprites
  134.    if sprite.character.is_a?(Game_Event)
  135.      if in_range?(sprite.character) or sprite.character.trigger == 3 or sprite.character.trigger == 4
  136.        sprite.update
  137.        i+=1
  138.      end
  139.    else
  140.      sprite.update
  141.      i+=1
  142.    end
  143. end
  144. #p i
  145. @weather.type = $game_screen.weather_type
  146. @weather.max = $game_screen.weather_max
  147. @weather.ox = $game_map.display_x / 4
  148. @weather.oy = $game_map.display_y / 4
  149. @weather.update
  150. for sprite in @picture_sprites
  151.    sprite.update
  152. end
  153. @timer_sprite.update
  154. @viewport1.tone = $game_screen.tone
  155. @viewport1.ox = $game_screen.shake
  156. @viewport3.color = $game_screen.flash_color
  157. @viewport1.update
  158. @viewport3.update
  159. end
  160. end
复制代码

评分

参与人数 2星屑 +151 收起 理由
hys111111 + 66 内容解决
b565185756 + 85 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-18 14:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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