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!

Automated disenchanting of all green items in bags

Joined
Apr 8, 2016
Messages
174
I'm looking for a plugin or profile, whether paid or free, that will automatically disenchant all green items in the bags, and ideally pick up all items from mailbox.

I already use Disenchantrix, but unfortunately, it only works with one item that is looted, so if bot picks up dozens of items from mailbox, it doesn't disenchant all those items.

Is there a profile or plugin that does this currently?
 
I'm looking for a plugin or profile, whether paid or free, that will automatically disenchant all green items in the bags, and ideally pick up all items from mailbox.

I already use Disenchantrix, but unfortunately, it only works with one item that is looted, so if bot picks up dozens of items from mailbox, it doesn't disenchant all those items.

Is there a profile or plugin that does this currently?

Yes there is a free buddy store plugin called dienchantrix

Edit-

Sorry I was on my phone- I didn't see the rest of your post.
 
Last edited:
If you're using the Questing botbase, could possibly write up an asynchronous task with RunCode to do so.


Disenchanting Greens
PHP:
<CustomBehavior File="RunCode" Type="Definition" ><![CDATA[
	public static bool HaveGreen()
	{
		if (!SpellManager.CanCast(13262)) return false; //We can let DoWhen handle most of the other stuff like combat/death checks.
		foreach (WoWItem item in StyxWoW.Me.CarriedItems)
		{
			if (item.Quality == WoWItemQuality.Uncommon && item.RequiredEnchantingLevelToDisenchant <= StyxWoW.Me.GetSkill(333).CurrentValue) return true;
		}
		return false;
	}

	public static async Task DisenchantGreens()
	{
		foreach (WoWItem disenchantMe in StyxWoW.Me.CarriedItems)
		{
			if (disenchantMe.Quality == WoWItemQuality.Uncommon && disenchantMe.RequiredEnchantingLevelToDisenchant <= StyxWoW.Me.GetSkill(333).CurrentValue)
			{
				await CommonCoroutines.StopMoving();
				SpellManager.Cast(13262);
				Bots.Professionbuddy.PBLog.Log(System.Windows.Media.Colors.DeepSkyBlue, "[Profile Disenchanter] ", System.Windows.Media.Colors.LightGreen, $"Disenchanting >  {disenchantMe.Name}");
				await Coroutine.Sleep(650);
				disenchantMe.Use();
				await Coroutine.Wait(2000, () => LootFrame.Instance.IsVisible);
				LootFrame.Instance.LootAll();
				await Coroutine.Wait(2000, () => !LootFrame.Instance.IsVisible);
			}
		}
	}
]]>
</CustomBehavior>


<CustomBehavior File="Hooks\DoWhen" LogExecution="false" ActivityName="DisenchantGreens" UseWhen="HaveGreen()">
	<CustomBehavior File="RunCode" Code="await DisenchantGreens()" />
</CustomBehavior>
Just run all this once in the profile. The DoWhen will handle the rest.




Loot Mailbox
PHP:
<CustomBehavior File="RunCode" Type="Definition">
	<![CDATA[
		string getMail = @"
		local numItems,totalItems = GetInboxNumItems() 
		for index=numItems,1,-1 do 
			local _,_,sender,subj,gold,cod,_,itemCnt,_,_,hasText,canReply,IsGM=GetInboxHeaderInfo(index)
			if sender ~= nil and cod == 0 and itemCnt == nil and gold == 0 then
				DeleteInboxItem(index)
			end
			if cod == 0 and ((itemCnt and itemCnt >0) or (gold and gold > 0)) then	
				for i=1,ATTACHMENTS_MAX_RECEIVE do
					if gold and gold >0 then 
						TakeInboxMoney(index) 
					end
					if GetInboxItem(index, i) ~=nil then 
						TakeInboxItem(index, i) 
					end
				end
			end
		end";
	]]>
</CustomBehavior>

------------------------------------------

