Kick people to a pit of death after killing x NPC's

Moderator: Event DM

Post Reply
User avatar
Neve
Prince of Bloated Discourse
Posts: 192
Joined: Mon Apr 14, 2003 4:09 pm
Location: The Netherlands
Contact:

Kick people to a pit of death after killing x NPC's

Post by Neve » Sun Jul 06, 2003 5:41 pm

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));
    }
}
All you need to do is to make a pit with a waypoint tagged "FUCKOFFANDDIE". That will be the place the player will teleport to when he killed 3 NPC's. He will receive a warning after every kill, and DM's will receive a message who killed which NPC.
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.
- As you gaze unknowingly into the seemingly infinite depths of the optics of this altogether passionate embodiment of insatiability, you experience a gradual realisation that the heavily-embellished vocabulary scattered lavishly throughout the sentence you are currently reading is indisputably nothing greater than a generous ration of masculine bovine faeces.
Post Reply