-
Thedrah
- Posts: 943
- Joined: Fri Apr 08, 2011 2:20 am
- Location: behind you
Re: Purus Pasta Client [Now with botting API!]
could you add auto log in? or to automatically load a script on run of the client
▲
▲ ▲
▲ ▲
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Purus Pasta Client [Now with botting API!]
What does this mean?Thedrah wrote:could you add auto log in?
You want it to automatically select an account on startup?
I dont think that clicking the button on left is too tedious thing to do when logging on.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
Thedrah
- Posts: 943
- Joined: Fri Apr 08, 2011 2:20 am
- Location: behind you
-
danklord
- Posts: 9
- Joined: Mon Jul 28, 2014 12:19 pm
Re: Purus Pasta Client [Now with botting API!]
Not sure if I'm doing something wrong with the api, but I cannot get an action to select using the below snippet.
This for example won't start a mine action though the rest of the bot before and after it run fine causes no errors, not sure if I'm just misunderstanding how to call this function or if there is some trick to using it or just a bug. Looking at the api leads me to believe you just pass it a string with one of the example actions you provided.
Code: Select all
PBot.doAct("mine");-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Purus Pasta Client [Now with botting API!]
There was indeed a small issue with it, which is fixed now. Will soon release the fix.danklord wrote:Not sure if I'm doing something wrong with the api, but I cannot get an action to select using the below snippet.
This for example won't start a mine action though the rest of the bot before and after it run fine causes no errors, not sure if I'm just misunderstanding how to call this function or if there is some trick to using it or just a bug. Looking at the api leads me to believe you just pass it a string with one of the example actions you provided.Code: Select all
PBot.doAct("mine");
--------------
Purus pasta version 3.5.1 released!
- Latest merges from Amber & Default client
- Fix to doAct in PBot API

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
danklord
- Posts: 9
- Joined: Mon Jul 28, 2014 12:19 pm
Re: Purus Pasta Client [Now with botting API!]
Sweet thanks, works great now! Could use a left click gob command like the right click one on the taking suggestions front if possible. Can't find a way to use lift to pick up items, tried below and a few other random things.shubla wrote:There was indeed a small issue with it, which is fixed now. Will soon release the fix.danklord wrote:Not sure if I'm doing something wrong with the api, but I cannot get an action to select using the below snippet.
This for example won't start a mine action though the rest of the bot before and after it run fine causes no errors, not sure if I'm just misunderstanding how to call this function or if there is some trick to using it or just a bug. Looking at the api leads me to believe you just pass it a string with one of the example actions you provided.Code: Select all
PBot.doAct("mine");
--------------
Purus pasta version 3.5.1 released!
- Latest merges from Amber & Default client
- Fix to doAct in PBot API
Code: Select all
PBot.doAct("carry");
var holdGobCoords = PBot.getCoords(selectedGob);
PBot.pfLeftClick(holdGobCoords.x, holdGobCoords.y);-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Purus Pasta Client [Now with botting API!]
You can use doClickdanklord wrote:Sweet thanks, works great now! Could use a left click gob command like the right click one on the taking suggestions front if possible. Can't find a way to use lift to pick up items, tried below and a few other random things.shubla wrote:There was indeed a small issue with it, which is fixed now. Will soon release the fix.danklord wrote:Not sure if I'm doing something wrong with the api, but I cannot get an action to select using the below snippet.
This for example won't start a mine action though the rest of the bot before and after it run fine causes no errors, not sure if I'm just misunderstanding how to call this function or if there is some trick to using it or just a bug. Looking at the api leads me to believe you just pass it a string with one of the example actions you provided.Code: Select all
PBot.doAct("mine");
--------------
Purus pasta version 3.5.1 released!
- Latest merges from Amber & Default client
- Fix to doAct in PBot API
Code: Select all
PBot.doAct("carry"); var holdGobCoords = PBot.getCoords(selectedGob); PBot.pfLeftClick(holdGobCoords.x, holdGobCoords.y);
Code: Select all
PBot.doClick(gob, 1, 0);
I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
danklord
- Posts: 9
- Joined: Mon Jul 28, 2014 12:19 pm
Re: Purus Pasta Client [Now with botting API!]
Don't know how I missed that, thanks for the release though has been a blast writing stuff for it.shubla wrote:Code: Select all
PBot.doClick(gob, 1, 0);
-
shubla
- Posts: 13041
- Joined: Sun Nov 03, 2013 11:26 am
- Location: Finland
Re: Purus Pasta Client [Now with botting API!]
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.shubla wrote:Code: Select all
PBot.doClick(gob, 1, 0);
And what is not, so it could be made possible.

I'm not sure that I have a strong argument against sketch colors - Jorb, November 2019
http://i.imgur.com/CRrirds.png?1
Join the moderated unofficial discord for the game! https://discord.gg/2TAbGj2
Purus Pasta, The Best Client
-
danklord
- Posts: 9
- Joined: Mon Jul 28, 2014 12:19 pm
Re: Purus Pasta Client [Now with botting API!]
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.shubla wrote:Code: Select all
PBot.doClick(gob, 1, 0);
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.
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);
}