查看: 2037|回复: 1

[已经过期] 使用战斗指针脚本后的问题

[复制链接]
梦石
0
星屑
50
在线时间
49 小时
注册时间
2013-5-23
回帖
8
发表于 2013-6-8 22:14:16 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 skgame 于 2013-6-8 22:16 编辑

111

111


如何让选择技能后系统默认的技能窗口关闭?
或者直接不出现系统自带的选择敌人的窗口?
求帮助
另外,指针脚本如下,禁用后就是系统默认的,应该不存在冲突问题。
  1. #==============================================================================
  2. # +++ MOG - Combo Count (v1.2) +++
  3. #==============================================================================
  4. # By Moghunter
  5. #==============================================================================
  6. # Apresenta a quantidade de acertos no alvo e o dano maximo.
  7. #==============================================================================
  8. # É necessário ter os arquivos imagens na pasta Graphics/Systems.
  9. # Combo_Damage.png
  10. # Combo_Hud.png
  11. # Combo_Number.png
  12. #==============================================================================

  13. #==============================================================================
  14. # ● Histórico (Version History)
  15. #==============================================================================
  16. # v 1.2 - Corrigido o erro de crash randômico. (relativo a dispose de imagem.)
  17. # v 1.1 - Opção de definir a prioridade da Hud.
  18. #==============================================================================
  19. module MOG_COMBO_COUNT
  20.   #Ativar tempo para fazer combo.
  21.   TIME_COUNT = true
  22.   # Tempo para fazer um combo. (60 = 1s)
  23.   COMBO_TIME = 120
  24.   # Cancelar a contagem de Combo caso o inimigo acertar o herói.
  25.   ENEMY_CANCEL_COMBO = true
  26.   # Posição geral das imagens. X Y
  27.   COMBO_POSITION = [10,90]
  28.   # Posição do número de HITS. X Y
  29.   HIT_POSITION = [55,20]
  30.   # Posição do número de dano. X Y
  31.   TOTAL_POSITION = [100,-20]
  32.   # Prioridade da HUD
  33.   HUD_Z = 1
  34. end

  35. #===============================================================================
  36. # ■ Game_Temp
  37. #===============================================================================
  38. class Game_Temp
  39.    attr_accessor :combo_hit
  40.    attr_accessor :max_damage   
  41.    attr_accessor :combo_time  
  42.   #--------------------------------------------------------------------------
  43.   # ● initialize
  44.   #--------------------------------------------------------------------------   
  45.    alias mog_combo_display_initialize initialize
  46.    def initialize
  47.        @combo_hit = 0
  48.        @max_damage = 0  
  49.        @combo_time = 0   
  50.        mog_combo_display_initialize
  51.    end
  52. end

  53. #===============================================================================
  54. # ■ Game_Battler
  55. #===============================================================================
  56. class Game_Battler
  57.   
  58.   #--------------------------------------------------------------------------
  59.   # ● Item Apply
  60.   #--------------------------------------------------------------------------      
  61.   alias mog_combo_display_item_apply item_apply
  62.   def item_apply(user, item)
  63.       mog_combo_display_item_apply(user, item)
  64.       unless @result.hit?
  65.          $game_temp.combo_time = 0
  66.       end  
  67.   end  
  68.   
  69.   #--------------------------------------------------------------------------
  70.   # ● execute_damage
  71.   #--------------------------------------------------------------------------     
  72.   alias mog_combo_display_execute_damage execute_damage
  73.   def execute_damage(user)
  74.       mog_combo_display_execute_damage(user)
  75.       if @result.hp_damage > 0   
  76.           if user.is_a?(Game_Actor)  
  77.              $game_temp.combo_hit += 1
  78.              $game_temp.max_damage += @result.hp_damage
  79.              $game_temp.combo_time = MOG_COMBO_COUNT::COMBO_TIME
  80.           else
  81.              $game_temp.combo_time = 0 if MOG_COMBO_COUNT::ENEMY_CANCEL_COMBO == true
  82.           end  
  83.       end  
  84.     end
  85. end

  86. #===============================================================================
  87. # Scene_Battle
  88. #===============================================================================
  89. class Scene_Battle < Scene_Base

  90.   #--------------------------------------------------------------------------
  91.   # ● start
  92.   #--------------------------------------------------------------------------
  93.   alias mog_combo_start start
  94.   def start
  95.       create_cb_sprite
  96.       mog_combo_start
  97.   end
  98.   
  99.   #--------------------------------------------------------------------------
  100.   # ● create_cb_sprite
  101.   #--------------------------------------------------------------------------  
  102.   def create_cb_sprite
  103.       @combo_sprite = Combo_Sprite_Hud.new
  104.   end

  105.   #--------------------------------------------------------------------------
  106.   # ● Terminate
  107.   #--------------------------------------------------------------------------  
  108.   alias mog_combo_terminate terminate
  109.   def terminate
  110.       mog_combo_terminate
  111.       @combo_sprite.dispose
  112.   end
  113.   
  114.   #--------------------------------------------------------------------------
  115.   # ● update_basic
  116.   #--------------------------------------------------------------------------
  117.   alias mog_combo_update_basic update_basic
  118.   def update_basic
  119.       mog_combo_update_basic
  120.       update_combo_hit   
  121.   end      
  122.   
  123.   #--------------------------------------------------------------------------
  124.   # ● Update Combo Hit
  125.   #--------------------------------------------------------------------------   
  126.   def update_combo_hit
  127.       @combo_sprite.update
  128.       if (@spriteset.animation? or @spriteset.effect?)
  129.           @combo_sprite.combo_wait = true
  130.       else
  131.           @combo_sprite.combo_wait = false
  132.       end      
  133.   end
  134.    
  135. end  

  136. #===============================================================================
  137. # ■ Combo_Sprite_Hud
  138. #===============================================================================
  139. class Combo_Sprite_Hud
  140.    attr_accessor :combo_wait
  141.    include MOG_COMBO_COUNT
  142.    
  143. #--------------------------------------------------------------------------
  144. # ● Initialize
  145. #--------------------------------------------------------------------------
  146.   def initialize
  147.       dispose
  148.       @combo_wait = false
  149.       $game_temp.combo_time = 0
  150.       $game_temp.combo_hit = 0
  151.       $game_temp.max_damage = 0     
  152.       @combo_hit_old = 0
  153.       @animation_speed = 0
  154.       @pos_x = COMBO_POSITION[0]
  155.       @pos_x_fix = 0
  156.       @pos_y = COMBO_POSITION[1]
  157.       create_combo_sprite
  158.       create_total_damage_sprite     
  159.       create_hud_sprite     
  160.    end  
  161.    
  162. #--------------------------------------------------------------------------
  163. # ● create_hud_sprite   
  164. #--------------------------------------------------------------------------
  165. def create_hud_sprite   
  166.      @hud = Sprite.new
  167.      @hud.bitmap = Cache.system("Combo_HUD")
  168.      @hud.z = HUD_Z
  169.      @hud.x = COMBO_POSITION[0]
  170.      @hud.y = COMBO_POSITION[1]
  171.      @hud.opacity = 250
  172.      @hud.visible = false
  173. end
  174.    
  175. #--------------------------------------------------------------------------
  176. # ● create_total_damage_sprite
  177. #--------------------------------------------------------------------------
  178. def create_total_damage_sprite   
  179.      @total_image = Cache.system("Combo_damage")
  180.      @total = Sprite.new
  181.      @total.bitmap = Bitmap.new(@combo_image.width,@combo_image.height)
  182.      @total_im_cw = @total_image.width / 10
  183.      @total_im_ch = @total_image.height     
  184.      @total.z = HUD_Z + 1
  185.      @total_orig_x = COMBO_POSITION[0] + TOTAL_POSITION[0]
  186.      @total_orig_y = COMBO_POSITION[1] + TOTAL_POSITION[1]
  187.      @total.x = @total_orig_x
  188.      @total.y = @total_orig_y
  189.      @total.zoom_x = 1.00
  190.      @total.zoom_y = 1.00
  191.      @total.opacity = 250  
  192.      @total.visible = false
  193. end     

  194. #--------------------------------------------------------------------------
  195. # ● create_combo_number  
  196. #--------------------------------------------------------------------------
  197. def create_combo_sprite
  198.      @combo_image = Cache.system("Combo_Number")
  199.      @combo = Sprite.new
  200.      @combo.bitmap = Bitmap.new(@combo_image.width,@combo_image.height)
  201.      @combo_im_cw = @combo_image.width / 10
  202.      @combo_im_ch = @combo_image.height     
  203.      @combo.z = HUD_Z + 2
  204.      @combo_orig_x = COMBO_POSITION[0] + HIT_POSITION[0]
  205.      @combo_orig_y = COMBO_POSITION[1] + HIT_POSITION[1]
  206.      @combo.zoom_x = 1.00
  207.      @combo.zoom_y = 1.00
  208.      @combo.opacity = 250
  209.      @combo.visible = false
  210. end  

  211. #--------------------------------------------------------------------------
  212. # ● Dispose
  213. #--------------------------------------------------------------------------
  214.    def dispose
  215.        return if @hud == nil
  216.        @hud.bitmap.dispose
  217.        @hud.dispose
  218.        @hud = nil
  219.        @combo_image.dispose
  220.        @combo.bitmap.dispose
  221.        @combo.dispose
  222.        @total_image.dispose      
  223.        @total.bitmap.dispose
  224.        @total.dispose
  225.    end

  226. #--------------------------------------------------------------------------
  227. # ● Refresh
  228. #--------------------------------------------------------------------------
  229.    def refresh
  230.      @combo_hit_old = $game_temp.combo_hit
  231.      @combo.bitmap.clear
  232.      @total.bitmap.clear
  233.      @combo_number_text = $game_temp.combo_hit.abs.to_s.split(//)
  234.      for r in [email]0..@combo_number_text.size[/email] - 1
  235.        @combo_number_abs = @combo_number_text[r].to_i
  236.        @combo_src_rect = Rect.new(@combo_im_cw * @combo_number_abs, 0, @combo_im_cw, @combo_im_ch)
  237.        @combo.bitmap.blt(@combo_im_cw *  r, 0, @combo_image, @combo_src_rect)        
  238.      end            
  239.      @total_number_text = $game_temp.max_damage.abs.to_s.split(//)
  240.      for r in [email]0..@total_number_text.size[/email] - 1
  241.        @total_number_abs = @total_number_text[r].to_i
  242.        @total_src_rect = Rect.new(@total_im_cw * @total_number_abs, 0, @total_im_cw, @total_im_ch)
  243.        @total.bitmap.blt(@total_im_cw *  r, 20, @total_image, @total_src_rect)        
  244.      end
  245.        #Combo Position
  246.        @pos_x_fix = (@combo_im_cw / 2 * @combo_number_text.size)
  247.        @combo.x = @combo_orig_x - @pos_x_fix
  248.        @combo.y = @combo_orig_y
  249.        @combo.zoom_x = 2
  250.        @combo.zoom_y = 2
  251.        @combo.opacity = 70
  252.        @combo.visible = true
  253.        #Total Position      
  254.        @total.x = @total_orig_x + 20
  255.        @total.y = @total_orig_y     
  256.        @total.opacity = 100
  257.        @total.visible = true            
  258.        #Hud Position
  259.        @hud.x = COMBO_POSITION[0]
  260.        @hud.y = COMBO_POSITION[1]
  261.        @hud.opacity = 255
  262.        @hud.visible = true
  263. end   

  264. #--------------------------------------------------------------------------
  265. # ● Slide Update
  266. #--------------------------------------------------------------------------
  267.   def slide_update
  268.     return if !@combo.visible
  269.     if $game_temp.combo_time > 0 and @combo_wait == false
  270.        $game_temp.combo_time -= 1 if TIME_COUNT == true
  271.     end
  272.     if $game_temp.combo_time > 0 and $game_temp.combo_hit > 0   
  273.          #Total Damage
  274.          if @total.x > @total_orig_x
  275.             @total.x -= 1
  276.             @total.opacity += 8
  277.          else   
  278.             @total.x = @total_orig_x
  279.             @total.opacity = 255
  280.          end  
  281.          #Combo
  282.          if @combo.zoom_x > 1.00
  283.             @combo.zoom_x -= 0.05
  284.             @combo.zoom_y -= 0.05      
  285.             @combo.opacity += 8
  286.          else
  287.             @combo.zoom_x = 1
  288.             @combo.zoom_y = 1
  289.             @combo.opacity = 255
  290.             @combo.x = @combo_orig_x - @pos_x_fix
  291.             @combo.y = @combo_orig_y
  292.          end           
  293.      elsif $game_temp.combo_time == 0 and @combo.visible
  294.            @combo.x -= 5
  295.            @combo.opacity -= 10
  296.            @total.x -= 3
  297.            @total.opacity -= 10
  298.            @hud.x += 5
  299.            @hud.opacity -= 10     
  300.            $game_temp.combo_hit = 0
  301.            @combo_hit_old = $game_temp.combo_hit
  302.            $game_temp.max_damage = 0
  303.            if @combo.opacity <= 0
  304.               @combo.visible = false
  305.               @total.visible = false
  306.               @hud.visible = false
  307.            end  
  308.      end   
  309.   end

  310. #--------------------------------------------------------------------------
  311. # ● Cancel
  312. #--------------------------------------------------------------------------   
  313.   def cancel
  314.       $game_temp.combo_hit = 0
  315.       $game_temp.max_damage = 0
  316.       $game_temp.combo_time = 0      
  317.       @combo_hit_old = $game_temp.combo_hit
  318.   end  

  319. #--------------------------------------------------------------------------
  320. # ● Clear
  321. #--------------------------------------------------------------------------     
  322.   def clear
  323.       $game_temp.combo_time = 0
  324.   end      

  325. #--------------------------------------------------------------------------
  326. # ● Update
  327. #--------------------------------------------------------------------------
  328.   def update
  329.       return if @hud == nil
  330.       refresh if $game_temp.combo_hit != @combo_hit_old
  331.       slide_update
  332.   end   
  333. end

  334. $mog_rgss3_combo_count = true
复制代码
梦石
0
星屑
50
在线时间
49 小时
注册时间
2013-5-23
回帖
8
 楼主| 发表于 2013-6-9 12:46:12 | 显示全部楼层
呃,难道我发的问题都那么难么?就没人帮忙?
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部