generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
44
_module/nss/att_imbue.nss
Normal file
44
_module/nss/att_imbue.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "spawner"
|
||||
#include "prc_x2_itemprop"
|
||||
|
||||
void Att(object oItem, int oDamage)
|
||||
{
|
||||
itemproperty ipAdd;
|
||||
int iAtt;
|
||||
switch (oDamage)
|
||||
{
|
||||
case 1: iAtt = 5; break;
|
||||
case 2: iAtt = 8; break;
|
||||
case 3: iAtt = 12; break;
|
||||
}
|
||||
|
||||
ipAdd = ItemPropertyAttackBonus(iAtt);
|
||||
IPSafeAddItemProperty(oItem, ipAdd);
|
||||
}
|
||||
|
||||
|
||||
void AttackBonus (int oDamage)
|
||||
{
|
||||
object oTarget;
|
||||
object oItem;
|
||||
|
||||
SetLocked(OBJECT_SELF, TRUE);
|
||||
oItem = GetFirstItemInInventory(OBJECT_SELF);
|
||||
while(GetIsObjectValid(oItem))
|
||||
{
|
||||
if (GetTag(oItem)=="pearl")
|
||||
{DestroyObject(oItem);}
|
||||
oItem = GetNextItemInInventory(OBJECT_SELF);
|
||||
}
|
||||
CastPC(0.0,SPELL_SHAPECHANGE, OBJECT_SELF);
|
||||
PCEffect(1.0,VFX_DUR_ELEMENTAL_SHIELD, OBJECT_SELF);
|
||||
PCEffect(1.5,VFX_FNF_ELECTRIC_EXPLOSION, OBJECT_SELF);
|
||||
PCEffect(2.0,VFX_IMP_HARM, OBJECT_SELF);
|
||||
DelayCommand(1.0, Att(GetFirstItemInInventory(OBJECT_SELF), oDamage));
|
||||
DelayCommand(3.0, SetLocked(OBJECT_SELF, FALSE));
|
||||
}
|
||||
|
||||
//void main () {}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user