VX 스크립트

▶ MAIN 섹쉰 위쪽에 추가해주세요
#===============================================================================
# Regenerate HP/MP - RMVX Version
#===============================================================================
# Written by Synthesize
# Version 1.2.0
# January 19, 2008
#===============================================================================
#            *This script is not compatible with RPG Maker XP*
#===============================================================================
module SynRegen
  # Format = { Actor_ID => Percent to restore, Actor_ID2 => Percent to restore}
  HP_regen = {1 => 5, 2 =>7} # %
  # You can define how much HP each individual actor regenerates when they
  # Defend. Add new actors by seperating each returning value with a comma (,)
  #-----------------------------------------------------------------------------
  # This value determines the Default Percent growth if the Actor_ID is not
  # in the above hash
  HP_regen.default = 5 # %
  #-----------------------------------------------------------------------------
  # Set to true to enable HP regen in battle, false to disable.
  Use_hp_regen = true
  #----------------------------------------------------------------------------
  # Format = {Actor_ID => SP to restore
  SP_regen = {1 => 5, 2 => 7} # %
  # You can define how much SP each individual actor regenerates when they
  # defend. Add new actors by seperating each returning value with a comma (,)
  #-----------------------------------------------------------------------------
  # This is the default percentage to regenerate if the Actor_ID is not in the
  # hash.
  SP_regen.default = 5 # %
  #-----------------------------------------------------------------------------
  # Set to true to enable, false to disable
  Use_mp_regen = true
  #-----------------------------------------------------------------------------
  # Draw how much HP/MP the actor regenerated?
  Draw_text = true
  #-----------------------------------------------------------------------------
  # The defense rate if the actor has 'Super Defense'
  Super_guard_rate = 4
  #-----------------------------------------------------------------------------
  # The defense rate if the actor has 'Normal Defense'
  Normal_guard_rate = 2
end
#-------------------------------------------------------------------------------
# Scene_Battle
#   This aliases the execute_action_guard method in Scene_Battle
#-------------------------------------------------------------------------------
class Scene_Battle
  # Alias execute_action_guard
  alias syn_regen_execute_guard execute_action_guard
  #-----------------------------------------------------------------------------
  # Execute Action_Guard
  #-----------------------------------------------------------------------------
  def execute_action_guard
    # Calculate the amount of HP and MP gained
    hp_restore = ((@active_battler.maxhp * SynRegen::HP_regen[@active_battler.id]) / 100) if SynRegen::Use_hp_regen == true
    sp_restore = ((@active_battler.maxmp * SynRegen::SP_regen[@active_battler.id]) / 100) if SynRegen::Use_mp_regen == true
    # Calculate the different between MaxHP, HP, MaxMP and MP
    temp_value_hp = (@active_battler.maxhp - @active_battler.hp)
    temp_value_mp = (@active_battler.maxmp - @active_battler.mp)
    # Add HP and MP
    @active_battler.hp += hp_restore if SynRegen::Use_hp_regen == true
    @active_battler.mp += sp_restore if SynRegen::Use_mp_regen == true
    # Draw how much HP/MP the actor regenerated
    if temp_value_hp != 0 and temp_value_mp != 0
      @message_window.add_instant_text("#{@active_battler.name} HP increased by #{hp_restore} and MP increased by #{sp_restore}")
    elsif temp_value_hp != 0 and temp_value_mp == 0
      @message_window.add_instant_text("#{@active_battler.name} HP increased by #{hp_restore}")
    elsif temp_value_hp == 0 and temp_value_mp != 0
      @message_window.add_instant_text("#{@active_battler.name} MP increased by #{sp_restore}")
    end
    # Call the original code
    syn_regen_execute_guard
  end
end
#-------------------------------------------------------------------------------
# Game_Battler
#   This rewrites the defense method found in Game_Battler
#-------------------------------------------------------------------------------
class Game_Battler
  #-----------------------------------------------------------------------------
  # Apply_Guard_Damage
  #-----------------------------------------------------------------------------
  def apply_guard(damage)
    if damage > 0 and guarding?
      # Divide the total damage from the effectivness of the defense rate.
      damage /= super_guard ? SynRegen::Super_guard_rate : SynRegen::Normal_guard_rate    
    end
    return damage
  end
