XP 스크립트

#==============================================================================
# ■ RPGモジュール
#==============================================================================
module RPG
  class Enemy
    def name
      name = @name.split(/ /)[0]
      return name != nil ? name : ''
    end
    def nwe_hp
      name = @name.split(/hp/)[1].to_i
      return name != nil ? name : 0
    end
  end
end
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # ● 基本 MaxHP の取得
  #--------------------------------------------------------------------------
  def base_maxhp
    n = $data_enemies[@enemy_id].maxhp
    i = $data_enemies[@enemy_id].nwe_hp
    if i > 0
      n = i
    end
    return n
  end
end
#==============================================================================
# ■ Game_Battler (分割定義 1)
#==============================================================================
class Game_Battler
  #--------------------------------------------------------------------------
  # ● MaxHP の取得
  #--------------------------------------------------------------------------
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, 1000000000].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, 1000000000].min
    return n 
end
end
 
[수정: 사용법을 알려주신 '내가바로T다'님. 감사합니다.]
 
사용법: 이벤트 스크립트창에 $data_enemies[에너미번호].maxhp = 원하는 체력 <-이걸 치시면 됩니다.
[에너미번호]칸에는 데이터 베이스에 있는 에너미들의 번호를 적으시고. 원하는 체력 칸에는 원하는 체력을 적으시면 됩니다.
예:고스트가 1번일 경우 '$data_enemies[1].maxhp = 1000000000' 
 
그리고 최대 hp량을 수정하고자 할경우에는
n = [[base_maxhp + @maxhp_plus, 1].max, 1000000000].min
 n = [[Integer(n), 1].max, 1000000000].min
 
노란부분을 원하시는 양만큼 줄여주세요.


- 게임공작소의 '좌절망'님께서 올려주신 자료입니다.
Comment '3'
  • profile
    NewSet 2009.04.22 21:29
    댓글없으니까 내가 댓글단다능.
  • ?
    白月のはる 2010.01.31 18:46

    이거 적 캐릭터 이름에다가 띄우고 hp원하는 양 써도 되요 ㅎㅎ.

    예) 고스트 hp1000000

  • ?
    케로로 2012.02.12 12:44

    오오오 쩝니다, 님짱먹으세요


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
94 전투 배틀 포인트 1 백호 2009.02.22 918
93 전투 마법검 스크립트 1 백호 2009.02.22 1426
92 전투 Steal Script 5.5 by trickster@rmxp.net (SDK호환) file 백호 2009.02.22 1206
91 전투 S ABS_NonSDK ver 1 file 백호 2009.02.22 1458
90 전투 S ABS_NonSDK(구버전용) 5 file 백호 2009.02.22 1494
89 전투 SBABS v3 6 file 백호 2009.02.22 2046
88 전투 전투의 커맨드에 따라 능력치를 상승 백호 2009.02.22 904
87 전투 ATB전투 5 백호 2009.02.22 3369
86 전투 보행그래픽으로 싸우는 턴알 17 백호 2009.02.22 3782
85 전투 RPG Advocate의 데모에서 발췌한 사이드뷰용 전투상태창 4 file 백호 2009.02.22 3599
84 전투 데미지 출력 스크립트 6 백호 2009.02.22 1810
83 전투 전투의 승리마다 행동에 따라서 능력치가 상승한다! 1 백호 2009.02.22 1238
82 전투 SG_Auto battle by sandgolem (SDK호환) 백호 2009.02.22 1031
81 전투 Advanced Individual Battle Command v2.1 by Trickster@rmxp.org (SDK호환) 1 file 백호 2009.02.22 1189
80 전투 FF10 전투 대미지 공식 by hydro@rmxp.org 백호 2009.02.22 1141
79 전투 레벨업시 능력치 표시 2 백호 2009.02.22 1621
78 전투 FFX, X-2, FFXII 식으로 대미지 표시하기 by squall@rmxp.org 백호 2009.02.22 1115
77 전투 Real Time Active Battle(RTAB) 1.14 from 歯車の城 3 file 백호 2009.02.22 1315
76 전투 [신기술 체험] 강회된 횡스크롤 액알 13 file 백호 2009.02.22 6842
75 전투 RTAB 1.15와 애드온 from 歯車の城 4 file 백호 2009.02.22 1186
Board Pagination Prev 1 2 3 4 5 6 7 8 9 Next
/ 9