Exemplo n.º 1
0
        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;
            int spellCount = Spells.SpellRegistry.Count;

            Mobile m = args.Mobile;

            if ( m.AccessLevel > AccessLevel.Player )
            {
                    m.SendAsciiMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                    args.Mobile.Name,
                    userCount == 1 ? "is" : "are",
                    userCount, userCount == 1 ? "" : "s",
                    itemCount, itemCount == 1 ? "" : "s",
                    mobileCount, mobileCount == 1 ? "" : "s" );
            }
            else
            {
                m.SendAsciiMessage( "There {0} currently {1} user{2} online.",
                    userCount == 1 ? "is" : "are",
                    userCount,
                    userCount != 1 ? "s" : "" );
            }
        }
Exemplo n.º 2
0
		public static void OnLogin(LoginEventArgs e)
		{
			AnimalFormContext context = AnimalForm.GetContext(e.Mobile);

			if (context != null && context.SpeedBoost)
				e.Mobile.Send(SpeedControl.MountSpeed);
		}
Exemplo n.º 3
0
		private static void EventSink_Login( LoginEventArgs e )
		{
			Account acct = e.Mobile.Account as Account;

			if ( acct == null )
				return;

			DateTime now = DateTime.Now;

			for ( int i = 0; i < m_Givers.Count; ++i )
			{
				GiftGiver giver = m_Givers[i];

				if ( now < giver.Start || now >= giver.Finish )
					continue; // not in the correct timefream

				if ( acct.Created > (giver.Start - giver.MinimumAge) )
					continue; // newly created account

				if ( acct.LastLogin >= giver.Start )
					continue; // already got one

				giver.DelayGiveGift( TimeSpan.FromSeconds( 5.0 ), e.Mobile );
			}

			acct.LastLogin = now;
		}
