Jump to content

Bot doesn't loot while executing code.


Artek

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

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...