//::///////////////////
//:: Lylver 2005-01-15
//:: sow_treasure_inc.nss
//:: refonte avec variables
/* NOTES :
Positionner la variable DELAI en heures , par defaut : 24 heures
Positionner la variable TYPE_TRESOR comme suit
#######
prefixe du script :
x0_o2_ = 0
nw_o2_ = 100
#######
type :
#######
any = 0
arm = 10
book = 20
clth = 30
gold = 40
mlee = 50
noam = 60
potn = 70
rang = 80
weap = 90
class = 100
general = 110
#######
suffixe :
low = 1
med = 2
high = 3
uniq = 4
weap = 5
shelf = 6
*/
//::///////////////////////////////////////////////
//:: Name tp_tb_i0_reinv
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Include Script for treasure respawn.
ResRef of the items in the inventory and Respawn delay is stored on the first
opening of the container. Later usage of the container will check if the time
for respawning the inventory is reached. Then all items in the container will
be destroyed and the original items will be created.
*/
//:://////////////////////////////////////////////
//:: Created By: Thomas Buckermann (tabu_niw@freenet.de)
//:: with a big help from fendis_khan who solved the
//:: timing problem.
//:://////////////////////////////////////////////
#include "x2_inc_switches"
#include "x0_i0_treasure"
//**************************************************
//Function Declaration
//init Respawn function, called only once
//object oContainer = the container which inventory should respawn, default is the calling object
//int iTime = intervall between respawn in hours, default is 1 hour
void InitTreasureRespawn(object oContainer = OBJECT_SELF, int iTime = 1);
//check if respawn time is reached, if true destroy inventory amd respawn items
void TreasureRespawn(object oContainer = OBJECT_SELF);
//The actual CreateObject Function.
void CreateTreasure(object oContainer = OBJECT_SELF);
//Bioware
void CreateBioware(object oContainer = OBJECT_SELF);
//***************************************************
//Function implementation
void InitTreasureRespawn(object oContainer = OBJECT_SELF, int iTime = 1)
{
if (GetLocalInt(oContainer, "TP_INIT_RESPAWN") == TRUE)
return;
int iItemCount = 0;
string sItemResRef = "";
//Count all objects in oContainer and store their ResRef
object oItem = GetFirstItemInInventory(oContainer);
int iStackSize = GetNumStackedItems(oItem);
while (oItem != OBJECT_INVALID)
{
iItemCount ++;
sItemResRef = GetResRef(oItem);
SetLocalString(oContainer, "sItemResRef"+IntToString(iItemCount), sItemResRef);
SetLocalInt(oContainer, "iStackSize"+IntToString(iItemCount), iStackSize);
oItem = GetNextItemInInventory(oContainer);
iStackSize = GetNumStackedItems(oItem);
}
SetLocalInt(oContainer, "iItemCount", iItemCount);
//Set Respawn Time
int iReHour = GetTimeHour() + iTime;
int iReDay = GetCalendarDay();
int iReMonth = GetCalendarMonth();
int iReYear = GetCalendarYear();
while (iReHour > 23)
{
iReHour = iReHour - 24;
iReDay ++;
if (iReDay > 28)
{
iReDay = iReDay - 28;
iReMonth ++;
if (iReMonth > 12)
{
iReMonth = iReMonth -12;
iReYear ++;
}
}
}
SetLocalInt(oContainer, "iRespawnDelay", iTime);
SetLocalInt(oContainer, "iReHour", iReHour);
SetLocalInt(oContainer, "iReDay", iReDay);
SetLocalInt(oContainer, "iReMonth", iReMonth);
SetLocalInt(oContainer, "iReYear", iReYear);
SetLocalInt(oContainer, "TP_INIT_RESPAWN", TRUE);
// Initialisation de la partie aleatoire
CreateBioware(oContainer) ;
}
void TreasureRespawn(object oContainer = OBJECT_SELF)
{
//check if InitTreasureRespawn() function has already been executed.
//If not, abort script.
if (GetLocalInt(oContainer, "TP_INIT_RESPAWN") == FALSE)
return;
object oItem;
int iReYear = GetLocalInt(oContainer, "iReYear");
int iReMonth = GetLocalInt(oContainer, "iReMonth");
int iReDay = GetLocalInt(oContainer, "iReDay");
int iReHour = GetLocalInt(oContainer, "iReHour");
// iTotalReTime is the respawn "combined" date in hours
int iTotalReTime = (iReYear*(12*28*24))+(iReMonth*(28*24))+(iReDay*24)+ iReHour;
// iTotalNowTime is the current "combined" date in hours
int iTotalNowTime = (GetCalendarYear()*(12*28*24))+(GetCalendarMonth()*(28*24))+(GetCalendarDay()*24) + GetTimeHour();
//check for respawn time
if (iTotalReTime > iTotalNowTime)
return;
//Set Respawn Time
int iTime = GetLocalInt(oContainer, "iRespawnDelay");
iReHour = GetTimeHour() + iTime;
iReDay = GetCalendarDay();
iReMonth = GetCalendarMonth();
iReYear = GetCalendarYear();
if (iReHour > 24)
{
iReHour = iReHour - 24;
iReDay ++;
if (iReDay > 28)
{
iReDay = iReDay - 28;
iReMonth ++;
if (iReMonth > 12)
{
iReMonth = iReMonth -12;
iReYear ++;
}
}
}
SetLocalInt(oContainer, "iRespawnDelay", iTime);
SetLocalInt(oContainer, "iReHour", iReHour);
SetLocalInt(oContainer, "iReDay", iReDay);
SetLocalInt(oContainer, "iReMonth", iReMonth);
SetLocalInt(oContainer, "iReYear", iReYear);
//destroy current inventory
oItem = GetFirstItemInInventory(oContainer);
while (oItem != OBJECT_INVALID)
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oContainer);
}
// Regenere la partie aleatoire
CreateBioware(oContainer);
//create inventory
//Because of timing problems this had to be moved to
//its own function and delayed for 0.2 seconds.
//Thanks to fendis_khan.
DelayCommand(0.2, CreateTreasure(oContainer));
}
void CreateTreasure(object oContainer = OBJECT_SELF)
{
int iItemCount = GetLocalInt(oContainer, "iItemCount");
string sItemResRef;
int iStackSize;
int x; //generic counter
for (x = 1; x < (iItemCount+1); x++)
{
sItemResRef = GetLocalString(oContainer, "sItemResRef" + IntToString(x));
iStackSize = GetLocalInt(oContainer, "iStackSize" + IntToString(x));
object oItem = CreateItemOnObject(sItemResRef, oContainer, iStackSize);
if (oItem == OBJECT_INVALID)
{
//+++++++++++Debug Message+++++++++++\\
PrintString("!! Failed to create item nr " + IntToString(x) + " with ResRef " + sItemResRef + " on container " + GetTag(oContainer) + " in Area " + GetTag(GetArea(oContainer)) + "!!");
//+++++++++++++++++++++++++++++++++++\\
}
else WriteTimestampedLogEntry("Creation d'un objet n0 "+ IntToString(x) + " de ResRef " + sItemResRef + " dans coffre/caisse/tonneau " + GetTag(oContainer) + " dans zone " + GetTag(GetArea(oContainer)) + ".") ;
}
}
void CreateBioware(object oContainer = OBJECT_SELF) {
// Initialisation de la partie aleatoire
int iTresor = GetItemFlag(oContainer, "TYPE_TRESOR") ;
CTG_SetIsTreasureGenerated(oContainer, FALSE) ;
switch (iTresor) {
case 0: break ;
case 1: { CTG_CreateTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer); break ; }
case 2: { CTG_CreateTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer); break ; }
case 3: { CTG_CreateTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer); break ; }
case 4: { CTG_CreateTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer); break ; }
case 11: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 12: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 13: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 14: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 21: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 22: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 23: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 24: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 31: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 32: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 33: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 34: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 41: { CTG_CreateGoldTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer); break ; }
case 42: { CTG_CreateGoldTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer); break ; }
case 43: { CTG_CreateGoldTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer); break ; }
case 51: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 52: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 53: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 54: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 61: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 62: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 63: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 64: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 71: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 72: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 73: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 74: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 81: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 82: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 83: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 84: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 91: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 92: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 93: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 94: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 111: { GenerateLowTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 112: { GenerateMediumTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 113: { GenerateHighTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 117: { GenerateMediumTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 101: { GenerateLowTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 102: { GenerateMediumTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 103: { GenerateHighTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 105: { ExecuteScript("nw_o2_classweap", oContainer) ; break ; }
case 26: { GenerateBookTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
default: break ;
}
CTG_SetIsTreasureGenerated(oContainer, TRUE) ;
}
// void main() {}
//:: Lylver 2005-01-15
//:: sow_treasure_inc.nss
//:: refonte avec variables
/* NOTES :
Positionner la variable DELAI en heures , par defaut : 24 heures
Positionner la variable TYPE_TRESOR comme suit
#######
prefixe du script :
x0_o2_ = 0
nw_o2_ = 100
#######
type :
#######
any = 0
arm = 10
book = 20
clth = 30
gold = 40
mlee = 50
noam = 60
potn = 70
rang = 80
weap = 90
class = 100
general = 110
#######
suffixe :
low = 1
med = 2
high = 3
uniq = 4
weap = 5
shelf = 6
*/
//::///////////////////////////////////////////////
//:: Name tp_tb_i0_reinv
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Include Script for treasure respawn.
ResRef of the items in the inventory and Respawn delay is stored on the first
opening of the container. Later usage of the container will check if the time
for respawning the inventory is reached. Then all items in the container will
be destroyed and the original items will be created.
*/
//:://////////////////////////////////////////////
//:: Created By: Thomas Buckermann (tabu_niw@freenet.de)
//:: with a big help from fendis_khan who solved the
//:: timing problem.
//:://////////////////////////////////////////////
#include "x2_inc_switches"
#include "x0_i0_treasure"
//**************************************************
//Function Declaration
//init Respawn function, called only once
//object oContainer = the container which inventory should respawn, default is the calling object
//int iTime = intervall between respawn in hours, default is 1 hour
void InitTreasureRespawn(object oContainer = OBJECT_SELF, int iTime = 1);
//check if respawn time is reached, if true destroy inventory amd respawn items
void TreasureRespawn(object oContainer = OBJECT_SELF);
//The actual CreateObject Function.
void CreateTreasure(object oContainer = OBJECT_SELF);
//Bioware
void CreateBioware(object oContainer = OBJECT_SELF);
//***************************************************
//Function implementation
void InitTreasureRespawn(object oContainer = OBJECT_SELF, int iTime = 1)
{
if (GetLocalInt(oContainer, "TP_INIT_RESPAWN") == TRUE)
return;
int iItemCount = 0;
string sItemResRef = "";
//Count all objects in oContainer and store their ResRef
object oItem = GetFirstItemInInventory(oContainer);
int iStackSize = GetNumStackedItems(oItem);
while (oItem != OBJECT_INVALID)
{
iItemCount ++;
sItemResRef = GetResRef(oItem);
SetLocalString(oContainer, "sItemResRef"+IntToString(iItemCount), sItemResRef);
SetLocalInt(oContainer, "iStackSize"+IntToString(iItemCount), iStackSize);
oItem = GetNextItemInInventory(oContainer);
iStackSize = GetNumStackedItems(oItem);
}
SetLocalInt(oContainer, "iItemCount", iItemCount);
//Set Respawn Time
int iReHour = GetTimeHour() + iTime;
int iReDay = GetCalendarDay();
int iReMonth = GetCalendarMonth();
int iReYear = GetCalendarYear();
while (iReHour > 23)
{
iReHour = iReHour - 24;
iReDay ++;
if (iReDay > 28)
{
iReDay = iReDay - 28;
iReMonth ++;
if (iReMonth > 12)
{
iReMonth = iReMonth -12;
iReYear ++;
}
}
}
SetLocalInt(oContainer, "iRespawnDelay", iTime);
SetLocalInt(oContainer, "iReHour", iReHour);
SetLocalInt(oContainer, "iReDay", iReDay);
SetLocalInt(oContainer, "iReMonth", iReMonth);
SetLocalInt(oContainer, "iReYear", iReYear);
SetLocalInt(oContainer, "TP_INIT_RESPAWN", TRUE);
// Initialisation de la partie aleatoire
CreateBioware(oContainer) ;
}
void TreasureRespawn(object oContainer = OBJECT_SELF)
{
//check if InitTreasureRespawn() function has already been executed.
//If not, abort script.
if (GetLocalInt(oContainer, "TP_INIT_RESPAWN") == FALSE)
return;
object oItem;
int iReYear = GetLocalInt(oContainer, "iReYear");
int iReMonth = GetLocalInt(oContainer, "iReMonth");
int iReDay = GetLocalInt(oContainer, "iReDay");
int iReHour = GetLocalInt(oContainer, "iReHour");
// iTotalReTime is the respawn "combined" date in hours
int iTotalReTime = (iReYear*(12*28*24))+(iReMonth*(28*24))+(iReDay*24)+ iReHour;
// iTotalNowTime is the current "combined" date in hours
int iTotalNowTime = (GetCalendarYear()*(12*28*24))+(GetCalendarMonth()*(28*24))+(GetCalendarDay()*24) + GetTimeHour();
//check for respawn time
if (iTotalReTime > iTotalNowTime)
return;
//Set Respawn Time
int iTime = GetLocalInt(oContainer, "iRespawnDelay");
iReHour = GetTimeHour() + iTime;
iReDay = GetCalendarDay();
iReMonth = GetCalendarMonth();
iReYear = GetCalendarYear();
if (iReHour > 24)
{
iReHour = iReHour - 24;
iReDay ++;
if (iReDay > 28)
{
iReDay = iReDay - 28;
iReMonth ++;
if (iReMonth > 12)
{
iReMonth = iReMonth -12;
iReYear ++;
}
}
}
SetLocalInt(oContainer, "iRespawnDelay", iTime);
SetLocalInt(oContainer, "iReHour", iReHour);
SetLocalInt(oContainer, "iReDay", iReDay);
SetLocalInt(oContainer, "iReMonth", iReMonth);
SetLocalInt(oContainer, "iReYear", iReYear);
//destroy current inventory
oItem = GetFirstItemInInventory(oContainer);
while (oItem != OBJECT_INVALID)
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oContainer);
}
// Regenere la partie aleatoire
CreateBioware(oContainer);
//create inventory
//Because of timing problems this had to be moved to
//its own function and delayed for 0.2 seconds.
//Thanks to fendis_khan.
DelayCommand(0.2, CreateTreasure(oContainer));
}
void CreateTreasure(object oContainer = OBJECT_SELF)
{
int iItemCount = GetLocalInt(oContainer, "iItemCount");
string sItemResRef;
int iStackSize;
int x; //generic counter
for (x = 1; x < (iItemCount+1); x++)
{
sItemResRef = GetLocalString(oContainer, "sItemResRef" + IntToString(x));
iStackSize = GetLocalInt(oContainer, "iStackSize" + IntToString(x));
object oItem = CreateItemOnObject(sItemResRef, oContainer, iStackSize);
if (oItem == OBJECT_INVALID)
{
//+++++++++++Debug Message+++++++++++\\
PrintString("!! Failed to create item nr " + IntToString(x) + " with ResRef " + sItemResRef + " on container " + GetTag(oContainer) + " in Area " + GetTag(GetArea(oContainer)) + "!!");
//+++++++++++++++++++++++++++++++++++\\
}
else WriteTimestampedLogEntry("Creation d'un objet n0 "+ IntToString(x) + " de ResRef " + sItemResRef + " dans coffre/caisse/tonneau " + GetTag(oContainer) + " dans zone " + GetTag(GetArea(oContainer)) + ".") ;
}
}
void CreateBioware(object oContainer = OBJECT_SELF) {
// Initialisation de la partie aleatoire
int iTresor = GetItemFlag(oContainer, "TYPE_TRESOR") ;
CTG_SetIsTreasureGenerated(oContainer, FALSE) ;
switch (iTresor) {
case 0: break ;
case 1: { CTG_CreateTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer); break ; }
case 2: { CTG_CreateTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer); break ; }
case 3: { CTG_CreateTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer); break ; }
case 4: { CTG_CreateTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer); break ; }
case 11: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 12: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 13: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 14: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_ARMOR); break ; }
case 21: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 22: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 23: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 24: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, BASE_ITEM_BOOK, BASE_ITEM_SPELLSCROLL); break ; }
case 31: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 32: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 33: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 34: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_CLOTHING); break ; }
case 41: { CTG_CreateGoldTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer); break ; }
case 42: { CTG_CreateGoldTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer); break ; }
case 43: { CTG_CreateGoldTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer); break ; }
case 51: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 52: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 53: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 54: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_MELEE); break ; }
case 61: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 62: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 63: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 64: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_NOAMMO); break ; }
case 71: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 72: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 73: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 74: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, BASE_ITEM_POTIONS); break ; }
case 81: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 82: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 83: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 84: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON_RANGED); break ; }
case 91: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_LOW, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 92: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_MED, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 93: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_HIGH, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 94: { CTG_CreateSpecificBaseTypeTreasure(TREASURE_TYPE_UNIQUE, GetLastOpener(), oContainer, TREASURE_BASE_TYPE_WEAPON); break ; }
case 111: { GenerateLowTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 112: { GenerateMediumTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 113: { GenerateHighTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 117: { GenerateMediumTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 101: { GenerateLowTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 102: { GenerateMediumTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 103: { GenerateHighTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
case 105: { ExecuteScript("nw_o2_classweap", oContainer) ; break ; }
case 26: { GenerateBookTreasure(GetLastOpener(), oContainer); ShoutDisturbed() ; break ; }
default: break ;
}
CTG_SetIsTreasureGenerated(oContainer, TRUE) ;
}
// void main() {}