From the Lexicon, GetModuleItemAcquired returns the item from an OnAcquiredItem event. If this script is run from a User Defined event, would that run into issues? Or, is the UD Acquire still considered an OnAcquired event?
To expand on debuggings, update your scripts with the following some debug code:
void main()
{
SendMessageToPC(GetFirstPC(), "DEBUG: User Defined script Firing.");
int nEvent =GetUserDefinedItemEventNumber();
SendMessageToPC(GetFirstPC(), "DEBUG: User Defined Event = "+IntToString(nEvent));
switch (nEvent)
{
case X2_ITEM_EVENT_ACTIVATE:
ExecuteScript("ac_"+GetTag(GetItemActivated()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_EQUIP:
ExecuteScript("eq_"+GetTag(GetPCItemLastEquipped()),
OBJECT_SELF); break;
case X2_ITEM_EVENT_UNEQUIP:
ExecuteScript("ue_"+GetTag(GetPCItemLastUnequipped())
, OBJECT_SELF); break;
case X2_ITEM_EVENT_ACQUIRE:
{
SendMessageToPC(GetFirstPC(), "DEBUG: Acquire event firing. Item tag= "+GetTag(GetModuleItemAcquired()));
ExecuteScript("aq_"+GetTag(GetModuleItemAcquired()),
OBJECT_SELF);
}
break;
...rest of your script...
In your first script,
void main()
{
SendMessageToPC(oPC, "DEBUG: Script Firing.");
object oPC = GetModuleItemAcquiredBy();
SendMessageToPC(GetFirstPC(), "DEBUG: oPC = "+GetName(oPC));
int nStackSize = 50;
object oItem;
oItem = GetModuleItemAcquired();
SendMessageToPC(GetFirstPC(), "DEBUG: oItem = "+GetName(oItem)+" with tag "+GetTag(oItem));
if (!GetIsPC(oPC)) return;
RewardPartyXP(50, oPC, TRUE);
RewardPartyGP(80, oPC, TRUE);
See what messages you get, if any.