GaMeSFoR.NeT ™ > Diğer Online Oyunlar (Rpg) > Ultima Online > RunUO 1.0 Script » Item bless deed (Blessedleme Kagidi)

Etiketler: , ,

Yeni Konu aç  Cevapla
 
LinkBack Seçenekler Stil
Alt 03-23-2008   #1 (permalink)
wWw.GameSFoR.neT
Wipau - ait Kullanıcı Resmi (Avatar)
Üyelik tarihi: Aug 2007
Bulunduğu yer: Gayseri'den
Mesajlar: 2.372
Konuları: 1838
Favori Oyunu: Knight Online, Battlefield 2, Generals ve Ultima Online
REP Gücü: 237981
REP Puanı: 1004835
Wipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond reputeWipau has a reputation beyond repute
Wipau - MSN üzeri Mesaj gönder Wipau - YAHOO üzeri Mesaj gönder
Standart Item bless deed (Blessedleme Kagidi)


Çalışıyordur. Hepsini kendi serverımdan veriyorum..

Kod:
using System;
using Server.Network;
using Server.Prompts;
using Server.Items;
using Server.Targeting;

namespace Server.Items
{
    public class BlessTarget : Target // Create our targeting class (which we derive from the base target class)
    {
        private ItemBlessDeed m_Deed;

        public BlessTarget( ItemBlessDeed deed ) : base( 1, false, TargetFlags.None )
        {
            m_Deed = deed;
        }

        protected override void OnTarget( Mobile from, object target ) // Override the protected OnTarget() for our feature
        {
            if ( target is BaseWeapon )
            {
                BaseWeapon item = (BaseWeapon)target;

                if ( item.LootType == LootType.Blessed || item.BlessedFor == from || (Mobile.InsuranceEnabled && item.Insured) ) // Check if its already newbied (blessed)
                {
                    from.SendLocalizedMessage( 1045113 ); // That item is already blessed
                }
                else if ( item.LootType != LootType.Regular )
                {
                    from.SendLocalizedMessage( 1045114 ); // You can not bless that item
                }
                else
                {
                    if( item.RootParent != from ) // Make sure its in their pack or they are wearing it
                    {
                        from.SendLocalizedMessage( 500509 ); // You cannot bless that object
                    }
                    else
                    {
                        item.LootType = LootType.Blessed;
                        from.SendLocalizedMessage( 1010026 ); // You bless the item....

                        m_Deed.Delete(); // Delete the bless deed
                    }
                }
            }
            else if (target is BaseArmor)
            {
                BaseArmor item = (BaseArmor)target;
                
                if ( item.LootType == LootType.Blessed || item.BlessedFor == from || (Mobile.InsuranceEnabled && item.Insured) ) // Check if its already newbied (blessed)
                {
                    from.SendLocalizedMessage( 1045113 ); // That item is already blessed
                }
                else if ( item.LootType != LootType.Regular )
                {
                    from.SendLocalizedMessage( 1045114 ); // You can not bless that item
                }
                else
                {
                    if( item.RootParent != from ) // Make sure its in their pack or they are wearing it
                    {
                        from.SendLocalizedMessage( 500509 ); // You cannot bless that object
                    }
                    else
                    {
                        item.LootType = LootType.Blessed;
                        from.SendLocalizedMessage( 1010026 ); // You bless the item....

                        m_Deed.Delete(); // Delete the bless deed
                    }
                }
            }
            else if (target is BaseJewel)
            {
                BaseJewel item = (BaseJewel)target;
                
                if ( item.LootType == LootType.Blessed || item.BlessedFor == from || (Mobile.InsuranceEnabled && item.Insured) ) // Check if its already newbied (blessed)
                {
                    from.SendLocalizedMessage( 1045113 ); // That item is already blessed
                }
                else if ( item.LootType != LootType.Regular )
                {
                    from.SendLocalizedMessage( 1045114 ); // You can not bless that item
                }
                else
                {
                    if( item.RootParent != from ) // Make sure its in their pack or they are wearing it
                    {
                        from.SendLocalizedMessage( 500509 ); // You cannot bless that object
                    }
                    else
                    {
                        item.LootType = LootType.Blessed;
                        from.SendLocalizedMessage( 1010026 ); // You bless the item....

                        m_Deed.Delete(); // Delete the bless deed
                    }
                }
            }
            else if (target is BaseClothing)
            {
                BaseClothing item = (BaseClothing)target;
                
                if ( item.LootType == LootType.Blessed || item.BlessedFor == from || (Mobile.InsuranceEnabled && item.Insured) ) // Check if its already newbied (blessed)
                {
                    from.SendLocalizedMessage( 1045113 ); // That item is already blessed
                }
                else if ( item.LootType != LootType.Regular )
                {
                    from.SendLocalizedMessage( 1045114 ); // You can not bless that item
                }
                else
                {
                    if( item.RootParent != from ) // Make sure its in their pack or they are wearing it
                    {
                        from.SendLocalizedMessage( 500509 ); // You cannot bless that object
                    }
                    else
                    {
                        item.LootType = LootType.Blessed;
                        from.SendLocalizedMessage( 1010026 ); // You bless the item....

                        m_Deed.Delete(); // Delete the bless deed
                    }
                }
            }            
                        
            else
            {
                from.SendLocalizedMessage( 500509 ); // You cannot bless that object
            }
        }
    }

