Added helms and dynamic goblins
Added helms and dynamic goblins. Added onEnter spawner scripts to all dungeon areas. Fixed the Dishonest Patrol to be dynamic & more like PnP. Full compile. Co-Authored-By: Draygoth <65428430+Draygoth@users.noreply.github.com>
This commit is contained in:
55
_module/nss/otres_rand_sc.nss
Normal file
55
_module/nss/otres_rand_sc.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: FileName otres_rand_sc
|
||||
//:://////////////////////////////////////////////
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: smo
|
||||
//::
|
||||
//Set up the travel time remaining as a custom tag so we can use them
|
||||
//in conversation
|
||||
//Also returns FALSE if the optional encounter flag is FALSE
|
||||
//:://////////////////////////////////////////////
|
||||
//include needed for the Set Party Variable function
|
||||
#include "nw_i0_plot"
|
||||
|
||||
int StartingConditional()
|
||||
{
|
||||
object oPC=GetPCSpeaker();
|
||||
int bEncounterDone=GetLocalInt(oPC,"bEncounterDone");
|
||||
if (!(bEncounterDone)) //Allows for a flag to keep the PC in the random encounter - set it to false in the OnEnter event for the area or encounter
|
||||
return FALSE;
|
||||
int iHoursToGo=GetPLocalInt(oPC, "iHoursToGo"); //Hours to go until next point on journey
|
||||
string sHoursToGo=IntToString(iHoursToGo);
|
||||
int iTravelledHours=GetPLocalInt(oPC, "iTravelledHours"); //Hours travelled
|
||||
string sTravelledHours=IntToString(iTravelledHours);
|
||||
string sStartDestinationDesc=GetLocalString(oPC,"sStartDestinationDesc");
|
||||
string sNextDestinationDesc=GetLocalString(oPC,"sNextDestinationDesc");
|
||||
SetCustomToken(129,sTravelledHours);
|
||||
SetCustomToken(123,sHoursToGo);
|
||||
SetCustomToken(124,sStartDestinationDesc);
|
||||
SetCustomToken(127,sNextDestinationDesc);
|
||||
|
||||
object oTalker=GetPCSpeaker();
|
||||
object oFM=GetFirstFactionMember(oTalker);
|
||||
if (oFM==OBJECT_INVALID) //single player
|
||||
return TRUE;
|
||||
|
||||
// Loop to check each party members distance from the PC.
|
||||
while (GetIsObjectValid(oFM))
|
||||
{//begin while loop
|
||||
// Skip dead party members
|
||||
if (!GetIsDead(oFM))
|
||||
{//begin not dead if
|
||||
int iDistanceCheck = FloatToInt(GetDistanceToObject(oFM));
|
||||
// Check to see if oPartyMember is within 10 meters. If not, send
|
||||
// the message and exit the conditional as FALSE.
|
||||
if (iDistanceCheck > 10)
|
||||
{//begin distance check if
|
||||
// If all party members are not present do not show travel dialog
|
||||
return FALSE;
|
||||
}//end distance check if
|
||||
}//end not dead if
|
||||
oFM = GetNextFactionMember(oTalker);
|
||||
}//end while loop
|
||||
//if all within 10 m show the travel dialog
|
||||
return TRUE;
|
||||
}
|
Reference in New Issue
Block a user