Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
69
_module/nss/ar1_enter.nss
Normal file
69
_module/nss/ar1_enter.nss
Normal file
@@ -0,0 +1,69 @@
|
||||
#include "rd_misc"
|
||||
#include "rd_treasure"
|
||||
|
||||
void main()
|
||||
{
|
||||
location lLoc;
|
||||
object oPC;
|
||||
int iRandom;
|
||||
int iCount;
|
||||
|
||||
oPC = GetEnteringObject();
|
||||
|
||||
SitInChairs("ar1");
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF,"DoOnce") == 0)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"DoOnce",1);
|
||||
if (Random(100)<25)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF,"CustomMerchant",1);
|
||||
lLoc = GetLocation(GetObjectByTag("en4_cm1"));
|
||||
CreateObject(OBJECT_TYPE_CREATURE,"mer_cm1",lLoc);
|
||||
}
|
||||
}
|
||||
|
||||
if (GetIsPC(oPC))
|
||||
{
|
||||
if (GetLocalInt(oPC,"SS1") == 0)
|
||||
{
|
||||
SetLocalInt(oPC,"SS1",1);
|
||||
if (GetLocalInt(OBJECT_SELF,"CustomMerchant") == 1)
|
||||
{
|
||||
object oStore = GetObjectByTag("en4_cm1_mer");
|
||||
iRandom=Random(4)+1;
|
||||
iCount = 0;
|
||||
while (iCount <= iRandom)
|
||||
{
|
||||
GetMagicItem(oStore,TRUE,TRUE,5);
|
||||
iCount++;
|
||||
}
|
||||
iRandom=Random(4)+1;
|
||||
iCount = 0;
|
||||
while (iCount <= iRandom)
|
||||
{
|
||||
GetMagicItem(oStore,TRUE,TRUE);
|
||||
iCount++;
|
||||
}
|
||||
iRandom=Random(3)+1;
|
||||
iCount = 0;
|
||||
while (iCount <= iRandom)
|
||||
{
|
||||
CreateRandomItem(oStore);
|
||||
iCount++;
|
||||
}
|
||||
iRandom=Random(2)+1;
|
||||
iCount = 0;
|
||||
while (iCount <= iRandom)
|
||||
{
|
||||
GetMiscMagic(oStore);
|
||||
iCount++;
|
||||
}
|
||||
iRandom=Random(2);
|
||||
if (iRandom == 1)
|
||||
GetRareItem(oStore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user