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 6189
681 전투 배틀 포인트 1 백호 2009.02.22 918
680 전투 배틀 스테이터스·클리어 디자인 13 file 백호 2009.02.21 2468
679 전투 배틀 리포트 화면 변경 스크립트 2 file 백호 2009.02.21 1444
678 이동 및 탈것 방향키를 누름에따라 점프의 거리가 길어진다 - 출처:엑사포 의 비밀소년님과 연금술사님의 스크립트를 개량함 3 백호 2009.02.21 1235
677 전투 방어시회복하는거래요. 8 카르닉스 2010.02.26 1579
676 전투 방어시에 속성 저항,스테이트무시 스크립트 1 백호 2009.02.22 1018
675 밤낮 구별 하는 스크랩트 입니다..? 32 WMN 2008.03.17 2552
674 기타 밤/낮 변화 시스템 스크립트 4 file 백호 2009.02.21 1770
673 기타 발소리 스크립트 4 file 백호 2009.02.21 1614
672 이동 및 탈것 반칸 이동하기 14 file 느싱 2009.03.09 3460
671 상점 밑에 글 영어로 뜨는거 수정(여관시스템) 7 file 백호 2009.02.22 1684
670 이동 및 탈것 밑에 KIN 님의 MP 없어지는 대쉬, 제가 손좀 봤음 1 백호 2009.02.22 1245
669 미니맵 미니맵을 표시해주는 스크립트입니다... 41 file - 하늘 - 2009.08.05 5191
668 미니맵 미니맵(중복률100%? 한글번역!) 17 백호 2009.02.21 3423
667 미니맵 미니맵 스크랩트 + 예재 15 file WMN 2008.03.17 2674
666 미니맵 미니맵 만들기~! 14 file 블리치캐릭셋원함 2010.11.24 4352
665 전투 물리친 적의수 표시 file 백호 2009.02.21 1131
664 메시지 문자 메세지 띄우기 스크립트 10 file 백호 2009.02.21 3070
663 변수/스위치 무기변수 스크립트 1 file 백호 2009.02.22 1614
662 기타 무기& 방어구 레벨제한 스크립트 23 file 백호 2009.02.21 1880
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