Changed folder name.
Changed folder name.
This commit is contained in:
40
_module/nss/x_o2_preset.nss
Normal file
40
_module/nss/x_o2_preset.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "X_O2_CONINCLUDE"
|
||||
#include "GSLOOT_LIB"
|
||||
|
||||
// Modified by AW Olorin 1-12-2004
|
||||
// Anti-GS Looting
|
||||
|
||||
void RespawnObject(string sTag, int iType, location lLoc) {
|
||||
|
||||
// ResRef must be derivable from Tag
|
||||
string sResRef = GetStringLowerCase(GetStringLeft(sTag, 16));
|
||||
|
||||
CreateObject(iType, sResRef, lLoc);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
SetPlotFlag(OBJECT_SELF, FALSE);
|
||||
float fDelay2 = 0.0;
|
||||
DestroyObject(OBJECT_SELF, fDelay2);
|
||||
string sTag = GetTag(OBJECT_SELF);
|
||||
int iType = GetObjectType(OBJECT_SELF);
|
||||
object oLastOpener = GetLastOpener();
|
||||
|
||||
// For creatures, save the location at spawn-time as a local location and
|
||||
// use it instead. Otherwise, the creature will respawn where it died.
|
||||
location lLoc = GetLocation(OBJECT_SELF);
|
||||
if(GS_Check(oLastOpener,1))
|
||||
{
|
||||
RogueSpectreSpawn(oLastOpener);
|
||||
DropNote(lLoc);
|
||||
DestroyInventory(OBJECT_SELF);
|
||||
}
|
||||
float fDelay = 1800.0; // 1000 second delay
|
||||
|
||||
AssignCommand(GetArea(OBJECT_SELF), DelayCommand(fDelay, RespawnObject(sTag, iType, lLoc)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user