Hi!
so im going to be really short about this. this is a script i found on the NWNWikia Page (located here: http://nwn.wikia.com...plete_inventory
it says its suppose to strip a player of everything through a Onenter function (Tab?) it seems to work fine as a trigger, but i wanted to adapt this to a conversation Actions Taken Function (or Tab?)
random Ex: a Player (PC) wants to strip every item in there inventory through a NPC (creature). they are given a 'yes' or 'no' answer. 'yes' would strip everything, picking 'no' .... well you get the idea!
It seems when i place this script into the Actions Taken function (or tab?) it doesnt seem to work. Could this work on a conversation dialogue?
or would I need to change/tweak the coding? and what would i need to do to make this work through a conversation dialogue?
void main()
{
int nSlot;
object oPC = GetEnteringObject(); // Change this line for use in other events.
// Make sure oPC is a PC (not necessary in a module's OnClientEnter).
if ( !GetIsPC(oPC) )
return;
// Destroy the items in the main inventory.
object oItem = GetFirstItemInInventory(oPC);
while ( oItem != OBJECT_INVALID ) {
DestroyObject(oItem);
oItem = GetNextItemInInventory(oPC);
}
// Destroy equipped items.
for ( nSlot = 0; nSlot < NUM_INVENTORY_SLOTS; ++nSlot )
DestroyObject(GetItemInSlot(nSlot, oPC));
// Remove all gold.
AssignCommand(oPC, TakeGoldFromCreature(GetGold(oPC), oPC, TRUE));
}