/*int StartingConditional() { object oPC = GetPCSpeaker(); object oItem = GetFirstItemInInventory(oPC); int nValue; while (GetIsObjectValid(oItem)) { if (GetLocalInt(oItem, "Prototype") == TRUE) { if (GetBaseItemType(oItem) == BASE_ITEM_DART || GetBaseItemType(oItem) == BASE_ITEM_SHURIKEN || GetBaseItemType(oItem) == BASE_ITEM_BULLET || GetBaseItemType(oItem) == BASE_ITEM_SLING || GetBaseItemType(oItem) == BASE_ITEM_ARROW) return FALSE; return TRUE; } oItem = GetNextItemInInventory(oPC); } return FALSE; }*/ #include "x2_inc_itemprop" //This is actually the main function. int script(object oItem, object oPC) { if (GetBaseItemType(oItem) == BASE_ITEM_DART || GetBaseItemType(oItem) == BASE_ITEM_SHURIKEN || GetBaseItemType(oItem) == BASE_ITEM_BULLET || GetBaseItemType(oItem) == BASE_ITEM_SLING || GetBaseItemType(oItem) == BASE_ITEM_ARROW) return FALSE; return TRUE; } int StartingConditional() { object oPC = GetPCSpeaker(); int nSlot = 0; object oItem; int nResult; //Check if the item being crafted is equipped while (nSlot < 18) { oItem = GetItemInSlot(nSlot, oPC); if (GetLocalInt(oItem, "Prototype") == TRUE) nResult = script(oItem, oPC); nSlot++; } //If the item is not equipped, search for it in the inventory oItem = GetFirstItemInInventory(oPC); while (GetIsObjectValid(oItem)) { if (GetLocalInt(oItem, "Prototype") == TRUE) nResult = script(oItem, oPC); oItem = GetNextItemInInventory(oPC); } return nResult; }