Added Skullkeep's PRC8 compatible dynamic loot generation system. Full compile. Updated release archive.
139 lines
3.5 KiB
Plaintext
139 lines
3.5 KiB
Plaintext
//////////////////////////////////////////////////////////
|
||
//::use: #include"sd_reset_inc"
|
||
//::
|
||
//::
|
||
//:: Slayers of Darkmoon
|
||
//:: Dungeon Resetting Toolkit
|
||
//::
|
||
//::
|
||
//:: Commche 2014
|
||
//::
|
||
|
||
const string COLORTOKEN = " ##################$%&'()*+,-./0123456789:;;==?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[[]^_`abcdefghijklmnopqrstuvwxyz{|}~~<7E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ■ぅΗ┤<CE97><E294A4><EFBFBD>葦桶患況弦沙悉梢請唾津毒班碧麺力佰厶壞嶐慵无槿渤珀矣粤肄蓍裨跋鈿韵鴦<E99FB5><E9B4A6><EFBFBD>凞'<EFA895>";
|
||
string ColorString(string sText, int nRed=255, int nGreen=255, int nBlue=255)
|
||
{
|
||
return "<c" + GetSubString(COLORTOKEN, nRed, 1) + GetSubString(COLORTOKEN, nGreen, 1) + GetSubString(COLORTOKEN, nBlue, 1) + ">" + sText + "</c>";
|
||
}
|
||
|
||
|
||
int GetIsEmpty() // empty chest check routine
|
||
{
|
||
int iCount;
|
||
object oItem = GetFirstItemInInventory();
|
||
while (GetIsObjectValid(oItem))
|
||
{
|
||
++iCount;
|
||
oItem = GetNextItemInInventory();
|
||
}
|
||
if (iCount==0)return TRUE;
|
||
|
||
return FALSE;
|
||
}
|
||
|
||
|
||
void SD_PURGE(string sCont, int iName = 0)
|
||
{
|
||
int iCount;
|
||
|
||
object oItem;
|
||
object oArea = OBJECT_SELF;
|
||
object oCont = GetFirstObjectInArea(oArea);
|
||
while (GetIsObjectValid(oCont))
|
||
{
|
||
if (iName==1)
|
||
{
|
||
if (GetName(oCont)=="Remains")
|
||
{
|
||
oItem = GetFirstItemInInventory(oCont);
|
||
while (GetIsObjectValid(oItem))
|
||
{
|
||
DestroyObject(oItem);
|
||
oItem = GetNextItemInInventory(oCont);
|
||
}
|
||
DestroyObject(oCont);
|
||
}
|
||
oCont = GetNextObjectInArea(oArea);
|
||
}
|
||
else
|
||
{
|
||
if (GetTag(oCont)==sCont)
|
||
{
|
||
oItem = GetFirstItemInInventory(oCont);
|
||
while (GetIsObjectValid(oItem))
|
||
{
|
||
DestroyObject(oItem);
|
||
oItem = GetNextItemInInventory(oCont);
|
||
}
|
||
DestroyObject(oCont);
|
||
}
|
||
oCont = GetNextObjectInArea(oArea);
|
||
}
|
||
}
|
||
}
|
||
|
||
void SD_DESTROY(string sTag)
|
||
{
|
||
object oArea = OBJECT_SELF;
|
||
object oPlc = GetFirstObjectInArea(oArea);
|
||
while (GetIsObjectValid(oPlc))
|
||
{
|
||
if (GetTag(oPlc)==sTag)
|
||
{
|
||
DestroyObject(oPlc);
|
||
}
|
||
oPlc =GetNextObjectInArea(oArea);
|
||
}
|
||
}
|
||
|
||
|
||
void SD_CLEAN(object oPC)
|
||
{
|
||
object oItem;
|
||
object oArea = OBJECT_SELF;
|
||
object oCont = GetFirstObjectInArea(oArea);
|
||
while (GetIsObjectValid(oCont))
|
||
{
|
||
if (GetObjectType(oCont)==OBJECT_TYPE_CREATURE)
|
||
{
|
||
if (GetIsEnemy(oCont, oPC))
|
||
{
|
||
AssignCommand(oCont, SetIsDestroyable(TRUE));
|
||
DestroyObject(oCont);
|
||
}
|
||
}
|
||
|
||
if (GetTag(oCont)=="Bloodstain")DestroyObject(oCont);
|
||
|
||
oCont = GetNextObjectInArea(oArea);
|
||
}
|
||
}
|
||
|
||
void AREA_CLEAR(object oPC)
|
||
{
|
||
|
||
effect eDeath = EffectDeath(TRUE);
|
||
|
||
object oMob, oArea, oTrig;
|
||
oArea = GetArea(OBJECT_SELF);
|
||
oMob = GetFirstObjectInArea(oArea);
|
||
while (GetIsObjectValid(oMob))
|
||
{
|
||
if (GetObjectType(oMob)== OBJECT_TYPE_CREATURE)
|
||
{
|
||
if (GetIsEnemy(oMob, oPC) && GetIsDead(oMob)==FALSE)
|
||
{
|
||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oMob);
|
||
AssignCommand(oMob, SetIsDestroyable(TRUE));
|
||
DestroyObject(oMob, 60.0);
|
||
}
|
||
}
|
||
oMob = GetNextObjectInArea(oArea);
|
||
}
|
||
|
||
SD_PURGE("rr_sack");
|
||
SD_CLEAN(oPC);
|
||
}
|
||
|
||
|
||
//void main() {}
|