Jump to content
Rpg²S Forum

PrinceEndymion88

Utenti
  • Posts

    209
  • Joined

  • Last visited

Posts posted by PrinceEndymion88


  1. Ho trovato lo script è contenuto in XAS - Hero Edition 1.5d io ho copiato la parte che mi interessa ma se lo aggiungo mi da errore alla riga 31 ecco lo script

    #===============================================================================# By Xiderowg / 桜雅 在土 # http://xms.rdy.jp/# http://scriptshelf.jpn.org/x/#===============================================================================module XRXS_BreakActs  SUFFIX = "_ANI"  WCOUNT = 0  def character_name    filename = super    if @breakacting      new_name = filename + SUFFIX      filename = new_name if RPG_FileTest.character_exist?(new_name)    end    return filename  end  def breakact=(b)    @breakacting = b    @step_anime  = b  end  def update    super    if controllable?      if @breakact_count.to_i > 0        @breakact_count -= 1      else        self.breakact = true      end    else      @breakact_count = WCOUNT      unless self.action != nil  or $game_map.starting? or             self.knockbacking?      self.breakact = false      end    end  endendclass Game_Player < Game_Character  include XRXS_BreakActsendclass Game_Player < Game_Character  def controllable?      return !(moving? or $game_system.map_interpreter.running? or            @move_route_forcing or $game_temp.message_window_showing or             Input.trigger?(Input::C) or Input.press?(Input::C) or            Input.trigger?(Input::Y) or Input.trigger?(Input::Z) or            Input.trigger?(Input::A)) endend

     

    Forse richiede altre parti presenti nella demo ovvero questo script:

    #===============================================================================# ---> XIDEROWG ACTION SYSTEM) <--- #    (XRXS64 Self Action System)    #===============================================================================# By Xiderowg / 桜雅 在土 # http://xms.rdy.jp/# http://scriptshelf.jpn.org/x/#===============================================================================# Hero Edition -> Support / Updates / Add-ons / Tutorial # http://www.atelier-rgss.com/RGSS/Battle/XAS_00.html#===============================================================================     #===============================================================================# XAS - System Config#===============================================================================module XAS_COMMAND#Command keys setup.#-------RMXP Button--# #  A B C X Y Z L R   # #------Keyboard------#     Keyboard equivalence. #  Z B C A S D Q W   #         (Default)#--------------------##Usa a skill.  SKILL_ACTION = Input::Y  #Change the skill to be used on the map.SKILL_CHANGE = Input::R#Use item.ITEM_ACTION = Input::Z #Change the item to be used on the map.ITEM_CHANGE = Input::L #Attack with the equipped weapon.SLASH_ACTION = Input::C#Use shield.SHIELD_ACTION = Input::A    end#-------------------------------------------------------------------------------# HUD_CONFIG#-------------------------------------------------------------------------------module XAS_HUD#Item and skills windows' position.  WINDOW_SKILL_X = 550 WINDOW_SKILL_Y = 370WINDOW_ITEM_X = 480 WINDOW_ITEM_Y = 370#Game Switch ID of the swotch that deactivate the item and skill windows.HIDE_WINDOW = 5endmodule XAS_BA#Definition of the sound when the Hero gets damaged.  HERO_HIT_SE = RPG::AudioFile.new("Mana - Duran_Hit", 100, 100)#-------------------------------------------------------------------------------      # IMPORTANT! => Whenever I refer to the word TOOL I'm refering to either a weapon/item/armor.# Specific definition of the animation of damage of the TOOL.# ATTACK_ANI_HIT = {A=>B,A=>B...}# A = TOOL ID.# B = Animation ID.  ATTACK_ANI_HIT = {# A  B           1=>14,            #Bronze Sword  2=>27,            #Fire Sword  3=>45,            #Light Sword  15=>27,           #Fire Ball  20=>30            #Ice Cloud  }#-------------------------------------------------------------------------------    # Default animation definiton of damage animation, when not specified above.   DEFAULT_ATTACK_ANI_HIT = 4#-------------------------------------------------------------------------------    #Definition of which skills will shake the screen on the moment of the hit. # (Place the ID of the TOOL on the left side).  ATTACK_SKILL_SHAKE = [ #ID         #TOOL  14,        #Bomb   16,        #Thunder  18,        #Fire Fist  21,        #Illumina  23,        #Cross Cut  24,        #Chidori  25,        #Ultima Wind  32,        #Bomb Enemy  34,        #Bronze Shield - Left Hand  35         #Heal Shield - Left Hand    ] #-------------------------------------------------------------------------------    # Shake definition.   SH_POWER = 5   #Strength  SH_SPEED = 10  #Speed  SH_DUR   = 20  #Duration(20 = 1 second)#-------------------------------------------------------------------------------  # Activate JUMP HIT, the player jumps when it gets damage.    JUMP_HIT_HERO = true #true => activate false => deactivated#-------------------------------------------------------------------------------  # Definition of which enemies will not have the Jump animation when damage is inflicted.  JUMP_HIT_ENEMY_DISABLE = [  8,     # Great Bird  9      # Great Bird L2  ]#-------------------------------------------------------------------------------  # Definition of the ID of the Game Variable that will define the area of# activation of the action.  SENSOR_VAR = 10#-------------------------------------------------------------------------------          # Definition of which TOOL will be activated when the weapon is equipped## WEP_ID_TOOL = { A=>B, A=>B, ...}## A = ID of Weapon.# B = ID of TOOL. WEP_ID_TOOL = {#   A  B    Weapon Name           1=>1, # Bronze Sword         2=>2, # Fire Sword          3=>3, # Light Sword          4=>4, # Dwarf Axe            5=>5, # Wizard Staff        6=>6, # Elf Bow              7=>7  # Disc                 }#-------------------------------------------------------------------------------              # Definition of the secondary equipment, in this case is the SHIELD function## SECOND_HAND_ID_TOOL = { A=>B, A=>B, ...}# A=>B## A = ID of Armor(SHIELD function).# B = ID of TOOL.SECOND_HAND_ID_TOOL = {#   A  B    Armor Name          1=>34,  #Bronze Shield.   4=>35   #Heal Shield.}    #-------------------------------------------------------------------------------  # Activate automatic Gameover when defeated.    AUTOGAMEOVER = true #true => activate false => deactivated#-------------------------------------------------------------------------------    # ID of the Game Switch that will be activate when the Hero dies.# (Only when the AUTOGAMEOVER variable is False)  GAMEOVER_SWITCH_ID = 4#-------------------------------------------------------------------------------  # Makes the character blink after damage is inflicted.# (The blinking time is the same as the invincible duration)  BLINK_ON = false#-------------------------------------------------------------------------------  # Invincibility time after damage is inflicted.    INVICIBLE_DURATION_HERO = 35 #Duration(20 = 1 second)#-------------------------------------------------------------------------------  # Time in which the hero is paralyzed after damage is inflicted.      KNOCK_BACK_DURATION_HERO = 30 #Duration(20 = 1 second)#-------------------------------------------------------------------------------  # Default time of invincibility and paralyzes of the enemy after# damage is inflicted.    DEFAULT_INVICIBLE_DURATION_ENEMY = 60 #Duration(20 = 1 second)#-------------------------------------------------------------------------------  # Specific time in which the enemy is "rooted" and invincible# after damage is inflicted.## A=>B## A = ID of the enemy (Enemy Troops).# B = Invincibility duration.  INVICIBLE_DURATION_ENEMY = {# A  B   1=>1,    #TRAP ENEMY.  2=>45,   #Sahagin.  5=>30,   #Honeyman.  6=>140   #ARCHER.  }   #-------------------------------------------------------------------------------  # Speed of knock back of the sprite after damage is inflicted.# (Hero and Enemy alike)  KNOCK_BACK_SPEED = 5#-------------------------------------------------------------------------------  # ME sound definition when the hero Levels UP.    LEVEL_UP_ME = RPG::AudioFile.new("007-Fanfare01")#-------------------------------------------------------------------------------  # SE definition to pic an item dropped by the enemy on the ground.    ITEMDROP_SE = RPG::AudioFile.new("056-Right02", 70, 140)#-------------------------------------------------------------------------------  # SE definition when the SHIELD function is activated.    SHIELD_SE = RPG::AudioFile.new("097-Attack09", 80, 150)#-------------------------------------------------------------------------------  # Text efinition when the shield function is activated.  SHIELD_TEXT = "Guard"#-------------------------------------------------------------------------------  # Definition of the animation's ID when the SHIELD function is activated.  SHIELD_ANI  = 64#-------------------------------------------------------------------------------  end#===============================================================================# XAS - Item Config#===============================================================================module XAS  # Definition of the TOOLS that match to the items on the database.## A=>B## A = ID of the TOOL.# B = ID of the item on the databse.  ITEM_COST = {# A / B   Name      8=>1,  #Potion.  9=>2,  #Hi Potion.  10=>3, #Ether.  11=>4, #Hi Ether.  12=>5, #Remedy.  13=>6, #Elixir.  14=>7, #Bomb.  6=>8   #Elf Bow(Arrow)  }end#===============================================================================# XAS - Enemy Config#===============================================================================module XAS_BA_ENEMY# Activate the animation when the enemy dies.# Duration of the animation proportional to the time# of collapse, the default time is of 40Frames(2s).# DEF_ANI = {A=>B, A=>B, A=>B...}# A = ID of the Enemy. # B = ID of the Animation.  DEF_ANI = {  2=>119,     #Fishman  3=>121,     #Chibi Devil   4=>122,     #Scorpion  5=>120,     #Honeyman     6=>119,     #Archer  7=>121,     #Knight  8=>122,     #Great Bird   (Boss)  9=>122      #Great Bird L2(Boss)    }  #-------------------------------------------------------------------------------  # Definition of the enemy that will have one of the sides invulnerable.  ## A=>[B]## A = ID of the Enemy# B = Direction in which the enemy will be invulnerable.##(2 = Frontal Defense.) #(4 = Left Defense.)#(6 = Right Defense.)#(8 = Back defense.)  SHILED_DIRECTIONS = {  1=>[2,4,6,8],   # Trap Enemy  7=>[2]          # Knight  } #-------------------------------------------------------------------------------    # Definition of which kinds of TOOLs (Skills) the enemy will be invulnerable to. ## A=>[B,B,B,B,B,B...]## A = ID of the Enemy.# B = ID of the TOOL that will not have effect on the enemy.  SHILED_ACTIONS = {    2=>[28,33],                  # Sahagin    3=>[28,33],                  # Chibi Devil    4=>[1,2,3,4,5,6,7,15,16,17,18,19,20,23,33,34,35], # Scorpion    5=>[28,33],                  # Honeman    6=>[28,33],                  # Archer    7=>[28,33],                  # Knight    8=>[6,15,16,17,18,19,20,23,34,35], # Great Bird   (Boss)    9=>[6,15,16,17,18,19,20,23,34,35]  # Great Bird L2(Boss)  }#-------------------------------------------------------------------------------    # Definition of the enemies that will have the knockback deactivated.  KNOCK_BACK_DISABLES = [  1,  # Trap Enemy  4,  # Scorpion  8,  # Great Bird  9   # Great Birt L2  ]#-------------------------------------------------------------------------------    # Definition of the extra size (Area) of the enemy, in other words, define the# area of impact of the enemy.## BODY_SQUARE = {A=>B, A=>B, A=>B...}## A = ID of the Enemy. # B = Value of the extra size of the enemy.  BODY_SQUARE = {}#-------------------------------------------------------------------------------    # Automatic avtivation of the Game Switch when the enemy dies.## A=>B## A = ID of the Enemy.# B = ID of the Game Switch that will be activated when the enmy dies  DEFEAT_SWITCH_IDS = {  8=>57,   #Great Bird     - End of the tutorial.  9=>57    #Great Bird L2  - End of the tutorial.    }      end#===============================================================================# XAS - Customization of the TOOL Map.#===============================================================================module XAS  # ID of the Game Variable of impact of the TOOLs.    HIT_ID = 3# ID of map in which the TOOLs events will be.    ACTION_TEMPLATE_MAP_ID = 1end#===============================================================================# XAS - General event customization.#===============================================================================module XAS_BA# Variable that defines the ID of the enemy.    ENEMY_ID_VARIABLE_ID = 4# Sensor that defines the page of action of the enemy.    SENSOR_SELF_SWITCH   = "D"# Definition of the Game Variable that will register the amount of defeated# enemies.  DEFEAT_NUMBER_ID = 999  end #===============================================================================# XAS - SCENE_SKILL_AX #===============================================================================module XAS_WINDOW_SKILL#Text of the Equipped Skill.  EQUIPPED = "Equipped"  #Texto de ajuda inicial.PRESS = "Press C to equip"#Button to equip a skill.BUTTON = Input::C# Activate the gain of TOOLs by the gain of skills per level# and by the adition and removal of the Skill using the command of events# (Only with the change button activated.)LVGAINGOOD = false end  #===============================================================================# XAS - SCENE_ITEM_AX #===============================================================================module XAS_WINDOW_ITEM#Definition of th item ID that will match to the ID of which TOOL.# XASITEM_ID = {A=>B, A=>B,...}# A = ID of the Item# B = ID of the TOOLXASITEM_ID = {# A  B     Name of the item                1=>8,    # Potion   2=>9,    # HI-Potion  3=>10,   # Ether  4=>11,   # HI-Ether  5=>12,   # Remedy  6=>13,   # Elixir  7=>14    # Bomb}  #Text of equipped item.EQUIPPED = "Equipped"  #Initial help text.PRESS = "Press C to equip"#Button to equip the item.BUTTON = Input::Cend#===============================================================================                                       #===============================================================================# XAS EX - SYSTEM  (XRXS64 Self Action System)#===============================================================================$xrxs = {} if $xrxs == nil$xrxs["xas"] = true$mogscript = {} if $mogscript == nil#===============================================================================# RPG_FileTest#===============================================================================module RPG_FileTest  def RPG_FileTest.character_exist?(filename)    return RPG::Cache.character(filename, 0) rescue return false  end  def RPG_FileTest.picture_exist?(filename)    return RPG::Cache.picture(filename) rescue return false  end  def RPG_FileTest.battler_exist?(filename)    return RPG::Cache.battler(filename, 0) rescue return false  endend#===============================================================================# L14#===============================================================================class Bitmap  def draw_hemming_text(x, y, w, h, text, align = 0)    original_color = self.font.color.dup    self.font.color = Color.new(0,0,0,255)    self.draw_text(x  , y  , w, h, text, align)    self.draw_text(x  , y+2, w, h, text, align)    self.draw_text(x+2, y+2, w, h, text, align)    self.draw_text(x+2, y  , w, h, text, align)    self.font.color = original_color    self.draw_text(x+1, y+1, w, h, text, align)  endendmodule RPG_FileTest  def RPG_FileTest.character_exist?(filename)    return RPG::Cache.character(filename, 0) rescue return false  end  def RPG_FileTest.picture_exist?(filename)    return RPG::Cache.picture(filename) rescue return false  end  def RPG_FileTest.battler_exist?(filename)    return RPG::Cache.battler(filename, 0) rescue return false  endendclass Sprite_Number < Sprite  attr_reader   :w  def initialize(font = Font.new)    super()    self.bitmap = Bitmap.new(1,1)    self.bitmap.font = font    max = s = 0    for i in 0..9      s = self.bitmap.text_size(i.to_s).width      max = s if max < s    end    @w = max + 2    @h = font.size + 2    self.bitmap.dispose    self.bitmap = Bitmap.new(@w, @h * 10)    self.bitmap.font = font    (0..9).each {|n| self.bitmap.draw_hemming_text(0, @h * n, @w, @h, n.to_s) }    self.src_rect.height /= 10  end  def number=(n)    self.src_rect.y = n * @h  end  def n=(n)    self.number = n  endendclass Spriteset_Numbers  attr_reader   :x  attr_reader   :y  attr_reader   :z  attr_reader   :visible  def initialize(font = Font.new)    @font = font    @numbers = []    @x = 0    @y = 0    @z = 0    @visible = true  end  def number=(n)    @numbers.each{|number| number.n = 10 }    d = (n == 0 ? 0 : Math.log10(n).to_i)    for i in 0..d      @numbers[i] = Sprite_Number.new(@font) if @numbers[i] == nil      @numbers[i].n = n % 10      @numbers[i].visible = true      n /= 10    end    self.x = self.x    self.y = self.y    self.z = self.z  end  def n=(n)    self.number=(n)  end  def x=(n)    @x = n    for i in 0...@numbers.size      @numbers[i].x = n      n -= @numbers[i].w    end  end  def y=(n)    @y = n    @numbers.each{|sprite| sprite.y = @y }  end  def z=(n)    @z = n    @numbers.each{|sprite| sprite.z = @z }  end  def visible=(b)    @visible = b    @numbers.each{|sprite| sprite.visible = b }  end  def dispose    @numbers.each{|sprite| sprite.dispose }  endend#===============================================================================# Sprite_Number#===============================================================================class Sprite_Number < Sprite  attr_reader   :w  def initialize(font = Font.new)    super()    self.bitmap = Bitmap.new(1,1)    self.bitmap.font = font    max = s = 0    for i in 0..9      s = self.bitmap.text_size(i.to_s).width      max = s if max < s    end    @w = max + 2    @h = font.size + 2    self.bitmap.dispose    self.bitmap = Bitmap.new(@w, @h * 10)    self.bitmap.font = font    (0..9).each {|n| self.bitmap.draw_hemming_text(0, @h * n, @w, @h, n.to_s) }    self.src_rect.height /= 10  end  def number=(n)    self.src_rect.y = n * @h  end  def n=(n)    self.number = n  endendclass Spriteset_Numbers  attr_reader   :x  attr_reader   :y  attr_reader   :z  attr_reader   :visible  def initialize(font = Font.new)    @font = font    @numbers = []    @x = 0    @y = 0    @z = 0    @visible = true  end  def number=(n)    @numbers.each{|number| number.n = 10 }    d = (n == 0 ? 0 : Math.log10(n).to_i)    for i in 0..d      @numbers[i] = Sprite_Number.new(@font) if @numbers[i] == nil      @numbers[i].n = n % 10      @numbers[i].visible = true      n /= 10    end    self.x = self.x    self.y = self.y    self.z = self.z  end  def n=(n)    self.number=(n)  end  def x=(n)    @x = n    for i in 0...@numbers.size      @numbers[i].x = n      n -= @numbers[i].w    end  end  def y=(n)    @y = n    @numbers.each{|sprite| sprite.y = @y }  end  def z=(n)    @z = n    @numbers.each{|sprite| sprite.z = @z }  end  def visible=(b)    @visible = b    @numbers.each{|sprite| sprite.visible = b }  end  def dispose    @numbers.each{|sprite| sprite.dispose }  endend#===============================================================================# Lib15#===============================================================================class Game_Map  attr_accessor :need_refresh_token  def need_add_tokens    @need_add_tokens = [] if @need_add_tokens == nil    return @need_add_tokens  end  def need_remove_tokens    @need_remove_tokens = [] if @need_remove_tokens == nil    return @need_remove_tokens  end  def add_token(token_event)    @events[token_event.id] = token_event    self.need_add_tokens.push(token_event)    self.need_refresh_token = true  end  def remove_token(token_event)    @events.delete(token_event.id)    self.need_remove_tokens.push(token_event)    self.need_refresh_token = true  end  def clear_tokens    for event in @events.values.dup      remove_token(event) if event.is_a?(Token_Event)    end    channels = ["A", "B", "C", "D"]    for id in 1001..(token_id_shift - 1)      for a in channels        key = [self.map_id, id, a]        $game_self_switches.delete(key)      end    end    clear_token_id  endendclass Game_SelfSwitches  def delete(key)    @data.delete(key)  endendclass Game_Map  def token_id_shift    @token_id  = 1000 if @token_id == nil    @token_id += 1    return @token_id  end  def clear_token_id    @token_id = nil  endendmodule XRXS_CTS_RefreshToken  def refresh_token    for event in $game_map.need_add_tokens      @character_sprites.push(Sprite_Character.new(@viewport1, event))    end    $game_map.need_add_tokens.clear    for sprite in @character_sprites.dup      if $game_map.need_remove_tokens.empty?        break      end      if $game_map.need_remove_tokens.delete(sprite.character)        @character_sprites.delete(sprite)        sprite.dispose      end    end    $game_map.need_refresh_token = false  endendclass Spriteset_Map  include XRXS_CTS_RefreshToken  alias xrxs_lib15_update update  def update    xrxs_lib15_update    refresh_token if $game_map.need_refresh_token  endendclass Scene_Map  alias xrxs_lib15_transfer_player transfer_player  def transfer_player    $game_map.clear_tokens    xrxs_lib15_transfer_player  endendclass Token_Event < Game_Event  def initialize(map_id, event)    event.id = $game_map.token_id_shift    super  end  def erase    super    $game_map.remove_token(self)  endend#===============================================================================# Token Mech#===============================================================================module XRXS_ActionTemplate  map_id = XAS::ACTION_TEMPLATE_MAP_ID  map = load_data(sprintf("Data/Map%03d.rxdata", map_id))  @@events = map.eventsendclass Token_Event < Game_Event  include XRXS_ActionTemplateendclass Game_Temp  attr_accessor :active_tokenendmodule XAS_ACTION  attr_reader   :action  attr_reader   :erased  def shoot(action_id)    return if action_id == 0    item_id = XAS::ITEM_COST[action_id]    if item_id != nil and $game_party.item_number(item_id) == 0      $game_system.se_play($data_system.buzzer_se)      return    end    self.action_attachment(action_id)    n = 1    @action.prelag   = n    skill_id = action_id    skill    = skill_id == nil ? nil : $data_skills[skill_id]    sp_cost  = skill.sp_cost      if self.battler.sp < sp_cost      m = 1      else        m = Database_Bullet::SUFLAGS[action_id].to_i        end    @action.duration = m  end  def action_attachment(action_id)    @action = Game_Action.new(self, action_id)    @action.attachment(action_id)    plan = Database_Bullet::SELF_ANIMATION_PLANS[action_id]    @self_animation_plan = plan.nil? ? nil : plan.dup  end  def action_update    return unless @action.is_a?(Game_Action)    if @self_motion != nil      self.character_name_suffix = @self_motion      @pattern = 0      @pattern_count  = 0      @self_motion = nil      if self.is_a?(Game_Player)      @step_anime = true          end    end    if @self_animation_plan != nil      animation_id = @self_animation_plan[@action.now_count]      self.animation_id = animation_id unless animation_id.nil?    end    if @action.prelag > 0      @action.prelag -= 1      self.shoot_bullet(@action.id) if @action.prelag == 0            return    end    @action.update  end  def check_event_trigger_attack()    if $game_system.map_interpreter.running?      return    end    if @action.nil? or @action.attack_id == 0      return    end    hit_check = false    range = @action.attack_range    hit = []    targets = [$game_player] + (@action.player_damage ? [] : $game_map.events.values)    for event in targets      next if event == self  or              @action.hit_events.include?(event) or              event.jumping? or event.erased      body_size      = event.body_size      event_center_x = event.x      event_center_y = event.y - body_size      dx = event_center_x - self.x      dy = event_center_y - self.y      dx = (dx >= 0 ? [dx - body_size, 0].max : [dx + body_size, 0].min)      dy = (dy >= 0 ? [dy - body_size, 0].max : [dy + body_size, 0].min)      case @action.attack_range_type      when Map::RHOMBUS        hit_check = (dx.abs + dy.abs <= range)      when Map::SQUARE        hit_check = (dx.abs <= range and dy.abs <= range)      when Map::LINE        case self.direction        when 2          hit_check = (dx == 0 and dy >= 0 and dy <= range)        when 8          hit_check = (dx == 0 and dy <= 0 and dy >= -range)        when 6          hit_check = (dy == 0 and dx >= 0 and dx <= range)        when 4          hit_check = (dy == 0 and dx <= 0 and dx >= -range)        end      end      hit.push(event) if hit_check      hit_check = false      end    for event in hit      if event.action_effect(self, self.action.attack_id)        hit_check = true      end      @action.hit_events.push(event)    end    if hit_check      $game_temp.active_token = self    end  end  def action_effect(attacker, attack_id)    return false unless self.is_a?(Game_Event)    for page in @event.pages      if page.condition.variable_valid and         page.condition.variable_id == XAS::HIT_ID and          page.condition.variable_value == attack_id        self.reaction_valid_attack_id = attack_id        self.refresh        @trigger = 0        self.start        return true      end    end    return false  end  def shoot_bullet(action_id)    return false if action_id == 0    item_id = XAS::ITEM_COST[action_id]    if item_id != nil       $game_party.lose_item(item_id, 1)       $game_temp.item_refresh = true      if $mogscript["mpequip"] == true       $eref = true    end              end    bullet_token = Token_Bullet.new(self, action_id)    $game_map.add_token(bullet_token)    @self_motion = Database_Bullet::SELF_MOTIONS[action_id]    return bullet_token  end  def body_size    return 0  end  def action_clear    @action = nil    self.character_name_suffix = nil  endendclass Game_Character  include XAS_ACTIONendmodule XAS_Dispose  def update    action_update    super    if @action.is_a?(Game_Action) and @action.done?      self.action_clear      if self.is_a?(Game_Player)      @step_anime = false          end          end  endendclass Game_Player < Game_Character  include XAS_Disposeendclass Game_Event < Game_Character  include XAS_Disposeendmodule XAS_CharacterName_Suffix  def character_name    character_name = super    file_name = character_name + self.character_name_suffix.to_s    character_name = file_name if RPG_FileTest.character_exist?(file_name)    return character_name  end  attr_accessor :character_name_suffixendclass Game_Player < Game_Character  include XAS_CharacterName_Suffixendclass Game_Event < Game_Character  include XAS_CharacterName_Suffixendmodule XAS_StopToAction  def acting?    return self.action != nil  end  def moving?    return (super or self.acting?)  endendclass Game_Player < Game_Character  include XAS_StopToActionendclass Interpreter  alias xrxs64_command_end command_end  def command_end    @list = nil    event = $game_map.events[@event_id]    return if event == nil    if event.reaction_valid_attack_id      event.reaction_valid_attack_id = nil      event.refresh    end    xrxs64_command_end  endendclass Game_Event < Game_Character  attr_accessor :reaction_valid_attack_id  def refresh    new_page = nil    unless @erased      for page in @event.pages.reverse        c = page.condition        if c.switch1_valid          if $game_switches[c.switch1_id] == false            next          end        end        if c.switch2_valid          if $game_switches[c.switch2_id] == false            next          end        end        if c.variable_valid          if c.variable_id == XAS::HIT_ID and              c.variable_value == self.reaction_valid_attack_id          elsif $game_variables[c.variable_id] < c.variable_value            next          end        end        if c.self_switch_valid          key = [@map_id, @event.id, c.self_switch_ch]          if $game_self_switches[key] != true            next          end        end        new_page = page        break      end    end    if new_page == @page      return    end    @page = new_page    clear_starting    if @page == nil      @tile_id = 0      @character_name = ""      @character_hue = 0      @move_type = 0      @through = true      @trigger = nil      @list = nil      @interpreter = nil      return    end    @tile_id = @page.graphic.tile_id    @character_name = @page.graphic.character_name    @character_hue = @page.graphic.character_hue    if @original_direction != @page.graphic.direction      @direction = @page.graphic.direction      @original_direction = @direction      @prelock_direction = 0    end    if @original_pattern != @page.graphic.pattern      @pattern = @page.graphic.pattern      @original_pattern = @pattern    end    @opacity = @page.graphic.opacity    @blend_type = @page.graphic.blend_type    @move_type = @page.move_type    @move_speed = @page.move_speed    @move_frequency = @page.move_frequency    @move_route = @page.move_route    @move_route_index = 0    @move_route_forcing = false    @walk_anime = @page.walk_anime    @step_anime = @page.step_anime    @direction_fix = @page.direction_fix    @through = @page.through    @always_on_top = @page.always_on_top    @trigger = @page.trigger    @list = @page.list    @interpreter = nil    if @trigger == 4      @interpreter = Interpreter.new    end    check_event_trigger_auto  endendclass Game_Action  attr_reader   :id                   attr_accessor :prelag                  attr_accessor :attack_id               attr_reader   :attack_range          attr_reader   :attack_range_type      attr_accessor :user                   attr_reader   :hit_events             attr_accessor :now_count               attr_reader   :final_mark              attr_accessor :duration               attr_reader   :blow_power              attr_reader   :piercing               attr_reader   :player_damage           attr_reader   :ignore_invincible      def initialize(user, action_id)    @user        = user    @id          = action_id    @prelag      = 0    @now_count   = 0    @duration    = nil    @attack_id   = 0    @attack_range= 0    @hit_events  = []    @blow_power  = 0  end  def attachment(action_id)    @duration   = Database_Bullet::DURATIONS[action_id]    power = Database_Bullet::BLOW_POWERS[action_id]    @blow_power = power == nil ? 1 : power    @attack_id_plan = Database_Bullet::ATTACK_ID_PLANS[action_id]    @attack_range_type = Database_Bullet::ATTACK_RANGE_TYPES[action_id]    plan = Database_Bullet::ATTACK_RANGE_PLANS[action_id]    @attack_range_plan = plan.nil? ? nil : plan.dup    @self_damage = Database_Bullet::SELF_DAMAGES[self.id]    @player_damage = Database_Bullet::PLAYER_DAMAGES[action_id]    @ignore_invincible = Database_Bullet::IGNORE_INVINCIBLES[action_id]  end  def update    if @attack_id_plan != nil      id = @attack_id_plan[@now_count]      unless id.nil?       @attack_id = id       @hit_events.clear       @hit_events.push(self.user) unless @self_damage      end    end    if @attack_range_plan != nil      range = @attack_range_plan[@now_count]      @attack_range = range unless range.nil?    end    @now_count += 1  end  def done?    return (self.duration.to_i > 0 and self.now_count >= self.duration)  endendclass Token_Bullet < Token_Event  def initialize(user, action_id)    original_event = @@events[action_id]    return if original_event == nil    event = original_event.dup    event.x = user.x    event.y = user.y    event.pages[0].graphic.direction = user.direction    @character_name = event.pages[0].graphic    super($game_map.map_id, event)    self.action_attachment(action_id)    @action.user = user    @remain_for_an_act = @action.duration.is_a?(Numeric)  end  def update    super    erase if @action == nil and @remain_for_an_act    check_event_trigger_attack  endendmodule Map  RHOMBUS = 1  SQUARE  = 2  LINE    = 3endmodule Database_Bullet  include Map  EVENTS    = []  EVENT_IDS = []  DURATIONS = []  PRELAGS   = []  SUFLAGS   = []  FINALIZE_MARKS = []  ATTACK_ID_PLANS    = []  ATTACK_RANGE_TYPES = []  ATTACK_RANGE_PLANS = []  BLOW_POWERS = []  SELF_MOTIONS = []  SELF_ANIMATION_PLANS = []  PIERCINGS = []  SELF_DAMAGES = []  PLAYER_DAMAGES = []  IGNORE_INVINCIBLES = []end#===============================================================================# XAS - Character damage pop mechanism#===============================================================================module XRXS_DAMAGE_OFFSET  def update    super    @damage_sprites   = [] if @damage_sprites.nil?    for damage_sprite in @damage_sprites      damage_sprite.x = self.x      damage_sprite.y = self.y    end  endendclass Sprite_Character < RPG::Sprite  include XRXS_DAMAGE_OFFSETendclass Game_Character  attr_accessor :collapse_duration  attr_accessor :battler_visible  attr_writer   :opacity  attr_accessor :collapse_doneendmodule XRXS_CharacterDamagePop  def update    super    if @battler == nil      return    end    if @character.collapse_duration != nil      if @character.collapse_duration > 0        collapse      end      @_collapse_duration = @character.collapse_duration    end    @battler_visible = @character.battler_visible    @battler_visible = true if @battler_visible == nil    if @battler.damage_pop      damage(@battler.damage, @battler.critical)      @battler.damage = nil      @battler.critical = false      @battler.damage_pop = false    end    unless @battler_visible      if not @battler.hidden and not @battler.dead? and         (@battler.damage == nil or @battler.damage_pop)        appear        @battler_visible = true      end    end    if @battler_visible      if @battler.damage == nil and @battler.dead?        if @battler.is_a?(Game_Enemy)          $game_system.se_play($data_system.enemy_collapse_se)        else          $game_system.se_play($data_system.actor_collapse_se)        end        collapse        @battler_visible = false      end    else      if @_collapse_duration > 0        @_collapse_duration -= 1        @character.opacity = 256 - (48 - @_collapse_duration) * 6        if @_collapse_duration == 0          @character.collapse_done = true        end      end    end    @character.collapse_duration = @_collapse_duration    @character.battler_visible   = @battler_visible  endendclass Sprite_Character < RPG::Sprite  include XRXS_CharacterDamagePopend#===============================================================================# Action Battle System#===============================================================================class Game_Event < Game_Character  def enemy_defeat_process(enemy)    last_level = $game_player.battler.level    $game_party.gain_exp(enemy.exp)    $game_party.gain_gold(enemy.gold)    if last_level < $game_player.battler.level      $game_system.me_play(XAS_BA::LEVEL_UP_ME)      $game_player.battler.damage = "Level up!"      $game_player.battler.damage_pop = true      $game_player.need_refresh = true    end    id = XAS_BA::DEFEAT_NUMBER_ID    $game_variables[id] += 1 if id != 0    switch_id = XAS_BA_ENEMY::DEFEAT_SWITCH_IDS[self.enemy_id]    if switch_id != nil      $game_switches[switch_id] = true      $game_map.refresh     end  endendclass Game_Party  def gain_exp(exp)    for i in 0...$game_party.actors.size      actor = $game_party.actors[i]      if actor.cant_get_exp? == false        actor.exp += exp      end    end  endendclass Game_Player < Game_Character  attr_accessor :need_refreshendmodule XAS_BA_BULLET_SP_COST  def shoot_bullet(action_id)    skill_id = action_id    skill    = skill_id == nil ? nil : $data_skills[skill_id]    if skill != nil      sp_cost  = skill.sp_cost      if self.battler.sp < sp_cost        $game_system.se_play($data_system.buzzer_se)        return false      end      self.battler.sp -= sp_cost      if self.battler.is_a?(Game_Actor)      $game_temp.skill_refresh = true        end      if $mogscript["mpstelen"] == true             $game_player.wref = true               end            self.need_refresh = true    end    return super  endendclass Game_Player < Game_Character  include XAS_BA_BULLET_SP_COSTendmodule XRXS_EnemySensor  def update_sensor    distance = ($game_player.x - self.x).abs + ($game_player.y - self.y).abs    enable   = (distance <= $game_variables[XAS_BA::SENSOR_VAR])    key = [$game_map.map_id, self.id, XAS_BA::SENSOR_SELF_SWITCH]    last_enable = $game_self_switches[key]    last_enable = false if last_enable == nil    if enable != last_enable      $game_self_switches[key] = enable      $game_map.need_refresh = true    end  endendclass Game_Event < Game_Character  include XRXS_EnemySensorendclass Game_Character  attr_writer   :opacityendmodule XRXS_BattlerAttachment  def attack_effect(attacker)    return super if self.battler.nil? or attacker.nil?    result = (not self.battler.dead? and self.battler.hiblink_duration.to_i <= 0)    if result      $game_temp.in_battle = true      self.battler.attack_effect(attacker.battler)      self.battler.damage_pop = true      $game_temp.in_battle = false      if self.battler.damage.to_i > 0        self.blow(attacker.direction, 1)      end      self.battler.hiblink_duration = self.damage_hiblink_duration      if self.is_a?(Game_Player)        self.need_refresh = true      end    end    @xrxs64c_defeat_done = false if @xrxs64c_defeat_done == nil    if not @xrxs64c_defeat_done and self.battler.dead?      defeat_process      @xrxs64c_defeat_done = true    end  end  def action_effect(bullet, action_id)    return super if self.battler.nil?    if self.battler.hiblink_duration.to_i > 0 and       not bullet.action.ignore_invincible      return false    end    skill_id = action_id    return if skill_id == nil    user     = bullet.action.user    attacker = (user == nil ? nil : user.battler)    result = (user != nil and not self.battler.dead?)    skill_id = action_id    dirset    = [2,6,8,4]    dir_index = (dirset.index(bullet.direction) + 2) % 4    shield    = self.shield_actions.include?(action_id)    for direction in self.shield_directions      dir_index2 = (dirset.index(self.direction) + dirset.index(direction)) % 4      shield    |= dirset[dir_index2] == dirset[dir_index]    end    if shield      if user.is_a?(Game_Player)      self.battler.damage = XAS_BA::SHIELD_TEXT      self.battler.damage_pop = true               $game_system.se_play(XAS_BA::SHIELD_SE)      user.blow(dirset[dir_index])      self.animation_id = XAS_BA::SHIELD_ANI              end      super      return true    end    if result      skill = $data_skills[skill_id]      if skill_id == 2 and $game_switches[120]        skill = skill.dup        skill.power = 8      end      $game_temp.in_battle = true      self.battler.skill_effect(attacker, skill)      self.battler.damage_pop = true      $game_temp.in_battle = false      if self.battler.damage.to_i > 0      if XAS_BA::ATTACK_SKILL_SHAKE.include?(skill_id)      $game_screen.start_shake(XAS_BA::SH_POWER,XAS_BA::SH_SPEED,XAS_BA::SH_DUR)      end         hit_skill_anime = XAS_BA::ATTACK_ANI_HIT[skill_id]         if hit_skill_anime != nil      self.animation_id = hit_skill_anime        else       self.animation_id = XAS_BA::DEFAULT_ATTACK_ANI_HIT      end                 d = bullet.direction        p = bullet.action.blow_power.to_i        self.blow(d, p)        self.battler.hiblink_duration = self.damage_hiblink_duration      end      if self.is_a?(Game_Player)        self.need_refresh = true      end    end    if not @xrxs64c_defeat_done and self.battler.dead?      defeat_process      @xrxs64c_defeat_done = true    end    return (super or result)   end  def shield_directions    return []  end  def shield_actions    return []  end  def knock_back_disable    return false  end  def damage_hiblink_duration  actor = $game_party.actors[0]  if self.is_a?(Game_Player) and self.battler.damage.to_i > 0  if XAS_BA::JUMP_HIT_HERO == true  jump(0,0)  $game_system.se_play(XAS_BA::HERO_HIT_SE)    end     else  if self.battler.damage.to_i > 0     unless XAS_BA::JUMP_HIT_ENEMY_DISABLE.include?(self.enemy_id)  jump(0,0)  end   end    end  if self.is_a?(Game_Player)  return XAS_BA::INVICIBLE_DURATION_HERO  else  enemy_invicible_duration = XAS_BA::INVICIBLE_DURATION_ENEMY[enemy_id]  if enemy_invicible_duration != nil  return enemy_invicible_duration  else  return XAS_BA::DEFAULT_INVICIBLE_DURATION_ENEMY   end    end    end  def dead?    return self.battler == nil ? false : self.battler.dead?  end  def defeat_process  endendclass Game_Player < Game_Character  include XRXS_BattlerAttachment  def battler    return $game_party.actors[0]  end  def defeat_process    super      if XAS_BA::AUTOGAMEOVER == true    $scene = Scene_Gameover.new rescue nil    else        $game_switches[XAS_BA::GAMEOVER_SWITCH_ID] = true    $game_map.refresh    end  end  alias xrxs64c_update update  def update    xrxs64c_update    self.battler.remove_states_auto if self.battler != nil    if self.collapse_done      self.collapse_done        = false      @xrxs64c_defeat_done      = false    end  endendclass Game_Event < Game_Character  include XRXS_BattlerAttachment  def battler    return @battler  end  alias xrxs64c_refresh refresh  def refresh    xrxs64c_refresh    self.battler_recheck  end  def battler_recheck    return if @battler != nil    if @page == nil      return    end    @enemy_id = 0    for page in @event.pages.reverse      condition = page.condition      if condition.variable_valid and         condition.variable_id == XAS_BA::ENEMY_ID_VARIABLE_ID and       (!condition.switch1_valid or $game_switches[condition.switch1_id]) and       (!condition.switch2_valid or $game_switches[condition.switch2_id])        @enemy_id = condition.variable_value        break      end    end    if @enemy_id == 0      return    end    troop_id     = -1    member_index = -1    for troop in $data_troops      next if troop == nil      for enemy in troop.members        if enemy.enemy_id == @enemy_id          troop_id     = $data_troops.index(troop)          member_index = troop.members.index(enemy)          break        end      end    end    if troop_id != -1 and member_index != -1      @battler = Game_Enemy.new(troop_id, member_index)    end  end  def enemy_id    self.battler    return @enemy_id  end  alias xrxs64c_update update  def update    if @collapse_wait_count.to_i > 0      @collapse_wait_count -= 1      if @collapse_wait_count == 0        @collapse_wait_count = nil        $game_map.remove_token(self)          end      return    end    update_sensor    xrxs64c_update    if self.battler != nil      self.battler.remove_states_auto    end    if self.collapse_duration.to_i > 0      @through = true    end    if self.collapse_done      @opacity = 0      @collapse_wait_count = 32      return    end  end  def shield_enable!    @shield_disable = nil  end  def shield_disable!    @shield_disable = true  end  def shield_directions    set = @shield_disable ? [] : XAS_BA_ENEMY::SHILED_DIRECTIONS[self.enemy_id]    set = [] if set == nil    return set  end  def shield_actions     set = @shield_disable ? [] : XAS_BA_ENEMY::SHILED_ACTIONS[self.enemy_id]    set = [] if set == nil    return set  end  def knock_back_disable    return XAS_BA_ENEMY::KNOCK_BACK_DISABLES.include?(self.enemy_id)  end  def body_size    return XAS_BA_ENEMY::BODY_SQUARE[self.enemy_id].to_i  end  def defeat_process    super    enemy_defeat_process(self.battler)    enemy_defeat_animation = XAS_BA_ENEMY::DEF_ANI[enemy_id]    if XAS_BA_ENEMY::DEF_ANI[enemy_id] != nil    self.animation_id = enemy_defeat_animation     end  endendclass Game_Event < Game_Character  attr_reader   :collision_attack  def img_act_exist?  begin  RPG::Cache.character(@page.graphic.character_name + "_Act" , @page.graphic.character_hue)  rescue  return false  end  return true  end  def attack_on    @collision_attack = true    if img_act_exist?        @character_name = @page.graphic.character_name + "_Act"     end  end  def attack_off    @collision_attack = false        @character_name = @page.graphic.character_name  endendclass Game_Player < Game_Character  alias xrxs64c_check_event_trigger_touch check_event_trigger_touch  def check_event_trigger_touch(x, y)    xrxs64c_check_event_trigger_touch(x, y)    if $game_system.map_interpreter.running?      return    end    for event in $game_map.events.values      next unless event.collision_attack      unless [1,2].include?(event.trigger)        if event.battler != nil and event.x == x and event.y == y          $game_player.attack_effect(event)          $game_player.animation_id = XAS_BA::DEFAULT_ATTACK_ANI_HIT         end      end    end  endendclass Game_Event < Game_Character  alias xrxs64c_check_event_trigger_touch check_event_trigger_touch  def check_event_trigger_touch(x, y)    xrxs64c_check_event_trigger_touch(x, y)    if $game_system.map_interpreter.running?      return    end    return unless self.collision_attack    if self.battler != nil and x == $game_player.x and y == $game_player.y      $game_player.attack_effect(self)    end  endendmodule XAS_BA_BATTLEEVENT_NONPREEMPT  def update    return if self.battler != nil and $game_system.map_interpreter.running?    super  endendclass Game_Event < Game_Character  include XAS_BA_BATTLEEVENT_NONPREEMPTendclass Game_Battler  attr_accessor :hiblink_duration        endclass Sprite_Character < RPG::Sprite  alias xrxs64c_update update  def update    if @battler == nil      @battler = @character.battler    end    xrxs64c_update    if @battler == nil      return    end    if @_collapse_duration > 0      return    end    if @character.collapse_done      return    end    if @battler.hiblink_duration.is_a?(Numeric)      if XAS_BA::BLINK_ON == true      @character.opacity = (@character.opacity + 70) % 190 + 40      end      @battler.hiblink_duration -= 1      if @battler.hiblink_duration <= 0        @battler.hiblink_duration = nil        @character.opacity = 255      end    end  endendmodule XAS_BA_ItemDrop  def defeat_process    super    if self.battler.is_a?(Game_Enemy) and self.battler.dead?      treasure = nil      enemy = self.battler      if rand(100) < enemy.treasure_prob        if enemy.item_id > 0          treasure = $data_items[enemy.item_id]        end        if enemy.weapon_id > 0          treasure = $data_weapons[enemy.weapon_id]        end        if enemy.armor_id > 0          treasure = $data_armors[enemy.armor_id]        end      end      if treasure != nil        item_se = XAS_BA::ITEMDROP_SE        opecode = treasure.is_a?(RPG::Item) ? 126 :                  treasure.is_a?(RPG::Weapon) ? 127 :                  treasure.is_a?(RPG::Armor) ? 128 :                  nil        list = []        if opecode != nil          list[0] = RPG::EventCommand.new(opecode, 0, [treasure.id,0,0,1])          list[1] = RPG::EventCommand.new(250, 0, [item_se])          list[2] = RPG::EventCommand.new(116, 0, [])        end        list.push(RPG::EventCommand.new)        command = RPG::MoveCommand.new        command.code = 14        command.parameters = [0,0]        route = RPG::MoveRoute.new        route.repeat = false        route.list = [command, RPG::MoveCommand.new]        page = RPG::Event::Page.new        page.move_type = 3        page.move_route = route        page.move_frequency = 6        page.always_on_top = true        page.trigger = 1        page.list = list        event = RPG::Event.new(self.x, self.y)        event.pages = 

            token = Token_Event.new($game_map.id, event)        token.icon_name = treasure.icon_name        $game_map.add_token(token)      end    end  endendclass Game_Event < Game_Character  include XAS_BA_ItemDropendclass Game_Character  attr_accessor :icon_nameendclass Sprite_Character < RPG::Sprite  alias xrxs_charactericon_update update  def update    xrxs_charactericon_update    if @character.icon_name != nil #and @icon_name != @character.icon_name      @icon_name = @character.icon_name      self.bitmap = RPG::Cache.icon(@icon_name)      self.src_rect.set(0, 0, 24, 24)      self.ox = 12      self.oy = 24      self.z = 1    end  endendclass Game_Character  def blow(d, power = 1)    return if self.knock_back_disable    @knock_back_prespeed = @move_speed if @knock_back_prespeed == nil    power.times do      if passable?(self.x, self.y, d)        @x += ([3,6,9].include?(d) ? 1 : [1,4,7].include?(d) ? -1 : 0)        @y += ([1,2,3].include?(d) ? 1 : [7,8,9].include?(d) ? -1 : 0)      end    end    if self.battler.is_a?(Game_Enemy)        enemy_knock_duration = XAS_BA::INVICIBLE_DURATION_ENEMY[enemy_id]    if enemy_knock_duration != nil    @knock_back_duration = enemy_knock_duration    else    @knock_back_duration = XAS_BA::DEFAULT_INVICIBLE_DURATION_ENEMY        end          else    @knock_back_duration = XAS_BA::KNOCK_BACK_DURATION_HERO    end        @move_speed = XAS_BA::KNOCK_BACK_SPEED  end  alias xrxs64c_nb_update update  def update    @stop_count = -1 if self.knockbacking? or self.dead?    xrxs64c_nb_update  def img_hit_enemy_exist?  begin  RPG::Cache.character(@page.graphic.character_name + "_Hit" , @page.graphic.character_hue)  rescue  return false  end  return true  end      def img_hit_actor_exist?  begin  actor = $game_party.actors[0]    RPG::Cache.character(actor.character_name + "_Hit" , actor.character_hue)  rescue  return false  end  return true  end        if self.knockbacking?      if self.battler.is_a?(Game_Enemy)         if img_hit_enemy_exist?       @character_name = @page.graphic.character_name + "_Hit"       @collision_attack = false      end      else      if img_hit_actor_exist?      actor = $game_party.actors[0]        @character_name = actor.character_name + "_Hit"       end    end      @pattern = 0      @knock_back_duration -= 1      if @knock_back_duration <= 0        if self.battler.is_a?(Game_Enemy)          @character_name = @page.graphic.character_name         else        actor = $game_party.actors[0]          @character_name = actor.character_name                end        @knock_back_duration = nil        @move_speed = @knock_back_prespeed        @knock_back_prespeed = nil      end      return    end  end  def knockbacking?    return @knock_back_duration != nil  end  def collapsing?    return self.collapse_duration.to_i > 0  endendmodule XAS_DamageStop  def acting?    return (super or self.knockbacking? or self.collapsing?)  endendclass Game_Player < Game_Character  include XAS_DamageStopendclass Game_Event < Game_Character  include XAS_DamageStopendmodule RPGclass Sprite < ::Spritedef dispose_animationif @_animation_sprites != nilsprite = @_animation_sprites[0]if sprite != nil@@_reference_count[sprite.bitmap] -= 1endfor sprite in @_animation_spritessprite.disposeend@_animation_sprites = nil@_animation = nilendendendend#===============================================================================# XAS - Button SKILL#===============================================================================class Game_Player < Game_Character  alias xrxs64_ya_update update  def update    xrxs64_ya_update    if Input.trigger?(XAS_COMMAND::SKILL_ACTION)      unless $game_system.map_interpreter.running? or             $game_temp.message_window_showing or             self.action != nil        action_id = $game_system.xas_skill_id        self.shoot(action_id)      end    end  endend#===============================================================================# XAS - Button Slash#===============================================================================class Game_Player < Game_Character  alias xrxs64_cs_update update  def update    xrxs64_cs_update    if Input.trigger?(XAS_COMMAND::SLASH_ACTION)      unless self.action != nil or $game_system.map_interpreter.running? or             $game_temp.message_window_showing or $game_map.starting? or             self.knockbacking?        if Input.press?(Input::UP)          turn_up        elsif Input.press?(Input::DOWN)          turn_down        elsif Input.press?(Input::RIGHT)          turn_right        elsif Input.press?(Input::LEFT)          turn_left        end        action_id = $game_system.xas_action_slash_id        self.shoot(action_id) if action_id != nil or action_id == 0      end    end  endend#===============================================================================# XAS - Button SHIELD#===============================================================================class Game_Player < Game_Character  alias xrxs64_cs2_update update  def update    xrxs64_cs2_update    if Input.trigger?(XAS_COMMAND::SHIELD_ACTION)      unless self.action != nil or $game_system.map_interpreter.running? or             $game_temp.message_window_showing or $game_map.starting? or             self.knockbacking?        if Input.press?(Input::UP)          turn_up        elsif Input.press?(Input::DOWN)          turn_down        elsif Input.press?(Input::RIGHT)          turn_right        elsif Input.press?(Input::LEFT)          turn_left        end        action_id = $game_system.xas_action_shield_id        self.shoot(action_id) if action_id != nil or action_id == 0      end    end  endend#===============================================================================# XAS - Button ITEM#===============================================================================class Game_Player < Game_Character  alias xrxs64_cs3_update update  def update    xrxs64_cs3_update    if Input.trigger?(XAS_COMMAND::ITEM_ACTION)      unless self.action != nil or $game_system.map_interpreter.running? or             $game_temp.message_window_showing or $game_map.starting? or             self.knockbacking?        if Input.press?(Input::UP)          turn_up        elsif Input.press?(Input::DOWN)          turn_down        elsif Input.press?(Input::RIGHT)          turn_right        elsif Input.press?(Input::LEFT)          turn_left        end        item_tool_id = XAS_WINDOW_ITEM::XASITEM_ID[$game_system.xas_item_id]                action_id = item_tool_id        self.shoot(action_id) if action_id != nil or action_id == 0      end    end  endend#===============================================================================# Game_Map#===============================================================================class Game_Map  def starting?    if $game_system.map_interpreter.running?      return true    end    for event in $game_map.events.values      return true if event.starting    end    return false  endend#===============================================================================# Scene_Map #===============================================================================class Game_Playeralias mog_xaswep_update updatedef updatemog_xaswep_update  actor = $game_party.actors[0]  weapon_id = actor.weapon_idweapon_tool_id = XAS_BA::WEP_ID_TOOL[weapon_id]$game_system.xas_action_slash_id = weapon_tool_id armor_id = actor.armor1_idarmor_tool_id = XAS_BA::SECOND_HAND_ID_TOOL[armor_id]$game_system.xas_action_shield_id = armor_tool_id end  end#===============================================================================# Scene_Skill #===============================================================================class Scene_Skillalias mog_xasmain main  def main  @xastextime = 0@xastextime2 = 450@skill_text = Sprite.new@skill_text.bitmap = Bitmap.new(160,100)@skill_text.x = 700@skill_text.y = 0@skill_text.z = 9999@skill_text.bitmap.font.name = "Georgia"@skill_text.bitmap.font.size = 24@skill_text.bitmap.font.bold = true@skill_text.visible = false@skill_text.bitmap.draw_text(0, 0, 140, 64, XAS_WINDOW_SKILL::EQUIPPED,1)@skill_text2 = Sprite.new@skill_text2.bitmap = Bitmap.new(640,64)@skill_text2.x = 0@skill_text2.y = 450@skill_text2.z = 9999@skill_text2.bitmap.font.name = "Georgia"@skill_text2.bitmap.font.size = 24@skill_text2.bitmap.font.bold = true@skill_text2.visible = true@skill_text2.bitmap.draw_text(0, 20, 640, 64,XAS_WINDOW_SKILL::PRESS ,1)@skill_text2.opacity = @xastextime2mog_xasmain  @skill_text.dispose@skill_text2.disposeend  alias mog_xasupdate updatedef updatemog_xasupdate  @xastextime -= 3@xastextime2 -= 3@skill_text.opacity = @xastextime@skill_text2.opacity = @xastextime2if @xastextime  <= 0@xastextime = 0@skill_text.visible = falseend  if @xastextime2  <= 0@xastextime2 = 0@skill_text2.visible = falseend if @skill_text2.y > 400@skill_text2.y -= 3elsif @skill_text2.y <= 400@skill_text2.y = 400  end   if @skill_text.x > 480@skill_text.x -= 10elsif @skill_text.x <= 480@skill_text.x = 480  end   endalias mog_xasupdate_skill update_skill def update_skillmog_xasupdate_skillif Input.trigger?(XAS_WINDOW_SKILL::BUTTON)@skill = @skill_window.skill  unless @actor.skill_can_use?(@skill.id)$game_system.se_play($data_system.buzzer_se)returnend$game_system.se_play($data_system.equip_se)$game_system.xas_skill_id = @skill.id@skill_text.visible = true@skill_text.x = 700@skill_text.opacity = @xastextime@xastextime = 355 end    endend#===============================================================================# Game_Actor #===============================================================================############### Scene_Item ###############class Scene_Item    alias mog_xasmain main  def main  @xastextime = 0@xastextime2 = 450@item_text = Sprite.new@item_text.bitmap = Bitmap.new(160,100)@item_text.x = 700@item_text.y = 0@item_text.z = 9999@item_text.bitmap.font.name = "Georgia"@item_text.bitmap.font.size = 24@item_text.bitmap.font.bold = true@item_text.visible = false@item_text.bitmap.draw_text(0, 0, 140, 64, XAS_WINDOW_ITEM::EQUIPPED,1)@item_text2 = Sprite.new@item_text2.bitmap = Bitmap.new(640,64)@item_text2.x = 0@item_text2.y = 450@item_text2.z = 9999@item_text2.bitmap.font.name = "Georgia"@item_text2.bitmap.font.size = 24@item_text2.bitmap.font.bold = true@item_text2.visible = true@item_text2.bitmap.draw_text(0, 20, 640, 64,XAS_WINDOW_ITEM::PRESS ,1)@item_text2.opacity = @xastextime2mog_xasmain  @item_text.dispose@item_text2.disposeend    alias mog_xasupdate updatedef updatemog_xasupdate  @xastextime -= 3@xastextime2 -= 3@item_text.opacity = @xastextime@item_text2.opacity = @xastextime2if @xastextime  <= 0@xastextime = 0@item_text.visible = falseend  if @xastextime2  <= 0@xastextime2 = 0@item_text2.visible = falseend if @item_text2.y > 400@item_text2.y -= 3elsif @item_text2.y <= 400@item_text2.y = 400  end   if @item_text.x > 480@item_text.x -= 10elsif @item_text.x <= 480@item_text.x = 480  end   endalias mog_xas_update_item update_itemdef update_itemmog_xas_update_itemif Input.trigger?(XAS_WINDOW_ITEM::BUTTON)@item = @item_window.itemunless @item.is_a?(RPG::Item)$game_system.se_play($data_system.buzzer_se)returnendunless $game_party.item_can_use?(@item.id)$game_system.se_play($data_system.buzzer_se)returnenditem_id = @item.iditem_tool_id = XAS_WINDOW_ITEM::XASITEM_ID[@item.id]if item_tool_id != nil$game_system.se_play($data_system.equip_se)  @item_text.visible = true@item_text.x = 700@item_text.opacity = @xastextime@xastextime = 355   $game_system.xas_item_id = @item.idend   endend  end#===============================================================================# Game_System#===============================================================================class Game_Systemattr_accessor :xas_skill_index attr_accessor :xas_skill_idattr_accessor :xas_action_slash_idattr_accessor :xas_action_shield_idalias mog_xas_skill_change_initialize initializedef initialize@xas_skill_index = 0@xas_skill_id = 0@xas_action_shield_id = 0@xas_action_slash_id = 0mog_xas_skill_change_initializeendend#===============================================================================# Game_Map#===============================================================================class Game_Temp attr_accessor :skill_refreshalias mog_xas_skill_change_initialize initializedef initializeskill_refresh = falsemog_xas_skill_change_initializeendend#===============================================================================# Window_Base#===============================================================================class Window_Base < Windowdef draw_xas_skill_icon(x, y)@actor = $game_party.actors[0]skill = $data_skills[$game_system.xas_skill_id.to_i]if skill == nilself.contents.font.color = Color.new(0,0,0,255)   self.contents.font.size = 16self.contents.draw_text(x + 8, y + 56, 40, 32, "0", 1)    self.contents.font.color = Color.new(255,100,100,155)  self.contents.draw_text(x + 7, y + 55, 40, 32, "0", 1)      returnendbitmap = RPG::Cache.icon(skill.icon_name)if @actor.sp >= skill.sp_cost opa = 255cor = Color.new(255,255,150,255)  elseopa = 125  cor = Color.new(255,100,100,155)  end self.contents.blt(x + 13, y + 25, bitmap, Rect.new(0, 0, 24, 24), opa)self.contents.font.color = Color.new(0,0,0,255)   self.contents.font.size = 16self.contents.draw_text(x + 8, y + 56, 40, 32, skill.sp_cost.to_s, 1)    self.contents.font.color = corself.contents.draw_text(x + 7, y + 55, 40, 32, skill.sp_cost.to_s, 1)    end    def draw_xas_skill(x,y)skill_lay = RPG::Cache.picture("XAS_W_Skill")    cw = skill_lay.width ch = skill_lay.height src_rect = Rect.new(0, 0, cw, ch)self.contents.blt(x , y - ch + 65,skill_lay, src_rect) self.contents.font.size = 16self.contents.font.name = "Georgia"self.contents.font.bold = trueself.contents.font.color = Color.new(50,255,150,255)    self.contents.draw_text(x - 3, y + 40, 60, 32, $data_system.words.sp, 1)    endend#===============================================================================# XAS_Window_Skill#===============================================================================class XAS_Window_Skill < Window_Basedef initializesuper(0, 0, 85, 120)self.contents = Bitmap.new(width - 32, height - 32)self.windowskin = RPG::Cache.windowskin("")self.opacity = 0refreshenddef refreshself.contents.cleardraw_xas_skill(0,0)draw_xas_skill_icon(0, 0)endend#===============================================================================# Xas_Skill_Change#===============================================================================class Scene_Mapalias mog_xas_schange_main maindef main@xas_sk = XAS_Window_Skill.new@xas_sk.x = XAS_HUD::WINDOW_SKILL_X@xas_sk.y = XAS_HUD::WINDOW_SKILL_Yif $game_switches[XAS_HUD::HIDE_WINDOW] == true@xas_sk.visible = falseelse@xas_sk.visible = true  endmog_xas_schange_main@xas_sk.disposeendalias mog_xas_schange_update updatedef updatemog_xas_schange_update  if $game_switches[XAS_HUD::HIDE_WINDOW] == true@xas_sk.visible = falseelse@xas_sk.visible = true  endif Input.trigger?(XAS_COMMAND::SKILL_CHANGE)unless $game_system.map_interpreter.running? or$game_temp.message_window_showing@data = []@actor = $game_party.actors[0]for i in 0...@actor.skills.sizeskill = $data_skills[@actor.skills[i]]if skill != nil@data.push(skill)endendif skill == nil$game_system.se_play($data_system.buzzer_se)  return  end$game_system.xas_skill_index += 1if $game_system.xas_skill_index == @data.size $game_system.xas_skill_index = 0  endskill = @data[$game_system.xas_skill_index]skill_action = skill.id$game_system.xas_skill_id = skill.id$game_temp.skill_refresh = true$game_system.se_play($data_system.cursor_se)endendif $game_temp.skill_refresh == true@xas_sk.refresh$game_temp.skill_refresh = false  end  endend#===============================================================================# class Interpreter#===============================================================================class Interpreteralias mog_xas_skill_command_312 command_312  def command_312mog_xas_skill_command_312$game_temp.skill_refresh = true  endalias mog_xas_skill_command_314 command_314  def command_314mog_xas_skill_command_314$game_temp.skill_refresh = true  endend#===============================================================================# Game_System#===============================================================================class Game_Systemattr_accessor :xas_item_index attr_accessor :xas_item_idalias mog_xas_item_change_initialize initializedef initialize@xas_item_index = 0@xas_item_id = 0mog_xas_item_change_initializeendend#===============================================================================# Game_Map#===============================================================================class Game_Temp attr_accessor :item_refreshalias mog_xas_item_change_initialize initializedef initializeitem_refresh = falsemog_xas_item_change_initializeendend#===============================================================================# class Interpreter#===============================================================================class Interpreteralias mog_xas_item_command_126 command_126def command_126mog_xas_item_command_126    add_good = XAS_WINDOW_ITEM::XASITEM_ID[@parameters[0]] if add_good != nil$game_party.gain_goods(@parameters[0])endendend#===============================================================================# XAS - (Z) Button Change#===============================================================================class Game_Party  def goods    @goods = [] if @goods == nil    return @goods  end  def gain_goods(action_id)    @goods = [] if @goods == nil    @goods.push(action_id) unless @goods.include?(action_id)  endendmodule XAS_ACTION  alias xas_z_shoot_bullet shoot_bullet  def shoot_bullet(action_id)    bullet_token = xas_z_shoot_bullet(action_id)    $scene.refresh_goods if bullet_token    return bullet_token  endendclass Game_Mapattr_accessor   :goodrefend  class Interpreteralias mogfix11_command_126 command_126  def command_126mogfix11_command_126 $game_map.goodref = trueendendclass Scene_Map  alias xrxs64_zc_main main  def main    @action_change = Spriteset_ActionChange.new      @action_change.show(nil, $game_system.xas_item_id, nil)    xrxs64_zc_main    @action_change.dispose if @action_change != nil  end  alias xrxs64_zc_update update  def update    xrxs64_zc_update    if $game_switches[XAS_HUD::HIDE_WINDOW] == true      return @action_change.visible = false    end    @action_change.update     if $game_map.goodref == true    refresh_goods    $game_map.goodref = false    end    if Input.trigger?(XAS_COMMAND::ITEM_CHANGE)      unless $game_system.map_interpreter.running? or             $game_temp.message_window_showing        action_id2 = $game_system.xas_item_id        goods = $game_party.goods        if goods.size == 0        $game_system.se_play($data_system.buzzer_se)        return         end        index = (goods.index(action_id2).to_i + 1) % goods.size        action_id3 = goods[index]        $game_system.xas_item_id = action_id3        @action_change.show(nil, action_id2, action_id3)        @action_change.left_slide        $game_system.se_play($data_system.cursor_se)        $game_temp.item_refresh = true      end    end       end     alias xrxs64_zc_transfer_player transfer_player  def transfer_player    xrxs64_zc_transfer_player      @action_change.show(nil, $game_system.xas_item_id, nil)  end  def refresh_goods    @action_change.refresh if @action_change != nil  endendclass Spriteset_ActionChange  def initialize    @x = 28 + XAS_HUD::WINDOW_ITEM_X    @y = 40 + XAS_HUD::WINDOW_ITEM_Y    @icons = []    @action_ids = [nil, nil, nil]    @font = Font.new    @font.name = "Comic Sans MS"    @font.size = 22    @font.bold = true    self.clear    @leftslide_duration = 0    @show_duration = 0    @fadeout_duration = 0  end  def dispose    @icons.each {|sprite| sprite.dispose}    @window.dispose if @window != nil  end  def clear    self.dispose    @window = Window_Base.new(@x, @y, 26, 26)    @window.visible = false    @window.opacity = 0    @window.z = 500    for i in 0..2      @icons[i] = Sprite.new      @icons[i].z = 501    end  end  def show(action_id1, action_id2, action_id3)    self.clear    @window.visible = true    @action_ids = [action_id1, action_id2, action_id3]    for i in 0..2      item = $data_items[$game_system.xas_item_id.to_i]     if item == nil or item == 0     return    end      if item != nil      number = $game_party.item_number(item.id)      if number > 0        opa = 255      else      opa = 125        end                @icons[i].bitmap = RPG::Cache.icon(item.icon_name)          @icons[i].x = @x + (i - 1) * 48        @icons[i].y = @y + 16 - (i % 2) * 16        @icons[i].opacity = opa        @icons[i].visible = true        @icons[0].visible = false        @icons[2].visible = false      else        @icons[i].bitmap = nil      end    end    @show_duration = 0    @leftslide_duration = 0    @fadeout_duration = 0  end  def refresh    self.show(*@action_ids)  end  def left_slide    @leftslide_duration = 0  end  def visible=(b)    @window.visible = b    @icons.each{|sprite| sprite.visible = b }  end  def item_id    return XAS::ITEM_COST[@action_ids[1]]  end  def update    if @leftslide_duration > 0      @leftslide_duration = 0      if @leftslide_duration == 0        show(@action_ids[1], @action_ids[2], nil)      end      return    end    if @icons[0].visible      @icons[0].x += 2      @icons[0].opacity = 0      @icons[0].visible = false if @icons[0].opacity == 0      return    end  endend#===============================================================================# Window_Base#===============================================================================class Window_Base < Windowdef draw_xas_item_icon(x, y)item = $data_items[$game_system.xas_item_id.to_i]number = $game_party.item_number(item.id)if number > 0  opa = 255cor = Color.new(255,255,150,255) elseopa = 125  cor = Color.new(255,100,100,155)  endself.contents.font.color = Color.new(0,0,0,255)   self.contents.font.size = 16self.contents.draw_text(x + 8, y + 56, 40, 32, number.to_s, 1)    self.contents.font.color = cor   self.contents.draw_text(x + 7, y + 55, 40, 32, number.to_s, 1)    end    def draw_xas_item(x,y)item_lay = RPG::Cache.picture("XAS_W_Item")    cw = item_lay.width ch = item_lay.height src_rect = Rect.new(0, 0, cw, ch)self.contents.blt(x , y - ch + 65,item_lay, src_rect) self.contents.font.size = 16self.contents.font.name = "Georgia"self.contents.font.bold = trueself.contents.font.color = Color.new(50,255,150,255)    self.contents.draw_text(x - 3, y + 40, 60, 32, "Stock", 1)    endend#===============================================================================# XAS_Window_Item#===============================================================================class XAS_Window_Item < Window_Basedef initializesuper(0, 0, 85, 120)self.contents = Bitmap.new(width - 32, height - 32)self.windowskin = RPG::Cache.windowskin("")self.opacity = 0refreshenddef refreshself.contents.cleardraw_xas_item(0,0)draw_xas_item_icon(0, 0)endend#===============================================================================# Scene_Map#===============================================================================class Scene_Mapalias mog_xas_ichange_main maindef main@xas_it = XAS_Window_Item.new@xas_it.x = XAS_HUD::WINDOW_ITEM_X@xas_it.y = XAS_HUD::WINDOW_ITEM_Yif $game_switches[XAS_HUD::HIDE_WINDOW] == true@xas_it.visible = falseelse@xas_it.visible = true  endmog_xas_ichange_main@xas_it.disposeendalias mog_xas_ichange_update updatedef updatemog_xas_ichange_update    if $game_switches[XAS_HUD::HIDE_WINDOW] == true@xas_it.visible = falseelse@xas_it.visible = true  endif $game_temp.item_refresh == true@xas_it.refresh$game_temp.item_refresh = false  end  endend#===============================================================================# class Interpreter#===============================================================================class Interpreteralias mog_xas_item_ref_command_126 command_126def command_126if $game_party.item_number(@parameters[0]) == 0 $game_system.xas_item_index += 1  end$game_temp.item_refresh = true  mog_xas_item_ref_command_126endend

     

    ma se inserisco questo script mi scombussola tutto!!! Come posso far funzionare la prima parte postata senza bisogno della seconda???

     

  2. Tempo fa avevo trovato uno script che non so come ma ho perso... Praticamente questo script permetteva di cambiare la grafica al pg quando il giocatore non premeva nessun tasto... Per esempio se in Characters l'immagine del nostro eroe si chiama Marco quando non premiamo tasti si attiva Marco_n cambiando così grafica all'eroe che lo mostra per esempio arrabbiato, o infastidito (vabbè tanto i character li disegniamo noi quindi XD)... e nel momento in cui il giocatore riprende a far muovere il Pg si riattiva la grafica di default... Lo script esiste, l'avevo ma non lo trovo più!!! T___T
  3. Se ho capito bene vuoi uno script che faccia in modo che se per esempio il mio eroe ha come abilità x e il mostro ha come abilità y e Copiabilità, lui usa copia abilità e il nemico poi ottienex???

    E' così??

    Praticamente il mostro avrà una skill chiamata MIMO e quando usera questa skill l'attacco sferrato sarà la copia di uno degli attacchi degli eroi presenti in campo!!!

  4. Prendendo spunto dallo scene_end ho "creato" questo script che mi permette di scegliere quale formazione voglio in battaglia. Lo script è il seguente:

     

    #==============================================================================# ■ Scene_Formation#------------------------------------------------------------------------------#  ゲーム終了画面の処理を行うクラスです。#============================================================================== class Scene_Formation  def main	s1 = "Shoot"	s2 = "Arrow"	s3 = "Victory"	s4 = "Cluster"	@command_window = Window_Command.new(192, [s1, s2, s3,s4])	@command_window .windowskin = RPG::Cache.windowskin("vuota") 	@command_window.x = 200 - @command_window.width / 2	@command_window.y = 120 - @command_window.height / 2	@command_window.opacity = 255	@command_window.contents_opacity = 255 @menu2 = Plane.new	@menu2.bitmap = RPG::Cache.picture("MN_BK")@menu2.opacity = 255@menu3 = Plane.new	@menu3.bitmap = RPG::Cache.picture("Fog-01")@menu3.opacity =60@menu = Plane.new	@menu.bitmap = RPG::Cache.picture("formazione")@menu.opacity = 255 		  Graphics.transition(30, "Graphics/Transitions/" + "ripple")	loop do	  Graphics.update	  Input.update	  update	  if $scene != self		break	  end	end	for i in 0..20	 @command_window.x -= 30   @command_window.opacity -= 15	@command_window.contents_opacity -= 15 	  Graphics.updateend   	Graphics.freeze	@menu.dispose	@menu2.dispose	@menu3.dispose  	@command_window.dispose	if $scene.is_a?(Scene_Title)	  Graphics.transition	  Graphics.freeze	end  end  def update	if @command_window.x > 115	   @command_window.x -= 20	@command_window.opacity += 15	@command_window.contents_opacity += 15 	end	@menu3.ox += 1	@menu3.oy += 1	@menu2.ox -= 2 	@command_window.update	if Input.trigger?(Input::B)	  $game_system.se_play($data_system.cancel_se)	  $scene = Scene_Menu.new(5)	  return	end	# C ボタンが押された場合	if Input.trigger?(Input::C)	  # コマンドウィンドウのカーソル位置で分岐	  case @command_window.index	  when 0  # タイトルへ		$game_system.se_play($data_system.decision_se)		$battle_formation = SHOOT		$scene = Scene_Option.new		 when 1  # タイトルへ		$game_system.se_play($data_system.decision_se)		$battle_formation = ARROW		$scene = Scene_Option.new		when 2  # シャットダウン		$game_system.se_play($data_system.decision_se)		$battle_formation = VICTORY		$scene = Scene_Option.new	  when 3  	   $game_system.se_play($data_system.decision_se)		$battle_formation = CLUSTER		$scene = Scene_Option.new	   end	  return	end  end end

     

     

    E quando lo richiamo con $scene = Scene_Formation.new si presenta in questo modo:

    http://img218.imageshack.us/img218/4194/formazione1.png

     

    Il risultato è abbastanza piacevole però vorrei apportare una piccola modifica ovvero vorrei fare in modo che quando il cursore si sposta tra le quattro scelte (Shoot, Arrow, Victory e Cluster) sotto la scritta Posizione appaia un'immagine differente in base a dove si posizione il cursore.

    Ecco degli esempi:

    Se il cursore è su Shoot si dovrebbe presentare così:

    http://img222.imageshack.us/img222/936/formazione1shoot.png

    Se il cursore è su Cluster invece l'immaginetta sotto posizione cambia in questo modo:

    http://img237.imageshack.us/img237/8682/formazione1cluster.png

     

     

    Le immagini che devono cambiare sono

    http://img222.imageshack.us/img222/8204/shootformation.png -> Quando viene selezionato SHOOT

    http://img218.imageshack.us/img218/4444/arrowformation.png -> Quando viene selezionato ARROW

    http://img218.imageshack.us/img218/6081/victoryformation.png -> Quando viene selezionato VICTORY

    http://img237.imageshack.us/img237/4713/clusterformation.png -> Quando viene selezionato CLUSTER

     

    Spero che qualcuno riesca ad aiutarmi :D

  5. Aspetta ho messo le 2 skill combo scelte come skill conosciute da entrambi gli eroi ma ora oltre ad apparirmi quando premo SHIFT mi appaiono nella finestra delle magie normali!!! O___O come faccio?

     

    Ah un'altra cosa... Se per esempio uno degli eroi non è in battaglia e premo SHIFT la skill non è selezionabile, quindi non usabile (fin qui tutto ok) ma nelle skill normali rimane ed è selezionabile e se la selezione mi da errore!!! Un modo per togliere la skill combo dalle skill normali e lasciarla solo premendo il tasto SHIFT non c'è???

  6. Ciao allora innanzitutto grazie per il lavoro :D io uso il ccoa ho inserito dunque lo script per il ccoa!!!
    Ho configurato la parte apposita nel seguente modo:

    module Impostazioni
    class CTCombo
     
    TASTO_CAMBIO_SKILL_E_COMBO = Input::A
    # I combo vengono utilizzati scegliendo Skill dal menu (o come l'avete
    # tradotto) e premendo un tasto.
    # Premendolo nuovamente si torna alle skill normali. Con questa costante
    # si specifica il tasto da premere.
    # Input::A equivale a SHIFT
    # Input::CTRL equivale a CONTROL
    # Input::L e Input::R equivalgono a PageUp e PageDown
    # e ce ne sono altri, l'importante ? che c'? Input:: prima
     
    ARCHIVIAZIONE_VIA_SWITCH = 0
    # Occorre spendere due parole...
    # In Chrono Trigger ci sono tre membri che vanno in battaglia ma i personaggi
    # che sono nel party (oltre quei tre) dal menu possono usare i combo. Questa
    # situazione pu? essere emulata tramite switch mettendo 1. Con 0 per il combo
    # saranno considerati validi soltanto i personaggi che vanno in battaglia.
     
    SWITCH_INIZIALE_MEMBRI = 11
    # Se la constante sopra ? settata a 1 questo valore specifica lo switch che
    # viene attivato quando il PRIMO eroe ? nel party. Gli altri eroi avranno gli switch
    # seguenti a seconda del loro ordine nel database.
    # Da notare che se questo metodo ? attivo gli switch vanno impostati anche per
    # i tre eroi che vanno in battaglia.
     
    USA_ATTRIBUTI_SKILL = 0
    # Attiva (1) o disattiva (0) il sistema di abilitazione skill per attributi.
    # Dato che non tutti conoscono questa opzione (che era standard nei vecchi
    # rpg maker) ho pensato di dare la possibilit? di rimuoverla.
    # Qualunque sia l'impostazione, varr? solo per le SKILL COMBO!
    # Quindi per le skill normali baster? mettere sopra (attivo) o sotto (disattivo)
    # il Main lo Skill AddOn incluso in questa demo.
    end
    end
     
    $combo_skill = [77, 78]
    # Contiene gli id delle skill che sono combo.
    # In questo caso le skill dal n? 82 al n? 84 sono combo.
    # Quindi vi chiederete: "Sono combo s?, ma chi le usa?"
    # Questo viene specificato sotto.
     
    $combo_hero = [[1, 2], [4, 3]]
    # Contiene gli id degli eroi che usano le combo (per ogni combo sono tra parentesi quadra).
    # In questo caso la prima skill combo (la n? 82 come impostato sopra) sar? eseguita dagli eroi
    # n?1 e 8; la seconda skill dagli eroi 5 e 8; la terza da 7 e 8.
    # E a questo punto vi chiederete: "E come faccio a specificare gli MP necessari per ogni eroe?"
    # E anche questo viene specificato sotto.
     
    $combo_point = [[1, 1], [1, 1]]
    # Contiene i punti necessari per eseguire la combo per ogni eroe.
    # Identico a quello sopra, solo che dovete sostituire il numero dell'eroe con gli MP necessari per
    # utilizzare la combo. In questo caso nella skill 82 l'eroe 1 necessiter? di 100 MP, l'eroe 8 di 75.
    # Nota: gli MP specificati nella scheda della skill, se la skill ? combo, non serviranno
    # ad un emerito niente.
     
    # Fine configurazioni
    

    Per? quando in battaglia vado su Magia e premo SHIFT mi si apre una finestra e li le magie scelte per il combo non appaiono cio? la finestra ? vuota!!! =( come mai???

  7. Caratteristica??? In che senso???

    L'obiettivo dello script deve essere quello di cambiare la formazione in battaglia!!! Il battle system di default ricrea una formazione simile a quella SHOOT ma io voglio che tramite menu il giocatore possa cambiare la formazione scegliendone altre :D così il gioco è più carino :D

  8. Eccomi con l'ennesimo quesito!!! (Ma almeno c'è un modo per ringraziare tutti quelli che aiutano??? :))

    Allora cerco uno script, compatibile col mio battle system (CCOA 3.04 RTA) che mi permetta, tramite menu, di cambiare la formazione in battaglia scegliendone tra 4 possibile (per esempio!!!) :D

    Ecco cosa intendo:

    http://shrines.rpgclassics.com/snes/smas/howtoplay/shoot_formation.gif Formazione SHOOT

    http://shrines.rpgclassics.com/snes/smas/howtoplay/arrow_formation.gif Formazione ARROW

    http://shrines.rpgclassics.com/snes/smas/howtoplay/victory_formation.gif Formazione VICTORY

    http://shrines.rpgclassics.com/snes/smas/howtoplay/cluster_formation.gif FORMAZIONE CLUSTER

     

    E' possibile :D ciauuu!!! E grazie a chi ancora mi aiuterà :D

  9. Cercando su internet (qui non l'ho trovato) ho trovato questo scripit di CCOA

    #==============================================================================

    # ** Heal On Level Up

    # By Ccoa

    #------------------------------------------------------------------------------

    # When you level up all your HP and SP will be return to max

    #==============================================================================

     

    class Game_Actor < Game_Battler

    alias exp_normal exp

    def exp=(exp)

    @exp = [[exp, 9999999].min, 0].max

    # Level up

    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0

    @level += 1

    # Learn skill

    for j in $data_classes[@class_id].learnings

    if j.level == @level

    learn_skill(j.skill_id)

    end

    end

    # heal

    @hp = self.maxhp

    @sp = self.maxsp

    end

    # Level down

    while @exp < @exp_list[@level]

    @level -= 1

    end

    # Correction if exceeding current max HP and max SP

    @hp = [@hp, self.maxhp].min

    @sp = [@sp, self.maxsp].min

    end

    end

     

    Ma purtroppo cura anche gli SP a me serve solo per gli HP

  10. Ciao ho trovato questo script per creare Battlebacks animati, ovvero ripetendo una sequenza di immagini le quali dovranno avere alla fine del nome un numero progressivo esempio:

    Casa30

    Casa31

    Casa32

     

    Lo script è il seguente:

     

    Aggiungi le seguenti variabili dopo @timer_sprite = Sprite_Timer.new in Spriteset_Battle (linea 49):

     

    @frame = 0

    @frame_num = 1

    @delay = 20

    @old_fc = Graphics.frame_count

     

    Sotto @battleback_name = $game_temp.battleback_name aggiungere:

     

    frame_num = @battleback_name[@battleback_name.size-2].chr

    @frame_num = (0..9).include?(@frame_num.to_i) ? @frame_num.to_i : 1

     

    Ed infine dopo @viewport4.update aggiungere:

    ]if @frame_num > 1 and Graphics.frame_count - @old_fc > @delay

    @frame += 1

    @frame %= @frame_num

    @battleback_name[@battleback_name.size - 1] = @frame.to_s

    @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)

    @old_fc = Graphics.frame_count

    end

    Io ho fatto tutto ma il battleback rimane statico perché???

×
×
  • Create New...