// Custom zombie damage effects for Resident Evil Online // Uses Tag-based scripting // Created by Zunath on July 27, 2007 // Modified by Zunath on September 27, 2011 // Some concepts taken from x2_s3_onhitcast by Bioware // WALKER BITES: // - Player may be afflicted with slow for 1-4 seconds (30% chance) //#include "inc_system_const" //#include "colors_inc" //#include "disease_include" //#include "adv_include" void main() { // The item casting triggering this spellscript object oBite = GetSpellCastItem(); // The target of the bite - In this case, the player object oPC = GetSpellTargetObject(); // The caller of this script is the Zombie object oZombie = OBJECT_SELF; // Will not fire for non-PCs, DMs, or those with the effect of sanctuary // Also no sense applying slow if the PC is knocked out or dead if(GetHasSpellEffect(SPELL_SANCTUARY, oPC) || !GetIsPC(oPC) || GetIsDM(oPC) || GetCurrentHitPoints(oPC) < 1 || GetIsDead(oPC)) return; int iSlowChance = d100(1); int iDC = 30; // Player failed the DC check. Inflict with slow for 2-4 seconds if(iSlowChance <= iDC) { float fDuration = IntToFloat(Random(4) + 2); effect eEffect = EffectLinkEffects(EffectVisualEffect(VFX_IMP_DISEASE_S), EffectSlow()); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oPC, fDuration); } }