XP 스크립트

http://f44.aaa.livedoor.jp/~ytomy/tkool/rpgtech/frame.html
  이미 아시는 분은 아실 아이템으로 스킬을 습득하게 하는 스크립트입니다.  스킬습득 아이템을 위한 속성을 만들고(스크립트에 지정한 것과 동일해야 함), 아이템의 HP회복량에 습득할 스킬의 ID를 쓰면 됩니다.


#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆スキル習得アイテム - KGC_ItemLearnSkill◆
#_/----------------------------------------------------------------------------
#_/ 使用するとスキルを習得するアイテムを作成します。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

$imported = {} if $imported == nil
$imported["ItemLearnSkill"] = true

if $game_special_elements == nil
  $game_special_elements = {}
  $data_system = load_data("Data/System.rxdata")
end
# スキル習得アイテム属性
$game_special_elements["item_learn_skill"] = $data_system.elements.index("スキル習得アイテム")
if $game_special_elements["item_learn_skill"] == nil
  $game_special_elements["item_learn_skill"] = $data_system.elements.index("スキル修得アイテム")
end

#==============================================================================
# ■ Game_Battler (分割定義 3)
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ● アイテムの効果適用
  #    item : アイテム
  #--------------------------------------------------------------------------
  alias item_effect_KGC_ItemLearnSkill item_effect
  def item_effect(item)
    # スキル修得属性を持っていない、または対象がエネミーの場合
    if !item.element_set.include?($game_special_elements["item_learn_skill"]) ||
        self.is_a?(Game_Enemy)
      # 元の処理を実行
      return item_effect_KGC_ItemLearnSkill(item)
    end

    # 習得済みの場合は戻る
    return false if self.skill_learn?(item.recover_hp)
    # クリティカルフラグをクリア
    self.critical = false
    # アイテムの効果範囲が HP 1 以上の味方で、自分の HP が 0、
    # またはアイテムの効果範囲が HP 0 の味方で、自分の HP が 1 以上の場合
    if ((item.scope == 3 || item.scope == 4) && self.hp == 0) ||
      ((item.scope == 5 || item.scope == 6) && self.hp >= 1)
      # メソッド終了
      return false
    end
    # 有効フラグをクリア
    effective = false
    # コモンイベント ID が有効の場合は有効フラグをセット
    effective |= item.common_event_id > 0
    # 命中判定
    hit_result = (rand(100) < item.hit)
    # 不確実なスキルの場合は有効フラグをセット
    effective |= item.hit < 100
    # 命中の場合
    if hit_result == true
      self.damage = nil
      # "HP回復量"のスキルを修得
      self.learn_skill(item.recover_hp)
      return true
    end
    return false
  end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6202
601 이동 및 탈것 新(?)대쉬기능 스크립트.. 3 백호 2009.02.22 1626
600 이동 및 탈것 자동으로 장애물을 피해가는 스크립트 13 file 백호 2009.02.22 1930
599 스킬 [KGC]시간차스킬 스크립트 -일종의 죽음의 선고?- 1 file 백호 2009.02.22 1666
598 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1390
597 미니맵 Passability Minimap by squall@rmxp.org 백호 2009.02.22 1125
596 이동 및 탈것 SG_Wait for Move Completion Fix by sandgolem (SDK호환) 백호 2009.02.22 860
595 이동 및 탈것 [통합] 텔레포트 통합 수정편 1 백호 2009.02.22 1143
594 이동 및 탈것 마나 소비 텔레포트 2 백호 2009.02.22 1156
593 HUD HUD Menu 1.2 by Raziel 6 file 백호 2009.02.22 2392
592 기타 Tax Script 1.2 by The Darklord@rmxp.org 2 file 백호 2009.02.22 1130
591 기타 Free Window Demo 1 file 백호 2009.02.22 1002
590 기타 Difficulty Options by SephirothSpawn 백호 2009.02.22 869
589 이동 및 탈것 플레이어 텔레포트 시키기 1 백호 2009.02.22 1375
588 메뉴 Trickster's Plug 'n' Play Gradient Bar 2.0 1 file 백호 2009.02.22 2051
587 스킬 Conditional+Conbo Skills 2.0 by trickster 2 file 백호 2009.02.22 1637
586 상태/속성 BattleStatus Modification 1.1 for RTAB by DerVVulfman@rmxp.org 2 file 백호 2009.02.22 1788
585 전투 Prize Point System 2.0 by Dark Ruby@rmxp.org 3 file 백호 2009.02.22 1742
584 전투 Battle Report 1.6 by Raziel@rmxp.org 1 file 백호 2009.02.22 1672
583 전투 [신기술 체험] Tactical Battle System 9 file 백호 2009.02.22 2034
582 전투 Active Time Battle 2.57 by パラ犬 6 file 백호 2009.02.22 2371
Board Pagination Prev 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ... 52 Next
/ 52