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 7314
741 비공정 스크립트의 탑승속도 변경하기. 3 아방스 2008.01.14 1364
740 HUD Advanced HUD Script 3 file 백호 2009.02.22 1365
739 기타 실제시간표시스크립트입니다...[중뷁이면지성;;] 4 백호 2009.02.22 1366
738 기타 빛의 퍼즐 -미니게임- 1 file 백호 2009.02.21 1370
737 기타 (T-RPG) 데미지 표시 시의 폰트를 설정 백호 2009.02.22 1371
736 기타 Minesweeper(지뢰찾기) by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1372
735 기타 스크린샷 찍는 스크립트 9 file 백호 2009.02.22 1377
734 기타 Chaos Project Debug System 1.06b by Blizzard file Alkaid 2010.09.07 1380
733 장비 KGC_EquipmentBreak(장비품 파괴) 1 백호 2009.02.22 1381
732 이동 및 탈것 플레이어 텔레포트 시키기 1 백호 2009.02.22 1383
731 변수/스위치 지정범위안에 들어오면 특정 스위치를 온/오프/교환 한다!! 2 백호 2009.02.21 1387
730 이동 및 탈것 금금님 요청 대쉬 1 백호 2009.02.22 1393
729 메뉴 Ring menu edit for SDK2 (Original by Hypershadow180) file Alkaid 2010.09.08 1395
728 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1397
727 기타 간단한 Scene_Base Alkaid 2010.09.09 1399
726 기타 CG모드 도입 스크립트 file 백호 2009.02.21 1401
» 스킬 Skills_Consume_Hp[By: Gando] - HP를 소비하는 스킬 스크립트 4 쉴더 2009.02.21 1402
724 메뉴 링메뉴 스크립트 file 백호 2009.02.21 1402
723 기타 KGC_UsableWeapon file 백호 2009.02.22 1402
722 오디오 Audio Module Rewrite mciSendString 1.1 by DerVVulfman Alkaid 2012.09.18 1403
Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ... 52 Next
/ 52