//::////////////////////////////////////////////// //:: 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_ENTRY = 0; const int STAGE_BIOWARE_VISUAL_EFFECT = 10; const int STAGE_SHADEGUY_SCRIPT_EFFECT = 20; const int STAGE_GAONENG_SCRIPT_EFFECT = 30; ////////////////////////////////////////////////// /* Aid functions */ ////////////////////////////////////////////////// ////////////////////////////////////////////////// /* Main function */ ////////////////////////////////////////////////// void AddVisualEffectList(int nMin, int nMax, int nInterval); void AddVisualEffectList(int nMin, int nMax, int nInterval) { int i; for(i=nMin; i 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_ENTRY) { SetHeader("Select an effect category:"); AddChoice("Bioware effects", 1); AddChoice("Gaoneng's Pentagrams & Summoning Circles", 2); AddChoice("Shadguy's effects", 3); AddChoice("apply a random effect", 4); AddChoice("clear any lingering effects", -1); 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 } else if(nStage == STAGE_BIOWARE_VISUAL_EFFECT) { SetHeader("Select an effect:"); AddVisualEffectList(0, 600, 100); 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 } else if(nStage == STAGE_SHADEGUY_SCRIPT_EFFECT) { SetHeader("Select an effect:"); AddVisualEffectList(1000, 1400, 100); 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 } else if(nStage == STAGE_GAONENG_SCRIPT_EFFECT) { SetHeader("Select an effect:"); AddChoice("Circle", 1); AddChoice("Spiral", 2); AddChoice("Spring", 3); AddChoice("Polygon", 4); AddChoice("PolygonalSpiral", 5); AddChoice("PolygonalSpring", 6); AddChoice("Pentacle", 7); AddChoice("PentaclicSpiral", 8); AddChoice("PentaclicSpring", 9); AddChoice("Star", 10); AddChoice("StarSpiral", 11); AddChoice("StarSpring", 12); AddChoice("Hemisphere", 13); AddChoice("Sphere", 14); 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_ENTRY) { if(nChoice == 1) nStage = STAGE_BIOWARE_VISUAL_EFFECT; else if(nChoice == 2) nStage = STAGE_GAONENG_SCRIPT_EFFECT; else if(nChoice == 3) nStage = STAGE_SHADEGUY_SCRIPT_EFFECT; else if(nChoice == 4) { //random int nRandom = Random(3); if(nRandom == 0 || nRandom == 1) { int nVFX; if(nRandom == 0) nVFX = Random(580); else if(nRandom == 1) nVFX = Random(327)+1000; ApplyStandardEffect(Random(14)+1, oTarget); } else DrawScriptedEffect(nChoice, oTarget); } else if(nChoice == -1) AssignCommand(oTarget, ForceRest(oTarget)); } else if(nStage == STAGE_BIOWARE_VISUAL_EFFECT || nStage == STAGE_SHADEGUY_SCRIPT_EFFECT) { ApplyStandardEffect(nChoice, oTarget); } else if(nStage == STAGE_GAONENG_SCRIPT_EFFECT) { DrawScriptedEffect(nChoice, oTarget); } // Store the stage value. If it has been changed, this clears out the choices SetStage(nStage, oPC); } }