Ace 스크립트

스킬을 훔치는 시스템입니다.


돈 밝히는 모 게임회사의 온라인게임에서 새로나온 직업이 아마 이런 기술을 가지고 있죠?


저는 아직 rgss가 미숙해서 잘 이해가 되진 않지만, 잘 아시는 분들이 아마 잘 활용하리라 믿습니다.


출처 : http://translate.googleusercontent.com/translate_c?hl=ko&prev=/search%3Fq%3Drpg%2Bvx%2Bace%26hl%3Dko%26newwindow%3D1%26biw%3D667%26bih%3D639%26tbs%3Dqdr:h%26prmd%3Dimvns&rurl=translate.google.co.kr&sl=en&twu=1&u=http://yamiworld.wordpress.com/2011/12/11/yeas-add-on-skill-steal-unofficial-edition-v1-00/&usg=ALkJrhgZA81UMIKE1w1s40raka35XXm_-A






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

# 겈 Yanfly Engine Ace - Skill Steal v1.00

#   Yami's Unofficial Edition

# -- Last Updated: 2011.12.11

# -- Level: Normal

# -- Requires: n/a

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


$imported = {} if $imported.nil?

$imported["YEA-SkillSteal"] = true


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

# 겈 Updates

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# 2011.12.11 - Edited (Yami).

# 2011.12.10 - Started Script and Finished.

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

# 겈 Introduction

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# This script enables items and skills to have skill stealing properties. When

# an actor uses that said item or skill on an enemy and the enemy has skills

# that can be stolen, that actor will learn all of the skills the enemy has to

# provide. This skill stealing system is madeakin to the Final Fantasy X's

# Lancet skill from Kimahri.

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

# 겈 Instructions

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# To install this script, open up your script editor and copy/paste this script

# to an open slot below 겈 Materials/멹띫 but above 겈 Main. Remember to save.

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

# Skill Notetags - These notetags go in the skills notebox in the database.

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

# <skill steal>

# If this skill targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list.

#

# <skill steal temp>

# If this skill targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list, but all learned skills

# will be forget when the battle ends.

# <stealable skill: x>

# A skill with this notetag can be stolen from enemies if it is listed within

# the enemy's action list. x is the chance this skill can be stolen.

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

# Item Notetags - These notetags go in the items notebox in the database.

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

# <skill steal>

# If this item targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list.

#

# <skill steal temp>

# If this skill targets an enemy, the actor who uses it will learn all of the

# stealable skills the enemy knows in its action list, but all learned skills

# will be forget when the battle ends.

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

# 겈 Compatibility

# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that

# it will run with RPG Maker VX without adjusting.

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


module YEA

  module SKILL_STEAL

    

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # - Battlelog Settings -

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    # These are the various battlelog settings made for skill stealing. Change

    # the text and message duration for a successful skill stealing.

    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    MSG_SKILL_STEAL = "%s learns %s from %s!" # Text for successful steal.

    MSG_FAIL        = "%s fails on learning %s from %s!" # Text for successful steal.

    MSG_DURATION    = 4                       # Lower number = shorter duration.

    

  end # SKILL_STEAL

end # YEA


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

# 겈 Editting anything past this point may potentially result in causing

# computer damage, incontinence, explosion of user's head, coma, death, and/or

# halitosis so edit at your own risk.

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


module YEA

  module REGEXP

  module USABLEITEM

    

    SKILL_STEAL     = /<(?:SKILL_STEAL|skill steal)>/i

    SKILL_STEAL_TEM = /<(?:SKILL_STEAL_TEMP|skill steal temp)>/i

    STEALABLE_SKILL = /<(?:STEALABLE_SKILL|stealable skill):[ ](d+)?>/i

    

  end # USABLEITEM

  end # REGEXP

end # YEA


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

# 걾 DataManager

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


