Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
52
_module/nss/hc_on_acq_item.nss
Normal file
52
_module/nss/hc_on_acq_item.nss
Normal file
@@ -0,0 +1,52 @@
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user