RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Various Battle commands & Request a Battle Command

0 Members and 2 Guests are viewing this topic.

**
Rep:
Level 90
Quote from: SiR_VaIlHoR
thanks a lot, i need this!!  :lol:

you're welcome  8)

****
Rep:
Level 91
U mean Welcome i think  :lol:
I'm the Alpha and the Omega, the First and the Last, the Beginning and the End.

http://qualquek.miniville.fr/
http://www.dailymotion.com/bookmarks/ojah/video/x27l78_jake-simpson-stevie-wonder-isnt-she_music

My padawan (Tsunokiette) and me :p
http://www.team-aaa.com/root/profile.php?enter_id=614556
http://www.esl.eu/fr/player/2609080/
I'm French so forgive my bad english!

**
Rep:
Level 90
Example for the defend command

Code: [Select]

if self.guarding
 self.damage /= 2
end


now add this to it

Code: [Select]

unless self.is_a?(Game_Enemy)  #<-- This is the most important part
if self.battle_commands.include?("Defend") and rand(100) > 50 #<- chance
self.damage /= 2 #< The effect is placed inside
end
end

****
Rep:
Level 91
with this last the cance is always 50%??
i'm searching for a hazard chance
I'm the Alpha and the Omega, the First and the Last, the Beginning and the End.

http://qualquek.miniville.fr/
http://www.dailymotion.com/bookmarks/ojah/video/x27l78_jake-simpson-stevie-wonder-isnt-she_music

My padawan (Tsunokiette) and me :p
http://www.team-aaa.com/root/profile.php?enter_id=614556
http://www.esl.eu/fr/player/2609080/
I'm French so forgive my bad english!

**
Rep:
Level 90
Quote from: SiR_VaIlHoR
with this last the cance is always 50%??
i'm searching for a hazard chance

If you mean the lower the hp the person has the greater the chance it'll work then substitute that fifty for this

Game_Battler 3
100 - (100 * self.hp / self.maxhp)

Scene_Battle 4 (my scripts)
100 - (100 * $game_temp.targetsaver.hp / $game_temp.targetsaver.maxhp)

**
Rep:
Level 90
name: Attack All
description: an attack command that attacks all enemies nifty for weapons that should attack all enemies

Scene_Battle 3
Code: [Select]

      when "Attack All"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 15
       phase3_next_actor


Scene_Battle 4
Code: [Select]

     if @active_battler.current_action.basic == 15
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
        if @active_battler.restriction == 3
        for actor in $game_party.actors
          if actor.exist?
            @target_battlers.push(actor)
          end
        end
        elsif @active_battler.restriction == 2
               for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
        else
               for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
end
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end


And you're done  :^^:
note: I'll check to see if I can make an Attack that would attack all enemies twice EDIT
I Don't think it's possible   :cry:

**
Rep:
Level 90
Are there any problems with any of the scripts I've posted are there any bugs in them? So far I haven't seen any posts about problems with them so I'll take the silence as they are all working fine  :lol:

The Coming up Next List in order
4) A steal/mug command (Finished)
7)The X Magic off FF6 use magic twice (Started over  :cry: )
8)Separating spells into two categories (????)

**
Rep:
Level 90
Name: Steal
Description: Depending upon the stats of the spell may
1) Steal gold according to the effect rating
2) Steal an item (the item you get and amount depends on effect rating and variance and evasion)
3) Steal gold according to the enemy's drop gold
4) Steal an item according to the enemy's drop item the amount depends on evasion

Name: Mug
Description: Does the above and attacks

Alot of steps in this one so don't get confused

