Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
28
_module/nss/en4_hench_dismis.nss
Normal file
28
_module/nss/en4_hench_dismis.nss
Normal file
@@ -0,0 +1,28 @@
|
||||
void main()
|
||||
{
|
||||
object oPC;
|
||||
int iGold;
|
||||
int iGoldNow;
|
||||
int iGoldTake;
|
||||
|
||||
oPC = GetPCSpeaker();
|
||||
ClearAllActions();
|
||||
RemoveHenchman(oPC, OBJECT_SELF);
|
||||
SetLocalString(oPC,"Henchman","");
|
||||
|
||||
iGold = GetLocalInt(oPC,"RestGold");
|
||||
iGoldNow = GetGold(oPC);
|
||||
SetLocalInt(oPC,"RestGold",iGoldNow);
|
||||
if (iGoldNow>iGold)
|
||||
{
|
||||
iGoldTake = (iGoldNow-iGold)/10;
|
||||
if (iGoldTake>0)
|
||||
{
|
||||
SendMessageToPC(oPC,"Your henchman takes " + IntToString(iGoldTake) + " gold pieces as his share of the spoils.");
|
||||
//DelayCommand(0.1f,TakeGold(iGoldTake,oPC));
|
||||
DelayCommand(0.1f,AssignCommand(oPC,TakeGoldFromCreature(iGoldTake,oPC,TRUE)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user