void main()
{
 object oLightwp=GetWaypointByTag("jw_light_wp3");
  object oFlightwp=GetWaypointByTag("jw_flight_wp3");
  object oSound=GetObjectByTag("jw_light_sound3");
  object oArea=GetArea(oLightwp);

CreateObject(OBJECT_TYPE_PLACEABLE,"jw_light3",GetLocation(oLightwp),TRUE);
if (GetLocalInt(oArea,"nRiddle")==0)

{
SetLocalInt(oArea,"nRiddle",Random(3)+1);

}


if (GetLocalInt(oArea,"nRiddle")==1)
{
CreateObject(OBJECT_TYPE_PLACEABLE,"jw_light1",GetLocation(oFlightwp),TRUE);
}

if (GetLocalInt(oArea,"nRiddle")==2)
{
CreateObject(OBJECT_TYPE_PLACEABLE,"jw_light3",GetLocation(oFlightwp),TRUE);
}

if (GetLocalInt(oArea,"nRiddle")==3)
{
CreateObject(OBJECT_TYPE_PLACEABLE,"jw_light4",GetLocation(oFlightwp),TRUE);
}

SoundObjectPlay(oSound);

SetLocalInt(oArea,"nLights",GetLocalInt(oArea,"nLights")+1);
SignalEvent(oArea,EventUserDefined(50));
}