Blizzhackers

Return of the Jedi

* Login   * Register    * FAQ    * Search

Join us on IRC: #bh@irc.synirc.net (or Mibbit Web IRC)


MuleFactory


It is currently Tue May 21, 2013 10:10 am


All times are UTC [ DST ]





Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 232 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16  Next
Author Message
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 8:39 am 
 
User
User

Joined: Sun May 20, 2012 5:26 pm
First working bot I have since a pindle run bot i had back in d2 lol. I can say I'm amazed at how awesome this community still is even after years of not playing D2. Thank you!

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 9:51 am 
 
User
User

Joined: Tue Jun 12, 2012 9:38 am
Everytime i start bot with .load qb he starts quest walk to Deckard Cain talk with him. After that he walke 7 meter and stay still and do nothing.
:(
Any idea what i do wrong.
I play Witchdoctor

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 3:03 pm 
 
User
User

Joined: Tue Jun 12, 2012 3:00 pm
same here, got RC5. Compiled QB for working in normal mode (test account) with barbarian skills. then i get into a game and type .load qb it exits and starts a new game, talks to cain, walks a few meters and does nothing ):

any help?

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 5:44 pm 
 
User
User

Joined: Fri Feb 26, 2010 4:59 pm
works with monk for me but sometimes he'll get stuck on step 19 when he needs to enter the cellar.

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 5:51 pm 
 
User
User

Joined: Mon Jun 04, 2012 6:29 pm
hmm... this used to work before RC3 for my wizard. but since RC5 everything runs fine except the loot routine. she kills mira and does nothing afterwards. anyone got a clue why? can't really find the "bug" in the code :/

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 6:20 pm 
 
User
User

Joined: Tue Jun 12, 2012 1:05 pm
Hi.

Just to make sure, the only quest it can currently do is "a shattered crown" ?
Without any real programming skills is there anything i can do to help improve on the number of quests available ?
lvling a demon hunter for the purpose of gf and was gonna try and use this to help lvl it some.
And figured i'll ask if i can help somehow :)

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 6:23 pm 
 
User
User

Joined: Tue Jun 12, 2012 6:19 pm
Dark Cellar (Sakaroth) Quest:

using System;
using System.Collections.Generic;
using System.Linq;
using D3;
using QB.Base;

namespace QB.Quests
{
    internal class OldRuins
    {
        private static int _difficulty;
        private static int _frameCount;
        private static int _step;
        private static readonly List<Action> _actionList = new List<Action>();

        // Displays difficulty and quest, initializes creation of action list, starts on tick events
        public static void Load(int i = 0)
        {
            _difficulty = i;
            if (_difficulty == 3)
                Game.Print("Inferno SNOQuestId.Blacksmith loaded");
            else if (_difficulty == 2)
                Game.Print("Hell SNOQuestId.Blacksmith loaded");
            else if (_difficulty == 1)
                Game.Print("Nightmare SNOQuestId.Blacksmith loaded");
            else
            {
                Game.Print("Normal SNOQuestId.Blacksmith loaded");
                _difficulty = 0;
            }
            CreateActionList();
            Game.OnTickEvent += Game_OnTickEvent;
        }

