XP 스크립트

#==============================================================================
# ■ Game_Actor
#------------------------------------------------------------------------------
#  엑터를 취급하는 클래스입니다. 이 클래스는 Game_Actors 클래스 ($game_actors)
# 의 내부에서 사용되어 Game_Party 클래스 ($game_party)로부터도 참조됩니다.
#==============================================================================

#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  게임중의 모든 윈도우의 슈퍼 클래스입니다.
#==============================================================================

class Window_Base < Window 
#--------------------------------------------------------------------------
  # ● 게이지바의 묘화
  #     x    : 묘화처 X 좌표
  #     y    : 묘화처 Y 좌표
  #-------------------------------------------------------------------------- 
  def 게이지바그리기(현재포인트, 최고포인트, x, y, width, height = 5) #별도의 게이지바그림파일을 사용할 경우 교체
    @풀게이지바색 = Color.new(100, 100, 100, 255) #빨간색으로 설정되어 있습니다. 게이지바가 꽉찼을 경우 보이지 않습니다.
    @현재게이지바색 = Color.new(255, 255, 255, 255) #진한초록으로 설정되어 있습니다.
    self.contents.fill_rect(x, y, width, height, @풀게이지바색)
    self.contents.fill_rect(x, y, (width * 현재포인트) / 최고포인트, height, @현재게이지바색)
  end
end 
class Game_Actor < Game_Battler
  attr_reader   :exp_list
end
#==============================================================================
# ■ Window_Map_Name
#------------------------------------------------------------------------------
#  マップ名を表示するウィンドウです。
#==============================================================================
class Window_Map게이지 < Window_Base
  attr_accessor :actor
  #--------------------------------------------------------------------------
  # ● オブジェクト初期
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 0, 204, 224)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    @showing_time = 0
  end
#게이지 표시 화면
  def 게이지
    self.contents.clear
    게이지바그리기(@actor.hp, @actor.maxhp, 0, 64, 172)
    게이지바그리기(@actor.sp, @actor.maxsp, 0, 96, 172)   
    #@actor.exp - @actor.exp_list[@actor.level] 현재렙 경험치 초기치에서 현재 경험치를 뺀값.
    #즉, 게이지에서 표시되는 값이다.
    #다음 렙의 경험치를 구한다.
    #@actor.next_rest_exp_s.to_i+@actor.exp
    #다음 렙의 경험치에서 현재렙 경험치 초기치를 뺀다.
     #@actor.next_rest_exp_s.to_i+@actor.exp- @actor.exp_list[@actor.level]
    게이지바그리기(@actor.exp - @actor.exp_list[@actor.level], @actor.next_rest_exp_s.to_i+@actor.exp - @actor.exp_list[@actor.level], 0, 128, 172)
    draw_actor_class(@actor, 32, 32)
    draw_actor_level(@actor, 96, 32)
    draw_actor_name(@actor, 4, 0)
    draw_actor_hp(@actor, 0, 64, 172)
    draw_actor_sp(@actor, 0, 96, 172)
    draw_actor_exp(@actor, 0, 128)
  end
end

#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # ● メイン?理
  #--------------------------------------------------------------------------
