RATDOG/_module/nss/slp_drg_onpercp.nss
Jaysyn904 8c0a2224cb Area & spawner pass.
Updated Aragnak's Isle & Lair, Bard College, Cazrak's Lair.  Remade several items.
2021-12-30 01:18:45 -05:00

46 lines
1.4 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name slp_drg_onpercp
//:: Copyright (c) 2021 Project RATDOG
//:://////////////////////////////////////////////
/*
Sleeping Dragon external On Perception script
*/
//:://////////////////////////////////////////////
//:: Created By: Jaysyn
//:: Created On: 2021/12/29
//:://////////////////////////////////////////////
void main()
{
if (GetLastPerceptionHeard() == TRUE)
{
if (GetIsPC(GetLastPerceived()) == TRUE)
{
object oMob = GetNearestObjectByTag("RA_DRAG_ARAGNAK2", GetLastPerceived(), 1);
//:: Remove "Sleep" from our dragon
effect eEffect = GetFirstEffect(oMob);
while(GetIsEffectValid(eEffect))
{
if(GetEffectTag(eEffect) == "STILL_DRAGON")
RemoveEffect(oMob, eEffect);
eEffect = GetNextEffect(oMob);
}
SendMessageToPC(GetLastPerceived(), "The dragon woke up. Run!");
//:: Talk a little trash.
AssignCommand(GetObjectByTag("RA_DRAG_ARAGNAK2"), ActionSpeakString("INSECTS!!! YOU DARE DISTURB MY SLUMBER!!!!"));
//:: Set an INT so that we know he's awake
SetLocalInt(oMob, "awake", 1);
SetLocalInt(oMob, "sleep", 0);
}
}
ExecuteScript("nw_c2_default2", OBJECT_SELF);
}