1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How would I go about this?

Discussion in 'Script Support' started by Redmoon, Feb 25, 2014.

  1. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    Publish Number:
    54
    There is limited information on the Clockwork Exodus, *sigh*.
    It is suppose to "spawn" death vortexes, have an aura energy, and a spread gold upon death.

    I have the death vortex, but how should I put it in so CE spawns them?

    What would be an a good "aura"? Earthquake? (should be energy, but from the limited things I've seen there isn't any animation with the aura)

    Also, the alter needs to be able to be place by players, and disappear after it is used.
    (only in tram/fel at shrines)

    Other than the above, I have this done. :)
     
    #1 Redmoon, Feb 25, 2014
    Last edited: Feb 25, 2014
    • Funny Funny x 1
  2. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    365
    Likes Received:
    72
    you could add an animation effect for the energy aura

    Spawn Death Vortices:
    Code (C#):
    1.  
    2. public void SpawnVortices( Mobile target )
    3. {
    4. Map map = this.Map;
    5. if ( map == null )
    6. return;
    7. int newVortices = Utility.RandomMinMax( 3, 6 );  //how many
    8. for ( int i = 0; i < newVortices; ++i )
    9. {
    10. DeathVortex dv = new DeathVortex();
    11. dv.Team = this.Team;
    12. dv.FightMode = FightMode.Closest;
    13. bool validLocation = false;
    14. Point3D loc = this.Location;
    15. for ( int j = 0; !validLocation && j < 10; ++j )
    16. {
    17. int x = X + Utility.Random( 3 ) - 1;
    18. int y = Y + Utility.Random( 3 ) - 1;
    19. int z = map.GetAverageZ( x, y );
    20. if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) )
    21. loc = new Point3D( x, y, Z );
    22. else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
    23. loc = new Point3D( x, y, z );
    24. }
    25. wraith.MoveToWorld( loc, map );
    26. wraith.Combatant = target;
    27. }
    28. }
    29. public void DoSpecialAbility( Mobile target )
    30. {
    31. if ( 0.2 >= Utility.RandomDouble() ) //chance to spawn
    32. SpawnVortices( target );
    33. }
    34. public override void OnGaveMeleeAttack( Mobile defender )
    35. {
    36. base.OnGaveMeleeAttack( defender );  //if it hits you it spawns vortices
    37. DoSpecialAbility( defender );
    38. /*defender.Damage( Utility.Random( 20, 10 ), this );  //random damage & stat adjust
    39. defender.Stam -= Utility.Random( 20, 10 );
    40. defender.Mana -= Utility.Random( 20, 10 );*/
    41. }
    42. public override void OnGotMeleeAttack( Mobile attacker )
    43. {
    44. base.OnGotMeleeAttack( attacker ); //if you hit creature it spawns vortices
    45. DoSpecialAbility( attacker );
    46. }
    47.  
     
  3. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    I'm not sure why my post was funny, but I'm glad ya got a laugh. ;) Thanks for pointing me in the right direction.
     
  4. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    365
    Likes Received:
    72
    you said, "Other than the above, I have this done" that's what I thought was funny other then a list of things you have it done, I can relate to that been there many times; and it struck me as funny is all. Cheers
     
  5. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    Wasn't a problem,lol. Yeah the "list" was about 10 things, that grew to about 20 the more I read up on it. :eek: The list is now at 2 things that need to be tweaked. ;)
     
  6. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    365
    Likes Received:
    72
    Did you figure the aura part, check this one out this will affect mobiles within a specified range taken from Blackrock Elemental

    Code (C#):
    1.  
    2. using System;
    3. using Server.Items;
    4. using Server.Targeting;
    5. using System.Collections;
    6. using Server;
    7. using Server.Misc;
    8. using Server.Spells;
    9.  
    10. namespace Server.Mobiles
    11. {
    12.     [CorpseName( "a your creature corpse" )]
    13. publicclass yourcreature : BaseCreature
    14.     {
    15. privateDateTime m_Delay = DateTime.Now; //remember this
    16.  

    Then after the loot section add this

    Code (C#):
    1.  
    2. privateDateTime m_NextAbilityTime;
    3. privatevoid DoAreaLeech()
    4.         {
    5.             m_NextAbilityTime += TimeSpan.FromSeconds( 2.5 );
    6. this.FixedParticles( 0x376A, 10, 10, 9537, 33, 0, EffectLayer.Waist );
    7.             Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback( DoAreaLeech_Finish ) );
    8.         }
    9. privatevoid DoAreaLeech_Finish()
    10.         {
    11. ArrayList list = newArrayList();
    12. foreach ( Mobile m inthis.GetMobilesInRange( 6 ) )
    13.             {
    14. if ( this.CanBeHarmful( m ) && this.IsEnemy( m ) )
    15.                     list.Add( m );
    16.             }
    17.             {
    18. double scalar;
    19. if ( list.Count == 1 )
    20.                     scalar = 0.90;
    21. elseif ( list.Count == 2 )
    22.                     scalar = 0.50;
    23. else
    24.                     scalar = 0.30;
    25. for ( int i = 0; i < list.Count; ++i )
    26.                 {
    27.                     Mobile m = (Mobile)list[i];
    28. int damage = (int)(m.Hits * scalar);
    29.                     damage += Utility.RandomMinMax( -5, 5 );
    30. if ( damage < 1 )
    31.                         damage = 1;
    32.                     m.MovingParticles( this, 0x36F4, 1, 0, false, false, 32, 0, 9535, 1, 0, (EffectLayer)255, 0x100 );
    33.                     m.MovingParticles( this, 0x0001, 1, 0, false, true, 32, 0, 9535, 9536, 0, (EffectLayer)255, 0 );
    34. this.DoHarmful( m );
    35. this.Hits += AOS.Damage( m, this, damage, 0, 0, 0, 0, 100 );  //100% Energy Damage
    36.                 }
    37.             }
    38.         }
    39. publicoverridevoid OnThink()
    40.         {
    41. if ( DateTime.Now >= m_NextAbilityTime )
    42.             {
    43.                 Mobile combatant = this.Combatant;
    44. if ( combatant != null && combatant.Map == this.Map && combatant.InRange( this, 12 ) ) //within how many tiles will be affected
    45.                 {
    46.                     m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 10, 15 ) );
    47. int ability = Utility.Random( 4 );
    48. switch ( ability )
    49.                     {
    50. case 1: DoAreaLeech(); break;
    51.                     }
    52.                 }
    53.             }
    54. if ( DateTime.Now > m_Delay )
    55.             {
    56.                 Ability.Aura( this, 10, 20, 2, 3, 0, "The radiating energy emitted from the creature is damaging you!" );  //set your message
    57.                 m_Delay = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 5, 10 ) );
    58.             }
    59. base.OnThink();
    60.         }
    61.  
    62.  
     
    #6 RedBeard, Feb 26, 2014
    Last edited: Feb 26, 2014
  7. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    Lol, nope completely forgot about the aura.

    Here is what is done:
    Exodus Arch Zealot (quest giver of sorts..more that he just tells you what you will need)

    All the items needed can be gotten from Exodus chest, crafted, or random loot from Dupre's peeps/CE peeps:

    Dupre's Men:
    Squire, Knight, Champion


    Exodus' Minion:
    just add loot to them

    Robe of Rite
    DefTailoring
    Resources: leather, fire ruby, gold dust, and abyssal cloth

    Exodus Sacrificial Dagger
    DefBlacksmithy
    Resources: ingots, blue diamond, fire ruby, small piece of blackrock

    Exodus Summoning Rite
    DefInscription
    Resources: daemon blood, taint, daemon bone, summon daemon scroll


    Exodus Summoning Alter Addon (Only Craftable)
    DefCarpentry
    Resources: logs, granite, small piece of blackrock, nexus core (75 magery also needed)


    DefAlchemy: (Only Craftable)
    Resources :gold to make gold dust
    Nexus Core:
    Resources: mandrake root, spider silk, dark sapphire, crushed glass


    Exodus Tome- I made this where all items need to be in your backpack...why wear a robe that'll go *poof* at any minute???

    Exodus Chest- for thieves to get items from chest (using xml to make it only appear with detect hidden)

    Teleport Scroll to Exodus-
    I prefer a scroll with lifespan to give all players a chance to go at one time..or not.

    Clockwork Exodus-Champion
    Death Vortex- what CE champion spawns when attacked
    Energy Aura (will add this in..forgot)

    CE Loot:
    Asclepius
    Bracers of Alchemical Devastation
    Clockwork Leggings
    Dupre's Sword
    Hygieias' Amulet
    Scroll of Valient Commendation
    (need to test this one via slaying CE)

    I'm using a region controller to not allow marking runes in Ver Lor Reg.

    Things needed:
    kick out timer 10 mins after Clockwork Exodus has been slayed
    (this is not a biggy for me, but maybe for diehard "it has to be like OSI" people")

    ability for players to place Summoning Alter at shrines, but only certain shrines
    ( I'm truly leaning to just placing a few at shrines due to frustration,lol)

    Only allowing a new group to get teleport scroll if an instance is not currently in progress.
    (this one I'm not sure is a big deal, as people can go to any champ spawn at any time)
     
  8. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    365
    Likes Received:
    72
    I gotta say this sounds interesting.

    1 & 2 A similar method is used in peerless (PeerlessAltar.cs)
    3 Can be done with xml or maybe this may give you some ideas also
    http://www.runuo.com/community/threads/runuo-2-0-rc1-virtue-quest.77261/#post-647775
     
    #8 RedBeard, Feb 27, 2014
    Last edited: Feb 27, 2014
  9. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    Now that's freakin' brilliant! I've been pulled a million different directions these past few weeks. I'm looking into converting it to a Peerless system...just read that it is considered a peerless champ. o_O
    You will be getting props for this, has will everyone that has helped. ;)
     
  10. Redmoon
    Offline

    Redmoon Active Member

    Joined:
    Sep 16, 2013
    Messages:
    264
    Likes Received:
    39
    Thank you Redbeard, the peerless system worked much better...and less code. I'm currently looking for the correct bodies for the exodus monsters, (juggernaut, drone, etc).

    Edit- But all is complete and seems to be in working order other than the correct bodies.
    *WOOT*
     
  11. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    365
    Likes Received:
    72
    Sweet, looking forward to this.
     
  12. zerodowned
    Offline

    Moderator ServUO Developer

    Joined:
    Jun 28, 2014
    Messages:
    1,580
    Likes Received:
    185
    Pardon me for butting in....

    There's a script for AuraCreature already in the distro scripts. Scripts\Mobiles\Abilities\AuraCreature.cs
    *Assuming that you're using ServUO or at least Orb 3.0, RunUO doesn't have it

    To use it you need to change the ParentClass to AuraCreature

    public class ClockworkExodus : BaseCreature <-- Change BaseCreature to AuraCreature

    Then in the constructable for the Mobile you'll add this

    AuraMessage = "An intense energy force is damaging you!"; // not sure what this should say
    AuraType = ResistanceType.Energy; //
    MinAuraDelay = 1; // minimum amount of time that the aura will trigger
    MaxAuraDelay = 3;
    MinAuraDamage = 2;
    MaxAuraDamage = 4;
    AuraRange = 5;

    and yeah, that's all.

    let me know if you have any questions.