Author Sticky: Post Working Scripts Here
Randis Posted: Monday, 08 July 03:07PM
1. Ondeath/Onspawn Box Respawner
2. Places Low, Medium, or High treasure in a box based on player info, on death or spawn of a monster. Also added script to add specified items in a box Ondeath or Onspawn of a monster.
3. Works best with the Ondeath script. Radom Treasure can also add nothing to a box if setting is low (not very often) :roll
NWScript:
//-------------------------------------------

//::Ondeath/Onspawn Container Spawner      --

//::By: Randis                             --

//::Email: Hypnoticelectrons@hotmail.com   -- 

//::July 5, 2002                            --

//-------------------------------------------

//

//

//PLACE THESE IN YOUR ONDEALTH, OR ONSPAWN SCRIPTS

//

//--------Example Scrip - Puts High Treasure Item in Box After Death Or Spawn, Based on Player Info

{

#include "NW_o2_CONINCLUDE"

object oChest = GetObjectByTag("Your Container's Tag Here");

object oPlayer = GetFirstPC();

GenerateHighTreasure(oPlayer, oChest);

}

//

//--------Example Scrip - Puts Medium Treasure Item in Box After Death Or Spawn, Based on Player Info

{

#include "NW_o2_CONINCLUDE"

object oChest = GetObjectByTag("Your Container's Tag Here");

object oPlayer = GetFirstPC();

GenerateMediumTreasure(oPlayer, oChest);

}

//

//--------Example Scrip - Puts Low Treasure Item in Box After Death Or Spawn, Based on Player Info

{

#include "NW_o2_CONINCLUDE"

object oChest = GetObjectByTag("Your Container's Tag Here");

object oPlayer = GetFirstPC();

GenerateLowTreasure(oPlayer, oChest);

}

//

//--------Example Scrip - Puts High Treasure Item, And a Custom Item in Box After Death Or Spawn

{

#include "NW_o2_CONINCLUDE"

object oChest = GetObjectByTag("Your Container's Tag Here");

object oItem = CreateItemOnObject("Your Item's Tag Here", oChest);

object oPlayer = GetFirstPC();

GenerateHighTreasure(oPlayer, oChest);

}

//

//--------Example Scrip - Puts Medium Treasure Item, And a Custom Item in Box After Death Or Spawn

{

#include "NW_o2_CONINCLUDE"

object oChest = GetObjectByTag("Your Container's Tag Here");

object oItem = CreateItemOnObject("Your Item's Tag Here", oChest);

object oPlayer = GetFirstPC();

GenerateMediumTreasure(oPlayer, oChest);

}

//

//--------Example Scrip - Puts Low Treasure Item, And a Custom Item in Box After Death Or Spawn

{

#include "NW_o2_CONINCLUDE"

object oChest = GetObjectByTag("Your Container's Tag Here");

object oItem = CreateItemOnObject("Your Item's Tag Here", oChest);

object oPlayer = GetFirstPC();

GenerateLowTreasure(oPlayer, oChest);

}

//



Enjoy