53 lines
1.6 KiB
Plaintext
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);
|
|
}
|
|
}
|
|
}
|
|
}
|