EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Feature Requests (https://www.eqemulator.org/forums/forumdisplay.php?f=612)
-   -   Faction messages for GMs (https://www.eqemulator.org/forums/showthread.php?t=25784)

steve 07-25-2008 06:30 PM

Faction messages for GMs
 
Is it possible to show faction messages like this when you kill an NPC while flagged as a GM?

Your faction standing with Orcs(#123) will be adjusted by -5 : curr_val = -510.
Your faction standing with High Elves(#375) will be adjusted by 1.
Your faction standing with Wood Elves(#374) will be adjusted by 1.

etc. Not a big deal, and I'm not even sure if it's possible. Is there another way to view faction info ingame?

joligario 07-25-2008 08:10 PM

If you add it into the C++ code, you can have it tell you anything you want..

AndMetal 07-26-2008 12:42 AM

Quote:

Originally Posted by joligario (Post 153219)
If you add it into the C++ code, you can have it tell you anything you want..

To answer your question a little more directly, you can change the messages used in zone/faction.cpp:
Code:

  718 //o--------------------------------------------------------------
  719 //| Name: BuildFactionMessage; rembrant, Dec. 16, 2001
  720 //o--------------------------------------------------------------
  721 //| Purpose: duh?
  722 //o--------------------------------------------------------------
  723 char* BuildFactionMessage(sint32 tmpvalue, sint32 faction_id, sint32 totalvalue)
  724 {
  725 /*
  726
  727 This should be replaced to send string-ID based messages using:
  728 #define FACTION_WORST 469 //Your faction standing with %1 could not possibly get any worse.
  729 #define FACTION_WORSE 470 //Your faction standing with %1 got worse.
  730 #define FACTION_BEST 471 //Your faction standing with %1 could not possibly get any better.
  731 #define FACTION_BETTER 472 //Your faction standing with %1 got better.
  732
  733 some day.
  734
  735 */
  736        //tmpvalue is the change as best I can tell.
  737        char *faction_message = 0;
  738
  739        char name[50];
  740
  741        if(database.GetFactionName(faction_id, name, sizeof(name)) == false) {
  742                snprintf(name, sizeof(name),"Faction%i",faction_id);
  743        }
  744
  745        if(totalvalue >= MAX_FACTION) {
  746                MakeAnyLenString(&faction_message, "Your faction standing with %s could not possibly get any better!", name);
  747                return faction_message;
  748        }
  749        else if(tmpvalue > 0 && totalvalue < MAX_FACTION) {
  750                MakeAnyLenString(&faction_message, "Your faction standing with %s has gotten better!", name);
  751                return faction_message;
  752        }
  753        else if(tmpvalue == 0) {
  754                return 0;
  755        }
  756        else if(tmpvalue < 0 && totalvalue > MIN_FACTION) {
  757                MakeAnyLenString(&faction_message, "Your faction standing with %s has gotten worse!", name);
  758                return faction_message;
  759        }
  760        else if(totalvalue <= MIN_FACTION) {
  761                MakeAnyLenString(&faction_message, "Your faction standing with %s could not possibly get any worse!", name);
  762                return faction_message;
  763        }
  764        return 0;
  765 }

Just add some checks to see if you're flagged as a GM (should be GetGM()) so it's only when you're flagged, and you should be good to go.


All times are GMT -4. The time now is 07:19 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.