Advertisement
Guest User

Untitled

a guest
May 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. //::///////////////////////////////////////////////
  2. //:: This script based on:
  3. //:: Death Script
  4. //:: NW_O0_DEATH.NSS
  5. //:: Copyright (c) 2001 Bioware Corp.
  6. //:: Created By: Brent Knowles
  7. //:: Created On: November 6, 2001
  8. //:://////////////////////////////////////////////
  9. /*
  10. The concept for this script was my idea. It was a group creation
  11. effort in the Script Request Forum at http://nwn.bioware.com/forums/
  12. with a huge ammount of help from Haelix and KJ-Meric. It also would
  13. not have been possible for me to have any input into the proccess at all
  14. were it not for the wonderful people involved in the NWN Lexicon project
  15. at http://www.reapers.org/nwn/reference/
  16. */
  17.  
  18. //This script no longer resembles much of the origional code now that I'm using
  19. //NWNX2 and APS to track persistant player corpses. Everything new is Copyright S. Howard 4-2004.
  20. //All Rights Reserved!
  21.  
  22. //#include "aps_include"
  23. #include "st_inc"
  24.  
  25. void main()
  26. {
  27. object oPC = GetLastPlayerDied() ;
  28. SetCutsceneMode(oPC, TRUE);
  29.  
  30. object wprep = GetObjectByTag("DragonDefender1TrashBin001");
  31. object oArea = GetArea(oPC);
  32. int nCorpseFree;
  33. int nTemp;
  34.  
  35. object oWP = GetWaypointByTag("WP_AB_Portal69");
  36.  
  37. if(!GetIsObjectValid(oWP))
  38. {
  39. SendMessageToAllDMs("ERROR! Can't find Waypoint: WP_AB_Portal69 in The Well of Eru!");
  40. SpeakString("A SEVERE ERROR HAS OCCURED. NOTIFY A DM TO RESET THE SERVER AT ONCE!!!!", TALKVOLUME_SHOUT);
  41. }
  42.  
  43. int nServer = GetLocalInt(oWP, "SERVER");
  44.  
  45. if(nServer < 1)
  46. {
  47. SendMessageToAllDMs("ERROR! WP_AB_Portal69 integer isn't set!");
  48. WriteTimestampedLogEntry("ERROR! WP_AB_Portal69 integer isn't set!");
  49. SpeakString("A SEVERE ERROR HAS OCCURED. NOTIFY A DM TO RESET THE SERVER AT ONCE!!!!", TALKVOLUME_SHOUT);
  50. nServer = 1;
  51. }
  52.  
  53. //Anti noob killer script!
  54. object oKiller = GetLastHostileActor(oPC);
  55. if(GetIsObjectValid(oKiller))
  56. {
  57. WriteTimestampedLogEntry("Checking last killer for: " +GetName(oPC));
  58. if(GetIsPC(oKiller) && !GetIsDM(oKiller) && !GetIsDMPossessed(oKiller) && GetLocalInt(oKiller, "PC_IS_DOMINATED") != 1)
  59. {
  60. WriteTimestampedLogEntry("Player: " +GetName(oKiller) + " killed: " + GetName(oPC));
  61. int nDeathHD = GetHitDice(oKiller) - GetHitDice(oPC);
  62. if(nDeathHD > 10)
  63. {
  64. WriteTimestampedLogEntry("Player: " +GetName(oKiller) + " killed nooblet: " + GetName(oPC));
  65. AssignCommand(oKiller, SpeakString("I just killed " + GetName(oPC) + " who is " +IntToString(nDeathHD) + " levels below me in " + GetName(GetArea(oKiller)) + ".", TALKVOLUME_SHOUT));
  66. }
  67. }
  68. }
  69. else
  70. {
  71. WriteTimestampedLogEntry("Invalid killer for: " + GetName(oPC));
  72. }
  73.  
  74. // * make friendly to Each of the 3 common factions
  75. AssignCommand(oPC, ClearAllActions(TRUE)) ;
  76.  
  77. if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPC) <= 10)
  78. { SetLocalInt(oPC, "NW_G_Playerhasbeenbad", 10) ; // * Player bad
  79. SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPC) ;
  80. }
  81. if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPC) <= 10)
  82. { SetLocalInt(oPC, "NW_G_Playerhasbeenbad", 10) ; // * Player bad
  83. SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPC) ;
  84. }
  85. if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPC) <= 10)
  86. { SetLocalInt(oPC, "NW_G_Playerhasbeenbad", 10) ; // * Player bad
  87. SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPC) ;
  88. }
  89. //Reset Dragon Defenders on death too.
  90. AdjustReputation(oPC, wprep, 10);
  91.  
  92. SetPersistentInt(oPC, "DeadOnServer" +IntToString(nServer), 1, 10);
  93. DeleteLocalInt(oPC, "FireEleCombst");
  94.  
  95. st_HideCheck(oPC);
  96. set_hide_props(oPC);
  97.  
  98. DelayCommand(2.0, ExportSingleCharacter(oPC));
  99. DelayCommand(2.3, SetCutsceneMode(oPC, FALSE));
  100. DelayCommand(2.5, PopUpGUIPanel(oPC, GUI_PANEL_PLAYER_DEATH));
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement