View Single Post
  #2  
Old 07-26-2008, 12:42 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by joligario View Post
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.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote