With nashorn you can indeed call basically all client functions quite easily.danklord wrote: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.shubla wrote:Would be interesting to know what kind of stuff is possible to do with API.danklord wrote: Don't know how I missed that, thanks for the release though has been a blast writing stuff for it.
And what is not, so it could be made possible.
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.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.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); }
PBotAPI is there just to clear things up.
