Jump to content

check if know profession skill

Recommended Posts

Hello ?

Is it possible to check if the character know a specific profession skill?

for example:

!wManager.Wow.Helpers.SpellManager.KnowSpell(2698) (Recipe Cooked Claw) https://db.rising-gods.de/?item=2698#sold-by-npc

It works fine for class spells but not for professions skills. 


Can someone help me there please?

Link to comment
Share on other sites

Thank you for your response.

I already use SkillLine for the While Conditions. Is there another option to check if the char knows the profession skill? Because if I restart the bot the char goes to the trainer until the while condition is finished.

    <QuestsSorted Action="While" NameClass="Skill.GetValue(SkillLine.Cooking) &lt; 225" />
    <QuestsSorted Action="RunCode" NameClass="wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(&quot;Raptor Flesh&quot;);" />
    <QuestsSorted Action="RunLuaCode" NameClass="DEFAULT_CHAT_FRAME:AddMessage(&quot;|cFFFFCE2ETramBot|r Farm Raptor Flesh&quot;)" />
    <QuestsSorted Action="Pulse" NameClass="RaptorFlesh" />
    <QuestsSorted Action="RunLuaCode" NameClass="DEFAULT_CHAT_FRAME:AddMessage(&quot;|cFFFFCE2ETramBot|r Learn Skill Roast Raptor&quot;)" />
    <QuestsSorted Action="Pulse" NameClass="BuyRecipeRoastRaptor" />
    <QuestsSorted Action="RunMacroLua" NameClass="/use Recipe: Roast Raptor" />
    <QuestsSorted Action="RunLuaCode" NameClass="DEFAULT_CHAT_FRAME:AddMessage(&quot;|cFFFFCE2ETramBot|r Cook Roast Raptor&quot;)" />
    <QuestsSorted Action="Pulse" NameClass="Roast Raptor" />
    <QuestsSorted Action="RunCode" NameClass="wManager.Wow.Bot.States.ToTown.ForceToTown = true;" />
    <QuestsSorted Action="EndWhile" NameClass="" />

Link to comment
Share on other sites

For example this works fine.


    <QuestsSorted Action="While" NameClass="!wManager.Wow.Helpers.SpellManager.KnowSpell(18260)" />
    <QuestsSorted Action="RunLuaCode" NameClass="DEFAULT_CHAT_FRAME:AddMessage(&quot;|cFFFFCE2ETramBot|r Learn Artisan Cook&quot;)" />
    <QuestsSorted Action="RunCode" NameClass="wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(-8610.9, 364.64, 99.62309), 5482, 1, false);" />
    <QuestsSorted Action="RunLuaCode" NameClass="BuyTrainerSkill(&quot;Artisan Cook&quot;)" />
    <QuestsSorted Action="RunCode" NameClass="SpellManager.UpdateSpellBook();" />
    <QuestsSorted Action="EndWhile" NameClass="" />

Link to comment
Share on other sites

Thank you. But does it work for recipes for a profession?
 I got this codes for the beginning and it works fine.

    <QuestsSorted Action="While" NameClass="!Skill.Has(SkillLine.Cooking)" />
    <QuestsSorted Action="RunLuaCode" NameClass="DEFAULT_CHAT_FRAME:AddMessage(&quot;|cFFFFCE2ETramBot|r Learn Apprentice Cooking&quot;)" />
    <QuestsSorted Action="RunCode" NameClass="wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(-9466.99, -4.53396, 56.9501), 1430, 1, false);" />
    <QuestsSorted Action="RunLuaCode" NameClass="BuyTrainerSkill(&quot;Apprentice Cook&quot;)" />
    <QuestsSorted Action="RunCode" NameClass="SpellManager.UpdateSpellBook();" />
    <QuestsSorted Action="EndWhile" NameClass="" />

Do you mean something like this?

 <QuestsSorted Action="While" NameClass="!Skill.Has("Cooking", "Roast Raptor")" />

  <QuestsSorted Action="EndWhile" NameClass="" />


 <QuestsSorted Action="While" NameClass="!Skill.Has("Roast Raptor")" />

  <QuestsSorted Action="EndWhile" NameClass="" />


Unfortunately both codes are not working.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...