Unforunately, i couldnt use it. Situatoion is more complicated. I really hope for your help. Can you help me with my shitcode, please? I dont know how to implement comments. Im going to use Quester for my plan, thanks and sorry for bad English.
public class Ninja
{
//how can I check it?
bool isVanishReady = true;
//how can I check it?
bool isCombat;
//how can I check it?
bool amIOpening;
int chestId = 42;
void LookingForTheChest()
{
if (isCombat)
{
//use vanish. How can send to game some bind like "shift + V"?
//sleep 2000
}
if (isCombat == false && isVanishReady && IsAnyoneNearMe() == false && amIOpening == false)
{
LootTheChest();
}
}
void LootTheChest()
{
//lets check chest, maybe it looted already
//if no chest i need to go to the next step
}
bool IsAnyoneNearMe()
{
//get mobs around
List<WoWUnit> mobsNearMe = ObjectManager.GetWoWUnitHostile();
//anyone near me?
foreach(WoWUnit u in mobsNearMe)
{
if (ObjectManager.Me.Position.DistanceTo2D(u.Position) < 30)
{
return true;
}
}
// ok, fine, there are no mobs near me, lets check where is patrol
foreach (WoWUnit u in mobsNearMe)
{
//how to check by id? im using DisplayID, dont know what is it, but i hope you will help
if (u.DisplayId == 2017 && ObjectManager.Me.Position.DistanceTo2D(u.Position) < 100 )
{
return true;
}
}
//so cool, patrol are so far and no one near me, time to loot the chest
return false;
}
}