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

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 09-13-2013, 07:15 AM
HnathBST
Sarnak
 
Join Date: Feb 2007
Location: Sunset Home
Posts: 71
Default

To clarify, I have my script attached (global) to a GM Pet, which has a spell to summon (and soon a clicky item...) I'll post details on how to make the GM pet if anyone is interested.
Reply With Quote
  #3  
Old 09-13-2013, 07:16 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

I actually already made something like this, without the choice of color, in the Server Console NPC. My custom MOTD also allows you to choose the color!
Reply With Quote
  #4  
Old 09-13-2013, 07:19 AM
HnathBST
Sarnak
 
Join Date: Feb 2007
Location: Sunset Home
Posts: 71
Default

Are you using the standard MOTD? Or are you using something custom?
Reply With Quote
  #5  
Old 09-13-2013, 07:19 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Something custom with DBI: http://prntscr.com/1r05k4
Reply With Quote
  #6  
Old 09-13-2013, 07:24 AM
HnathBST
Sarnak
 
Join Date: Feb 2007
Location: Sunset Home
Posts: 71
Default

Oh nice! I've been playing around with DBI. Also for the MOTD (as a popup window) but I am setting mine up to change via my website (as a plugin) I already hacked the HTTP query into something I could easily use in php (via cURL)

Webbe's Soloable Server
Reply With Quote
  #7  
Old 09-13-2013, 07:24 AM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Also, it looks like this: http://prntscr.com/1r067l
Reply With Quote
  #8  
Old 09-13-2013, 07:35 AM
HnathBST
Sarnak
 
Join Date: Feb 2007
Location: Sunset Home
Posts: 71
Default

That's awesome! Next time I'm on ill take a screenshot of my popup window (it's generic, but I feel like no one read it when it popped up in the chat.)
Reply With Quote
Reply

Thread Tools
Display Modes

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 08:27 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