    public class ItemBlessDeed : Item // Create the item class which is derived from the base item class
    {
        [Constructable]
        public ItemBlessDeed() : base( 0x14F0 )
        {
            Weight = 1.0;
            Hue = 1109;                //change hue
            Name = "an item bless deed";
            LootType = LootType.Blessed;
        }

        public ItemBlessDeed( Serial serial ) : base( serial )
        {
        }

        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );

            writer.Write( (int) 0 ); // version
        }

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
            LootType = LootType.Blessed;

            int version = reader.ReadInt();
        }

        public override bool DisplayLootType{ get{ return false; } }

        public override void OnDoubleClick( Mobile from ) // Override double click of the deed to call our target
        {
            if ( !IsChildOf( from.Backpack ) ) // Make sure its in their pack
            {
                 from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
            }
            else
            {
                from.SendMessage( "What item would you like to bless, choose wisely" ); // What item would you like to bless? (Clothes Only)
                from.Target = new BlessTarget( this ); // Call our target
             }
        }    
    }
}
__________________
Lütfen Paylaşımlara REP Veriniz..
Paylaşımlarda Şifre Çıkarsa
:
[Sadece Kayıtlı Kullanıcılar Linkleri Görebilir. Üye OL...] veya gamesfor.net










Wipau isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Cevapla

Seçenekler
Stil

Yetkileriniz
Yeni Mesaj yazma yetkiniz Aktif değil dir.
Mesajlara Cevap verme yetkiniz aktif değil dir.
Eklenti ekleme yetkiniz Aktif değil dir.
Kendi Mesajınızı değiştirme yetkiniz Aktif değildir dir.

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık

Gitmek istediğiniz klasörü seçiniz


Bütün Zaman Ayarları WEZ +3 olarak düzenlenmiştir. Şu Anki Saat: 14:37 .
Powered by vBulletin® Version 3.8.0 Beta 2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

GameSFoR.NeT Kendi Sunucusunda Dosya Barındırmaz. Çeşitli Dosya Paylaşım Sitelerinin Linkleri Yayınlanır. Dosya İçeriklerinin Sorumluluğu, İndiren Kişiye ve Dosyayı Barındıran Sunucuya Aittir. Sitedeki materyallerin(kategori, resim, logo vs.) kopyalanması için izin alınmalıdır.. Report Abuse, Harassment, Scamming, Hacking, Warez, Crack, Divx, Mp3 or any Illegal Activity to wipau@gamesfor.net
Dost Siteler
Sitemap
1, 7, 2, 6, 8, 9, 141, 11, 12, 13, 14, 15, 16, 18, 19, 142, 22, 144, 24, 25, 27, 28, 140, 32, 33, 35, 36, 37, 38, 39, 40, 42, 41, 43, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 143, 59, 60, 61, 62, 63, 64, 65, 66, 74, 68, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 87, 84, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 131, 132, 202, 133, 134, 135, 136, 137, 138, 139, 145, 146, 147, 148, 149, 150, 151, 152, 153, 155, 154, 156, 157, 159, 158, 160, 161, 162, 163, 164, 167, 165, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 180, 181, 182, 183, 184, 185, 186, 201, 187, 188, 200, 189, 190, 191, 192, 193, 194, 195, 199, 196, 197, 198, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 224, 221, 222, 223, 225, 226, 231, 227, 229, 232, 228, 230, 233, 234, 235, 236, 238, 237, 239, 240, 241, 249, 244, 247, 242, 243, 245, 265, 246, 255, 248, 250, 251, 252, 253, 254, 257, 256, 258, 259, 262, 261, 260, 263, 264, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 278, 277, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 311, 310, 312, 313, 314,