Removed Skullkeep Forge
Removed Skullkeep Forge system (originally by Winterknight and Asbury) Full compile. Updated release archive.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "inc_debug"
|
||||
#include "prc_inc_racial"
|
||||
#include "sd_lootsystem"
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void ReallyEquipItemInSlot(object oNPC, object oItem, int nSlot);
|
||||
|
||||
@@ -35,7 +36,9 @@ void main()
|
||||
int nTotalPCLevel;
|
||||
int nAveragePCLevel;
|
||||
int iRacial = GetRacialType(OBJECT_SELF);
|
||||
int nCommoner = GetLevelByClass(CLASS_TYPE_COMMONER, OBJECT_SELF);
|
||||
int nCommoner = GetLevelByClass(CLASS_TYPE_COMMONER, OBJECT_SELF);
|
||||
int nInt = GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE);
|
||||
int nGhost = GetIsIncorporeal(OBJECT_SELF);
|
||||
|
||||
string sCurrentDate = SQLite_GetSystemDate();
|
||||
string sMonthDay = GetSubString(sCurrentDate, 0, 5);
|
||||
@@ -43,20 +46,36 @@ void main()
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
object oSkelly;
|
||||
object oPC = GetFirstObjectInArea(oArea);
|
||||
|
||||
//:: Set threatlevel name text
|
||||
SetThreatLevel(OBJECT_SELF);
|
||||
|
||||
//:: Testing OnSpawn loot system.
|
||||
|
||||
//:: Check if the creature is an animal, beast, construct, or ooze, which should never carry treasure
|
||||
if (iRacial == RACIAL_TYPE_ANIMAL ||
|
||||
iRacial == RACIAL_TYPE_BEAST ||
|
||||
iRacial == RACIAL_TYPE_CONSTRUCT ||
|
||||
iRacial == RACIAL_TYPE_OOZE ||
|
||||
iRacial == RACIAL_TYPE_PLANT ||
|
||||
iRacial == RACIAL_TYPE_VERMIN)
|
||||
iRacial == RACIAL_TYPE_OOZE)
|
||||
{
|
||||
if(DEBUG) {FloatingTextStringOnCreature("Creature doesn't carry treasure", GetFirstPC(), FALSE);}
|
||||
if (DEBUG) { FloatingTextStringOnCreature("Creature doesn't carry treasure", GetFirstPC(), FALSE); }
|
||||
}
|
||||
else if ((iRacial == RACIAL_TYPE_UNDEAD ||
|
||||
iRacial == RACIAL_TYPE_PLANT ||
|
||||
iRacial == RACIAL_TYPE_VERMIN) &&
|
||||
nInt <= 4)
|
||||
{
|
||||
//:: If the creature is undead, plant, or vermin with intelligence 4 or less, it does not carry treasure
|
||||
if (DEBUG) { FloatingTextStringOnCreature("Creature is not intelligent enough to carry treasure", GetFirstPC(), FALSE); }
|
||||
}
|
||||
else if(nGhost)
|
||||
{
|
||||
//:: If the creature is undead, plant, or vermin with intelligence 4 or less, it does not carry treasure
|
||||
if (DEBUG) { FloatingTextStringOnCreature("Creature is incorporeal and can't carry treasure", GetFirstPC(), FALSE); }
|
||||
}
|
||||
else
|
||||
{
|
||||
sd_droploot(OBJECT_SELF, OBJECT_SELF);
|
||||
//:: All other creatures, including undead, plants, and vermin with intelligence > 4, will drop loot
|
||||
sd_droploot(OBJECT_SELF, OBJECT_SELF);
|
||||
}
|
||||
|
||||
//:: Get average PC level for area
|
||||
@@ -93,55 +112,54 @@ void main()
|
||||
(sMonthDay == "10/30") ||
|
||||
(sMonthDay == "10/31") ||
|
||||
(sMonthDay == "11/01"))
|
||||
{
|
||||
//: Don't spawn skeletons from skeletons or commoners
|
||||
if (GetResRef(OBJECT_SELF) == "pa_skeleton" || GetResRef(OBJECT_SELF) == "nw_skeleton" || nCommoner > 0)
|
||||
return;
|
||||
{
|
||||
//: Don't spawn skeletons from skeletons or commoners
|
||||
if (GetResRef(OBJECT_SELF) == "pa_skeleton" || GetResRef(OBJECT_SELF) == "nw_skeleton" || nCommoner > 0)
|
||||
return;
|
||||
|
||||
//:: 33% chance to spawn
|
||||
if ( Random(100) < 33 )
|
||||
{
|
||||
//:: Spawn Skeleton.
|
||||
eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
|
||||
oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF));
|
||||
DelayCommand(0.0, ActionDoLevelUp(oSkelly, nAveragePCLevel));
|
||||
|
||||
//:: 33% chance to spawn
|
||||
if ( Random(100) < 33 )
|
||||
{
|
||||
//:: Spawn Skeleton.
|
||||
eVFX = EffectVisualEffect(VFX_IMP_EVIL_HELP);
|
||||
oSkelly = CreateObject(OBJECT_TYPE_CREATURE, "nw_skeleton", GetLocation(OBJECT_SELF));
|
||||
DelayCommand(0.0, ActionDoLevelUp(oSkelly, nAveragePCLevel));
|
||||
|
||||
//:: Assign Weapon
|
||||
int nResult = d6(1);
|
||||
int nStackSize = 1; // Create 1 items;
|
||||
string sItem;
|
||||
int nResult = d6(1);
|
||||
int nStackSize = 1; // Create 1 items;
|
||||
string sItem;
|
||||
|
||||
if (nResult == 1)
|
||||
{
|
||||
sItem = "nw_wplhb001"; //:: Halberd
|
||||
}
|
||||
else if(nResult == 2)
|
||||
{
|
||||
sItem = "nw_wplsc001"; //:: Scythe
|
||||
}
|
||||
else if(nResult == 3)
|
||||
{
|
||||
sItem = "nw_wplss001"; //:: Spear
|
||||
}
|
||||
else if(nResult ==4)
|
||||
{
|
||||
sItem = "nw_wblfh001"; //:: Heavy Flail
|
||||
}
|
||||
else if(nResult == 5)
|
||||
{
|
||||
sItem = "nw_wswgs001"; //:: Greatsword
|
||||
}
|
||||
else
|
||||
|
||||
sItem = "nw_waxgr001"; //:: Greataxe
|
||||
|
||||
object oWeapon = CreateItemOnObject(sItem, oSkelly, nStackSize);
|
||||
ReallyEquipItemInSlot(oSkelly, oWeapon, INVENTORY_SLOT_RIGHTHAND);
|
||||
|
||||
//:: Apply VFX & Attack
|
||||
AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly));
|
||||
if (nResult == 1)
|
||||
{
|
||||
sItem = "nw_wplhb001"; //:: Halberd
|
||||
}
|
||||
|
||||
}
|
||||
else if(nResult == 2)
|
||||
{
|
||||
sItem = "nw_wplsc001"; //:: Scythe
|
||||
}
|
||||
else if(nResult == 3)
|
||||
{
|
||||
sItem = "nw_wplss001"; //:: Spear
|
||||
}
|
||||
else if(nResult ==4)
|
||||
{
|
||||
sItem = "nw_wblfh001"; //:: Heavy Flail
|
||||
}
|
||||
else if(nResult == 5)
|
||||
{
|
||||
sItem = "nw_wswgs001"; //:: Greatsword
|
||||
}
|
||||
else
|
||||
|
||||
sItem = "nw_waxgr001"; //:: Greataxe
|
||||
|
||||
object oWeapon = CreateItemOnObject(sItem, oSkelly, nStackSize);
|
||||
ReallyEquipItemInSlot(oSkelly, oWeapon, INVENTORY_SLOT_RIGHTHAND);
|
||||
|
||||
//:: Apply VFX & Attack
|
||||
AssignCommand(oSkelly, DetermineCombatRound(OBJECT_SELF));
|
||||
DelayCommand(0.3, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVFX, oSkelly));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user