Battledale_PRC8/_module/nss/jw_dungenc4.nss
Jaysyn904 7b9e44ebbb 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.
2024-03-11 23:44:08 -04:00

37 lines
856 B
Plaintext

void main()
{
object oLightwp=GetWaypointByTag("jw_light_wp4");
object oFlightwp=GetWaypointByTag("jw_flight_wp4");
object oSound=GetObjectByTag("jw_light_sound4");
object oArea=GetArea(oLightwp);
CreateObject(OBJECT_TYPE_PLACEABLE,"jw_light4",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));
}