VX 스크립트

던전에 적정 레벨이 뭔지 표시해주는(화면상에)스크립트입니다.

그러니까 화면상에... 스위치 71(디폴트 온오프 스위치) 를 on시키면 표시를 하지 않고, off시키면 표시를 해주는 스크립트입니다.

직접 만든 HUD도 첨부했으니 꼭 "Lvname.PNG"로 시스템(Graphics/System)에 넣어주시길.

변수(조정 변수-default27)을 꼭 장소 이동 전(예를 들면 문에라던가...)를 조정해주시면, 그 변수의 값 대로 LV를 표시해 줍니다.

꼭 유용한데 쓰시길 바라겠습니다.

아래부터 복사..

#--------------------------------------------------------------
# [VX] Level Range Indicator
#--------------------------------------------------------------
# by Kilin (kilin08@hotmail.com)
# Shaltix Games
# Version: 1.0
# Notes: This was written to work next to Mog's Map Location
# HUD script. This script can be used with or without it, but
# the basic layout is pretty much the same, with altered
# variable names.
#--------------------------------------------------------------
# The idea of this script is to display a recommended level
# value upon entering a map. The range is determined by one
# variable which can be changed through a call script. The
# script is useful for letting players know when they're in
# an area that they won't be able to survive in.
# You will need to declare the variable BEFORE you enter the
# map in order for it to work. A good place to change it is in
# the Transfer Player event.
#--------------------------------------------------------------
# REQUIREMENTS BEFORE USE:
# Set aside a switch and a variable for this script. The default
# number for both the switch and variable are 11. Let's say you
# already have a switch or variable in slot 11. Simply change the
# value in SWITCH_LEVELRANGE_OFF or LVVAR to match the slots you're
# using. Then when your player is changing rooms, change the
# level variable to whatever you wish and it will show in the
# next room.
#--------------------------------------------------------------
module LevelRange
#==============================================================
# SCRIPT SETUP - Declares customizable variables (You can change
# any of these values and the script will still run.
#==============================================================
SWITCH_LEVELRANGE_OFF = 71 # Turn this switch (default slot 71) on to stop showing the level range
LVVAR = 27 # This is the editable variable (default slot 27) that you'll change through variable actions
# - it signifies the level indication
LVFONT = "Georgia" # Text font
LVFADE = true # Fading on or off - This lets you keep it on the screen at all times if set to false
LVFADETIME = 10 # Fading time - This has no effect if LVFADE is set to false
LVWPOS = 2 # Window Position. 0 - Top Left, 1 - Bottom Left, 2 - Top Right, 3 - Bottom Right
end
#==============================================================
# Game_System - Declares secondary variables.
#==============================================================
class Game_System
attr_accessor :fadetm
attr_accessor :lvrn_x
attr_accessor :lvrn_y
alias lvrn_ini initialize
def initialize
lvrn_ini
@fadetm = 255 + 40 * LevelRange::LVFADETIME
if LevelRange::LVWPOS == 0
@lvrn_x = -300
@lvrn_y = 48
elsif LevelRange::LVWPOS == 1
@lvrn_x = -300
@lvrn_y = 272
elsif LevelRange::LVWPOS == 2
@lvrn_x = 640
@lvrn_y = 48
else
@lvrn_x = 640
@lvrn_y = 272
end 
end
def lvrn_x
return @lvrn_x
end
def lvrn_y
return @lvrn_y
end
def fadetm
if @fadetm <= 0
@fadetm = 0
end
return @fadetm
end
end
#==============================================================
# Window_Base - Controls text and icon drawing.
#==============================================================
class Window_Base < Window
def nd_lvpic
lvic = Cache.system("")    
end
def draw_lvname(x,y)
lvic = Cache.system("Lvname") rescue nd_lvic
cw = lvic.width 
ch = lvic.height
sr_rec = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, lvic, sr_rec)
self.contents.font.name = LevelRange::LVFONT
self.contents.font.size = 16
self.contents.font.bold = true
self.contents.font.shadow = true
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 12, y + 32, 160, 32, "Level " + $game_variables[LevelRange::LVVAR].to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x - 11, y + 31, 160, 32, "Level " + $game_variables[LevelRange::LVVAR].to_s,1)
end
end
#==============================================================
# Lvname - Declares a final class.
#==============================================================
class Lvname < Window_Base
def initialize(x , y)
super($game_system.lvrn_x, $game_system.lvrn_y, 250, WLH + 70)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_lvname(10,0)   
end
end
#~ #==============================================================
# Scene_Map - Does all the drawing.
#==============================================================
class Scene_Map
alias lvrn_start start
def start
@lvrn = Lvname.new($game_system.lvrn_x, $game_system.lvrn_y)
@lvrn.contents_opacity = $game_system.fadetm
if $game_switches[LevelRange::SWITCH_LEVELRANGE_OFF] == false
@lvrn.visible = true
else
@lvrn.visible = false 
end 
lvrn_start
end 
alias lvrn_term terminate
def terminate
lvrn_term
@lvrn.dispose
end
alias lvrn_upd update
def update
lvrn_upd 
$game_system.lvrn_x = @lvrn.x
$game_system.lvrn_y = @lvrn.y
if $game_switches[LevelRange::SWITCH_LEVELRANGE_OFF] == true or $game_system.fadetm <= 0
@lvrn.visible = false
else
@lvrn.visible = true
end
if LevelRange::LVWPOS == 0 or LevelRange::LVWPOS == 1
if @lvrn.x < -50
@lvrn.x += 5
elsif @lvrn.x >= -50
@lvrn.x = -50
end  
else
if @lvrn.x > 400
@lvrn.x -= 5
elsif @lvrn.x <= 400
@lvrn.x = 400
end    
end
@lvrn.contents_opacity = $game_system.fadetm
if LevelRange::LVFADE == true
$game_system.fadetm -= 3
end
end
alias lvrn_upd_trans_player update_transfer_player
def update_transfer_player
return unless $game_player.transfer?
@lvrn.contents_opacity = 0
lvrn_upd_trans_player
if LevelRange::LVWPOS == 0
$game_system.lvrn_x = -340
$game_system.lvrn_y = 48
elsif LevelRange::LVWPOS == 1
$game_system.lvrn_x = -340
$game_system.lvrn_y = 320
elsif LevelRange::LVWPOS == 2
$game_system.lvrn_x = 640
$game_system.lvrn_y = 48
else
$game_system.lvrn_x = 640
$game_system.lvrn_y = 320
end 
@lvrn.y = $game_system.lvrn_y
@lvrn.x = $game_system.lvrn_x
$game_system.fadetm = 255 + 60 * LevelRange::LVFADETIME
@lvrn.refresh
end
end

