Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-13-2013, 07:12 AM
HnathBST
Sarnak
 
Join Date: Feb 2007
Location: Sunset Home
Posts: 71
Default Advanced announcement script

This is a modified version to kingly_krab's announcement script. I like options, sometimes I want red, sometimes green, etc.

This also shows a more advanced example of perls regular expression matching.

Code:
sub EVENT_SAY
{
 if($text =~ /announce (.{1,9}) ([01]) ([0-9]{1,3}) (.+)/i){
 my %colors =(
 "white"=>0,
 "gray"=>1,
 "blue"=>4,
 "green"=>2,
 "red"=>13,
 "cyan"=>18,
 "oocgr"=>260
 );

 my $color = $colors{$1};
 my $char = $client->GetCleanName();
 my $allZones = $2;
 my $minStatus = $3;
 my $message = $4;
 if($client)
 {
 quest::gmsay("$char Announces: $message", $color, $allZones, 0, $minStatus);
 }
 }
 }
}
I have mine assigned to a NPC who checks GM status before checking text.

To use, simply target and type:
announce <color> <send to world 1|0> <min status> message

Example:
announce red 1 0 The server is going down for reboot now!
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 10:08 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