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

How to disenchant items in profile?

qyryl

New Member
Joined
Oct 8, 2016
Messages
9
Reaction score
1
Hey guys, I got a question.

I'm writing a profile, and I'd like to have it disenchant all disenchantable items it finds. Does anyone happen to know the specific lines of code for that?
I could run a webscraper on wowhead to make a list of all items it could find, but if anyone knows a line of code that disenchants ANYTHING, that'd be amazing.

Thanks for the help guys. Peace out.
 
Hey guys, I got a question.

I'm writing a profile, and I'd like to have it disenchant all disenchantable items it finds. Does anyone happen to know the specific lines of code for that?
I could run a webscraper on wowhead to make a list of all items it could find, but if anyone knows a line of code that disenchants ANYTHING, that'd be amazing.

Thanks for the help guys. Peace out.

maybe this will work.

Code:
<DisenchantAction ActionType="Disenchant" ItemTarget="All" ItemQuality="Uncommon" ItemId="0" />
<DisenchantAction ActionType="Disenchant" ItemTarget="All" ItemQuality="Rare" ItemId="0" />
 
Last edited:
Does this work? I'd love to know. I wonder if this could be made into a plugin...
 
It mostly depends on what sort of profile you're dealing with.

For the Questing botbase, you could easily write in a disenchant logic with the DoWhen hook.
Here's an example of having it disenchant all greens that you pick up:
PHP:
<CustomBehavior File="RunCode" Type="Definition" ><![CDATA[ 
	public static bool HaveGreen() 
	{ 
		bool HaveItem = Me.BagItems.Any(item => item.Quality == WoWItemQuality.Uncommon && item.RequiredEnchantingLevelToDisenchant <= StyxWoW.Me.GetSkill(333).CurrentValue);
		return HaveItem;
	} 

	public static async Task DisenchantGreens() 
	{ 
		var disenchantList = Me.BagItems.Where(item => item.Quality == WoWItemQuality.Uncommon && item.RequiredEnchantingLevelToDisenchant <= StyxWoW.Me.GetSkill(333).CurrentValue);
		foreach (WoWItem disenchantMe in disenchantList) 
		{ 
			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>


Or, if you want it in plugin form - that's possible as well.
Here's an example of a plugin that will disenchant all greens, blues and purples that you have in your inventory:

 
Last edited:
It mostly depends on what sort of profile you're dealing with.

For the Questing botbase, you could easily write in a disenchant logic with the DoWhen hook.
Here's an example of having it disenchant all greens that you pick up:
PHP:
<CustomBehavior File="RunCode" Type="Definition" ><=!=[=C=D=A=T=A=[ 
	public static bool HaveGreen() 
	{ 
		bool HaveItem = Me.BagItems.Any(item => item.Quality == WoWItemQuality.Uncommon && item.RequiredEnchantingLevelToDisenchant <= StyxWoW.Me.GetSkill(333).CurrentValue);
		return HaveItem;
	} 

	public static async Task DisenchantGreens() 
	{ 
		var disenchantList = Me.BagItems.Where(item => item.Quality == WoWItemQuality.Uncommon && item.RequiredEnchantingLevelToDisenchant <= StyxWoW.Me.GetSkill(333).CurrentValue);
		foreach (WoWItem disenchantMe in disenchantList) 
		{ 
			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>


Or, if you want it in plugin form - that's possible as well.
Here's an example of a plugin that will disenchant all greens, blues and purples that you have in your inventory:



Thanks for this although it gets stuck when it tried to disenchant something it cannot
 
Back
Top