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

44 lines
1.1 KiB
Plaintext

#include "x0_i0_partywide"
#include "nw_i0_generic"
void main()
{
object oActor;
object oTarget;
object oPC = GetPCSpeaker();
FadeToBlack(oPC);
// Give 10 experience (to party) to the PC.
GiveXPToAll(oPC, 10);
// Have "Uluhtc" say something.
AssignCommand(GetObjectByTag("Uluhtc"), SpeakString("Cthulhu fhtagn! Ph'nglui mglw'nafh Cthulhu R'lyeh wgah-nagl fhtagn!"));
// Have the PC say something.
AssignCommand(oPC, SpeakString("Insanity!"));
// Have "Deskcbt1" cast Fear.
oActor = GetObjectByTag("Deskcbt1");
AssignCommand(oActor, ActionCastSpellAtObject(SPELL_FEAR, oPC, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE));
// Change Faction
object oUluhtc = GetObjectByTag("Uluhtc");
ChangeToStandardFaction(oUluhtc, STANDARD_FACTION_HOSTILE);
ActionAttack(oPC);
// Attack PC
oTarget = GetObjectByTag("Uluhtc");
SetIsTemporaryEnemy(oPC, oTarget);
AssignCommand(oTarget, ActionAttack(oPC));
AssignCommand(oTarget, DetermineCombatRound(oPC));
FadeFromBlack(oPC);
}