Initial commit
Adding all of the current content for Anphillia Unlimited.
This commit is contained in:
22
_module/nss/anph_open_store.nss
Normal file
22
_module/nss/anph_open_store.nss
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "store_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
string sNPCTag = GetTag(OBJECT_SELF);
|
||||
object oStore = GetNearestObjectByTag("STORE_" + sNPCTag);
|
||||
|
||||
if (oStore == OBJECT_INVALID)
|
||||
oStore = GetNearestObjectByTag(GetLocalString(OBJECT_SELF, "STORE_TO_OPEN"));
|
||||
|
||||
if (GetObjectType(oStore) == OBJECT_TYPE_STORE)
|
||||
{
|
||||
WriteTimestampedLogEntry("STOREDBG: NPC " + sNPCTag + " in " + GetName(GetArea(OBJECT_SELF)) + " opening store " + GetTag(oStore) + " for " + GetName(GetPCSpeaker()));
|
||||
store_Initialize(oStore);
|
||||
OpenStore(oStore, GetPCSpeaker());
|
||||
}
|
||||
else
|
||||
{
|
||||
WriteTimestampedLogEntry("STOREDBG: store not found for NPC " +sNPCTag + " STORE_TO_OPEN:" + GetLocalString(OBJECT_SELF, "STORE_TO_OPEN"));
|
||||
ActionSpeakString("Sorry, the store is closed", TALKVOLUME_TALK);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user