Create two spells steal gold and steal item don't set anything on them yet
two status effects (stolen gold and stolen item make their rating 0 so it won't show up these status effects are here so you can't steal from the same enemy twice and since the rating is zero it won't show up) Create a common event with this in it (If you did X Attack make a copy and edit it so that it is like this)
if [Variable THREE] == 1
Force an action of attack executing now on first hero on last target chosen
end

if [Variable THREE] == 2
Force an action of attack executing now on second hero on last target chosen
end

if [Variable THREE] == 3
Force an action of attack executing now on third hero on last target chosen
end

if [Variable THREE] == 4
Force an action of attack executing now on fourth hero on last target chosen
end

REMEMBER ALL ID'S OF THE THINGS YOU CREATED

Onto the script editor
You should know where to add these two (Scene_Battle 3)
Code: [Select]

      when "Steal"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 16
       start_enemy_select
      when "Mug"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 17
       start_enemy_select


Now goto Scene_Battle 4
Code: [Select]

  if @active_battler.current_action.basic == 16
  @skill = $data_skills[???] #<-- to steal gold or steal items id here
  @status_window.refresh
  @help_window.set_text("Steal", 1)
  @animation1_id = @skill.animation1_id
  @animation2_id = @skill.animation2_id
  index = @active_battler.current_action.target_index
  @target_battlers.push($game_troop.smooth_target_enemy(index))
  for target in @target_battlers
  target.steal_effect(@active_battler, @skill, @skill.int_f, false)
  end
  end
 
 if @active_battler.current_action.basic == 17
      @skill = $data_skills[???] #Steal gold or steal item goes here
      if @active_battler == $game_party.actors[0]
      $game_variables[??] = 1 #The variable in the common event goes here
      end
      if @active_battler == $game_party.actors[1]
      $game_variables[??] = 2
      end
      if @active_battler == $game_party.actors[2]
      $game_variables[??] = 3
      end
      if @active_battler == $game_party.actors[3]
      $game_variables[??] = 4
      end
      @status_window.refresh
      @help_window.set_text("Steal", 1)
      @animation1_id = @skill.animation1_id
      @animation2_id = @skill.animation2_id
      @common_event_id = ??? #Common event id
      index = @active_battler.current_action.target_index
      @target_battlers.push($game_troop.smooth_target_enemy(index))
      for target in @target_battlers
      target.steal_effect(@active_battler, @skill, @skill.int_f, true)
      end


Add this new method to game_battler 3 and now edit the skills to your desire
, that is after you read the commented section on how to edit it!
Code: [Select]

#--------------------------------------------------------------------------
  # ? steal_effect (my first major method :) ) version 1
  #  the skill effects
  # accurary determines the chance to steal modifier
  # elements aren't used so you don't have to check them
  # the agi(30%), dex(20%), and int(50%) stats determine how much more gold you get and chance
  # magic defense (theft defense) is the enemies steal defense (DON'T SET TOO HIGH)
  # status effects are used
  # effect rating determines the item you get or the gold you get
  # the evasion then determines the number of that item you get
  # If "MAGIC" equals any of these (if it doen't nothing will be stolen) then either of the following will happen
  # tosteal = 1 steals gold according to effect rating
  # tosteal = 2 steals an item the item id is the effect rating
  # tosteal = 3 steals gold according to the enemies drop gold
  # tosteal = 4 steals an item the item is the enemies drop item
  # variance tells the variance, but if tosteal = 2 then It determines
  # the type of item 1 for weapon 2 for armor 3 for item
  #
  #Pointers
  #I wouldn't set the agility and dexerity ratings too high or else you'll have some rich players
  # set agility to (10-50) and dex to (5-30) for best results
  # if MAGIC = 2 then you can ONLY steal the item the effect rating and variance is pointing to
  # remember the enemies drop probability you can set it to 0%!!!
  # If a enemy doesn't drop a (item,weapon,armor) then the steal automatically fails (I made it say NO ITEM)
  # Example of a good steal
  # effect rating 100
  # dexerity 25
  # agility 50
  # MAGIC 1
  # Magic defense 20
  # variance 20
  #--------------------------------------------------------------------------
 def steal_effect(attacker, skill, tosteal, mug)
    self.steal = true
    self.damage = 0
    self.critical = false
    hit_result = (rand(100) > self.dex / attacker.agi * attacker.int / self.int * skill.hit / 100)
    #need to fix hit result because the chance of success is too high
        if hit_result == true
            case tosteal
            when  1
                unless self.states.include?(STOLE GOLD ID)
                    add_state(STOLE GOLD ID)
                    power = skill.power + attacker.dex * skill.dex_f / 100
                    power += attacker.int * 100 / self.int  + attacker.agi * skill.agi_f / 67
                        if power > 0
                            power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
                            power = [power, 0].max
                        end
                    self.damage = power
                        if skill.variance > 0 and self.damage.abs > 0
                            amp = [self.damage.abs * skill.variance / 100, 1].max
                            self.damage += rand(amp+1) + rand(amp+1) - amp
                        end
                    $game_party.gain_gold(self.damage)
                        if mug == true
                            self.steal = false
                            self.second_steal = true
                            self.second_damage = 0
                            self.second_damage += self.damage
                            self.second_damage_pop = true
                            self.damage = 0
                            mug
                        end
                    else
                    self.steal = false
                    self.damage = "Failed"
                end
            when 2
                unless self.states.include?(STOLE ITEM ID)
                add_state(STOLE ITEM ID)
                    case skill.variance
                    when 1
                      $game_party.gain_weapon(skill.power, skill.eva_f)
                      self.damage = skill.eva_f.to_s + " " +$data_weapons[skill.power].name
                    when 2
                      $game_party.gain_armor(skill.power, skill.eva_f)
                      self.damage = skill.eva_f.to_s + " " +$data_armors[skill.power].name
                    when 3
                      $game_party.gain_item(skill.power, skill.eva_f)
                      self.damage = skill.eva_f.to_s + " " +$data_items[skill.power].name
                    end
                    if mug == true
                      self.steal = false
                      self.second_steal = true
                      self.second_damage = 0
                      self.second_damage += self.damage
                      self.second_damage_pop = true
                      self.damage = 0
                      mug
                    end
                  else
                self.steal = false
                self.damage = "Failed"
                end
            when 3
                unless self.states.include?(STOLE GOLD ID)
                    add_state(STOLE GOLD ID)
                    power = self.gold + attacker.dex * skill.dex_f / 100
                    power += attacker.int * skill.int_f / 50 + attacker.agi * skill.agi_f / 67
                    if power > 0
                        power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
                        power = [power, 0].max
                    end
                    self.damage = power
                    if skill.variance > 0 and self.damage.abs > 0
                        amp = [self.damage.abs * skill.variance / 100, 1].max
                        self.damage += rand(amp+1) + rand(amp+1) - amp
                    end
                    $game_party.gain_gold(self.damage)
                    if mug == true
                        self.steal = false
                        self.second_steal = true
                        self.second_damage = 0
                        self.second_damage += self.damage
                        self.second_damage_pop = true
                        self.damage = 0
                        mug
                    end
                  else
                self.steal = false
                self.damage = "Failed"
                end
            when 4
                unless self.states.include?(STOLE ITEM ID)
                add_state(STOLE ITEM ID)
                if self.weapon_id != 0
                    $game_party.gain_weapon(self.weapon_id, skill.eva_f)
                    self.damage = skill.eva_f.to_s + " " +$data_weapons[skill.power].name
                elsif self.armor_id != 0
                    $game_party.gain_armor(self.armor_id, skill.eva_f)
                    self.damage = skill.eva_f.to_s + " " +$data_armors[skill.power].name
                elsif self.item_id != 0
                    $game_party.gain_item(self.item_id, skill.eva_f)
                    self.damage = skill.eva_f.to_s + " " +$data_items[skill.power].name
                else
   self.damage = "No Item"
end
                if mug == true
                    self.steal = false
                    self.second_steal = true
                    self.second_damage = 0
                    self.second_damage += self.damage
                    self.second_damage_pop = true
                    self.damage = 0
                    mug
                  end
                else
              self.steal = false
              self.damage = "Failed"
              end
            end #ends the first case statement
                   
          else
          self.steal = false
          self.damage = "Failed"
          end
        return true
  end


some screenshots of the steal command in action

STEAL SUCCESS


enemy with a 0% chance get item


prying that item of its hands


if you want the damage to display stolen blah blah like mine then do the following (If you don't then delete all instances of self.steal and self.second_steal) goto Color Fix (if you don't have this class get it)

edit the damage method's name to def damage(damage, critical, restorative, steal)
 
change this
Code: [Select]

if damage.is_a?(Numeric) and damage < 0
bitmap.font.color.set(176, 255, 144)
elsif restorative
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end

to
Code: [Select]

if damage.is_a?(Numeric) and damage < 0
bitmap.font.color.set(176, 255, 144)
elsif restorative
bitmap.font.color.set(176, 255, 144)
elsif steal
bitmap.font.color.set(255, 215, 0) #A Golden color
else
bitmap.font.color.set(255, 255, 255)
end


add this after the if critical block
Code: [Select]

if steal
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 36, "STOLEN", 1)
bitmap.draw_text(+1, -1, 160, 36, "STOLEN", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "STOLEN", 1)
end


