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 5408
137 기타 ひきも記 RMVX 샘플 프로젝트 9 file Alkaid 2010.09.15 2338
136 기타 Drop Options 1.1 by Modern Algebra 4 Alkaid 2010.09.16 1509
135 장비 Equipment Constraints 2.5b by Modern Algebra 3 Alkaid 2010.09.17 2002
134 기타 집안의 가구를 내마음대로 데코레이션하기 15 file EuclidE 2010.09.18 4303
133 제작도구 Windowskin generator VX by Aindra and Woratana 1 file Alkaid 2010.09.18 1791
132 기타 Wora's Christmas Giftbox 2008 4 file Alkaid 2010.09.18 1747
131 기타 ActivateEvents 8 file EuclidE 2010.09.18 1692
130 장비 장비에 레벨제한 스크립트!! 21 ijsh515 2010.09.19 3040
129 맵/타일 Tileset Reader VX 2.1 by DerVVulfman 4 Alkaid 2010.09.20 2376
128 기타 OriginalWij's Script Compilation 1.2 2 Alkaid 2010.09.20 1583
127 장비 장비의 착용조건 설정 v1.0 27 file 까까까 2010.09.20 3741
126 전투 sbs battler configuration 한글 번역 13 file 시트르산 2010.09.23 4476
125 메뉴 kgc 파라미터 배분 09/07/25 13 시트르산 2010.09.24 2327
124 퀘스트 [패치]오메가 퀘스트 시스템 확장판 v.1.1 72 file 레오 2010.09.25 5475
123 장비 KGC 확장 장비 화면 2009/02/15 13 시트르산 2010.09.25 3113
122 제작도구 Window Maker by Jet 12 Alkaid 2010.09.26 2439
121 HUD 맵 이름 스크립트 21 file 개임맨 2010.10.03 4365
120 기타 책 읽기 스크립트 44 file 히류 2010.10.05 4506
119 기타 Modified Advanced Weather Script VX 1.1 3 file Alkaid 2010.10.08 1967
118 전투 포켓몬 스크립트 한글화 완료 26 file 서울냥이 2010.10.11 6030
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