WoWish-Swe Server
Would you like to react to this message? Create an account in a few clicks or log in to continue.
WoWish-Swe Server

WoWish-Swe Server Up And Running 24/7
 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

 

 [C++] GM online alert

Go down 
2 posters
AuthorMessage
DisturbingEffect
Admin
Admin
DisturbingEffect


Antal inlägg : 25
WoWish Points! : 34
WoWish Reputation : 12
Join date : 2009-10-15
Age : 29
Ort : Sweden

[C++] GM online alert Empty
PostSubject: [C++] GM online alert   [C++] GM online alert EmptyMon Oct 26, 2009 12:04 pm

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
Back to top Go down
http://www.wowlotus.tk
Slimwar
Admin
Admin
Slimwar


Antal inlägg : 20
WoWish Points! : 23
WoWish Reputation : 17
Join date : 2009-07-28
Age : 31
Ort : At my computer

[C++] GM online alert Empty
PostSubject: Re: [C++] GM online alert   [C++] GM online alert EmptyTue Oct 27, 2009 3:04 pm

Or we just do like this,
Go in to command_overview in databass
Set .gm list into Gm lvl 0,
Woho now players can do .gm list and see if there is any gm online Wink
Back to top Go down
 
[C++] GM online alert
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
WoWish-Swe Server :: Off-Topic-
Jump to: