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

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

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 03-07-2009, 01:55 AM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Well, it appears I still have a bit of work to do on this. When the files are distributed to the client, and the client character zones, the music plays on the server side instead of the client side. I'm sure this would be an easy fix by someone here, but I'll keep working on it till I find a solution.
Reply With Quote
  #3  
Old 03-08-2009, 10:02 AM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

So far no success in getting the music to play on the client machine.

The statement $client->system("$zone_music"); doesn't seem to want to respond. The statement system("$zone_music"); works well for the server side, but each time a client enters a different zone, that zone's music begins to play on the server side but not on the client side. If I could find a perl command like "system" that will execute a batch file on the client machine, this would work like a charm. Does anyone know of such a command?
Reply With Quote
Reply


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 09:18 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3