Emulator Server Discussion World of Warcraft Emulator Server general chat . [NO Questions here]
[Release] Donor Announce Patch ( Donators Announce )
Banned
Rep Power: 0
Posts: 544
Join Date: Aug 2007
Location: Florida SunShine
[Release] Donor Announce Patch ( Donators Announce ) -
03-13-2008
This probably makes your Members donate more often if they had their own announce command. =============================== This simply lets donators have the following command Which simply thoes the following Code:
[Donor]PersonNameHere : YOURMESSAGEHERE Now you can simply change it to fit your style here and there. ==================================== Patch Quote:
Index: Chat.cpp
===================================================================
--- Chat.cpp (revision 4120)
+++ Chat.cpp (working copy)
@@ -470,6 +470,7 @@
{ "worldport", 'v', &ChatHandler::HandleWorldPortCommand, "", NULL, 0, 0, 0},
{ "save", 's', &ChatHandler::HandleSaveCommand, "Save's your character", NULL, 0, 0, 0},
{ "saveall", 's', &ChatHandler::HandleSaveAllCommand, "Save's all playing characters", NULL, 0, 0, 0},
+ { "donor", 'qq', &ChatHandler::HandleDonorCommand, "Sends Msg To All",
{ "start", 'm', &ChatHandler::HandleStartCommand, "Teleport's you to a starting location", NULL, 0, 0, 0},
{ "additem", 'm', &ChatHandler::HandleAddInvItemCommand, "", NULL, 0, 0, 0},
{ "removeitem", 'm', &ChatHandler::HandleRemoveItemCommand, "Removes item %u count %u.", NULL, 0, 0, 0 },
Index: Chat.h
===================================================================
--- Chat.h (revision 4120)
+++ Chat.h (working copy)
@@ -197,6 +197,7 @@
bool HandleSummonCommand(const char* args, WorldSession *m_session);
bool HandleAppearCommand(const char* args, WorldSession *m_session);
bool HandleAnnounceCommand(const char* args, WorldSession *m_session);
+ bool HandleDonorCommand(const char* args, WorldSession *m_session);
bool HandleWAnnounceCommand(const char* args, WorldSession *m_session);
bool HandleGMOnCommand(const char* args, WorldSession *m_session);
bool HandleGMOffCommand(const char* args, WorldSession *m_session);
Index: Level1.cpp
===================================================================
--- Level1.cpp (revision 4120)
+++ Level1.cpp (working copy)
@@ -23,6 +23,21 @@
#include "StdAfx.h"
+bool ChatHandler::HandleDonorCommand(const char* args, WorldSession *m_session)
+{
+ if(!*args)
+ return false;
+
+ char pAnnounce[1024];
+ string input2;
+
+ input2 = "|cffff6060";
+ if(m_session->CanUseCommand('qq')) input2+="[Donor]";
+ else if(m_session->CanUseCommand('qq')) input2+="[Donor]";
+ input2+="|r|cffff6060 ";
+ input2+=m_session->GetPlayer()->GetName();
+ input2+="|r|cffff6060 |r";
+ snprintf((char*)pAnnounce, 1024, "%s%s", input2.c_str(), args); // Adds BROADCAST:
+ sWorld.SendWorldText(pAnnounce); // send message
+ sGMLog.writefromsession(m_session, "used announce command, [%s]", args);
+
+ //sWorld.SendForcedIRCMessage(pAnnounce);
+ return true;
+}
Or download the patch ===========================================
Works with revision 4120+ =====================================
Last edited by Ascended; 03-13-2008 at 10:24 PM ..
Donate to remove ads. Banned
Rep Power: 0
Reputation: 52 Posts: 566
Join Date: Feb 2008
Location: Key largo Florida.
03-13-2008
Nice, Hehe First post AGAIN..
+rep
Emulator Server Specialist
Rep Power: 2
Posts: 1,918
Join Date: Jan 2008
03-13-2008
Good job mate
Why so serious...?
Legendary User Rep Power: 7
Posts: 1,654
Join Date: Feb 2007
Location: 4Chan
03-13-2008
Putting this command on the 'd' string would allow all donors to have the debug commands... bad idea
And the emulators shall tremble. You are responsible for any broken rule, regardless if you "didn't know" or not.
Master Sergeant
Rep Power: 3
Reputation: 14 Posts: 126
Join Date: Aug 2006
03-13-2008
lol, cant you just change this part in level1.cpp
Code:
if(m_session->CanUseCommand('z')) input2+="Admin";
else if(m_session->GetPermissionCount()) input2+="GM";
to
Code:
if(m_session->CanUseCommand('z')) input2+="Admin";
else if(m_session->CanUseCommand('x')) input2+="Donor";
else if(m_session->GetPermissionCount()) input2+="GM";
Just saying this might be a little easier than adding all that other stuff to other script files.
Banned
Rep Power: 0
Posts: 544
Join Date: Aug 2007
Location: Florida SunShine
03-13-2008
Quote:
Originally Posted by
Gastricpenguin Putting this command on the 'd' string would allow all donors to have the debug commands... bad idea
True , but I said they could change it to fit their style. I dont know every single access out there , so im not that sure which one to give it to donators
Banned
Rep Power: 0
Posts: 544
Join Date: Aug 2007
Location: Florida SunShine
03-13-2008
Quote:
Originally Posted by
HeavyMetal420 lol, cant you just change this part in level1.cpp
Code:
if(m_session->CanUseCommand('z')) input2+="Admin";
else if(m_session->GetPermissionCount()) input2+="GM";
to
Code:
if(m_session->CanUseCommand('z')) input2+="Admin";
else if(m_session->CanUseCommand('x')) input2+="Donor";
else if(m_session->GetPermissionCount()) input2+="GM";
Just saying this might be a little easier than adding all that other stuff to other script files.
Do it which ever way you want. But that way crashed me couple of times , plus you would need to change some z access. I tried this already before releasing this. So the way i released it came to be more perfect.
Master Sergeant
Rep Power: 3
Reputation: 14 Posts: 126
Join Date: Aug 2006
03-13-2008
oh i see (filler)
Master Sergeant
Rep Power: 3
Reputation: 33 Posts: 135
Join Date: Jul 2006
03-13-2008
congrats you pretty much copy pasted the announce command and deleted a few things and added a single line to Chat.cpp and Chat.h
Banned
Rep Power: 0
Posts: 544
Join Date: Aug 2007
Location: Florida SunShine
03-13-2008
Imma be a little noob friendly here, i addedd it to access " qq " donor command came out and no other command did , so i guess will work for others. First post updated
Banned
Rep Power: 0
Posts: 544
Join Date: Aug 2007
Location: Florida SunShine
03-13-2008
Quote:
Originally Posted by
CoolManBob congrats you pretty much copy pasted the announce command and deleted a few things and added a single line to Chat.cpp and Chat.h
Well this is noob friendly. Or you prefer my other one I have ? more lines to it , a bit 80% different than a normal announce command. I will release it when I get it stable with the latest ascent But for now , this will do
Master Sergeant
Rep Power: 3
Reputation: 33 Posts: 135
Join Date: Jul 2006
03-13-2008
Quote:
Originally Posted by
Ascended Well this is noob friendly. Or you prefer my other one I have ? more lines to it , a bit 80% different than a normal announce command. I will release it when I get it stable with the latest ascent But for now , this will do
no im good, if i wanted one i would write it myself
Banned
Rep Power: 0
Posts: 544
Join Date: Aug 2007
Location: Florida SunShine
03-14-2008
Quote:
Originally Posted by
CoolManBob no im good, if i wanted one i would write it myself
If so , still wondering why still the 18 rep .... /sigh
Site n00b.. (A leecher if I've been here for more than a month and can't earn 5 rep)
Rep Power: 2
Reputation: 1 Posts: 31
Join Date: Mar 2007
03-14-2008
sweet thanks ive been looking for something like this
Emulator Server Specialist
Rep Power: 2
Posts: 1,918
Join Date: Jan 2008
03-14-2008
input2 = "|cffff6060";
if(m_session->CanUseCommand('qq')) input2+="[Donor]";
else if(m_session->CanUseCommand('qq')) input2+="[Donor]";
C&P much? That if is unneeded. if the player triggered this function he must have the donor permission :P
Just do this: Code:
bool ChatHandler::HandleDonorCommand(const char* args, WorldSession *m_session)
{
if(!*args)
return false;
char pAnnounce[1024];
snprintf((char*)pAnnounce, 1024, "|cffff6060[Donor]|r|cffff6060 %s|r|cffff6060: |r%s", m_session->GetPlayer()->GetName(), args)
sWorld.SendWorldText(pAnnounce);
sGMLog.writefromsession(m_session, "used Donor announce, [%s]", args);
return true;
}
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by
vBSEO 3.2.0
vBulletin Skin developed by:
vBStyles.com