Added henchman rental

Many areas, items, and creatures were adjusted for balance and aesthetics.
This commit is contained in:
EpicValor
2023-08-24 15:20:50 -05:00
parent d6cb8322b9
commit 07f4ebed49
2373 changed files with 518431 additions and 7256 deletions

View File

@@ -0,0 +1,51 @@
//:: xov_hen_join
// Returns the number of henchmen oPC has.
//:: Created by : Xovian
//:: Modified By: Xovian 2010
#include"x0_inc_henai"
int GetNumHenchman(object oPC)
{
// Loop through existing henchmen.
int nHench = 1;
while ( GetHenchman(oPC, nHench) != OBJECT_INVALID )
nHench++;
// Henchman nHench does not exist, so there are nHench-1 henchmen.
return nHench - 1;
}
void main()
{
// Colors for future use in conversation.
string RED = "<c<> >";
string BLUE = "<c <20>>";
string GRAY = "<c<><63><EFBFBD>>";
string GREEN = "<c <20> >";
string WHITE = "<c<><63><EFBFBD>>";
string CYAN = "<c <20><>>";
string YELLOW = "<c<><63> >";
string BLUISHG = "<c <20><>>";
string BLUISHR = "<c <20><>>";
object oPC = GetPCSpeaker();
object oHenchman = OBJECT_SELF;
// Abort if too many henchmen already.
if (GetNumHenchman(oPC) >= GetMaxHenchmen())
{
ClearAllActions();
SpeakString(RED+"*There are too many in your party, I can't join you.*");
return;
}
else
{
// Add and configure the henchman.
SetPlotFlag(oHenchman, FALSE);
SetIsDestroyable(FALSE, TRUE, TRUE);
SetLastMaster(oPC, oHenchman);
HireHenchman(oPC, oHenchman);
SetPlayerHasHired(oPC, oHenchman, TRUE);
SetAssociateListenPatterns(oHenchman);
bkSetListeningPatterns();
ForceRest(oHenchman);
SetLocalInt(oHenchman, "HenchFired", 0);
DelayCommand(1.0, ActionForceFollowObject(oPC, 3.0));
}
}