Rune_PRC8/_module/nss/opw_kill_counter.nss

32 lines
901 B
Plaintext
Raw Permalink Normal View History

2024-09-13 09:10:39 -04:00
////////////////////////////////////////////////////////////////////////////////
//
// Olander's Player and NPC Kill Counter
// opw_kill_counter
// By:Don Anderson
// dandersonru@msn.com
//
// This is called from the Rest Menu
//
////////////////////////////////////////////////////////////////////////////////
#include "nbde_inc"
void main()
{
object oPC = GetPCSpeaker();
string sNPCS = "";
string sPCS = "";
int nNPCKills = NBDE_GetCampaignInt("KILLS","NPC",oPC);
int nPCKills = NBDE_GetCampaignInt("KILLS","PC",oPC);
if(nNPCKills > 0) sNPCS = "s";
if(nNPCKills > 0) sPCS = "s";
string sNPC = "I have has killed " +IntToString(nNPCKills)+ " creature" +sNPCS+".";
string sPC = "I have has killed " +IntToString(nPCKills)+ " player" +sPCS+".";
AssignCommand(oPC, SpeakString(sNPC));
AssignCommand(oPC, DelayCommand(3.0,SpeakString(sPC)));
}