View Single Post
 
Reply
Posted 2008-02-21, 04:00 PM in reply to Coriander's post "A question that i need answered asap"
Code:
#Script by poccil on www.rmxp.org.
#Originally created for xthexendxhasxcomex on the same site.
#Please use with credit. 
#- Atnas. :3

class Window_Command
  attr_accessor :commands
end

class Scene_Battle
  alias :petero_skillcommand_Scene_Battle_phase3_setup_command_window phase3_setup_command_window
  def phase3_setup_command_window
    # Disable party command window
    @party_command_window.active = false
    @party_command_window.visible = false
    # Enable actor command window
    @actor_command_window.active = true
    @actor_command_window.visible = true
    # Set actor command window position
    @actor_command_window.x = @actor_index * 160
    # Set index to 0
    @actor_command_window.index = 0
    @actor_command_window.commands[1]=skillCommand(@active_battler)
    @actor_command_window.refresh
  end
  # Returns the text to replace the default "Skill" depending on class
  def skillCommand(battler)
    case battler.class_id
     when 1
      return "Fighter Skill"
     when 2
      return "Lancer Skill"
     when 3
      return "Warrior Skill"
     else
      return "Skill"
    end
  end
end
Where it has the strings at the end, replace them with your own names based on the class ID. For example, if Zen Fuyu is a martial artist, and Martial Artist is class #1 in the Database, you would replace 'return "Fighter Skill"' with return '"Martial Arts"'.

This may not work if your battle system changes the default skill command class in any way, tell me if it doesn't work and I will make it compliant.


-------

GLG, you can do anything in RMXP.

Last edited by Atnas; 2008-02-21 at 04:22 PM.
Old
Profile PM WWW Search
Atnas shows clear signs of ignorance and confidence; the two things needed to succeed in lifeAtnas shows clear signs of ignorance and confidence; the two things needed to succeed in life
 
 
Atnas