XP 스크립트

http://www.dubealex.com/asylum/index.php?showtopic=6512
  이 스크립트에서 전투후 주어지는 경험치는 (적 파티 경험치)/(파티의 캐릭터 수)입니다.  즉, 경험치가 20인 몬스터를 2명이서 잡으면 한 사람당 돌아오는 경험치는 10이 됩니다.


#=============================================================
# • After Battle Changes
#------------------------------------------------------------------------------
# Slipknot
# 1.1
# 15/02/06
#------------------------------------------------------------------------------
=begin
  Version 1.1
  - Fixed experience split.
  - In the result window, now appear the total experience.
=end
#=============================================================

module Battle_End_Options
  #--------------------------------------------------------------------------
  # • Split experience received?
  #--------------------------------------------------------------------------
  Split_Exp = false
  #--------------------------------------------------------------------------
  # • Full recover when actor increase level?
  #--------------------------------------------------------------------------
  Level_Up_Recover = true
  #--------------------------------------------------------------------------
  # • Phase 5 wait time
  #--------------------------------------------------------------------------
  End_Frames = 70
  #--------------------------------------------------------------------------
end

#------------------------------------------------------------------------------
# Begin Scene_Battle Edit
#------------------------------------------------------------------------------
class Scene_Battle
  #--------------------------------------------------------------------------
  include Battle_End_Options
  #--------------------------------------------------------------------------
  def start_phase5
    @phase = 5
    $game_system.me_play($game_system.battle_end_me)
    $game_system.bgm_play($game_temp.map_bgm)
    exp = gold = old_exp = 0
    treasures = []
    for enemy in $game_troop.enemies
      unless enemy.hidden
        exp += enemy.exp
        gold += enemy.gold
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    treasures = treasures[0..5]
    psize = $game_party.actors.size-1
    old_exp = exp
    if Split_Exp
      can_get = 0
      0.upto(psize) do |x|
        actor = $game_party.actors[x]
        next if actor.cant_get_exp?
        can_get += 1
      end
      exp = (old_exp / can_get).ceil if can_get > 0
    end
    for i in 0..psize
      actor = $game_party.actors[i]
      unless actor.cant_get_exp?
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
          if Level_Up_Recover
            actor.hp = actor.maxhp
            actor.sp = actor.maxsp
          end
        end
      end
    end
    $game_party.gain_gold(gold)
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    @result_window = Window_BattleResult.new(old_exp, gold, treasures)
    @phase5_wait_count = End_Frames
  end
end
#------------------------------------------------------------------------------
# End Scene_Battle Edit
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Begin Game_Actor Edit
#------------------------------------------------------------------------------
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  def final_level?
    return @level >= $data_actors[@actor_id].final_level
  end
  #--------------------------------------------------------------------------
  def cant_get_exp?
    return true if final_level?
    super
  end
end
#------------------------------------------------------------------------------
# End Game_Actor Edit
#------------------------------------------------------------------------------

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '15'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
341 기타 Shift Puzzles v2 by SephirothSpawn (SDK호환) 3 file 백호 2009.02.22 1170
340 기타 Shift Puzzles by SephirothSpawn (SDK호환) 1 file 백호 2009.02.22 1389
339 기타 SG_Window Control v2 by sandgolem 백호 2009.02.22 823
338 이동 및 탈것 SG_Wait for Move Completion Fix by sandgolem (SDK호환) 백호 2009.02.22 860
337 기타 SG_Transfer Player Music Fix v2 by sandgolem (SDK호환) 1 백호 2009.02.22 824
336 상태/속성 SG_State Immunity Message by sandgolem (SDK 호환) 백호 2009.02.22 1056
335 스킬 SG_Skill Invoking Battle Items by sandgolem (SDK호환) 백호 2009.02.22 894
334 스킬 SG_Skill Break by sandgolem (SDK호환) 백호 2009.02.22 772
333 기타 SG_Settings Control by sandgolem 백호 2009.02.22 884
332 변수/스위치 SG_Self Variables by sandgolem 백호 2009.02.22 1275
331 기타 SG_Multiple Currencies v3 by sandgolem (SDK호환) 백호 2009.02.22 803
330 맵/타일 SG_Map Pause ver.1 by sandgolem 2 백호 2009.02.22 1290
329 아이템 SG_Item Break by sandgolem (SDK호환) 백호 2009.02.22 897
328 메뉴 SG_Hide zero SP cost by sandgolem (SDK호환) 백호 2009.02.22 1065
327 아이템 SG_Hide free item cose by sandgolem (SDK호환) 백호 2009.02.22 935
326 변수/스위치 SG_Gold Window Variables v2 by sandgolem (SDK호환) 백호 2009.02.22 899
325 스킬 SG_Escape Only Skills by sandgolem (SDK호환) 백호 2009.02.22 752
324 아이템 SG_Escape Only Items by sandgolem (SDK호환) 백호 2009.02.22 850
323 기타 SG_Call Script Fix by sandgolem (SDK호환) 백호 2009.02.22 802
322 저장 SG_Broken Save File Fix by sandgolem (SDK호환) 1 백호 2009.02.22 1068
Board Pagination Prev 1 ... 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... 52 Next
/ 52