end
#===============================================================================
# This script is not compatible with Rpg Maker XP. However, I have also made a
# RPG Maker Xp version which can be found on RPGRPG Revolution.
#===============================================================================
#           * This script is untested but should work in theory *
#===============================================================================
# Written by Synthesize
# January 19, 2008
#===============================================================================
# Regenerate HP/MP - RMVX Version
#===============================================================================




Comment '15'
  • ?
    참겨니 2008.01.25 19:01

    메세지를 아에 않나오게 할 수는 없나요?

  • ?
    넌닝구가좋아 2008.03.21 18:05
    감사 감사!
  • profile
    NewSet 2008.03.28 21:40
    감사합니다^^!
  • ?
    이렐 2008.08.20 15:56

    감사합니다~

  • ?
    21thcentuary 2008.09.23 19:13
    좋긴좋은데 쓰기는 싫네.
  • ?
    레핀 2008.09.24 03:14
    이 스크립트를 쓰고서 [방어] 커맨드 이름을 [휴식]으로 바꿔버리면 딱이겠네요 ~
  • ?
    불독 2008.11.04 18:35
    저두 레핀 님 생각에 동의.
  • profile
    카와이 2009.01.12 19:30
    멋쟁이 ㅋ
  • ?
    흠냐흠냐 2009.07.07 17:46

    흠냐 복사하면 한줄로 쭉 나와서 어떻게 할수가 없네요 ㅎㄷ;;

  • ?
    음냐~~ 2010.02.12 15:04

    방어를 하니 mp,hp가 올라가는군요

    지정된 방패만 이 기능이 있으면 좋을것 같네요

  • ?
    이수 2010.06.12 14:04

    감사합니당ㅋㅋ

  • ?
    다시한번 2010.07.28 09:25

    감사합니다~ ㅇㅁㅇ 이런거 있는줄 모랐어요 ㅇㅁㅇ;;

  • ?
    달봉스쿨 2010.08.20 18:58

    스크립트는 좋은데, 이것도 어떻게 쓰느냐 일 것 같네요.ㅋ

  • ?
    하얀아이 2011.09.24 03:07

    오 마침 찾고 있었는데

  • ?
    러닝금빛 2012.06.15 20:27

    피가 사기적으로 차지 않도록 회복량 조절도 해주면 좋겠어요 ㅋ


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
61 전투 SRPGコンバータ for VX by AD.Bank 습작 2013.05.13 2970
60 전투 Actor Battler Graphics 13 아방스 2008.03.07 3065
59 전투 Animated Battlers VX 3.5 by DerVVulfman 2 Alkaid 2011.11.02 3097
58 전투 Animated Battlers VX 3.4 by DerVVulfman 5 file Alkaid 2010.09.10 3117
57 전투 RPG tankentai에서의 치명적 문제점을 보완한 스크립트 2 file 톰소여동생 2010.11.03 3117
56 전투 전투후렙업시나오는상세창 11 작은샛별 2010.03.07 3128
55 전투 불사신(무적) 스크립트 9 file 미얼 2009.10.29 3198
54 전투 사이드뷰배틀에서 찌르기 공격 가능하게 7 078656577er 2009.09.16 3223
53 전투 GTBS_VX 1.0 택틱컬rpg 14 file RPGbooster 2008.10.08 3352
52 전투 커먼이벤트 컷인 스크립트 15 허걱 2009.08.23 3399
51 전투 방패가없어? 그럼 방어못하게하는 스크립트. 16 file 할렘 2009.02.07 3425
50 전투 VX SRPG 스크립트를 살짝 손대봤습니다. 13 아이미르 2011.03.31 3428
49 전투 XAS Hero Edition VX Manual 번역 1 케이언 2012.01.02 3554
» 전투 방어를 했을경우 hp / mp 회복 되도록 하는 스크립트 15 아방스 2008.01.22 3746
47 전투 VX]Mog Battleback XP 1.0 11 file WMN 2008.04.06 3869
46 전투 Spirits System 정령 장착?이라고해야되나; 26 file 카르와푸딩의아틀리에 2009.08.19 3869
45 전투 VX SRPG 스크립트를 수정해봤습니다(8) - 누적수정 30 아이미르 2011.09.09 3911
44 전투 XAS Hero Edition VX 15 Alkaid 2011.12.28 4229
43 전투 GTBS 1.5.1.4 - GubiD's Tactical Battle System 10 아방스 2010.12.11 4451
42 전투 sbs battler configuration 한글 번역 13 file 시트르산 2010.09.23 4475
Board Pagination Prev 1 2 3 4 5 Next
/ 5