265 lines
10 KiB
Plaintext
265 lines
10 KiB
Plaintext
void main()
|
|
{
|
|
|
|
|
|
|
|
object oPC = GetLastUsedBy();
|
|
int iUsed = GetLocalInt(oPC,"useobelisk");
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
AssignCommand(oPC, ClearAllActions());
|
|
|
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, 1.0f, 12.0f));
|
|
|
|
object oTarget;
|
|
oTarget = oPC;
|
|
int iRandom = d20(1);
|
|
|
|
if (iUsed == 1)
|
|
{
|
|
FloatingTextStringOnCreature("The obelisk does nothing for you.",oPC);
|
|
return;
|
|
}
|
|
|
|
switch(iRandom)
|
|
{
|
|
case 1:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAbilityIncrease(ABILITY_CHARISMA, 1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel more sure of yourself, and more personally powerful.",oPC);
|
|
break;
|
|
}
|
|
case 2:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAbilityIncrease(ABILITY_STRENGTH,1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("The power of the obelisk is harnessed in your muscles.",oPC);
|
|
break;
|
|
}
|
|
case 3:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAbilityIncrease(ABILITY_DEXTERITY, 1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel, somehow, swifter and more agile.",oPC);
|
|
break;
|
|
}
|
|
case 4:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAbilityIncrease(ABILITY_CONSTITUTION, 1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("Your mortality is diminished and you feel very healthy.",oPC);
|
|
break;
|
|
}
|
|
case 5:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAbilityIncrease(ABILITY_INTELLIGENCE, 1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel as though you have become far more intellectual.",oPC);
|
|
break;
|
|
}
|
|
case 6:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAbilityIncrease(ABILITY_WISDOM, 1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel as though you are more enlightened.",oPC);
|
|
break;
|
|
}
|
|
case 7:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectAttackIncrease(1,ATTACK_BONUS_MISC);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel more aggressive, and your prowess has apparently increased.",oPC);
|
|
break;
|
|
}
|
|
case 8:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectConcealment(5,MISS_CHANCE_TYPE_NORMAL);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel somewhat ghostly.",oPC);
|
|
break;
|
|
}
|
|
case 9:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE,10);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel as though you are more resistant to heat.",oPC);
|
|
break;
|
|
}
|
|
case 10:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD,10);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel as though you are more resistant to cold.",oPC);
|
|
break;
|
|
}
|
|
case 11:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_NEGATIVE,10);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("Your body feels as though it is protected from negative energies.",oPC);
|
|
break;
|
|
}
|
|
case 12:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_ACID,10);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You have been blessed with divine acid resistance.",oPC);
|
|
break;
|
|
}
|
|
case 13:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectDamageImmunityIncrease(DAMAGE_TYPE_ELECTRICAL,10);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel as if your body is electrified by the obelisk.",oPC);
|
|
break;
|
|
}
|
|
case 14:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectACIncrease(1);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel as if you have an aura of protection about you.",oPC);
|
|
break;
|
|
}
|
|
case 15:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectHaste();
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("The power of the obelisk quickens your every step.",oPC);
|
|
break;
|
|
}
|
|
case 16:
|
|
{
|
|
int iLevel = GetHitDice(oPC);
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
GiveXPToCreature(oPC,750 * iLevel);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You have been made more powerful by the obelisk.",oPC);
|
|
}
|
|
case 17:
|
|
{
|
|
int iLevel = GetHitDice(oPC);
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
GiveXPToCreature(oPC,500 * iLevel);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You have been made more powerful by the obelisk.",oPC);
|
|
}
|
|
case 18:
|
|
{
|
|
int iLevel = GetHitDice(oPC);
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
GiveGoldToCreature(oPC,100 * iLevel);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("Gold has been spontaneously created upon your person.",oPC);
|
|
}
|
|
case 19:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectSavingThrowIncrease(SAVING_THROW_ALL,1,SAVING_THROW_TYPE_ALL);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel an aura of protection surrounding you.",oPC);
|
|
break;
|
|
}
|
|
case 20:
|
|
{
|
|
effect eEffect;
|
|
effect eShow = EffectVisualEffect(VFX_FNF_DISPEL_GREATER,FALSE);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eShow,oPC);
|
|
eEffect = EffectMovementSpeedIncrease(10);
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
SetLocalInt(oPC,"useobelisk",1);
|
|
FloatingTextStringOnCreature("You feel more fleet-footed and unhindered.",oPC);
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|