PRC8/nwn/nwnprc/trunk/scripts/prc_warsling.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

51 lines
1.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Black Flame Zealot
//:: prc_bfz.nss
//:://////////////////////////////////////////////
//:: Check to see which Black Flame Zealot feats a PC
//:: has and apply the appropriate bonuses.
//:://////////////////////////////////////////////
//:: Created By: Stratovarius
//:: Created On: July 6, 2004
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_alterations"
void RemoveImprovedRicochet(object oPC, object oWeap)
{
if (DEBUG) FloatingTextStringOnCreature("Remove ImprovedRicochet is run", oPC);
RemoveSpecificProperty(oWeap,ITEM_PROPERTY_ONHITCASTSPELL,IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER,0);
DeleteLocalInt(oWeap, "ImprovedRicochet");
}
void ImprovedRicochet(object oPC, object oWeap)
{
if(GetLocalInt(oWeap, "ImprovedRicochet") == TRUE) return;
if (DEBUG) FloatingTextStringOnCreature("Add ImprovedRicochet is run", oPC);
RemoveImprovedRicochet(oPC, oWeap);
DelayCommand(0.1, IPSafeAddItemProperty(oWeap, ItemPropertyOnHitCastSpell(IP_CONST_ONHIT_CASTSPELL_ONHIT_UNIQUEPOWER, 1), 9999.0f, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE));
SetLocalInt(oWeap, "ImprovedRicochet", TRUE);
}
void main()
{
//Declare main variables.
object oPC = OBJECT_SELF;
object oSkin = GetPCSkin(oPC);
object oWeap = GetItemInSlot(INVENTORY_SLOT_BULLETS, oPC);
object oUnequip = GetItemLastUnequipped();
int iEquip = GetLocalInt(oPC, "ONEQUIP");
if(GetLevelByClass(CLASS_TYPE_HALFLING_WARSLINGER, oPC) == 6)
{
if (iEquip == 1) RemoveImprovedRicochet(oPC, oUnequip);
if (iEquip == 2) ImprovedRicochet(oPC, oWeap);
}
}