        private static void CreateActionList()
        {
           
            // If in game, leave game
            _actionList.Add(() =>
                                {
                                    if (Game.Ingame)
                                        MouseInterface.Click(UiElementHash.LeaveGame);
                                    else
                                    {
                                        Combat.ResetBuffs();
                                        _step++;
                                    }
                                });
            // If out of game, continue
            _actionList.Add(() =>
                                {
                                    if (!Game.Ingame)
                                        _step++;
                                });
            // Sets difficulty, SNOQuestId, and step http://d3advanced.com/wiki/index.php?title=Quests
            _actionList.Add(() =>
                                {
                                    Game.SetQuest(_difficulty, SNOQuestId.Blacksmith, 0);
                                    _step++;
                                });
            // Starts Game
            _actionList.Add(() =>
                                {
                                    MouseInterface.Click(UiElementHash.StartResumeGame);
                                    _step++;
                                });
            // If in game, continue
            _actionList.Add(() =>
                                {
                                    if (Game.Ingame)
                                        _step++;
                                });
             
           
            // Move to  Deckard Cain
            _actionList.Add(() =>
            {
                                    //if (Navigation.GetDistance("Waypoint") > 10f)
                                        Navigation.MoveTo("Waypoint");
                                    //else
                                        _step++;
                                });

            _actionList.Add(() =>
            {
                if (Navigation.GetDistance("Waypoint") < 2f)
                {
                    UnitCollection.Interact("Waypoint");
                    _step++;
                }
            });
           
            _actionList.Add(() =>
            {
                UIElement element = UIElement.Get().Where(u => u.Name.Contains("stackpanel.entry 1.wrapper.button")).FirstOrDefault();
                if (element != default(UIElement))
                {
                    element.Click();
                    _step++;
                }
                else
                {
                    Game.Print("Teleport not possibru sry");
                    _step = 6;
                    return;
                }
            });



            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2003f, 2764f) > 10f)
                    Navigation.MoveTo(2003f, 2764f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2001f, 2701f) > 10f)
                    Navigation.MoveTo(2001f, 2701f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(1997f, 2670f) > 10f)
                    Navigation.MoveTo(1997f, 2670f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(1990f, 2609f) > 10f)
                    Navigation.MoveTo(1990f, 2609f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2015f, 2577f) > 10f)
                    Navigation.MoveTo(2015f, 2577f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2057f, 2531f) > 10f)
                    Navigation.MoveTo(2057f, 2531f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (UnitCollection.Exists("Dank Cellar"))
                {
                    _step++;
                }
                else
                    _step = 0;
            });

            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2087f, 2495f) > 10f)
                    Navigation.MoveTo(2087f, 2495f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2066f, 2476f) > 10f)
                    Navigation.MoveTo(2066f, 2476f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (UnitCollection.Exists("Dank Cellar"))
                {
                    UnitCollection.Interact("Dank Cellar");
                    _step++;
                }
                else
                    _step = 0;
            });


            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(122f, 151f) > 10f)
                    Navigation.MoveTo(122f, 151f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (UnitCollection.Exists("Sarkoth"))
                {
                    if (UnitCollection.Exists("Quill Fiend"))
                        Combat.Attack("Quill Fiend");
                    else
                    {
                        if (Navigation.GetDistance("Sarkoth") > 10f)
                            Navigation.MoveTo("Sarkoth");
                        Combat.Attack("Sarkoth");
                    }
                }
                else
                    _step++;
            });

            // Loot
            _actionList.Add(() =>
            {
                if (Loot.Exists())
                    Loot.Get();
                else
                    _step++;
            });


            // Go to town
            _actionList.Add(() =>
            {
                if ((!Me.InTown) && (Me.Mode != UnitMode.Casting || Me.Mode != UnitMode.Warping))
                    Me.UsePower(SNOPowerId.UseStoneOfRecall);
                else
                    _step = 0;
            });
        }

        private static void Game_OnTickEvent(EventArgs e)
        {
            if (++_frameCount%20 != 0)
                return;
#if DEBUG
            Game.Print("_step = " + _step);
#endif
            // Check if dead
            if (Game.Ingame && Me.Life <= 0f && Me.Mode == UnitMode.Dead)
            {
                MouseInterface.Click(UiElementHash.Revive);
                _step = 0;
            }
            // Invoke action
            if (_actionList.Any())
                _actionList[_step].Invoke();
        }
    }
}



I just removed some comments and didn't test it since then. if it's not working just say it ;)

ps: didn't test death. not sure if it is working



edit://
I will be adding a few more in the future

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 7:17 pm 
 
User
User

Joined: Tue Jun 12, 2012 1:05 pm
wow so fast response <3 :)

Been playing around the last hour, its surprisingly "copy-paste friendly" :D
One thing that kinda shocked me tho, its using the town portal before its unlocked in my bar :s (Shattered crown quest)
(Edited. you get TP 1-2 quests after)

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 7:54 pm 
 
User
User

Joined: Sat Jan 01, 2005 1:22 am
Dark Cellar (Sakaroth) Quest:

using System;
using System.Collections.Generic;
using System.Linq;
using D3;
using QB.Base;

namespace QB.Quests
{
    internal class OldRuins
    {
        private static int _difficulty;
        private static int _frameCount;
        private static int _step;
        private static readonly List<Action> _actionList = new List<Action>();

        // Displays difficulty and quest, initializes creation of action list, starts on tick events
        public static void Load(int i = 0)
        {
            _difficulty = i;
            if (_difficulty == 3)
                Game.Print("Inferno SNOQuestId.Blacksmith loaded");
            else if (_difficulty == 2)
                Game.Print("Hell SNOQuestId.Blacksmith loaded");
            else if (_difficulty == 1)
                Game.Print("Nightmare SNOQuestId.Blacksmith loaded");
            else
            {
                Game.Print("Normal SNOQuestId.Blacksmith loaded");
                _difficulty = 0;
            }
            CreateActionList();
            Game.OnTickEvent += Game_OnTickEvent;
        }

