annuncio

Comprimi
Ancora nessun annuncio.

[SCRIPT] Abilita' cure degli Unicorni

Comprimi
X
 
  • Filtro
  • Ora
  • Visualizza
Elimina tutto
nuovi messaggi

  • [SCRIPT] Abilita' cure degli Unicorni

    In Scripts/Mobiles/PlayerMobile.cs, alla fine del metodo OnDamage aggiungere:
    codice:
    if ( Core.AOS )
      CheckMountAbility( from );
    Subito dopo aggiungere questo metodo:
    codice:
    private bool CheckMountAbility( Mobile attacker )
    {
      if ( !this.Player || !this.Mounted )
        return false;
    
      BaseMount mount = (BaseMount)this.Mount;
    
      if ( ( mount == null ) || ( mount.Rider != this ) )
        return false;
    
      if ( mount is Unicorn )
      {
        // For an unicorn to cure its rider, they must be poisoned and have less than 40 hps.
        if ( !this.Poisoned || ( this.Hits >= 40 ) )
          return false;
    
        // Enforce the ability delay.
        if ( DateTime.Now < mount.NextMountAbility )
          return false;
    
        if ( this.CurePoison( this ) )
        {
          this.SendMessage( 0x3B2, "Your mount senses you are in danger and aids you with magic." );
          this.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
          this.PlaySound( 0x1E0 );	// Cure spell effect.
          this.PlaySound( 0xA9 );		// Unicorn's whinny.
    
          mount.NextMountAbility = DateTime.Now + mount.MountAbilityDelay;
          return true;
        }
      }
      else if ( mount is Kirin )
      {
        if ( ( attacker == null ) || ( attacker == this ) )
          return false;
    
        // For a Ki-rin to cast a lightning bolt, its rider must have less than 30 hps.
        if ( this.Hits >= 30 )
          return false;
    
        // Enforce the ability delay.
        if ( DateTime.Now < mount.NextMountAbility )
          return false;
    
        // Lightning effect.
        attacker.BoltEffect( 0 );
        // 35~100 damage, unresistable, by the Ki-rin.
        attacker.Damage( Utility.RandomMinMax( 35, 100 ), (BaseCreature)mount );
    
        this.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042534 );	// Your mount calls down the forces of nature on your opponent.
        this.FixedParticles( 0, 0, 0, 0x13A7, EffectLayer.Waist );
        this.PlaySound( 0x29 );	// Thunder sound
        this.PlaySound( 0xA9 );	// Ki-rin's whinny.
    
        mount.NextMountAbility = DateTime.Now + mount.MountAbilityDelay;
        return true;
      }
    
      return false;
    }
    Scripts/Mobiles/Mounts/BaseMount.cs, aggiungere in cima:
    codice:
    using System;
    Nella dichiarazione delle variabili, aggiungere:
    codice:
    private DateTime m_NextMountAbility;
    Modificare cosi' il metodo Serialize:
    codice:
    public override void Serialize( GenericWriter writer )
    {
      base.Serialize( writer );
    
      writer.Write( (int) 1 ); // version
    
      writer.Write( m_Rider );
      writer.Write( m_InternalItem );
      writer.Write( m_NextMountAbility );
    }
    Aggiungere questi metodi:
    codice:
    public virtual TimeSpan MountAbilityDelay { get{ return TimeSpan.Zero; } }
    
    [CommandProperty( AccessLevel.GameMaster )]
    public DateTime NextMountAbility
    {
      get{ return m_NextMountAbility; }
      set{ m_NextMountAbility = value; }
    }
    Aggiungere al metodo Deserialize:
    codice:
    case 1:
    {
      m_Rider = reader.ReadMobile();
      m_InternalItem = reader.ReadItem();
      m_NextMountAbility = reader.ReadDateTime();
    
      if ( m_InternalItem == null )
        Delete();
    
      break;
    }
    Per finire, aggiungere in Unicorn.cs e in Kirin.cs:
    codice:
    public override TimeSpan MountAbilityDelay{ get{ return TimeSpan.FromHours( 1.0 ); } }
    Nota: tutti i dati sono accurati come da specifiche OSI. Ringraziate Antares per i cliloc e gli effetti.
    Ultima modifica di Gastaman; 25-05-2005, 14:27.
    Si scrive Felucca, non Felluca o Fellucca!

  • #2
    MA SEI UN MITO! >^-^<


    Victor Vlad - The Ultimate Tamer
    Lucretia - Ælite Keeper
    Anjelique De Sai - Wonderfully Married

    Commenta


    • #3
      Mitttico!

      Commenta


      • #4
        bravo !

        Commenta


        • #5
          Dovrebbero curare anche i Ki Rin oppure esclusivamente gli Unicorni?

          Commenta


          • #6
            I Ki-rin castano un lightning bolt sul nemico, ma vai a sapere quanto danno fa, e che tipo...

            Edit: googlando ho trovato questa pagina... direi che ce n'e' abbastanza per fare anche i Ki-rin.
            Ultima modifica di Gastaman; 24-05-2005, 17:27.
            Si scrive Felucca, non Felluca o Fellucca!

            Commenta


            • #7
              Direi di copiare solo la parte che ci interessa:

              Unicorns and Ki-rin

              The bug where you need to double-click twice to dismount a unicorn or ki-rin has been fixed.
              Unicorns are now immune to poison.
              Unicorns will no longer open a gate for their rider. Instead, if their rider becomes poisoned and falls below 40 hit points, they will cure them. Once they cure their rider, they cannot cure them for another hour. This cure is always successful, regardless of the level of poison.
              Ki-rins call down the force of nature on any creature or player that brings its rider below 30 hit points. This wrath is in the form of a 35-100 damage lightning bolt that cannot be resisted. They may only do this once per hour. Previously, this ability only worked in Ilshenar, but now works everywhere.


              e direi di dare un'occhiata anche a questo:

              Pet Resurrection

              When a bonded pet dies, it turns into a “pet ghost.” This ghost can still obey the movement commands (follow, come, etc.). The pet ghost will not dissipate or lose loyalty, but cannot be stabled.
              Any player can attempt to resurrect the pet with bandages if they have at least 80 Veterinary and 80 Animal Lore. The pet owner or a friend of the pet must be nearby to confirm they want the pet to be resurrected.
              Resurrected pets suffer skill loss. Pets resurrected by their owner receive less of a skill penalty.

              Commenta


              • #8
                Aggiunta anche l'abilita' per i Ki-rin.
                Si scrive Felucca, non Felluca o Fellucca!

                Commenta


                • #9
                  bhe... senza parole

                  Commenta


                  • #10
                    Mi ripeto..... mitttico!!

                    Commenta


                    • #11
                      Originally posted by Rhapsody
                      Aggiunta anche l'abilita' per i Ki-rin.

                      ...non faccio in tempo a lamentarmi che hai già risolto il problema.

                      Commenta


                      • #12
                        Se le sfere alte sono d'accordo (non vedo perché non dovrebberlo esserlo) lo inserisco insieme agli altri nel prossimo update che sarà entro pochi giorni. Vi dico un po' di anticipazioni: finalmente anche gli inquisitor potranno essere rubati.. Ci saranno inoltre praticamente tutti i bug fix che avete segnalato qua o sul mio ICQ (spero di non dimenticarmi nulla), e forse qualcosa della nuova pub (exorcism, i ghost possono essere visti dai gm spirit speak)

                        Commenta


                        • #13
                          Braverrimi i nuovi scripter.

                          Finalmente si inizia a smuovere qualcosa!!

                          Commenta

                          Sto operando...
                          X