generated from Jaysyn/ModuleTemplate
Initial commit
Initial commit
This commit is contained in:
32
_module/nss/opa_pack_sell.nss
Normal file
32
_module/nss/opa_pack_sell.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Olander's Pack Animals
|
||||
// opa_pack_sell
|
||||
// By Don Anderson
|
||||
// dandersonru@msn.com
|
||||
//
|
||||
// This script is called from the Pack Animal Salesman Convo.
|
||||
//
|
||||
// Thia Sells the Animal to the Merchant.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "opa_inc"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oMod = GetModule();
|
||||
|
||||
if(GetIsPC(oPC) == FALSE) return;
|
||||
|
||||
//10% Resale Fee
|
||||
object oItem = GetItemPossessedBy(oPC,"AnimalControl");
|
||||
int nCost = GetLocalInt(oItem,"OPA_SALEPRICE");
|
||||
|
||||
//Give Gold and Remove the Pack Animal
|
||||
GiveGoldToCreature(oPC,nCost);
|
||||
object oAnimal = GetLocalObject(oPC,"OPA_OWNER");
|
||||
DismissAnimal(oPC, oAnimal);
|
||||
}
|
||||
Reference in New Issue
Block a user