add these variables in Color fix ignore the second_(name) variables and delete them from my method (from Game_Battler 3) if you don't have the second_damage_pop if block
Code: [Select]

attr_accessor :steal
attr_accessor :second_steal
@steal = false
@second_steal = false    



change the damage_pop if block to this
Code: [Select]

if @battler.damage_pop
damage(@battler.damage, @battler.critical, @battler.restorative, @battler.steal)
@battler.damage = nil
@battler.critical = false
@battler.damage_pop = false
@battler.restorative = false
@battler.steal = false
end


if you have my second_damage_pop block then change it to this
Code: [Select]

if @battler.second_damage_pop
damage(@battler.second_damage, @battler.second_critical, @battler.second_restorative, @battler.second_steal)
@battler.second_damage = nil
@battler.second_critical = false
@battler.second_damage_pop = false
@battler.second_restorative = false
@battler.second_steal = false
end


If this doesn't work post that it doesn't work and your email and I'll send a project file with the code in it

**
Rep:
Level 90
The X magic script will take me longer to make than expected (the code for it didn't work the way I wanted so I started over) And this is the last call for requests because after I finish the last script I will not be making any more commands (unless you ask me when I'm in a good mood)

**
Rep: +0/-0Level 90
Hmm.. I seem to have many problems with your last script, the steal and mug command. Would you mind putting it in a project so that I can download it?

