20 lines
604 B
Plaintext
20 lines
604 B
Plaintext
#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
|
|
}
|