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

68 lines
1.7 KiB
Plaintext

/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
#include "nw_i0_tool"
void main()
{
object oPC = GetPCSpeaker();
object oItem;
oItem = GetItemPossessedBy(oPC, "bloodredgem");
if (GetIsObjectValid(oItem))
DestroyObject(oItem);
RewardPartyXP(250, oPC, FALSE);
AddJournalQuestEntry("Red God's Curse", 6, oPC, TRUE, FALSE);
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("WP_RGDTMple");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
oTarget=GetFirstFactionMember(oPC, FALSE);
while (GetIsObjectValid(oTarget))
{
AssignCommand(oTarget, ClearAllActions());
AssignCommand(oTarget, ActionJumpToLocation(lTarget));
oTarget=GetNextFactionMember(oPC, FALSE);
}
oTarget = GetObjectByTag("rgalter");
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD), GetLocation(oTarget));
oTarget = GetObjectByTag("temptored");
AssignCommand(oTarget, ActionCloseDoor(oTarget));
SetLocked(oTarget, TRUE);
}