module DataManager

  

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

  # alias method: load_database

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

  class <<self; alias load_database_ss load_database; end

  def self.load_database

    load_database_ss

    load_notetags_ss

  end

  

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

  # new method: load_notetags_ss

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

  def self.load_notetags_ss

    groups = [$data_skills, $data_items]

    for group in groups

      for obj in group

        next if obj.nil?

        obj.load_notetags_ss if obj.is_a?(RPG::Skill)

        obj.load_notetags_ss if obj.is_a?(RPG::Item)

      end

    end

  end

  

end # DataManager


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

# 걾 RPG::UsableItem

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


class RPG::UsableItem < RPG::BaseItem

  

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

  # public instance variables

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

  attr_accessor :skill_steal

  attr_accessor :skill_steal_temp

  attr_accessor :stealable_skill

  attr_accessor :stealable_skill_chance

  

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

  # common cache: load_notetags_s

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

  def load_notetags_ss

    #---

    self.note.split(/[rn]+/).each { |line|

      case line

      #---

      when YEA::REGEXP::USABLEITEM::SKILL_STEAL

        @skill_steal = true

      when YEA::REGEXP::USABLEITEM::SKILL_STEAL_TEM

        @skill_steal_temp = true

      when YEA::REGEXP::USABLEITEM::STEALABLE_SKILL

        next unless self.is_a?(RPG::Skill)

        @stealable_skill = true

        @stealable_skill_chance = $1.to_i

        @stealable_skill_chance = 0 if @stealable_skill_chance < 0

        @stealable_skill_chance = 100 if @stealable_skill_chance > 100

      #---

      end

    } # self.note.split

    #---

  end

  

end # RPG::UsableItem


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

# 걾 Game_Battler

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


class Game_Battler < Game_BattlerBase

  

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

  # public instance variables

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

  attr_accessor :stolen_skills

  

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

  # alias method: on_battle_start

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

  alias steal_skill_on_battle_start on_battle_start

  def on_battle_start

    steal_skill_on_battle_start

    @stolen_skills = [] if self.actor?

  end

  

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

  # alias method: on_battle_end

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

  alias steal_skill_on_battle_end on_battle_end

  def on_battle_end

    steal_skill_on_battle_end

    if self.actor?

      for i in @stolen_skills

        forget_skill(i)

      end

      @stolen_skills = []

    end

  end

  

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

  # alias method: item_user_effect

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

  alias game_battler_item_user_effect_ss item_user_effect

  def item_user_effect(user, item)

    game_battler_item_user_effect_ss(user, item)

    item_skill_steal_effect(user, item)

  end

  

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

  # new method: item_skill_steal_effect

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

  def item_skill_steal_effect(user, item)

    return unless item.skill_steal

    return unless user.actor?

    return if self.actor?

    for skill in stealable_skills

      next if user.skill_learn?(skill)

      @result.success = true

      break

    end

  end

  

end # Game_Battler


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

# 걾 Game_Enemy

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


class Game_Enemy < Game_Battler

  

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

  # stealable_skills

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

  def stealable_skills

    array = []

    for action in enemy.actions

      skill = $data_skills[action.skill_id]

      array.push(skill) if skill.stealable_skill

    end

    return array

  end

  

end # Game_Enemy


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

# 걾 Scene_Battle

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


class Scene_Battle < Scene_Base

  

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

  # alias method: apply_item_effects

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

  alias scene_battle_apply_item_effects_ss apply_item_effects

  def apply_item_effects(target, item)

    scene_battle_apply_item_effects_ss(target, item)

    apply_skill_steal(target, item)

  end

  

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

  # new method: apply_skill_steal

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

  def apply_skill_steal(target, item)

    return unless item.skill_steal or item.skill_steal_temp

    return if target.actor?

    return unless @subject.actor?

    for skill in target.stealable_skills

      next if @subject.skill_learn?(skill)

      if rand(100) <= skill.stealable_skill_chance

        @subject.learn_skill(skill.id) if !item.skill_steal_temp

        if item.skill_steal_temp

          @subject.learn_skill(skill.id)

          @subject.stolen_skills.push(skill.id) if !@subject.stolen_skills.include?(skill.id)

        end

        string = YEA::SKILL_STEAL::MSG_SKILL_STEAL

        skill_text = sprintf("\i[%d]%s", skill.icon_index, skill.name)

        text = sprintf(string, @subject.name, skill_text, target.name)

        @log_window.add_text(text)

        YEA::SKILL_STEAL::MSG_DURATION.times do @log_window.wait end

        @log_window.back_one

      else

        string = YEA::SKILL_STEAL::MSG_FAIL

        skill_text = sprintf("\i[%d]%s", skill.icon_index, skill.name)

        text = sprintf(string, @subject.name, skill_text, target.name)

        @log_window.add_text(text)

        YEA::SKILL_STEAL::MSG_DURATION.times do @log_window.wait end

        @log_window.back_one

      end

    end

  end

  