        private static void CreateActionList()
        {
           
            // If in game, leave game
            _actionList.Add(() =>
                                {
                                    if (Game.Ingame)
                                        MouseInterface.Click(UiElementHash.LeaveGame);
                                    else
                                    {
                                        Combat.ResetBuffs();
                                        _step++;
                                    }
                                });
            // If out of game, continue
            _actionList.Add(() =>
                                {
                                    if (!Game.Ingame)
                                        _step++;
                                });
            // Sets difficulty, SNOQuestId, and step http://d3advanced.com/wiki/index.php?title=Quests
            _actionList.Add(() =>
                                {
                                    Game.SetQuest(_difficulty, SNOQuestId.Blacksmith, 0);
                                    _step++;
                                });
            // Starts Game
            _actionList.Add(() =>
                                {
                                    MouseInterface.Click(UiElementHash.StartResumeGame);
                                    _step++;
                                });
            // If in game, continue
            _actionList.Add(() =>
                                {
                                    if (Game.Ingame)
                                        _step++;
                                });
             
           
            // Move to  Deckard Cain
            _actionList.Add(() =>
            {
                                    //if (Navigation.GetDistance("Waypoint") > 10f)
                                        Navigation.MoveTo("Waypoint");
                                    //else
                                        _step++;
                                });

            _actionList.Add(() =>
            {
                if (Navigation.GetDistance("Waypoint") < 2f)
                {
                    UnitCollection.Interact("Waypoint");
                    _step++;
                }
            });
           
            _actionList.Add(() =>
            {
                UIElement element = UIElement.Get().Where(u => u.Name.Contains("stackpanel.entry 1.wrapper.button")).FirstOrDefault();
                if (element != default(UIElement))
                {
                    element.Click();
                    _step++;
                }
                else
                {
                    Game.Print("Teleport not possibru sry");
                    _step = 6;
                    return;
                }
            });



            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2003f, 2764f) > 10f)
                    Navigation.MoveTo(2003f, 2764f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2001f, 2701f) > 10f)
                    Navigation.MoveTo(2001f, 2701f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(1997f, 2670f) > 10f)
                    Navigation.MoveTo(1997f, 2670f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(1990f, 2609f) > 10f)
                    Navigation.MoveTo(1990f, 2609f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2015f, 2577f) > 10f)
                    Navigation.MoveTo(2015f, 2577f);
                else
                    _step++;
            });
            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2057f, 2531f) > 10f)
                    Navigation.MoveTo(2057f, 2531f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (UnitCollection.Exists("Dank Cellar"))
                {
                    _step++;
                }
                else
                    _step = 0;
            });

            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2087f, 2495f) > 10f)
                    Navigation.MoveTo(2087f, 2495f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(2066f, 2476f) > 10f)
                    Navigation.MoveTo(2066f, 2476f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (UnitCollection.Exists("Dank Cellar"))
                {
                    UnitCollection.Interact("Dank Cellar");
                    _step++;
                }
                else
                    _step = 0;
            });


            _actionList.Add(() =>
            {
                if (Navigation.GetDistance(122f, 151f) > 10f)
                    Navigation.MoveTo(122f, 151f);
                else
                    _step++;
            });

            _actionList.Add(() =>
            {
                if (UnitCollection.Exists("Sarkoth"))
                {
                    if (UnitCollection.Exists("Quill Fiend"))
                        Combat.Attack("Quill Fiend");
                    else
                    {
                        if (Navigation.GetDistance("Sarkoth") > 10f)
                            Navigation.MoveTo("Sarkoth");
                        Combat.Attack("Sarkoth");
                    }
                }
                else
                    _step++;
            });

            // Loot
            _actionList.Add(() =>
            {
                if (Loot.Exists())
                    Loot.Get();
                else
                    _step++;
            });


            // Go to town
            _actionList.Add(() =>
            {
                if ((!Me.InTown) && (Me.Mode != UnitMode.Casting || Me.Mode != UnitMode.Warping))
                    Me.UsePower(SNOPowerId.UseStoneOfRecall);
                else
                    _step = 0;
            });
        }

        private static void Game_OnTickEvent(EventArgs e)
        {
            if (++_frameCount%20 != 0)
                return;
#if DEBUG
            Game.Print("_step = " + _step);
#endif
            // Check if dead
            if (Game.Ingame && Me.Life <= 0f && Me.Mode == UnitMode.Dead)
            {
                MouseInterface.Click(UiElementHash.Revive);
                _step = 0;
            }
            // Invoke action
            if (_actionList.Any())
                _actionList[_step].Invoke();
        }
    }
}



I just removed some comments and didn't test it since then. if it's not working just say it ;)

ps: didn't test death. not sure if it is working



edit://
I will be adding a few more in the future


