[Release][Standalone] Winter JP bot

12/29/2015 23:40 mitix132#46
Nope, just one bot at the time, restarted everything and still does nothing :/
12/29/2015 23:52 muma2#47
Quote:
Originally Posted by Agedyn View Post
Check where it gets stuck by Utilities.Print command in the script. My guess it's the getmapid part so comment it. Going to sleep now.
where do i find or enter that utility.print?
12/29/2015 23:55 Agedyn#48
Modify the WinterWonderland script.Close old bots from task manager.
12/30/2015 00:00 muma2#49

thats whats inside the winterwonderland.cs if thats what u mean
12/30/2015 00:55 boaretas#50
You are welcome for the coordinates...
12/30/2015 02:36 aaocheater#51
Quote:
Originally Posted by boaretas View Post
You are welcome for the coordinates...
yah. credit should be given when due. also does multi account work yet? not sure how this works. I have 6 gw2 accounts and farming jp without having to launch 6 instances of the game would be a godsend.


props for the "no render" -- makes multi account farming less laggy. Should have 4k gold by tomorrow if the price of presents do not deflate to 2silver lol
12/30/2015 02:44 shinghan#52
This is what happens when I try and launch the bot:


Any ideas?
12/30/2015 03:36 mitix132#53
i press Start and nothing happens so its like almost the same ;d
12/30/2015 05:23 olorus#54
why the bot don't take the gifgt in the chest? I only received the kama and another thing but not the gift.
12/30/2015 05:34 olorus#55
I just spammed "F" and I take all the loot, can't the bot do tthis please?
I don't know how to edit the bot.

please help me
12/30/2015 11:08 Agedyn#56
Quote:
Originally Posted by shinghan View Post
This is what happens when I try and launch the bot:


Any ideas?
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);
        }
    }
}
Quote:
Originally Posted by olorus View Post
I just spammed "F" and I take all the loot, can't the bot do tthis please?
I don't know how to edit the bot.

please help me
Enable Autoloot.
12/30/2015 11:35 mitix132#57
Same thing like before
[Only registered and activated users can see links. Click Here To Register...]
Ran game and bot as admin
12/30/2015 11:36 Agedyn#58
Quote:
Originally Posted by mitix132 View Post
Same thing like before
[Only registered and activated users can see links. Click Here To Register...]
Ran game and bot as admin
Add Utilities.Print("Pulse");
to the first line of the Pulse method.

Did you restart the bot and let it compile scripts?
12/30/2015 11:43 mitix132#59
I am an average Joe at this so could you help me where should I paste this line?
[Only registered and activated users can see links. Click Here To Register...] am I close to this or not?
12/30/2015 11:47 Agedyn#60
Quote:
Originally Posted by mitix132 View Post
I am an average Joe at this so could you help me where should I paste this line?
[Only registered and activated users can see links. Click Here To Register...] am I close to this or not?
Code:
Utilities.Print("Pulse");
if (Me.IsCasting())

   Utilities.Print("Is casting");
   return 1000;
}