end # Scene_Battle


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

# 겈 End of File

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

  • ?
    rpgxp배우미 2011.12.30 16:41

    악 메이플 ㅋㅋㅋ

  • ?
    단맛과자 2011.12.31 16:51

    몬스터의 스킬을 뺏는건가요?

  • ?
    김진리 2012.07.21 22:16
    팬텀 ㅋㅋㅋㅋ
  • profile
    시즈쿠 2015.09.30 23:08
    뭐지.. 이건 어떻게 쓰는거지.....?
  • profile
    리팝이 2016.08.28 02:14
    요기 글에 있는 스크립트를 복사해서 쓰면 안대네요
    https://github.com/Archeia/YEARepo/blob/master/Gameplay/Skill_Steal.rb#L3
    요기 링크가셔서 스크립트 복사하고 하니 잘 대네요

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 5110
공지 RPG VX ACE 유용한 링크 모음 16 아방스 2012.01.03 28925
157 전투 Ace 경험치 직접 설정 12 쿠쿠밥솥 2012.02.05 4004
156 아이템 VXAce 아이템 합성 스크립트 Ver 0.8 17 아이미르 2012.08.23 4000
155 스킬 [VX/VX Ace] Skill_Update_System 10 file 허걱 2012.06.11 3995
154 직업 직업 경험치+능력치 설정 확장 7 file zubako 2015.01.27 3988
153 타이틀/게임오버 코아 코스튬씨의 랜덤 타이틀 스크립트를 VX Ace용으로 변환 (완성판) 2 Alkaid 2012.01.25 3981
152 상태/속성 RGSS3_스테이터스 표시 확장(추가) by tomoaky 4 file 아이미르 2013.01.03 3972
151 기타 ACE) 캐릭터 사전 by 77ER 19 77이알 2012.09.17 3937
150 기타 크리스탈 엔진 : 포켓몬 배틀 시스템 7 file 스리아씨 2013.09.24 3894
» 스킬 스킬 스틸 시스템 5 아르피쥐 2011.12.18 3880
148 메뉴 메뉴창 없애기 2 file hamin 2014.02.28 3877
147 전투 능력 강화/약화의 누적식 개조(버그수정) 13 아이미르 2012.02.08 3876
146 전투 Ra TBS Alpha by Eshra 1 file 습작 2013.05.13 3856
145 메뉴 XS 메뉴 스크립트 4 file 스리아씨 2013.10.22 3840
144 저장 FF6 Advance식 저장/불러오기 by Raizen884 4 file Alkaid 2013.02.09 3820
143 스킬 VXAce 스킬레벨, 스킬장착 스크립트 11 file 아이미르 2012.11.01 3813
142 메뉴 Syvkal's Ring Menu VX Ace 2 Alkaid 2012.09.08 3813
141 아이템 VXAce 아이템 도감 스크립트 7 file 아이미르 2012.12.31 3801
140 전투 WhiteFlute: 자동전투 스크립트 3 file Alkaid 2012.09.20 3774
139 기타 게임속 이벤트를 텍스트 파일로 추출 2 file 영감쟁e 2013.10.15 3769
138 아이템 VXAce 보관함 스크립트 12 file 아이미르 2013.02.07 3703
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 Next
/ 11