Area Changes and other fixes
added areas and ccoh, fixed some areas to work with crafting fixed some on death issues added server entry/ooc
This commit is contained in:
@@ -1,53 +0,0 @@
|
||||
void main()
|
||||
{ // start main
|
||||
object oPC = GetExitingObject();
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
int nPCFlag = FALSE;
|
||||
if(GetIsPC(oPC))
|
||||
{ // start main if
|
||||
object oObject = GetFirstObjectInArea(oArea);
|
||||
|
||||
while(GetIsObjectValid(oObject))
|
||||
{ //start while loop
|
||||
if(GetIsPC(oObject))
|
||||
{ //start if
|
||||
nPCFlag = TRUE;
|
||||
break; // leave while loop if a PC is in the area
|
||||
} // end if
|
||||
else
|
||||
{ //start else
|
||||
oObject = GetNextObjectInArea(oArea);
|
||||
} // end else
|
||||
} // end while
|
||||
if(nPCFlag == FALSE)
|
||||
{
|
||||
object oStore = GetFirstObjectInArea(oArea);
|
||||
while(GetIsObjectValid(oStore))
|
||||
{
|
||||
int nObjectType = GetObjectType(oStore);
|
||||
if(nObjectType == OBJECT_TYPE_STORE)
|
||||
{
|
||||
object oItem = GetFirstItemInInventory(oStore);
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
int nItemFlag = GetLocalInt(oItem, "PCItem");
|
||||
if(nItemFlag != 0)
|
||||
{
|
||||
if(nItemFlag < 4)
|
||||
{
|
||||
nItemFlag++;
|
||||
SetLocalInt(oItem, "PCItem", nItemFlag);
|
||||
}
|
||||
else
|
||||
{
|
||||
DestroyObject(oItem);
|
||||
}
|
||||
}
|
||||
oItem = GetNextItemInInventory(oStore);
|
||||
} // end second while
|
||||
} // end if
|
||||
oStore = GetNextObjectInArea(oArea);
|
||||
} // end first while
|
||||
} // end if
|
||||
} // end main if
|
||||
} // end main
|
Reference in New Issue
Block a user