XP 스크립트

#==============================================================================
# ■ Jackolas Advance GameOver Script
#==============================================================================
# script by:            Jackolas
# Version number:       V 1.1
# Last edit date:       17-12-09
#
# Thanks:               macht102 (for requesting)
#                       elementisland (asking for options)
#                       winkio (for example script)
#==============================================================================
# Introduction:
#   The Advance Game-Over Script gives you the option to add almost every possible
#   game-over from popular games. from the respawn in pokemon centres till the
#   show menu where you can check to respawn, reload or restart in NWN.
# ====================
# Compatibility:
#   95% compatible with SDK v1.x. 80% compatible with SDK 2.x.
#   Will not work with scripts that edit the Scene_Gameover
# ====================
# Current Features:
#   - Fixed Spawn location / Variable spawn location
#   - Map id / Variable of map id
#   - Map x / Variable of map x
#   - Map y / Variable of map y
#   - Able to lose gold on death (true/false)
#   - How much gold to lose (can be in % or in fixed number)
#   - Able to lose exp on death (true/false)
#   - Able to lose lvls on death (true/false)
#   - how much exp to lose (can be in % or in fixed number)
#   - Auto-heal on respawn (true/false)
# ====================
# To be added in later versions:
#   - Better instructions
#   - Show Game Over screen with option to continue, load or main menu (true/false)
#   - Able to lose items in backpack (true/false)
#   - Likelihood you will lose item from backpack (in %)
#   - Able to lose equipped items (true/false)
#   - Likelihood you will lose item equipped (in %)
# ====================
# Instructions:
#   Place the script above Main and below any other custom scripts.
#   Edit the Configuration to your likings.
#   Play the game and die
# ====================
# Notes:
#   - Do not edit anything else than the configuration.
#   - If you find any bugs, please report them here:
#     http://forum.chaos-project.com
#==============================================================================
module Jackolas_GameOver
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration below
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  Fixed_Spawn = true      # true / false
  VarID = 106             # Var number for map id / fixed map ID location
  VarX = 10               # var number for map x / fixed map x location
  VarY = 14               # var number for map y / fixed map y location
#  Show_gameover = false  # true / false (not build in yet)
  LoseGold = false        # true / false
  GoldAmount = 0          # Above 1 = fixed amount / Below 1 = % of total
  LoseExp = false         # true / false
  LoseLvl = true          # true / false
  ExpAmount = 0           # Above 1 = fixed amount / Below 1 = % amount
  Autoheal = false        # true / false
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration above
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end

class Game_Actor
  attr_accessor :exp_list
end

class Scene_Gameover
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
    def main
    # Set game over flag
    $game_temp.gameover = false
    # Return to BGM before battle starts
    $game_system.bgm_play($game_temp.map_bgm)
    # Clear in battle flag
    $game_temp.in_battle = false
    # Clear entire party actions flag
    $game_party.clear_actions
    # Clear enemies
    $game_troop.enemies.clear
    # Call battle callback
    if $game_temp.battle_proc != nil
      $game_temp.battle_proc.call(2)
      $game_temp.battle_proc = nil
    end
    # Execute transition
    Graphics.transition(120)
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Start special options
      auto_heal
      remove_gold
      remove_exp
      remove_item
      # start transport
      start_transport
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Execute transition
    Graphics.transition(120)
    # Prepare for transition
    Graphics.freeze
    # If battle test
    if $BTEST
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Auto heal Processing
  #--------------------------------------------------------------------------
  def auto_heal
    for actor in $game_party.actors
      actor.remove_states_battle
    end
    if Jackolas_GameOver::Autoheal
      for actor in $game_party.actors
        actor.recover_all
      end
    else
      for actor in $game_party.actors
        actor.hp = 1
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Remove Gold Processing
  #--------------------------------------------------------------------------
  def remove_gold
    if Jackolas_GameOver::LoseGold
      if Jackolas_GameOver::GoldAmount >=1
        if Jackolas_GameOver::GoldAmount >= $game_party.gold
          goldlose = $game_party.gold
        else
          goldlose = Jackolas_GameOver::GoldAmount
        end
        else
        goldlose = $game_party.gold * Jackolas_GameOver::GoldAmount
      end
      $game_party.gain_gold(-goldlose.to_i)
    else
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Remove EXP Processing
  #--------------------------------------------------------------------------
  #This works, Do never touch any of these or the script WILL crash!!!
  #The reason for the many "if" is to make sure you won't get -exp
  def remove_exp
    if Jackolas_GameOver::LoseExp
      if Jackolas_GameOver::ExpAmount >= 1
        for actor in $game_party.actors
          if Jackolas_GameOver::LoseLvl
            if Jackolas_GameOver::ExpAmount >= actor.exp
              explose = Jackolas_GameOver::ExpAmount
            else
              explose = actor.exp
            end
          else
            if (actor.exp - actor.exp_list[actor.level]) >= Jackolas_GameOver::ExpAmount
              explose = Jackolas_GameOver::ExpAmount
            else
              explose = actor.exp - actor.exp_list[actor.level]
            end           
          end
          actor.exp -= explose
          actor.exp = actor.exp.to_i
        end
      else
        for actor in $game_party.actors
          if Jackolas_GameOver::LoseLvl
            explose = actor.exp * Jackolas_GameOver::ExpAmount
          else
            explose = (actor.exp - actor.exp_list[actor.level]) * Jackolas_GameOver::ExpAmount
          end
          actor.exp -= explose
          actor.exp = actor.exp.to_i
        end
      end
    else
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Remove item Processing
  #--------------------------------------------------------------------------
  def remove_item
    return
  end
  #--------------------------------------------------------------------------
  # * start_transport
  #--------------------------------------------------------------------------
  def start_transport
    # Set variables
    if Jackolas_GameOver::Fixed_Spawn
      @MapID = Jackolas_GameOver::VarID
      @MapX = Jackolas_GameOver::VarX
      @MapY = Jackolas_GameOver::VarY
    else
      @MapID = $game_variables[Jackolas_GameOver::VarID]
      @MapX = $game_variables[Jackolas_GameOver::VarX]
      @MapY = $game_variables[Jackolas_GameOver::VarY]
    end
    # Transport player
    $game_map.setup(@MapID)
    $game_player.moveto(@MapX, @MapY)
    # Refresh map
    $game_player.refresh
    $game_map.autoplay
    $game_map.update
    $scene = Scene_Map.new 
  end
