VX 스크립트

#======================================================================
========
# � [RMVX Script] +MAX Level Limitation System+ Version 1.1
#------------------------------------------------------------------------------
# by Woratana [woratana@hotmail.com]
# Release Date: 30/01/2008
#
# Features in Version 1.1
# - Use alias to make the script shorter. Thanks Modern Algebra for suggestion.
# Features in Version 1.0
# - Set Default Max Level for Actor that doesn't need Specific Max Level
# - Allow to Set Specific Max Level for Specific Character
#
# How to Set Max Level
# - For all the Actors that don't need specific max level,
# set their Max Level in DEFAULT_LV_MAX = ...
# For example, DEFAULT_LV_MAX = 20
# This will make all the characters that you didn't set their specific max level
# have their max level at 20.
#
# - For the Actors that need specific max level,
# set their Max Level by:
# CHAR[actor's id from database] = ...
# For example, CHAR[7] = 10
# This will make character no.7 in database has max level at 10.
#==============================================================================

module Wormaxlv
CHAR = Array.new
#------------------------------------
# SETUP MAX Level HERE
#------------------------------------
DEFAULT_LV_MAX = 99 # Set Default Max Level
CHAR[1] = 5 # This make Character No.1 has max level at 5
end

class Scene_Battle < Scene_Base

def display_level_up
exp = $game_troop.exp_total
for actor in $game_party.existing_members
last_level = actor.level
last_skills = actor.skills
actor.gain_exp(exp, true)
end
wait_for_message
end

end

class Game_Actor < Game_Battler
attr_accessor :max_lv

alias wor_actor_setup setup
def setup(actor_id)
wor_actor_setup(actor_id)
if Wormaxlv::CHAR[actor_id] == nil
@max_lv = Wormaxlv::DEFAULT_LV_MAX
else
@max_lv = Wormaxlv::CHAR[actor_id]
end
end

def change_exp(exp, show)
last_level = @level
last_skills = skills
@exp = [[exp, 9999999].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0 and @level <= (@max_lv - 1)
level_up
end
while @exp < @exp_list[@level]
level_down
end
@hp = [@hp, maxhp].min
@mp = [@mp, maxmp].min
if show and @level > last_level
display_level_up(skills - last_skills)
end
Comment '3'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
37 전투 Fomars indiviivdual battle 2 Man... 2008.10.28 1339
36 기타 reijubv - New Balloon Command (VXA에서도 작동) 1 file 혜인 2013.04.08 1332
35 ??? 2 Man... 2008.10.27 1329
34 변수/스위치 MapSwitch VX Version: 1.1 1 Man... 2008.10.27 1327
33 ??무슨 스크립트?? 3 Man... 2008.10.27 1323
32 기타 VX Weather Script by ccoa 1 Alkaid 2010.09.08 1317
31 컴퓨스트 플레이어 워크(?) 2 Man... 2008.10.27 1304
30 Attribute System Man... 2008.10.28 1293
29 맵/타일 SwapXT by bulletxt 습작 2013.05.13 1292
28 버그픽스 애니메이션 표시 위치 수정 (Fix Animation Position) 2 file AltusZeon 2014.02.12 1288
27 Khai's Window Helper 1.4 1 Man... 2008.10.28 1272
26 키입력 해외 제작자 He Who Jets님의 마우스 스크립트(mouse system) 1 file 보자기군 2014.09.30 1261
25 Detailed Call Script Error Mesage 3 Man... 2008.10.28 1258
24 디러그 시스템?? 1 Man... 2008.10.28 1247
23 전투 Verus Tempus Proelium by Vlad 습작 2013.05.13 1242
22 Jens009's Critical Flash 1.0 3 Man... 2008.10.27 1240
21 장비 방어구 착용시 최대HP, MP증가 스크립트(턴알) 3 file 기관차 2014.11.06 1222
20 Simple Fon Chage 3 Man... 2008.10.28 1212
» MAX Level Limitation System 3 Man... 2008.10.28 1198
18 키입력 Key Simulator by Fantasist 습작 2013.05.01 1176
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32