Jump to content

First script please be gentle lol


Recommended Posts

Posted
On 7/5/2019 at 2:39 AM, FuryShark said:

Im also getting the same error on another script

[ERROR][Bot #1][07/05 01:38:00 AM]: Inventory widget is null, trying to guess position.

I had the same after the .50 update for some reason, I fixed it by first getting the inventory tab & only then interacting with anything in the inventory. Something like this:

tabs.open(Tab.INVENTORY);
Sleep.sleepUntil(() -> tabs.isOpen(Tab.INVENTORY), 5000);

 

 

On 7/5/2019 at 3:30 AM, freedom1 said:

Thanks to everyone who helped!

I have a working script only took 12hrs, but I did learn a lot.

I have no programing experience.

I could not get the spell to work, so I had to mouse click it =(.

Saturday Ill try to get it banking.

 

Using static sleeps is not a great idea, try to use conditional sleeps there or even random sleeps.
Also what is the mouse click doing? Is it opening the inventory? If so use the code above.

  • Like 1
Posted

Thanks for the help once again, I have gotten rid of the sleep, it was late and I was trying things.

After talking with another scripter, he said the arceuus spell book is currently broken. The method of using the castSpell(), waiting, then a mouse click over the spell area does work. This also gets rid of the error.

Posted
1 hour ago, freedom1 said:

Thanks for the help once again, I have gotten rid of the sleep, it was late and I was trying things.

After talking with another scripter, he said the arceuus spell book is currently broken. The method of using the castSpell(), waiting, then a mouse click over the spell area does work. This also gets rid of the error.

I see :)

Does the script currently work? Any issues?

Posted
4 hours ago, freedom1 said:

Thanks for the help once again, I have gotten rid of the sleep, it was late and I was trying things.

After talking with another scripter, he said the arceuus spell book is currently broken. The method of using the castSpell(), waiting, then a mouse click over the spell area does work. This also gets rid of the error.

Try making your own Spellbook API with widgets. This would be good experience for you. :)

Posted
24 minutes ago, freedom1 said:

it does run, no issues, just really primitive, no banking, no antiban, but it does work

no idea how to even start making an api lol

Banking shouldn't be too hard to implement, as for antiban it is debatable if this actually does lower banrate. Look into moving your outside screen while afk, minimizing clicks & mouse movement, anti pattern...

The less you have to click/move mouse the less you can be flagged on. That's why agility & RC have such huge banrates.

Posted
On 7/6/2019 at 7:54 PM, freedom1 said:

it does run, no issues, just really primitive, no banking, no antiban, but it does work

no idea how to even start making an api lol

An API could just be a class that does the spellbook handling for you. For learning how to interact with widgets, I again recommend you Explv's guide, check out section 12. Widgets.

 

Basically the class could have a method which would find the correct spell using widgets as demonstrated in the guide above. And then you can later extend it to be able to cast whichever spell you want, or whatever, and there you have your own API. I know from experience that creating your own api sounds very intimidating and difficult when you are a beginner programmer, but it really is nothing scary :)

 

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...