HoS_PRC8/_mod/_module/nss/cv_hma_sellequip.nss

20 lines
604 B
Plaintext
Raw Normal View History

2024-11-25 19:36:07 -05:00
#include "x3_inc_horse"
#include "x2_inc_itemprop"
void main()
{
object oPC=GetPCSpeaker();
object oHorse=HorseGetMyHorse(oPC);
int nCost=GetLocalInt(oPC,"nCost");
int nTail=GetCreatureTailType(oHorse);
int nParm=nTail-GetLocalInt(oHorse,"bDBW_HORSE");
DeleteLocalInt(oPC,"nCost");
GiveGoldToCreature(oPC,nCost);
SetCreatureTailType(GetLocalInt(oHorse,"bDBW_HORSE"),oHorse);
if (nParm>1)
{ // remove armor
object oSkin=GetItemInSlot(INVENTORY_SLOT_CARMOUR,oHorse);
IPRemoveAllItemProperties(oSkin,DURATION_TYPE_PERMANENT);
} // remove armor
}