Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-06-2009, 10:24 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default Custom zone music--finally!

I finally figured out how to launch a custom music file for a zone (or, for that matter, a proximity). Just use the perl "system" command as a function in a .pl script, a DOS batch file, and a music clip. Here's how it works.

To get custom "mood" music to play when entering a zone:

1. Create a music clip (in this case, I named it zone.mp3). Place this clip in the desired quest\zone folder.

2. Place the following script in the quest\zone\player.pl file (if player.pl does not exist in that folder, create it):
Code:
sub EVENT_ENTERZONE
	{
	my $zone_music = 'C:\EQEmu\quests\[zone_name]\music.bat';
	system ("$zone_music");
 	}
3. Create a corresponding batch file (in this case, I named it music.bat) containing the following text, and place it in the desired quest\zone folder:
Code:
@echo off 
start C:\EQEmu\quests\[zone_name]\zone.mp3
4. #reloadquest, and enter the zone.

Although I have not yet attempted it, the same "system" command could be used in an NPC .pl in a sub EVENT_ENTER event after proximity has been set in the sub EVENT_SPAWN event.

One drawback: the media player will pop up on top of the screen when it launches the file, but an alt-tab back to the screen hides it. I have not yet figured out how to keep that from happening.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:58 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3