XP 스크립트

사용법은 아랫글을 참조하세요.  이 스크립트는 여러 형식의 사운드파일을 함께 지원하도록 수정되었습니다.

# Combo and improvement of Squall and Andreas21 WimAmp plugins, by Guillaume777 ( 2005 )
# Script allows you to play unusual formats ( .psf, .gym, .spc ) if there is a winamp dll for it
# Script works with multiple format/dlls and doesn't require a "call script" ( just make it play like any BGM )
# Script won't give error unless you try to play a music file requiring dll and dll is not there
# Version 2, fixes battle music bug and "fade music" now stops winamp music

# Intructions
#
# Make sure Winamp.dll, out_wave.dll and the music dlls are in a folder called "DLL" in your game folder
# Copy your music files to the BGM folder ( you can't import them via RPG XP )
# If you use .minipsf don't forget to include the psflib !!
# Just use an event to play the music like any regular BGM
# The music files won't play in Sound Test, only in the real game
# If you want loop music files you need to edit dlls in winamp and copy the configure files to the DLL folder
#
#
#
#
#
#
# Credits for Winamp class and Winamp.dll to Andreas21 (C) 2004
# Credits to Squall for Audio module and Game_system functions.
# squall@loeher.zzn.com
#
# Script und WinAmp.dll by Andreas21 © 2004
# Roh PureBasic Code by GPI © 2004
# Beta Tester -
# http://www.rpgfantasy.de (Page)
# http://www.forum.rpgfantasy.de (Forum)

module Audio

@winamp = nil #stores audio player

def self.wina_play(filename, volume = 255)
dll = nil
self.wina_quit #stops winamp to start anew

#Check playstation format
for extension in ['.psf', '.minipsf', '.psf2', '.minipsf2'] #check extensions
if FileTest.exist?(filename + extension) #if it found extension
filename = filename + extension #add extension to name of music
dll = "/in_psf.dll" #store name of related dll
break
end
end

#check genesis format
for extension in ['.gym', '.cym']
if FileTest.exist?(filename + extension)
filename = filename + extension
dll = "/in_ym.dll"
break
end
end

#check snes format
for extension in ['.spc']
if FileTest.exist?(filename + extension)
filename = filename + extension
dll = "/in_snes.dll"
break
end
end

if dll != nil #if it found a format with a dll
@winamp=WinAmp_Plugin_System.new(dll)
@winamp.play(filename)
@winamp.setvolume(volume)
end


end #end of def

def self.wina_quit
if @winamp != nil then @winamp.quit end #quit winamp
end