**
Rep:
Level 90
Quote from: rune76
Hmm.. I seem to have many problems with your last script, the steal and mug command. Would you mind putting it in a project so that I can download it?


could you tell me the problem/error

**
Rep: +0/-0Level 90
Ok, first of all I get an undefined method 'steal_effect' in Scene_Battle 4 for Game_Enemy. So I tried to put the definition steal_effect in Game_Enemy, however that didn't work very well... Maybe I'm just missing something, but could you tell me what to do to get it working?  :?

****
Rep: +0/-0Level 91
[off topic] I can see you are using a program to take screenshots, and it is putting an annoying little thing on them. Just press the print screen key, then open paint and right-click, paste, and viola, screenshot. If you just want the currently opened window (like most people), use ctrl+alt+print screen, open paint, right-click, paste. Simple screenshots, no programs, no annoying stamps.[/off topic]
At least I have chicken.
--------------------------------------------------------

**
Rep: +0/-0Level 90
Or instead of pressing ctrl+alt+Print Screen Just press alt+Print Screen  :lol:

**
Rep:
Level 90
Quote from: Leeroy_Jenkins
[off topic] I can see you are using a program to take screenshots, and it is putting an annoying little thing on them. Just press the print screen key, then open paint and right-click, paste, and viola, screenshot. If you just want the currently opened window (like most people), use ctrl+alt+print screen, open paint, right-click, paste. Simple screenshots, no programs, no annoying stamps.[/off topic]

thanks I was getting tired of that stamp but I've never heard off using crtl alt print scrn to make screenshots wll I guess you learn something new everyday  :D

**
Rep:
Level 90
Quote from: rune76
Ok, first of all I get an undefined method 'steal_effect' in Scene_Battle 4 for Game_Enemy. So I tried to put the definition steal_effect in Game_Enemy, however that didn't work very well... Maybe I'm just missing something, but could you tell me what to do to get it working?  :?


steal_effect belongs in Game_Battler 3 anywhere you want

**
Rep: +0/-0Level 90
Yeah, maybe. But the problem's still there... The line is like this:
target.steal_effect(@active_battler, @skill, @skill.int_f, false)
And because the target is defined as Game_Enemy there's an error... Maybe I put that code in the wrong place or something...
Please, would you put it in a project? I'd really like to have that code  :cry:

**
Rep:
Level 90
Quote from: rune76
Yeah, maybe. But the problem's still there... The line is like this:
target.steal_effect(@active_battler, @skill, @skill.int_f, false)
And because the target is defined as Game_Enemy there's an error... Maybe I put that code in the wrong place or something...
Please, would you put it in a project? I'd really like to have that code  :cry:


Did you put the code at the very bottom (the end) of the Game_Battler 3 class if you did just put the code between the attack_effect and skill_effect methods I'm positive that there are no errors in the steal_effect method because I just reread that script for errors so it's either you added a script that conflicts with mine or you made a mistake adding the code If that doesn't work then I'll send the project with the code by email

