88 lines
3.2 KiB
Plaintext
88 lines
3.2 KiB
Plaintext
|
|
#include "nw_i0_generic"
|
|
|
|
void main()
|
|
|
|
{
|
|
object oSpawn;
|
|
int nHench;
|
|
object oHench;
|
|
object oTarget;
|
|
|
|
// Get the PC who is in this conversation.
|
|
object oPC = GetPCSpeaker();
|
|
|
|
// Cutscene functions:
|
|
BlackScreen(oPC);
|
|
|
|
// Set the variables
|
|
SetLocalInt(GetPCSpeaker(), "cbsbnt1b", 1);
|
|
|
|
// Find the location to which to teleport.
|
|
oTarget = GetWaypointByTag("WP_Crbt_Hllwy");
|
|
|
|
// Teleport the PC.
|
|
AssignCommand(oPC, ClearAllActions());
|
|
AssignCommand(oPC, JumpToObject(oTarget));
|
|
|
|
// Also teleport associates.
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
|
|
// Support for multiple henchmen (includes horses).
|
|
nHench = 1;
|
|
oHench = GetHenchman(oPC, 1);
|
|
while ( oHench != OBJECT_INVALID )
|
|
{
|
|
AssignCommand(oHench, ClearAllActions());
|
|
AssignCommand(oHench, JumpToObject(oTarget));
|
|
// Next henchman.
|
|
oHench = GetHenchman(oPC, ++nHench);
|
|
}
|
|
|
|
// Spawn some critters.
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
DelayCommand(1.0, AssignCommand(CreateObject(OBJECT_TYPE_CREATURE, "nw_rat001", GetLocation(oPC)),
|
|
DetermineCombatRound(oPC)));
|
|
|
|
// Cutscene functions:
|
|
DelayCommand(0.5, FadeFromBlack(oPC));
|
|
}
|
|
|