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 6153
1021 메시지 Taylor's Simple Message System 2000 Alkaid 2020.07.05 242
1020 제작도구 [XP/VX/VXA] Doodad's Editor by newold Alkaid 2020.07.12 384
1019 이름입력 한글조합입력기(영어가능) file 조규진1 2019.11.10 497
1018 전투 전투중에 장비들 교체하기 file 레이스89 2017.08.19 594
1017 기타 [All RGSS] FileTest (Unicode) file Cheapmunk 2014.12.29 611
1016 맵/타일 맵연결 스크립트 (데모첨부) file 게임애호가 2018.06.15 687
1015 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 709
1014 기타 Boat Script 백호 2009.02.21 729
1013 기타 Localization by ForeverZer0, KK20 습작 2013.04.26 738
1012 기타 Materia System file 백호 2009.02.21 749
1011 기타 Real-Time Day Night 3 백호 2009.02.22 751
1010 스킬 SG_Escape Only Skills by sandgolem (SDK호환) 백호 2009.02.22 752
1009 기타 killer님 요청하신 스크립트 두번째입니다. 나뚜루 2009.02.21 759
1008 기타 Letter by Letter Message Window by slipknot@rmxp.org (SDK호환) 1 file 백호 2009.02.22 760
1007 기타 Advanced Gold display by Dubealex 1 백호 2009.02.22 761
1006 스킬 Skill Requirements by SephirothSpawn (SDK호환) file 백호 2009.02.22 763
1005 기타 Sphere Grid System file 백호 2009.02.21 765
1004 기타 AMS-Advanced Message Script Edited by Dubleax 3 file 백호 2009.02.21 765
1003 스킬 SG_Skill Break by sandgolem (SDK호환) 백호 2009.02.22 772
1002 기타 Activation_system file 백호 2009.02.22 775
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