What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How to get the position of an item which is placed in the currency stash tab?

Heilmann

Member
Joined
Feb 7, 2010
Messages
61
Hello community,

I'm currently playing around with the API of Exilebuddy and I'm trying to do some basic actions like 6-linking, 6-socketing and color changing.

What do I want to do?
- I want to use a "Jeweller's Orb" on an item which is placed in the currency stash tab.


Here is the code so far (for DevTab):
Code:
using System;
using log4net;
using Loki.Bot;
using Loki.Common;
using Loki.Game;
using EXtensions;
using EXtensions.CachedObjects;
using InventoryUi = Loki.Game.LokiPoe.InGameState.InventoryUi;
using StashUi = Loki.Game.LokiPoe.InGameState.StashUi;

public class MyClass
{
    private static readonly ILog Log = Logger.GetLoggerInstanceForType();

    public void Execute()
    {
        using(LokiPoe.AcquireFrame())
        {
            //Start crafting sockets
            var counterSockets = 0;
            var item = StashUi.CurrencyTab.CraftingSlot.CurrencyTabItem;
            Log.DebugFormat("[Crafter] Start crafting sockets");
            while (counterSockets < 1)
            {
                //use Jewellers on item
                var control = Inventories.GetControlWithCurrency(CurrencyNames.Jeweller);
                control.PickItemToCursor(true);
                InventoryUi.InventoryControl_Main.PlaceItemFromCursor(item.LocationTopLeft);
                counterSockets++;
                Log.DebugFormat(item.SocketCount.ToString());
            }
        }
    }
}

Output of Exilebuddy Debug window:
LokiPoe.ProcessHookManager.Enable pressed.
[Crafter] Start crafting sockets
[PickItemToCursor] Now going to pick "Jeweller's Orb" to cursor.
[PlaceItemFromCursor] Now going to place "Jeweller's Orb" from cursor to {28, 0}.

[PlaceItemFromCursor] Destination item is null.
2

Questions:
1. How do I get the correct position of the item which is placed in the currency stash tab?
2. Since Visual Studio is showing me that "'InventoryControlWrapper.CurrencyTabItem' is obsolete" what else should be used?

Kind Regards
Heilmann


 
Last edited:
You don't pick item to cursor but Use it (orb) and the item in curr tab has its own wrapper, so you have to retrieve it using stashui.
 
You don't pick item to cursor but Use it (orb) and the item in curr tab has its own wrapper, so you have to retrieve it using stashui.

Thanks toNyx.

Code:
//use Jewellers on item
            var control = Inventories.GetControlWithCurrency(CurrencyNames.Jeweller);
            control.UseItem();
            StashUi.CurrencyTab.CraftingSlot.ApplyCursorTo();
            counterSockets++;
            Log.DebugFormat(item.SocketCount.ToString());

It's working now, but is it the correct way?
 
Thanks toNyx.

Code:
//use Jewellers on item
            var control = Inventories.GetControlWithCurrency(CurrencyNames.Jeweller);
            control.UseItem();
            StashUi.CurrencyTab.CraftingSlot.ApplyCursorTo();
            counterSockets++;
            Log.DebugFormat(item.SocketCount.ToString());

It's working now, but is it the correct way?

Looks good to me, not sure what is the counterSockets++ but i guess you wanna count the number of attempts. Else yes, looks like the good way ;)
 
Maan i hope u gonna make it work, and hopefully you gonna share your plugin =) don't forget to check item base level coz only items above lvl50+ can be 6 socketed /linked
 
Back
Top