• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin] Act 2 Bandits and Misc Quests

    Discussion in 'Archives' started by darkbluefirefly, Oct 6, 2014.

    1. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Oh I see what's going on here.
      Ok When you downloaded QuestPlugin-07-11-2014-4.0.zip
      Navigate to your ExileBuddy/Plugins/ Folder
      Make a New Folder named "QuestPlugin"
      Extract the content of QuestPlugin-07-11-2014-4.0.zip into QuestPlugin and it should work.
      Let me know if it doesn't.
       
    2. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      Thats exactly what i did sorry for not telling that i extracted files inside rar to QuestPlugin folder.
      Tried to renew everything and launch again. Still the same error occuring :(:confused:

      Edit: i think i solved the problem the file "questplugingui.xaml" is a cs file instead of xaml i will try to make it xaml.
      Edit: Well, there was another "questplugingui.xaml" the one with the .cs extension was 3kb other 12kb i add them together now it gives this error:
      Code:
      Compiler Error: c:\ExileBuddy\Plugins\QuestPlugin\QuestPlugin.cs(1275,37) : warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
      Compiler Error: c:\ExileBuddy\Plugins\QuestPlugin\QuestPlugin.cs(1787,37) : warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
      Compiler Error: c:\ExileBuddy\Plugins\QuestPlugin\QuestPlugin.cs(4212,37) : warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
      Compiler Error: c:\ExileBuddy\Plugins\QuestPlugin\QuestPlugin.cs(4881,84) : warning CS0642: Possible mistaken empty statement
      Compiler Error: c:\ExileBuddy\Plugins\QuestPlugin\QuestPlugin.cs(6007,37) : warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
      Compiler Error: c:\ExileBuddy\QuestPluginGUI.xaml(93,90) : error CS1061: 'QuestPlugin.QuestPluginGUI' does not contain a definition for 'RefreshQuestsButton_Click' and no extension method 'RefreshQuestsButton_Click' accepting a first argument of type 'QuestPlugin.QuestPluginGUI' could be found (are you missing a using directive or an assembly reference?)
      Compiler Error: c:\ExileBuddy\QuestPluginGUI.xaml(94,83) : error CS1061: 'QuestPlugin.QuestPluginGUI' does not contain a definition for 'StartStopBot_Click' and no extension method 'StartStopBot_Click' accepting a first argument of type 'QuestPlugin.QuestPluginGUI' could be found (are you missing a using directive or an assembly reference?)
      Damn, wish i didnt open them with notepad at the first time.
       
      Last edited: Nov 11, 2014
    3. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      the file name is wrong for it as well.
      it's looking for questplugingui.xaml
      it should be QuestPluginGUI.xaml.
      Is this the first time you are running the bot? Can you check here to make sure you have the pre-requisites?
      https://www.thebuddyforum.com/exilebuddy-forum/178296-exilebuddy-users-guide.html
      Also please post a full log as an attachment so I can check it. Thanks.

      Inside the folder you should have 6 files in total.
      QuestPlugin.cs
      QuestPluginGUI.baml
      QuestPluginGUI.g.cs
      QuestPluginGUI.xaml
      QuestPluginGUI.xaml.cs
      QuestPluginSettings.cs
       
    4. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      I used bot without plugin and it ran smoothly! But your plugin was the first reason that i bought the bot LOL!
      Edit: Yes, i have exactly the same 6 files.
       
      Last edited: Nov 16, 2014
    5. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Hey dude, I just tracked some issues with 4.0.
      First, can you go into your profile folder inside ExileBuddy\Settings\, find QuestPluginsSettings.json and delete it.
      Run the bot again and see if it fixes it. If not delete everything inside QuestPlugins, and use version 23-10-2014 - Changelog 3.3 Build
      I'll track down the issue with 4.0 and resolve it. I just caught another issue with 4.0 while trying to fix yours so I'll resolve that too.

      Edit, Ok I think I know what's going on.
      GUI is not updating as well, it's all related to me switching over to baml/code-behind.
      I'll move the code and fix it accordingly, for now use 3.3.
       
      Last edited: Nov 11, 2014
    6. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Ok Found the Code unreachable problem. To fix it until I put out a fix;
      For 4.0 Version only, if you cannot find the code below, you do not have the issue.
      Find inside QuestPlugin.cs
      Code:
       public static void UpdateQuestsAndGUI()
              {
                  .......
      
              }
      For the whole function replace with this

      Code:
      public static void UpdateQuestsAndGUI()
              {
                  //LokiPoe.AcquireFrame();
                  //using (LokiPoe.AcquireFrame())
                  //{
                  if (LokiPoe.CurrentWorldArea.IsCorruptedArea || LokiPoe.CurrentWorldArea.IsMap || LokiPoe.CurrentWorldArea.IsMissionArea)
                  {
                      return;
                  }
                      //}
                      if (LokiPoe.IsInGame)
                      {
                          ClearQuestsGUI();
      
                          Log.InfoFormat("[QuestPlugin] ========  UPDATING QUEST GUI ======== ");
                          ////////  Have to add a check for is not in town, and if no monsters nearby, I.E Combbat logic is not running, then do update. 
      
      
                          var msg = String.Format("");
                          //var _questDifficulty = Difficulty.Unknown;
                          string _getWorldAreaId = LokiPoe.LocalData.WorldAreaId;
                          var _questDifficulty = Loki.Game.LokiPoe.CurrentWorldArea.Difficulty;
                          QuestPlugin._currentDifficulty = _questDifficulty.ToString();
                          #region OLD CODE
                          /*if (Loki.Game.GameData.GameConstants.DifficultyFromString("Normal") == Difficulty.Normal)
                          {
                              _questDifficulty = Difficulty.Normal;
      
                          }
                          if (Loki.Game.GameData.GameConstants.DifficultyFromString("Cruel") == Difficulty.Cruel)
                          {
                              _questDifficulty = Difficulty.Cruel;
      
                          }
                          if (Loki.Game.GameData.GameConstants.DifficultyFromString("Merciless") == Difficulty.Merciless)
                          {
                              _questDifficulty = Difficulty.Merciless;
      
                          }*/
                          /*Log.InfoFormat("_getWorldAreaId : {0}", _getWorldAreaId);
                          if (_getWorldAreaId.Contains("1_1_") || _getWorldAreaId.Contains("1_2_") || _getWorldAreaId.Contains("1_3_"))
                          {
                              _questDifficulty = Difficulty.Normal;
      
                          }
                          if (_getWorldAreaId.Contains("2_1_") || _getWorldAreaId.Contains("2_2_") || _getWorldAreaId.Contains("2_3_"))
                          {
                              _questDifficulty = Difficulty.Cruel;
                          }
                          if (_getWorldAreaId.Contains("3_1_") || _getWorldAreaId.Contains("3_2_") || _getWorldAreaId.Contains("3_3_"))
                          {
                              _questDifficulty = Difficulty.Merciless;
                          }
                          */
                          #endregion
                          //msg = string.Format("{0}", Environment.TickCount);
                          msg = String.Format("Current Difficulty : {0} - Character Level is : {1}", _questDifficulty.ToString(), Loki.Game.LokiPoe.InstanceInfo.CharacterLevel);
                          Log.InfoFormat("{0}", msg);
                          QuestPluginSettings.Instance.Difficulty = msg;
                          msg = String.Format("Current Grind Zone : {0} ", BasicGrindBotSettings.Instance.GrindZoneName.ToString());
                          Log.InfoFormat("{0}", msg);
                          QuestPluginSettings.Instance.CurrentGrindZone = msg;
                          msg = String.Format("Current Zone : {0} ", LokiPoe.CurrentWorldArea.Name.ToString());
                          Log.InfoFormat("{0}", msg);
                          QuestPluginSettings.Instance.CurrentZone = msg;
                          //msg = _currentTask;
                          //Log.InfoFormat("[QuestPlugin] Current Difficulty : {0}", _questDifficulty);
                          QuestPluginSettings.Instance.CurrentTask = "";//_currentTask;
      
                          int _quest = QuestPlugin._questWeNeed.Count();
      
                          //foreach (var quest in Dat.Quests) 
                          for (var i = 0; i < QuestPlugin._questStateArray.Count(); i++)
                          {
                              //System.Threading.Thread.Sleep(500);
                              //var missionQuest = Dat.Quests.FirstOrDefault(q => q.Id == _questWeNeed[i]);
                              // Note: this is an expensive call. Try to reduce how often you call it to avoid performance issues.
                              QuestPluginSettings.Instance.AllQuestAndStates.Add(QuestPlugin._questStateArrayIndex[i]);
                              QuestPluginSettings.Instance.AllQuestAndStates1.Add(QuestPlugin._questStateArrayName[i]);
                              QuestPluginSettings.Instance.AllQuestAndStates2.Add(QuestPlugin._questStateArrayId[i]);
                              QuestPluginSettings.Instance.AllQuestAndStates3.Add(QuestPlugin._questStateArray[i].ToString());
                              QuestPluginSettings.Instance.AllQuestAndStates4.Add(QuestPlugin._questStateArrayQuestStateText[i]);
      
                          }
                          _update = false;
                          Log.InfoFormat("[QuestPlugin] ========  FINSIHED UPDATING QUEST GUI ======== ");
      
                      }
                  
              }
      The issue was, I didn't comment my code, so I made an error in remembering so I put out a fix for
      https://www.thebuddyforum.com/exilebuddy-forum/exilebuddy-support/186554-bot-stopping.html#post1714509
      Which totally screwed up the bot.
      I made a fix on the problem described at the link, and moved GUI related tasks over to QuestPluginGUI.xaml.cs
      Which Should fix GUI related issues, and the null reference issue.
      I'll post an update asap when I test this for 1-2 hours.
      Moral of the story.
      Always, code comment.

      OK for those who want to test, these 2 files need to be downloaded and overide the old files with these new ones. Sorry about the mess up, concentrated on the other project more and neglected some logic checks.

      View attachment QuestPlugin.cs
      View attachment QuestPluginGUI.xaml.cs
       
      Last edited: Nov 11, 2014
    7. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      Deleting didnt work but i installed 3.8 which is working. Thanks for your patience & help. Will edit this post when i try the changes in 4.0
       
    8. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      It's ok no worries, If you have issues, chances down the road someone else will have it. Better get the problem solved now then latter. I'll track this down though.
       
    9. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Ok 4.4 is up, feed back would be nice Ty.
      @ozgun311, please delete your old QuestPlugin folder, extract this folder as "Extract here" command on your unzipper software as I have a folder structure now in the zip. And find inside your /Settings/[Profile] "QuestPlugin.json" delete that before starting 4.4. Let me know if there are any problems. Thanks.

      Oh, For those messaging me
      Here it is almost done. Just have to do bindings to update controls as controls are no updating for some reason.
      AGZ.png

      90% of the time spent is to try to figure out how the GUI will work and etc. This is needed for latter projects I envision down the road.
      10% is the actual logic code for the main propose of this plugin lol.
      It's a weird way to try to develop, but everything learned, no matter how big or small can be put to use latter on.
       
      Last edited: Nov 12, 2014
    10. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6

      I'm sorry but the 4.4 also giving the same error as 4.0. Did what you said in the bold section. I add the log file as attachment.
      I dont know but maybe this things can help you:
      -I have windows ultimate 32bit
      -No windows firewall or any anti-virus(i hate these things lol)
      -I'm using Advanced System Care with Turbo Boost on.

      By the way, that GrindZoneChanger looks marvelous!
       
      Last edited: Nov 16, 2014
    11. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Hey ozgun311, I figured this would be the case
      Can you install(re-install) these?
      VS2012 Redist (Make sure you use the x86 version).
      .Net 4.5.1

      Oh and yea =), I'm trying the User friendly approach for the plugin being worked on.
       
      Last edited: Nov 12, 2014
    12. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      Things i did:
      -downloaded both
      -uninstalled both
      -reinstalled both
      -restarted the computer
      Result:
      same

      i dont know anything you do but maybe "Cannot locate resource 'questplugingui.xaml'." you can make it to locate "QuestPluginGUI.xaml" if it is case-sensitive.(sorry if it is stupid >.<)
       
      Last edited: Nov 12, 2014
    13. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      ok I uploaded another version with a different assembly name
      Download 4.4 again, overwrite and see if it works. I also removed some debug info that I left there by mistake

      So what previous 4.4 had
      Code:
              public void Tick()
              {
      
                  if (_skip || !LokiPoe.IsInGame || !_questPluginEnabled)
                  {
                      //Log.InfoFormat("[QuestPlugin] _skip = {0} ", _skip);
                      return;
                  }
                  _update = true;
                  //UpdateQuestsAndGUIDispatcher();
                  if (_update)
                  {
                      Log.InfoFormat("[QuestPlugin] TICK _update = {0}",_update);
                      if (!_updateThreshold.IsFinished)
                      {
                          Log.InfoFormat("[QuestPlugin] TICK _updateThreshold timeleft : {0} ", _updateThreshold.TimeLeft);
                          return;
                      }
      It's changed to this now
      Code:
              public void Tick()
              {
      
                  if (_skip || !LokiPoe.IsInGame || !_questPluginEnabled)
                  {
                      //Log.InfoFormat("[QuestPlugin] _skip = {0} ", _skip);
                      return;
                  }
                 [B] //_update = true;[/B]
                  //UpdateQuestsAndGUIDispatcher();
                  if (_update)
                  {
                     [B] //Log.InfoFormat("[QuestPlugin] TICK _update = {0}",_update);[/B]
                      if (!_updateThreshold.IsFinished)
                      {
                       [B]  // Log.InfoFormat("[QuestPlugin] TICK _updateThreshold timeleft : {0} ", _updateThreshold.TimeLeft);[/B]
                          _update = false;
                          return;
                      }
       
    14. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Ah found it, I might have to re-do the project solution as VS2013 is being stupid and it's renaming it
      Code:
      System.Uri resourceLocater = new System.Uri("/QuestPlugins;component/questplugingui.xaml", System.UriKind.Relative);
      Even with Clean, then rebuild solution it's not working.
       
    15. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      Yes it didnt work. I wonder if anyone has the same problem
       
    16. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Do you have another system you can test this on? I've rebuilt the project using a new project as template, and manually copying and configuring everything. Still
      questplugingui.xaml.
      I'm stumped, let me try to figure out why this is happening.

      Edit, ok can you do this

      Find inside
      Code:
       /QuestPlugin/QuestPluginGUI.xaml
      and change it to lower case
      Code:
       /QuestPlugin/questplugingui.xaml
      Let me know if it works.
       
      Last edited: Nov 12, 2014
    17. deka01

      deka01 New Member

      Joined:
      Nov 11, 2014
      Messages:
      1
      Likes Received:
      0
      Trophy Points:
      0
      The top file is incorrectly complied or missing something and doesn't work but the bottom link does.
       
    18. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Confirmed, I derped with the upload. I added a DLL instead of QuestPluginSettings.cs, messed up on the assembly because I was trying to fix ozgun311's Issue since he was using the 4.4 Build, which is related to the missing file.
      5 hours of sleep a night will do that to you lol. Pushedx, skyped me about the DLL in the 4.4 file(removed now), which consequently fixed ozgun311's issue, which also fixed the assembly issue that came into from trying to fix ozgun311's issue.
      Moral of the story, 4.4 Version is evil Delete it, start fresh like Downy with 4.5 conveniently found below.
      View attachment QuestPlugin-12-11-2014-4.5.zip

      Sorry about that folks lol. Also Good news, made progress on the zone changer thanks to Pushedx's help, again, Man what would we do without him :cool:
       
    19. ozgun311

      ozgun311 Member

      Joined:
      Nov 11, 2014
      Messages:
      88
      Likes Received:
      0
      Trophy Points:
      6
      It's sad to say that it didnt work. I will try that on my laptop now. Will edit this post if it works.
      Tried on my laptop but also didnt work. Giving the same error.
       
      Last edited: Nov 16, 2014
    20. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      That's very weird. Anyone else having this error?
      Can you run it without any plugins except mine and try? Ty.
       

    Share This Page