Ancordia_PRC8/_module/nss/hench_quit.nss
Jaysyn904 102ba7dab6 Initial Commit
Initial Commit
2023-09-21 19:51:32 -04:00

32 lines
1012 B
Plaintext

//:://////////////////////////////////////////////////
//:: 69_hench_quit
//:: Copyright (c) 2002 Floodgate Entertainment
//:://////////////////////////////////////////////////
/*
Actions taken when a henchman quits/refuses his/her current/former
master.
*/
//:://////////////////////////////////////////////////
//:: Created By: 69MEH69
//:: Created On: Apr2005
//:://////////////////////////////////////////////////
#include "69_hench_lib"
#include "x4_inc_functions"
void main()
{
object oPC = GetPCSpeaker();
int nHenchPosition = GetLocalInt(OBJECT_SELF, "HenchPosition");
string sHenchPosition = IntToString(nHenchPosition);
int nHenchNumber = GetCampaignInt(CharacterDB(oPC), "HENCH_NUMBER");
if (nHenchNumber > 0) SetCampaignInt(CharacterDB(oPC), "HENCH_NUMBER", nHenchNumber-1);
DeleteCampaignVariable(CharacterDB(oPC), "HENCH_"+sHenchPosition);
DeleteCampaignVariable(CharacterDB(oPC), "HENCH_"+sHenchPosition+"_NAME");
SetIsDestroyable(TRUE, TRUE, TRUE);
QuitHenchman69(oPC);
}