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 6202
881 기타 Hero Databass 4 file 백호 2009.02.22 797
880 기타 House Decoration System 1.6 by MephistoX (SDK 2.x, MACL 2.x 필요) 1 file Alkaid 2010.09.02 1494
879 HUD HP/SP 상태를 표시해주는 간이 윈도우 3 file 백호 2009.02.21 3069
878 HUD HP과 SP 바 19 Man... 2008.11.04 4536
877 HUD HUD Menu 1.2 by Raziel 6 file 백호 2009.02.22 2392
876 HUD HUD Menu 2.0 by Raziel 3 Alkaid 2010.09.07 2038
875 기타 ID띄우기 스크립트(新) 3 백호 2009.02.22 1280
874 저장 Improved Save by gerrtunk 2 file Alkaid 2010.10.13 1983
873 변수/스위치 Initial Switches and Variables by PK8 (XP/VX/VXA) Alkaid 2012.09.14 1298
872 저장 Inn & Save Point System by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 811
871 기타 Introduction & optional Splash 2.1 by SephirothSpawn (SDK호환) 1 백호 2009.02.22 860
870 아이템 Item Acquired Window by SiliconHero@rmxp.net 백호 2009.02.22 1096
869 키입력 Key Simulator by Fantasist 4 습작 2013.05.01 1145
868 키입력 Keyboard Input Module v5 by Near Fantastica (SDK호환) 백호 2009.02.22 1075
867 이름입력 Keyboard-Controlled Name Input Script by BlueScope@rmxp.org 1 file 백호 2009.02.22 1774
866 기타 KGC - RMXP 스크립트 개발용 프로젝트 1.01 4 file 백호 2009.02.22 1515
865 스킬 KGC - 도주스킬 스크립트 백호 2009.02.22 1193
864 기타 KGC - 입수 경험치&금 증가 스크립트 백호 2009.02.22 1307
863 기타 KGC 디버거 (최신 올라온 것에 비해 성능은 딸리지만) file 백호 2009.02.22 929
862 메뉴 KGC 메뉴화면 개조 스크립트 번역 3 file 백호 2009.02.22 1942
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52