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 5410
37 전투 ATB전투방식.(사이드뷰X 백발의카임전투방식O) 14 file 이피쿤 2009.06.24 9037
36 ATB v1.0 배틀 시스템 + RPG Tankentai SBS v2.8 16 supergt 2008.10.11 4681
35 그래픽 Arevulopapo's Particle Engine for VX/Ace by PK8 1 Alkaid 2012.05.13 2875
34 AntiLag_1.2h 23 file RPGbooster 2008.10.08 2284
33 전투 Animated Battlers VX 3.7 by DerVVulfman Alkaid 2012.09.07 2102
32 전투 Animated Battlers VX 3.5 by DerVVulfman 2 Alkaid 2011.11.02 3101
31 전투 Animated Battlers VX 3.4 by DerVVulfman 5 file Alkaid 2010.09.10 3117
30 메시지 Advanced Text System 3.0c by Modern Algebra 3 file Alkaid 2010.09.08 2302
29 메시지 Advanced Text System 3.0b by Modern Algebra 3 file Alkaid 2010.09.05 2206
28 저장 Advanced Files 1.3 by Dargor 6 file Alkaid 2010.09.02 2364
27 메뉴 Adding Extra Menu in lafia Script 2 Man... 2008.10.29 1574
26 전투 Actor Battler Graphics 13 아방스 2008.03.07 3065
25 기타 ActivateEvents 8 file EuclidE 2010.09.18 1692
24 전투 ActBattle 전투 스크립트 13 file 사람이라면? 2010.08.16 5963
23 이동 및 탈것 A* 알고리즘을 이용한 길찾기 스크립트 3 file 허걱 2009.04.20 3531
22 ??무슨 스크립트?? 3 Man... 2008.10.27 1323
21 ??? 1 Man... 2008.10.27 1020
20 ??? 2 Man... 2008.10.27 1329
19 ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
18 영상 ??(Avi play ver beta 0.8) 4 Man... 2008.10.28 1575
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