80 lines
3.6 KiB
Plaintext
80 lines
3.6 KiB
Plaintext
// 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, 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;
|
|
|
|
case 7: // Sheriff's Patrol (Dragonmarsh Lowlands)
|
|
SetLocalString(oArea, sEncNum, "v2, day, 6, group, sheriff_patrol");
|
|
SetLocalString(oArea, "group_sheriff_patrol_01", "creature, ra_m_sheriff001, 1, random, 30.0, 1, 1");
|
|
SetLocalString(oArea, "group_sheriff_patrol_02", "creature, ra_m_knight001, 2, last, 0, 1, 1");
|
|
SetLocalString(oArea, "group_sheriff_patrol_03", "creature, ra_m_footmn001, 6, last, 0, 1, 1");
|
|
SetLocalString(oArea, "group_sheriff_patrol_04", "creature, ra_f_footmn001, 2, last, 0, 1, 1");
|
|
|
|
case 8: // Sheriff's Patrol (Forest of Hope)
|
|
SetLocalString(oArea, sEncNum, "v2, always, 13, group, sheriff_patrol");
|
|
SetLocalString(oArea, "group_sheriff_patrol_01", "creature, ra_m_sheriff001, 1, random, 30.0, 1, 1");
|
|
SetLocalString(oArea, "group_sheriff_patrol_02", "creature, ra_m_knight001, 2, last, 0, 1, 1");
|
|
SetLocalString(oArea, "group_sheriff_patrol_03", "creature, ra_m_footmn001, 6, last, 0, 1, 1");
|
|
SetLocalString(oArea, "group_sheriff_patrol_04", "creature, ra_f_footmn001, 2, last, 0, 1, 1");
|
|
|
|
}
|
|
}
|
|
//void main(){}
|