Jump to content

Recommended Posts

I am trying to create a quester profile for the quest Leave our mark:

https://www.wowhead.com/quest=12995/leave-our-mark

 

I have been trying to use the "Use item on dead mob ( after looting)" from Snippets codes for quest profiles. I created the quest profile as KillAndLoot with proper hotspots and mobIds. So far I have this as the quest order:

PickUp > LeaveOurMark (works fine)

RunCode >

Thread t = new Thread(() =>
{
    uint itemId = 42480;
    int questId = 12995;
    while (robotManager.Products.Products.IsStarted)
    {
        if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
        {
            if (!Quest.HasQuest(questId))
                break;
            if (ObjectManager.Target.IsValid && ObjectManager.Target.IsDead)
            {
                ItemsManager.UseItem(itemId);
            }
        }
        Thread.Sleep(500);
    }
});
t.Start();

Pulse > LeaveOurMark

TurnIn > LeaveOurMark

 

The profile just goes to the hotspots, kills the mobs, loots, and moves to next mob. What am I missing here?

Link to comment
https://wrobot.eu/forums/topic/11250-leave-our-mark/
Share on other sites

Hello, try to add log to check if he try to use item or not (before "ItemsM anage r.UseItem (itemId);")

You can also try to use lower "Thread.Sleep" if loot is very fast on your server.

Or you can try this code (not tested):

        wManager.Events.LootingEvents.OnLootSuccessful += delegate(WoWUnit unit)
        {
            uint itemId = 42480;
            int questId = 12995;
            if (Quest.HasQuest(questId))
            {
                ItemsManager.UseItem(itemId);
                Thread.Sleep(50);
                Usefuls.WaitIsCastingAndLooting();
            }
        };

 

Link to comment
https://wrobot.eu/forums/topic/11250-leave-our-mark/#findComment-53758
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...