Jump to content

Bot doesn't loot while executing code.


Artek
 Share

Recommended Posts

So i started to play with code a little bit, but im just a beginner so for now im trying to edit/rearrange someone else code.
I dont understand why my bot doesn't loot mobs. In the other profile its looting normally and what i did here to be honest i just replaced few things like: Position where bot should go, mob which bot should kill, item that should be looted to acomplish a task.

If i got item in my backpack bot doesnt go after mob and that is of course correct.
it's not any setting in wrobot itself, because if i kill the mobs with grinder or just with wrotation, bot loots mobs

 

wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(5178.439f, -63.72389f, 360.272f));
while (!Quest.IsObjectiveComplete(1, 13675))
	if (ItemsManager.GetItemCountById(45005) < 1)
	{
		wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(5178.439f, -63.72389f, 360.272f));
		foreach (WoWUnit everblaze in ObjectManager.GetWoWUnitByEntry(33289))
		{
			Fight.StartFight(everblaze.Guid);
			while (ObjectManager.Me.InCombat)
			{
				Fight.StartFight(ObjectManager.GetNearestWoWUnit(ObjectManager.GetUnitAttackPlayer()).Guid);
			}
			if (ItemsManager.GetItemCountById(31347) > 0)
			{
				break;
			}
		}
	}
	
return true;// This code is executed with 'Pulse' action, don't forget to return true or false.
return true;

 

Link to comment
Share on other sites

the problem your having is the while loop keep going which overrides normal wrobot state and just attacks mobs. use something like this.

 

 return ItemsManager.GetItemCountById(45005) == 1; //Complete Condition

        //overridepulse
        wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(5178.439f, -63.72389f, 360.272f));
            foreach (WoWUnit everblaze in ObjectManager.GetWoWUnitByEntry(33289))
            {
                if (!Fight.InFight)
                {
                    Fight.StartFight(everblaze.Guid);
                }

            }
        return true;

also using while loops can make many problems if you do not use them the right way. 

if youd like i can teach you how to make quester profiles a lot better, Dm me if you have any questions. i am here to help!

 

Link to comment
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.

 Share

×
×
  • Create New...