generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
61
_module/nss/ability_imbue.nss
Normal file
61
_module/nss/ability_imbue.nss
Normal file
@@ -0,0 +1,61 @@
|
||||
#include "spawner"
|
||||
#include "prc_x2_itemprop"
|
||||
|
||||
void Ability (object oItem, int oType)
|
||||
{
|
||||
itemproperty ipAdd;
|
||||
int oDamage;
|
||||
int nRandom = d20();
|
||||
|
||||
if (nRandom==1) oDamage = 5;
|
||||
if (nRandom==2) oDamage = 5;
|
||||
if (nRandom==3) oDamage = 5;
|
||||
if (nRandom==4) oDamage = 5;
|
||||
if (nRandom==5) oDamage = 5;
|
||||
if (nRandom==6) oDamage = 5;
|
||||
if (nRandom==7) oDamage = 5;
|
||||
if (nRandom==8) oDamage = 6;
|
||||
if (nRandom==9) oDamage = 6;
|
||||
if (nRandom==10) oDamage = 6;
|
||||
if (nRandom==11) oDamage = 6;
|
||||
if (nRandom==12) oDamage = 6;
|
||||
if (nRandom==13) oDamage = 6;
|
||||
if (nRandom==14) oDamage = 7;
|
||||
if (nRandom==15) oDamage = 7;
|
||||
if (nRandom==16) oDamage = 7;
|
||||
if (nRandom==17) oDamage = 7;
|
||||
if (nRandom==18) oDamage = 7;
|
||||
if (nRandom==19) oDamage = 7;
|
||||
if (nRandom==20)
|
||||
{
|
||||
oDamage = 8;
|
||||
PCEffect(3.0,VFX_DUR_PROT_EPIC_ARMOR_2, OBJECT_SELF);
|
||||
}
|
||||
|
||||
ipAdd = ItemPropertyAbilityBonus(oType, oDamage);
|
||||
IPSafeAddItemProperty(oItem, ipAdd);
|
||||
}
|
||||
void AbilityImbue (int oType)
|
||||
{
|
||||
object oTarget;
|
||||
object oItem;
|
||||
|
||||
int oDamage;
|
||||
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.5,VFX_IMP_AC_BONUS, OBJECT_SELF);
|
||||
PCEffect(1.0,VFX_DUR_PIXIEDUST, OBJECT_SELF);
|
||||
PCEffect(2.0,VFX_IMP_IMPROVE_ABILITY_SCORE, OBJECT_SELF);
|
||||
DelayCommand(1.0, Ability(GetFirstItemInInventory(OBJECT_SELF), oType));
|
||||
DelayCommand(3.0, SetLocked(OBJECT_SELF, FALSE));
|
||||
}
|
||||
//void main (){}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user