• Visit Rebornbuddy
  • Chance some items

    Discussion in 'Archives' started by hansmeier, Nov 9, 2014.

    1. hansmeier

      hansmeier Member

      Joined:
      Jul 12, 2014
      Messages:
      158
      Likes Received:
      0
      Trophy Points:
      16
      Is there a way to chance specific items automatically and sell them, when they are not Unique? ^^
      (Picking up the white item and selling them should be easy with the Item Filter)
      Have like 500 chances on stock right now and actually do not want to sell them :D
       
    2. maths

      maths New Member

      Joined:
      Jan 11, 2014
      Messages:
      162
      Likes Received:
      0
      Trophy Points:
      0
      you will make greater profit selling them
       
    3. hansmeier

      hansmeier Member

      Joined:
      Jul 12, 2014
      Messages:
      158
      Likes Received:
      0
      Trophy Points:
      16
      Nah I want to chance Gavels and so on (Mjölner still is fucking expensive) :x
       
    4. zamup

      zamup New Member

      Joined:
      Mar 20, 2014
      Messages:
      114
      Likes Received:
      0
      Trophy Points:
      0
      we need pushedx for an example, also looking for this :D
       
    5. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      I don't think it would be too hard to do, just not sure how you would impliment it into the Basicgrindbot. It would have to be a plugin I'm sure, and I think it would be similar on how the bot interacts with iding but instead of a scroll, use chance orbs ? I could be wrong. I will look into this a little later
       
    6. Nepthys

      Nepthys Community Developer

      Joined:
      Oct 13, 2014
      Messages:
      89
      Likes Received:
      1
      Trophy Points:
      0
      I would do it as a task, so it can be timed just before selling. That way your item vendor filters will determine what to do with the items afterwards (sell the bad rares etc) so they don't full all your stash space

      if (!TaskManager.AddBefore(new ChanceOrbsTask(), "SellTask"))
      {
      Log.ErrorFormat("[EquipBetterGear] Add ChanceOrbsTask Before SellTask failed.");
      }


      then make a 'ChanceOrbsTask' with something like this

      var items =
      LokiPoe.InGameState.InventoryPanel.Main.OrderBy(i => i.LocationTopLeft.X)
      .ThenBy(i => i.LocationTopLeft.Y)
      .ToList();

      foreach (var item in items)
      {
      if ( ((item.FullName == "Gavel") || (item.FullName == "Siege Axe")) && (item.Rarity == Rarity.Normal) )
      {
      await Coroutines.OpenInventoryPanel();
      var ErrorUseChanceOrb = LokiPoe.InGameState.InventoryPanel.UseItemOnItemInMainInventory("Orb of Chance", item);
      if (ErrorUseChanceOrb != Loki.Game.LokiPoe.InGameState.UseItemError.None)
      {
      Log.ErrorFormat("[ChanceOrbTask] Use Chance Orb returned => {0}.", ErrorUseChanceOrb);
      }
      }
      }


      this would only work if chance orbs are in your inventory, otherwise look at using this instead: LokiPoe.InGameState.StashPanel.UseItemOnItemInMainInventory(string, Loki.Game.Objects.Item)


      best of luck!


      Free up my time to release more code, help me pay my bills, and be awesome Support Me
       
      Last edited: Dec 24, 2014
    7. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      If you look at pushedx's Chaos Recipe plugin, there is a chance item built in there.
       
    8. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      Little confused on the chaos recipe though or maybe I've just missed the boat on this one. Does it keep track of what you have in your stash and when you have enough pieces, sell to vendor ? and does it do it AFTER a map run / zone run ?
       
    9. hansmeier

      hansmeier Member

      Joined:
      Jul 12, 2014
      Messages:
      158
      Likes Received:
      0
      Trophy Points:
      16
      Srsly?
      Though I still do not have any idea about coding, I think it's just sells items for chance or chaos orbs.
       
    10. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      been looking through it, can't see chance item in there only sell items for chance orbs (rares >60) am I missing it ?
       
    11. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      You are correct lol, I'll get an example for you soon.
       
    12. hansmeier

      hansmeier Member

      Joined:
      Jul 12, 2014
      Messages:
      158
      Likes Received:
      0
      Trophy Points:
      16
      I wanna marry you <3
      Will buy something from g2a in the next few days (dunno what yet though) ^^
       
    13. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Lol. I'll try to get a working example asap, should be tonight if I don't run into issues.
       
    14. zamup

      zamup New Member

      Joined:
      Mar 20, 2014
      Messages:
      114
      Likes Received:
      0
      Trophy Points:
      0
      Thanks a lot! <3
       
    15. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      just letting you guys know this project has started, ran into some issues which I should find a solution to soon.
       
    16. zamup

      zamup New Member

      Joined:
      Mar 20, 2014
      Messages:
      114
      Likes Received:
      0
      Trophy Points:
      0
    17. hansmeier

      hansmeier Member

      Joined:
      Jul 12, 2014
      Messages:
      158
      Likes Received:
      0
      Trophy Points:
      16
      Guess it would have to be like the MapUpgrade stuff in exVault(?)s maprunner stuff.

      Stolen obviously :p
      Code:
      //do upgrade/reroll, if needed
                  if (map.Rarity == Rarity.Normal && MapRunnerSettings.Instance.UpgradeTo != "None")
                  {
                      string orb = MapRunnerSettings.Instance.UpgradeTo == "Magic"
                          ? "Orb of Transmutation"
                          : "Orb of Alchemy";
                      map = StashHelper.UseOrbOnMap(map, orb);
                      if (MapRunnerSettings.Instance.UpgradeTo == "Magic")
                      {
                          map = StashHelper.RerollMagicMap(map);
                      }
                      if (MapRunnerSettings.Instance.UpgradeTo == "Rare")
                      {
                          if (StashHelper.HasBannedAffixes(map)) return true;
                      }
      
                  }
       
    18. darkbluefirefly

      darkbluefirefly Community Developer

      Joined:
      Nov 8, 2013
      Messages:
      1,927
      Likes Received:
      18
      Trophy Points:
      38
      Yup that works with some adjustments.
       
    19. Nixon233

      Nixon233 New Member

      Joined:
      Sep 30, 2013
      Messages:
      320
      Likes Received:
      2
      Trophy Points:
      0
      Yeah, I guess that could work lol but you'd have to compile that I guess correct ?
       
    20. hansmeier

      hansmeier Member

      Joined:
      Jul 12, 2014
      Messages:
      158
      Likes Received:
      0
      Trophy Points:
      16
      hmm, is it possible to enable and disable Itemfilters with a plugin?
      Because then you could do like:
      If nuff (>10) ChanceOrbs then enable ItemFilter DoNotSell:ChanceworthyItems & Pickup:ChanceworthyItems
      Otherwise the Stash would be full in quite little time.
       

    Share This Page