//////////////////////////////////////////////////////////////////////////////// // lib_hos_rep - Adjust reputation functions // By Deva B. Winblood October 17th, 2008 //////////////////////////////////////////////////////////////////////////////// //////////////////////////// // PROTOTYPES //////////////////////////// // FILE: lib_hos_rep FUNCTION: TeamReputationEnemy() void TeamReputationEnemy(object oTarget,string sTeamID); // FILE: lib_hos_rep FUNCTION: TeamReputationFriend() void TeamReputationFriend(object oTarget,string sTeamID); // FILE: lib_hos_rep FUNCTION: TeamReputationNeutral() void TeamReputationNeutral(object oTarget,string sTeamID); //////////////////////////// // FUNCTIONS //////////////////////////// void TeamReputationFriend(object oTarget,string sTeamID) { // PURPOSE: Set the reputation of oTarget with respect to this team object oCr; int nN; object oProxy=GetObjectByTag(sTeamID+"_PROXY"); if (GetIsObjectValid(oProxy)) { // proxy found SetIsTemporaryFriend(oTarget,oProxy); SetIsTemporaryFriend(oProxy,oTarget); AdjustReputation(oTarget,oProxy,100); } // proxy found else { // error PrintString("ERROR: TeamReputationFriend: Cannot find Proxy "+sTeamID+"_PROXY"); if (GetIsPC(oTarget)) SendMessageToPC(oTarget,"ERROR: TeamReputationFriend: Cannot find Proxy "+sTeamID+"_PROXY"); } // error } // TeamReputationFriend() void TeamReputationNeutral(object oTarget,string sTeamID) { // PURPOSE: Set the reputation of oTarget with respect to this team object oCr; int nN; object oProxy=GetObjectByTag(sTeamID+"_PROXY"); if (GetIsObjectValid(oProxy)) { // proxy found if (GetIsEnemy(oProxy))AdjustReputation(oTarget,oProxy,50); else if (GetIsFriend(oProxy)) AdjustReputation(oTarget,oProxy,-50); SetIsTemporaryNeutral(oTarget,oProxy); SetIsTemporaryNeutral(oProxy,oTarget); } // proxy found else { // error PrintString("ERROR: TeamReputationNeutral: Cannot find Proxy "+sTeamID+"_PROXY"); if (GetIsPC(oTarget)) SendMessageToPC(oTarget,"ERROR: TeamReputationNeutral: Cannot find Proxy "+sTeamID+"_PROXY"); } // error } // TeamReputationNeutral() void TeamReputationEnemy(object oTarget,string sTeamID) { // PURPOSE: Set the reputation of oTarget with respect to this team object oCr; int nN; object oProxy=GetObjectByTag(sTeamID+"_PROXY"); if (GetIsObjectValid(oProxy)) { // proxy found SetIsTemporaryEnemy(oTarget,oProxy); SetIsTemporaryEnemy(oProxy,oTarget); AdjustReputation(oTarget,oProxy,-100); } // proxy found else { // error PrintString("ERROR: TeamReputationEnemy: Cannot find Proxy "+sTeamID+"_PROXY"); if (GetIsPC(oTarget)) SendMessageToPC(oTarget,"ERROR: TeamReputationEnemy: Cannot find Proxy "+sTeamID+"_PROXY"); } // error } // TeamReputationEnemy() //void main(){}