Initial Commit

Initial Commit.
This commit is contained in:
Jaysyn904
2025-09-14 15:40:46 -04:00
parent 7083b33d71
commit 1eefc84201
19230 changed files with 11539227 additions and 0 deletions

53
_module/nss/s_genloot.nss Normal file
View File

@@ -0,0 +1,53 @@
/*
s_genloot - generate loot
*/
#include "X_O2_CONINCLUDE"
void main()
{
int bDestroyed = (GetCurrentHitPoints() <= 0);
if (GetIsRefillReady()) {
int iTreasureTable = GetTreasureTable();
object oLastOpener = GetLastOpener();
if (iTreasureTable != TREASURE_BOSS) {
GenerateTreasure(iTreasureTable, oLastOpener, OBJECT_SELF);
} else {
object oMember = GetFirstFactionMember(oLastOpener, TRUE);
while (GetIsObjectValid(oMember) == TRUE) {
GenerateTreasure(TREASURE_BOSS, oMember, OBJECT_SELF);
oMember = GetNextFactionMember(oLastOpener, TRUE);
}
}
ShoutDisturbed();
if (!bDestroyed) {
SetLocalInt(OBJECT_SELF, GT_REFILL_NOT_READY, TRUE);
if (GetIsRefillable())
DelayCommand(GetRefillDelay(), SetLocalInt(OBJECT_SELF, GT_REFILL_NOT_READY, FALSE));
}
}
if (bDestroyed && GetIsRespawnable()) {
SetLocalFloat(OBJECT_SELF, "RESPAWN_DELAY", GetRespawnDelay());
ExecuteScript("s_respawnself", OBJECT_SELF);
}
}