cereeal 0 Posted May 18, 2019 Share Posted May 18, 2019 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 More sharing options...
Droidz 2738 Posted May 18, 2019 Share Posted May 18, 2019 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 More sharing options...
cereeal 0 Posted May 19, 2019 Author Share Posted May 19, 2019 Thanks Droidz. I tried your code. I don't see the "UseItem(itemId);" anywhere in the log. I attached it to be sure I am not missing something. 19 May 2019 03H29.log.html Link to comment https://wrobot.eu/forums/topic/11250-leave-our-mark/#findComment-53772 Share on other sites More sharing options...
cereeal 0 Posted May 19, 2019 Author Share Posted May 19, 2019 I solved it by creating two quests. One KillAndLoot to kill the NPCs and one InteractWithNPC to use the item on the dead mobs. I pulse them both and it works. Link to comment https://wrobot.eu/forums/topic/11250-leave-our-mark/#findComment-53801 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now