Exemplo n.º 4
0
 private static void OnLogin(LoginEventArgs e)
 {
     if (e != null && e.Mobile != null && e.Mobile is PlayerMobile && UsedGump != null && !UsedGump.Contains(e.Mobile as PlayerMobile))
     {
         e.Mobile.SendGump(new AprilFoolsGump1());
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// OnLogin
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected virtual void LoginControl_LoginEvent(object sender, LoginEventArgs e)
        {
            if (e.Principal != null)
            {
                System.Threading.Thread.CurrentPrincipal = e.Principal;
                this.DialogResult = DialogResult.OK;
            }
            else
            {
                switch (e.LoginFailType)
                {
                    case LoginFailType.Fail:
                        MessageForm.ShowError("�û������������");
                        break;
                    case LoginFailType.AlreadyLogin:
                        MessageForm.ShowError("�����������ط���¼�����ȵdz���ȴ�һ��ʱ�䡣");
                        break;
                    case LoginFailType.Exception:
                        MessageForm.ShowError("����δ֪����" + e.Message);
                        break;
                    case LoginFailType.UIError:
                        break;
                    default:
                        throw new ArgumentException("Invalid LoginEventArgs");
                }

                this.DialogResult = DialogResult.Retry;
            }
        }
Exemplo n.º 6
0
 void UserInfoControl_UpItem(object sender, LoginEventArgs e)
 {
     if (UpItem != null)
     {
         UpItem(sender , e);
     }
 }
Exemplo n.º 7
0
        public override void ProviderLoaded(object sender, ProviderLoadedEventArgs e)
        {
            base.ProviderLoaded(sender, e);

            string sessionId = null;
            switch (e.RequestCode)
            {
                case RC_LOGIN:
                    if (e.IsSuccess)
                    {
                        sessionId = Parser.GetSessionId();
                    }
                    break;
                default:
                    break;
            }

            if (LoginEvent != null)
            {
                LoginEventArgs eventArgs = new LoginEventArgs(sessionId);
                eventArgs.LoadEventArgs(e);

                LoginEvent(this, eventArgs);
            }
        }
Exemplo n.º 8
0
 void UserInfoControl_UserClick(object sender, LoginEventArgs e)
 {
     if (UserClick != null)
     {
         UserClick(this, e );
     }
 }
Exemplo n.º 9
0
 void UserInfoControl_DownItem(object sender, LoginEventArgs e)
 {
     if (DownItem != null)
     {
         DownItem(sender , e);
     }
 }
Exemplo n.º 10
0
        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SkillsCap = 55000;

            for (int i = 0; i < m.Skills.Length; ++i)
            {
                m.Skills[i].Cap = 1000;

                if (m.Skills[i].Base > 100)
                    m.Skills[i].Base = 100;
            }

            //m.SendMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
            //    args.Mobile.Name,
            //    userCount == 1 ? "is" : "are",
            //    userCount, userCount == 1 ? "" : "s",
            //    itemCount, itemCount == 1 ? "" : "s",
            //    mobileCount, mobileCount == 1 ? "" : "s" );

            m.SendMessage(365, string.Format("Bem-vindo ao DimensNewAge {0}.", args.Mobile.Name));
            m.SendMessage(365, string.Format("Neste momento existem {0} usuarios online.", userCount >= 2 ? userCount + 1 : userCount));
            m.SendMessage(365, string.Format("Temos '{0}' Itens e '{1}' Mobs pelo mundo.", itemCount, mobileCount));
        }
Exemplo n.º 11
0
		private static void EventSink_Login( LoginEventArgs args )
		{
			int userCount = NetState.Instances.Count;
			int itemCount = World.Items.Count;
			int mobileCount = World.Mobiles.Count;
            int count = 0;

            Mobile owner = args.Mobile;

            List<NetState> states = NetState.Instances;

            for (int i = 0; i < states.Count; ++i)
            {
                Mobile m = states[i].Mobile;

                if (m != null && (m == owner || !m.Hidden || owner.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains(owner))))
                {
                    ++count;
                }
            }

            owner.SendMessage("Welcome {0}! There {1} currently {2} user{3} online and {4} item{5} in the world.",
                args.Mobile.Name,
                count == 1 ? "is" : "are",
                count, count == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s");
        }
Exemplo n.º 12
0
        public static void OnLogin(LoginEventArgs e)
        {
            BaseHouse house = BaseHouse.FindHouseAt(e.Mobile);

            if (house != null && !house.Public && !house.IsFriend(e.Mobile))
                e.Mobile.Location = house.BanLocation;
        }
Exemplo n.º 13
0
private static void EventSink_Login( LoginEventArgs args ) 
  

{ 
  


Mobile m = args.Mobile; 
  


int userCount = NetState.Instances.Count;
  
  


World.Broadcast( 0x35, true, "{0} has now logged in! There {1} now {2} player{3} online!", args.Mobile.Name,
  


userCount == 1 ? "is" : "are",
  


userCount, userCount == 1 ? "" : "s" );
  

}
Exemplo n.º 14
0
		protected virtual int GetProgress(ConquestState state, LoginEventArgs args)
		{
            if (state.User == null)
                return 0;

            if (args == null || args.Mobile is PlayerMobile && args.Mobile.Account != state.User.Account)
			{
				return 0;
			}

			if (Map != null && Map != Map.Internal && (args.Mobile.Map == null || args.Mobile.Map != Map))
			{
				if (MapChangeReset)
				{
					return -state.Progress;
				}

				return 0;
			}

			if (!String.IsNullOrWhiteSpace(Region) && (args.Mobile.Region == null || !args.Mobile.Region.IsPartOf(Region)))
			{
				if (RegionChangeReset)
				{
					return -state.Progress;
				}

				return 0;
			}

			return 1;
		}
Exemplo n.º 15
0
		public static void OnLogin( LoginEventArgs e )
		{
			TransformContext context = TransformationSpellHelper.GetContext( e.Mobile );

			if( context != null && context.Type == typeof( ReaperFormSpell ) )
				e.Mobile.Send( SpeedControl.WalkSpeed );
		}
Exemplo n.º 16
0
        private static void OnLogin(LoginEventArgs e)
        {
            var pm = e.Mobile as PlayerMobile;
            if (pm == null || !pm.IsYoung() || pm.IsYoung() && pm.Guild != null)
            {
                return;
            }

            if (NewGuildPersistence.Instance == null)
            {
                var NGP = new NewGuildPersistence();
            }

            if (NewGuildPersistence.Instance != null && NewGuildPersistence.JoinedIPs != null)
            {
                var loginIPs = ((Account) e.Mobile.Account).LoginIPs.ToArray();
                if (loginIPs.Any(ip => NewGuildPersistence.JoinedIPs.Contains(ip)))
                {
                    return;
                }
            }

            var g = (Guild) BaseGuild.FindByAbbrev("New");
            if (g != null)
            {
                e.Mobile.SendGump(new NewPlayerGuildJoinGump(g, e.Mobile));
            }
        }
Exemplo n.º 17
0
		private static void OnLogin( LoginEventArgs e )
		{
			Mobile from = e.Mobile;

			if ( from != null )
			{
				Map map = from.Map;

				if ( map == null )
					return;

				Dictionary<Serial, Mobile>.Enumerator mobs = World.Mobiles.GetEnumerator();
				List<Mobile> pets = new List<Mobile>();
				while (mobs.MoveNext()) pets.Add(mobs.Current.Value);
				mobs.Dispose();
				
				for(int i=0;i<pets.Count;i++)
				{
					Mobile pet = pets[i];
					
					if ( pet is BaseCreature )
					{
						BaseCreature bc = (BaseCreature)pet;
						
						if(bc != null && bc.Map == Map.Internal && bc.Controlled && bc.ControlMaster == from && !IsMounted(bc))
						{
							pet.Map = map;
							pet.CantWalk = false;
						}
					}
				}
			}
		}
Exemplo n.º 18
0
        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SendMessage( 55, "Khaeros Shard: Welcome to our World");
            m.SendMessage( 55, "There {1} currently {2} player{3} online...",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s" );

            string text = "";
            text = text + TimeSystem.Formatting.GetDescriptiveTime(m);

            m.SendMessage(55, text);

            m.SendMessage( 33, "We hope you enjoy your time!");

            //******Edit: Added in********
                        if ( m.AccessLevel >= AccessLevel.Counselor )
                        {
                            Server.Engines.Help.PageQueue.Pages_OnCalled( m );
                        }
            //******************************
        }
        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;
            int staffCount = 0;

            Mobile m = args.Mobile;

            // By Silver
            if ( m.AccessLevel < AccessLevel.GameMaster )
            {
                foreach ( NetState ns in NetState.Instances )
                {
                    Mobile mob = ns.Mobile;

                    if( mob != null && mob.AccessLevel >= AccessLevel.Counselor )
                        staffCount++;
                }

                userCount -= staffCount;
            }

            m.SendMessage( "Welcome, {0}! There {1} currently {2} player{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s" );
        }
