-------------------------------------------------------------------------------- Script Name: Genji's Al-Qaida Script Author: Genji Script: In the perception event of the npc: // perception event script for genji's Al-Qaida script. // Genji genji@thegenji.com 9-26-02 void main() { int fbInt = GetLocalInt(OBJECT_SELF,"firebomb"); if (fbInt < 2) { if (GetIsPC(GetLastPerceived())) { object firebomb; if ((firebomb = GetItemPossessedBy(OBJECT_SELF,"FireBomb")) != OBJECT_INVALID && fbInt != 1) { talent tUse = GetCreatureTalentRandom(TALENT_CATEGORY_BENEFICIAL_HEALING_POTION); if(GetIsTalentValid(tUse)) { ClearAllActions(); SetLocalInt(OBJECT_SELF,"firebomb",1); ActionUseTalentOnObject(tUse, OBJECT_SELF); DelayCommand(0.5,SignalEvent(OBJECT_SELF,EventUserDefined(1200))); } } } } else { ExecuteScript("NW_C2_DEFAULT2",OBJECT_SELF); // or whatever your default perception script is } } In the UserDefinedEvent of the NPC: // user defined event script for genji's Al-Qaida script. // Genji genji@thegenji.com 9-26-02 // function to repeatedly apply the fire effect to terrorist while running void CreateFire(); void CreateFire() { object fire = CreateObject(OBJECT_TYPE_PLACEABLE,"plc_flamelarge",GetLocation(OBJECT_SELF)); DestroyObject(fire,IntToFloat(d8() + 3)); } void main() { int ude = GetUserDefinedEventNumber(); if (ude == 1200) { effect eFireEffect = EffectVisualEffect(VFX_IMP_FLAME_M); float time = 1.7; // delay for potion quaffing animation object target = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC); // change the target to whatever creature you want to get smoked. location targetLoc = GetLocation(target); location startLoc = GetLocation(OBJECT_SELF); int distance = FloatToInt(GetDistanceBetweenLocations(targetLoc,startLoc)) * 10; int closing; // go! ActionMoveToLocation(targetLoc,TRUE); for(closing = 0; closing < distance; closing = closing + 7) { time = time + 0.25; DelayCommand(time,ApplyEffectToObject(DURATION_TYPE_INSTANT,eFireEffect,OBJECT_SELF)); DelayCommand(time,CreateFire()); if ((distance - closing) < 15) { DelayCommand(time,CreateFire()); DelayCommand(time,ClearAllActions()); DelayCommand(time,ActionCastSpellAtObject(SPELL_FIREBALL,OBJECT_SELF,METAMAGIC_SILENT,TRUE,20,PROJECTILE_PATH_TYPE_DEFAULT,TRUE)); DelayCommand(time,SetLocalInt(OBJECT_SELF,"firebomb",2)); // mute, this object's life is going to be short. break; } } } } BLANK OUT ALL OTHER EVENTS. Details: This is a Terrorist NPC. Drop him in a town, and upon seeing any pc, he will drink his potion, burst into flames, charge the pc's and blow up, killing himself and any commoners around him. He leaves a burn trail that will gradually go out, and if you kill him before he gets to his 'spot', he will just burn out without an explosion. You can also pick pocket him to remove his potion so he's disarmed. Makes for good role playing IMHO. Download the .erf here and plug him in. Requires a custom potion, but it's all in the .erf. Genji -------------------------------------------------------------------------------- Last Updated: 09/07/2002 Webmaster --------------------------------------------------------------------------------