Page 1 of 1

newMoveXY causing connection lost

Posted: 07.10.2016 16:19
by sibble

Code: Select all

                    foreach (Item _item in Containers)
                    {
                        workerSearch.ReportProgress(0, "moving to next container...");
                        _moverWatch.Restart();

                        while (_item.Distance > 1)
                        {
                            if (_moverWatch.Elapsed.Seconds > 15)
                                break;

                            workerSearch.ReportProgress(0, "trying to move...");
                            var _movingHelper = MovingHelper.GetMovingHelper();
                            _movingHelper.newMoveXY((ushort)_item.Location.X, (ushort)_item.Location.Y, true, 1, false);

                            Thread.Sleep(250);
                        }

                        SearchContainer(_item);
                        FindContainers();
                    }
This code works successfully for a couple of minutes, at random time UO client window will get "Connection Lost", look in Stealth and the account has disconnected from the server. Can confirm this happens in two of my solutions. (IDOCer, LootFinder)

This is the other code that this happens on:

Code: Select all

                    foreach (Location _location in _rail.Path.Skip(StartLocation))
                    {
                        
                        lock (thisLock)
                        {
                            _n++;

                            Point2D _position = new Point2D(_location.X, _location.Y);

                            workerSearch.ReportProgress(0, "Moving to location " + _n.ToString() + _position.ToString());

                            Stealth.Client.newMoveXY((ushort)_location.X, (ushort)_location.Y, true, 10,
                                StealthSearch ? false : true);

                            while (!Geometry.InRange(Self.Location, _position, 16))
                            {

                                while (PauseSearch) Thread.Sleep(1000);

                                if (workerSearch.CancellationPending)
                                {
                                    e.Cancel = true;
                                    break;
                                }

                                workerSearch.ReportProgress(0, "trying to move  to: " + _position.ToString());

                                Self.Movement.Step(Convert.ToByte(Geometry.GetDirectionTo(Self.Location, _position)), true);

                                Stealth.Client.newMoveXY((ushort)_location.X, (ushort)_location.Y, true, 10,
                                StealthSearch ? false : true);
                            }

                            if (workerSearch.CancellationPending)
                            {
                                e.Cancel = true;
                                break;
                            }

                        }
                    } //end foreach location

Re: newMoveXY causing connection lost

Posted: 07.10.2016 17:47
by Vizit0r
UO OFF(oficial) server?

Re: newMoveXY causing connection lost

Posted: 07.10.2016 20:10
by sibble
yes official server

Re: newMoveXY causing connection lost

Posted: 07.10.2016 20:26
by Vizit0r
i know this probem, trying to solve it.