62 lines
1.7 KiB
Plaintext
62 lines
1.7 KiB
Plaintext
|
|
// (Useful when this needs to be delayed.)
|
|
void ClearAndJumpToObject(object oDestination);
|
|
void ClearAndJumpToObject(object oDestination)
|
|
{
|
|
ClearAllActions();
|
|
JumpToObject(oDestination);
|
|
}
|
|
|
|
|
|
void main()
|
|
{
|
|
object oItem;
|
|
int nCount;
|
|
int nHench;
|
|
object oHench;
|
|
object oTarget;
|
|
|
|
// Get the PC who is in this conversation.
|
|
object oPC = GetPCSpeaker();
|
|
|
|
// Find the location to which to teleport.
|
|
oTarget = GetWaypointByTag("WP_LankhToSL");
|
|
|
|
// Teleport the PC.
|
|
DelayCommand(2.0, AssignCommand(oPC, ClearAndJumpToObject(oTarget)));
|
|
|
|
// Also teleport associates.
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
|
|
DelayCommand(2.0, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
|
|
DelayCommand(2.0, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
|
|
DelayCommand(2.0, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
|
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
|
|
DelayCommand(2.0, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
|
|
|
// Support for multiple henchmen (includes horses).
|
|
nHench = 1;
|
|
oHench = GetHenchman(oPC, 1);
|
|
while ( oHench != OBJECT_INVALID )
|
|
{
|
|
DelayCommand(2.0, AssignCommand(oHench, ClearAndJumpToObject(oTarget)));
|
|
// Next henchman.
|
|
oHench = GetHenchman(oPC, ++nHench);
|
|
}
|
|
FadeToBlack(oPC);
|
|
|
|
|
|
// Relieve the PC of its equipment.
|
|
nCount = NUM_INVENTORY_SLOTS;
|
|
while ( nCount-- > 0 )
|
|
{
|
|
oItem = GetItemInSlot(nCount, oPC);
|
|
DestroyObject(oItem);
|
|
}
|
|
|
|
FadeFromBlack(oPC);
|
|
|
|
}
|
|
|