Alt 08-09-2007   #1 (permalink)
Acemi Oyuncu
Avatar Yok
Üyelik tarihi: Aug 2007
Mesajlar: 39
Konuları: 36
REP Gücü: 2
REP Puanı: 35
Arcamenel is on a distinguished road
Standart afk komutu [afk


Kod:
using System; 
using System.Collections; 
using Server; 

namespace Server.Scripts.Commands 
{ 
   /// <summary> 
   /// Summary description for AFK. 
   /// </summary> 
   public class AFK : Timer 
   { 
      private static Hashtable m_AFK = new Hashtable(); 
      private Mobile who; 
      private Point3D where; 
      private DateTime when; 
      public string what=""; 

      public static void Initialize() 
      { 
         Server.Commands.Register( "afk", AccessLevel.Player, new CommandEventHandler( AFK_OnCommand ) ); 
         EventSink.Logout += new LogoutEventHandler( OnLogout ); 
         EventSink.Speech += new SpeechEventHandler( OnSpeech ); 
         EventSink.PlayerDeath += new PlayerDeathEventHandler( OnDeath); 
      } 
      public static void OnDeath( PlayerDeathEventArgs e ) 
      { 
         if ( m_AFK.Contains( e.Mobile.Serial.Value ) ) 
         { 
            AFK afk=(AFK)m_AFK[e.Mobile.Serial.Value]; 
            if (afk==null) 
            { 
               e.Mobile.SendMessage("Afk object missing!"); 
               return; 
            } 
            e.Mobile.PlaySound(  e.Mobile.Female ? 814 : 1088 ); 
            afk.wakeUp(); 
         } 
      } 
      public static void OnLogout( LogoutEventArgs e ) 
      { 
         if ( m_AFK.Contains( e.Mobile.Serial.Value ) ) 
         { 
            AFK afk=(AFK)m_AFK[e.Mobile.Serial.Value]; 
            if (afk==null) 
            { 
               e.Mobile.SendMessage("Afk object missing!"); 
               return; 
            } 
            afk.wakeUp(); 
         } 
      } 
      public static void OnSpeech( SpeechEventArgs e ) 
      { 
         if ( m_AFK.Contains( e.Mobile.Serial.Value ) ) 
         { 
            AFK afk=(AFK)m_AFK[e.Mobile.Serial.Value]; 
            if (afk==null) 
            { 
               e.Mobile.SendMessage("Afk object missing!"); 
               return; 
            } 
            afk.wakeUp(); 
         } 
      } 
      public static void AFK_OnCommand( CommandEventArgs e ) 
      { 
         if ( m_AFK.Contains( e.Mobile.Serial.Value ) ) 
         { 
            AFK afk=(AFK)m_AFK[e.Mobile.Serial.Value]; 
            if (afk==null) 
            { 
               e.Mobile.SendMessage("Afk object missing!"); 
               return; 
            } 
            afk.wakeUp(); 
         } 
         else 
         { 
            m_AFK.Add( e.Mobile.Serial.Value,new AFK(e.Mobile,e.ArgString.Trim()) ); 
            e.Mobile.SendMessage( "AFK enabled." ); 
         } 
      } 
      public void wakeUp() 
      { 
         m_AFK.Remove( who.Serial.Value ); 
         who.Say("huh?"); 
         who.SendMessage( "AFK deactivated." ); 
         this.Stop();          
      } 
      public AFK(Mobile afker, string message) : base(TimeSpan.FromSeconds(10),TimeSpan.FromSeconds(10)) 
      { 
         if ((message==null)||(message=="")) message="I'm out of my head.  Come back later"; 
         what=message; 
         who=afker; 
         when=DateTime.Now; 
         where=who.Location; 
         this.Start(); 
      }          
      protected override void OnTick() 
      { 
         if (!(who.Location==where) ) 
         { 
            this.wakeUp(); 
            return; 
         } 
         who.Say("zZz"); 
         TimeSpan ts=DateTime.Now.Subtract(when); 
         who.Emote("*{0} (for {1}:{2}:{3}:{4})*",what,ts.Days,ts.Hours,ts.Minutes,ts.Seconds); 
         who.PlaySound(  who.Female ? 819 : 1093);        
      } 
   } 
}
Arcamenel isimli Üye şimdilik offline konumundadır   Alıntı ile Cevapla
Alt 08-09-2007   #2 (permalink)
wWw.GameSFoR.neT
Wipau - ait Kullanıcı Resmi (Avatar)
Üyelik tarihi: Aug 2007
Bulunduğu yer: Gayseri'den
Mesajlar: 2.373
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

Teşekkürler bu scriptler pvp serverları için birebir
__________________
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
Alt 08-26-2007   #3 (permalink)
Usta Oyuncu
yavuz - ait Kullanıcı Resmi (Avatar)
Üyelik tarihi: Aug 2007
Mesajlar: 151
Konuları: 129
Favori Oyunu: Counter-Strike 1.6,Max Payne,Football Manager 2008
REP Gücü: 127
REP Puanı: 12560
yavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond reputeyavuz has a reputation beyond repute
yavuz - MSN üzeri Mesaj gönder
Standart

ElleriNe SaĞLıK
yavuz 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: 16:38 .
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,