// hc_acquire - test for getting objects // Archaegeo 2002 June 29 // hc_include file, lots of constants #include "hc_inc" #include "hc_inc_transfer" #include "i_tagtests" #include "anph_inc" void main() { object oAcquired = GetModuleItemAcquired(); object oPlayer = GetItemPossessor(oAcquired); int iSize = GetCreatureSize(oPlayer); string sTag = GetTag(oAcquired); string sResref = GetResRef(oAcquired); if (sTag == "cnrGemChisel") { if (sResref == "cnrgemchisel" && iSize > CREATURE_SIZE_MEDIUM) { SendMessageToPC(oPlayer, "Large creature detected."); DestroyObject (oAcquired); CreateItemOnObject("cnrgemchisel002", oPlayer, 1); return; } if (sResref == "cnrgemchisel002" && iSize < CREATURE_SIZE_LARGE) { SendMessageToPC(oPlayer, "Non-large creature detected."); DestroyObject (oAcquired); CreateItemOnObject("cnrgemchisel", oPlayer, 1); return; } } if (sTag == "cnrSkinningKnife") { if (sResref == "cnrskinningknife" && iSize > CREATURE_SIZE_MEDIUM) { SendMessageToPC(oPlayer, "Large creature detected."); DestroyObject (oAcquired); CreateItemOnObject("cnrskinningblade", oPlayer, 1); return; } if (sResref == "cnrskinningblade" && iSize < CREATURE_SIZE_LARGE) { SendMessageToPC(oPlayer, "Non-large creature detected."); DestroyObject (oAcquired); CreateItemOnObject("cnrskinningknife", oPlayer, 1); return; } } if (sTag == "hc_skinning") { if (sResref == "skinningknife" && iSize > CREATURE_SIZE_MEDIUM) { SendMessageToPC(oPlayer, "Large creature detected."); DestroyObject (oAcquired); CreateItemOnObject("skinningblade", oPlayer, 1); return; } if (sResref == "skinningblade" && iSize < CREATURE_SIZE_LARGE) { SendMessageToPC(oPlayer, "Non-large creature detected."); DestroyObject (oAcquired); CreateItemOnObject("skinningknife", oPlayer, 1); return; } } /* Tensors sword */ if (sTag == "NW_WSWMLS013") { SendMessageToPC (oPlayer, "The sword crumbles to dust in your hands.."); DestroyObject (oAcquired); return; } if (sTag == "BadgeOfFallen") { ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectSpellFailure(), oPlayer); return; } // the elemental stones if (GetIsPC(oPlayer)) { if (FindSubString("stoneoffire;stoneofwater;stoneofearth;stoneofair", sTag) >= 0) { if ((sTag != "stoneoffire" && GetItemPossessedBy(oPlayer, "stoneoffire") != OBJECT_INVALID) || (sTag != "stoneofwater" && GetItemPossessedBy(oPlayer, "stoneofwater") != OBJECT_INVALID) || (sTag != "stoneofearth" && GetItemPossessedBy(oPlayer, "stoneofearth") != OBJECT_INVALID) || (sTag != "stoneofair" && GetItemPossessedBy(oPlayer, "stoneofair") != OBJECT_INVALID) ) { SendMessageToPC (oPlayer, "You can't pick up another elemental stone..."); CreateObject (OBJECT_TYPE_ITEM, sTag, GetLocation(oPlayer)); DestroyObject (oAcquired); } else { SetLocalInt(GetObjectByTag("TrialStore"), GetSubString(sTag, 7, 5), 2); } } } }