Initial Commit
Initial Commit
This commit is contained in:
25
_module/nss/hench_retrieve.nss
Normal file
25
_module/nss/hench_retrieve.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "69_hench_lib"
|
||||
#include "x4_inc_functions"
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int nHenchPosition = GetLocalInt(oPC, "HenchChosen");
|
||||
string sHenchPosition = IntToString(nHenchPosition);
|
||||
int nIsRanged = GetCampaignInt(CharacterDB(oPC), "HENCH_"+sHenchPosition+"_RANGED");
|
||||
DeleteLocalInt(oPC, "HenchChosen");
|
||||
|
||||
object oHench = RetrieveCampaignObject(CharacterDB(oPC), "HENCH_"+sHenchPosition, GetLocation(oPC));
|
||||
SetLocalInt(oHench, "JustSpawned", TRUE);
|
||||
DelayCommand(1.0, DeleteLocalInt(oHench, "JustSpawned"));
|
||||
HireHenchman69(oPC, oHench);
|
||||
SetLocalInt(oHench, "HenchPosition", nHenchPosition);
|
||||
|
||||
//Resurrect the henchman if necessary and heal fully
|
||||
if (GetIsDead(oHench)) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oHench);
|
||||
DelayCommand(0.3, ForceRest(oHench));
|
||||
|
||||
//Set all the integers
|
||||
if(nIsRanged == TRUE)
|
||||
ExecuteScript("69_hen_spawnin_r", oHench);
|
||||
else ExecuteScript("69_hen_spawnin", oHench);
|
||||
}
|
Reference in New Issue
Block a user