Jump to content

Click On Terrain (Rightclick)


Gargaroth95

Recommended Posts

Hello community,

can anyone tell me, if it's possible to rightclick on a specific position?

ClickOnTerrain.Pulse(new Vector3(1738.88, -1184.93, 59.2689));   --> But instead a rightclick?


Thank you!

Link to comment
Share on other sites

You can do  a few different ways my friend.. Heres a few examples. Prepare yourself for an Above and Beyond answer...

 

Your best bet is to use this code i made for several quests requireing the same exact thing - Using harvest is a good option when wanting to click on stuff, otherwise you need to add an objectid and itemid if your using an item.

// Go to specific location, and Useitem on Object and Harvest + Quest required (RunCode) - me

var pos = new Vector3(-2496.714f, -1632.943f, 91.73521f);
uint itemId = 15710;
int objectId = 177644;
int questId = 6002;

wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(pos, objectId);

Thread.Sleep(Usefuls.Latency + 10000);

if (Quest.HasQuest(questId))
{
     ItemsManager.UseItem(itemId);
	wManager.wManagerSetting.CurrentSetting.ListHarvest.Add(177644);
}

 

       // This will search the area for a specific Item or w.e. and click on the ground to interact with it.

            WoWGameObject andoido = wManager.Wow.ObjectManager.ObjectManager.GetObjectWoWGameObject().FirstOrDefault(i => i.Entry == 148917);
            if (andoido != null)
            {
                wManager.Wow.Helpers.Interact.InteractGameObject(andoido.GetBaseAddress);
            }

 

This one will interact with NPC who is Dead on the ground. Can be used in situations for clicking and what not - If you wish to cast a spell, you can add an uint spellId.

wManager.Events.InteractEvents.OnInteractPulse += (target, cancelable) =>
{
    var t = wManager.Wow.ObjectManager.ObjectManager.GetObjectByGuid(target);
    if (!t.IsValid)
        return;
    var e = t.Entry;
    if (e == 21859 || e == 21846)
    {
        System.Threading.Tasks.Task.Run(delegate {
            System.Threading.Thread.Sleep(wManager.Wow.Helpers.Usefuls.Latency + 100);
            wManager.Wow.Helpers.ClickOnTerrain.Item(31769, t.Position);
        });
    }
};

 

And lastely, this code you can specify wether or not you have an item < or > than. (change latency to like 3,000 or something.

// RunCode - Interact with ObjectID - Gather Object RunCode

var pos = new Vector3(199.9151f, 3472.976f, 63.24443f);
int objectId = 184115 ;

wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(pos, objectId);

Thread.Sleep(Usefuls.Latency + 10000);

if(ItemsManager.GetItemCountById(23339) < 1)
{
wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(pos, objectId);

Thread.Sleep(Usefuls.Latency + 10000);
}

 

Edited by Andoido
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...