XP 스크립트

#==============================================================================
# ■ Scene_Battle (분할 정의 4)
#------------------------------------------------------------------------------
#  배틀 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_Battle
  def main
    # 전투용의 각종 일시 데이터를 초기화
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # 배틀 이벤트용 interpreter를 초기화
    $game_system.battle_interpreter.setup(nil, 0)
    # 무리를 준비
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    # 엑터 커멘드 윈도우를 작성
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    @actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @actor_command_window.y = 160
    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # 그 외의 윈도우를 작성
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # 스프라이트 세트를 작성
    @spriteset = Spriteset_Battle.new
    # 웨이트 카운트를 초기화
    @wait_count = 0
    # 트란지션 실행
    Graphics.transition(20, "Graphics/Transitions/" +
      $data_system.battle_transition)
    # 프레바트르페즈 개시
    start_phase1
    # 메인 루프
    loop do
      # 게임 화면을 갱신
      Graphics.update
      # 입력 정보를 갱신
      Input.update
      # 프레임 갱신
      update
      # 화면이 바뀌면(자) 루프를 중단
      if $scene != self
        break
      end
    end
    # 맵을 리프레쉬
    $game_map.refresh
    # 트란지션 준비
    Graphics.freeze
    # 윈도우를 해방
    @actor_command_window.dispose
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    if @result_window != nil
      @result_window.dispose
    end
    if @levelup_window != nil
      @levelup_window.dispose
    end
    # 스프라이트 세트를 해방
    @spriteset.dispose
    # 타이틀 화면으로 전환하고 안의 경우
    if $scene.is_a? (Scene_Title)
      # 화면을 용암
      Graphics.transition
      Graphics.freeze
    end
    # 전투 테스트로부터 게임 오버 화면 이외에 변환중의 경우
    if $BTEST and not $scene.is_a? (Scene_Gameover)
      $scene = nil
    end
  end
  #--------------------------------------------------------------------------
  # ● 애프터 배틀 국면 개시
  #--------------------------------------------------------------------------
  def start_phase5
    # 국면 5 에 이행
    @phase = 5
    # 배틀 종료 ME 를 연주
    $game_system.me_play($game_system.battle_end_me)
    # 배틀 개시전의 BGM 에 되돌린다
    $game_system.bgm_play($game_temp.map_bgm)
    # EXP, 골드, 트레이닝 전기밥통을 초기화
    exp = 0
    gold = 0
    treasures = []
    # 루프
    for enemy in $game_troop.enemies
      # 에너미가 숨고 상태가 아닌 경우
      unless enemy.hidden
        # 획득 EXP, 골드를 추가
        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
    # 트레이닝 전기밥통의 수를 6 개까지 한정
    treasures = treasures[0..5]
    # EXP 획득
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp?  == false
        last_level = actor.level
        #THDO
        $last_str = actor.str
        $last_dex = actor.dex
        $last_agi = actor.agi
        $last_int = actor.int
        #THDO
        actor.exp += exp
        if actor.level > last_level
          @levelup_window = Window_LevelUp.new
          @levelup_window.y = 100
        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(exp, gold, treasures)
    # 웨이트 카운트를 설정
    @phase5_wait_count = 100
  end
end
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
#  배틀 화면에서 파티 멤버의 스테이터스를 표시하는 윈도우입니다.
#==============================================================================

class Window_LevelUp < Window_BattleStatus
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      actor_x = i * 160 + 4
        @strdiff = actor.str - $last_str
        @dexdiff = actor.dex - $last_dex
        @agidiff = actor.agi - $last_agi
        @intdiff = actor.int - $last_int
        self.contents.font.color = system_color
        self.contents.draw_text(actor_x, 0, 120, 32, "레벨 업! ")
        self.contents.font.color = normal_color
        self.contents.draw_text(actor_x, 25, 120, 32, $data_system.words.str + ": +"+ @strdiff.to_s + "을 한다")
        self.contents.draw_text(actor_x, 50, 120, 32, $data_system.words.dex + ": +"+ @dexdiff.to_s + "을 한다")
        self.contents.draw_text(actor_x, 75, 120, 32, $data_system.words.agi + ": +"+ @agidiff.to_s + "을 한다")
        self.contents.draw_text(actor_x, 100, 120, 32, $data_system.words.int + ": +"+ @intdiff.to_s + "을 한다")     
    end
  end
end
#스크립트에서 Main 위에 찔러넣으세요.


>만약↓창(꼭밑에것처럼안해주되여..음...딴말을넣어서해주시두되고딴능력티두되구여..)
>ㅣ---------------------------------------ㅣ
>ㅣ  레벨업!!                                            ㅣ
>ㅣ  힘:+1을한다                                      ㅣ
>ㅣ  스피드:+1을한다                                ㅣ
>ㅣ  지능:+1을한다                                    ㅣ
>ㅣ  포인트:x                                          ㅣ
>ㅣ---------------------------------------ㅣ
>
>
>↑위에것비슷하게해주세요..
>
>음맵이랑전투중이랑둘다같이하실수있으시면같이해주시구여
>
>같이못하시면 맵에서레벨업 했을때와
>
>전투중레벨업했을때따로올려주심....꼭점여...

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
441 저장 [KGC]_2PaneSave 스크립트 1 file 백호 2009.02.22 1655
440 전투 KGC_RateDamage(비율 데미지) 3 file 백호 2009.02.22 1653
439 전투 Active Time Battle 2.62 by パラ犬 file Alkaid 2010.09.06 1652
438 전투 전투시 아이콘 윈도우 2 file 백호 2009.02.21 1650
437 타이틀/게임오버 맵화면을 타이틀에 표시 백호 2009.02.21 1648
436 전투 Minkoff's Animated Battlers - Enhanced 13.3 by DerVVulfman file Alkaid 2010.10.14 1646
435 전투 DerVVulfman's addons for Mr.Mo's ABS file Alkaid 2010.09.10 1645
434 스킬 스킬 업데이트 시스템 4 file 백호 2009.02.22 1644
433 변수/스위치 메뉴변수표시 스크립트 1 file 백호 2009.02.22 1644
432 그래픽 Pictures below Characters by PK8 (XP/VXA) Alkaid 2012.09.07 1640
431 전투 Mr. Mo's ABS Ultimate 1.2 by DerVVulfman Alkaid 2011.11.13 1640
430 저장 ASM - Advanced Save Menu 3 file 백호 2009.02.21 1639
429 기타 endroll 주석 번역 6 file insertend 2010.05.15 1638
428 스킬 Conditional+Conbo Skills 2.0 by trickster 2 file 백호 2009.02.22 1637
427 스킬 선택 스킬 스크립트 4 file 백호 2009.02.21 1631
426 전투 KGC_SPdamage (SP데미지) 3 file 백호 2009.02.22 1628
425 이동 및 탈것 新(?)대쉬기능 스크립트.. 3 백호 2009.02.22 1626
424 파티 메뉴커맨드로 파티 멤버들 순서 바꾸기 by Yargovish 1 백호 2009.02.22 1622
423 기타 [자작]칼라 테이블입니다. 3 나뚜루 2009.01.24 1621
422 타이틀/게임오버 심심해서 구현해본 타이틀음악만으로 게임 플레이하기 2 백호 2009.02.22 1621
Board Pagination Prev 1 ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 ... 52 Next
/ 52