77 lines
1.7 KiB
Plaintext
77 lines
1.7 KiB
Plaintext
#include "nw_i0_spells"
|
|
#include "x3_inc_horse"
|
|
|
|
|
|
void main()
|
|
{
|
|
object oHench;
|
|
int nHench;
|
|
int nCount;
|
|
object oTarget;
|
|
object oItem;
|
|
|
|
// Get the PC who is in this conversation.
|
|
object oPC = GetPCSpeaker();
|
|
|
|
while (GetIsObjectValid(GetMaster(oPC)))
|
|
{
|
|
oPC=GetMaster(oPC);
|
|
}
|
|
|
|
//object oHench = GetHenchman(oPC);
|
|
|
|
FadeToBlack(oPC);
|
|
|
|
FadeFromBlack(oPC);
|
|
|
|
// Relieve the PC of its possessions.
|
|
oTarget = GetObjectByTag("chstfdrwrsyrtimz");
|
|
oItem = GetFirstItemInInventory(oPC);
|
|
while ( oItem != OBJECT_INVALID )
|
|
{
|
|
AssignCommand(oTarget, ActionTakeItem(oItem, oPC));
|
|
oItem = GetNextItemInInventory(oPC);
|
|
}
|
|
|
|
// Relieve the PC of its equipment.
|
|
nCount = NUM_INVENTORY_SLOTS;
|
|
while ( nCount-- > 0 )
|
|
{
|
|
oItem = GetItemInSlot(nCount, oPC);
|
|
AssignCommand(oTarget, ActionTakeItem(oItem, oPC));
|
|
}
|
|
|
|
// Relieve the PC of its gold.
|
|
AssignCommand(oTarget, TakeGoldFromCreature(GetGold(oPC), oPC));
|
|
|
|
// Have the PC its henchman.
|
|
nHench = 1;
|
|
oHench = GetHenchman(oPC, 1);
|
|
while ( oHench != OBJECT_INVALID )
|
|
{
|
|
// RemoveHenchman(oPC, oHench);
|
|
|
|
// Update the loop.
|
|
oHench = GetHenchman(oPC, ++nHench);
|
|
|
|
// Relieve the Henchma of possessions.
|
|
oTarget = GetObjectByTag("chstfdrwrsyrtimz");
|
|
oItem = GetFirstItemInInventory(oHench);
|
|
while ( oItem != OBJECT_INVALID )
|
|
{
|
|
AssignCommand(oTarget, ActionTakeItem(oItem, oHench));
|
|
oItem = GetNextItemInInventory(oHench);
|
|
}
|
|
|
|
// Relieve the Hench of equipment.
|
|
nCount = NUM_INVENTORY_SLOTS;
|
|
while ( nCount-- > 0 )
|
|
{
|
|
oItem = GetItemInSlot(nCount, oPC);
|
|
AssignCommand(oTarget, ActionTakeItem(oItem, oHench));
|
|
}
|
|
|
|
}
|
|
}
|
|
|