VX 스크립트

전투 결과 화면을 출력해주는 스크립트.

제법 괜찮아 보입니다. ㅎㅎ

 

Untitled-1 copy.jpg

 

#===============================================================
# �—� [VX] �—� Battle Result
#--------------------------------------------------------------
# �—� By Blockade
# �—� http://rpg-maker-vx.bbactif.com/forum.htm
# �—� Released on 11/11/2008
# �—� Version 1.0
# �—� Thanks to Woratana, Moghunter
#--------------------------------------------------------------

class Window_Battle_Result < Window_Base
def initialize(result_data)
super(0, 0, 546, 290)
self.z = 1
contents.font.color = normal_color
textexp = "Exp received : " + $game_troop.exp_total.to_s
textarg = "Gils obtained : " + $game_troop.gold_total.to_s
drop_items = $game_troop.make_drop_items
yitem = 70
xitem = 30

contents.draw_text(200, 0, contents.width, WLH, "Battle Result")
contents.draw_text(0,22, contents.width, WLH, textexp)
contents.draw_text(0,50, contents.width, WLH, "Items obtained :")
contents.draw_text(0,235, contents.width, WLH, textarg )

#=========================================================
# Gestion du drop
#=========================================================
for item in drop_items
$game_party.gain_item(item, 1)
contents.draw_text(xitem,yitem, contents.width, WLH,item.name)
draw_icon(item.icon_index,xitem-30, yitem, true)
yitem += 23
if yitem == 231
yitem = 70
xitem =+ 180
end
end

#=========================================================
# Gestion de l'affichage de l'Xp
#=========================================================
ychara= 100
$game_party.members.each_index do |i|
actor = $game_party.members[i]
exp = $game_troop.exp_total
actor.gain_exp(exp, false)
draw_character(actor.character_name, actor.character_index, 350, ychara)
draw_actor_exp_meter(actor,370,ychara-30,100)
actor.gain_exp(-exp,false)
ychara +=50
end
end
#=========================================================
# Gestion de l'affichage de la barre d'XP
#=========================================================
def exp_gauge_color1
return text_color(30)
end

def exp_gauge_color2
return text_color(31)
end

def draw_actor_exp_meter(actor, x, y, width = 100)
if actor.next_exp != 0
exp = actor.now_exp
else
exp = 1
end
gw = width * exp / [actor.next_exp, 1].max
gc1 = exp_gauge_color1
gc2 = exp_gauge_color2
self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 30, WLH, "Exp")
self.contents.font.color = normal_color
xr = x + width
self.contents.draw_text(xr - 60, y, 60, WLH, actor.next_rest_exp_s, 2)
end
end


#=========================================================
# Réecriture des méthodes
#=========================================================
class Scene_Battle < Scene_Base
alias block_redef_meth_battle_end battle_end
alias block_redef_meth_display_exp_and_gold display_exp_and_gold
alias block_redef_meth display_drop_items

def display_drop_items
end

def battle_end(result)
@result_window.dispose if result == 0
block_redef_meth_battle_end(result)
end

def display_exp_and_gold
result_data = [sprintf(Vocab::ObtainExp, $game_troop.exp_total),
sprintf(Vocab::ObtainGold, $game_troop.gold_total, Vocab::gold)]
@result_window = Window_Battle_Result.new(result_data)
block_redef_meth_display_exp_and_gold
end
end

class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end

def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

Who's 카르와푸딩의아틀리에

profile

엘카르디아 제작자 (현재 MV로 리메이크중)

유튜브

https://www.youtube.com/channel/UCMwirNTR-pOEzJNB0jL3y_g

트위터

https://twitter.com/karsis98

블로그

https://blog.naver.com/karsis98

Comment '12'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
337 기타 KGC 스크립트 라이브러리 7 훈덕 2009.05.31 2611
336 메뉴 시스템 옵션 스크립트의 사용방법 6 아방스 2009.06.04 2832
335 기타 (좀 이상한 or 쓸모없을 듯 한)화면상에 몬스터와 만나려면 몇걸음 남았는지 표시하는 스크립트! 2 루시페르 2009.06.06 2318
334 기타 던전에 적정 레벨이 어떤건지 스크린에 표시해주는 스크립트! 5 file 루시페르 2009.06.06 2907
333 기타 문장의 스크롤! 13 루시페르 2009.06.06 2524
332 기타 좀 뭐랄까... 어이없는 "비행선 더 높게 날아오르게 하기!"스크립트.... 8 루시페르 2009.06.06 2426
331 기타 적 선택시 스킬창 비표시 + 타겟 플래쉬 7 훈덕 2009.06.14 2094
330 메뉴 스테이터스 화면 개조 - 커스텀 버전 13 file 훈덕 2009.06.15 4932
329 타이틀/게임오버 맵 타이틀 스크립트 48 아방스 2009.06.17 5547
328 전투 카운트배틀 시스템(스크립트 한글살짝번역) 10 file 카르와푸딩의아틀리에 2009.06.17 5520
327 온라인 VX Phoenix 온라인 스크립트 1.3버전 12 아방스 2009.06.18 3486
326 메뉴 전투승리시 아이템 경험치팝업창 스크립트 18 file 카르와푸딩의아틀리에 2009.06.23 3760
325 전투 Requiem ABS 8 - 액션 배틀 시스템 8 36 아방스 2009.06.24 8540
324 전투 ATB전투방식.(사이드뷰X 백발의카임전투방식O) 14 file 이피쿤 2009.06.24 9035
323 메시지 조합한글 21 file 허걱 2009.06.27 4410
322 기타 그림을 각도로 회전시키기 1 허걱 2009.06.30 2328
321 기타 경험치 백분율 계산 2 허걱 2009.06.30 3093
320 직업 서브클래스 선택 시스템 Subclass Selection System 7 file 카르와푸딩의아틀리에 2009.06.30 3943
319 기타 미니게임테트리스 스크립트 ㅋㅋㅋ 27 file 카르와푸딩의아틀리에 2009.06.30 3689
318 기타 시야범위 스크립트 22 file 카르와푸딩의아틀리에 2009.06.30 4025
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 32 Next
/ 32