Exemplo n.º 1
0
        //---------------------------------------------------------------------------------------------

        protected bool BezSeResnout()
        {
            bool ressSuccess = false;

            if (this.RessPositionPath != null)
            {
                UO.Print("BezSeResnout");
                int gotoDistance = this.RessPositionPath.Count == 1 ? 1 : 0;

                if (this.Robot.GoTo(this.RessPositionPath, gotoDistance))
                {
                    UOCharacter resser = null;

                    foreach (UOCharacter ch in World.Characters)
                    {
                        if (ch.Notoriety == Notoriety.Innocent || ch.Notoriety == Notoriety.Invulnerable || ch.Notoriety == Notoriety.Neutral || ch.Distance < 10)
                        {
                            resser = ch;
                            break;
                        }
                    }

                    if (World.Ground.FindType(0x1E5D).Exist)////0x1E5D ress kriz
                    {
                        UOItem ressKriz = World.Ground.FindType(0x1E5D);
                        if (ressKriz > 3)
                        {
                            this.Robot.GoTo(ressKriz.X, ressKriz.Y, 1, 100);
                        }

                        ressKriz.Click();
                        Game.Wait();
                        World.Player.ChangeWarmode(WarmodeChange.Switch);
                        Game.Wait();
                        World.Player.ChangeWarmode(WarmodeChange.War);
                        Game.Wait();
                        ressKriz.Use();
                        Game.Wait();
                        World.Player.RequestStatus(1000);

                        ressSuccess = !UO.Dead;
                    }
                    else if (resser != null && resser.Exist)
                    {
                        if (this.Robot.GoTo(resser.X, resser.Y, 2, 50))
                        {
                            resser.Click();
                            Game.Wait();
                            World.Player.ChangeWarmode(WarmodeChange.Switch);
                            Game.Wait();
                            World.Player.ChangeWarmode(WarmodeChange.War);
                            resser.Tell("ress");
                            Game.Wait();
                            World.Player.RequestStatus(1000);

                            ressSuccess = !UO.Dead;
                        }
                        else
                        {
                            UO.Print("BezSeResnout - !Goto resser");
                        }
                    }
                    else
                    {
                        UO.Print("BezSeResnout - !resser");
                    }
                }
                else
                {
                    UO.Print("BezSeResnout - !GoTo ForgePosition");
                }

                if (ressSuccess && this.RessPositionPath.Count > 1)
                {
                    List <IUOPosition> reverse = new List <IUOPosition>();
                    reverse.AddRange(this.RessPositionPath.ToArray());
                    reverse.Reverse();

                    this.Robot.GoTo(reverse, gotoDistance);
                }
            }
            else
            {
                UO.Print("BezSeResnout - RessPosition == null");
                Game.Wait(1500);
            }

            return(ressSuccess);
        }