Merged redundant hak files

Merged redundant hak files.  Moved hak scripts into module.  Updated gitignore.  Full Compile.  Added release folder & archive.
This commit is contained in:
Jaysyn904
2024-12-12 15:02:17 -05:00
parent f58f9a29b4
commit e2f4ba74d5
3227 changed files with 52239 additions and 55 deletions

View File

@@ -0,0 +1,9 @@
// Custom AI - Challenging
void main()
{
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
DeleteLocalString(GetPCSpeaker(),"sCustParm");
SetLocalInt(oMod,"nAISetting",2);
DeleteLocalString(oMod,"sAICode"+sID);
}

View File

@@ -0,0 +1,19 @@
// CUSTOM AI
void main()
{
object oMod=GetModule();
int nN;
string sID="DWF";
SetLocalString(GetPCSpeaker(),"sCustParm",sID);
SetCustomToken(600,"Dwarf");
nN=1;
while(nN<6)
{ // build custom tokens
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nN)))>0)
{ // custom AI
SetCustomToken(600+nN,GetLocalString(oMod,"sCustomAIName"+sID+IntToString(nN)));
} // custom AI
nN++;
} // build custom tokens
}

View File

@@ -0,0 +1,19 @@
// CUSTOM AI
void main()
{
object oMod=GetModule();
int nN;
string sID="SPID";
SetLocalString(GetPCSpeaker(),"sCustParm",sID);
SetCustomToken(600,"Spider Cultists");
nN=1;
while(nN<6)
{ // build custom tokens
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nN)))>0)
{ // custom AI
SetCustomToken(600+nN,GetLocalString(oMod,"sCustomAIName"+sID+IntToString(nN)));
} // custom AI
nN++;
} // build custom tokens
}

View File

@@ -0,0 +1,19 @@
// CUSTOM AI
void main()
{
object oMod=GetModule();
int nN;
string sID="UNC";
SetLocalString(GetPCSpeaker(),"sCustParm",sID);
SetCustomToken(600,"Unclean");
nN=1;
while(nN<6)
{ // build custom tokens
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nN)))>0)
{ // custom AI
SetCustomToken(600+nN,GetLocalString(oMod,"sCustomAIName"+sID+IntToString(nN)));
} // custom AI
nN++;
} // build custom tokens
}

View File

@@ -0,0 +1,19 @@
// CUSTOM AI
void main()
{
object oMod=GetModule();
int nN;
string sID="UND";
SetLocalString(GetPCSpeaker(),"sCustParm",sID);
SetCustomToken(600,"Undead");
nN=1;
while(nN<6)
{ // build custom tokens
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nN)))>0)
{ // custom AI
SetCustomToken(600+nN,GetLocalString(oMod,"sCustomAIName"+sID+IntToString(nN)));
} // custom AI
nN++;
} // build custom tokens
}

View File

@@ -0,0 +1,12 @@
// Custom AI
void main()
{
int nNum=1;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
string sS;
DeleteLocalString(GetPCSpeaker(),"sCustParm");
SetLocalInt(oMod,"nAISetting",2);
sS=GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum));
SetLocalString(oMod,"sAICode"+sID,sS);
}

View File

@@ -0,0 +1,12 @@
// Custom AI
void main()
{
int nNum=2;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
string sS;
DeleteLocalString(GetPCSpeaker(),"sCustParm");
SetLocalInt(oMod,"nAISetting",2);
sS=GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum));
SetLocalString(oMod,"sAICode"+sID,sS);
}

View File

@@ -0,0 +1,12 @@
// Custom AI
void main()
{
int nNum=3;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
string sS;
DeleteLocalString(GetPCSpeaker(),"sCustParm");
SetLocalInt(oMod,"nAISetting",2);
sS=GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum));
SetLocalString(oMod,"sAICode"+sID,sS);
}

View File

@@ -0,0 +1,12 @@
// Custom AI
void main()
{
int nNum=4;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
string sS;
DeleteLocalString(GetPCSpeaker(),"sCustParm");
SetLocalInt(oMod,"nAISetting",2);
sS=GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum));
SetLocalString(oMod,"sAICode"+sID,sS);
}

View File

@@ -0,0 +1,12 @@
// Custom AI
void main()
{
int nNum=5;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
string sS;
DeleteLocalString(GetPCSpeaker(),"sCustParm");
SetLocalInt(oMod,"nAISetting",2);
sS=GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum));
SetLocalString(oMod,"sAICode"+sID,sS);
}

View File

@@ -0,0 +1,9 @@
// Custom AI - Text Appears When
int StartingConditional()
{
int nNum=1;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum)))>0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// Custom AI - Text Appears When
int StartingConditional()
{
int nNum=2;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum)))>0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// Custom AI - Text Appears When
int StartingConditional()
{
int nNum=3;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum)))>0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// Custom AI - Text Appears When
int StartingConditional()
{
int nNum=4;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum)))>0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// Custom AI - Text Appears When
int StartingConditional()
{
int nNum=5;
object oMod=GetModule();
string sID=GetLocalString(GetPCSpeaker(),"sCustParm");
if (GetStringLength(GetLocalString(oMod,"sCustomAI"+sID+IntToString(nNum)))>0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 0);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 1);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_10
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 10);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_11
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 11);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_12
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 12);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_13
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 13);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_14
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 14);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_15
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 15);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 2);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 3);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 4);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 5);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 6);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 7);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_1
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 8);
}

View File

@@ -0,0 +1,13 @@
//::///////////////////////////////////////////////
//:: FileName at_set_9
//:://////////////////////////////////////////////
//:://////////////////////////////////////////////
//:: Created By: Script Wizard
//:: Created On: 5/8/2004 2:17:26 PM
//:://////////////////////////////////////////////
void main()
{
// Set the variables
SetLocalInt(GetPCSpeaker(), "nParm", 9);
}

View File

@@ -0,0 +1,5 @@
int StartingConditional()
{
if (GetLocalInt(GetModule(),"bCOMBAT_AI_OFF")!=TRUE&&GetLocalInt(OBJECT_SELF,"bCOMBAT_AI_ON")!=0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","caster");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","flee");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","hold");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","melee");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","ranged");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","stealth");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","summon");
}

View File

@@ -0,0 +1,4 @@
void main()
{
SetLocalString(OBJECT_SELF,"sCOMBAT_AI_TYPE","support");
}

View File

@@ -0,0 +1,173 @@
////////////////////////////////////////////////////////////////////////////////
// npcact_aps - APS/NWNX Include replacement for NPC ACTIVITIES
// By Deva Bryson Winblood. 02/05/2005
////////////////////////////////////////////////////////////////////////////////
// Edit these function wrappers to make the script support whichever database
// sysyem you would like it to. It defaults to Bioware... but, nwnx/aps default
// support is available if you simply uncomment out those lines and comment the
// bioware lines out.
//#include "aps_include" // uncomment this line out if you use this DB type
//////////////////////
// PROTOTYPES
//////////////////////
/////// WRAPPERS ////////////////////////////////////////////
// Set oObject's persistent string variable sVarName to sValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void NPCSetPersistentString(object oObject, string sVarName, string sValue, int iExpiration = 0, string sTable = "pwdata");
// Set oObject's persistent integer variable sVarName to iValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void NPCSetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration = 0, string sTable = "pwdata");
// Set oObject's persistent float variable sVarName to fValue
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
void NPCSetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration = 0, string sTable = "pwdata");
// Set oObject's persistent location variable sVarName to lLocation
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
// This function converts location to a string for storage in the database.
void NPCSetPersistentLocation(object oObject, string sVarName, location lLocation, int iExpiration = 0, string sTable = "pwdata");
// Set oObject's persistent vector variable sVarName to vVector
// Optional parameters:
// iExpiration: Number of days the persistent variable should be kept in database (default: 0=forever)
// sTable: Name of the table where variable should be stored (default: pwdata)
// This function converts vector to a string for storage in the database.
void NPCSetPersistentVector(object oObject, string sVarName, vector vVector, int iExpiration = 0, string sTable = "pwdata");
// Get oObject's persistent string variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: ""
string NPCGetPersistentString(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent integer variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
int NPCGetPersistentInt(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent float variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
float NPCGetPersistentFloat(object oObject, string sVarName, string sTable = "pwdata");
// Get oObject's persistent location variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
location NPCGetPersistentLocation(object oObject, string sVarname, string sTable = "pwdata");
// Get oObject's persistent vector variable sVarName
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
// * Return value on error: 0
vector NPCGetPersistentVector(object oObject, string sVarName, string sTable = "pwdata");
// Delete persistent variable sVarName stored on oObject
// Optional parameters:
// sTable: Name of the table where variable is stored (default: pwdata)
void NPCDeletePersistentVariable(object oObject, string sVarName, string sTable = "pwdata");
//////////////////////
// FUNCTIONS
//////////////////////
/////////////////////////////////////////////////////////////////////
// WRAPPERS
/////////////////////////////////////////////////////////////////////
void NPCSetPersistentString(object oObject, string sVarName, string sValue, int iExpiration =
0, string sTable = "pwdata")
{
// SetPersistentString(oObject,sVarName,sValue,iExpiration,sTable);
SetCampaignString(GetName(GetModule())+sTable,sVarName,sValue,oObject);
}
string NPCGetPersistentString(object oObject, string sVarName, string sTable = "pwdata")
{
// return GetPersistentString(oObject,sVarName,sTable);
return GetCampaignString(GetName(GetModule())+sTable,sVarName,oObject);
}
void NPCSetPersistentInt(object oObject, string sVarName, int iValue, int iExpiration =
0, string sTable = "pwdata")
{
//SetPersistentString(oObject, sVarName, IntToString(iValue), iExpiration, sTable);
SetCampaignInt(GetName(GetModule())+sTable,sVarName,iValue,oObject);
}
int NPCGetPersistentInt(object oObject, string sVarName, string sTable = "pwdata")
{
//return StringToInt(NPCGetPersistentString(oObject, sVarName, sTable));
return GetCampaignInt(GetName(GetModule())+sTable,sVarName,oObject);
}
void NPCSetPersistentFloat(object oObject, string sVarName, float fValue, int iExpiration =
0, string sTable = "pwdata")
{
// SetPersistentString(oObject, sVarName, FloatToString(fValue), iExpiration, sTable);
SetCampaignFloat(GetName(GetModule())+sTable,sVarName,fValue,oObject);
}
float NPCGetPersistentFloat(object oObject, string sVarName, string sTable = "pwdata")
{
//return StringToFloat(NPCGetPersistentString(oObject, sVarName, sTable));
return GetCampaignFloat(GetName(GetModule())+sTable,sVarName,oObject);
}
void NPCSetPersistentLocation(object oObject, string sVarName, location lLocation, int iExpiration =
0, string sTable = "pwdata")
{
//SetPersistentString(oObject, sVarName, APSLocationToString(lLocation), iExpiration, sTable);
SetCampaignLocation(GetName(GetModule())+sTable,sVarName,lLocation,oObject);
}
location NPCGetPersistentLocation(object oObject, string sVarName, string sTable = "pwdata")
{
//return APSStringToLocation(NPCGetPersistentString(oObject, sVarName, sTable));
return GetCampaignLocation(GetName(GetModule())+sTable,sVarName,oObject);
}
void NPCSetPersistentVector(object oObject, string sVarName, vector vVector, int iExpiration =
0, string sTable = "pwdata")
{
//SetPersistentString(oObject, sVarName, APSVectorToString(vVector), iExpiration, sTable);
SetCampaignVector(GetName(GetModule())+sTable,sVarName,vVector,oObject);
}
vector NPCGetPersistentVector(object oObject, string sVarName, string sTable = "pwdata")
{
// return APSStringToVector(NPCGetPersistentString(oObject, sVarName, sTable));
return GetCampaignVector(GetName(GetModule())+sTable,sVarName,oObject);
}
void NPCDeletePersistentVariable(object oObject, string sVarName, string sTable = "pwdata")
{
// DeletePersistentVariable(oObject,sVarName,sTable);
DeleteCampaignVariable(GetName(GetModule())+sTable,sVarName,oObject);
}
/////////////////////////////////////////////////////////////////
// END OF WRAPPERS
/////////////////////////////////////////////////////////////////
//void main(){}

View File

@@ -0,0 +1,86 @@
////////////////////////////////////////////////////////////////////////////////
// NPCACT_AREA_ENT - This function should be called from an areas OnEnter event
// if there are going to be LAG4 NPCs in the area that need to be respawned when
// PCs enter the area. NOTE: A waypoint tagged LAG4_RESPAWN_TEMP must be placed
// in the module somewhere for the creature to be initially spawned for TAG to
// be discovered.
//------------------------------------------------------------------------------
// By Deva Bryson Winblood. 06/22/2004
////////////////////////////////////////////////////////////////////////////////
#include "npcactivitiesh"
#include "npcactstackh"
/////////////////////
// PROTOTYPES
/////////////////////
////////////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetEnteringObject();
struct StackHeader stH=fnGetLocalStack("stLAG4");
object oNPC;
object oTemp=GetWaypointByTag("LAG4_RESPAWN_TEMP");
string sStore;
string sRes;
int nCHP;
int nHP;
int nDmg;
effect eEff;
object oPost;
if (GetIsPC(oPC)&&GetIsObjectValid(oTemp))
{ // PC and TEMP ok
if (DEBUG_NPCACT_ON) SendMessageToPC(oPC,"LAG4 Area entered... respawning NPCs #:"+IntToString(stH.nNum));
while(stH.nNum>0)
{ // items on the stack
stH=fnPopStack(stH);
sStore=stH.sRet;
if (DEBUG_NPCACT_ON) SendMessageToPC(oPC," "+sStore);
if (GetStringLength(sStore)>2)
{ // valid string returned
sRes=fnParse(sStore,"/");
sStore=fnRemoveParsed(sStore,sRes,"/");
nCHP=StringToInt(sStore);
oNPC=CreateObject(OBJECT_TYPE_CREATURE,sRes,GetLocation(oTemp));
if (DEBUG_NPCACT_ON) SendMessageToPC(oPC," Created:"+sRes);
if (GetIsObjectValid(oNPC))
{ // creature created
oPost=GetNearestObjectByTag("POST_"+GetTag(oNPC),oPC,1);
if (!GetIsObjectValid(oPost))
{ // try night
oPost=GetNearestObjectByTag("NIGHT_"+GetTag(oNPC),oPC,1);
} // try night
if (!GetIsObjectValid(oPost))
{ // try day module wide
oPost=GetWaypointByTag("POST_"+GetTag(oNPC));
} // try day module wide
if (!GetIsObjectValid(oPost))
{ // try night module wide
oPost=GetWaypointByTag("NIGHT_"+GetTag(oNPC));
} // try night module wide
if (GetIsObjectValid(oPost))
{ // valid post
nHP=GetCurrentHitPoints(oNPC);
if (nHP>nCHP)
{ // need to adjust hit points
nDmg=nHP-nCHP;
eEff=EffectDamage(nDmg);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eEff,oNPC,1.0);
} // need to adjust hit points
if (DEBUG_NPCACT_ON) SendMessageToPC(oPC," Moved:"+GetTag(oNPC));
AssignCommand(oNPC,JumpToObject(oPost));
} // valid post
else
{ // could not find post
SendMessageToPC(oPC,"NPC ACTIVITIES 6.0 ERROR: Could not find a POST_"+GetTag(oNPC)+" to respawn a LAG4 NPC at.");
DestroyObject(oNPC);
} // could not find post
} // creature created
} // valid string returned
} // items on the stack
} // PC and TEMP ok
else if (GetIsObjectValid(oTemp)==FALSE)
{
SendMessageToPC(oPC,"NPC ACTIVITIES 6.0 ERROR: Cannot find waypoint with tag 'LAG4_RESPAWN_TEMP'");
}
}
////////////////////////////////////////////////////////////////////////// MAIN

View File

@@ -0,0 +1,12 @@
////////////////////////////////////////////////////////////////////////////////
// NPCACT_AREA_EX - This function was needed for NPC ACTIVITIES 5.0 and is actually
// a do nothing script in NPC ACTIVITIES 6.0 only provided to overwrite the
// existing script and thus reduce CPU utilization.
//------------------------------------------------------------------------------
// By Deva Bryson Winblood. 06/22/2004
////////////////////////////////////////////////////////////////////////////////
void main()
{
}

View File

@@ -0,0 +1,29 @@
// npcact_cms_about
int StartingConditional()
{
object oMod=GetModule();
int nN;
object oItem=GetLocalObject(GetPCSpeaker(),"oCMSItem");
int nCurrency=GetLocalInt(oItem,"nCurrency");
int nV;
string sFinal="";
string sS;
sS=GetLocalString(oMod,"sMSCurrencyName"+IntToString(nCurrency));
sFinal=sS+" ";
nN=1;
sS=GetLocalString(oMod,"sMSCoinName"+IntToString(nCurrency)+"_"+IntToString(nN));
while(GetStringLength(sS)>0)
{ // monetary system
sFinal=sFinal+sS+" (abbreviation: ";
sS=GetLocalString(oMod,"sMSCoinAbbr"+IntToString(nCurrency)+"_"+IntToString(nN));
sFinal=sFinal+sS+") Value:";
nV=GetLocalInt(oMod,"nMSCoinValue"+IntToString(nCurrency)+"_"+IntToString(nN));
sFinal=sFinal+IntToString(nV)+" MUs, ";
nN++;
sS=GetLocalString(oMod,"sMSCoinName"+IntToString(nCurrency)+"_"+IntToString(nN));
} // monetary system
sFinal=GetStringLeft(sFinal,GetStringLength(sFinal)-2);
sFinal=sFinal+".";
SetCustomToken(999994,sFinal);
return TRUE;
}