class WinAmp_Plugin_System #This part was done by Andreas21
def initialize(in_dll)
# DLL Pfaht festlegen
in_dll = "DLL" + in_dll
out_dll = 'DLLout_wave.dll'
winamp_dll = 'DLLWinAmp.dll'
# 2 API Funktionen die gebraucht werden für das Fenster Handel
@ReadIni = Win32API.new 'kernel32', 'GetPrivateProfileStringA', %w(p p p p l p), 'l'
@FindWindow = Win32API.new 'user32', 'FindWindowA', %w(p p), 'l'
# Benötigte DLL Funktionen Laden
@Init_Winamp = Win32API.new winamp_dll, 'Init_Winamp', %w(p p l), 'l'
@Quit_Winamp = Win32API.new winamp_dll, 'Quit_Winamp', '', ''
@Winamp_Play = Win32API.new winamp_dll, 'Winamp_Play', 'p', 'l'
@Winamp_Pause = Win32API.new winamp_dll, 'Winamp_Pause', '', ''
@Winamp_Stop = Win32API.new winamp_dll, 'Winamp_Stop', '', 'l'
@Winamp_OnlyExtensions = Win32API.new winamp_dll, 'Winamp_OnlyExtensions', '', 'p'
@Winamp_OutName = Win32API.new winamp_dll, 'Winamp_OutName', '', 'p'
@Winamp_OutConfig = Win32API.new winamp_dll, 'Winamp_OutConfig', 'l', ''
@Winamp_OutAbout = Win32API.new winamp_dll, 'Winamp_OutAbout', 'l', ''
@Winamp_IsPlaying = Win32API.new winamp_dll, 'Winamp_IsPlaying', '', 'l'
@Winamp_InName = Win32API.new winamp_dll, 'Winamp_InName', '', 'p'
@Winamp_Extensions = Win32API.new winamp_dll, 'Winamp_Extensions', '', 'p'
@Winamp_InConfig = Win32API.new winamp_dll, 'Winamp_InConfig', 'l', ''
@Winamp_InAbout = Win32API.new winamp_dll, 'Winamp_InAbout', 'l', ''
@Winamp_GetFileInfo = Win32API.new winamp_dll, 'Winamp_GetFileInfo', %w(p l), 'p'
@Winamp_InfoBox = Win32API.new winamp_dll, 'Winamp_InfoBox', %w(p l), 'l'
@Winamp_GetLength = Win32API.new winamp_dll, 'Winamp_GetLength', '', 'l'
@Winamp_LengthStr = Win32API.new winamp_dll, 'Winamp_LengthStr', 'l', 'p'
@Winamp_GetOutputTime = Win32API.new winamp_dll, 'Winamp_GetOutputTime', '', 'l'
@Winamp_SetVolume = Win32API.new winamp_dll, 'Winamp_SetVolume', 'l', ''
@Winamp_SetPan = Win32API.new winamp_dll, 'Winamp_SetPan', 'l', ''
@winamp_setoutputtime = Win32API.new winamp_dll, 'winamp_setoutputtime', 'l', ''
@Winamp_IsPaused = Win32API.new winamp_dll, 'Winamp_IsPaused', '', 'l'
# Winamp Plugin Systen Starten
@Init_Winamp.call(in_dll, out_dll, handel)
end
# Eine Datei Wiedergeben
def play(file)
return @Winamp_Play.call(file)
end
# Datei in Pause oder Resum versetzen
def pause
@Winamp_Pause.call()
end
# Datei Stopen
def stop
return @Winamp_Stop.call()
end
# WinAmp Plugin System Beenden
def quit
@Quit_Winamp.call()
end
# Mögliche File format von diesem in Plugin
def onlyextensions
return @Winamp_OnlyExtensions.call()
end
# Out_DLL Infos
def outname
return @Winamp_OutName.call()
end
# Öffnet das einstell Fenster der Out DLL
def outconfig
@Winamp_OutConfig.call(handel)
end
# Öffnet das info Fenster der Out DLL
def outabout
@Winamp_OutAbout.call(handel)
end
# Wenn eine datei abgespielt wirt = 1 wenn nicht = 0
def isplaying
return @Winamp_IsPlaying.call()
end
# In DLL infos
def inname
return @Winamp_InName.call()
end
# Infos über das Datei Format der Datei die gerade wiedergegeben wirt
def extensions
return @Winamp_Extensions.call()
end
# Öffnet das einstell Fenster der In DLL
def inconfig
@Winamp_InConfig.call(handel)
end
# Öffnet das info Fenster der In DLL
def inabout
@Winamp_InAbout.call(handel)
end
# Damit bekommt man infos über eine Datei.
def getfileinfo(playfile,length_adr)
return @Winamp_GetFileInfo.call(playfile,length_adr)
end
# Den Tag einer Datei ändern.
def infobox(playfile)
return @Winamp_InfoBox.call(playfile,handel)
end
# Die Länge der gerade lauffenden Datei in Milli.sec.
def getlength
return @Winamp_GetLength.call()
end
# Gibt Milli. sec. in HH:MM:SS Format aus.
def lengthstr(length)
return @Winamp_LengthStr.call(length)
end
# Gibt die aktuelle Zeit der wiedergegebende Datei zurück im Milli. sec..
def getoutputtime
return @Winamp_GetOutputTime.call()
end
# Setzt die Wiedergabe Volumen neu. 0~255
def setvolume(volume)
@Winamp_SetVolume.call(volume)
end
# Setzt bei Modulen Wiedergabe die Pan neu.
def setpan(pan)
@Winamp_SetPan.call(pan)
end
# Setzt die Aktuelle Wiedergabe Position neu in Milli. sec.
def setoutputtime(time)
@winamp_setoutputtime.call(time)
end
# Wenn die Datei in Pause ist = 1 wenn nicht dann = 0
def ispaused
return @Winamp_IsPaused.call()
end
def handel
game_name = 0.chr * 255
zeichen = @ReadIni.call('Game','Title','',game_name,255,".\Game.ini")
return @FindWindow.call('RGSS Player',game_name.slice!(0,zeichen))
end #end of init
end #end of class
end #end of module




