Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //::///////////////////////////////////////////////
- //:: This script based on:
- //:: Death Script
- //:: NW_O0_DEATH.NSS
- //:: Copyright (c) 2001 Bioware Corp.
- //:: Created By: Brent Knowles
- //:: Created On: November 6, 2001
- //:://////////////////////////////////////////////
- /*
- The concept for this script was my idea. It was a group creation
- effort in the Script Request Forum at http://nwn.bioware.com/forums/
- with a huge ammount of help from Haelix and KJ-Meric. It also would
- not have been possible for me to have any input into the proccess at all
- were it not for the wonderful people involved in the NWN Lexicon project
- at http://www.reapers.org/nwn/reference/
- */
- //This script no longer resembles much of the origional code now that I'm using
- //NWNX2 and APS to track persistant player corpses. Everything new is Copyright S. Howard 4-2004.
- //All Rights Reserved!
- //#include "aps_include"
- #include "st_inc"
- void main()
- {
- object oPC = GetLastPlayerDied() ;
- SetCutsceneMode(oPC, TRUE);
- object wprep = GetObjectByTag("DragonDefender1TrashBin001");
- object oArea = GetArea(oPC);
- int nCorpseFree;
- int nTemp;
- object oWP = GetWaypointByTag("WP_AB_Portal69");
- if(!GetIsObjectValid(oWP))
- {
- SendMessageToAllDMs("ERROR! Can't find Waypoint: WP_AB_Portal69 in The Well of Eru!");
- SpeakString("A SEVERE ERROR HAS OCCURED. NOTIFY A DM TO RESET THE SERVER AT ONCE!!!!", TALKVOLUME_SHOUT);
- }
- int nServer = GetLocalInt(oWP, "SERVER");
- if(nServer < 1)
- {
- SendMessageToAllDMs("ERROR! WP_AB_Portal69 integer isn't set!");
- WriteTimestampedLogEntry("ERROR! WP_AB_Portal69 integer isn't set!");
- SpeakString("A SEVERE ERROR HAS OCCURED. NOTIFY A DM TO RESET THE SERVER AT ONCE!!!!", TALKVOLUME_SHOUT);
- nServer = 1;
- }
- //Anti noob killer script!
- object oKiller = GetLastHostileActor(oPC);
- if(GetIsObjectValid(oKiller))
- {
- WriteTimestampedLogEntry("Checking last killer for: " +GetName(oPC));
- if(GetIsPC(oKiller) && !GetIsDM(oKiller) && !GetIsDMPossessed(oKiller) && GetLocalInt(oKiller, "PC_IS_DOMINATED") != 1)
- {
- WriteTimestampedLogEntry("Player: " +GetName(oKiller) + " killed: " + GetName(oPC));
- int nDeathHD = GetHitDice(oKiller) - GetHitDice(oPC);
- if(nDeathHD > 10)
- {
- WriteTimestampedLogEntry("Player: " +GetName(oKiller) + " killed nooblet: " + GetName(oPC));
- AssignCommand(oKiller, SpeakString("I just killed " + GetName(oPC) + " who is " +IntToString(nDeathHD) + " levels below me in " + GetName(GetArea(oKiller)) + ".", TALKVOLUME_SHOUT));
- }
- }
- }
- else
- {
- WriteTimestampedLogEntry("Invalid killer for: " + GetName(oPC));
- }
- // * make friendly to Each of the 3 common factions
- AssignCommand(oPC, ClearAllActions(TRUE)) ;
- if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPC) <= 10)
- { SetLocalInt(oPC, "NW_G_Playerhasbeenbad", 10) ; // * Player bad
- SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPC) ;
- }
- if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPC) <= 10)
- { SetLocalInt(oPC, "NW_G_Playerhasbeenbad", 10) ; // * Player bad
- SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPC) ;
- }
- if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPC) <= 10)
- { SetLocalInt(oPC, "NW_G_Playerhasbeenbad", 10) ; // * Player bad
- SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPC) ;
- }
- //Reset Dragon Defenders on death too.
- AdjustReputation(oPC, wprep, 10);
- SetPersistentInt(oPC, "DeadOnServer" +IntToString(nServer), 1, 10);
- DeleteLocalInt(oPC, "FireEleCombst");
- st_HideCheck(oPC);
- set_hide_props(oPC);
- DelayCommand(2.0, ExportSingleCharacter(oPC));
- DelayCommand(2.3, SetCutsceneMode(oPC, FALSE));
- DelayCommand(2.5, PopUpGUIPanel(oPC, GUI_PANEL_PLAYER_DEATH));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement