CreateItemOnObject("turkey_piece", oPC, 1);
In the Create Item Function you should tell it how many instances of the object you wish to create on the target, in this case oPC. Do not know if by chance something has been changed to automatically give out 2 instances of an item when you create an item on an object, but you definitely can override that with putting 1 after oPC..
I'm not positive 100% this will solve the issue you are having, but it's a start, let me know if this worked.
If "turkey_piece" is also the name of the item they are using, then yeah, the original never got destroyed, e.g. they have the original plus the new one, that's the only other problem I can possibly forsee here.
You can use:
object oItem = GetItemActivated();
DestroyObject(oItem, 0.0);
to get rid of the original.
--------------------
In the second problem, all you need to do is set a local int on the PC after they use the item to buff, and check it before they are allowed to buff, e.g...
object oPC = GetItemActivator();
if (GetIsInCombat(oPC))
{ SendMessageToPC(oPC, "Not usable in combat!"); return;}
if(GetLocalInt(oPC, "BUFFED")==TRUE) {return;} //Stop here if they have buffed before..
//Set that they have buffed now
SetLocalInt(oPC, "BUFFED", TRUE);
//After 600 Seconds set it so that they can buff again...
DelayCommand(600.0, SetLocalInt(oPC, "BUFFED", FALSE));
Modifiテδゥ par _Guile, 19 septembre 2011 - 07:55 .