Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
Jesse66126

Does any know of any "counter attack" scripts?

Question

I know how to counter skill attacks with eventing,but I want to counter normal attacks.

Or I'll have convert all enemies's attacks to skills that don't use sp. =(

 

Any Ideas?

 

It doesn't have to be as powerful as Final Fastasy 7's counter system.

Though that would rule lol.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I found this script by sand golem ,but it says it only works while using normal attacks.

 

And when I tried it it flat out wouldn't work lol. I think it might need an "SDK" folder to work, but I couldn't find one. It looks like a pretty simple script. I'm not sure why it doesn't work.

 

#======================================================================
====
# ** SG Counter Attack
#==========================================================================
# sandgolem 
# Version 2
# 2.07.06
#==========================================================================

Scene_Battle::SG_Counter_States = { 7 => [5,100], 2 => [90,90], 22 => [100,50] }
Scene_Battle::SG_Counter_Messages = ['\m Counter!','\m strikes back!']

#==========================================================================
#
# To check for updates or find more scripts, visit:
# [url="http://www.gamebaker.com/rmxp/scripts/"]http://www.gamebaker.com/rmxp/scripts/[/url]
#
# To use this script, copy it and insert it in a new section above "Main",
# under the default scripts, and the SDK if you're using it.
#
# Have problems? Official topic:
#   [url="http://forums.gamebaker.com/showthread.php?t=129"]http://forums.gamebaker.com/showthread.php?t=129[/url]
#
#==========================================================================

begin
 SDK.log('SG Counter Attack', 'sandgolem', 2, '2.07.06')
 if SDK.state('SG Counter Attack') != true
   @sg_counterattack_disabled = true
 end
 rescue
end

if !@sg_counterattack_disabled
#--------------------------------------------------------------------------

class Game_Battler
 alias sandgolem_counter_battler_atkeff attack_effect
 def attack_effect(attacker)
   sandgolem_counter_battler_atkeff(attacker)
   if $scene.active_battler == attacker
     $scene.sg_atkcounter_test(self)
   end
 end
end

class Scene_Battle
 attr_accessor :active_battler

 def sg_atkcounter_test(battler)
   sg_temp = SG_Counter_States.keys
   for i in 0...sg_temp.size
     if battler.state?(sg_temp[i])
       if SG_Counter_States[sg_temp[i]][0] > rand(99)
         @sg_counter = SG_Counter_States[sg_temp[i]][1]
         @sg_countertarget = battler
         return
       end
     end
   end
 end

 alias sandgolem_counter_battle_up4s5 update_phase4_step5
 def update_phase4_step5
   sandgolem_counter_battle_up4s5
   if @sg_countertarget != nil
     @phase4_step = 1337
     @sg_atkcounter = 28
   end
 end

 def sg_counter_update
   if @sg_countertarget.dead? or @sg_atkcounter == 0
     @sg_atkcounter = nil
     @sg_counter = nil
     @sg_countertarget = nil
     @phase4_step = 6
     return
   end
   @sg_atkcounter -= 1
   if @sg_atkcounter == 10
     @sg_countertarget.animation_id = @sg_countertarget.animation1_id
     @active_battler.animation_id = @sg_countertarget.animation2_id
     sg_temp = rand(SG_Counter_Messages.size)
     sg_temp = SG_Counter_Messages[sg_temp].clone
     sg_temp.gsub!(/\\[Mm]/) { @sg_countertarget.name }
     @help_window.set_text(sg_temp, 1)
     @active_battler.attack_effect(@sg_countertarget)
     if !@active_battler.damage.is_a?(String)
       @active_battler.hp += @active_battler.damage
       @active_battler.damage = @active_battler.damage * @sg_counter / 100
       @active_battler.hp -= @active_battler.damage
       @status_window.refresh
     end
     @active_battler.damage_pop = true
   end
 end

 alias sandgolem_counter_battle_update update
 def update
   if @sg_atkcounter != nil
     sg_counter_update
   end
   sandgolem_counter_battle_update
 end
end

#--------------------------------------------------------------------------
end

Share this post


Link to post
Share on other sites
  • 0

From his description,it seemed like it didn't need one.

It seems like a fairly simple script.

I didn't see one where I found the script.

Share this post


Link to post
Share on other sites
  • 0

Spamming, necroposting, trolling. What rule didn't you break?

 

 

And where is Jesse?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...