XP 스크립트

 헤메이다가 NRMC 에서 구했습니다

 여기 자료실에있는 것은 0.3 버전이던데 에러가 나더군요

 0.4 버전을 NRMC 강좌실에서 찾아서 적용시켜보니

 에러가 안뜹니다 제작자분께 정말 감사드립니다~~





#==============================================================================
# □ 커스터마이즈(customize) 포인트
#==============================================================================
class Window_Base
SYSTEM_WORD_EVA = "회피" # 「회피 수정」의 용어
end
#
# - Window_EquipLeft 클래스의
#  메소드 refresh, set_new_parameters를 재정의 하고 있습니다 -
#
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base
#----------------------- ---------------------------------------------------
# ● 파라미터의 묘화
#--------------------------------------------------------------------------
alias xrxs_mp1_draw_actor_parameter draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
case type
when 7
parameter_name = SYSTEM_WORD_EVA
parameter_value = actor.eva
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
return
end
xrxs_mp1_draw_actor_parameter(actor, x, y, type)
end
end
#==============================================================================
# ■ Window_EquipLeft
#==============================================================================
class Window_EquipLeft < Window_Base
#--------------------------------------------------------------------------
# ○공개 인스턴스 변수
#--------------------------------------------------------------------------
attr_accessor :eauipitem_index # 장비 아이템 윈도우의 커서 인덱스
#-------------------------------------------------------------- ------------
# ● 오브젝트 초기화
# actor : 엑터
#--------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor)
xrxs_mp1_initialize(actor)
self.height = 416
self.contents = Bitmap.new(width - 32, height - 32)
@eauipitem_index = -1
refresh
refresh2
end
#--------------------------------------------------------------------------
# ● 원기회복
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_level(@actor, 4, 32)
draw_actor_parameter(@actor, 4, 64, 0)
draw_actor_parameter(@actor, 4, 96, 1)
draw_actor_parameter(@actor, 4, 128, 2)
if @new_atk != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 64, 40, 32, "→", 1)
self.contents.font.color = @actor.atk < @new_atk ? system_color :
@actor.atk > @new_atk ? disabled_color :
normal_color
self.contents.draw_text(200, 64, 36, 32, @new_atk.to_s, 2)
end
if @new_pdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 96, 40, 32, "→", 1)
self.contents.font.color = @actor.pdef < @new_pdef ? system_color :
@actor.pdef > @new_pdef ? disabled_color : normal_color
self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
end
if @new_mdef != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 128, 40, 32, "→", 1)
self.contents.font.color = @actor.mdef < @new_mdef ? system_color :
@actor.mdef > @new_mdef ? disabled_color :
normal_color
self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ○원기회복 2
#---- ----------------------------------------------------------------------
def refresh2
draw_actor_parameter(@actor, 4, 192, 3)
draw_actor_parameter(@actor, 4, 224, 4)
draw_actor_parameter(@actor, 4, 256, 5)
draw_actor_parameter(@actor, 4, 288, 6)
draw_actor_parameter(@actor, 4, 320, 7)
if @new_str != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 192, 40, 32, "→", 1)
self.contents.font.color = @actor.str < @new_str ? system_color :
@actor.str > @new_str ? disabled_color :
normal_color
self.contents.draw_text(200, 192, 36, 32, @new_str.to_s, 2)
end
if @new_dex != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 224, 40, 32, "→", 1)
self.contents.font.color = @actor.dex < @new_dex ? system_color :
@actor.dex > @new_dex ? disabled_color :
normal_color
self.contents.draw_text(200, 224, 36, 32, @new_dex.to_s, 2)
end
if @new_agi != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 256, 40, 32, "→", 1)
self.contents.font.color = @actor.agi < @new_agi ? system_color :
@actor.agi > @new_agi ? disabled_color :
normal_color
self.contents.draw_text(200, 256, 36, 32, @new_agi.to_s, 2)
end
if @new_int != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 288, 40, 32, "→", 1)
self.contents.font.color = @actor.int < @new_int ? system_color :
@actor.int > @new_int ? disabled_color :
normal_color
self.contents.draw_text(200, 288, 36, 32, @new_int.to_s, 2)
end
if @new_eva != nil
self.contents.font.color = system_color
self.contents.draw_text(160, 320, 40, 32, "→", 1)
self.contents.font.color = @actor.eva < @new_eva ? system_color :
@actor.eva > @new_eva ? disabled_color :
normal_color
self.contents.draw_text(200, 320, 36, 32, @new_eva.to_s, 2)
end
#
# 값을 보존
#
@eauipitem_index_last = @eauipitem_index
end
#---------- ----------------------------------------------------------------
# ● 장비 변경 후의 파라미터 설정
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef)
if @eauipitem_index_last != @eauipitem_index
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
refresh
end
end
#--------------------------------------------------------------------------
# ○장비 변경 후의 파라미터 설정 2
#--------------------------------------------------------------------------
def set_new_parameters2(new_str, new_dex, new_agi, new_int, new_eva)
if @eauipitem_index_last != @eauipitem_index
@new_str = new_str
@new_agi = new_agi
@new_int = new_int
@new_dex = new_dex
@new_eva = new_eva
# 원기회복
refresh2
end
end
end

