Initial commit
Initial commit [1.18]
This commit is contained in:
28
_module/nss/sc_ill_treas_spb.nss
Normal file
28
_module/nss/sc_ill_treas_spb.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
//Creates a Book of Knowledge in the target's inventory once every 10 mins
|
||||
void main()
|
||||
{
|
||||
object oItem = OBJECT_INVALID;
|
||||
// Clear all contents of the <span class="highlight">chest</span>
|
||||
oItem = GetFirstItemInInventory();
|
||||
while ( oItem != OBJECT_INVALID )
|
||||
{
|
||||
//Make sure people don't stuff <span class="highlight">chest</span> with plot items and break it
|
||||
SetPlotFlag(oItem, FALSE);
|
||||
DestroyObject( oItem, 0.0 );
|
||||
oItem = GetNextItemInInventory();
|
||||
}
|
||||
// Set respawntime float to the number of seconds.
|
||||
float respawntime = 600.00;
|
||||
if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") != 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateItemOnObject("sha_illthd_qbook", OBJECT_SELF, 1);
|
||||
}
|
||||
SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1);
|
||||
// Command added to delay the <span class="highlight">respawn</span>
|
||||
AssignCommand( OBJECT_SELF, DelayCommand (respawntime, SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0) ) );
|
||||
}
|
||||
Reference in New Issue
Block a user