end

Who's 캉쿤

?

배고파요ㅠㅜ

전 댓글을 먹고 살아요ㅠㅜ

댓글 하나만요ㅠㅜ

Comment '4'
  • ?
    jjmamjj70 2011.11.19 19:24

    감사합니다..... 왠지 있으면 좋을듯한 스크립트...

  • ?
    프로매리틱 2012.01.03 23:37

    그냥 이벤트로 하면 되지 안아요?

    조건분기로 체력:0 이면 체력마력다 회복하고 근처에서 부활

  • ?
    akaoni 2012.02.22 18:40

    ㅡㅡ 애러

  • ?
    김원빈 2014.10.10 18:57

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
701 상점 상점 메뉴 개조시킨 스크립트 9 file 백호 2009.02.21 2322
700 전투 사이트뷰 전투 스크립트 (CBS R1) 8 file 백호 2009.02.21 3498
699 전투 사이비 CTB 1 file 백호 2009.02.21 1701
698 전투 사이드뷰 전투(보행그래픽) 15 file 백호 2009.02.21 4244
697 전투 사이드뷰 배틀 (2003 형식으 전투)| 12 file 아방스 2007.11.09 4744
696 전투 사이드뷰 방식 스크립트. 8 file 백호 2009.02.21 4638
695 기타 빛의 퍼즐 -미니게임- 1 file 백호 2009.02.21 1360
694 메뉴 비밀소년님의 필드에서 경치 % 로 나오는거 윈도우 없이 8 백호 2009.02.22 1789
693 기타 비밀소년님의 경험치 표시 스크립트 백호 2009.02.22 1419
692 비공정 스크립트의 탑승속도 변경하기. 3 아방스 2008.01.14 1346
691 이동 및 탈것 비공정 스크립트 5 file 백호 2009.02.22 1506
690 기타 분류 별로 윈도우 스킨 다르게 사용하기 file 백호 2009.02.21 1015
» 기타 부활스크립트 4 캉쿤 2011.09.19 2061
688 그래픽 부드럽게 화면이 움직이는 스크립트 입니다. 16 GangSin 2012.09.12 4590
687 기타 복권 스크립트 6 백호 2009.02.21 1258
686 전투 보행그래픽으로 싸우는 턴알 17 백호 2009.02.22 3782
685 전투 버틀러 색조 변경 5 file 백호 2009.02.21 1552
684 이동 및 탈것 백호님이올린 발소리 스크립트를 소리만 바꾸어 밨음 4 lhh9606 2009.05.19 2676
683 전투 배틀포인트 + 배틀샵 1 file 백호 2009.02.21 1272
682 전투 배틀샵 스크립트 1 백호 2009.02.22 1126
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ... 52 Next
/ 52