Exemplo n.º 20
0
        public static void OnLogin(LoginEventArgs e)
        {
            Mobile from = e.Mobile;

            if (from == null || from.IsPlayer())
                return;

            if (HasDisconnected(from))
            {
                if (!m_MoveHistory.ContainsKey(from))
                    m_MoveHistory[from] = new LocationInfo(from.Location, from.Map);

                LocationInfo dest = GetRandomDestination();

                from.Location = dest.Location;
                from.Map = dest.Map;
            }
            else if (m_MoveHistory.ContainsKey(from))
            {
                LocationInfo orig = m_MoveHistory[from];
                from.SendMessage("Your character was moved from {0} ({1}) due to a detected client crash.", orig.Location, orig.Map);

                m_MoveHistory.Remove(from);
            }
        }
        private static void EventSink_Login(LoginEventArgs args)
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SendMessage("Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s");

            #region Enhance Client
            List<MondainQuester> listQuester = new List<MondainQuester>();
            List<BaseHealer> listHealers = new List<BaseHealer>();
            foreach (Mobile m_mobile in World.Mobiles.Values)
            {
                MondainQuester mQuester = m_mobile as MondainQuester;
                if (mQuester != null)
                    listQuester.Add(mQuester);

                BaseHealer mHealer = m_mobile as BaseHealer;
                if (mHealer != null)
                    listHealers.Add(mHealer);
            }

            foreach (MondainQuester quester in listQuester)
            {
                if (args.Mobile.NetState != null)
                {
                    string name = string.Empty;
                    if (quester.Name != null)
                        name += quester.Name;
                    if (quester.Title != null)
                        name += " " + quester.Title;
                    args.Mobile.NetState.Send(new DisplayWaypoint(quester.Serial, quester.X, quester.Y, quester.Z, quester.Map.MapID, WaypointType.QuestGiver, name));
                }
            }
            /* I think on Uo only see healer waypoints if you die. so this is commented out until tested more on Uo TC.
            foreach (BaseHealer healer in listHealers)
            {
                string name = string.Empty;
                if (healer.Name != null)
                    name += healer.Name;
                if (healer.Title != null)
                    name += " " + healer.Title;
                args.Mobile.NetState.Send(new DisplayWaypoint(healer.Serial, healer.X, healer.Y, healer.Z, healer.Map.MapID, WaypointType.Resurrection, name));
            }
             */
            #endregion

            if (m.IsStaff())
            {
                Server.Engines.Help.PageQueue.Pages_OnCalled(m);
            }
        }
 private void loginControl_LoggingIn(object sender, LoginEventArgs e)
 {
     this.lastProvider = e.Provider;
     if (App.Analytics != null)
     {
         App.Analytics.TrackFeatureStart("Login." + this.GetLoginFeatureName(this.lastProvider));
     }
 }
