RATDOG/_module/nss/ra_wake_aragnak.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

void main()
{
object oPC = GetEnteringObject();
object oArea = GetArea(oPC);
object oMob1 = GetNearestObjectByTag("RA_DRAG_ARAGNAK1", oPC); // Awake Aragnak
object oMob2 = GetNearestObjectByTag("RA_DRAG_ARAGNAK2", oPC); // Sleeping Aragnak
//:: PCs only
if (!GetIsPC(oPC)) return;
//:: Only trigger once
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
//:: Don't want this trigger to fire if either version of Arganak is awake.
if (GetLocalInt(oMob1, "awake") == 1) { return; }
if (GetLocalInt(oMob2, "awake") == 1) { return; }
MusicBattlePlay(oArea);
//:: Remove "Sleep" from our dragon
effect eEffect = GetFirstEffect(oMob2);
while(GetIsEffectValid(eEffect))
{
if(GetEffectTag(eEffect) == "STILL_DRAGON")
RemoveEffect(oMob2, eEffect);
eEffect = GetNextEffect(oMob2);
}
//:: Talk a little trash.
AssignCommand(GetObjectByTag("RA_DRAG_ARAGNAK2"), ActionSpeakString("INSECTS!!! YOU DARE DISTURB MY SLUMBER!!!!"));
FloatingTextStringOnCreature("You've drawn too close. The dragon is stirring from his slumber.", oPC);
//:: Set an INT so that we know he's awake
SetLocalInt(oMob2, "awake", 1);
SetLocalInt(oMob2, "sleep", 0);
//:: Set "do once" Tag
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
}