Updated AMS marker feats. Removed arcane & divine marker feats. Updated Dread Necromancer for epic progression. Updated weapon baseitem models. Updated new weapons for crafting & npc equip. Updated prefix. Updated release archive.
112 lines
3.9 KiB
Plaintext
112 lines
3.9 KiB
Plaintext
//:://////////////////////////////////////////////
|
|
//:: Short description
|
|
//:: filename
|
|
//:://////////////////////////////////////////////
|
|
/** @file
|
|
Long description
|
|
|
|
|
|
@author Joe Random
|
|
@date Created - yyyy.mm.dd
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:://////////////////////////////////////////////
|
|
|
|
#include "prc_alterations"
|
|
#include "inc_dynconv"
|
|
|
|
//////////////////////////////////////////////////
|
|
/* Constant defintions */
|
|
//////////////////////////////////////////////////
|
|
|
|
const int STAGE_ALIGNMENT = 0;
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
/* Aid functions */
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
/* Main function */
|
|
//////////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
/* Get the value of the local variable set by the conversation script calling
|
|
* this script. Values:
|
|
* DYNCONV_ABORTED Conversation aborted
|
|
* DYNCONV_EXITED Conversation exited via the exit node
|
|
* DYNCONV_SETUP_STAGE System's reply turn
|
|
* 0 Error - something else called the script
|
|
* Other The user made a choice
|
|
*/
|
|
int nValue = GetLocalInt(oPC, DYNCONV_VARIABLE);
|
|
// The stage is used to determine the active conversation node.
|
|
// 0 is the entry node.
|
|
int nStage = GetStage(oPC);
|
|
|
|
// Check which of the conversation scripts called the scripts
|
|
if(nValue == 0) // All of them set the DynConv_Var to non-zero value, so something is wrong -> abort
|
|
return;
|
|
|
|
if(nValue == DYNCONV_SETUP_STAGE)
|
|
{
|
|
// Check if this stage is marked as already set up
|
|
// This stops list duplication when scrolling
|
|
if(!GetIsStageSetUp(nStage, oPC))
|
|
{
|
|
if(nStage == STAGE_ALIGNMENT)
|
|
{
|
|
SetHeader("How do you want to change your alignment?");
|
|
AddChoice("Good", 1, oPC);
|
|
AddChoice("Evil", 2, oPC);
|
|
AddChoice("Lawful", 3, oPC);
|
|
AddChoice("Chaotic", 4, oPC);
|
|
AddChoice("Neutral", 5, oPC);
|
|
MarkStageSetUp(nStage, oPC); // This prevents the setup being run for this stage again until MarkStageNotSetUp is called for it
|
|
SetDefaultTokens(); // Set the next, previous, exit and wait tokens to default values
|
|
}
|
|
}
|
|
|
|
// Do token setup
|
|
SetupTokens();
|
|
}
|
|
// End of conversation cleanup
|
|
else if(nValue == DYNCONV_EXITED)
|
|
{
|
|
// Add any locals set through this conversation
|
|
}
|
|
// Abort conversation cleanup.
|
|
// NOTE: This section is only run when the conversation is aborted
|
|
// while aborting is allowed. When it isn't, the dynconvo infrastructure
|
|
// handles restoring the conversation in a transparent manner
|
|
else if(nValue == DYNCONV_ABORTED)
|
|
{
|
|
// Add any locals set through this conversation
|
|
}
|
|
// Handle PC responses
|
|
else
|
|
{
|
|
// variable named nChoice is the value of the player's choice as stored when building the choice list
|
|
// variable named nStage determines the current conversation node
|
|
int nChoice = GetChoice(oPC);
|
|
if(nStage == STAGE_ALIGNMENT)
|
|
{
|
|
switch(nChoice)
|
|
{
|
|
case 1: AdjustAlignment(oPC, ALIGNMENT_GOOD, 100); break;
|
|
case 2: AdjustAlignment(oPC, ALIGNMENT_EVIL, 100); break;
|
|
case 3: AdjustAlignment(oPC, ALIGNMENT_LAWFUL, 100); break;
|
|
case 4: AdjustAlignment(oPC, ALIGNMENT_CHAOTIC, 100); break;
|
|
case 5: AdjustAlignment(oPC, ALIGNMENT_NEUTRAL, 100); break;
|
|
}
|
|
}
|
|
|
|
// Store the stage value. If it has been changed, this clears out the choices
|
|
SetStage(nStage, oPC);
|
|
}
|
|
}
|