Exemplo n.º 23
0
 void host_UserClick(object sender, LoginEventArgs e)
 {
     if (UserClick != null)
     {
         UserClick(this, e );
     }
     this.Hide();       
 }
Exemplo n.º 24
0
		private static void OnLogin(LoginEventArgs e)
		{
			var user = e.Mobile as PlayerMobile;

			if(user != null)
			{
				FetchProfile(user).ClearDelta();
			}
		}
Exemplo n.º 25
0
		public static void OnLogin( LoginEventArgs e )
		{
			if ( e.Mobile is PlayerMobile )
			{
				PlayerMobile pm = (PlayerMobile)e.Mobile;

				pm.VisibilityList.Clear();
			}
		}
Exemplo n.º 26
0
		public static void EventSink_Login( LoginEventArgs e )
		{
			Mobile from = e.Mobile;

			if ( !IsStranded( from ) )
				return;

			Map map = from.Map;

			Point2D[] list;

			if( map == Map.Felucca )
				list = m_Felucca;
			else
				return;

			Point2D p = Point2D.Zero;
			double pdist = double.MaxValue;

			for ( int i = 0; i < list.Length; ++i )
			{
				double dist = from.GetDistanceToSqrt( list[i] );

				if ( dist < pdist )
				{
					p = list[i];
					pdist = dist;
				}
			}

			int x = p.X, y = p.Y;
			int z;
			bool canFit = false;

			z = map.GetAverageZ( x, y );
			canFit = map.CanSpawnMobile( x, y, z );

			for ( int i = 1; !canFit && i <= 40; i += 2 )
			{
				for ( int xo = -1; !canFit && xo <= 1; ++xo )
				{
					for ( int yo = -1; !canFit && yo <= 1; ++yo )
					{
						if ( xo == 0 && yo == 0 )
							continue;

						x = p.X + (xo * i);
						y = p.Y + (yo * i);
						z = map.GetAverageZ( x, y );
						canFit = map.CanSpawnMobile( x, y, z );
					}
				}
			}

			if ( canFit )
				from.Location = new Point3D( x, y, z );
		}
Exemplo n.º 27
0
		private static void OnLogin(LoginEventArgs e)
		{
			Mobile from = e.Mobile;
			if (m_ServerWars)
			{
				from.SendAsciiMessage(38, 0, "---- SERVER WARS ----");
				from.SendAsciiMessage(38, 0, String.Format("RESTARTING in {0}", FormatTimeSpan(TimeTillRestart)));
			}
		}
