126 lines
4.3 KiB
Plaintext
126 lines
4.3 KiB
Plaintext
#include "prc_class_const"
|
|
|
|
void main()
|
|
{
|
|
|
|
object oPC;
|
|
oPC = GetItemActivator();
|
|
|
|
object oTarget;
|
|
oTarget = oPC;
|
|
|
|
// *** Defining effectivity based on best class ***
|
|
|
|
int nAmount = 15;
|
|
|
|
int nDuration = 180;
|
|
|
|
int iTier1 = GetLevelByClass(CLASS_TYPE_DRAGONDISCIPLE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SHADOWDANCER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_HARPER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_ASSASSIN, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_ARCANE_ARCHER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_RANGER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_MONK, oPC);
|
|
|
|
int iTier2 = GetLevelByClass(CLASS_TYPE_FIGHTER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_CW_SAMURAI, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_KNIGHT, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_MARSHAL, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SAMURAI, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SOULKNIFE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SOULBORN, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_INCARNATE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_HEXBLADE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_DUSKBLADE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_PSYWAR, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SWASHBUCKLER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_WARBLADE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_PALADIN, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_CRUSADER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SWORDSAGE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_BLACKGUARD, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_BATTLERAGER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_BATTLESMITH, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_COC, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_DISPATER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_DIVINECHAMPION, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_DUELIST, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_DWARVENDEFENDER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_ETERNAL_BLADE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_FOE_HUNTER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_GHOST_FACED_KILLER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_HALFLING_WARSLINGER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_HEXTOR, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_IAIJUTSU_MASTER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_INCARNUM_BLADE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_JUDICATOR, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_LASHER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_LEGENDARY_DREADNOUGHT, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_MASTER_OF_NINE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_ORC_WARLORD, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_PURPLE_DRAGON_KNIGHT, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_PYROKINETICIST, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_RAVAGER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_REAPING_MAULER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SANCTIFIED_MIND, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SERENE_GUARDIAN, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SHINING_BLADE, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SHOU, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_SPINEMELD_WARRIOR, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_TEMPEST, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_THAYAN_KNIGHT, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_WARCHIEF, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_WARFORGED_JUGGERNAUT, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_WARMIND, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_WEAPON_MASTER, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_PALADIN, oPC)
|
|
+ GetLevelByClass(CLASS_TYPE_WEREWOLF, oPC);
|
|
|
|
if ((GetLevelByClass(CLASS_TYPE_BARBARIAN, oPC) > 0))
|
|
{
|
|
nAmount = 35;
|
|
}
|
|
else if (iTier2 > 0)
|
|
{
|
|
nAmount = 30;
|
|
}
|
|
else if (iTier1 > 0)
|
|
{
|
|
nAmount = 25;
|
|
}
|
|
else
|
|
{
|
|
nAmount = 15;
|
|
}
|
|
|
|
// *** Adding the actual damage resistance versus physical damages, a green glow and fading message ***
|
|
|
|
effect eEffect;
|
|
eEffect = EffectDamageResistance(DAMAGE_TYPE_BLUDGEONING, nAmount);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 180.0f);
|
|
|
|
eEffect = EffectDamageResistance(DAMAGE_TYPE_PIERCING, nAmount);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 180.0f);
|
|
|
|
eEffect = EffectDamageResistance(DAMAGE_TYPE_SLASHING, nAmount);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 180.0f);
|
|
|
|
effect eVFX;
|
|
|
|
eVFX = SupernaturalEffect(EffectVisualEffect(VFX_DUR_AURA_GREEN));
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX, oTarget, 180.0);
|
|
|
|
DelayCommand(170.0, FloatingTextStringOnCreature("The damageresistance is fading !", oTarget));
|
|
|
|
}
|
|
|
|
// *** new try ***
|
|
|