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 6153
681 전투 CSSR6-스태미너 시스템 1 file 백호 2009.02.22 2337
680 HUD 적의 남은 HP만큼 적의 이름 색깔 변하는 스크립트 6 file 백호 2009.02.21 2337
679 HUD MOG_C_HUD. 6 file Bera 2010.09.11 2329
678 메뉴 자세한 캐릭터 정보표시 스크립트 버전2 5 아방스 2009.01.12 2328
677 저장 렉없은 자동 세이브 15 알피지GM 2010.03.07 2327
676 스크립트를 배우시기 전에..... 5 독도2005 2008.08.31 2326
675 장비 장비 착용 효과 스크립트 14 file 백호 2009.02.21 2323
674 상점 상점 메뉴 개조시킨 스크립트 9 file 백호 2009.02.21 2322
673 기타 스탯 13 file 이안 2010.01.17 2320
672 메뉴 제가 쓰는 메뉴 14 file 백호 2009.02.21 2318
671 온라인 멀티넷 스크립트 수정본 (약간 한글화) 7 백호 2009.02.22 2315
670 메시지 1문자식 표시랑 따랑소리 나는 스크립트 8 백호 2009.02.22 2305
669 아이템 아이템도감 14 키라링 2009.01.22 2299
668 키입력 [xp,vx]마우스 제스쳐 스크립트 2 클로시스 2013.09.26 2296
667 Run-Smoother! ( 렉 줄이는 스크립트 ) 12 file Bera 2010.10.16 2295
666 KGC 스탯올리기 스크립트 (능력치 분배 스크립트) 13 카이어덱터 2010.02.26 2292
665 저장 심플 세이브&로드 개조(필요할 때 원하는 슬롯에 자동저장) 5 나렌시아 2011.02.24 2291
664 기타 rpgxp [체험판] 입니다. 6 file 인웅이 아부지 2010.01.12 2289
663 기타 명령어들 6 지존!! 2010.07.24 2288
662 타이틀/게임오버 타이틀 화면 연출 4 file 백호 2009.02.21 2286
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