Code: Select all
#include "NW_I0_GENERIC"
void main()
{
int nClass = GetLevelByClass(CLASS_TYPE_COMMONER);
int nAlign = GetAlignmentGoodEvil(OBJECT_SELF);
string asshole;
object mofo;
object oThePit = GetWaypointByTag("FUCKOFFANDDIE");
location lThePit = GetLocation(oThePit);
mofo = GetLastKiller();
if(nClass > 0 && (nAlign == ALIGNMENT_GOOD || nAlign == ALIGNMENT_NEUTRAL)){
object oKiller = GetLastKiller();
AdjustAlignment(oKiller, ALIGNMENT_EVIL, 5);
}
SpeakString("NW_I_AM_DEAD", TALKVOLUME_SILENT_TALK);
SpeakString("NW_ATTACK_MY_TARGET", TALKVOLUME_SILENT_TALK);
asshole += GetName(mofo);
asshole += " has killed : ";
asshole += GetName(OBJECT_SELF);
SendMessageToAllDMs(asshole);
SendMessageToPC(mofo, "Your actions have been logged.");
PrintString("============== WARNING ==============");
WriteTimestampedLogEntry(asshole);
PrintString("=====================================");
SetLocalInt(mofo, "KilledNPCs", GetLocalInt(mofo, "KilledNPCs") + 1);
if(GetLocalInt(mofo, "KilledNPCs") > 2){
AssignCommand(mofo, JumpToLocation(lThePit));
}
}
In my module, the Player will be teleported into a pit with a big nasty thing in the commoner faction; it will kill the basterd unless he got there without killing things. Enjoy.
[Edit] It will also record the event in the logfile.