Aller au contenu

Photo

Inventory dump script


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 983 messages
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

#2
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
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.

#3
PJ156

PJ156
  • Members
  • 2 983 messages
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

#4
painofdungeoneternal

painofdungeoneternal
  • Members
  • 1 799 messages
You can poke thru these functions too.



http://68.111.212.16...items_8nss.html

#5
rjshae

rjshae
  • Members
  • 4 491 messages

_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
PJ156

PJ156
  • Members
  • 2 983 messages
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 Posted Image.

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