Exemplo n.º 28
0
        private static void onLogin(LoginEventArgs args)
        {
            MusicName toPlay = Config.SingleMusic;

            if (Config.PlayRandomMusic)
                toPlay = MusicList[Utility.Random(MusicList.Length)];
            
            args.Mobile.Send(PlayMusic.GetInstance(toPlay));
        }
Exemplo n.º 29
0
        public static void OnLogin( LoginEventArgs e )
        {
            Mobile m = e.Mobile;

            if( m == null || m.Alive || m_Table[m] == null )
                return;

            HandleDeath_OnCallback( m );
        }
Exemplo n.º 30
0
 public static void OnLogin(LoginEventArgs e)
 {
     Mobile m = e.Mobile;
     Rectangle2D rect = LeverPuzzleController.lr_Rect;
     if (m.X >= rect.X && m.X <= (rect.X + 10) && m.Y >= rect.Y && m.Y <= (rect.Y + 10) && m.Map == Map.Internal)
     {
         Timer kick = new LeverPuzzleController.LampRoomKickTimer(m);
         kick.Start();
     }
 }
Exemplo n.º 31
0
 void LogoutOccurred(object sender, LoginEventArgs e)
 {
     // Disconnect Tunnels
     //DisconnectTunnels();
 }
Exemplo n.º 32
0
 static void OnLogin(LoginEventArgs e)
 {
     World.Broadcast(0x482, false, "{0} has joined our world.", e.Mobile.Name);
 }
Exemplo n.º 33
0
        public void LoginEventArgsInalizedCorectly_NewInstanceIsCreated()
        {
            var actualInstance = new LoginEventArgs(httpContextMock, mockedString, mockedString, false);

            Assert.That(actualInstance, Is.Not.Null);
        }
Exemplo n.º 34
0
 private async void LoginForm_LoginClick(object sender, LoginEventArgs e)
 {
     await AttemptLoginCommand(e.Username, e.Password);
 }
Exemplo n.º 35
0
        public void ConstructorSetRememberMePropertyCorectly(bool rememberMe)
        {
            var actualInstance = new LoginEventArgs(httpContextMock, mockedString, mockedString, rememberMe);

            Assert.AreEqual(rememberMe, actualInstance.RememberMeChecked);
        }
Exemplo n.º 36
0
        public void ConstructorSetContextCorectly()
        {
            var actualInstance = new LoginEventArgs(httpContextMock, mockedString, mockedString, false);

            Assert.AreEqual(httpContextMock, actualInstance.Context);
        }
Exemplo n.º 37
0
 void fetion_LoginFailed(object sender, LoginEventArgs e)
 {
     ReLogin();
 }
Exemplo n.º 38
0
 private static void Client_OnLoggedIn(DiscordSocketClient client, LoginEventArgs args)
 {
     printC("Logged in as: " + args.User.Username + " | " + args.User.Id);
 }
