EN6_PRC8/_module/nss/qst_enchant_temp.nss
Jaysyn904 a6f6db7303 Initial commit
Initial commit.  Updated release archive.
2024-06-13 15:08:33 -04:00

43 lines
1.2 KiB
Plaintext

#include "prc_x2_itemprop"
void main()
{
object oPC;
object oItem;
itemproperty ip;
int iBlessing;
int iDamage;
oPC=GetPCSpeaker();
SetLocalInt(oPC,"TempPowers",1);
iDamage = DAMAGE_BONUS_1;
oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
if (!GetIsObjectValid(oItem))
oItem = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);
if (GetIsObjectValid(oItem))
{
if (IPGetIsRangedWeapon(oItem))
{
ip=ItemPropertyEnhancementBonus(2);
oItem = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC);
if (GetIsObjectValid(oItem))
IPSafeAddItemProperty(oItem,ip,4.0*60*60);
oItem = GetItemInSlot(INVENTORY_SLOT_BOLTS,oPC);
if (GetIsObjectValid(oItem))
IPSafeAddItemProperty(oItem,ip,4.0*60*60);
oItem = GetItemInSlot(INVENTORY_SLOT_BULLETS,oPC);
if (GetIsObjectValid(oItem))
IPSafeAddItemProperty(oItem,ip,4.0*60*60);
} else {
ip=ItemPropertyEnhancementBonus(2);
IPSafeAddItemProperty(oItem,ip,4.0*60*60);
}
DelayCommand(1.0,AssignCommand(OBJECT_SELF,ActionCastFakeSpellAtObject(SPELL_MAGIC_WEAPON,oPC)));
TakeGoldFromCreature(200,oPC,TRUE);
}
}