• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [Plugin] MinionSupportPlugin

    Discussion in 'Archives' started by spliffermaster, Aug 26, 2015.

    1. spliffermaster

      spliffermaster Community Developer

      Joined:
      Mar 10, 2014
      Messages:
      56
      Likes Received:
      2
      Trophy Points:
      8
      [Plugin] Summoner

      This (basic) Plugin is dedicated to buff your minions and cast your golem in an area.

      What it does:
      • Flesh Offering
      • Bone Offering
      • Spirit Offering
      • Summon Golem

      Known issues:
      • Summon Offering sometimes does not cast properly - I am looking into this.

      Upcoming / Working on:
      • Set area, monster base type and minimum area level to "Raise Specter" (Use Desecrate in specific cases)
      • Choose and change back skill in skill bar or switch weapons to use "Desecrate" to raise specters

      Version 0.1.0 - 14.06.2016
      View attachment Summoner-0.1.0.zip


      Changelog:
      Version 0.1.0
      • Task now runs before CombatTask to cast within a fight
      • Added Stone and Lightning Golem
      • Removed Immortal Call
      • Removed Enduring Cry


      Previous versions
      You need to register and have one post to see spoilers!
       
      Last edited: Jun 14, 2016
      masterashh likes this.
    2. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Hey dude, nice!
      Had a quick look through it and noticed something.
      Thread.Sleep(150);
      Shouldn't be using that, it's going to freeze bot. Use an async sleep method instead.
      Otherwise looks sweet, good for those who don't want a custom routine but need summon support.
       
    3. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,770
      Likes Received:
      35
      Trophy Points:
      48
      Yep those sleeps are not threadsafe, tho you have built-in coroutines that replace those.
      If you need an example, just ask.
       
    4. spliffermaster

      spliffermaster Community Developer

      Joined:
      Mar 10, 2014
      Messages:
      56
      Likes Received:
      2
      Trophy Points:
      8
      Oh yea.. i need to fix this quickly. Give me few hours to get back from work.

      EDIT: removed the thread sleep and replaced it with coroutine sleep
       
      Last edited: Aug 27, 2015
    5. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Thanks!, Its cause thread sleep is bad in most instances, and for bots, it's bad xD.
       
    6. Unknown Buddy

      Unknown Buddy Member

      Joined:
      May 20, 2015
      Messages:
      603
      Likes Received:
      17
      Trophy Points:
      18
      @spliffermaster

      The newest zip file you uploaded unpacks wierd on PCs. Im guessing you are using a mac, which is why the file unpacks as _MACOSX

      For those not on a mac, just cut / paste the MinionSupportPlugin folder thats inside the _MACOSX folder into the Plugins folder. Then you can delete the _MACOSX folder.
       
    7. masterashh

      masterashh New Member

      Joined:
      Mar 15, 2014
      Messages:
      65
      Likes Received:
      0
      Trophy Points:
      0
      Hi, can I make something about that? Thanks
       
    8. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      For the Utility Error, Loki.Common is now Utilities.
      So Specify the reference otherwise it's ambiguous of which one to use.

      Line 193
      Code:
                  await Coroutine.Sleep(Utility.LatencySafeValue(150));
      Can be changed to

      Code:
                  await Coroutine.Sleep(Loki.Bot.Logic.Bots.OldGrindBot.Utility.LatencySafeValue(150));
      Basically you need to tell the compiler what namespace to use for the method(I think)

      But since typing that Loki.Bot.Logic.Bots.OldGrindBot is a pain in the ass sometimes, you can specify your own reference to that namespace.

      At the Namespace
      Code:
      using SomeCustomName = Loki.Bot.Logic.Bots.OldGrindBot.Utility;
      
      Then you can do
      Code:
                  await Coroutine.Sleep(SomeCustomName.LatencySafeValue(150));
      I'll look into the other error.

      Ok, for the await error, it's basically you calling an async method from a non async method.

      So Line 194 and 200, You need to remove the await.
      Line 194
      Code:
                 await Coroutine.Sleep(SomeCustomName.LatencySafeValue(150));
      
      change to
      Code:
                 Coroutine.Sleep(SomeCustomName.LatencySafeValue(150));
      
      Same thing with line 200

      Then it solves all your issues and it should compile fine.
       
      Last edited: Aug 28, 2015
    9. Unsupported

      Unsupported Member

      Joined:
      Apr 20, 2015
      Messages:
      77
      Likes Received:
      3
      Trophy Points:
      8
      I am not a coder and tried to follow dbf but I am lost lol. Can someone upload a working Plugin for PC?
       
    10. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      You don't have to be, you just need to use the thing between your eyes, in your cranium.
       
    11. masterashh

      masterashh New Member

      Joined:
      Mar 15, 2014
      Messages:
      65
      Likes Received:
      0
      Trophy Points:
      0
      Thanks darkbluefirefly. Working good!

      Thanks spliffermaster for this plugin!
       
    12. masterashh

      masterashh New Member

      Joined:
      Mar 15, 2014
      Messages:
      65
      Likes Received:
      0
      Trophy Points:
      0
      Other problem... When the bot is running...They stuck...
       
    13. refl3xpt

      refl3xpt New Member

      Joined:
      Jul 9, 2015
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      1
      Can you upload your MinionSupportPlugin.cs? I'm having the same problem you had, tried to fix it with the darkbluefirefly instructions but I couldn't make it work.

      Thanks,
      Refl3x
       
    14. babosasa

      babosasa New Member

      Joined:
      Jun 22, 2012
      Messages:
      417
      Likes Received:
      0
      Trophy Points:
      0
      unzipped both folders into /plugins/ but error poped up:

      Compiler Error: warning CS2029: Invalid value for '/define'; '' is not a valid identifier
      Compiler Error: c:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(79,33) : 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:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(193,35) : error CS0104: 'Utility' is an ambiguous reference between 'Loki.Bot.Utility' and 'Loki.Bot.Logic.Bots.OldGrindBot.Utility'
      Compiler Error: c:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(193,43) : error CS0117: 'Loki.Bot.Utility' does not contain a definition for 'LatencySafeValue'
      Compiler Error: c:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(193,13) : error CS4033: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
      Compiler Error: c:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(199,35) : error CS0104: 'Utility' is an ambiguous reference between 'Loki.Bot.Utility' and 'Loki.Bot.Logic.Bots.OldGrindBot.Utility'
      Compiler Error: c:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(199,43) : error CS0117: 'Loki.Bot.Utility' does not contain a definition for 'LatencySafeValue'
      Compiler Error: c:\Users\Xeon2680v2\Desktop\Fireplugin203\Plugins\MinionSupportPlugin\MinionSupportPlugin.cs(199,13) : error CS4033: The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
       
    15. toNyx

      toNyx Well-Known Member

      Joined:
      Oct 29, 2011
      Messages:
      3,770
      Likes Received:
      35
      Trophy Points:
      48
      See There
       
    16. masterashh

      masterashh New Member

      Joined:
      Mar 15, 2014
      Messages:
      65
      Likes Received:
      0
      Trophy Points:
      0
      Hey, I fix that, but have others problems...I can't solve...Sorry.
       
    17. spliffermaster

      spliffermaster Community Developer

      Joined:
      Mar 10, 2014
      Messages:
      56
      Likes Received:
      2
      Trophy Points:
      8
      updated, removed the utility namespace error, thks dfb
       
    18. masterashh

      masterashh New Member

      Joined:
      Mar 15, 2014
      Messages:
      65
      Likes Received:
      0
      Trophy Points:
      0
      Its possible change de Support skill for another?
       
    19. spliffermaster

      spliffermaster Community Developer

      Joined:
      Mar 10, 2014
      Messages:
      56
      Likes Received:
      2
      Trophy Points:
      8
      Like what? More precise....
       
    20. lyvewyre

      lyvewyre Member

      Joined:
      Jan 3, 2013
      Messages:
      418
      Likes Received:
      12
      Trophy Points:
      18
      Hey, trying out your plugin now. Will let you know if I have any feedback.

      Any chance of expanding this to include Vaal Summon Skeletons? With an option to use when encountering rare or save for boss?

      Edit:

      Ok getting this error spammed:

      Code:
      Exception during plugin Tick.System.InvalidOperationException: This function can only be used from within a coroutine
         at Buddy.Coroutines.Coroutine.‏‪‏‬‬​‎‪​‫*‬*‏‎*‪‫‎**‎‬‬‫‪‪​*()
         at Buddy.Coroutines.Coroutine.Sleep(TimeSpan timeout)
         at Buddy.Coroutines.Coroutine.Sleep(Int32 milliseconds)
         at MinionSupportPlugin.MinionSupportPlugin.UseSupportSkillAtPosition(Int32 skillSlot, String skillName, Vector2i pos) in ...Plugins\MinionSupportPlugin\MinionSupportPlugin.cs:line 194
         at MinionSupportPlugin.MinionSupportPlugin.UseSupportSkill(Int32 skillSlot, String skillName) in ...Plugins\MinionSupportPlugin\MinionSupportPlugin.cs:line 182
         at MinionSupportPlugin.MinionSupportPlugin.Tick() in ...Plugins\MinionSupportPlugin\MinionSupportPlugin.cs:line 361
         at Loki.Bot.PluginManager.​*​‪**‎‎‏*‬**‎‪‬*‬**​‫​​‪*‪(lPlugin )
      
      Only minions I have are zombies and a flame golem (matched up its skill slot correctly, as it summons it), with flesh offering ticked as well.

      After I got this error I edited the .cs file on line 194 to go from "Coroutine.Sleep(Utility.LatencySafeValue(150));" to "Coroutine.Sleep(Loki.Bot.Logic.Bots.OldGrindBot.Utility.LatencySafeValue(150));" as per DBF comments earlier, but it is still the same error.

      It seems to only get this error after it casts flesh offering.
       
      Last edited: Aug 30, 2015

    Share This Page