Initial commit
Initial commit. Updated release archive.
This commit is contained in:
41
_module/nss/cm_wait_henchman.nss
Normal file
41
_module/nss/cm_wait_henchman.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC=GetPCSpeaker();
|
||||
int iGold;
|
||||
int iGoldNow;
|
||||
int iGoldTake;
|
||||
ClearAllActions();
|
||||
RemoveHenchman(oPC, OBJECT_SELF);
|
||||
SetLocalString(oPC,"Henchman","");
|
||||
SetLocalInt(oPC, "leave1", 1);
|
||||
SetLocalInt(oPC, "back1", 0);
|
||||
SetLocalInt(oPC, "a_hired", 0);
|
||||
AssignCommand(OBJECT_SELF, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE));
|
||||
iGold = GetLocalInt(oPC,"RestGold");
|
||||
if (iGold==GetGold(oPC))
|
||||
{AssignCommand(OBJECT_SELF, ActionSpeakString("I'll be right here when you return"));}
|
||||
else
|
||||
{
|
||||
AssignCommand(OBJECT_SELF, ActionSpeakString("I'd best take what you owe me in case you don't make it back. I'll be here when you return."));
|
||||
iGoldNow = GetGold(oPC);
|
||||
SetLocalInt(oPC,"RestGold",iGoldNow);
|
||||
if (iGoldNow>iGold)
|
||||
{
|
||||
iGoldTake = (iGoldNow-iGold)/10;
|
||||
SetLocalInt(oPC, "hench_deposit", iGoldTake);
|
||||
if (iGoldTake>0)
|
||||
{
|
||||
SendMessageToPC(oPC,"Starbright takes " + IntToString(iGoldTake) + " gold pieces as her share of the spoils.");
|
||||
DelayCommand(0.1f,AssignCommand(oPC,TakeGoldFromCreature(iGoldTake,oPC,TRUE)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user