I have obtained a script from the OC that will drop all inventory items from an NPC. In this case to a lootbag called oCrate (bevil style).
I want the stuff to go to the PC, if I sawp oCrate in the script for oPC it does not work.
I realise this is a exceptionally open question since I have not posted the script but is there an easy way to have the NPC give all thier items to the PC.
Cheers,
PJ
Inventory dump script
Débuté par
PJ156
, nov. 19 2010 01:44
#1
Posté 19 novembre 2010 - 01:44
#2
Posté 19 novembre 2010 - 02:28
Without seeing your script it is tough to say, however there's a few ways of doing this. An example is to loop through all the inventory items the NPC has and for each item AssignCommand(oNPC, ActionGiveItem(oItem, oPC));
You would have to loop through both their general inventory and their equiped items if you wanted to give ALL their stuff to the PC.
Also, make sure the items are marked as droppable, or set them to this state in the script just prior to giving them to the PC.
You would have to loop through both their general inventory and their equiped items if you wanted to give ALL their stuff to the PC.
Also, make sure the items are marked as droppable, or set them to this state in the script just prior to giving them to the PC.
#3
Posté 19 novembre 2010 - 02:34
Okay and thanks,
I think I can do that using the script I have for identifying items in an inventory as a basis. I will give it a go.
Thanks _knightmare_
PJ
I think I can do that using the script I have for identifying items in an inventory as a basis. I will give it a go.
Thanks _knightmare_
PJ
#4
Posté 19 novembre 2010 - 06:29
#5
Posté 19 novembre 2010 - 06:51
_Knightmare_ wrote...
Also, make sure the items are marked as droppable, or set them to this state in the script just prior to giving them to the PC.
Depending on the circumstances, you might also want to check whether the cursed item flag is set before handing the item over...
Modifié par rjshae, 19 novembre 2010 - 06:51 .
#6
Posté 19 novembre 2010 - 07:14
Thanks, for the additonal responses.
I had a play with this today a found out why the OC did it the way they did.
When my test MU got dumped with all the NPC fighters spare armour and weapons she found she could not move. The test rogue was muled up too so to do the shopping they had to dump items individually.
I now think the bag is a neat idea
.
Thanks for the reponses I learned a little along the way. I did it by messing with the OC script in the end. Did not work right (I only got inventory items to pass over) but it worked well enough to see what the potential problems might be.
Cheers,
PJ
I had a play with this today a found out why the OC did it the way they did.
When my test MU got dumped with all the NPC fighters spare armour and weapons she found she could not move. The test rogue was muled up too so to do the shopping they had to dump items individually.
I now think the bag is a neat idea
Thanks for the reponses I learned a little along the way. I did it by messing with the OC script in the end. Did not work right (I only got inventory items to pass over) but it worked well enough to see what the potential problems might be.
Cheers,
PJ





Retour en haut







