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.
		
			
				
	
	
		
			116 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			116 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| //:://////////////////////////////////////////////
 | |
| //:: Short description Bladebane Conversation
 | |
| //:: filename   prc_c_bladebane.nss
 | |
| //:://////////////////////////////////////////////
 | |
| /** @file
 | |
|     
 | |
| 
 | |
|     @author Tenjac
 | |
|     @date   Created  - 7/29/22
 | |
| //:://////////////////////////////////////////////
 | |
| //:://////////////////////////////////////////////
 | |
| 
 | |
| #include "inc_dynconv"
 | |
| 
 | |
| //////////////////////////////////////////////////
 | |
| /* Constant defintions                          */
 | |
| //////////////////////////////////////////////////
 | |
| 
 | |
| const int STAGE_ENTRY = 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))
 | |
|         {
 | |
|             // variable named nStage determines the current conversation node
 | |
|             // Function SetHeader to set the text displayed to the PC
 | |
|             // Function AddChoice to add a response option for the PC. The responses are show in order added
 | |
|             if(nStage == STAGE_ENTRY)
 | |
|             {
 | |
|             	// Set the header
 | |
|             	SetHeader("Choose racial type.");
 | |
|             	int i;
 | |
|             	for (i=0; i <=254; i++)
 | |
|             	{
 | |
|             		string sName = Get2daCache("racialtypes", "Constant", i);
 | |
|             		// Add responses for the PC
 | |
|             		if(sName != "")
 | |
|             		{
 | |
|             			AddChoice(sName, i, 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
 | |
|             }
 | |
|             //add more stages for more nodes with Else If clauses
 | |
|         }
 | |
| 
 | |
|         // 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)
 | |
|         {
 | |
|         	int n2daLine = nChoice--;
 | |
|         	SetLocalInt(oPC, "BladebaneRace", n2daLine);
 | |
|             // Move to another stage based on response, for example
 | |
|             //nStage = STAGE_QUUX;
 | |
|         }
 | |
| 
 | |
|         // Store the stage value. If it has been changed, this clears out the choices
 | |
|         SetStage(nStage, oPC);
 | |
|     }
 | |
| }
 |