Pocket Plane Group

Miscellany, Inc. => Infinity Engine Modding Q&A => Topic started by: Amazordra on March 22, 2005, 10:15:53 PM

Title: Item Snagging
Post by: Amazordra on March 22, 2005, 10:15:53 PM
Since I'm incredibly lazy and tired at the moment....

Does anyone know if it is possible to take a party item without the character taking the item being near whichever character has the item?

Gah, I hope that makes sense.
Title: Re: Item Snagging
Post by: Ghreyfain on March 23, 2005, 05:58:38 AM
TakePartyItem()?
TakeItem()?
TakeItemReplace()?
DestroyItem()?
Title: Re: Item Snagging
Post by: Ama at College on March 23, 2005, 01:32:12 PM
I thought a character had to be near the npc with the item for those to work. o.o
Title: Re: Item Snagging
Post by: Ghreyfain on March 23, 2005, 01:33:17 PM
Beats me.  Test it?
Title: Re: Item Snagging
Post by: Bons on March 23, 2005, 04:04:18 PM
I doubt proximity matters, since characters aren't the only objects that can take items. You can use the same actions in an area script to strip a party of goodies, etc.
Title: Re: Item Snagging
Post by: Amazordra on March 23, 2005, 11:51:16 PM
I haven't tested it myself yet, I'm not home long enough to do so.  :'(

*explains a bit more about the problem* The reason why I wanted to know if it was possible to take an item without any distance restrictions (In my case, its two different characters in two different areas.) is because when an npc leaves the group, this npc drops an item into Player1's inventory and teleports somewhere else. *Why* this npc does so I cannot figure out (nothing in the coding mentions a "DropItem", "GiveItem", etc trigger... but the npc only leaves behind one item--not all of the items in the npc's inventory, so I figure it can't be because of the LeaveParty().... ), which means I have to find a way to reclaim the item that doesn't involve destroying it and creating another one.
Title: Re: Item Snagging
Post by: Ghreyfain on March 24, 2005, 12:17:58 AM
It's probably flagged as a quest item.  See: Flail of Ages.  Unflag that.
Title: Re: Item Snagging
Post by: Bons on March 24, 2005, 12:19:35 AM
The reason why I wanted to know if it was possible to take an item without any distance restrictions (In my case, its two different characters in two different areas.) is because when an npc leaves the group, this npc drops an item into Player1's inventory and teleports somewhere else. *Why* this npc does so I cannot figure out (nothing in the coding mentions a "DropItem", "GiveItem", etc trigger... but the npc only leaves behind one item--not all of the items in the npc's inventory, so I figure it can't be because of the LeaveParty().... )

Check the item to see if it's flagged non-sellable/quest-critical. That will cause an item to be shifted to Player1's inventory when the NPC previously holding it does a LeaveParty().

Urk! Ghreyfain beat me to this! Bah! Post anyway!
Title: Re: Item Snagging
Post by: Ama at College on March 24, 2005, 12:55:22 PM
Yeah, I did indeed flag it as unsellable.

(D'oh! *smakes self*)

Thank you both for the help, you've just spared me many hours of scripting.  :)