Initial upload

Initial upload.
This commit is contained in:
Jaysyn904
2023-11-14 12:09:02 -05:00
parent 657466db0c
commit 08e84b4e71
1674 changed files with 1227255 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
#include "NW_O2_CONINCLUDE"
void main()
{
// Set respawntime float to the number of seconds.
float respawntime = 1200.00;
// checks to see if it's already been opened
// ends the script if it has
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
{
return;
}
object oLastOpener = GetLastOpener();
int nOpenerLevel = GetHitDice(oLastOpener);
// this checks the opener's level
// a crappy book is spawned if over level 10
if (nOpenerLevel > 10) {
CreateItemOnObject("thestoryofxertlt");
} else {
// the quality of treasure.
// I use HighTreasure for large chests, MediumTreasure
// for small chests, and LowTreasure for barrels
GenerateHighTreasure(oLastOpener, OBJECT_SELF);
}
// a local variable is set to 1 to let the script know
// it's been opened
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
// I think this lets all monsters of its faction know
// it's been opened. I don't use it
ShoutDisturbed();
// Command added to delay the <span class="highlight">respawn</span>
AssignCommand( OBJECT_SELF, DelayCommand (respawntime, SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0) ) );
}