Great job. I am glad that someone is using my framework to create mini-quests/farm quests. :) I will test this when D3A RC6 is available. I'll fix it up a little and then add it to the next release of QuestBot. Credits will be given to you as well. :) Again, great job!

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 8:08 pm 
 
User
User

Joined: Tue Jun 12, 2012 6:19 pm
Btw, is there a possibility to skip the dialogues by simulating a "space" keypress? it takes like forever with that dialog b4 the witch morphs

edit:// btw why are you waiting for v6 :D


Last edited by azariah on Tue Jun 12, 2012 8:13 pm, edited 1 time in total.
Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 8:11 pm 
 
User
User

Joined: Sat Jan 10, 2004 6:17 am
[quote="[url=http://www.blizzhackers.cc/viewtopic.php?p=4577030#p4577030]

I just found out what was the problem, it was my bad. This bot works great thank you. A suggestion : Would be nice to implement a ''push space bar'' twice after killing all the zombies just before killing Mira so we could skip the quest dialog of the blacksmith and her wife (save us few sec each run).


It's very interesting what is the solution. Have absolutely the same problem.

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 8:22 pm 
 
User
User

Joined: Tue Jun 12, 2012 6:19 pm
additionally I am looking for a place (miniquest if possible) to lvl fast, do you have any idea?

edit:// I will share the code, of course ;)

edit2://
aand a skip arghus if no items function would be nice :D
Unfortunately I have no idea how to do this since I started to work with d3advanced today

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Tue Jun 12, 2012 11:46 pm 
 
User
User

Joined: Mon Apr 12, 2010 9:13 pm
Location: Behind you
Hi guys I would really like to get class/ Barbarian.cs built but I'm useless at this scripting

I have had a go and I cant get anything I want to work really. The idea is to enter the room
Pop WarCry
Pop BattleRage
Hit zombies
wait for Mira to turn
Pop WotB
Pop Threatening shout (15% more chance to find item)
Kill Mira

I tried to adapt the Monk.cs to make it work but so far it only get as far as BattleRage and then just stops
I will post up the scrip and hopefull you guys can show me how blind Iam

using D3;
using QB.Base;

namespace QB.Class
{
    internal class Barbarian
    {
        private static bool _WarCry;
        private static bool _BattleRage;
        // SNOPowerId: http://d3advanced.com/help/html/627ef1e4-847c-4136-0bb9-0d650c10614c.htm
        public static void Attack(string name)
        {
            Unit unit = UnitCollection.Find(name);
            if (unit != default(Unit))
            {
                if (!_WarCry)
                {
                    _WarCry = true;
                    Me.UsePower(SNOPowerId.Barbarian_WarCry);
                }
                if (!_BattleRage)
                {
                    _BattleRage = true;
                    Me.UsePower(SNOPowerId.Barbarian_BattleRage);
                    {
                                           
                        if (!unit.Name.Contains("Mira"))
                        {
                            Me.UsePower(SNOPowerId.Barbarian_WrathOfTheBerserker);
                            Me.UsePower(SNOPowerId.Barbarian_ThreateningShout);
                        }
                        Me.UsePower(SNOPowerId.Barbarian_Frenzy, unit);
                    }
                }
            }
        }
        public static void ResetBuffs()
        {
            _WarCry = false;
            _BattleRage = false;
        }
    }
}


Many thnks guys

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Wed Jun 13, 2012 12:38 am 
 
User
User

Joined: Thu Jun 07, 2012 2:28 am
Trying to load d3 thru d3a and as soon as I click the running box it says error. The logs say [19:27:59] D3/Bnet CRC mismatch! (D3: 11FF43E0, BNET: 1CABA015). Any idea what that it?

Top
 Profile  
 Post subject: Re: [Source] 6/4/2012 QuestBot v1.0.2
PostPosted: Wed Jun 13, 2012 2:56 am 
 
User
User

Joined: Tue Apr 13, 2010 9:11 pm
[quote="[url=http://www.blizzhackers.cc/viewtopic.php?p=4577030#p4577030]

I just found out what was the problem, it was my bad. This bot works great thank you. A suggestion : Would be nice to implement a ''push space bar'' twice after killing all the zombies just before killing Mira so we could skip the quest dialog of the blacksmith and her wife (save us few sec each run).


It's very interesting what is the solution. Have absolutely the same problem.


Well, my problem was pretty noob from me. After some search I finally figured out that the ResetBuff () function was not in my blacksmith.cs. How's that? no idea... If you have the same problem you just have to add it (I downloaded the QB WZ v1.0.3 from Ivan i think somewhere in this thread).

Top
 Profile  
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 232 posts ]  Go to page Previous  1 ... 12, 13, 14, 15, 16  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron