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
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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;
}

Binary file not shown.

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;
}

Binary file not shown.

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;
}

Binary file not shown.

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;
}

Binary file not shown.

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;
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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;
}

Binary file not shown.

View File

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

Binary file not shown.

View File

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

Binary file not shown.

View File

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

Binary file not shown.

View File

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

Binary file not shown.

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");
}

Binary file not shown.

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");
}

Binary file not shown.

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

Binary file not shown.

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);
}

Binary file not shown.

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);
}

Binary file not shown.

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);
}

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