Initial upload
Initial upload
This commit is contained in:
95
_module/nss/herostatueused.nss
Normal file
95
_module/nss/herostatueused.nss
Normal file
@@ -0,0 +1,95 @@
|
||||
//Put this script OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetLastUsedBy();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
int DoOnce = GetLocalInt(oPC, GetTag(OBJECT_SELF));
|
||||
|
||||
if (DoOnce==TRUE) return;
|
||||
|
||||
SetLocalInt(oPC, GetTag(OBJECT_SELF), TRUE);
|
||||
|
||||
object oTarget;
|
||||
oTarget = oPC;
|
||||
|
||||
//Visual effects can't be applied to waypoints, so if it is a WP
|
||||
//the VFX will be applied to the WP's location instead
|
||||
|
||||
int nInt;
|
||||
nInt = GetObjectType(oTarget);
|
||||
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_IMPLOSION), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_IMPLOSION), GetLocation(oTarget));
|
||||
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("heroway1");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
//only do the jump if the location is valid.
|
||||
//though not flawless, we just check if it is in a valid area.
|
||||
//the script will stop if the location isn't valid - meaning that
|
||||
//nothing put after the teleport will fire either.
|
||||
//the current location won't be stored, either
|
||||
|
||||
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||||
|
||||
DelayCommand(3.0, AssignCommand(oPC, ClearAllActions()));
|
||||
|
||||
DelayCommand(4.0, AssignCommand(oPC, ActionJumpToLocation(lTarget)));
|
||||
|
||||
oTarget = oPC;
|
||||
|
||||
effect eEffect;
|
||||
eEffect = EffectAttackIncrease(15);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectConcealment(60);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectImmunity(IMMUNITY_TYPE_CRITICAL_HIT);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectModifyAttacks(3);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectDamageIncrease(DAMAGE_BONUS_2d12, DAMAGE_TYPE_POSITIVE);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectSpellResistanceIncrease(60);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectRegenerate(60, 6.0f);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
eEffect = EffectMovementSpeedIncrease(80);
|
||||
|
||||
eEffect = SupernaturalEffect(eEffect);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 5000.0f);
|
||||
|
||||
}
|
Reference in New Issue
Block a user