• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Random Dev Notes/Updates/Requests

    Discussion in 'Archives' started by pushedx, Jul 28, 2015.

    1. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      To get the TaskManager instance from OldGrindBot now, you simply need to call:

      Code:
      var bot = BotManager.CurrentBot;
      TaskManager taskManager = (TaskManager)bot.Execute("GetTaskManager");
      // check for null, in case the current  bot doesn't implement that logic.
      
      I'll add other random things as requested, as I don't remember all the things people might have been relying on that changed. If you need any help or more info on something, please feel free to ask and I'll get it added as soon as possible. :)
       
    2. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Let me request something then :D

      Lately I've been trying to use Cyclone as it is a really good skill for melee. When monsters are somewhat close to an obstacle the bot refuses to cyclone them because it thinks it is not gonna be able to (hardcoded?).

      I've tried multiple ways to cast Cyclone same for multiple locations and I still encounter this problem every now and then, is there any way to fix this?
       
    3. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      The routine only cares about if it can cast a skill (mana, linked gems to prevent it, and stuff like that). There's some door and LoS checks, but I assume those aren't the issue you're talking about.

      Whether the client actually casts the skill or not, is a totally different issue. Nothing can really be done about that from my side. We don't know if a skill will or won't cast, until you try it and try and determine if it was used or not. You have to work around it by trying locations around your destination to get it to cast in those cases.

      The combat logic you see, is exactly what you get when it comes to OldRoutine. The bot implementation doesn't do anything combat related, as that's all offloaded there.
       
    4. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      I think a know what it is, if you are really close to a monster you need to click behind it with Cyclone. So I guess I should use myPos.GetPointAtDistanceAfterEnd(cachedPosition , B) if the cachedDistance is < A.

      EDIT :
      This helped a bit but there's still some situations that it will not be able to cast Cyclone.

      [​IMG]

      If I was playing by hand I would just target randomly around my character it would eventually cyclone. How could I do this? Calculate a random point within a certain distance of my character?
       
    5. pushedx

      pushedx Moderator Moderator Buddy Core Dev

      Joined:
      Sep 24, 2013
      Messages:
      4,252
      Likes Received:
      290
      Trophy Points:
      83
      Yeap, that's one of the more tricky cases. If you knew where you were going, in terms of a directed explore, you could path find to the next point, and then cyclone along a point in that path instead of caring about the mob itself.

      You might hit some issues around corners or walls though, but that's more due to some limitations we have that can't be overcame yet. I think that'd be better than trying to do it randomly, but you might need the random to handle mobs behind you.

      Basically, you have to find walkable point randomly around you, then do the pathfinds, so just a bunch of calcs.
       
    6. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      Thanks a lot, going to sleep soon, I'll try that when I wake up
       
    7. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      I have another question regarding cyclone. When manually playing you can chain cyclones, you don't even see your character stopping between cyclone casts yet the bot does that which not only slows it down but also looks very botish, is there any way to workaround this?

      EDIT : In other words how can I make the routine constantly hold Cyclone hotkey.
       
    8. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      You can, but you need to make sure;
      In a loop in the CR, for the UseSkill
      1. breaks out of loop if monster is dead, otherwise you will have a bad time
      2. breaks out of loop when you are dead, same as above
      3. other conditions for problems that might occur, IE stuck
      3a. This can be done by doing a timeout after X time.

      I've worked a bit with the Old CR, have yet to see the new one, but I don't think I will need to mess with the CR since I can do CR logic in a plugin now.
       
    9. Peonsson

      Peonsson New Member

      Joined:
      Mar 22, 2014
      Messages:
      10
      Likes Received:
      0
      Trophy Points:
      1
      Crafting strongboxes would be great!
       
    10. tozededao

      tozededao Community Developer

      Joined:
      Jan 15, 2010
      Messages:
      1,225
      Likes Received:
      5
      Trophy Points:
      38
      I was thinking about something similar but I still didn't adventured into the loop idea because I thought it would break something else. It seems to be working fine.

      I even improved my code a bit, if a monster is withing a certain range from me I cast cyclone around my position if they are a bit far it casts on their location, creating a really good Cyclone flow. So far it seems to be working fine.
       
    11. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      It's already possible, someone needs to release a plugin.
       
    12. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Yea, don't forget the checks;
      If Monster is dead, If you are dead, and some other rare cases, but they will occur. This is so we don't run into a loop that won't end.
      Glad to hear it's working.
      I've been doing custom CRs with ranged skills a lot, was going to do a Ice Crash variant with that Dash skill. Looks so fun.
       
    13. WhoKnows

      WhoKnows New Member

      Joined:
      Jul 30, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      1
      Is there a documented list of Item Types for the String value Loki.Game.Objects.Item.Type ?

      I could really use one right now

      Meanwhile, I'm assuming they are the same as the class names from Loki.Game.Objects.Items
       
    14. WhoKnows

      WhoKnows New Member

      Joined:
      Jul 30, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      1
      Is there a better way than this for searching things in stash?
       
    15. WhoKnows

      WhoKnows New Member

      Joined:
      Jul 30, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      1
      since the actual space remaining does not seem available directly, and I need to know how many 1x1 items can still fit in the inventory, I'm currently computing it using
      LokiPoe.InGameState.InventoryPanel.MainInventory.InventorySpacePercent * 5*12 / 100

      I could also have substracted every item size from every item found in the inventory, but it'd seems like I would be duplicating another code snippet's task ;)
       
    16. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Object Explorer exposes all the types you would need in Visual Studio, TBH no documentation is really needed, pushedx's time is needed on more important things.
      Well What you have there is totally going to mess up. You want something like
      Code:
      var searchStashItem = Stash.CurrentTabInventory.FindItemByFullName(itemName);
      opps forgot that Stash is a namespace
      "Stash = Loki.Game.LokiPoe.InGameState.StashPanel;"
       
    17. WhoKnows

      WhoKnows New Member

      Joined:
      Jul 30, 2015
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      1
      But that seems only useful to find one very specific item by name, I'm trying to compute something based on all items in stash meeting some specific criterias such as quality, level requirement, type, etc.

      Some of the ones meeting the criteria will need to be recovered from stash after, which apparently requires being on the same stash tab and using for example FastMove to send them to inventory.

      Searching by name is not useful for me unless it can return all items for further processing.
       
    18. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Should make another tread because this one is used for another purpose. But you want to have a look at
      Coroutines.WithdrawItemsCoroutine();

      The Delegates are what you would process your logic.
       
    19. widds

      widds Member

      Joined:
      Nov 12, 2014
      Messages:
      316
      Likes Received:
      3
      Trophy Points:
      18
      Has there ever been a thought about opening a "Buddy Store" for ExileBuddy? I think one of the reasons why WoW receives so quick of updates for plugins and routines is the ability to offer the product that they spend hundreds of hours building for a fair price. I know myself and probably many would pay someone a few bucks for a much used plugin.. and if it creates an incentive to make new and great plugins we all win.
       
    20. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      There has, and pushedx said he can ask management for us. But most of us CBA to please the masses. I for one can't spend my time managing something like that, where bots will be more profitable for me. I've stated over and over, more people that bots, the less chance of me getting banned. IE bigger sample size for GGG to ban, less the chance of me getting hit, hence why I have plugins made.
       

    Share This Page