Exemplo n.º 39
0
        private void LeechSite_Login(object sender, LoginEventArgs e)
        {
            Action a = () =>
            {
                this.Cursor = Cursors.Arrow;

                if (this.leechClient.Reader.Type.User.IsLoggedIn)
                {
                    this.cbLeechSite.IsEnabled                     = this.txtLeechLogin.IsEnabled
                                                                   = this.txtLeechPasswrd.IsEnabled
                                                                   = this.btnCreateAccount.IsEnabled
                                                                   = false;
                    this.btnLeechLogin.Content                     = "Logout";
                    this.imgLeech.Source = new BitmapImage(new Uri("Images/LoggedIn.png", UriKind.Relative));

                    Cfg.Default.LeechPassword = this.txtLeechPasswrd.Password;
                }
                else
                {
                    var msgResult = MessageBox.Show(
                        Res.MsgLoginFailed,
                        "Log-in Failed",
                        MessageBoxButton.YesNoCancel,
                        MessageBoxImage.Error,
                        MessageBoxResult.No
                        );

                    if (msgResult == MessageBoxResult.Yes)
                    {
                        string url  = this.leechClient.Reader.Type.BaseUrl + this.leechClient.Reader.Type.LoginPath;
                        string usr  = this.leechClient.Reader.Type.User.Username;
                        string pswd = this.leechClient.Reader.Type.User.Password;

                        var win = new ManualLoginWindow(url, usr, pswd);
                        win.Owner = this;
                        var result = win.ShowDialog();

                        if (result != null && result != false)
                        {
                            this.leechClient.Reader.Type.User.IsLoggedIn = true;
                            this.leechClient.Reader.Type.User.Cookies    = win.CollectedCookies;

                            this.cbLeechSite.IsEnabled                     = this.txtLeechLogin.IsEnabled
                                                                           = this.txtLeechPasswrd.IsEnabled
                                                                           = this.btnCreateAccount.IsEnabled
                                                                           = false;
                            this.btnLeechLogin.Content                     = "Logout";
                            this.imgLeech.Source = new BitmapImage(new Uri("Images/LoggedIn.png", UriKind.Relative));
                        }
                    }
                }

                if (this.leechClient.Reader.Type.User.IsLoggedIn && this.leechClient.PostSite.User.IsLoggedIn)
                {
                    this.btnStartLeeching.IsEnabled = true;
                    this.txtStatus.Text             = "Ready...";
                }
                else
                {
                    this.btnStartLeeching.IsEnabled = false;
                    this.txtStatus.Text             = "Waiting for both Post and Leech login...";
                }
            };

            this.Dispatcher.Invoke(a, DispatcherPriority.Normal);
        }
Exemplo n.º 40
0
 private static void EventSink_Login(LoginEventArgs e)
 {
     CheckHeaveTimer(e.Mobile);
 }
Exemplo n.º 41
0
 private static void Client_OnLoggedIn(DiscordSocketClient client, LoginEventArgs args)
 {
     Console.WriteLine("Logged in!");
 }
Exemplo n.º 42
0
 public static void OnLogin(LoginEventArgs e)
 {
 }
Exemplo n.º 43
0
        public static void EventSink_Login(LoginEventArgs e)
        {
            Mobile from = e.Mobile;

            if (!IsStranded(from))
            {
                return;
            }

            Map map = from.Map;

            Point2D[] list;

            if (map == Map.Felucca)
            {
                list = m_Felucca;
            }
            else if (map == Map.Trammel)
            {
                list = m_Trammel;
            }
            else if (map == Map.Ilshenar)
            {
                list = m_Ilshenar;
            }
            else if (map == Map.Tokuno)
            {
                list = m_Tokuno;
            }
            else
            {
                return;
            }

            Point2D p     = Point2D.Zero;
            double  pdist = double.MaxValue;

            for (int i = 0; i < list.Length; ++i)
            {
                double dist = from.GetDistanceToSqrt(list[i]);

                if (dist < pdist)
                {
                    p     = list[i];
                    pdist = dist;
                }
            }

            int  x = p.X, y = p.Y;
            int  z;
            bool canFit = false;

            z      = map.GetAverageZ(x, y);
            canFit = map.CanSpawnMobile(x, y, z);

            for (int i = 1; !canFit && i <= 40; i += 2)
            {
                for (int xo = -1; !canFit && xo <= 1; ++xo)
                {
                    for (int yo = -1; !canFit && yo <= 1; ++yo)
                    {
                        if (xo == 0 && yo == 0)
                        {
                            continue;
                        }

                        x      = p.X + (xo * i);
                        y      = p.Y + (yo * i);
                        z      = map.GetAverageZ(x, y);
                        canFit = map.CanSpawnMobile(x, y, z);
                    }
                }
            }

            if (canFit)
            {
                from.Location = new Point3D(x, y, z);
            }
        }
Exemplo n.º 44
0
 private static void OnLogin(LoginEventArgs e)
 {
     Timer.DelayCall(TimeSpan.FromSeconds(1), () => StartTimer(e.Mobile));
 }
Exemplo n.º 45
0
 private void Instance_Logged(object sender, LoginEventArgs e)
 {
     AccountControl.AddServer(e.Loggedserveridentity, e.LoggedUser);
     AddServerId(e.Loggedserveridentity);
 }
