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 전투 VLAD ABS [액알 시스템] 65 아방스 2009.01.07 12563
636 전투 vampyr SBABS-Requiem ABS 9(액알) 101 file 담먹캐 2009.11.01 11999
635 HUD rpg 만들기 vx - 맵이름 띠우는 스크립트 ^^ 74 아방스 2008.01.27 11919
634 HUD PRABS v1.0 [hud,주석액알,원거리공격,hotkeys,vx] 대박감이다. 47 유칸지 2008.08.13 11114
633 전투 사이드뷰배틀3.3 + ATB1.1 스크립트. 65 할렘 2009.02.01 10945
632 전투 ORBS [새로운 전투 방식] 48 file 아방스 2009.03.04 10207
631 그래픽 3D그래픽 파티클엔진 45 file RPGbooster 2008.10.08 10130
630 전투 rpgvx 간단액알 스크립트 제작: 41 *PS 2008.02.07 9820
629 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
628 전투 RPG Tankentai SBS 3.3 + ATB Kaduki Eng 58 아방스 2009.02.05 9071
627 전투 ATB전투방식.(사이드뷰X 백발의카임전투방식O) 14 file 이피쿤 2009.06.24 9035
626 메뉴 일본에서 만든 멋있는메뉴변경 스크립트 (한글 VX에서 쓰시면 자동으로 바뀜) 45 유칸지 2008.04.09 8861
625 전투 WGB배틀 시스템. 59 file 카르와푸딩의아틀리에 2009.06.30 8776
624 전투 Crissaegrim ABS 2.0.5 최신 48 file RPGbooster 2008.10.08 8764
623 전투 Requiem ABS 8 - 액션 배틀 시스템 8 36 아방스 2009.06.24 8539
622 전투 RPGTankentai SBS3.3b 버전 (사이드뷰) 21 file 카르와푸딩의아틀리에 2009.07.01 8455
621 전투 사이드뷰 스크립트 [2003 전투 방식] 39 아방스 2008.03.09 8406
620 맵/타일 RPG 만들기 VX 로 구현한 3D~ 42 아방스 2008.09.02 8405
619 메뉴 메뉴변경 스크립트 34 아방스 2008.01.24 7937
618 전투 PRABS 2.0 액션배틀시스템 58 file RPGbooster 2008.10.08 7570
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