• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Discontinued] [Plugin] Quest Plugin 2.0

    Discussion in 'Archives' started by darkbluefirefly, Jun 4, 2015.

    1. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Default Tasks Already call close blocking windows.

      Calling Close All Blocking windows will have an adverse effect on other's plugins. How?

      For instance.
      Task A is someone else's
      Task B is yours
      Task C is someone else's

      Task A is some stash task, Task B is your Stash Buddy, Stash C requires stash to be open

      You will never be able to account for what task requires what.

      Task A finishes, task B closes window, then opens stash again.

      Task C is a divination trader plugin , it requires stash to be open and closed when it moves.

      So since it already closed stash because task B called it when it started, CPU cycles wasted in opening stash again. Task C Needs stash open when whit drawing, and closed when moving, and it does just that when it's needed to close all windows, Never at the start of a task.

      Do logic when needed, not in case it's needed.

      You make your work with others that have been there before you, not make others change their work to accommodate you. The underlying issue is not adding a line of code, it's the pretense of telling someone to change their logic to match yours, which cannot happen when deving. Each person has their own style, make yours work with, not make someone work their for you.

      What you said you called close blocking windows when you move. If you look at my task, close blocking windows, will always get called by default task, always. There's no reason for me to add another a 5th wheel to a 4 wheel car. I make it work with the assumption everyone will run default task, it has worked thus far and with other plugins when needed. You need to add close blocking windows to the end of your stash task, because you called the window to be opened in the first place.


      PHM is used to send keys to the client to emulate actions, EB does not use packets or anything, because that would get us banned. PHM is meant so no one should touch the bot when it's running. If you need to adjust something, stop the bot do the adjustment and run again. If you can't do the with your plugin, you need to rethink your logic, because it's achievable.


      The reason I separated the quests to 2 sections is because I felt it would give more control to the user, some wanted to rush through content, some wanted just to get the side quests done, some wanted both. I opted out the latter because i would cause issues with users posting about things not working, it's doing this quest before that quest. No, not going to have any of that.

      Gl on auto equip, we've got one for a year or so, the underlying logic has always been the same consensus, too many variables to account for, and equipment won't change much in end game, leveling, yes, it will change a lot. But a character spends 10% of his time leveling, and the rest end game. Why bother, rather spend time automating thing we can, so we can have time to make more things to automate more things, Auto-mate-ception.
       
    2. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      That's what I want, autoequip only on leveling to not babysit several accounts for the whole day and gear them every 30 minutes. With larger amount of accounts that's going to be tiring.
       
    3. LajtStyle

      LajtStyle Community Developer

      Joined:
      Jan 5, 2015
      Messages:
      96
      Likes Received:
      5
      Trophy Points:
      8
      I would say most needed feature while leveling is gear swap but since it would be too big feature to implement maybe potion swapper?
      You choose what potion you need ie. 2x life 2x mana 1x quicksilver and bot will upgrade if he find better potion.
      Still it might be a lot of code and maybe deserve alone plugin.
      If u need something from Act I Normal maybe:
      - Wear quicksilver from medicine chest if u dont have it already.
      - Buy cold res ring before Merveil fight if available at vendor.
       
    4. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      IDK what build you are using, but levelling with a customized CR makes the game cakewalk. I'll hold myself to getting a PoC.
       
    5. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      With no items at all? I can't believe that you can get to act4 merciless ungeared without 3000 deads.
       
    6. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,770
      Likes Received:
      35
      Trophy Points:
      48
      NAKED! jk, no but you can still every act alch some shit to make things happen, at lower levels you tend to get affixes pretty easily since there's not a lot. little res, maxlife.

      I usually end up on malachai with around 50 deaths overall (bosses are bitches
       
    7. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      With my uniques deadly attacks avoider (didn't name it yet xD But UDAA souds epic, right?) I've got 20 deads with gearing in A1N and A1-2C (I dont remember).
      Thanks for the alching idea, I may use it somehow.
       
    8. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,770
      Likes Received:
      35
      Trophy Points:
      48
      Well yeah the really huge thing the bot lacks actually is some dodging stuff, else we're in a good way. I opened QuestBot project this morning, tweaked few things and added last core tasks to the manager, I'll now work on full quest handling, I'm still gathering thoughts (devs, not random bullshit :D) about the best way to handle and the data that has to be exposed for plugins. Few tweaks for the core tasks and I guess I'll start working on GUI after that :) coding quest behaviors will be easy now that everything is set up. I can grab data from QP aswell (not the logic, dbf is an ass :D)

      If you have any suggestion code-wise about the best way to handle objects related to quests, let me know.
       
    9. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      You mean how to efficiently find them on the ground or turn them to the NPC's?
       
    10. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,770
      Likes Received:
      35
      Trophy Points:
      48
      More like the optimal "structure" to adopt to have everything ready for plugins to catch QB's stuff.

      I'll have a generic turn-in task so that's fine.
       
    11. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
    12. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      I'm having problems in specific problem.
      I'm standing at Twilight Strand Cruel, but already have the Act done, so it should go to the town. But instead the bot is taking the waypoint and is porting to Normal Highgate. Then it's taking portal To cruel and we are again in Twilight Strand. Neverending story until I stop the bot.

      Looks like OldGrindBot is derping with changing waypoints.

      Code:
      [TravelToGrindZoneTask] GrindZoneId = 2_1_3.
      [TravelToGrindZoneTask] PathToGrindZone = 2_1_1.
      [TravelToGrindZoneTask] PathToGrindZone = 2_1_town.
      [TravelToGrindZoneTask] PathToGrindZone = 2_1_2.
      [TravelToGrindZoneTask] PathToGrindZone = 2_1_3.
      [TakeWaypointTo] 1_4_town 
      
      You need to register and have one post to see spoilers!
      EDIT: Same thing is happening from act 3 to act 4
      EDIT2: It's also happening if you are standing in the Twilight Strand but the Act is not yet finished. It says it's heading to marveil but again OldGrindBot is derping.
       
      Last edited: Feb 12, 2016
    13. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      This is a partial log, I need a full log, this is the 4th time I've had to iterate this, future posts without full logs are ignored.

      I assumed you took the Portal to Cruel yourself? If So check oldgrindbot and see what the grind zone is.

      Since you did a manual portal, this was never set.
      HandleOyunInHighGate.cs

      Code:
      var currentTransitionString = "The Twilight Strand (Cruel)";
      
                  if (WorldDataHelper.GetCurrentDifficulty() == Difficulty.Normal)
                  {
                      //OldGrindBotSettings.Instance.GrindZoneName = "The Mud Flats";
                      OldGrindBotSettings.Instance.GrindZoneDifficulty = "Cruel";
                  }
                  if (WorldDataHelper.GetCurrentDifficulty() == Difficulty.Cruel)
                  {
                      currentTransitionString = "The Twilight Strand (Merciless)";
                      //areaTransition = LokiPoe.ObjectManager.GetObjectByName<AreaTransition>("The Twilight Strand (Merciless)");
                      //OldGrindBotSettings.Instance.GrindZoneName = "The Mud Flats";
                      OldGrindBotSettings.Instance.GrindZoneDifficulty = "Merciless";
                  }
                  if (WorldDataHelper.GetCurrentDifficulty() == Difficulty.Merciless)
                  {
                      QuestPlugin.Log.InfoFormat("[{0}] All Done", Name);
                      BotManager.Stop();
                  }
      Restart the bot in act 4 and stop touching things.

      The Oldgrindbot still thinks you are in Normal difficulty, and things derp. Stop blaming things that you keep breaking. I've had this task in there since forever, there hasn't been a reported issue like this, because I fixed it prior to committing.

      [​IMG]

      2015-11-14 - 89 Days since I touched it. In 89 Days I would assume a fairly good sample size of people have used and progressed past Normal A4.
       
    14. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      Above the logs i Typed was just Loading plugins and getting Quest states.

      It was in Cruel. I did check it. You can even clearly see it in The code box it want's to go to cruel but then it's getting changed back to normal.

      I didn't break it because I didn't touch that part of code so stop blaming me. And it's not about Act4 files but Act1MainTasks.cs. Guh....

      I've started the bot in Act 4 and I did a full log for you, as you asked. Just deleted info about currency I have in stash.

      http://pastebin.com/EC2wq8xU
       
    15. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      OldGrindBot goes back to the "governing area" of the area you're in when you want to go to town (via TakeWaypointToTown, which is called in TravelToGrindZoneTask). When you are in the first area of any act, the governing area is the previous act's town, so by design, OldGrindBot going to Normal Highgate from Cruel Twilight Strand is not a bug. If you take a portal from Cruel Twilight Strand (which is what happens when CreateAndTakePortalToTown is called from TravelToGrindZoneTask), you end up in Normal Highgate, not Cruel Lioneye's Watch, regardless if you have it unlocked already or not, so the waypoint logic also models that game mechanic for consistency. Basically, the logic for taking the waypoint to the governing town was to save wasting a portal when you're really close to the waypoint; not to actually travel to the next area (which while possible, requires a different TravelToGrindZoneTask implementation).
       
    16. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Thanks, I didn't add the state for this occurrence, Now I will thanks to your state. Honestly, I had totally forgotten about this issue.

      What you need to do to fix this is;
      1 - Finish Twilight strand and start bot, it will work fine form there.

      2 - Wait for an update, should be today or tomorrow. Deadpool is out tonight, so maybe tomorrow.

      Thank again for the bug report.
       
    17. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      At least now we know it's not a bug but feature :) Can't we somehow get the info from LokiPoe.InGameState.WorldPanel if given waypoint from choosed difficulty is discovered? It is in the UI so must be somewhere in the memory aswell. That would make the logic of switching zones much easier.

      No problem, just for the next time dont judge me that I'm breaking things ;p The cause of noone ever reported it is because people are lazy or don't babysit and look how the bot works. Everybody say's that my StashBuddy works perfect but with every update I'm fixing some bugs noone catched before.


      I fixed it from my side by adding this below "Looks Like We Came from a previous Difficulty, going to town." in Act1MainTasks.cs
      Code:
      var town = "";
                          switch (WorldDataHelper.GetCurrentDifficulty())
                          {
                              case Difficulty.Cruel:
                                  town = "2_1_town";
                                  break;
                              case Difficulty.Merciless:
                                  town = "3_1_town";
                                  break;
                          }
                          if (town != "")
                          {
                              for (var i = 0; i < 5; i++)
                              {
                                  var takeWp = await Coroutines.TakeWaypointTo(town, false, 1);
                                  if (takeWp == Coroutines.TakeWaypointToError.None)
                                      return true;
                                  Log.ErrorFormat("[{0}], Error Taking WP to {1}, try #{2}", Name, town, i);
                                  if (i != 5) continue;
                                  Log.ErrorFormat("[{0}], Error Taking WP to {1}, Last Try Failed.", Name, town);
                              }
                          }
      
      And this after "We Have Killed Dominus, setting GrindZone to Act 4 The Dried Lake, working on it." in Act3MainTasks.cs
      Code:
      if (WorldDataHelper.GetCurrentZoneName() != "The Sarn Encampment")
                      {
                          //There is no waypoint on normal+string 
                          var town = "";
                          switch (WorldDataHelper.GetCurrentDifficulty())
                          {
                              case Difficulty.Normal:
                                  town = "1_3_town";
                                  break;
                              case Difficulty.Cruel:
                                  town = "2_3_town";
                                  break;
                              case Difficulty.Merciless:
                                  town = "3_3_town";
                                  break;
                          }
                          if (town != "")
                          {
                              for (var i = 0; i < 5; i++)
                              {
                                  var takeWp = await Coroutines.TakeWaypointTo(town, false, 1);
                                  if (takeWp == Coroutines.TakeWaypointToError.None)
                                      return true;
                                  Log.ErrorFormat("[{0}], Error Taking WP to {1}, try #{2}", Name, town, i);
                                  if (i != 5) continue;
                                  Log.ErrorFormat("[{0}], Error Taking WP to {1}, Last Try Failed.", Name, town);
                              }
                          }
                      }
      
       
      Last edited: Feb 12, 2016
    18. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Um we're talking about it on skype.

      What i'm going to use is

      Code:
      LokiPoe.InstanceInfo.AvailableWaypoints
      But really, won't be needed as there are ways to re-code logic fairly easily.

      Edit - Also, grab that community dev tag and post back here, I think the consensus of our EB dev group, and my view, is your code is great, so we'd like you into our little possy. But IDK if it's going to be before the Big patch or after, I still have to ask around.
       
    19. Tormiasz

      Tormiasz Community Developer

      Joined:
      Jun 16, 2014
      Messages:
      701
      Likes Received:
      5
      Trophy Points:
      18
      I already signed for the Community Dev group but noone dealt with it. At least I didn't get any info.
       
    20. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      K let me know when, not through PM though, I never read those.

      And Version #396 has resolved this issue. Update Via SVN or going here,
      and Click Download on the top right.

      [​IMG]
       

    Share This Page