Exemple #1
0
        public void startMining(object mountNum)
        {
            isMining = true;

            player.setMountNum((int)mountNum);

            while (isMining)
            {
                //a másik ciklusba nem ragadhat be, mert ha meghalok nincsenek a veinek az obj man be, így kilép belőle
                if (player.getCurrHP() < 2)
                {
                    System.Console.WriteLine("Ha hallott vagy éledj");
                    player.ressurrect();
                    continue;
                }

                System.Console.WriteLine("szállj fel");
                player.takeOff();

                System.Console.WriteLine("menj a kovetkezo helyre");
                player.flyTo(miningPlaces[currentPlace]);

                currentPlace++;
                if (currentPlace > miningPlaces.Length - 1)
                {
                    currentPlace = 0;
                }

                System.Console.WriteLine("nezd meg hogy van e mineral");
                veinsAround = ObjectManager.sharedOM().getMineralVeinsAround();
                //amig van :
                while (veinsAround.Length != 0 && player.getCurrHP() > 1)
                {
                    System.Console.WriteLine("repulj kzvetlenul a node felé");
                    player.flyTo(veinsAround[0].position.to2DPosition());
                    Thread.Sleep(1500);
                    System.Console.WriteLine("szállj le a memoriábol kiolvasott node mellé 1 X nyivel");
                    player.clickToMove(veinsAround[0].getPointClose());

                    Thread.Sleep(500);

                    //System.Console.WriteLine("dismopunt");
                    //player.dismount();
                    //hogy dismount közbe ne legyen sebességem mert akkor elrepulok
                    //Thread.Sleep(300);

                    System.Console.WriteLine("ctloot a veinre, dismount helyett, mert ez mindig dismountol");
                    player.clickToLoot(veinsAround[0].position, veinsAround[0].guid);

                    System.Console.WriteLine("ctloot a veinre, dismount helyett, mert ez mindig dismountol");
                    player.clickToLoot(veinsAround[0].position, veinsAround[0].guid);

                    //várj egy kissé ha zuhannék egy keveset
                    Thread.Sleep(3000);
                    System.Console.WriteLine("ctloot a veinre");
                    player.clickToLoot(veinsAround[0].position, veinsAround[0].guid);
                    System.Console.WriteLine(veinsAround[0].position);
                    //várj 5 mp t amig kibányászom
                    Thread.Sleep(5000);
                    //ha meghaltam nem ezsek, ha keves a hp eszek
                    if (((float)player.getCurrHP() / (float)player.getMaxHP()) < 0.6f && player.getCurrHP() > 1)
                    {
                        System.Console.WriteLine("ha keves a hp égy");
                        player.eat();
                    }
                    System.Console.WriteLine("szállj fel");
                    player.takeOff();

                    System.Console.WriteLine("nézd meg  a mineral tombot ujra");
                    veinsAround = ObjectManager.sharedOM().getMineralVeinsAround();
                }
            }
        }