Jump to content
This site uses cookies! Learn More

This site uses cookies!

By continuing to use this site, you agree to allow us to store cookies on your computer. :)

Recommended Posts

How can i make the Bot walk to a specific location in the Questeditor using FullCSharpCode.

 

I tried this. But the Bot then walks to this Position even when This step is not active.

public sealed class TheEmblazonedRunebladeForge : QuestClass
{
    public TheEmblazonedRunebladeForge()
    {
        Name = "The Emblazoned Runeblade";
        
        QuestId.Add (12619);

        Step.AddRange(new[] { 1, 0, 0, 0, 0 });
        
           GoToTask.ToPosition(new robotManager.Helpful.Vector3(2505.567f, -5562.78f, 420.6452f));
            wManager.Wow.Helpers.ItemsManager.UseItem(38607);
            System.Threading.Thread.Sleep(1000 * 11);
    }
}

 

For example. This Snipped is from the DK starting Zone where the Players has to Pick up a Battle-Worn Sword and then use it at the Runeforge.

My Profile starts at the Lich King but before accepting the Quest the Bot runs to "GoToTask.ToPosition(new robotManager.Helpful.Vector3(2505.567f, -5562.78f, 420.6452f));"

Then returns to the LichKing and accepts the Quest.

The same happens for the Quest "The Emblazoned Runeblade" which will be optained from Instructor Razuvious.

 

EDIT : I now tried the following.

Quote

wManager.Wow.Helpers.LongMove.LongMoveGo(new robotManager.Helpful.Vector3(2505.567f, -5562.78f, 420.6452f));   

 

The Bot now keeps just standing still and seems to skip Step 4

Log & Questprofile attched

 

8 Nov 2017 16H59.log.html

[A] 55-62 Deathknight-Start.xml

Share this post


Link to post
Share on other sites

Hello, use quest type "OverridePulseCSharpCode" with the code:

if (!wManager.Wow.Helpers.ItemsManager.HasItemById(38607))
{
    GoToTask.ToPositionAndIntecractWithGameObject(new robotManager.Helpful.Vector3(2491.9, -5636.3, 420.6), 190584);
    System.Threading.Thread.Sleep(1000);
}
else
{
    GoToTask.ToPosition(new robotManager.Helpful.Vector3(2491.9, -5636.3, 420.6));
    wManager.Wow.Helpers.ItemsManager.UseItem(38607);
    MovementManager.StopMove();
    System.Threading.Thread.Sleep(1000 * 11);
}

return true;

Sample: dktest.xml

Share this post


Link to post
Share on other sites
Posted (edited)

I made a custom code for 3rd - 4th quest for DK starting area, here you go if anyone is wondering this quest.

Disclamer : i just learn how to use this method of doing quests less then a hour ago, so if there a random bug, please let me know.

                                                                                                  The Emblazoned Runeblade:

public sealed class TheEmblazonedRuneblade : QuestClass
{
	public TheEmblazonedRuneblade()
	{
		Name = "The Emblazoned Runeblade";
		QuestId.Add(12619);
		Step.AddRange(new[] { 1, 0, 0, 0, 0 });
	}

	public override bool IsComplete()
	{
		return Quest.IsObjectiveComplete(1, QuestId.FirstOrDefault());
	}
	public override bool Pulse()
	{

		if(ItemsManager.HasItemById(38607))
		{
			if(GoToTask.ToPosition(new Vector3(2494.718f, -5640.34f, 420.6466f)))
			{
				ItemsManager.UseItem(38607);
				MovementManager.StopMove();
				Thread.Sleep(1000 * 11);
			}
		}
		GoToTask.ToPositionAndIntecractWithGameObject(new Vector3(2491.9, -5636.3, 420.6), 190584);
		return true;
	}
}

                                                                                                    Runeforging: Preparation For Battle:

public sealed class RuneforgingPreparationForBattle : QuestClass
{
	public RuneforgingPreparationForBattle()
	{
		Name = "The Emblazoned Runeblade";
		QuestId.Add(12842);
		Step.AddRange(new[] { 1, 0, 0, 0, 0 });
		
	}

	public override bool IsComplete()
	{
		return Quest.IsObjectiveComplete(1, QuestId.FirstOrDefault());
	}

	public override bool Pulse()
	{
		ItemsManager.EquipItemByName("Runed Soulblade");
		GoToTask.ToPosition(new Vector3(2507.303f, -5559.092f, 420.6502f));
		if (!Lua.LuaDoString<bool>("return TradeSkillFrame:IsVisible()"))
		{
			SpellManager.CastSpellByNameLUA("Runeforging");
			Craft("Rune of Cinderglacier");
			ItemsManager.UseItem("Runed Soulblade");
			Usefuls.WaitIsCasting();
			Lua.LuaDoString("TradeSkillFrame:Hide()");
			return true;
		}
		return true;
	}

	public static void Craft(string RecipeName)
	{
		Lua.LuaDoString(string.Format(@"
            for i=1,GetNumTradeSkills() do
             local name, _, _, _ = GetTradeSkillInfo(i)
            if (name == '{0}') then
            DoTradeSkill(i)
            end
             end
        ", RecipeName));
	}
}

 

The Endless Hunger:

public sealed class TheEndlessHunger : QuestClass
{
	public TheEndlessHunger()
	{
		Name = "The Endless Hunger";
		QuestId.Add(12848);
		Step.AddRange(new[] { 1, 0, 0, 0, 0 });
	}

	public override bool IsComplete()
	{
		return Quest.IsObjectiveComplete(1, QuestId.FirstOrDefault());
	}
	public override bool Pulse()
	{
		if (ObjectManager.Me.InCombat)
		{
			Fight.StartFight(ObjectManager.Target.Guid);
			return true;
		} 
		GoToTask.ToPositionAndIntecractWithGameObject(new Vector3(2481.146f, -5585.025f, 415.6641f), 191582);
		return true;
	}
}

 

Edited by Smokie

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...