As said and not to mess up the other thread, I'll put this on an extra one so it's easier to read through:
I'm in the middle of the creation of a new boss for our server and this is what I want her to be like (she's a Demi-goddess anyways which explains her powers there):
* The Boss is spawned by a trigger at the start of the level (actually might place the trigger on "OnEnter" of the
room she's in), naturally
* have stages of combat during which she'll change immunities, damage types she uses and resistances, also spawning 2 associates every two minutes (next 2 only if those that are still present have been slain) and I don't want her to be able to die with the associates still spawned (she can be hurt, but won't die, like leaving her at a certain amount of HP until players kill the associates - then they'll have 2 minutes to kill her off . If failing, she'll spawn again 2 associates and players will have to try time it again)
* fight will be on a round
platform (you know the tile with the invisible bridge) and I want her
and her associates NOT to follow players away from the platform (make
her not lureable)
Her Abilities should be something like this:
* call in 2 more associates every 2 min if the first ones have been slain
* Stages of Combat should be something like this (I appreciate other ideas of you guys as well if you have just suggest)
Stage 1 (change visual (let's call it VIS 1) , high melee resistances, only truely damageable by Clerics, Mages, Sorcs)
Stage 2 (change visual again, high magical resistances, only truely damageable by melee weapons)
Stage
3 (again change to another form and causing visual effects randomly go off in a
sphere around her if possible every few combat rounds, for
example the "mystical explosion", while trying to keep any magician wizs
and sorcs busy or if in range of touch attack of those trying to stun one of them (no save) then hurrying back to
attack the melees with her own melee (2-h-axe)
Stage 4 (visual change to her true form,
pulling ALL players close to her and knocking them down, then pushing
them away so they are "sent flying off the platform" (porting them to random places in the room, maybe 4 diferent options on that) and would have to
run back to her to face her again. In this form have 50% immunity to
every damage type)
HUGE Question is:
Is all of that
possible without a heartbeat? Or at least, only a heartbeat that fires
while in combat mode, so the server doesn't get stressed too much?
And
would someone be willing to script that? I'd would be really happy if
someone could help me out there...
This is what I go so far from TERRORBLE here:
Terrorble wrote...
DM-Chemosh wrote...
* The Boss is spawned by a trigger at the start of the level, naturally
Make
an encounter that fires once or however you want, put it down.
Right-click the encounter area to set a spawn point. Move that spawn
point to where you want the boss to be.
*
She should say a few 5 sentences to the players (in which time I want
them to not be able to attack her!), then spawn 2 associates I made and
allow players to attack her.
* fight will be on a round platform
(you know the tile with the invisible bridge) and I want her and her
associates NOT to follow players away from the platform (make her not
lureable)
In the properties of the boss, you'll
have to make a custom script for the OnSpawn event (i.e. edit the
existing one, just give it a new name when you save it and only use it
for that boss version) You'd need to add something like this
within that script:
**these next 4 lines need to go at the
very top of the OnSpawn script right after the #include statements and
before the void main(). We need to use this non-standard function
later, so we have to define it first.
void CreateObjectVoid(int nObjectType, string sTemplate, location lLoc, int bUseAppearAnimation = FALSE)
{
CreateObject(nObjectType, sTemplate, lLoc, bUseAppearAnimation);
}
//put all this next stuff right after the void main() {
object oArea = GetArea(OBJECT_SELF); //determines the area the boss that just spawned is in
string sAreaTag = GetTag(oArea);
//create an effect that we can apply to PC/NPCs so they can't do anything while the boss is talking to them
effect eNoMove = EffectCutSceneParalyze(); //or maybe EffectCutSceneDominated();
object oTarget = GetFirstObjectInArea(oArea); //Get the first thing in the area
while(
GetIsObjectValid(oTarget) ) //start a loop that will cycle thru all
objects in the area until it runs out of valid things to check
{
//if the thing we're looking at is a creature then...
if( GetObjectType(oTarget) == OBJECT_TYPE_CREATURE )
{
//Freeze the object for 40.0 seconds with the paralyze or dominated effect we made
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eNoMove, oTarget, 40.0);
}
//cycle to next object in the area and do the same thing
oTarget = GetNextObjectInArea(oArea);
}
//set up a few lines for our actress to spout off before annhiliating your players. add more as you like
string sBossChatter1 = "I are going to pwn you.";
string sBossChatter2 = "Look 'round you, this be your eternal resting place. Like it?";
string sBossChatter3 = "'nuf talk, it's dying time!";
string sBossChatter4 = "Oh and where are my cronies...";
//Recite the lines at 5, 15, 25 and 35 second intervals. Hopefully the players are close enough to hear/see them
//Remember we froze everyone in place for 40seconds
DelayCommand(5.0, SpeakString(sBossChatter1, TALKVOLUME_TALK));
DelayCommand(15.0, SpeakString(sBossChatter2, TALKVOLUME_TALK));
DelayCommand(25.0, SpeakString(sBossChatter3, TALKVOLUME_TALK));
DelayCommand(35.0, SpeakString(sBossChatter4, TALKVOLUME_TALK));
//You'll have to put down 2 waypoints where you want the "associates" to be. Their tags need to be: cronie_WP1 and 2
object oWP1 = GetNearestObjectByTag("cronie_WP1");
object oWP2 = GetNearestObjectByTag("cronie_WP2");
//Now that we have the WPs, get their locations so we can create the "associates" there
location locWP1 = GetLocation(oWP1);
location locWP2 = GetLocation(oWP2);
//After 36 seconds, create the associates at their respective waypoints.
//In this case, the associates' blueprint resrefs are "cronie1" and "cronie2"
DelayCommand(36.0, CreateObjectVoid(OBJECT_TYPE_CREATURE, "cronie1", locWP1));
DelayCommand(36.0, CreateObjectVoid(OBJECT_TYPE_CREATURE, "cronie2", locWP2));
**This
previous part has a few limitations: as soon as the boss spawns, it
freezes everyone. So the encouter will need to be small-ish and very
close to where the boss spawns. There are other ways to do this so that
the boss is already there, then the players are frozen just as they
enter a trigger area. Problem is, if one player is way ahead of the
group, the rest will miss out. This script will not freeze someone who
enters the area during or after the boss spawns. The boss will speak
its lines, but only those who are close will see/hear the text (you can
change those lines to use TALKVOLUME_SHOUT to ensure everyone hears it)
When the boss summons the cronies, I assume that the cronies are
different... and I'm not at my machine to see if this compiles.
Her Abilities should be something like this:
* call in 2 more associates every 2 min if the first ones have been slain
* have stages of combat:
This part goes in the OnSpawn script for each of the associates:
//You need to insert the tag of your boss here. For every version of this boss you make, keep all the tags identical
object oBoss = GetNearestObjectByTag("tag-of-boss");
//Get the tag of the cronie that this OnSpawn script is running for
sCronieTag = GetTag(OBJECT_SELF);
//Set a variable on the boss, then delete it in 2min to prevent cronies from spawning needlessly
SetLocalInt(oBoss, sCronieTag, TRUE);
DelayCommand(120.0, DeleteLocalInt(oBoss, "Cronie"));
This next long part goes in the OnDamaged script for your boss:
object oSelf = OBJECT_SELF;
//Check and see if it's time to summon new associates
object oCronie;
if( !GetLocalInt(oSelf, "Tag-of-cronie1-goes-here") )
{
oCronie = GetNearestObjectByTag( "Tag-of-cronie1-goes-here");
//if we can't locate cronie1, it must be dead so let's make a new one
if( GetIsObjectValid(oCronie) == OBJECT_INVALID )
{
CreateObject(OBJECT_TYPE_CREATURE, "cronie1", locWP1)
}
}
//Now do the same thing, but check for the 2nd cronie and create it if we can't find it
if( !GetLocalInt(oSelf, "Tag-of-cronie2-goes-here") )
{
oCronie = GetNearestObjectByTag( "Tag-of-cronie2-goes-here");
//if we can't locate cronie2, it must be dead so let's make a new one
if( GetIsObjectValid(oCronie) == OBJECT_INVALID )
{
CreateObject(OBJECT_TYPE_CREATURE, "cronie2", locWP2)
}
}
//Now we see if the boss is damaged enough to enter Stage2
//So
recall that if you want a highly melee resistant stage1, then make the
boss with all resistances how you like it in the palette.
//When the stage1 version reaches <20% total HP it will create the stage2 version which you need to make in the palette
//Determine what percent of your boss's HP are left
float fPercentHP = GetCurrentHitPoints(oSelf)/(GetMaxHitPoints(oSelf);
//if it's less than 20%, let's go to the next stage
if( fPercentHP < 20.0 )
{
//Pick effects that we can play to make ushering in the next stage a little more exciting
effect e1 = EffectVisualEffect(VFX_FNF_SUMMON_EPIC_UNDEAD);
effect e2 = EffectVisualEffect(VFX_DUR_BLIND);
effect e3 = EffectVisualEffect(VFX_FNF_SCREEN_SHAKE);
effect e4 = EffectVisualEffect(VFX_FNF_PWKILL);
effect e5 = EffectKnockdown();
//Destroy the stage1 boss version and create stage2 in its place
location locBoss = GetLocation(oSelf);
DestroyObject(oSelf);
CreateObject(OBJECT_TYPE_CREATURE, "blueprint-resref-of-stage2-goes-here", locBoss);
//Run our visual effects
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, e1, locBoss);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, e3, locBoss);
DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, e4, locBoss));
DelayCommand(1.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, e4, locBoss));
//We're going to knockdown and temporarily blind anything close to the boss
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, 20.0, locBoss);
while( GetIsObjectValid(oTarget) )
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, e2, oTarget, 0.5);
DelayCommand(2.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, e2, oTarget, 0.5));
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, e5, oTarget, 4.0);
oTarget = GetNextObjectInShape(SHAPE_SPHERE, 20.0, locBoss);
}
So
I've made it a bit further this time... I should've editted my first
post oops. Hopefully more later. So far this will get your stage2 boss
in play. To get later stages I just need to make a modification to
this last segment and probably tell you what to name the blueprint
resrefs for your boss versions.
Modifié par DM-Chemosh, 30 septembre 2010 - 01:15 .