Thanks for all the responses. As I've never actually written for multiplayer, I don't know if the feeble solution that I came up with is exploitable. After I wrote my request Ithought I better see if there was some work-around that I could come up with just in case there is no way of stopping a player from aquiring more than 1 of a particular item, So I thought what if instead of trying to stop them getting it, I immediately put it back? If nwn is fast enough it might give the illusion, if not the reality, of only being to take 1 item at any one time. So I put the following code in the X2_ITEM_EVENT_ACQUIRE part of my tag based script for it.
oPC = GetModuleItemAcquiredBy();
oItem = GetModuleItemAcquired();
if(oItem != OBJECT_INVALID)
{
if(GetNumItems(oPC, GetTag(oItem)) > 1)
{
oContainer = GetModuleItemAcquiredFrom();
if(oContainer != OBJECT_INVALID)
{
oNewMap = CreateItemOnObject("mapofrohan", oContainer);
DestroyObject(oItem);
}
}
}
And it does indeed give that illusion. So thanks for the input. One question, is this code exploitable?
TR
Modifié par Tarot Redhand, 21 février 2011 - 10:28 .