Jump to content

clicking an item in inventory and to click npc


shannonmaddy

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?
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.
Note: Your post will require moderator approval before it will be visible.

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.

  • Recently Browsing   0 members

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