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
637 기타 Gamepad Extender VX 습작 2015.01.02 672
636 버그픽스 DerVVulfman's Tileset Reader VX Bug Fix 습작 2014.11.16 701
635 아이템 현재있는 파티원 선택 레벨업 아이템 만들기 1 file 싸패 2016.06.06 713
634 메뉴 Etude87_Ace_Style_Formation_Change ver.1.01 습작 2014.10.05 758
633 저장 세이브 파일 개수 16개로 늘리기 (기본 세이브 엔진용) 1 file Bunny_Boy 2015.09.07 816
632 ??? 1 Man... 2008.10.27 1020
631 버그픽스 Graphical Object Global Reference VX by Mithran Alkaid 2014.03.03 1027
630 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 습작 2013.04.19 1046
629 메시지 Etude87 Dialogue History Scene file 습작 2014.07.07 1069
628 ??(다 영어)여기서 부터 드레그만 빼고 Man... 2008.10.27 1078
627 메뉴 KGC - 커스텀 메뉴 커멘드 (번역) 1 듀란테 2015.07.27 1078
626 Scene_Credit script Plug & Play 1 Man... 2008.10.27 1085
625 Multi-threader snippet by Omegazion Man... 2008.10.28 1107
624 메뉴 MOG - Scroll Bar for VX file 습작 2014.07.06 1115
623 Screen Shortcut Script Man... 2008.10.27 1142
622 LevelMe v1.2 3 Man... 2008.10.27 1154
621 Screen Resolution 3 Man... 2008.10.28 1171
620 키입력 Key Simulator by Fantasist 습작 2013.05.01 1176
» MAX Level Limitation System 3 Man... 2008.10.28 1198
618 Simple Fon Chage 3 Man... 2008.10.28 1212
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