Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Basic Java Notes

Featured Replies

These are the notes I wrote down when I was first learning java.
These are just the basics and should help set a foundation for you. 

It is crucial to understand these basics because they are used in every script.

 

I took these notes while doing Code Academy

 

f9c1b5bc654a76dd67f1f65615483531.png

db68e881e85461062750a12bba291044.png

39b50f35d5e581cfda9fd2544446f18d.png

 

** On the Order of Operation part, it is best to use parenthesis instead of following the guidelines because it can get confusing. 

Edited by Juggles

:doge: just go ahead and paste all of ur notes

Most programmers avoid order of operations by forcing parenthesis to ensure the order is correct. Typical mistake:

bool1 || bool2 && bool3

 

Some people might think it's evaluating (bool1 || bool2) && bool3 when it's really bool1 || (bool2 && bool3).

  • Author

Most programmers avoid order of operations by forcing parenthesis to ensure the order is correct. Typical mistake:

bool1 || bool2 && bool3

Some people might think it's evaluating (bool1 || bool2) && bool3 when it's really bool1 || (bool2 && bool3).

Yeah I agree. I'll edit the notes and post that later. When I was first learning how to script, I didn't fully understand how to do order of operation so using the parenthesis is a better way to do it. 

Edited by Juggles

Glad you're sharing your knowledge with the community. Never goes unnoticed <3

  • 5 weeks later...

This should indeed help beginners.  I had a sheet similar to this when I was learning c++.  It is very helpful! 

  • 1 month later...

how do u type or on a normal keyboard?

  • 2 weeks later...
On 1/23/2017 at 10:38 PM, DrDu said:

how do u type or on a normal keyboard?

On a "regular" keyboard, directly above the enter button: Hold shift + \ = |. Or = ||.

Is learning the fundamentals enough to start scripting? I have already learnt this and some basic GUI too.

  • 3 weeks later...

Being a student, I know those notes are sure going to help beginners.

Expanding upon what @Alek mentioned short circuit operators are fantastic for making code optimizations in conditions that depend on or's. Do your lightweight checks first (boolean state, etc.) so if any evaluate to true the condition will terminate early and not have to do any of your more robust calculations.

They're also a great place to chain calls together vs nested if's. Example RuneScape script case case:

!isPlayerInCombat() && playerHealth() > 20 && ((distanceToTarget > 10 && stepTowardsTarget) || attackTarget)

would be a perfect one statement generic method for attacking an entity that could be called each script poll.

  • 5 months later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.