Sign in to follow this  
Followers 0
Dragon Call

Habilidades con armas

7 posts in this topic

Este scrpit te permitira poner habilidades a tus ataques, estilo GS
[SPOILER]
CODE
$imported = {} if $imported == nil
$imported["MagicWeapon"] = true

if $game_special_elements == nil
 $game_special_elements = {}
 $data_system = load_data("Data/System.rxdata")
end
$game_special_elements["magic_weapon"] = $data_system.elements.index("魔法剣")
class RPG::Weapon
 def name
   return @name.gsub(/\[.*\]/) {""}
 end
 def original_name
   return @name
 end
 def exec_skill
   if @name =~ /\[MW[ ]*(\d+)[ ]*,[ ]*(\d+)\]/i
     return [$1.to_i, $2.to_i]
   elsif @element_set.include?($game_special_elements["magic_weapon"])
     return [@dex_plus, @agi_plus]
   else
     return nil
   end
 end
end
class Game_Battler
 attr_accessor :magic_weapon          
 alias initialize_KGC_MagicWeapon initialize
 def initialize
   initialize_KGC_MagicWeapon
   @magic_weapon = false
 end
end
class Scene_Battle
 alias update_phase3_KGC_MagicWeapon update_phase3
 def update_phase3
   @active_battler.magic_weapon = false if @active_battler.magic_weapon
   update_phase3_KGC_MagicWeapon
 end
end
class Scene_Battle
 alias update_phase4_step2_KGC_MagicWeapon update_phase4_step2
 def update_phase4_step2
   update_phase4_step2_KGC_MagicWeapon
   if @magic_weapon
     @phase4_step = 2
     @magic_weapon = false
   end
 end
 alias make_basic_action_result_KGC_MagicWeapon make_basic_action_result
 def make_basic_action_result
   @active_battler.magic_weapon = false
   if @active_battler.is_a?(Game_Actor) &&
       @active_battler.current_action.basic == 0
     weapon = $data_weapons[@active_battler.weapon_id]
     if weapon != nil && weapon.exec_skill != nil
       if @active_battler.restriction == 3
         target = $game_party.random_target_actor
       elsif @active_battler.restriction == 2
         target = $game_troop.random_target_enemy
       else
         index = @active_battler.current_action.target_index
         target = $game_troop.smooth_target_enemy(index)
       end
       srand
       if rand(100) < weapon.exec_skill[1]
         @active_battler.current_action.kind = 1
         @active_battler.current_action.skill_id = weapon.exec_skill[0]
         @active_battler.magic_weapon = true
         @magic_weapon = true
         return
       end
     end
   end
   make_basic_action_result_KGC_MagicWeapon
 end
 alias make_skill_action_result_KGC_MagicWeapon make_skill_action_result
 def make_skill_action_result
   if @active_battler.is_a?(Game_Actor) && @active_battler.magic_weapon &&
       !@active_battler.current_action.forcing
     @active_battler.magic_weapon = false
     @skill = $data_skills[@active_battler.current_action.skill_id]
     @status_window.refresh
     @help_window.set_text(@skill.name, 1)
     @animation1_id = @skill.animation1_id
     @animation2_id = @skill.animation2_id
     @common_event_id = @skill.common_event_id
     set_target_battlers(@skill.scope)
     @target_battlers.each { |target|
       target.skill_effect(@active_battler, @skill)
     }
     return
   end
   make_skill_action_result_KGC_MagicWeapon
 end
end
[/SPOILER]

Credito
KGC

Instrucciones
Tomaremos de ejemplo una Bronze Sword
-Se coloca entre[] el id de la habilidad y el % de que salga la habilidad
el resultado deberia quedar asi
Bronze Sword [MW7,30]
0

Share this post


Link to post
Share on other sites
Para mí está muy claro. Pon al lado del nombre del arma lo que te dice.
0

Share this post


Link to post
Share on other sites
Ok te explico
-Eliges que arma quieras que tenga el ataque
-En el nombre del arma (voy a usar la Bronze Sword) al lado entre [] vas a colocar separado por , el ID de la habilidad (ejm: en tu base de datos la habilidad la habilidad fuego es la numero 7 bueno le vas a poner un MW[ID de la habilidad] de tal forma de que quede asi-> MW7) y el % que quieres (no necesita explicacion)
-El resultado debe de quedar asi-> "Bronze Sword [MW7,30]"
0

Share this post


Link to post
Share on other sites
donde pongo este script?
0

Share this post


Link to post
Share on other sites
Hmm no se si necesita KGC pero ponlo sobre Main, casi todos los scripts q no dicen ninguna indicacion de donde ponerlos es porque van sobre Main
0

Share this post


Link to post
Share on other sites
Muy buen script no se si lo sabra usar pero quien sabe... me seria útil... muahahahaha o_o Edited by Haf
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0