» Thu May 05, 2011 6:36 am
Possible? Yes. Practical? No.
One approach would be to place the script on the base object. If you do, the script will appear an every single placed reference of that object, of which the vast majority would not be in a guild. This is just begging for problems.
Another approach would be to make a new base object for the items in the guild, and place the script on that. This would limit the script to items in the guild, but then they would be entirely new items. They wouldn't stack with other items, would possibly interfere with other quests, etc. This is better than the first approach, but not by much.
The best approach is also the most complicated. Have a script run whenever the player is in a guild that tracks what the player is looking at. Disable the activate key, and see when the player presses it. If he activates it, then see if what he's activating and if you need to remove ownership from it. Then have the script activate the item for the player. This would have the least amount of potential bugs, but it would also be the hardest to script. If you don't do things just right, you can leave the player with a disabled activate button and break their game.