What it does: When a GM comes online, the scripts sends a server-wide message to players that the GM [name] has come online.
Install:
1. Apply the patch to ArcEmu source
2. Re-compile ArcScripts
3. Finish! biggrin.gif
(optional)4. You can turn this script off by navigating to your /configs/ directory, opening arcemu-optional.conf and where you see:
CODE
<Extra Instant80="0"
PvPToken="0"
PvPTokenID="13905"
PvPKillAnnounce="0"
Portals="0"
L80etc="0"
WeddingNPC="0"
GMOnline="1">
just place GMOnline="0" instead of "1"
Here's the patch source:
Diff Patch
Index: configs/arcemu-optional.conf
===================================================================
--- configs/arcemu-optional.conf (revision 2598)
+++ configs/arcemu-optional.conf (working copy)
@@ -173,7 +173,8 @@
PvPKillAnnounce="0"
Portals="0"
L80etc="0"
- WeddingNPC="0">
+ WeddingNPC="0"
+ GMOnline="1">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# GameMaster Configuration
Index: src/scripts/src/ExtraScripts/GMOnline.cpp
===================================================================
--- src/scripts/src/ExtraScripts/GMOnline.cpp (revision 0)
+++ src/scripts/src/ExtraScripts/GMOnline.cpp (revision 0)
@@ -0,0 +1,18 @@
+#include "StdAfx.h"
+#include "Setup.h"
+
+void GmCheck(Player* pPlayer)
+{
+ if(pPlayer->GetSession()->CanUseCommand('a'))
+ {
+ char message[100];
+ sprintf(message, "%s[NOTE] %s<GM>%s %s has logged in!", MSG_COLOR_YELLOW, MSG_COLOR_RED, MSG_COLOR_CYAN, pPlayer->GetName());
+ sWorld.SendWorldText(message);
+ delete message[];
+ }
+}
+
+void SetupGMOnline(ScriptMgr * mgr)
+{
+ mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD, (void*)GmCheck);
+}
\ No newline at end of file
Index: src/scripts/src/ExtraScripts/Setup.cpp
===================================================================
--- src/scripts/src/ExtraScripts/Setup.cpp (revision 2598)
+++ src/scripts/src/ExtraScripts/Setup.cpp (working copy)
@@ -58,6 +58,13 @@
}
*/
+ //Sends a message to players if a GM has come online.
+ if(Config.OptionalConfig.GetBoolDefault("Extra", "GMOnline", false)
+ {
+ sLog.outColor(TGREEN,"\n GMOnline script Enabled");
+ SetupGMOnline(mgr);
+ }
+
// Allows users to type "+unstuck" without quotes to revive them if
// needed and teleport them to either Stormwind or Orgrimmar
if(Config.OptionalConfig.GetBoolDefault("Extra", "Unstuck", false))
Index: src/scripts/src/ExtraScripts/Setup.h
===================================================================
--- src/scripts/src/ExtraScripts/Setup.h (revision 2598)
+++ src/scripts/src/ExtraScripts/Setup.h (working copy)
@@ -26,5 +26,6 @@
void SetupPvPToken(ScriptMgr * mgr);
//void SetupWeddingNPC(ScriptMgr * mgr);
void SetupUnstuck(ScriptMgr * mgr);
+void SetupGMOnline(ScriptMgr * mgr);
#endif