alias thdo_main main
  alias thdo_initialize initialize
  def initialize
    @actor_index = 0
    thdo_initialize
  end
  def main
    # 地名ウィンドウを作成
    @actor = $game_party.actors[@actor_index]
    @map게이지window = Window_Map게이지.new(@actor)
    @map게이지window.opacity = 0
    # ?す
    thdo_main
    # 地名ウィンドウを解放
    @map게이지window.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 루프
    loop do
      # 맵, interpreter, 플레이어의 순서에 갱신
      # (이 갱신 순서는, 이벤트를 실행하는 조건이 채워지고 있을 때
      #  플레이어에 일순간 이동할 기회를 주지 않는등의 이유로써 중요)
      $game_map.update
      $game_system.map_interpreter.update
      $game_player.update
      # 시스템 (타이머), 화면을 갱신
      $game_system.update
      $game_screen.update
      # 플레이어의 장소 이동중이 아니면 루프를 중단
      unless $game_temp.player_transferring
        break
      end
      # 장소 이동을 실행
      transfer_player
      # 트란지션 처리중의 경우, 루프를 중단
      if $game_temp.transition_processing
        break
      end
    end
    # 스프라이트 세트를 갱신
    @spriteset.update
    # 메세지 윈도우를 갱신
    @message_window.update
    # 게임 오버의 경우
    if $game_temp.gameover
      # 게임 오버 화면으로 전환하고
      $scene = Scene_Gameover.new
      return
    end
    # 타이틀 화면에 되돌리는 경우
    if $game_temp.to_title
      # 타이틀 화면으로 전환하고
      $scene = Scene_Title.new
      return
    end
    # 트란지션 처리중의 경우
    if $game_temp.transition_processing
      # 트란지션 처리중 플래그를 클리어
      $game_temp.transition_processing = false
      # 트란지션 실행
      if $game_temp.transition_name == ""
        Graphics.transition(20)
      else
        Graphics.transition(40, "Graphics/Transitions/" +
          $game_temp.transition_name)
      end
    end
    # 메세지 윈도우 표시중의 경우
    if $game_temp.message_window_showing
      return
    end
    # 엔카운트카운트가 0 으로, 엔카운트리스트가 하늘이 아닌 경우
    if $game_player.encounter_count == 0 and $game_map.encounter_list != []
      # 이벤트 실행중이나 엔카운트 금지중이 아니면
      unless $game_system.map_interpreter.running?  or
             $game_system.encounter_disabled
        # 배틀 호출 플래그를 세트
        $game_temp.battle_calling = true
        $game_temp.battle_can_escape = true
        $game_temp.battle_can_lose = false
        $game_temp.battle_proc = nil
        # 무리를 결정
        n = rand($game_map.encounter_list.size)
        $game_temp.battle_troop_id = $game_map.encounter_list[n]
      end
    end
       
    #다음 엑터에게
    if Input.trigger? (Input::R)
            unless $game_system.map_interpreter.running?  or
             $game_system.menu_disabled
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      @map게이지window.actor = $game_party.actors[@actor_index]
      @map게이지window.게이지
      end
    end
    #전의 엑터에게
    if Input.trigger? (Input::L)
            unless $game_system.map_interpreter.running?  or
             $game_system.menu_disabled
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      @map게이지window.actor = $game_party.actors[@actor_index]
      @map게이지window.게이지
      end
    end
#THDO스크립트 종료
    # B 버튼이 밀렸을 경우
    if Input.trigger? (Input::B)
      # 이벤트 실행중이나 메뉴 금지중이 아니면
      unless $game_system.map_interpreter.running?  or
             $game_system.menu_disabled
        # 메뉴 호출 플래그와 SE 연주 플래그를 세트
        $game_temp.menu_calling = true
        $game_temp.menu_beep = true
      end
    end
    # 디버그 모드가 ON 또한 F9 키가 밀리고 있는 경우
    if $DEBUG and Input.press? (Input::F9)
      # 디버그 호출 플래그를 세트
      $game_temp.debug_calling = true
    end
    # 플레이어의 이동중이 아닌 경우
    unless $game_player.moving?
      @map게이지window.게이지#THDO스크립트
      # 각종 화면의 호출을 실행
      if $game_temp.battle_calling
        call_battle
      elsif $game_temp.shop_calling
        call_shop
      elsif $game_temp.name_calling
        call_name
      elsif $game_temp.menu_calling
        call_menu
      elsif $game_temp.save_calling
        call_save
      elsif $game_temp.debug_calling
        call_debug
      end
    end
  end
end


















참고: 이걸 쓰면 맵이름 표시가 안됩니다 젼 맵이름 포기하고 게이지바 사용합니다 ㅎㅎ

Who's 아방스

