Step 1 :
-Download Ascent from its SVN if it hasent been done so yet.
Step 2 :
- First we need to edit 3 files in the ascent source code.
- So first lets edit , lets say Chat.cpp located in scr/ascent-world/chat.cpp
Lets search for a command for example
"
{ "save", 's', &ChatHandler::HandleSaveCommand, "Save's your character", NULL, 0, 0, 0},
"
Under it lets add a new command , im going to call my command a .donor and for access lets say " d ". So this is how im going to put under the command we searched for
{ "donor", 'd', &ChatHandler::HandleDonorAnnounce, "
Announce with the (DONOR) tag instead of your name
", NULL, 0, 0, 0},
Now were done with this step , so lets click on save and close
Step 3 :
-Now we are going to edit chat.h located in " scr/ascent-world/chat.h "
-Since what we are doing is a announce for donators lets be organized and put it under the original announcements.
- Search for
"
bool HandleAnnounceCommand(const char* args, WorldSession *m_session);
"
Now right under it , lets put ours in , lets add this
bool HandleDonorAnnounceCommand(const char* args, WorldSession *m_session);
Alright were done with this step , lets save and close.
Step 4 :
-Now we are going to edit the levels of commands , for example level0.cpp , level1.cpp , level2.cpp , level3.cpp .
-But I for me im going to put it on level2.cpp , but if I was you put it under level1.cpp.
- Now lets look for level2.cpp located under " scr/ascent-world/level2.cpp "
- Go all the way to the buttom and lets add a new command should we
This is what I would add to make .donor appear as
(DONOR) : MYMESSAGEGOESHERE
We are going to add this
Alright that should do it , now go into the game and try .donor or any command you just did.
bool ChatHandler::HandleDonorAnnounceCommand(const char* args, WorldSession *m_session)
{
if(!*args)
return false;
char pAnnounce[1024];
snprintf((char*)pAnnounce, 1024, "(DONOR) %s", args);
sWorld.SendWorldText(pAnnounce);
sGMLog.writefromsession(m_session, "used donor announce command, [%s]", args);
//sWorld.SendForcedIRCMessage(pAnnounce);
return true;
}
Any support will be posted only here