Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
77
_module/nss/jw_andbelo_enter.nss
Normal file
77
_module/nss/jw_andbelo_enter.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
object oObject = GetFirstObjectInArea();
|
||||
|
||||
object oPC=GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetIsDM(oPC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int nPCinArea=FALSE;
|
||||
location lLoc;
|
||||
int nIdx;
|
||||
object oPlant;
|
||||
// ENTERING
|
||||
|
||||
//int nPCinArea=FALSE;
|
||||
//location lLoc;
|
||||
object oItem;
|
||||
|
||||
|
||||
//
|
||||
object oTest=GetFirstPC();
|
||||
|
||||
|
||||
|
||||
|
||||
while (GetIsObjectValid(oTest) == TRUE)
|
||||
{
|
||||
if ((GetArea(oTest) == OBJECT_SELF)&&(!GetIsDM(oTest))&&(oTest!=oPC))
|
||||
{
|
||||
nPCinArea = TRUE;
|
||||
return;
|
||||
}
|
||||
oTest=GetNextPC();
|
||||
}
|
||||
|
||||
/// this returns true if there are any PCs in the area that are NOT
|
||||
/// the object that just entered the area
|
||||
|
||||
if (nPCinArea != TRUE)
|
||||
{
|
||||
nIdx=0;
|
||||
oObject=GetObjectByTag("jw_andros_plant_wp",nIdx);
|
||||
|
||||
while (GetIsObjectValid(oObject))
|
||||
{
|
||||
oPlant=CreateObject(OBJECT_TYPE_PLACEABLE,"jw_poison_plant",GetLocation(oObject));
|
||||
AssignCommand(oPlant,SetFacing(IntToFloat(Random(360))));
|
||||
ApplyEffectToObject(DURATION_TYPE_PERMANENT,EffectVisualEffect(VFX_DUR_LIGHT_RED_20),oPlant);
|
||||
nIdx++;
|
||||
oObject=GetObjectByTag("jw_andros_plant_wp",nIdx);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//for (nIdx=1;nIdx<=5;nIdx++)
|
||||
// {
|
||||
|
||||
// ApplyEffectAtLocation(DURATION_TYPE_PERMANENT,EffectAreaOfEffect(AOE_PER_FOGFIRE,"jw_fire_smoke","jw_empty_script","jw_empty_script"),GetLocation(GetObjectByTag("jw_fire_object"+IntToString(nIdx))));
|
||||
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user