Rune_PRC8/_module/nss/opa_pack_remove.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

43 lines
1006 B
Plaintext

////////////////////////////////////////////////////////////////////////////////
//
// Olander's Pack Animals
// opa_pack_remove
// By Don Anderson
// dandersonru@msn.com
//
// This script is called from the On Death Event.
//
////////////////////////////////////////////////////////////////////////////////
#include "opa_inc"
#include "nbde_inc"
void main()
{
object oAnimal = OBJECT_SELF;
string sPC = GetLocalString(oAnimal, "OPA_OWNER_NAME");
string sPCU = GetLocalString(oAnimal, "OPA_OWNER_UNIQUE");
string sCheck = "";
//First Find Our PC
int nPC = 0;
object oPC = GetFirstPC();
while (GetIsObjectValid(oPC) == TRUE && nPC < 100)
{
sCheck = GetName(oPC);
if(sCheck == sPC) break;
nPC = nPC++;
oPC = GetNextPC();
}
//Drop the Pack Box
AccessBox(oPC, oAnimal);
//Remove this Animal from PC
DismissAnimal(oPC, oAnimal);
//Tell Player What the Animal Total is
SendMessageToPC(oPC,"Your Pack Animal Has Died and has Dropped it's Pack Box.");
}