//:://///////////////////////////////////////////// //:: ROPER SCRIPT //:: On UserDefined Script //:: By: Sir Otus //::////////////////////////////////////////////// void RoperAttack(object oPC); void main() { int nUser = GetUserDefinedEventNumber(); // ************************************************************* // HEARTBEAT - // ************************************************************* if(nUser == 1001) { } // ************************************************************* // PERCEIVE - // ************************************************************* else if(nUser == 1002) { } // ************************************************************* // END OF COMBAT - // ************************************************************* else if(nUser == 1003) { object oPC = GetAttackTarget(); if(oPC == OBJECT_INVALID) oPC = GetAttemptedAttackTarget(); if(GetDistanceToObject(oPC) < 15.0) RoperAttack(oPC); } // ************************************************************* // ON CONVERSATION // ************************************************************* else if(nUser == 1004) { } // ************************************************************* // ON ATTACKED // ************************************************************* else if(nUser == 1005) { } // ************************************************************* // ON DAMAGED - // ************************************************************* else if((nUser == 1006) || (nUser == 1007)) { } // ************************************************************* // ON DEATH - // ************************************************************* else if(nUser == 1007) { } // ************************************************************* // ON DISTURBED // ************************************************************* else if(nUser == 1008) { } } // ************************************************************* // ROPER ATTACK // ************************************************************* void RoperAttack(object oPC) { location lTarget = GetLocation(OBJECT_SELF); int nSTR; int nDmg; effect eDam; effect eEffect1; effect eEffect2 = EffectSlow(); effect eExp = EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_NATURE); if(TouchAttackRanged(oPC)) { nDmg = Random(13)+2; eDam = EffectDamage(nDmg, DAMAGE_TYPE_PIERCING, DAMAGE_POWER_NORMAL); AssignCommand(oPC, ActionJumpToLocation(lTarget)); DelayCommand(0.5, FloatingTextStringOnCreature("The roper's tendrils pull you to its toothy maw...", oPC)); DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oPC)); DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_INSTANT,eExp,oPC)); DelayCommand(0.6, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect2, oPC, 15.0f)); // Determine Saving Throw for Weakness if (FortitudeSave(oPC,18)) { } else { nSTR = Random(15)+1; eEffect1 = EffectAbilityDecrease(ABILITY_STRENGTH, nSTR); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect1, oPC, 15.0f); } } }