View File

@@ -0,0 +1,58 @@
// npcact_cms_aend - end of selection process
#include "npcact_h_money"
void main()
{
object oPC=GetPCSpeaker();
int nMode=GetLocalInt(oPC,"nCMSMode");
int nSelection=GetLocalInt(oPC,"nCMSSelection");
object oTarget=GetLocalObject(oPC,"oCMSTarget");
float fX=GetLocalFloat(oPC,"fCMSX");
float fZ=GetLocalFloat(oPC,"fCMSZ");
float fY=GetLocalFloat(oPC,"fCMSY");
object oArea=GetLocalObject(oPC,"oCMSTargetArea");
vector vVec;
location lLoc;
object oItem=GetLocalObject(oPC,"oCMSItem");
object oItem2;
int nN;
int nCurrency=GetLocalInt(oItem,"nCurrency");
object oMod=GetModule();
string sS;
vVec.x = fX;
vVec.y = fY;
vVec.z = fZ;
lLoc=Location(oArea,vVec,0.0);
DeleteLocalInt(oPC,"nCMSMode");
DeleteLocalInt(oPC,"nCMSSelection");
DeleteLocalObject(oPC,"oCMSTarget");
DeleteLocalObject(oPC,"oCMSTargetArea");
DeleteLocalFloat(oPC,"fCMSX");
DeleteLocalFloat(oPC,"fCMSY");
DeleteLocalFloat(oPC,"fCMSZ");
switch(nMode)
{ // MODE SWITCH -----------------------------------
case 1: { // split pile mode
SplitCoins(oPC,oItem,nSelection);
break;
} // split pile mode
case 2: { // give coins
if (GetIsPC(oTarget))
{ // giving to another PC
nN=GetLocalInt(oMod,"nMSCoin_R_"+GetResRef(oItem)+"_"+IntToString(nCurrency));
sS=GetLocalString(oMod,"sMSCoinAbbr"+IntToString(nCurrency)+"_"+IntToString(nN));
AssignCommand(oTarget,TakeCoins(oPC,nSelection,sS,nCurrency));
sS=GetLocalString(oMod,"sMSCoinName"+IntToString(nCurrency)+"_"+IntToString(nN));
SendMessageToPC(oTarget,GetName(oPC)+" has given you "+IntToString(nSelection)+" "+sS+".");
} // giving to another PC
else
{ // giving to an NPC
nN=GetLocalInt(oMod,"nMSCoin_R_"+GetResRef(oItem)+"_"+IntToString(nCurrency));
sS=GetLocalString(oMod,"sMSCoinAbbr"+IntToString(nCurrency)+"_"+IntToString(nN));
TakeCoins(oPC,nSelection,sS,nCurrency,TRUE);
CreateCoins(oTarget,lLoc,nSelection,sS,nCurrency);
} // giving to an NPC
break;
} // give coins
default: break;
} // MODE SWITCH -----------------------------------
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_amrg - merge piles
#include "npcact_h_money"
void main()
{
object oPC=GetPCSpeaker();
object oItem=GetLocalObject(oPC,"oCMSItem");
object oTarget=GetLocalObject(oPC,"oCMSTarget");
MergeCoins(oPC,oItem,oTarget);
}

View File

@@ -0,0 +1,14 @@
// npcact_cms_ca1 - Set Mode for SPLIT
void main()
{
object oPC=GetPCSpeaker();
object oItem=GetLocalObject(oPC,"oCMSItem");
int nCurr=GetLocalInt(oItem,"nCurrency");
int nCoins=GetLocalInt(oItem,"nCoins");
string sS;
SetLocalInt(oPC,"nCMSMax",(nCoins-1)); // must leave at least one coin original stack
sS="You have "+IntToString(nCoins)+" of those coins that can be split.";
SetLocalString(oPC,"sCMSSelection",sS);
DeleteLocalInt(oPC,"nCMSSelection");
SetLocalInt(oPC,"nCMSMode",1);
}

View File

@@ -0,0 +1,14 @@
// npcact_cms_cag - Set Mode for Give
void main()
{
object oPC=GetPCSpeaker();
object oItem=GetLocalObject(oPC,"oCMSItem");
int nCurr=GetLocalInt(oItem,"nCurrency");
int nCoins=GetLocalInt(oItem,"nCoins");
string sS;
SetLocalInt(oPC,"nCMSMax",nCoins); // must leave at least one coin original stack
sS="You have "+IntToString(nCoins)+" of those coins that you can give to "+GetName(GetLocalObject(oPC,"oCMSTarget"))+".";
SetLocalString(oPC,"sCMSSelection",sS);
DeleteLocalInt(oPC,"nCMSSelection");
SetLocalInt(oPC,"nCMSMode",2);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_can10
void main()
{
int nAmount=-10000;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_can1h
void main()
{
int nAmount=-100;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_can1k
void main()
{
int nAmount=-1000;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_can1t
void main()
{
int nAmount=-10;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_can1z
void main()
{
int nAmount=-1;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cap10
void main()
{
int nAmount=10000;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cap1h
void main()
{
int nAmount=100;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cap1k
void main()
{
int nAmount=1000;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cap1h
void main()
{
int nAmount=10;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cap1z
void main()
{
int nAmount=1;
object oPC=GetPCSpeaker();
int nS=GetLocalInt(oPC,"nCMSSelection");
nS=nS+nAmount;
SetLocalInt(oPC,"nCMSSelection",nS);
}

View File

@@ -0,0 +1,18 @@
// npcact_cms_ct1 - Target selected with coins was self
#include "npcact_h_money"
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oTarget=GetLocalObject(oPC,"oCMSTarget");
object oItem=GetLocalObject(oPC,"oCMSItem");
string sS;
int nC=GetLocalInt(oItem,"nCurrency");
if (oTarget==oPC)
{ // self target
sS=GetWealthCarriedString(oPC,nC);
SetCustomToken(999990,sS);
return TRUE;
} // self target
return FALSE;
}

View File

@@ -0,0 +1,14 @@
// npcact_cms_cthf - Thieving
#include "npcact_h_money"
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oTarget=GetLocalObject(oPC,"oCMSTarget");
object oItem=GetLocalObject(oPC,"oCMSItem");
if (GetObjectType(oTarget)==OBJECT_TYPE_CREATURE&&oTarget!=oPC)
{ // self target
if (GetLocalInt(oPC,"bCMSDoThief")==TRUE) return TRUE;
} // self target
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_ctn10 = - 10000 okay
int StartingConditional()
{
int nAmount=-10000;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount>=0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_ctn1h = - 100 okay
int StartingConditional()
{
int nAmount=-100;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount>=0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_ctn1k = - 1000 okay
int StartingConditional()
{
int nAmount=-1000;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount>=0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_ctn1t = - 10 okay
int StartingConditional()
{
int nAmount=-10;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount>=0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_ctn1z = - 1 okay
int StartingConditional()
{
int nAmount=-1;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount>=0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cts10 = + 10K okay
int StartingConditional()
{
int nAmount=10000;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount<=nMax) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cts1h = + 1h okay
int StartingConditional()
{
int nAmount=100;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount<=nMax) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cts1k = + 1K okay
int StartingConditional()
{
int nAmount=1000;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount<=nMax) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cts1t = + 10 okay
int StartingConditional()
{
int nAmount=10;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount<=nMax) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,9 @@
// npcact_cms_cts1z = + 1 okay
int StartingConditional()
{
int nAmount=1;
int nMax=GetLocalInt(GetPCSpeaker(),"nCMSMax");
int nCur=GetLocalInt(GetPCSpeaker(),"nCMSSelection");
if (nCur+nAmount<=nMax) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,8 @@
// npcact_cms_ctsok - Is it okay to split?
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oItem=GetLocalObject(oPC,"oCMSItem");
if (GetLocalInt(oItem,"nCoins")>1) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,10 @@
// npcact_cms_ctst2 - Count specific amount of coins
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oItem=GetLocalObject(oPC,"oCMSItem");
int nAmount=GetLocalInt(oItem,"nCoins");
SetCustomToken(999993,IntToString(nAmount));
return TRUE;
}

View File

@@ -0,0 +1,11 @@
// npcact_cms_cts3
int StartingConditional()
{
object oPC=GetPCSpeaker();
string sS=GetLocalString(oPC,"sCMSSelection");
int nS=GetLocalInt(oPC,"nCMSSelection");
SetCustomToken(999991,sS);
SetCustomToken(999992,IntToString(nS));
if (GetLocalInt(oPC,"nCMSMode")>0) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,30 @@
///////////////////////////////////////////////////////////////////////
// npcact_cms_gpcon - NPC ACTIVITIES 6.0 - Custom Monetary System
// OnAcquire Execute Script for converting gold
// By Deva Bryson Winblood. 02/23/2005
///////////////////////////////////////////////////////////////////////
#include "x2_inc_switches"
#include "npcact_h_money"
void main()
{
object oItem = GetModuleItemAcquired();
int bCap=FALSE;
// * Generic Item Script Execution Code
// * If MODULE_SWITCH_EXECUTE_TAGBASED_SCRIPTS is set to TRUE on the module,
// * it will execute a script that has the same name as the item's tag
// * inside this script you can manage scripts for all events by checking against
// * GetUserDefinedItemEventNumber(). See x2_it_example.nss
bCap=AcquireCoins(oItem,GetModuleItemAcquiredBy());
if (GetModuleSwitchValue(MODULE_SWITCH_ENABLE_TAGBASED_SCRIPTS) == TRUE&&!bCap)
{
SetUserDefinedItemEventNumber(X2_ITEM_EVENT_ACQUIRE);
int nRet = ExecuteScriptAndReturnInt(GetUserDefinedItemEventScriptName(oItem),OBJECT_SELF);
if (nRet == X2_EXECUTE_SCRIPT_END)
{
return;
}
}
}

View File

@@ -0,0 +1,11 @@
// npcact_cms_tgiv
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oTarget=GetLocalObject(oPC,"oCMSTarget");
if (GetObjectType(oTarget)==OBJECT_TYPE_CREATURE||GetIsPC(oTarget))
{ // test 1
if (oTarget!=oPC) return TRUE;
} // test 1
return FALSE;
}

View File

@@ -0,0 +1,6 @@
// npcact_cms_thfc - Delete thief skill flag
void main()
{
object oPC=GetPCSpeaker();
DeleteLocalInt(oPC,"bCMSDoThief");
}

View File

@@ -0,0 +1,8 @@
// npcact_cms_tloc
int StartingConditional()
{
object oTarget=GetLocalObject(GetPCSpeaker(),"oCMSTarget");
int nOT=GetObjectType(oTarget);
if (nOT!=OBJECT_TYPE_CREATURE&&nOT!=OBJECT_TYPE_ITEM&&nOT!=OBJECT_TYPE_PLACEABLE&&nOT!=OBJECT_TYPE_DOOR) return TRUE;
return FALSE;
}

View File

@@ -0,0 +1,15 @@
// npcact_cms_tmrg
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oItem=GetLocalObject(oPC,"oCMSItem");
object oTarget=GetLocalObject(oPC,"oCMSTarget");
if (GetObjectType(oTarget)==OBJECT_TYPE_ITEM)
{ // test 1
if (GetResRef(oItem)==GetResRef(oTarget)&&GetTag(oItem)==GetTag(oTarget))
{ // test 2
if (oItem!=oTarget) return TRUE;
} // test 2
} // test 1
return FALSE;
}

View File

@@ -0,0 +1,11 @@
// npcact_cms_tplac
int StartingConditional()
{
object oPC=GetPCSpeaker();
object oTarget=GetLocalObject(oPC,"oCMSTarget");
if (GetObjectType(oTarget)==OBJECT_TYPE_PLACEABLE)
{ // test 1
if (GetHasInventory(oTarget)) return TRUE;
} // test 1
return FALSE;
}

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=1;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=10;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=11;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=12;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=13;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=2;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=3;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=4;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=5;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=6;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=7;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=8;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,58 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_A# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=9;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
fnConvDebug(oPC,"npcact_cnv_a1: [Depth="+IntToString(nDepth)+" Consecutive="+IntToString(nConsecutive)+"]");
fnConvDebug(oPC," parameter:"+sS);
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
if (!(GetLocalInt(oPC,"nGNBConvDepth")!=nDepth||GetLocalInt(oPC,"nGNBConvConsec")!=nConsecutive))
{ // don't speak some more
fnConvDebug(oPC," don't fire custom conversation again.");
AssignCommand(oMe,ClearAllActions());
AssignCommand(oMe,ActionStartConversation(oPC,"npcact_cust_end",FALSE,FALSE));
} // don't speak some more
} // found control variable
fnConvDebug(oPC,"exit npcact_cnv_a1: [Depth="+IntToString(GetLocalInt(oPC,"nGNBConvDepth"))+" Consecutive="+IntToString(GetLocalInt(oPC,"nGNBConvConsec"))+"]");
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,49 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_ACT# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood. 09/03/2004
//---------------------------------------------------------------------------
// This is the actions portion of custom conversation for the NPCs speech.
//////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
//////////////////////////
// CONSTANTS
//////////////////////////
const int CTEST_NUM=1;
//////////////////////////
// PROTOTYPES
//////////////////////////
////////////////////////////////////////////////////////////////// MAIN
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
string sS;
string sTest;
string sAct;
string sLang;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvNode"+IntToString(nDepth)+"_"+IntToString(nConsecutive));
if (GetStringLength(sS)>0)
{ // found control variable
sLang=fnParse(sS);
sS=fnRemoveParsed(sS,sLang);
sTest=fnParse(sS);
sS=fnRemoveParsed(sS,sTest);
sAct=fnParse(sS);
if (GetStringLength(sAct)>0&&sAct!="NA"&&sAct!="na"&&sAct!="0")
{ // process actions
fnConvActions(oMe,oPC,sAct);
} // process actions
} // found control variable
}
////////////////////////////////////////////////////////////////// MAIN
//////////////////////////
// FUNCTIONS
//////////////////////////

View File

@@ -0,0 +1,24 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_EXITA - NPC ACTIVITIES 6.0 Conversation add-on
// Exit conversation - abort
// By Deva Bryson Winblood. 09/03/2004
///////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
void fnTestForEnd(object oPC)
{ // see if okay to end
object oMod;
if (!IsInConversation(oPC))
{ // okay to terminate
fnConvCompleted(oPC);
} // okay to terminate
} // fnTestForEnd()
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
DelayCommand(1.0,fnTestForEnd(oPC));
ExecuteScript("npcact_wrapca",oMe);
}

View File

@@ -0,0 +1,24 @@
///////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_EXITN - NPC ACTIVITIES 6.0 Conversation add-on
// Exit conversation - normal
// By Deva Bryson Winblood. 09/03/2004
///////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
void fnTestForEnd(object oPC)
{ // see if okay to end
object oMod;
if (!IsInConversation(oPC))
{ // okay to terminate
fnConvCompleted(oPC);
} // okay to terminate
} // fnTestForEnd()
void main()
{
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
DelayCommand(1.0,fnTestForEnd(oPC));
ExecuteScript("npcact_wrapcn",oMe);
}

View File

@@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_T# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood.
/////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
////////////////////////////
// CONSTANTS
////////////////////////////
const int CTEST_NUM = 1;
////////////////////////////
// PROTOTYPES
////////////////////////////
int StartingConditional()
{
int bRet=FALSE;
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
object oMod=GetModule();
int nN;
int nBase;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
string sS;
string sTest;
string sAct;
string sSay;
string sLang;
string sTrans;
int bSpoke=FALSE;
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
if (GetStringLength(sS)>0)
{ // a response for this portion is available
sLang=fnParse(sS,".");
sS=fnRemoveParsed(sS,sLang,".");
sTest=fnParse(sS,".");
sS=fnRemoveParsed(sS,sTest,".");
sAct=fnParse(sS,".");
sSay=fnRemoveParsed(sS,sAct,".");
if (sTest=="NA"||sTest=="na") bRet=TRUE;
else
{ // check test conditions
bRet=TRUE;
while(bRet&&GetStringLength(sTest)>0)
{ // test conditions
sS=fnParse(sTest,"/");
sTest=fnRemoveParsed(sTest,sS,"/");
if (GetStringLeft(sS,1)=="@")
{ // custom script
sS=GetStringRight(sS,GetStringLength(sS)-1);
ExecuteScript(sS,OBJECT_SELF);
if (GetLocalInt(oPC,"bNPCConvReturn")==FALSE) bRet=FALSE;
DeleteLocalInt(oPC,"bNPCConvReturn");
} // custom script
else
{ // test conditional
bRet=fnConvTestConditional(OBJECT_SELF,sS);
} // test conditional
} // test conditions
} // check test conditions
if (bRet==TRUE)
{ // setup custom tokens
sSay=fnConvHandleTokens(oMe,oPC,sSay);
nN=GetLocalInt(oPC,"nGNBConvNum");
nBase=99000+((nN-1)*20);
nBase=nBase+CTEST_NUM;
SetCustomToken(nBase,sSay);
} // setup custom tokens
} // a response for this portion is available
return bRet;
}
////////////////////////////
// FUNCTIONS
////////////////////////////

View File

@@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_T# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood.
/////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
////////////////////////////
// CONSTANTS
////////////////////////////
const int CTEST_NUM = 10;
////////////////////////////
// PROTOTYPES
////////////////////////////
int StartingConditional()
{
int bRet=FALSE;
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
object oMod=GetModule();
int nN;
int nBase;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
string sS;
string sTest;
string sAct;
string sSay;
string sLang;
string sTrans;
int bSpoke=FALSE;
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
if (GetStringLength(sS)>0)
{ // a response for this portion is available
sLang=fnParse(sS,".");
sS=fnRemoveParsed(sS,sLang,".");
sTest=fnParse(sS,".");
sS=fnRemoveParsed(sS,sTest,".");
sAct=fnParse(sS,".");
sSay=fnRemoveParsed(sS,sAct,".");
if (sTest=="NA"||sTest=="na") bRet=TRUE;
else
{ // check test conditions
bRet=TRUE;
while(bRet&&GetStringLength(sTest)>0)
{ // test conditions
sS=fnParse(sTest,"/");
sTest=fnRemoveParsed(sTest,sS,"/");
if (GetStringLeft(sS,1)=="@")
{ // custom script
sS=GetStringRight(sS,GetStringLength(sS)-1);
ExecuteScript(sS,OBJECT_SELF);
if (GetLocalInt(oPC,"bNPCConvReturn")==FALSE) bRet=FALSE;
DeleteLocalInt(oPC,"bNPCConvReturn");
} // custom script
else
{ // test conditional
bRet=fnConvTestConditional(OBJECT_SELF,sS);
} // test conditional
} // test conditions
} // check test conditions
if (bRet==TRUE)
{ // setup custom tokens
sSay=fnConvHandleTokens(oMe,oPC,sSay);
nN=GetLocalInt(oPC,"nGNBConvNum");
nBase=99000+((nN-1)*20);
nBase=nBase+CTEST_NUM;
SetCustomToken(nBase,sSay);
} // setup custom tokens
} // a response for this portion is available
return bRet;
}
////////////////////////////
// FUNCTIONS
////////////////////////////

View File

@@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_T# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood.
/////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
////////////////////////////
// CONSTANTS
////////////////////////////
const int CTEST_NUM = 11;
////////////////////////////
// PROTOTYPES
////////////////////////////
int StartingConditional()
{
int bRet=FALSE;
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
object oMod=GetModule();
int nN;
int nBase;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
string sS;
string sTest;
string sAct;
string sSay;
string sLang;
string sTrans;
int bSpoke=FALSE;
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
if (GetStringLength(sS)>0)
{ // a response for this portion is available
sLang=fnParse(sS,".");
sS=fnRemoveParsed(sS,sLang,".");
sTest=fnParse(sS,".");
sS=fnRemoveParsed(sS,sTest,".");
sAct=fnParse(sS,".");
sSay=fnRemoveParsed(sS,sAct,".");
if (sTest=="NA"||sTest=="na") bRet=TRUE;
else
{ // check test conditions
bRet=TRUE;
while(bRet&&GetStringLength(sTest)>0)
{ // test conditions
sS=fnParse(sTest,"/");
sTest=fnRemoveParsed(sTest,sS,"/");
if (GetStringLeft(sS,1)=="@")
{ // custom script
sS=GetStringRight(sS,GetStringLength(sS)-1);
ExecuteScript(sS,OBJECT_SELF);
if (GetLocalInt(oPC,"bNPCConvReturn")==FALSE) bRet=FALSE;
DeleteLocalInt(oPC,"bNPCConvReturn");
} // custom script
else
{ // test conditional
bRet=fnConvTestConditional(OBJECT_SELF,sS);
} // test conditional
} // test conditions
} // check test conditions
if (bRet==TRUE)
{ // setup custom tokens
sSay=fnConvHandleTokens(oMe,oPC,sSay);
nN=GetLocalInt(oPC,"nGNBConvNum");
nBase=99000+((nN-1)*20);
nBase=nBase+CTEST_NUM;
SetCustomToken(nBase,sSay);
} // setup custom tokens
} // a response for this portion is available
return bRet;
}
////////////////////////////
// FUNCTIONS
////////////////////////////

View File

@@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_T# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood.
/////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
////////////////////////////
// CONSTANTS
////////////////////////////
const int CTEST_NUM = 12;
////////////////////////////
// PROTOTYPES
////////////////////////////
int StartingConditional()
{
int bRet=FALSE;
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
object oMod=GetModule();
int nN;
int nBase;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
string sS;
string sTest;
string sAct;
string sSay;
string sLang;
string sTrans;
int bSpoke=FALSE;
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
if (GetStringLength(sS)>0)
{ // a response for this portion is available
sLang=fnParse(sS,".");
sS=fnRemoveParsed(sS,sLang,".");
sTest=fnParse(sS,".");
sS=fnRemoveParsed(sS,sTest,".");
sAct=fnParse(sS,".");
sSay=fnRemoveParsed(sS,sAct,".");
if (sTest=="NA"||sTest=="na") bRet=TRUE;
else
{ // check test conditions
bRet=TRUE;
while(bRet&&GetStringLength(sTest)>0)
{ // test conditions
sS=fnParse(sTest,"/");
sTest=fnRemoveParsed(sTest,sS,"/");
if (GetStringLeft(sS,1)=="@")
{ // custom script
sS=GetStringRight(sS,GetStringLength(sS)-1);
ExecuteScript(sS,OBJECT_SELF);
if (GetLocalInt(oPC,"bNPCConvReturn")==FALSE) bRet=FALSE;
DeleteLocalInt(oPC,"bNPCConvReturn");
} // custom script
else
{ // test conditional
bRet=fnConvTestConditional(OBJECT_SELF,sS);
} // test conditional
} // test conditions
} // check test conditions
if (bRet==TRUE)
{ // setup custom tokens
sSay=fnConvHandleTokens(oMe,oPC,sSay);
nN=GetLocalInt(oPC,"nGNBConvNum");
nBase=99000+((nN-1)*20);
nBase=nBase+CTEST_NUM;
SetCustomToken(nBase,sSay);
} // setup custom tokens
} // a response for this portion is available
return bRet;
}
////////////////////////////
// FUNCTIONS
////////////////////////////

View File

@@ -0,0 +1,78 @@
/////////////////////////////////////////////////////////////////////////////
// NPCACT_CNV_T# - NPC ACTIVITIES 6.0 Custom Conversation add-on
// By Deva Bryson Winblood.
/////////////////////////////////////////////////////////////////////////////
#include "npcact_h_cconv"
////////////////////////////
// CONSTANTS
////////////////////////////
const int CTEST_NUM = 13;
////////////////////////////
// PROTOTYPES
////////////////////////////
int StartingConditional()
{
int bRet=FALSE;
object oPC=GetPCSpeaker();
object oMe=OBJECT_SELF;
object oMod=GetModule();
int nN;
int nBase;
int nDepth; // depth within conversation tree
int nConsecutive; // consecutives
string sS;
string sTest;
string sAct;
string sSay;
string sLang;
string sTrans;
int bSpoke=FALSE;
//////////////////
nDepth=GetLocalInt(oPC,"nGNBConvDepth");
nConsecutive=GetLocalInt(oPC,"nGNBConvConsec");
sS=GetLocalString(oMe,"sNPCConvResp"+IntToString(nDepth)+"_"+IntToString(nConsecutive)+"_"+IntToString(CTEST_NUM));
if (GetStringLength(sS)>0)
{ // a response for this portion is available
sLang=fnParse(sS,".");
sS=fnRemoveParsed(sS,sLang,".");
sTest=fnParse(sS,".");
sS=fnRemoveParsed(sS,sTest,".");
sAct=fnParse(sS,".");
sSay=fnRemoveParsed(sS,sAct,".");
if (sTest=="NA"||sTest=="na") bRet=TRUE;
else
{ // check test conditions
bRet=TRUE;
while(bRet&&GetStringLength(sTest)>0)
{ // test conditions
sS=fnParse(sTest,"/");
sTest=fnRemoveParsed(sTest,sS,"/");
if (GetStringLeft(sS,1)=="@")
{ // custom script
sS=GetStringRight(sS,GetStringLength(sS)-1);
ExecuteScript(sS,OBJECT_SELF);
if (GetLocalInt(oPC,"bNPCConvReturn")==FALSE) bRet=FALSE;
DeleteLocalInt(oPC,"bNPCConvReturn");
} // custom script
else
{ // test conditional
bRet=fnConvTestConditional(OBJECT_SELF,sS);
} // test conditional
} // test conditions
} // check test conditions
if (bRet==TRUE)
{ // setup custom tokens
sSay=fnConvHandleTokens(oMe,oPC,sSay);
nN=GetLocalInt(oPC,"nGNBConvNum");
nBase=99000+((nN-1)*20);
nBase=nBase+CTEST_NUM;
SetCustomToken(nBase,sSay);
} // setup custom tokens
} // a response for this portion is available
return bRet;
}
////////////////////////////
// FUNCTIONS
////////////////////////////

Some files were not shown because too many files have changed in this diff Show More