#============================ ==================================================
# ■ Window_EquipItem
#==============================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
#-- ------------------------------------------------------------------------
alias xrxs_mp1_initialize initialize
def initialize(actor, equip_type)
xrxs_mp1_initialize(actor, equip_type)
self.x = 272
self.width = 368
self.contents = Bitmap.new(width - 32, height - 32)
@column_max = 1
refresh
end
end
#==============================================================================
# ■ Scene_Equip
#==============================================================================
class Scene_Equip
#------------------------------------------------------------- -------------
# ● 원기회복
#--------------------------------------------------------------------------
alias xrxs_mp1_refresh refresh
def refresh
# 현재 장비중의 아이템을 취득
item1 = @right_window.item
# 현재의 아이템 윈도우를 @item_window 에 설정
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
# 라이트 윈도우가 액티브의 경우
if @right_window.active
@left_window. eauipitem_index = -2
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
@left_window.eauipitem_index = @item_window.index
end
#
# 귀환시킨다
#
xrxs_mp1_refresh
#
#
#
# 라이트 윈도우가 액티브의 경우
if @right_window.active
# 장비 변경 후의 파라미터를 소거
@left_window.set_new_parameters2(nil, nil, nil, nil, nil)
end
# 아이템 윈도우가 액티브의 경우
if @item_window.active
# 현재 선택중의 아이템을 취득
item2 = @item_window.item
# 장비를 변경
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
# 장비 변경 후의 파라미터를 취득
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
new_eva = @actor.eva
# 장비를 돌린다
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# 레프트 윈도우에 묘화
@left_window.set_new_parameters2(new_str, new_dex, new_agi, new_int, new_eva)
end
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '3'
  • ?
    가리로루 2009.12.16 16:34

    감사합니다!!

    정말로고마움..

    이런걸원함 다른것도찾아야할탠데..

  • ?
    백개의검 2011.02.09 23:03

    감사합니다

  • ?
    생파 2012.02.23 17:58

    에러는 안뜨는데 스크립트 자체에 문제가있음.

    장비아이템 이미지 배치가 그대로여서, 이미지가 잘려서보임


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
761 메뉴 메뉴화면 변경 스크립트 1 file 백호 2009.02.21 2769
760 기타 랜덤 지하 감옥 작성 스크립트 1 file 백호 2009.02.21 1338
759 전투 쿼터뷰 전투 스크립트 3 file 백호 2009.02.21 2870
758 상점 상점에 물방,마방 구별, 무기의 능력치 상세화 5 file 백호 2009.02.21 2512
757 상점 상점에서 Q.W버튼으로 순서를 바꿈!상점스텟 상세화 업그레이드 1 백호 2009.02.21 1714
» 장비 에러 안나는 장비창 전능력 표시 스크립트... 3 백호 2009.02.21 2353
755 기타 테트리스 ?구현 스크립트 2 file 백호 2009.02.21 1714
754 오디오 CG, 음악 감상 스크립트 [한글화] 11 file 백호 2009.02.21 2403
753 기타 지정범위안에 들어오면 특정한 움직임을 취한다!! 1 백호 2009.02.21 919
752 변수/스위치 지정범위안에 들어오면 특정 스위치를 온/오프/교환 한다!! 2 백호 2009.02.21 1365
751 메시지 메세지 표시 업그레이드 11 file 백호 2009.02.21 4728
750 아이템 심플 액알 [리젠, 아이템 드롭] 18 file 백호 2009.02.21 3917
749 이동 및 탈것 8방향 스크립트 12 file 백호 2009.02.21 2412
748 전투 전투시 미묘한 효과 스크립트 file 백호 2009.02.21 1468
747 스킬 스킬제휴 스크립트 file 백호 2009.02.21 1294
746 전투 전투위치 보정 스크립트 1 file 백호 2009.02.21 1234
745 전투 턴제 전투메시지 스크립트 10 file 백호 2009.02.21 2199
744 기타 대화창에 얼굴그래픽 스크립트 25 file 백호 2009.02.21 4137
743 이동 및 탈것 캐릭터 이동 프레임? 증가 스크립트 9 백호 2009.02.21 2969
742 메뉴 각 메뉴를 호화롭게 하는 스크립트 3 file 백호 2009.02.21 2616
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ... 52 Next
/ 52