//:://///////////////////////////////////////////// //:: 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); }