Scrifen -- Hafen scripting API

Forum for alternative clients, mods & discussions on the same.

Re: Scrifen -- Hafen scripting API

Postby Peonaz3 » Mon May 23, 2016 7:33 am

I am reading all this, and feeling like an idiot in math class. Some problems just don't go away :(
For some reason I can't even make this client to work, getting black screen, could someone give a clue?

Prompt drops some java errors, or something like "unable to access haven.jar".

What I did :

1. Installed latest java
2. Run as administrator
3. Made sure no shit is read only

Should I compile source on my own on my machine?

USER WAS WARNED FOR THIS POST
Last edited by Granger on Mon May 23, 2016 10:17 am, edited 2 times in total.
Reason: hate speech, replaced with something more sensible (in bold)
Peonaz3
 
Posts: 69
Joined: Sat Jun 29, 2013 11:27 am

Re: Scrifen -- Hafen scripting API

Postby Kuczmik » Mon May 23, 2016 9:16 am

Peonaz3 wrote:[...]


Did you unblock all those files from client?
Last edited by Granger on Mon May 23, 2016 10:18 am, edited 1 time in total.
Reason: fullquote of moderated post removed
User avatar
Kuczmik
 
Posts: 4
Joined: Tue Apr 26, 2016 3:20 pm

Re: Scrifen -- Hafen scripting API

Postby Thedrah » Mon May 23, 2016 9:57 am

Peonaz3 wrote:[...]


do you have a script.js file? use the example one in the opening post and modify it
i get an empty black screen when i delete the script.js file

if that doesn't help, can you run the amber client?
Last edited by Granger on Mon May 23, 2016 10:18 am, edited 1 time in total.
Reason: fullquote of moderated post removed
  ▲
▲ ▲
Thedrah
 
Posts: 936
Joined: Fri Apr 08, 2011 2:20 am
Location: behind you

Re: Scrifen -- Hafen scripting API

Postby Peonaz3 » Mon May 23, 2016 10:12 am

Thedrah wrote:
Peonaz3 wrote:[...]


do you have a script.js file? use the example one in the opening post and modify it
i get an empty black screen when i delete the script.js file

if that doesn't help, can you run the amber client?


That was it, thanks! :)

To the author - you are doing God's work. Adding features to game, that supposed to be part of the core.
Last edited by Granger on Mon May 23, 2016 10:18 am, edited 1 time in total.
Reason: fullquote of moderated post removed
Peonaz3
 
Posts: 69
Joined: Sat Jun 29, 2013 11:27 am

Re: Scrifen -- Hafen scripting API

Postby kacper022 » Tue May 24, 2016 11:05 am

How can I get seed from Cupboard because function: " g.transferItemFrom('Cupboard', '50 seeds of Barley'); " doesn't work.
kacper022
 
Posts: 4
Joined: Fri Feb 24, 2012 6:38 pm

Re: Scrifen -- Hafen scripting API

Postby Glorthan » Tue May 24, 2016 12:19 pm

kacper022 wrote:How can I get seed from Cupboard because function: " g.transferItemFrom('Cupboard', '50 seeds of Barley'); " doesn't work.

You can find the name of the objects in your inventory with getInvItems(), and the names of objects in a container with getItemsFrom(windowName) (I think - haven't used the latter yet).

Using this seeds are listed as 'seed-barley'. Perhaps a quantity field for stackable items could be implemented. ;)
Glorthan
 
Posts: 1099
Joined: Tue Jun 11, 2013 4:33 pm

Re: Scrifen -- Hafen scripting API

Postby LostJustice » Tue May 31, 2016 5:45 am

A friend and I been using the scrifen API to write java scripts for automating almost every task we could think of into one script. It has gotten so advance that we made multiple java scripts for each bot then a compiler/appending jar file is ran at the start to append all the scripts together under one file called "script.js" which is what is run on run time. We even have a special jar that inputs the login and password into the script on start up based on a GUI so we can pick which accounts to use at start up. In other words, we really love the abilities and possibilities that this API offers and are expanding more onto this. Once we get further in, I think I will post a github link to all the stuff we are using so people can add to it as well.

However, we have a few small issues that we keep running into. There are a few notable bugs with the way the AI runs especially with pathing. If you are carrying an object like a boat or a log, the game for some reason doesn't count that as walking. Also, we know this is mentioned in the code but being able to get a brand new list of animals, trees, and other objects each time that method is called rather when the game calls it would be useful. Also a way to test whether an object is still there or not like after you chop a tree or something similar. If you could add these in, it would be much appreciated.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Scrifen -- Hafen scripting API

Postby shubla » Tue May 31, 2016 10:46 am

LostJustice wrote:A friend and I been using the scrifen API to write java scripts for automating almost every task we could think of into one script. It has gotten so advance that we made multiple java scripts for each bot then a compiler/appending jar file is ran at the start to append all the scripts together under one file called "script.js" which is what is run on run time. We even have a special jar that inputs the login and password into the script on start up based on a GUI so we can pick which accounts to use at start up. In other words, we really love the abilities and possibilities that this API offers and are expanding more onto this. Once we get further in, I think I will post a github link to all the stuff we are using so people can add to it as well.

However, we have a few small issues that we keep running into. There are a few notable bugs with the way the AI runs especially with pathing. If you are carrying an object like a boat or a log, the game for some reason doesn't count that as walking. Also, we know this is mentioned in the code but being able to get a brand new list of animals, trees, and other objects each time that method is called rather when the game calls it would be useful. Also a way to test whether an object is still there or not like after you chop a tree or something similar. If you could add these in, it would be much appreciated.

PF is from romovs Client. He hs Said that of will be improved when New coord System comes out.
Image
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
User avatar
shubla
 
Posts: 13041
Joined: Sun Nov 03, 2013 11:26 am
Location: Finland

Re: Scrifen -- Hafen scripting API

Postby LostJustice » Tue May 31, 2016 9:12 pm

shubla wrote:
LostJustice wrote:A friend and I been using the scrifen API to write java scripts for automating almost every task we could think of into one script. It has gotten so advance that we made multiple java scripts for each bot then a compiler/appending jar file is ran at the start to append all the scripts together under one file called "script.js" which is what is run on run time. We even have a special jar that inputs the login and password into the script on start up based on a GUI so we can pick which accounts to use at start up. In other words, we really love the abilities and possibilities that this API offers and are expanding more onto this. Once we get further in, I think I will post a github link to all the stuff we are using so people can add to it as well.

However, we have a few small issues that we keep running into. There are a few notable bugs with the way the AI runs especially with pathing. If you are carrying an object like a boat or a log, the game for some reason doesn't count that as walking. Also, we know this is mentioned in the code but being able to get a brand new list of animals, trees, and other objects each time that method is called rather when the game calls it would be useful. Also a way to test whether an object is still there or not like after you chop a tree or something similar. If you could add these in, it would be much appreciated.

PF is from romovs Client. He hs Said that of will be improved when New coord System comes out.


I figured it was from there. If there is a possible way to directly edit this path finding system via java script that would be a much better solution in my honest opinion.
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

Re: Scrifen -- Hafen scripting API

Postby LostJustice » Sat Jun 04, 2016 5:48 am

Possibility to add a left click location or object option? I can't remove stumps as of currently with this API :(
Image
User avatar
LostJustice
 
Posts: 677
Joined: Sun Mar 25, 2012 3:57 am

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 37 guests