Lankhmar_PRC8/_module/nss/gustil_walk_away.nss
Jaysyn904 ebc0c6a9b2 Initial commit
Initial commit [v9.7]
2025-04-03 12:54:47 -04:00

46 lines
1.3 KiB
Plaintext

void main()
{
object oSelf = OBJECT_SELF;
object oTarget;
object oSpawn;
effect eVFX;
// Get the PC who is in this conversation.
object oPC = GetLastDamager();
// Only fire once.
if ( GetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF)) )
return;
SetLocalInt(GetModule(), "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);
// Spawn "gustillo3".
oTarget = GetWaypointByTag("WP_SPn_gustillo3");
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "gustillo3", GetLocation(oTarget));
// Unlock and open "rivtogusti".
oTarget = GetObjectByTag("rivtogusti");
SetLocked(oTarget, FALSE);
AssignCommand(oTarget, ActionOpenDoor(oTarget));
// Have us say something.
SpeakString("Deal with them, I will meet you at my place!");
// Apply a visual effect.
eVFX = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVFX, GetLocation(oSelf));
oTarget = GetObjectByTag("Gustillo");
DestroyObject(oTarget, 0.1);
oTarget = GetObjectByTag("Lauricky");
DestroyObject(oTarget, 0.1);
oTarget = GetObjectByTag("Michan");
DestroyObject(oTarget, 0.1);
// Destroy an object (not fully effective until this script ends).
DelayCommand(3.5, DestroyObject(oSelf));
}