XP 스크립트

#==============================================================================
# ** Skills_Consume_Hp
#------------------------------------------------------------------------------
# By: Gando
# 18/5 2008
#------------------------------------------------------------------------------
#                              INTRODUCTION
#------------------------------------------------------------------------------
#
#  With this script-x you can have certain skills that not only consumes sp,
#  but also hp! Let's say you want to have a character that has a very powerful
#  skill. A skill so powerful that it damages himself too.
#  With this script-x this is possible.
#
#------------------------------------------------------------------------------
#                                 SETUP
#------------------------------------------------------------------------------
#
#  To have a skill that consumes hp, first create the skill in the skill database.
#  Then in this script-x, go to "Skills" in module HpDrain and add the skill id
#  and how much hp it should drain. Like this:
#
#  skill_id => [hp]
#

#  Damage_Popup - Toggle this true/false to enable/disable the popup damage text
#                 for the skills user.
#
#------------------------------------------------------------------------------
#  CREDITS: Gando.
#==============================================================================
# ** Module HpDrain
#==============================================================================
module HpDrain
#skill_id => [hp]
  Skills = 
  {
  13 => [10],
  57 => [50],
  61 => [200]
  }
 
  Damage_Popup = true
end


#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================
class Scene_Battle
  alias hp_cost_skill_action make_skill_action_result
  #--------------------------------------------------------------------------
  # * Make Skill Action Results
  #--------------------------------------------------------------------------
  def make_skill_action_result
    @skill = $data_skills[@active_battler.current_action.skill_id]
    if HpDrain::Skills.include?(@skill.id)
      @hp_drain = HpDrain::Skills[@skill.id][0]
      case @skill.id
      when @skill.id
        @active_battler.hp -= @hp_drain
        @active_battler.damage = @hp_drain
        @active_battler.damage_pop = HpDrain::Damage_Popup
       end
    end
    hp_cost_skill_action
  end
end

------------------------------------------------
윗 부분에서
  {
  13 => [10],
  57 => [50],
  61 => [200]
  }
이 부분의 x => [y]

부분이면 x는 스킬의 번호입니다. ex) '001:파이어' 에서 x = 1

y는 hp의 감소량입니다.

Comment '4'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 7310
681 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1187
680 장비 SIBruno's Advanced Equip Screen v2 file 백호 2009.02.22 1266
679 전투 SimpleAction (출처 -RPGXP 포럼 비밀소년님의 자작품) 1 file 백호 2009.02.21 1200
678 전투 Single/All Target Switching by RPG Advocate 백호 2009.02.22 828
677 기타 Sized Events 0.1 by Toby@rmxp.org file 백호 2009.02.22 856
676 스킬 Skill Requirements by SephirothSpawn (SDK호환) file 백호 2009.02.22 780
675 스킬 Skill Shop by SephirothSpawn file 백호 2009.02.22 829
674 스킬 Skill Shop by Trickster@rmxp.org file 백호 2009.02.22 1088
» 스킬 Skills_Consume_Hp[By: Gando] - HP를 소비하는 스킬 스크립트 4 쉴더 2009.02.21 1401
672 기타 Sphere Grid System file 백호 2009.02.21 786
671 전투 SRPGコンバータⅡ by AD.Bank 1 습작 2013.05.13 1802
670 전투 srpg용 스크립트라는데 4 세죠 2010.03.26 3534
669 메뉴 Star Ocean 3 형식으로 스테이터스 화면 변경 1 file 백호 2009.02.21 1597
668 전투 Star Ocean Battle System 3 file 백호 2009.02.22 1233
667 기타 Steal Script (SDK Required) file 백호 2009.02.21 1190
666 전투 Steal Script 5.5 by trickster@rmxp.net (SDK호환) file 백호 2009.02.22 1212
665 전투 Stealing/Mugging/Scanning 6.0 Final by Trickster (SDK호환) file 백호 2009.02.22 898
664 메뉴 Stormtronics CMS 5.39b - Hybrid Edition by Blizzard 4 file Alkaid 2010.09.06 1768
663 저장 StupidStormy36's Custom Save System 3 Alkaid 2010.10.05 1233
662 저장 StupidStormy36's Custom Save System 2010-10-06(05?) Edition 1 Alkaid 2010.10.07 1272
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ... 52 Next
/ 52