**
Rep:
Level 90
Replace Game_Battler 3 method steal_effect with this one
Code: [Select]

  #--------------------------------------------------------------------------
  # ? steal_effect Version 1.2
  # by trickster
  #
  # fixes in this version
  # fixes the accuracy of the steal it used to always work
  # if accuracy is 100 then it will always work
  # but if accuracy is 0 doesn't mean it won't always work
  #
  # the skill effects
  # accurary determines the chance to steal
  # elements aren't used so you don't have to check them
  # the agi(30%), dex(20%), and int(50%) ratings determine how much more gold you get
  # magic defense (theft defense) is the enemies steal defense
  # the dexerity and intelligence of the battler and the agility and intelligence of the enemy determines chance
  # strength and attack power and physical defense determine the damage
  # status effects aren't used (sorry about that)
  # effect rating determines the item you get or the gold you get
  # variance tells the variance, but if tosteal = 2 then It determines
  # the type of item 1 for weapon 2 for armor 3 for item
  # the evasion then determines the number you get
 
  # agility|dexterity|result
  #    =         =        hard
  #    >         <       very hard
  #    <          >       very easy
  #   >>       <<      impossible
  #  <<        >>     always
 
  # Third argument tosteal
  # tosteal = 1 steals gold according to effect rating
  # tosteal = 2 steals an item the item id is the effect rating
  # tosteal = 3 steals gold according to the enemies drop gold
  # tosteal = 4 steals an item the item is the enemies drop item
 
  #Fourth argument mug
  #set to true to attack and steal false to steal only
 
  #Pointers
  #I wouldn't set the agility and dexerity ratings too high or else you'll have some rich players :)
  # set agility to (10-50) and dex to (5-30) for best results
  # if MAGIC = 2 then you can ONLY steal the item the effect rating and variance is pointing to
  # remember the enemies drop probability you can set it to 0%!!!
  # If a enemy doesn't drop a (item,weapon,armor) then the steal automatically fails (I made it say NO ITEM)
  # Example of a good steal
  # effect rating 100
  # dexerity 25
  # agility 50
  # MAGIC 1
  # Magic defense 20
  # variance 20
  # Accuracy (30%-80%)
  #--------------------------------------------------------------------------
  def steal_effect(attacker, skill, tosteal, mug)
    self.steal = true
    self.damage = 0
    self.critical = false
    hit_result = (rand(100) > self.agi / attacker.dex * self.int / attacker.int * (100 - skill.hit))
        if hit_result == true
            case tosteal
            when  1
                unless self.states.include?(36) #YOUR STEAL GOLD ID HERE
                    add_state(36) #YOUR STEAL GOLD ID HERE
                    power = skill.power + attacker.dex * skill.dex_f / 100
                    power += attacker.int * 100 / self.int  + attacker.agi * skill.agi_f / 67
                        if power > 0
                            power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
                            power = [power, 0].max
                        end
                    self.damage = power
                        if skill.variance > 0 and self.damage.abs > 0
                            amp = [self.damage.abs * skill.variance / 100, 1].max
                            self.damage += rand(amp+1) + rand(amp+1) - amp
                        end
                    $game_party.gain_gold(self.damage)
                        if mug == true
                            self.steal = false
                            self.second_steal = true
                            self.second_damage = 0
                            self.second_damage += self.damage
                            self.second_damage_pop = true
                            self.damage = 0
                        end
                    else
                    self.steal = false
                    self.damage = "Failed"
                end
            when 2
                unless self.states.include?(37) #YOUR STEAL ITEM ID HERE
                add_state(37) #YOUR STEAL ITEM ID HERE
                    case skill.variance
                    when 1
                      $game_party.gain_weapon(skill.power, skill.eva_f)
                      self.damage = skill.eva_f.to_s + " " +$data_weapons[skill.power].name
                    when 2
                      $game_party.gain_armor(skill.power, skill.eva_f)
                      self.damage = skill.eva_f.to_s + " " +$data_armors[skill.power].name
                    when 3
                      $game_party.gain_item(skill.power, skill.eva_f)
                      self.damage = skill.eva_f.to_s + " " +$data_items[skill.power].name
                    end
                    if mug == true
                      self.steal = false
                      self.second_steal = true
                      self.second_damage = 0
                      self.second_damage += self.damage
                      self.second_damage_pop = true
                      self.damage = 0
                    end
                  else
                self.steal = false
                self.damage = "Failed"
                end
            when 3
                unless self.states.include?(36) #YOUR STEAL GOLD ID HERE
                    add_state(36)#YOUR STEAL GOLD ID HERE
                    power = self.gold + attacker.dex * skill.dex_f / 100
                    power += attacker.int * skill.int_f / 50 + attacker.agi * skill.agi_f / 67
                    if power > 0
                        power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
                        power = [power, 0].max
                    end
                    self.damage = power
                    if skill.variance > 0 and self.damage.abs > 0
                        amp = [self.damage.abs * skill.variance / 100, 1].max
                        self.damage += rand(amp+1) + rand(amp+1) - amp
                    end
                    $game_party.gain_gold(self.damage)
                    if mug == true
                        self.steal = false
                        self.second_steal = true
                        self.second_damage = 0
                        self.second_damage += self.damage
                        self.second_damage_pop = true
                        self.damage = 0
                    end
                  else
                self.steal = false
                self.damage = "Failed"
                end
            when 4
                unless self.states.include?(37) #YOUR STEAL ITEM ID HERE
                add_state(37) #YOUR STEAL ITEM ID HERE
                if self.weapon_id != 0
                    $game_party.gain_weapon(self.weapon_id, skill.eva_f)
                    self.damage = skill.eva_f.to_s + " " +$data_weapons[self.weapon_id].name
                elsif self.armor_id != 0
                    $game_party.gain_armor(self.armor_id, skill.eva_f)
                    self.damage = skill.eva_f.to_s + " " +$data_armors[self.armor_id].name
                elsif self.item_id != 0
                    $game_party.gain_item(self.item_id, skill.eva_f)
                    self.damage = skill.eva_f.to_s + " " +$data_items[self.item_id].name
                end
                if mug == true
                    self.steal = false
                    self.second_steal = true
                    self.second_damage = 0
                    self.second_damage += self.damage
                    self.second_damage_pop = true
                    self.damage = 0
                  end
                else
              self.steal = false
              self.damage = "Failed"
              end
            end #ends the first case statement
                   
          else
          self.steal = false
          self.damage = "Failed"
          end
        return true
  end
 