<CustomBehavior File="RunCode"><![CDATA[ 
	Logging.Write(System.Windows.Media.Colors.Yellow, "[PROFILE]: Going to mailbox location.."); 
	var mailboxPOI = ObjectManager.GetObjectsOfType<WoWGameObject>().FirstOrDefault(x => x.SubType == WoWGameObjectType.Mailbox); 
	while (mailboxPOI != null && !MailFrame.Instance.IsVisible) { 
		if (Me.Location.Distance(mailboxPOI.Location) > 5) { 
			Flightor.MoveTo(mailboxPOI.Location); 
		} 

		else { 
			await CommonCoroutines.StopMoving(); 
			mailboxPOI.Interact(); 
			await Coroutine.Wait(2000, () => MailFrame.Instance.IsVisible); 
		} 
		await Coroutine.Yield(); 
	} 
	]]> 
</CustomBehavior>

------------------------------------------

<While Condition="MailFrame.Instance.HasNewMail || MailFrame.Instance.MailCount &gt; 0" >
	<CustomBehavior File="RunCode" Code="Lua.DoString(getMail); StyxWoW.SleepForLagDuration();"/>
</While>
The first blotch of code assigns "getMail" as a string, which will be used as Lua to loot items out of the mailbox.
You only need to run this once in your profile.

The second blotch of code searches for a mailbox and interacts with it. Use this anytime you're wanting it to open the mailbox.
This code is designed to be universal. Alternatively you can use the InteractWith QuestBehavior to have the bot interact with a single mailbox located at a specific location.

The third blotch of code (the <While/>) will loop the first blotch of code until the mailbox is looted of all items.
 
Last edited:
Thank you very much for helping me with this EchoTiger.

Please bear with me, because I've created my own Grind profiles based on the Questing mode, but I knowing nothing of PHP or running tasks as part of a profile, yet. So could you at least briefly put me in the right direction as to how I can put the code you kindly gave me to use?

I'm already trying to create a blank Questing profile as I write this, and will give it a go, but I fear that I may not figure it out on my own.
 
Oh my God, EchoTiger, it's working!

Well, it was working...until it decided to sell trash and bonus food, then start mailing the greens to assigned mail receiver, instead of disenchanting them. What's up with that?

I was mind-blown when I saw it, really! I didn't even need any extra knowledge, I just deleted the grinding stuff from an existing Grind profile that I made for the Questing botbase, and added the code bits you gave me, the mailbox one first, then then disenchanting, and it started working! Until it stopped to sell, send mail, then stop completely, even though there are green items in the bags! So how can I sort this bit out?

Edit: Please find attached the profile I made with the code you gave me.
 

Attachments

Last edited:
Actually, I just noticed that it was Disenchantrix that was disenchanting all those items, EchoTiger! As usual, it was only disenchanting an item that just makes it into the bags. That's why a few items were disenchanted, but once Disenchantrix was done, because the looting was done, and the mailbox is empty, the profile stopped, because, according it its current state, there was nothing else to do. So basically, the disenchanting part of the code is, for some reason, not working as intended.
 
It seems that you had just posted the mailbox interaction code directly into the profile.
So given that, the code is being ran as soon as you start the profile.

The mailbox interaction code only detects mailboxes around it, so it's best that you move your player toward one prior to running this code using <MoveTo/>
You also need to put the mailbox code where(when) you want it to use the mailbox. eg: After the grind logic terminates.

The disenchant code should be fine because it's ran passively, so it doesn't matter where you put it.
But it looks like there's also nothing in the actual grind area logic, so the bot will most-likely just stop before it can do anything.
 
It seems that you had just posted the mailbox interaction code directly into the profile.
So given that, the code is being ran as soon as you start the profile.

The mailbox interaction code only detects mailboxes around it, so it's best that you move your player toward one prior to running this code using <MoveTo/>
You also need to put the mailbox code where(when) you want it to use the mailbox. eg: After the grind logic terminates.

The disenchant code should be fine because it's ran passively, so it doesn't matter where you put it.
But it looks like there's also nothing in the actual grind area logic, so the bot will most-likely just stop before it can do anything.

Genius! I removed the GrindArea part, and also added a WaitTimer of half an hour, and it's working like a charm now!

Thank you so much EchoTiger. You're my time-saving hero! =)
 
EchoTiger, after using this profile for a while, I discovered 2 issues:

1. It disenchants the green items that my character is wearing! Can this be disabled somehow?

2. It keeps collecting items from the mailbox until the bags are full, thus cannot disenchant at that point. Is it easy to implement a part that makes the bot stop collecting items from the mailbox once it has only 2 free slots?

I'd love to post the profile wherever you think is best once these changes are implemented.
 
Back
Top