generated from Jaysyn/ModuleTemplate
Initial upload
Initial upload
This commit is contained in:
37
_mod/_module/nss/cv_hma_buyequip.nss
Normal file
37
_mod/_module/nss/cv_hma_buyequip.nss
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "x3_inc_horse"
|
||||
#include "x2_inc_itemprop"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC=GetPCSpeaker();
|
||||
object oMe=OBJECT_SELF;
|
||||
object oHorse=HorseGetMyHorse(oPC);
|
||||
int nTail=GetLocalInt(oHorse,"bDBW_HORSE");
|
||||
int nParm=GetLocalInt(oPC,"nParm");
|
||||
int nCost=GetLocalInt(oPC,"nCost");
|
||||
itemproperty iProp;
|
||||
DeleteLocalInt(oPC,"nCost");
|
||||
SetCreatureTailType(nTail+nParm,oHorse);
|
||||
if (nParm>1)
|
||||
{ // armor
|
||||
object oSkin=GetItemInSlot(INVENTORY_SLOT_CARMOUR,oHorse);
|
||||
if (nParm==3)
|
||||
{ // leather
|
||||
iProp=ItemPropertyACBonus(2);
|
||||
} // leather
|
||||
else if (nParm==5)
|
||||
{ // chain
|
||||
iProp=ItemPropertyACBonus(4);
|
||||
} // chain
|
||||
else if (nParm==4)
|
||||
{ // scale
|
||||
iProp=ItemPropertyACBonus(5);
|
||||
} // scale
|
||||
else if (nParm==6||nParm==7)
|
||||
{ // padded
|
||||
iProp=ItemPropertyACBonus(1);
|
||||
} // padded
|
||||
IPSafeAddItemProperty(oSkin,iProp);
|
||||
} // armor
|
||||
AssignCommand(oMe,TakeGoldFromCreature(nCost,oPC));
|
||||
}
|
||||
Reference in New Issue
Block a user