XP 스크립트

http://www.dubealex.com/asylum/index.php?showtopic=568

돈 액수 표시할 때 세 자리씩 ,로 끊어서 표시하는 것입니다.(FF7 CMS에서 사용하는 그거)

class Window_Gold < Window_Base
......
def refresh

#Advanced Gold Display mini-script-x by Dubealex.

self.contents.clear

case $game_party.gold
when 0..9999
gold = $game_party.gold
when 10000..99999
gold = $game_party.gold.to_s
array = gold.split(//)
gold = array[0].to_s+array[1].to_s+","+array[2].to_s+array[3].to_s+array[4].to_s
when 100000..999999
gold = $game_party.gold.to_s
array = gold.split(//)
gold = array[0].to_s+array[1].to_s+array[2].to_s+","+array[3].to_s+array[4].to_s+array[5].to_s
when 1000000..9999999
gold = $game_party.gold.to_s
array = gold.split(//)
gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s+","+array[4].to_s+array[5].to_s+array[6].to_s
end

self.contents.font.color = text_color(6)
gold_word = $data_system.words.gold.to_s + ":"
cx = contents.text_size(gold_word).width
cx2=contents.text_size(gold.to_s).width
self.contents.draw_text(4, 0, 120-cx-2, 32, gold_word)
self.contents.font.color = text_color(0)
self.contents.draw_text(124-cx2+2, 0, cx2, 32, gold.to_s, 2)
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
14 기타 Damage Reductions by SephirothSpawn (SDK호환) 1 백호 2009.02.22 779
13 기타 Terrain Encounter Areas by SephirothSpawn 백호 2009.02.22 778
12 기타 Activation_system file 백호 2009.02.22 775
11 기타 AMS-Advanced Message Script Edited by Dubleax 3 file 백호 2009.02.21 766
10 기타 Sphere Grid System file 백호 2009.02.21 765
» 기타 Advanced Gold display by Dubealex 1 백호 2009.02.22 761
8 기타 Letter by Letter Message Window by slipknot@rmxp.org (SDK호환) 1 file 백호 2009.02.22 760
7 기타 killer님 요청하신 스크립트 두번째입니다. 나뚜루 2009.02.21 759
6 기타 Real-Time Day Night 3 백호 2009.02.22 751
5 기타 Materia System file 백호 2009.02.21 749
4 기타 Localization by ForeverZer0, KK20 습작 2013.04.26 738
3 기타 Boat Script 백호 2009.02.21 729
2 기타 에어리어 설정 by RPG Advocate 백호 2009.02.22 710
1 기타 [All RGSS] FileTest (Unicode) file Cheapmunk 2014.12.29 614
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13