**
Rep:
Level 90
In Programming it is better to have general methods than specific methods In order to make your methods more general you should use variables in your code so here's a better way to make battle command that links to a spell

add this variable to class Game_BattleAction
Code: [Select]

  attr_accessor :spell


same class method clear
Code: [Select]

    @spell = 0


now for the general spellcasting script
Code: [Select]

      when "NAME"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 18 #This stays the same
        @active_battler.current_action.spell = 303 #Skill ID HERE
       start_enemy_select (1*)


note: 1* if the scope of the skill is all enemies or all actors then that should be phase3_next_actor if the scope is an actor then that should be start_actor_select


Code: [Select]

      if @active_battler.current_action.basic == 18
     #This is where the variable takes action
      @skill = $data_skills[@active_battler.current_action.spell]
      @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)
      for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
  end


And you're done  :^^:

**
Rep:
Level 90
I'm moving on to two separate skill commands and I'll have that ready later tomorrow (I know how to do it now   :^^: ) They will be separated by their attribute

**
Rep:
Level 90
You only have to do this one unless you want three separate lists then you have to do this twice

Create an attribute called second skill list or something remeber the id

Make copies of Window_skill and Window_skillstatus and rename them to Window_name and Window_namestatus
now goto Window_name and look for this if block
Code: [Select]

    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil
        @data.push(skill)
      end
    end

and replace it with this
Code: [Select]

    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil and skill.element_set.include?(ELEMENT ID)
        @data.push(skill)
      end
    end

look for that same block in Window_skill and replace it with this
Code: [Select]

    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil and not skill.element_set.include?(ELEMENT ID)
        @data.push(skill)
      end
    end


now skills with the element Id set on them will not appear on the battle command skills and they will appear in the new command

next make a copy of scene_skill and rename it to scene_name and replace all of the code in it to this
[code]
class Scene_Name
  #--------------------------------------------------------------------------
  # ? ?????????
  #     actor_index : ??????????
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #--------------------------------------------------------------------------
  def main
    # ???????
    @actor = $game_party.actors[@actor_index]
    # ???????????????????????????????
    @help_window = Window_Help.new
    @status_window = Window_NameStatus.new(@actor)
    @name_window = Window_Name.new(@actor)
    # ?????????????
    @name_window.help_window = @help_window
    # ????????????? (???

**
Rep: +0/-0Level 90
Sorry, I haven't got it to work yet... :( If you wish to send me the project then my e-mail is tillman_matte@hotmail.com.

**
Rep:
Level 90
Quote from: rune76
Sorry, I haven't got it to work yet... :( If you wish to send me the project then my e-mail is tillman_matte@hotmail.com.

email sent if you want to test it out then do a test battle with the monster group with a turn 0 battle event

**
Rep: +0/-0Level 90
Thank you very much! :D
It works! :)