이상 루시페르였습니다!

Comment '5'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
637 스킬 훔치기 스킬을 만드는 스크립트! 5 우켈킁 2011.03.31 2390
636 기타 회피,명중,크리 스테이트를 작성하는 스크립트 9 카르와푸딩의아틀리에 2009.06.30 2393
635 기타 확장 에러 메시지 13 file 허걱 2009.08.17 2497
634 메뉴 확장 스테이터스 화면 - KGC 23 file 카르와푸딩의아틀리에 2009.08.19 5057
633 기타 화폐단위 구분해 주는 스크립트 38 file 허걱 2010.04.13 3652
632 이동 및 탈것 화면의 부드러운 스크롤 스크립트 32 카르와푸딩의아틀리에 2009.07.17 3817
631 기타 화면에 그림 그리는 스크립트 21 file 강진수 2010.02.27 2961
630 기타 화면 확대 스크립트 12 file 에돌이 2011.07.22 3059
629 기타 화면 해상도(640 X 480) 스크립트 6 file 쿠쿠밥솥 2012.01.10 3972
628 아이템 현재있는 파티원 선택 레벨업 아이템 만들기 1 file 싸패 2016.06.06 713
627 헬프윈도우 확장 13 file RPGbooster 2008.10.08 2872
626 메뉴 헬프 윈도우 중앙표시 스크립트 11 file 양념통닼 2008.06.10 3348
625 키입력 해외 제작자 He Who Jets님의 마우스 스크립트(mouse system) 1 file 보자기군 2014.09.30 1260
624 기타 해상도 변경 스크립트 11 카리스 2011.07.19 2723
623 스킬 합성샾 스크립트 ^^ [동영상 포함] 6 file 아방스 2008.09.23 6038
622 키입력 한글입력기(펌) 수정 10 전설의달빛조각사 2011.04.03 2674
621 이름입력 한글로 이름 입력하는 스크립트입니다. 55 file 헤르코스 2009.03.18 6662
620 이름입력 한글 이름 입력 스크립트입니다.^^ 14 레시온 2008.03.18 4382
619 액터 한계돌파(렙9999) 18 작은샛별 2010.03.07 3273
618 이동 및 탈것 피티원이 따라다니는 스크립트 38 file 아방스 2009.02.05 5024
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32