Added Elite Troll creature
Added Elite Troll creature.
This commit is contained in:
@@ -15,34 +15,36 @@ void main()
|
||||
{
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oAttacker;
|
||||
|
||||
|
||||
string sResRef = GetResRef(oNPC);
|
||||
|
||||
effect eSleep = EffectSleep();
|
||||
|
||||
//:: Handles troll regen
|
||||
if(sResRef == "ra_troll001" || sResRef == "TROLL_FEDORLA")
|
||||
{
|
||||
if(GetLocalInt(oNPC, "nSubDual") > 0)
|
||||
{
|
||||
SetLocalInt(oNPC, "nSubDual", GetLocalInt(oNPC, "nSubDual") - 5);
|
||||
effect eSleep = EffectSleep();
|
||||
|
||||
if(GetLocalInt(oNPC, "nSubDual") < GetCurrentHitPoints(oNPC))
|
||||
{
|
||||
RemoveEffect(oNPC, eSleep);
|
||||
}
|
||||
//:: Handles troll regen
|
||||
if(sResRef == "ra_troll001"
|
||||
|| sResRef == "ra_troll002"
|
||||
|| sResRef == "TROLL_FEDORLA")
|
||||
{
|
||||
if(GetLocalInt(oNPC, "nSubDual") > 0)
|
||||
{
|
||||
SetLocalInt(oNPC, "nSubDual", GetLocalInt(oNPC, "nSubDual") - 5);
|
||||
|
||||
if(GetLocalInt(oNPC, "nSubDual") < GetCurrentHitPoints(oNPC))
|
||||
{
|
||||
RemoveEffect(oNPC, eSleep);
|
||||
}
|
||||
|
||||
if(GetLocalInt(oNPC, "nSubDual") > GetCurrentHitPoints(oNPC))
|
||||
{
|
||||
SpeakString("I am still unconscious!");
|
||||
SetIsDestroyable(FALSE, TRUE, TRUE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, OBJECT_SELF, 6.5f);
|
||||
}
|
||||
|
||||
//SpeakString("My Subdual is now " + IntToString(GetLocalInt(oNPC, "nSubDual")));
|
||||
|
||||
if(GetLocalInt(oNPC, "nSubDual") > GetCurrentHitPoints(oNPC))
|
||||
{
|
||||
SpeakString("I am still unconscious!");
|
||||
SetIsDestroyable(FALSE, TRUE, TRUE);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, OBJECT_SELF, 6.5f);
|
||||
}
|
||||
|
||||
SpeakString("My Subdual is now " + IntToString(GetLocalInt(oNPC, "nSubDual")));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//:: Equips best armor
|
||||
if ((!GetIsInCombat(oNPC) && (GetItemInSlot(INVENTORY_SLOT_CHEST) == OBJECT_INVALID)))
|
||||
|
Reference in New Issue
Block a user