#==============================================================================
# ■ Game_System
#------------------------------------------------------------------------------
# Changes added to the bgm_play and bgm_stop functions.
#==============================================================================

class Game_System
#--------------------------------------------------------------------------
# ● Play Back Ground Music
#--------------------------------------------------------------------------
def bgm_play(bgm)
@playing_bgm = bgm
if bgm != nil and bgm.name != ""

Audio.bgm_play("Audio/BGM/" + bgm.name, bgm.volume, bgm.pitch)
Audio.wina_play("Audio/BGM/" + bgm.name, bgm.volume) #Play the new audio format
else
Audio.bgm_stop
Audio.wina_quit
end
Graphics.frame_reset
end

def bgm_fade(time)
@playing_bgm = nil
Audio.bgm_fade(time * 1000)
Audio.wina_quit #stops winamp if you fade music
end

def bgm_stop
Audio.bgm_stop
Audio.wina_quit
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
781 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
780 온라인 Mr.Metring NPE 1.0 [RPG XP 온라인 스크립트] 35 아방스 2009.01.07 6535
779 전투 Mr.Mo's ABS Ultimate 2.6 by DerVVulfman Alkaid 2012.01.04 1820
778 전투 Mr.Mo's ABS Ultimate 3.4 by DerVVulfman Alkaid 2012.03.14 1803
777 전투 Mr.Mo's ABS Ultimate 7.0 by DerVVulfman 4 Alkaid 2012.08.26 2587
776 전투 Mr.mo's SBABS Lite 5 6 아방스마니아 2010.11.14 2947
775 전투 MrMo DVV Add-On #13: Tinuke's Smart Missiles 2 Alkaid 2011.01.24 1843
774 장비 Multi Equip 3.1.4 by Trickster (SDK2 호환, Method & Class Li… 4 file WMN 2008.04.06 1597
773 장비 Multi-equip script 2 file 백호 2009.02.21 1101
772 장비 Multi-equip script ver.6 by Guillaume777 4 file 백호 2009.02.22 1210
771 장비 Multi-equip script 노신버전 2 file 백호 2009.02.22 1129
770 온라인 Multi-Netplay Extended (신버전) 10 백호 2009.02.22 2864
769 온라인 Multi-Netplay Extended[구버전용] 3 백호 2009.02.22 2176
768 기타 Multiple Currencies(여러 개의 통화단위 사용) 2 백호 2009.02.22 1124
767 기타 Multiple Languages v2 by SephirothSpawn (SDK호환) file 백호 2009.02.22 1404
766 장비 Multislots! 2.1 by DerVVulfman 3 file Alkaid 2010.09.02 1537
765 장비 Multislots! 2.2 by DerVVulfman 4 file Alkaid 2011.02.18 1611
764 장비 MultiSlots! 2.4 by DerVVulfman 2 Alkaid 2011.09.05 1466
763 온라인 multy-netplay 로그인창에서 비밀번호를 ***표시해주는 script~! 1 백호 2009.02.22 1889
762 기타 My메세지(메세지 출력 스크립트) 1 file 백호 2009.02.22 1533
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ... 52 Next
/ 52