Jump to content

clicking an item in inventory and to click npc


Recommended Posts

Posted

So, I am a fairly new into writing scripts and I'm kinda stuck at this point. I'm writing a script for personal use and don't intend on releasing this script so no worries. The problem I am at is that I need my bot to click on an item in my inventory and than click an npc. Basically I'm writing my own nature running script and I feel it'd be easier to have my bot click on my noted essence and to click on "Aisles" and than to click on exchange noted essences for Un - noted essence. If anyone knows how I can do this please comment below. Will give the ks to whom ever helps :) thank you! And if you need to, I can/will post my script details so you can examine what I am talking g about.

Posted (edited)

this is the basic, to help you out a little

	public void handleThis()	{
		if (widget is visible)	{
			//handle widget
		}else{
			if (!getInventory().isItemSelected())	{
				getInventory().getItem("name").interact("action");
				sleep(gRandom(400, 100));
			}else{
				NPC npc = getNpcs().closest("name");
				
				if (npc != null)	{
					if (npc.isVisible())	{
						npc.interact(); //no arugment should force left click
					}else{
						//handle visiblity
					}
				}
			}
		}		
	}
Edited by josedpay
Posted

this is the basic, to help you out a little

public void handleThis()	{		if (widget is visible)	{			//handle widget		}else{			if (!getInventory().isItemSelected())	{				getInventory().getItem("name").interact("action");				sleep(gRandom(400, 100));			}else{				NPC npc = getNpcs().closest("name");								if (npc != null)	{					if (npc.isVisible())	{						npc.interact(); //no arugment should force left click					}else{						//handle visiblity					}				}			}		}			}
Ok so this will click on the noted essence in inventory and than click in "Aisles" and than click on exchange to Un noted essence right?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...