Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
224 lines
6.1 KiB
Plaintext
224 lines
6.1 KiB
Plaintext
//:://////////////////////////////////////////////
|
|
//:: Function - GetMaxAllowedLevel
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
Use this function to set the maximum level at which
|
|
ANY member of the party can be to generate treasure.
|
|
If ANY member of the party is higher than this, all
|
|
they will get is worn out boots.
|
|
|
|
For example, if the level cap on an area is 5, and
|
|
ANY member of a party consisting of 4,3,4,6 opens a
|
|
chest in the area, they will get boots.
|
|
|
|
Each are should have an entry in this table matching its tag.
|
|
If a match is not found the function will return 100 - but
|
|
this is not a good thing because that means anyone can
|
|
generate treasure in the area - so be careful!
|
|
|
|
IMPORTANT NOTE: You can override the area wide level
|
|
restrictions by adding an item specific statement.
|
|
This can be useful if you have a tough boss in an
|
|
otherwise weaker area. If you do assign an override,
|
|
insert the item tag into the second part of the function.
|
|
|
|
*/
|
|
|
|
int GetMaxAllowedLevel (object oCaller)
|
|
{
|
|
int iMaxAllowedLevel = GetLocalInt(GetArea(oCaller),"TBSR_AREA_MAX_LEVEL");
|
|
if(iMaxAllowedLevel == 0)
|
|
{
|
|
iMaxAllowedLevel = 100;
|
|
}
|
|
//int iMaxAllowedLevel = 100;
|
|
string sTag = GetTag (oCaller);
|
|
//string sAreaTag = GetTag(GetArea(oCaller));
|
|
// Get The Area's Default Max Level
|
|
//if (sAreaTag == "SAMPLE_1") iMaxAllowedLevel = 10;
|
|
//if (sAreaTag == "SAMPLE_2") iMaxAllowedLevel = 5;
|
|
|
|
// Set the Max Level by the object's tag instead
|
|
//if (sTag == "SAMPLE_OVERRIDE_CHEST") iMaxAllowedLevel = 15;
|
|
//if (sTag == "SAMPLE_BOSS") iMaxAllowedLevel = 15;
|
|
|
|
return iMaxAllowedLevel;
|
|
}
|
|
|
|
|
|
//:://////////////////////////////////////////////
|
|
//:: Function - GetMinimumLevel
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
Use this function to set the minimum level at which
|
|
a party member could reasonably contribute enough
|
|
to generate treasure. For example, if the party has
|
|
just tackled a CR 15 monster, chances are the level 1
|
|
guy tagging along didn't do anything to help, so he
|
|
doesn't deserve to have treasure generated for him.
|
|
|
|
Each item that generates a unique treasure should
|
|
have an entry in this table. If a match is not found
|
|
the function will return 0 - but this is not a good
|
|
thing because that means a bunch of level 1s can tag
|
|
along and generate tons of treasure.
|
|
|
|
*/
|
|
|
|
int GetMinimumLevel (object oCaller)
|
|
{
|
|
int iMinimumLevel = 0;
|
|
string sTag = GetTag (oCaller);
|
|
|
|
if (sTag == "SAMPLE_BOSS") iMinimumLevel = 3;
|
|
|
|
return iMinimumLevel;
|
|
}
|
|
|
|
|
|
//:://////////////////////////////////////////////
|
|
//:: Function - GetRespawnTime
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
This sets the respawn time for chests. It is area wide,
|
|
although you can override the respawn time on a given
|
|
chest by adding an entry based on the items tag. in the
|
|
second part of the function.
|
|
|
|
Default is an hour.
|
|
|
|
*/
|
|
|
|
|
|
float GetRespawnTime (object oCaller)
|
|
{
|
|
|
|
float fRespawnTime = 900.00;
|
|
string sTag = GetTag (oCaller);
|
|
string sAreaTag = GetTag(GetArea(oCaller));
|
|
|
|
// Add your area wide respawn times here.
|
|
|
|
if (sAreaTag == "SAMPLE_1") fRespawnTime = 60.00;
|
|
if (sAreaTag == "TestArea") fRespawnTime = 60.00;
|
|
// Set the respawn time by the object's tag instead.
|
|
|
|
if (sTag == "SAMPLE_OVERRIDE_CHEST") fRespawnTime = 10.00;
|
|
if (sTag == "SAMPLE_BOSS") fRespawnTime = 60.00;
|
|
|
|
return fRespawnTime;
|
|
}
|
|
|
|
//:://////////////////////////////////////////////
|
|
//:: Function - GetMinimumNumberOfItemsToGenerate
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
This sets the minimum number of items that a specific
|
|
boss loot will generate. In the if statement, include
|
|
a statement referencing the tag of the item containing
|
|
the loot.
|
|
|
|
Default is one item.
|
|
|
|
*/
|
|
|
|
int GetMinimumNumberOfItemsToGenerate (object oCaller)
|
|
{
|
|
int iMinimumNumberOfItemsToGenerate = 1;
|
|
string sTag = GetTag(oCaller);
|
|
|
|
if (sTag == "SAMPLE_BOSS") iMinimumNumberOfItemsToGenerate = 1;
|
|
|
|
return iMinimumNumberOfItemsToGenerate;
|
|
}
|
|
|
|
|
|
//:://////////////////////////////////////////////
|
|
//:: Function - GetMaximumNumberOfItemsToGenerate
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
This sets the maximum number of items that a specific
|
|
boss loot will generate. In the if statement, include
|
|
a statement referencing the tag of the item containing
|
|
the loot.
|
|
|
|
Default is four items.
|
|
|
|
*/
|
|
|
|
int GetMaximumNumberOfItemsToGenerate (object oCaller)
|
|
{
|
|
int iMaximumNumberOfItemsToGenerate = 4;
|
|
string sTag = GetTag(oCaller);
|
|
|
|
if (sTag == "SAMPLE_BOSS") iMaximumNumberOfItemsToGenerate = 1;
|
|
|
|
return iMaximumNumberOfItemsToGenerate;
|
|
}
|
|
|
|
|
|
|
|
|
|
//:://////////////////////////////////////////////
|
|
//:: Function - GetTotalAvailableItems
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
This function returns simply returns the number of items
|
|
available on a boss's treasure table. Default is 1.
|
|
|
|
*/
|
|
|
|
int GetTotalAvailableItems (object oCaller)
|
|
{
|
|
string sTag = GetTag (oCaller);
|
|
int iNumItems = 1;
|
|
|
|
if (sTag == "SAMPLE_BOSS") iNumItems = 10;
|
|
|
|
return iNumItems;
|
|
}
|
|
|
|
//:://////////////////////////////////////////////
|
|
//:: Function - GetUniqueItemFromList
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Function Description
|
|
|
|
This function returns the template of an item to be
|
|
generated on the list. The number of items in the switch
|
|
statment must match the number of items you specified in
|
|
GetTotalAvailableItems or it could misfire.
|
|
|
|
|
|
*** MAKE SURE YOU USE THE BLUEPRINT RESREF NOT THE TAG ***
|
|
|
|
*/
|
|
|
|
string GetUniqueItemFromList (object oCaller,int iNumber)
|
|
{
|
|
string sTag = GetTag (oCaller);
|
|
if (sTag == "SAMPLE_BOSS")
|
|
{
|
|
switch (iNumber)
|
|
{
|
|
case 1: case 2: case 3: return "commondrop1"; break;
|
|
case 4: case 5: case 6: return "commondrop2"; break;
|
|
case 7: case 8: case 9: return "commondrop3"; break;
|
|
case 10: return "raredrop"; break;
|
|
}
|
|
}
|
|
return "ERROR - NO TAG MATCH";
|
|
}
|