Initial Commit
Initial Commit
This commit is contained in:
43
_module/nss/hench_saveandgo.nss
Normal file
43
_module/nss/hench_saveandgo.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
//:://////////////////////////////////////////////////
|
||||
//:: 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 "x4_inc_functions"
|
||||
#include "69_hench_lib"
|
||||
#include "x3_inc_horse"
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "Gone", 1);
|
||||
SetIsDestroyable(TRUE, TRUE, TRUE);
|
||||
|
||||
int nHenchPosition = GetLocalInt(OBJECT_SELF, "HenchPosition");
|
||||
string sHenchPosition = IntToString(nHenchPosition);
|
||||
|
||||
int nIsRanged = GetAssociateState(NW_ASC_USE_RANGED_WEAPON);
|
||||
string sHenchName = GetName(OBJECT_SELF);
|
||||
|
||||
SetCampaignInt(CharacterDB(oPC), "HENCH_"+sHenchPosition+"_RANGED", nIsRanged);
|
||||
|
||||
//Remove the horse the resurrected player is mounted - riding would be too good if you didn't lose your horse upon death.
|
||||
if (HorseGetIsMounted(OBJECT_SELF) == TRUE)
|
||||
{
|
||||
HorseInstantDismount(OBJECT_SELF);
|
||||
}
|
||||
|
||||
StoreCampaignObject(CharacterDB(oPC), "HENCH_"+sHenchPosition, OBJECT_SELF);
|
||||
DelayCommand(1.0, SetCampaignString(CharacterDB(oPC), "HENCH_"+sHenchPosition+"_NAME", sHenchName));
|
||||
DelayCommand(1.0, QuitHenchman69(oPC));
|
||||
}
|
||||
Reference in New Issue
Block a user