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 04-11-2009, 01:28 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default Specifying a client

RE: my custom zone music setup found here.

The principle behind this script is that it uses a sub EVENT_ENTERZONE function in the templates\player.pl to access a cmd line that runs a vbs script which in turn launches a batch file which in turn plays music for the zone in which it is triggered. Here's a short sample of the flow:
Code:
		my $zone_music_w = 'C:\EQEmu\quests\music\runw.vbs'; # 92 - frontiermtns
		my $zone_music_ww = 'C:\EQEmu\quests\music\runww.vbs'; # randomize
		my $zone_music_www = 'C:\EQEmu\quests\music\runwww.vbs'; # randomize

		my @random_music_w = (
			"$zone_music_w",
			"$zone_music_ww",
			"$zone_music_www"
			);		

		my $random_music_w = quest::ChooseRandom(@random_music_w);

		if($zoneid == 92)
			{
			system("$random_music_w");
			}
Runw.vbs launches runw.bat which in turn launches zonew.wav. The problem is (and has been) that since the "system" command is an external one, it launches the event indiscriminately on the server side each time a client enters the zone. I would like to limit the launch of the vb script to the specific client that triggers the event (i.e., enters the zone). Is there a way to define the client up front and include it within the if statement? For instance,

my $music_client = $client;
if($zoneid == 92 && $music_client eq ???)
{
system("$random_music_w");
}

I'm not sure how this should read, or even if it can be done. Can someone give me some guidance on this?
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 04:42 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3