Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void BossEmir(object oBoss)
- {
- int nRandom = Random(100) + 1 ;
- if(nRandom <= 20)
- {
- int bSpawned = FALSE;
- if(GetLocalInt(oBoss, "bHasSpawnedElementaireTerre") == FALSE)
- {
- //invoque Elementaire spécifique
- SetLocalInt(oBoss, "bHasSpawnedElementaireTerre", TRUE);
- SpeakString("texte à mettre");
- CreateCreature("resref_ElementaireTerre",GetLocation(GetObjectByTag("tp_boss_elementaire_terre")));
- bSpawned = TRUE;
- // applique effet sur PC sur rayon 6 metres
- effect e;
- e = EffectDamage(Random(50) + 50, DAMAGE_TYPE_BLUDGEONING, TRUE);
- e = EffectLinkEffects(EffectNWN2SpecialEffectFile("sp_meteor_swarm_tiny_imp.sef"), e);
- location lBoss = GetLocation(oBoss);
- object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 6.0, lBoss);
- while(GetIsObjectValid(oEnemy))
- {
- if(GetIsEnemy(oEnemy, oBoss))
- {
- ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy);
- FloatingTextStringOnCreature("**texte à mettre**", oEnemy, FALSE);
- }
- oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 6.0, lBoss);
- }
- AssignCommand(oBoss, SpeakString("texte à mettre"));
- AssignCommand(oBoss, PlayVoiceChat(VOICE_CHAT_BATTLECRY1));
- }
- break;
- }
- else if(nRandom <=40)
- {
- int bSpawned = FALSE;
- if(GetLocalInt(oBoss, "bHasSpawnedElementaireFeu") == FALSE)
- {
- //invoque Elementaire spécifique
- SetLocalInt(oBoss, "bHasSpawnedElementaireFeu", TRUE);
- SpeakString("texte à mettre");
- CreateCreature("resref_ElementaireFeu",GetLocation(GetObjectByTag("tp_boss_elementaire_feu")));
- bSpawned = TRUE;
- // applique effet sur PC sur rayon 20 metres
- effect e;
- e = EffectDamage(Random(150) + 50, DAMAGE_TYPE_FIRE, TRUE);
- e = EffectLinkEffects(EffectNWN2SpecialEffectFile("ror_lavabrst_01"), e);
- e = EffectLinkEffects(EffectNWN2SpecialEffectFile("sp_fire_aoe"), e);
- location lBoss = GetLocation(oBoss);
- object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 20.0, lBoss);
- while(GetIsObjectValid(oEnemy))
- {
- if(GetIsEnemy(oEnemy, oBoss))
- {
- ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy);
- FloatingTextStringOnCreature("**texte à mettre**", oEnemy, FALSE);
- }
- oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 20.0, lBoss);
- }
- AssignCommand(oBoss, SpeakString("texte à mettre"));
- AssignCommand(oBoss, PlayVoiceChat(VOICE_CHAT_BATTLECRY1));
- }
- break;
- }
- else if(nRandom <=55)
- {
- // applique effet sur PC sur rayon 20 metres
- effect e;
- e = EffectDamage(Random(40) + 40, DAMAGE_TYPE_BLUDGEONING, TRUE);
- e = EffectLinkEffects(EffectNWN2SpecialEffectFile("sp_earthquake"), e);
- e = EffectLinkEffects(EffectKnockdown(), e);
- location lBoss = GetLocation(oBoss);
- object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 20.0, lBoss);
- while(GetIsObjectValid(oEnemy))
- {
- if(GetIsEnemy(oEnemy, oBoss))
- {
- ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy);
- FloatingTextStringOnCreature("**texte à mettre**", oEnemy, FALSE);
- }
- oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 20.0, lBoss);
- }
- AssignCommand(oBoss, SpeakString("texte à mettre"));
- AssignCommand(oBoss, PlayVoiceChat(VOICE_CHAT_BATTLECRY1));
- }
- else if(nRandom <=70)
- {
- // applique effet sur PC et rayons sur 2 metres
- effect e;
- e = EffectDamage(100, DAMAGE_TYPE_FIRE, TRUE);
- e = EffectLinkEffects(EffectNWN2SpecialEffectFile("sp_ray_fire"), e);
- location lBoss = GetLocation(oBoss);
- object oEnemy = GetFirstObjectInShape(SHAPE_SPHERE, 2.0, lBoss);
- while(GetIsObjectValid(oEnemy))
- {
- if(GetIsEnemy(oEnemy, oBoss))
- {
- DelayCommand(0.1, ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy));
- DelayCommand(3.1, ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy));
- DelayCommand(6.1, ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy));
- DelayCommand(9.1, ApplyEffectToObject(DURATION_TYPE_INSTANT, e, oEnemy));
- FloatingTextStringOnCreature("**texte à mettre**", oEnemy, FALSE);
- }
- oEnemy = GetNextObjectInShape(SHAPE_SPHERE, 2.0, lBoss);
- }
- AssignCommand(oBoss, SpeakString("texte à mettre"));
- AssignCommand(oBoss, PlayVoiceChat(VOICE_CHAT_BATTLECRY1));
- }
- else if(nRandom <=100) //30% rien
- {
- SpeakString("texte à mettre");
- }
- if(bSpawned)
- {//Spawn d'un elementaire
- ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectNWN2SpecialEffectFile("sp_curse.sef"), oBoss);
- }
- else
- {//BossEmir déja spawné, on recommence
- BossEmir(oBoss);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement