| QUOTE (Zdravo @ Nov 13 2003, 04:21 PM) |
| J'espère que j'ai bien compris le sens de ce forum :P Au pire, un modo déplace, zip zap... ^^ Je voudrais savoir si c'était possible d'intégrer une musique dans le jeu ? nottament, "vive le vent" en midi.. pour les fêtes de fin d'années qui approche :D A mon avis, oui, mais comment ? B) Avec possibilité de faire un cadeau au Pj présent... un cadeau tiré au hasard, que chaque Pj recevra dans sa pack :o ahhhh la magie de nöel :ph43r: |
| CODE |
| using System; using Server.Network; using Server.Items; namespace Server.Items { public class BaguetteFeuArtifice : BaseBashing { private int m_Charges; public override int AosStrengthReq{ get{ return 5; } } public override int AosMinDamage{ get{ return 5; } } public override int AosMaxDamage{ get{ return 6; } } public override int AosSpeed{ get{ return 40; } } [Constructable] public BaguetteFeuArtifice() : base( 0xDF2 ) { Weight = 1.0; LootType = LootType.Blessed; Name = "Baguette de Feux d'Artifice (Charges: 50)"; Charges = 50; } [CommandProperty( AccessLevel.GameMaster )] public int Charges { get{ return m_Charges; } set{ m_Charges = value; } } public BaguetteFeuArtifice( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); writer.Write( (int) m_Charges ); } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); m_Charges = (int)reader.ReadInt(); } public override void OnDoubleClick( Mobile from ) { if ( Charges <= 0 ) { from.SendMessage( "Il n'y a plus de charges!" ); return; } Charges--; if ( Charges > 0 ) Name = "Feu Artifice (Charges: " + Charges.ToString() + ")"; else Name = "Feu Artifice"; DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); DrawFeuArtifice( from ); } public static void DrawFeuArtifice( Mobile from ) { int[] intEffectID = {14138,14154,14201}; Point3D EffectLocation = new Point3D( ( from.X + Utility.Random( -5, 10 ) ), ( from.Y + Utility.Random( -5, 10 ) ), from.Z + 20 ); Effects.SendLocationEffect( EffectLocation, from.Map, intEffectID[ Utility.Random( 0, 3 ) ], 70, (int)( 5 * Utility.Random( 0, 20 ) ) + 3, 2 ); } } } |