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:
65
_module/nss/jw_brdun4_enter.nss
Normal file
65
_module/nss/jw_brdun4_enter.nss
Normal file
@@ -0,0 +1,65 @@
|
||||
void main()
|
||||
{
|
||||
|
||||
|
||||
object oObject = GetFirstObjectInArea();
|
||||
|
||||
object oPC=GetEnteringObject();
|
||||
|
||||
if (!GetIsPC(oPC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetIsDM(oPC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
int nRandom;
|
||||
string sWP="jw_machine_sp_wp";
|
||||
string sCheckstring;
|
||||
object oParty=GetFirstFactionMember(oPC,FALSE);
|
||||
while (GetIsObjectValid(oParty))
|
||||
{
|
||||
if (GetTag(GetArea(oParty))=="jw_brightdun3")
|
||||
{
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_UNSUMMON),oParty);
|
||||
|
||||
AssignCommand( oParty, ClearAllActions() );
|
||||
nRandom=d8();
|
||||
|
||||
sCheckstring=sWP+IntToString(nRandom);
|
||||
AssignCommand( oParty, JumpToObject( GetWaypointByTag(sCheckstring) ) );
|
||||
}
|
||||
oParty=GetNextFactionMember(oPC,FALSE);
|
||||
}
|
||||
|
||||
|
||||
int nPCinArea=FALSE;
|
||||
|
||||
|
||||
oObject=GetFirstObjectInArea();
|
||||
|
||||
while (GetIsObjectValid(oObject))
|
||||
{
|
||||
if (GetIsPC(oObject)&&(oObject!=oPC))
|
||||
{
|
||||
nPCinArea = TRUE;
|
||||
}
|
||||
oObject=GetNextObjectInArea();
|
||||
}
|
||||
|
||||
/// this returns true if there are any PCs in the area that are NOT
|
||||
/// the object that just entered the area
|
||||
|
||||
if ((nPCinArea != TRUE)&&(!GetIsObjectValid(GetObjectByTag("jw_the_machine2"))))
|
||||
{
|
||||
|
||||
object oMachine= CreateObject(OBJECT_TYPE_PLACEABLE,"jw_the_machine2",GetLocation(GetWaypointByTag("jw_machine2_wp")));
|
||||
SetLocalInt(oMachine,"nStatus",1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user