Jump to content

Simple Feather Collector By Flewis


flewis

Recommended Posts

Dear all,

 

When learning the OSBOT API/Java I made a simple feather collector script. I just wanted to put the script out there for everyone to use, it's efficient but it could easily be made more efficient if someone wanted to edit the timings just I didn't want to get banned so I made the times quite long and random. 

 

Please remember I wrote this about a week ago in my first 1-2 hours of learning Java and I have got a lot better since then <3

 

Anyway have fun with the script, if you want anything added to it please let me know and I'll see what I can do!!

 

Download - FeatherCollector.jar

Pastebin - https://pastebin.com/nwhamZZF

 

Thank you for downloading!!

 

-Flewis

  • Like 1
Link to comment
Share on other sites

Nice work (: Just a few things, firstly, there's no need to store Player myPlayer() in a variable since you're only using it once. Secondly, I would highly recommend using a conditional sleep after interacting with feathers instead of a static one. This conditional sleep could factor in distance to the feathers to determine the threshold, and look for an inventory gain/amount rise for the condition boolean. This means the script will only sleep for as long as it needs to, and time out and try again if for whatever reason the interaction fails (Also I would recommend making use of the interact methods boolean return). 

You can define a conditional sleep anonymously, or by extending the abstract class with your own class and overriding the method that way. Check out the API: https://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html

-Apa

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, Juggles said:

I see a lot of @Lewis in you. Could be the next big scripter

I hope so, I have big plans for the dungeoneering and summoning skills when they when they release :)

 

2 hours ago, Apaec said:

Nice work (: Just a few things, firstly, there's no need to store Player myPlayer() in a variable since you're only using it once. Secondly, I would highly recommend using a conditional sleep after interacting with feathers instead of a static one. This conditional sleep could factor in distance to the feathers to determine the threshold, and look for an inventory gain/amount rise for the condition boolean. This means the script will only sleep for as long as it needs to, and time out and try again if for whatever reason the interaction fails (Also I would recommend making use of the interact methods boolean return). 

You can define a conditional sleep anonymously, or by extending the abstract class with your own class and overriding the method that way. Check out the API: https://osbot.org/api/org/osbot/rs07/utility/ConditionalSleep.html

-Apa

 

Wow thank you for the advice this is actually game changing, thank you!! This will come in handy when making things like dungeoneering and summoning scripts when the two skills finally release!! <3

 

Again thank you so much!!

 

27 minutes ago, Mumble said:

Congratulations on release!

 

Thank you :) 

Link to comment
Share on other sites

19 minutes ago, HeyImJamie said:

I don't think there's an animation for feathers so your if check is useless. I assume you've learned that since then though as this was your first script? :P 

Oh no it's testing if they player is animating (moving) not the feather. Just look over the pastebin again, dw though I definitely knew that even from the beginning!! Thanks for the advice anyway though <3

 

Edited by flewis
Link to comment
Share on other sites

Movement isn't considered an animation. Your Animation ID is still -1 (I think). You could do what Dreameo says which is viable, or what I'd do is:

if (feathers exist) {
	grab inv feather count
	if (interact w/ feathers){
		conditional sleep until inv contains > feathercount;
	}
} else {
	// no feathers
}

 

Link to comment
Share on other sites

3 hours ago, flewis said:

I hope so, I have big plans for the dungeoneering and summoning skills when they when they release :)

 

Wow thank you for the advice this is actually game changing, thank you!! This will come in handy when making things like dungeoneering and summoning scripts when the two skills finally release!! <3

 

Again thank you so much!!

 

 

Thank you :) 

It's called raids.

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...