[Release][Standalone] Winter JP bot

12/30/2015 11:55 mitix132#61
If this is how it should be, still doesnt work
[Only registered and activated users can see links. Click Here To Register...]
12/30/2015 11:57 Agedyn#62
Quote:
Originally Posted by mitix132 View Post
If this is how it should be, still doesnt work
[Only registered and activated users can see links. Click Here To Register...]
Start the bot in the JP instance and look what it prints to the log.
12/30/2015 12:03 mitix132#63
[Only registered and activated users can see links. Click Here To Register...]
12/30/2015 12:09 Agedyn#64
Quote:
Originally Posted by mitix132 View Post
[Only registered and activated users can see links. Click Here To Register...]
Open dev tools, scan for offsets, and post results.
12/30/2015 12:14 mitix132#65
nothing appears in the box
[Only registered and activated users can see links. Click Here To Register...]
12/30/2015 12:20 Agedyn#66
Quote:
Originally Posted by mitix132 View Post
nothing appears in the box
[Only registered and activated users can see links. Click Here To Register...]
Did you right-click and select Scan?
12/30/2015 12:26 mitix132#67
ohh, ok, here are the results
[Only registered and activated users can see links. Click Here To Register...]
12/30/2015 12:30 shinghan#68
e
Quote:
Originally Posted by Agedyn View Post
Run the game as admin.

Everyone who's having problems with the script doing nothing, please use this version and post the log.
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GW2API;
using System.Threading;
using System.Windows.Forms;

namespace WinterWonderland
{
    public class WinterWonderland : BotScript
    {
        public override string GetAuthor()
        {
            return "Agedyn";
        }

        public override string GetName()
        {
            return "Winter Wonderland";
        }

        public static int droppedPresent = 132848;

        public static int chestId = 235239;
        public static Point3f chestPos = new Point3f(97.468f, 122.688f, 88.844f);

        
        Point3f[] coordinates = {new Point3f(-18.52f, 70.75f, 41.98f - 3.0f), new Point3f(-36.71f, 67.21f, 39.96f), new Point3f(-99.09f, 55.22f, 63.85f), new Point3f(-100.41f, 49.63f, 77.04f),
            new Point3f(-112.49f, 3.72f, 63.03f), new Point3f(-127.41f, -34.23f, 58.57f), new Point3f(-148.08f, -93.72f, 65.24f),
            new Point3f(-158.48f, -128.1f, 50.19f), new Point3f(-190.65f, -119.23f, 49.81f), new Point3f(-202.22f, -123.66f, 51.32f),
            new Point3f(-215.82f, -142.38f, 50.13f), new Point3f(-214.56f, -186.26f, 79f)};


        Point3f[] pathToChest = { new Point3f(105.37f, 106.0f, 88.81f), new Point3f(97.174f, 123.449f, 88.845f) };

        int idx = 0;

        int traversingC = 0;
        int tries = 0;

