RoT2_PRC8/_module/nss/drink_n_explode3.nss
Jaysyn904 499aba4eb3 Initial upload
Initial upload
2023-09-25 18:13:22 -04:00

46 lines
1.7 KiB
Plaintext

void CreateFire();
void main()
{
object firebomb;
if (GetIsObjectValid(firebomb = GetItemPossessedBy(OBJECT_SELF,"firebomb")) &&
GetLocalInt(OBJECT_SELF,"firebomb") != 1)
{
talent tUse = GetCreatureTalentRandom(TALENT_CATEGORY_BENEFICIAL_HEALING_POTION);
{
ClearAllActions();
DelayCommand(1.0, ActionUseTalentOnObject(tUse, OBJECT_SELF));
}
}
{
effect eFireEffect = SupernaturalEffect(EffectVisualEffect(VFX_IMP_FLAME_M));
float time = 1.7; // delay for potion quaffing animation
object target = GetObjectByTag("Mared");
// change the target to whatever creature you want to get smoked.
location targetLoc = GetLocation(OBJECT_SELF);
location startLoc = GetLocation(OBJECT_SELF);
// go!
ActionMoveToLocation(targetLoc,TRUE);
{
time = time + 1.3;
DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT,eFireEffect,OBJECT_SELF));
DelayCommand(1.0,CreateFire());
{
ActionSpeakString("What's happening?!");
DelayCommand(1.0,CreateFire());
effect eVisual = EffectVisualEffect(VFX_FNF_FIREBALL, FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, GetObjectByTag("Mared"));
}
}
}
}
void CreateFire()
{
object fire = CreateObject(OBJECT_TYPE_PLACEABLE,"plc_flamelarge",GetLocation(OBJECT_SELF));
DestroyObject(fire,IntToFloat(d6() + 3));
{
effect eVisual = EffectDeath(FALSE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, GetObjectByTag("Mared"));
ActionSpeakString("AARRRGGGHHHHH!!!!!!!!!!!");
}
}