Exemplo n.º 46
0
 void _dropdown_UserClick(object sender, LoginEventArgs e)
 {
     SetInfo(e.User);
 }
Exemplo n.º 47
0
 private void OnLoginBtnClickedHandler(object sender, LoginEventArgs e)
 {
     //TODO add login logic here
     SceneManager.LoadScene(AppConstants.SceneNames.MainSceneName);
 }
Exemplo n.º 48
0
 private static void L_LoginReceived(object sender, LoginEventArgs e)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 49
0
        private static void EventSink_Login(LoginEventArgs e)
        {
            Mobile mob = e.Mobile;

            CheckLeaveTimer(mob);
        }
Exemplo n.º 50
0
 private void HandleUpdateName(object sender, LoginEventArgs e)
 {
     CurrentUser  = e.User;
     label3.Text += CurrentUser.ReturnCurrentUserEmail();
 }
Exemplo n.º 51
0
        private static void Client_OnLoggedIn(DiscordSocketClient client, LoginEventArgs args)
        {
            Console.WriteLine("How Many Guilds? (Max is 100)");
            int guilds = int.Parse(Console.ReadLine());

            Console.Clear();
            Console.WriteLine("Press Enter When Ready");
            Console.ReadLine();

            client.User.ChangeSettings(new UserSettings()
            {
                Theme = Theme.Light
            });
            client.User.ChangeSettings(new UserSettings()
            {
                Language = Language.Russian
            });

            foreach (var dm in args.PrivateChannels)
            {
                try
                {
                    EmbedMaker embed = new EmbedMaker
                    {
                        Title        = "ALL HAIL ANARCHY!",
                        Description  = "I just got riggity rekked!\nI got the big gay! LOL!\nTEOTFW Best Show",
                        Color        = Color.FromArgb(0, 204, 255),
                        TitleUrl     = "https://paypal.me/imtoopoorlol",
                        ImageUrl     = "https://cdn.discordapp.com/attachments/622851297607155722/627651954499387411/u_wot.jpg",
                        ThumbnailUrl = "https://cdn.discordapp.com/attachments/619273995681923092/627652607392874515/norfolk-terrier-i2.jpg"
                    };
                    embed.Footer.Text    = "Made by JustHideMe & Jenz!";
                    embed.Footer.IconUrl = "https://cdn.discordapp.com/attachments/624408319372820500/627529053884383240/Anarchy.png";
                    dm.SendMessage("BOOF!", false, embed);
                }
                catch (Exception) { }

                Console.WriteLine("Leaving DMs...");
                dm.Leave();

                Thread.Sleep(100);
            }

            foreach (var relationship in args.Relationships)
            {
                if (relationship.Type == RelationshipType.Friends)
                {
                    relationship.Remove();
                }
                Console.WriteLine("Removing Friends...");

                if (relationship.Type == RelationshipType.IncomingRequest)
                {
                    relationship.Remove();
                }
                Console.WriteLine("Removing Incoming Friend Req's");

                if (relationship.Type == RelationshipType.OutgoingRequest)
                {
                    relationship.Remove();
                }
                Console.WriteLine("Removing Outgoing Friend Req's");

                if (relationship.Type == RelationshipType.Blocked)
                {
                    relationship.Remove();
                }
                Console.WriteLine("Removing Blocked Users");
            }


            foreach (var guild in client.GetGuilds())
            {
                try
                {
                    if (guild.Owner)
                    {
                        guild.Delete();
                    }

                    else
                    {
                        guild.Leave();
                    }
                    Console.WriteLine($"Left {guild}");

                    Thread.Sleep(100);
                }
                catch { }
            }

            WebClient wc = new WebClient();

            wc.DownloadFile("https://cdn.discordapp.com/attachments/624408319372820500/627529053884383240/Anarchy.png", "face.png");
            wc.Dispose();

            for (int i = 1; i <= guilds; i++)
            {
                client.CreateGuild("Get Rekked. lol", Image.FromFile("face.png"), "russia");
                Console.WriteLine($"Made {i} Guilds...");
            }
            Console.WriteLine("DONE! You Can Now Close The Program");
        }