profile
Atachment
첨부 '1'
Comment '12'
  • ?
    마징가fish 2007.11.27 22:05
    안되요 ㅠㅠ
  • ?
    무한푸우 2008.02.20 15:43
    이걸 사용하는것보단 맵이름이 더 좋은것 같아요.

    이거 보니까 캐릭터가 바뀌면

    정보창에 한번 들어갔다 와줘야 새로운걸로 바뀌더군요.
  • ?
    Iceboy 2008.10.08 21:04
    멋은 없지만(;;)제가 찾던 거였습니다.감사합니다.
    근데 이거 맵이름이랑 같이쓰면 저희집은 둘다 되요..
  • ?
    Iceboy 2008.10.15 20:43
    참고로 어떤컴은 둘다 되고 어떤컴은 게이지바 하나만 표시됩니다 ;;
  • ?
    흑티라노 2008.12.30 10:16
    감사합니다
  • ?
    섭현김 2009.01.30 11:58
    저는 맵이름 표시가 안되네염ㅠㅠ
  • ?
    독도2005 2009.08.15 14:01
    ABP 스크립트랑 충돌하네요.. 게이지바를 사용할때는 A키가 안먹습니다.
  • ?
    누군가 2010.05.11 20:47

    둘다 된다!!!!

  • ?
    레인밀크 2010.05.14 22:37

  • ?
    亞진리亞 2010.06.01 13:56

    채팅입력세트하고 같이하니깐 안맞네염;;

  • ?
    나이러스 2010.07.11 02:40

    감샤요

     

  • ?
    윌스 2011.04.30 23:27

    감사합니다~


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
1021 키입력 한글입력스크립트 16 file 아방스 2007.11.09 11823
1020 온라인 채팅 가능 온라인 스크립트 배포 107 file 아방스 2009.01.03 10680
1019 온라인 RPG 만들기 xp 온라인 스크립트 33 아방스 2007.11.09 9592
1018 맵/타일 [유니크급] RPG XP 게임을 3D화로 보자! Neo Mode7 script / 52 file 쉴더 2009.02.28 9442
1017 온라인 온라인 스크립트 Unis Net RMXP 공식 배포! 25 file 뮤바보 2011.12.25 9400
1016 온라인 광넷[ 광땡 온라인 + 넷플레이 ] 62 - 하늘 - 2009.08.02 9003
1015 전투 [액알]neo_a-rpg_module_1[1][1].2 스크립트 83 file 은빛바람 2009.10.03 8298
1014 이름입력 대화창에 얼굴, 이름 띄우기 37 킬라롯 2008.11.09 7496
1013 온라인 넷플레이1.7.0+abs5.5+한챗 49 쀍뛝쒧 2009.01.24 7286
1012 메뉴 메이플스토리처럼 메뉴를^^ 57 file 딸기님 2010.07.13 7141
1011 메시지 대화창에 얼굴 그래픽 띠우기 73 아방스 2007.11.09 7119
1010 스킬 ABP액알 v1.2 스킬추가, 버그수정판 36 file 백호 2009.02.22 6919
1009 전투 [신기술 체험] 강회된 횡스크롤 액알 13 file 백호 2009.02.22 6841
1008 메뉴 온라인메뉴처럼!! 메이플 메뉴처럼!! 변신~스크립트 33 WMN 2008.03.17 6816
1007 그래픽 화면을 부드럽게 해주는스크립트[ 아주 유용] 56 file - 하늘 - 2009.08.05 6561
1006 온라인 Mr.Metring NPE 1.0 [RPG XP 온라인 스크립트] 35 아방스 2009.01.07 6535
1005 이름입력 케릭터 위에 또는 NPC 위에 이름 뛰우기 [헬악이님 제공] 49 file 아방스 2007.11.09 6407
1004 액터 시트르산의 XP용 감정 말풍선 표시 스크립트 37 file 시트르산 2011.01.25 6110
1003 HUD 주인공,NPC이름 머리 나타내기 49 file 송긔 2010.11.28 6060
1002 전투 액알 스크립트 24 백호 2009.02.22 6013
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