=begin ============================================================================== ● 스크립트 정보 스크립트 이름 : HelloCoa2Ver4.0 스크립트 배포 파일명 : HelloCoa2Ver4.0.txt 스크립트 제작자 : 코아 코스튬(아방스 닉네임) 참조 및 혼용 스크립트 - 하늘 - 님이 아방스에 올려주신 게이지바 스크립트 중 게이지바 부분 ┗주소 : http://avangs.info/zbxe/589514 ┗한글변수를 영어변수로 변경 - 하늘 - 님이 아방스에 올려주신 미니맵 스크립트 중 윈도우 이동 부분 원래는 피놀 님께서 만드신 스크립트 ┗주소 : http://avangs.info/zbxe/593126 ------------------------------------------------------------------------------ ● 업데이트 정보 ------------------------------------------------------------------------------ 초단위로 업데이트 되던것을 1프레임당으로 변경.. 주의사항 : 렉 먹을수도 있습니다. 2. "윈도우 이동 부분을 잘못 설정 하셨습니다." 부분의 무한반복 수정 ------------------------------------------------------------------------------ ● 사용자 설정 ------------------------------------------------------------------------------ 1. 윈도우 창에 액터가 닿았을때 이동 방식 1 = 대기-대기, 2 = 대기-이동, 3 = 이동 없음 대기-대기 = 이동한 뒤 이동한 읜도우 창의 안에 들어가야 초기위치로가짐 대기-이동 = 이동한 뒤 초기위치에서 벗어나면 원래대로 돌아옴 이동 없음 = 이동하지 않음 =end $tat = 2 #============================================================================= class Game_Map def name load_data("Data/MapInfos.rxdata")[@map_id].name end end class Window_Base < Window def makehp(now, full, x, y, width, ops, height = 15) @hpbackgauge = Color.new(80, 80, 80, ops) @hpgauge = Color.new(255, 0, 0, ops) self.contents.fill_rect(x, y, width, height, @hpbackgauge) self.contents.fill_rect(x, y, (width * now) / full, height, @hpgauge) end def makemp(now, full, x, y, width, ops, height = 15) @mpbackgauge = Color.new(80, 80, 80, ops) @mpgauge = Color.new(0, 0, 255, ops) self.contents.fill_rect(x, y, width, height, @mpbackgauge) self.contents.fill_rect(x, y, (width * now) / full, height, @mpgauge) end def makeexp(now, full, x, y, width, ops, height = 15) @expbackgauge = Color.new(80, 80, 80, ops) @expgauge = Color.new(0, 255, 0, ops) self.contents.fill_rect(x, y, width, height, @expbackgauge) self.contents.fill_rect(x, y, (width * now) / full, height, @expgauge) end end class Game_Actor < Game_Battler attr_reader :exp_list end class Window_Mapgauge < Window_Base attr_accessor :actor def initialize(actor) super(160, 319, 500, 224) self.contents = Bitmap.new(width - 32, height - 32) self.back_opacity = 0 @actor = actor @showing_time = 0 $op = 127.5 end def gauge self.contents.clear makehp(@actor.hp, @actor.maxhp, 0, 60, 250, $op) makemp(@actor.sp, @actor.maxsp, 0, 77, 250, $op) makeexp(@actor.exp - @actor.exp_list[@actor.level], @actor.next_rest_exp_s.to_i+@actor.exp - @actor.exp_list[@actor.level], 0, 94, 250, $op) end end 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] @mapgaugewindow = Window_Mapgauge.new(@actor) @mapgaugewindow.opacity = 0 thdo_main @mapgaugewindow.dispose end def update loop do $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 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 @mapgaugewindow.actor = $game_party.actors[@actor_index] @mapgaugewindow.gauge 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 @mapgaugewindow.actor = $game_party.actors[@actor_index] @mapgaugewindow.gauge end end if Input.trigger? (Input::B) unless $game_system.map_interpreter.running? or $game_system.menu_disabled $game_temp.menu_calling = true $game_temp.menu_beep = true $op = 0 end end if $DEBUG and Input.press? (Input::F9) $game_temp.debug_calling = true end unless $game_player.moving? @mapgaugewindow.gauge if $game_temp.battle_calling call_battle $op = 0 elsif $game_temp.shop_calling call_shop $op = 0 elsif $game_temp.name_calling call_name $op = 0 elsif $game_temp.menu_calling call_menu $op = 0 elsif $game_temp.save_calling call_save $op = 0 elsif $game_temp.debug_calling call_debug $op = 0 end end end end class Game_Actor < Game_Battler def exp_rate if @exp_list[@level+1] - @exp_list[@level] > 0 return (@exp - @exp_list[@level]).to_f / (@exp_list[@level+1] - @exp_list[@level]).to_f else return 0 end end end class Window_Gauge < Window_Base def initialize super(0, 380, 640, 100) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font = Font.new("나눔고딕", 16) self.opacity = 180 self.back_opacity = 180 end def refresh self.contents.clear time = Time.now text21 = sprintf("현재시간 :") text22 = time.strftime("%X") self.contents.font.color = system_color self.contents.draw_text(0, -9, 300, 30, @show_text6) self.contents.draw_text(120, -9, 500, 30, @show_text) self.contents.draw_text(430, -9, 500, 30, @show_text4) self.contents.draw_text(150, -9, 300, 30, @show_text16) self.contents.draw_text(0, 8, 300, 30, @show_text7) self.contents.draw_text(120, 8, 500, 30, @show_text2) self.contents.draw_text(500, 8, 100, 30, @show_text8 ,2) self.contents.draw_text(150, 8, 300, 30, @show_text16) self.contents.draw_text(0, 25, 300, 30, @show_text5) self.contents.draw_text(120, 25, 500, 30, @show_text3) self.contents.draw_text(430, 25, 100, 30, @show_text14) self.contents.draw_text(150, 25, 300, 30, @show_text16) self.contents.draw_text(-1000, -1000, -1000, -1000, @show_text18) self.contents.draw_text(0, 42, 120, 32, @show_text19) self.contents.draw_text(430, 42, 120, 32, text21) self.contents.font.color = normal_color self.contents.draw_text(120, -9, 320, 30, @show_text9 ,1) self.contents.draw_text(120, 8, 320, 30, @show_text10 ,1) self.contents.draw_text(487, 8, 100, 30, @show_text13 ,2) self.contents.draw_text(120, 25, 320, 30, @show_text11 ,1) self.contents.draw_text(43, 25, 300, 30, @show_text12) self.contents.draw_text(460, 25, 115, 30, @show_text15) self.contents.draw_text(-1000, -1000, -1000, -1000, @show_text17) self.contents.draw_text(50, 42, 380, 32, @show_text20) self.contents.draw_text(495, 42, 120, 32, text22) end def actor $game_party.actors[0] # <- 파티 0번째 end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec text = sprintf("HP") text2 = sprintf("MP") text3 = sprintf("EXP") text4 = sprintf("소지금") text5 = sprintf("Level :", actor.level) text6 = sprintf("%s", $game_party.actors[0].class_name) text7 = sprintf("%s", actor.name) text8 = sprintf("%s", $data_system.words.gold) text9 = sprintf("%d / %d", actor.hp, actor.maxhp) text10 = sprintf("%d / %d", actor.sp, actor.maxsp) text11 = sprintf("%.3f%%", (actor.exp_rate*100).to_f) text12 = sprintf("%d", actor.level) text13 = sprintf("%d", $game_party.gold) text14 = sprintf("맵 :") text15 = sprintf("%s", $game_map.name.to_s) text16 = sprintf(":") @total_second = Graphics.frame_count / Graphics.frame_rate hour = @total_second / 60 / 60 min = @total_second / 60 % 60 sec = @total_second % 60 text17 = sprintf("%02d:%02d:%02d", hour, min, sec) text18 = sprintf("플레이 시간 :") text19 = sprintf("걸음수 :") text20 = sprintf("%i", $game_party.steps.to_i) if @show_text != text or @show_text2 != text2 or @show_text3 != text3 or @show_text4 != text4 or @show_text5 != text5 or @show_text6 != text6 or @show_text7 != text7 or @show_text8 != text8 or @show_text9 != text9 or @show_text10 != text10 or @show_text11 != text11 or @show_text12 != text12 or @show_text13 != text13 or @show_text14 != text14 or @show_text15 != text15 or @show_text16 != text16 or @show_text17 != text17 or @show_text18 != text18 or @show_text19 != text19 or @show_text20 != text20 @show_text = text @show_text2 = text2 @show_text3 = text3 @show_text4 = text4 @show_text5 = text5 @show_text6 = text6 @show_text7 = text7 @show_text8 = text8 @show_text9 = text9 @show_text10 = text10 @show_text11 = text11 @show_text12 = text12 @show_text13 = text13 @show_text14 = text14 @show_text15 = text15 @show_text16 = text16 @show_text17 = text17 @show_text18 = text18 @show_text19 = text19 @show_text20 = text20 refresh end end end end class Scene_Map alias update_before_map update def update update_before_map @window_gauge = Window_Gauge.new unless @window_gauge @window_gauge.update if $scene.is_a?(Scene_Map) hellocoa2 end unless $scene.is_a?(Scene_Map) @window_gauge.dispose $op = 0 @window_gauge = nil end end def hellocoa2 tat = $tat unless(tat == 1 or tat == 2 or tat == 3) print "윈도우 이동 부분을 잘못 설정 하셨습니다." print "1, 2, 3 으로 설정 가능합니다." exit end if tat == 2 h = $game_player.screen_y if h >= 380 # 이동 후의 좌표에 이동 @window_gauge.y = 0 @mapgaugewindow.y = -61 # 초기 위치가 아닌 경우 else # 초기 위치에 이동 @window_gauge.y = 380 @mapgaugewindow.y = 319 end end if tat == 1 h = @window_gauge.y..@window_gauge.y + @window_gauge.height # 플레이어가 윈도우의 범위내에 들어갔을 경우 if h === $game_player.screen_y # 이동 장소 판정 # 초기 위치라면 if @window_gauge.y == 380 # 이동 후의 좌표에 이동 @window_gauge.y = 0 @mapgaugewindow.y -= 380 # 초기 위치가 아닌 경우 else # 초기 위치에 이동 @window_gauge.y = 380 @mapgaugewindow.y += 380 end end end end end