Alangara_PRC8/_module/nss/glovesofdh.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

45 lines
1.2 KiB
Plaintext

// Thief-boost item
// Purpose of script - to boost monk damage temporarely
// -Seeker-, 3 / 2 2006 for Alangara
void main()
{
object oPC = GetItemActivator();
float duration = HoursToSeconds(24); // Alter duration here
if ( oPC != OBJECT_INVALID && GetIsPC( oPC ) )
{
// Check for rogue status
int monk = GetLevelByClass(CLASS_TYPE_MONK, oPC );
if ( monk > 0 )
{
int dmgBoost = DAMAGE_BONUS_10;
// Create effect
effect eDmgBoost = EffectDamageIncrease( dmgBoost, DAMAGE_TYPE_MAGICAL );
// Prohibit stacking
effect eLoop=GetFirstEffect(oPC);
while (GetIsEffectValid(eLoop))
{
if (GetEffectType(eLoop)==EFFECT_TYPE_DAMAGE_INCREASE && GetEffectDurationType( eLoop ) == DURATION_TYPE_TEMPORARY)
RemoveEffect(oPC, eLoop);
eLoop=GetNextEffect(oPC);
}
// Apply effect to player
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDmgBoost, oPC, duration );
}
else
{
// Can only be used by a rogue
FloatingTextStringOnCreature( "This power can only be used by a monk", oPC, FALSE );
}
}
else
{
// Do nothing
}
}