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
  #4  
Old 09-07-2016, 03:00 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Completely untested (including simply running a perl -c on the code), as I'm away from home atm:

Code:
# /quests/global/global_player.pl
use File::Copy qw(copy);

sub EVENT_SAY {
	@args = split(' ', $text); # Something I use for custom gm commands
	if ($text=~/#globalmarquee/i) {
		if ($args[1]) {
			$formattedstring = "";
			for ($count = 1; $count < scalar(@args); $count++) {
				$formattedstring = $formattedstring." ".$args[$count];
			}
			my $filename = "C:\EQEMU\QUESTS\GLOBAL\GlobalMarquee.txt";
			move $filename, $filename.".bak";
			open my $fh, '>', "output.txt"
				or die "Cannot open file: $!";
			print $fh "$formattedstring\n";
			close $fh;
			quest::crosszonesignalnpcbynpctypeid(10, 99999);
		}
	}
}


# /quests/global/zone_controller.pl
sub EVENT_SIGNAL {

	elsif ($signal == 99999) {
		$filename = "C:\EQEMU\QUESTS\GLOBAL\GlobalMarquee.txt";
		my @marqueemessage = do {
			open my $fh, "<", $filename
				or die "could not open $filename: $!";
			<$fh>;
		};		
		my @clist = $entity_list->GetClientList();
		foreach my $sclient (@clist) {
			$sclient->SendMarqueeMessage(15, 510, 1, 1, 3000, $marqueemessage);
		}
	}
}
When there is a will, there is a way (with Perl).

Last edited by ghanja; 09-07-2016 at 05:25 PM..
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 03:58 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3