Files
Anphillia_PRC8/_module/nss/hc_on_acq_item.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

53 lines
1.6 KiB
Plaintext

// 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);
string sTag=GetTag(oAcquired);
/* 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);
}
}
}
}