        public override int Pulse()
        {
            /* var bitmap = Utilities.TakeSnapshot();

             if (bitmap != null)
             {
                 bitmap.Save("C:\\Users\\jarij\\Documents\\Guild Wars 2\\img.bmp");
             }

             return 10000;*/

            if (Me.IsCasting())
            {
                Utilities.Print("Is casting");
                return 1000;
            }


            if (Navigator.IsTraversing())
            {
                if (traversingC > 10)
                {
                    Navigator.Stop();
                    Utilities.Print("Force stopping navigator");
                }
                else
                {

                    Utilities.Print("Traversing...");
                    traversingC++;
                    return 1000;
                }
            }
            traversingC = 0;
            Utilities.Print("MapId: " + World.GetMapId());
            if (World.GetMapId() == MapId.WINTER_WONDERLAND)
            {
                var chest = World.GetGadget(chestId, false);

                var myAgent = Me.GetAgent();
                if (myAgent == null) return 1000;

                Point3f myPos = Me.GetInteractionPosition();

                if (chest != null && idx == (coordinates.Length - 1))
                {

                    World.TeleportTo(coordinates[0]);
                    Thread.Sleep(1000);
                    Utilities.Print("Fail. Trying again from the start.");
                    Navigator.TraversePath(new Point3f[] { new Point3f(-23.8563f, 66.907f, 40.3968f - 3.0f) });
                    idx = 0;
                    return 5000;
                }

                if (chest != null)
                {
                    Utilities.Print("Chest != null, idx: " + idx);
                }


                if (tries > 15)
                {
                    idx = 0;
                    tries = 0;
                }

                if (chest != null && tries <= 15 && idx == coordinates.Length)
                {

                    if (chest.IsLootable())
                    {
                        if (myPos.DistanceTo(chest.GetPosition()) < 3.0f)
                        {
                            Utilities.Print("Open chest");
                            chest.Interact();
                            tries++;
                            return 2000;
                        }
                        else
                        {
                            Utilities.Print("Moving to chest");
                            World.TeleportTo(pathToChest[1]);
                            //Navigator.TraversePath(pathToChest);
                            tries++;
                            return 2000;
                        }
                    }
                    else
                    {


                        var portal = World.GetGadget(236332, false);
                        if (portal == null) return 1000;

                        tries = 0;
                        Utilities.Print("Teleport to start");
                        //cord.Z += 2.0f;
                        World.TeleportTo(coordinates[0]);
                        Thread.Sleep(500);
                        //Navigator.Jump();

                        Navigator.TraversePath(new Point3f[] { new Point3f(coordinates[0].X, coordinates[0].Y, 40.3968f - 3.0f) });
                        Utilities.Print("Waiting for a new chest to spawn");
                        idx = 1;
                        return (70 * 1000); //wait 70s for chest to spawn

                        /*if (portal.GetPosition().DistanceTo(myPos) > 3.0f)
                        {
                            Utilities.Print("Move to portal");
                            Navigator.TraversePath(new Point3f[] { portal.GetPosition() });
                            return 1000;
                        } else
                        {
                            Utilities.Print("Teleport to start");
                            //cord.Z += 2.0f;
                            World.TeleportTo(coordinates[0]);
                            Thread.Sleep(2000);
                            Navigator.TraversePath(new Point3f[] { new Point3f(-23.8563f, 66.907f, 40.3968f - 3.0f) });
                            Utilities.Print("Waiting for a new chest to spawn");
                            idx = 1;
                            return (60 * 1000);
                        }*/
                        //return 3000;
                    }
                }

                if (idx < coordinates.Length)
                {
                    Utilities.Print("Teleporting to checkpoint " + (idx + 1));
                    Point3f coord = coordinates[idx++];
                    //coord.Z += 2.0f;
                    World.TeleportTo(coord);
                }

                if (idx >= coordinates.Length)
                {
                    if (chest == null || chest != null && !chest.IsLootable())
                    {
                        Utilities.Print("Teleport to chest");
                        World.TeleportTo(coordinates[0]);
                        Thread.Sleep(1000);
                        Navigator.TraversePath(new Point3f[] { new Point3f(-23.8563f, 66.907f, 40.3968f - 3.0f) });
                        Thread.Sleep(3000);
                        World.TeleportTo(pathToChest[1]);
                        //Navigator.Jump(); //Synchronize and fall into gift box
                        return 1000;
                    }
  
                }


            } else
            {
                idx = 0;
            }



            /*
            StringBuilder sb = new StringBuilder("character_name");

            World.Login(sb);
            
            var myPos = Me.GetAgent().GetPosition();*/





            //return 10 * 1000;
            return new Random(new DateTime().Millisecond).Next(100, 500);
        }
    }
}

Enable Autoloot.

I tried a bunch of times running via admin but no luck.

I'm going to redownload all of the runtimes and see if that will do anything.
12/30/2015 12:53 Agedyn#69
Quote:
Originally Posted by mitix132 View Post
ohh, ok, here are the results
[Only registered and activated users can see links. Click Here To Register...]
Try with this and post results.
12/30/2015 13:06 mitix132#70
[Only registered and activated users can see links. Click Here To Register...]
Just an additional checker if character is in game already, still nothing
12/30/2015 13:35 Agedyn#71
Quote:
Originally Posted by mitix132 View Post
[Only registered and activated users can see links. Click Here To Register...]
Just an additional checker if character is in game already, still nothing
Try with this.
12/30/2015 13:46 mitix132#72
[Only registered and activated users can see links. Click Here To Register...]
Bot crashes

When launching the bot inside Jumping Puzzle it has additional line in the log
[Only registered and activated users can see links. Click Here To Register...]
12/30/2015 16:50 cypherfff#73
Help :c
[Only registered and activated users can see links. Click Here To Register...]
12/30/2015 16:51 Agedyn#74
Quote:
Originally Posted by mitix132 View Post
[Only registered and activated users can see links. Click Here To Register...]
Bot crashes

When launching the bot inside Jumping Puzzle it has additional line in the log
[Only registered and activated users can see links. Click Here To Register...]
I know what causes this now but unfortunately, I don't have time to fix it.

Quote:
Originally Posted by cypherfff View Post
Help :c
[Only registered and activated users can see links. Click Here To Register...]
Install [Only registered and activated users can see links. Click Here To Register...]
12/30/2015 17:12 RockDaMist#75
I'm able to successfully get in game on the 32 bit version, get into the jp, and click start on the bot for Winter Wonderland script, but the bot doesn't do anything. Running both the game and the bot as admin and getting no errors.