Bugfixing pass
Bugfixing pass. Spawn swapovers. Broom!
This commit is contained in:
66
_module/nss/sparky_enc.nss
Normal file
66
_module/nss/sparky_enc.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
// Sparky predefined encounters include
|
||||
// Created By: The Amethyst Dragon
|
||||
|
||||
// Add encounter variables to oArea based on the number entered as nTable.
|
||||
// 0 = blank
|
||||
void LoadEncounterVariables(object oArea, int nTable);
|
||||
void LoadEncounterVariables(object oArea, int nTable)
|
||||
{
|
||||
if (nTable < 1) { return; }
|
||||
if (GetIsObjectValid(oArea) != TRUE) { return; }
|
||||
|
||||
// Check for existing encounter variables (maximum of 10 encounters on an area)
|
||||
int nCheckNum = GetLocalInt(oArea, "NumEnc");
|
||||
if (nCheckNum < 1) nCheckNum = 0;
|
||||
if (nCheckNum >= 10) return;
|
||||
nCheckNum = nCheckNum + 1;
|
||||
string sEncNum = "encounter_";
|
||||
if (nCheckNum < 10) sEncNum = "encounter_0";
|
||||
sEncNum = sEncNum + IntToString(nCheckNum); // encounter numbers need to be incremented for the Spawner to read them correctly
|
||||
SetLocalInt(oArea, "NumEnc", nCheckNum);
|
||||
|
||||
// In this section is where you would record your predefined encounter variables.
|
||||
// The script adds them to areas as it is called on.
|
||||
//
|
||||
// For further information on how to format this information, you can check in
|
||||
// your NWN/docs/cep/sparky_spawner folder for the Aenea_Sparky_Docs.pdf file.
|
||||
//
|
||||
// A helpful Excel file is also included in that folder to aid in speeding up the
|
||||
// variable creation.
|
||||
switch (nTable)
|
||||
{
|
||||
|
||||
case 1: // Brigand Scout
|
||||
SetLocalString(oArea, sEncNum, "v2, day, 50, creature, ra_brigand001, 1, random, 1.0, 1, 1");
|
||||
break;
|
||||
|
||||
case 2: // Bandits
|
||||
SetLocalString(oArea, sEncNum, "v2, day, 50, creature, NW_BANDIT001, 2-4, random, 1.0, 1, 1");
|
||||
|
||||
case 3: // Brigands
|
||||
SetLocalString(oArea, sEncNum, "v2, day, 12.5, group, brigands");
|
||||
SetLocalString(oArea, "group_brigands_01", "creature, ra_brigand002, 1, wp: brigands, 1.0, 1, 1");
|
||||
SetLocalString(oArea, "group_brigands_02", "creature, ra_brigand001, 2-8, last, 5.0, 1, 1");
|
||||
break;
|
||||
|
||||
case 4: // Worgs & Wolves
|
||||
SetLocalString(oArea, sEncNum, "v2, night, 12.5, group, worgs");
|
||||
SetLocalString(oArea, "group_worgs_01", "creature, NW_WORG, 1-3, wp: worgs, 1.0, 1, 1");
|
||||
SetLocalString(oArea, "group_worgs_02", "creature, NW_WOLF, 1-12, last, 5.0, 1, 1");
|
||||
break;
|
||||
|
||||
case 5: // Shadows
|
||||
SetLocalString(oArea, sEncNum, "v2, night, 7, creature, RA_SHADOW001, 2-12, random, 1.0, 1, 1");
|
||||
break;
|
||||
|
||||
case 6: // Orge & Bugbears
|
||||
SetLocalString(oArea, sEncNum, "v2, day, 7, group, ogrebugs");
|
||||
SetLocalString(oArea, "group_ogrebugs_01", "creature, NW_OGRE01, 1, wp: ogrebugs, 1.0, 1, 1");
|
||||
SetLocalString(oArea, "group_ogrebugs_02", "creature, NW_BUGBEARA, 1-2, last, 5.0, 1, 1");
|
||||
SetLocalString(oArea, "group_ogrebugs_03", "creature, NW_BUGBEARB, 1-2, last, 5.0, 1, 1");
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//void main(){}
|
Reference in New Issue
Block a user