shubla wrote:danklord wrote:shubla wrote:
- Code: Select all
PBot.doClick(gob, 1, 0);
Don't know how I missed that, thanks for the release though has been a blast writing stuff for it.
Would be interesting to know what kind of stuff is possible to do with API.
And what is not, so it could be made possible.
So far seems with nashorn and a bit of time you can do anything really, long as you have class instances to work with can call anything from the haven client directly pretty easily.
For example I was messing with this to get details off items outside the PBot api calls(like getname getid ect) which uses the WItem Class passed from the api -> GItem Class -> Quality Class -> Quality Value.
- Code: Select all
var containers = ["branch"];
var items = PBot.getInventoryItemsByNames(PBot.playerInventory(), containers);
for(var i=0; i<items.length; i++) {
PBot.sysMsg(items[i].item.getname(), 255, 102, 0);
PBot.sysMsg(items[i].item.quality().q, 255, 102, 0);
PBot.sysMsg("------", 255, 102, 0);
}
I'll post anything else as I figure other stuff out, but its a pretty cool system and leaves the door open to alot of stuff outside of the api if you have the time to figure it out.