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.

BotScript

Featured Replies

This project is highly dependent on the community's contribution.
Without contribution, this language might not get finished.
This could be the first step towards the future of writing scripts, and help is needed to make it work.
It's up to you guys.
 
After messing with a few grammar designs, I decided not only would it be best to get opinions from dedicated scripters, but allow any developer interested in contributing to this project to help.
 

I'm currently using Rust to implement the compiler, but don't mind switching to Java to widen the audience of contributors towards the implementation of the compiler.
 
This language will compile to bytecode for efficiency, which means bot client distributors will need to support the compiler (since you can't turn in pre-compiled files). Hopefully this won't be too much of an obstacle.

 
__________
 
Why a new language?
 
Java is a divine language, which allows complex structures and ecosystems. But a few problems arise when using a powerful language for scripting:
 

  • Errors are strictly related to the lexical and symantic structure the your code, not the script. There are no warnings or errors for things specific to scripting, such as giving a warning when using a String name to access an Entity which may have multiple IDs (such as rocks) and giving an error for not including the ScriptManifest.
  • The syntax of a language like Java can be cryptic to someone who has never worked with class based object orientation. Not all programming languages work as Java does. A beginning scripter should not be required to learn the fundementals of a language with a complex specification. A new language could cut the amount a beginner is required to learn to a fraction, and allow us to create a better "learn-by-sight" language specific to scripting.
  • The language updates are not directed specifically towards scripters. As scripting techniques grow, the language should grow with it. Abstractions that better fit what scripters do (and want to do), as well as removing complex specifications Java gained over the years.

__________
 
With that said, there are a few ways you can contribute. If you would like to help with the implementation, please post here, and I will message you.
 

Language Ideas
 
For any scripters interested in helping out, but aren't familiar with any of the subjects involved in creating a compiler, this is where you shine. If you feel a specification would improve production time, post it and let others share their opinions on it. The majority of ideas will determine whether this language will stay context-free (as it currently is), or switch to a context-sensitive grammar.
 
Implementation
 
A compiler is divided into a few sections and subsections (simplified):
 
Front End:
    Lexical Analysis (generates tokens)
    Parsing (generates AST)
    Semantic Analysis (type checking, check identifiers, ect..)
 
Back End:
    Optimizations
    Code Generation
 
The subjects you need to know/learn are:
Bytecode Assembly (instructions, flow, frames, ect..)
 
These are some optional, but helpful, subjects to know:
 
I don't mind teaching, as long as it doesn't require more effort than it's worth. If introducing a subject takes longer than expected, I'll ask for you to do some independent research. If enough people request an introduction to anything, I will do it in groups through messages (either on here or on skype).
 
You do not have to be part of the botting community to help with the implementation, so tell your developer friends if you feel they'd be interested!
 
Development Enviornment
 
This could either be in the form of a plugin for another IDE, or an IDE of it's own. Either way, I doubt many people would want to use a language that forces them to use the command-line interface. Those with UX experience will come in handy for this (web designers, graphic designers, ect...).
 
Ensure Support
 
I'm not sure how difficult it may be to get SDN support for this, so I believe there's a chance the developers will refuse to support due to the amount of work it may take to implement. This language is not strict to the OSBot API, so don't fear if the developers choose not to support it, as it will definitely not be the end of this project. I'm sure most of you would love to try this out using OSBot, though, so please show support if needed! 
__________
 
I do not expect anyone to have a full understanding (or even a miniscule understanding) of any of the subjects I listed above. Although, I am hoping determined developers will be motivated enough to dig into those subjects for the sake of contributing. All code will be made open source once the compiler is at a stable state (usable). Until then, only those involved in implementing the compiler will have access to the repository unless stated otherwise in the future. 

__________
 
Thank you for taking the time to read. For anyone who was waiting on a release from a different project (not including EScript, as I decided not to distribute scripts), let me know so I can clear that up (sorry for any delays).

Edited by fixthissite

  • Author

Hey look they did it for you http://osbot.org/api/

But, srs, an example of what you're trying to get at would be great.

Since the API here is pretty damn simple.

The API has nothing to do with the grammar of Java.

 

There are tons of reasons why a new language would benefit, the biggest being speedy production time. We can exclude "extends Script", the identifier for the script class (why even use a class at this point; script type anyone?), could make methods easier and quicker to declare, allow automatic abstraction... the list goes on and on.

 

Basically, Java is an overkill for this. We need to work in the flow of Java to achieve our goal, which means understanding reference and primitive types, understanding object creation, having extra (and unneeded) syntax pushed on us, some of which you may not even notice is completely useless (such as the "extend Script" I mentioned earlier; should be implicit). So although the language will support classes (for interoperability reasons), the client will not be forced to learn about such things.

 

A new language could lower the specification one must learn to properly write a script. This has nothing to do with an API; the API is accessable through the language, as this language will be interoperable with Java. 

Edited by fixthissite

- Have you considered using https://javacc.java.net/ ?

- Why not interpret first (would also be easier for debugging scripts) and compile once the grammar is final?

- Do you have an example script in your language?

Edited by Flamezzz

I like this idea :), Would love to see how it would turn out if you stick with it. Most projects like this I see usually get abandoned after a few months.

 

Basically, Java is an overkill for this.

Really, Java is the overkill here huh. mmk.

  • Author

- Have you considered using https://javacc.java.net/ ?

- Why not interpret first (would also be easier for debugging scripts) and compile once the grammar is final?

- Do you have an example script?

I already have my own parser (LALR), which I would love to make improvements to (such as supporting advance attributed grammars). I could have taken the lazy way and went with bison, but I figured the implementation practice would be nice.

 

I'm not sure what you're referring to by "interpret first, the compile once the grammar is final", as the grammar shouldn't require constant updates (that would require updating the compiler consistently, redistributing, ect..). Mind elaborating on what you mean?

 

I didn't want the syntax for the grammar I have now influencing the ideas of others, as there could be a better view on how scripts should be looked at. I'm not a dedicated scripter myself, so I'm not 100% sure if what I currently have is fit. I don't really mind showing (a few people have already seen it), but I'm really hoping to keep my influence on other's ideas to a minimum right now. Feel free to message me if you're really interested! Although it would be much better if you first gave input as to what you think would be a good syntax for writing scripts.

Really, Java is the overkill here huh. mmk...

Do you understand what I mean by "overkill"?

 

Sure it's easier to get Java atm. Tons of IDEs support it. Can probably get easy debugging help too.

 

But as I said before, the flexability of Java results in excess syntax for what we are trying to do. If we could cut out half of the letters we are required to type to write a script, then why not (laziness not being a valid answer...)? The change is bound to happen, so might as well sooner than later.

I like this idea smile.png, Would love to see how it would turn out if you stick with it. Most projects like this I see usually get abandoned after a few months.

It's a big project, which is why I came to the community for help. This needs more manpower.

 

The outcome of this project strongly depends on the community's motivation and determination. If you guys don't put enough into this, then it's obvious people don't care about it as much as I thought they would, and they probably wouldn't use it (especially if it didn't have an IDE, which would take a while by myself). At that point, it wouldn't be worth the effort.

Edited by fixthissite

 

It's hard to explain my stance on this, It's not an overall objection to an idea, it's an objection to the reasoning.

Java is a very widely used programming language.

And I don't know how many people learn java for the soul purpose of script writing, i feel it'd be more of an adapted benefit.

But if you did happen to learn through scripting then at least you have something to walk away with in the end.

 

but at the end of the day you want to put large amount of time and effort into a system to remove a few brackets in the future be my guest, it just seems like alot of effort for very little gain.

 

tl;dr? : 

>would be cool

>too much effort for little gain

 

i dunno wot u sed but u seem real brainy mister

  • Author

It's hard to explain my stance on this, It's not an overall objection to an idea, it's an objection to the reasoning.

Java is a very widely used programming language.

And I don't know how many people learn java for the soul purpose of script writing, i feel it'd be more of an adapted benefit.

But if you did happen to learn through scripting then at least you have something to walk away with in the end.

 

but at the end of the day you want to put large amount of time and effort into a system to remove a few brackets in the future be my guest, it just seems like alot of effort for very little gain.

 

tl;dr? : 

>would be cool

>too much effort for little gain

 

I'm not focused on teaching people through this language (not trying to kill 2 birds with 1 stone), nor should bot scripting be strongly related to learning Java (standards should be a bit higher...).

 

If you script to learn Java, neat. Java would still be an option. But this is focusing on cutting down the production time of writing/maintaining a script, which could be extremely beneficial in the case that true AIO scripts go mainstream.

 

As for those who just want to write scripts, and don't care for learning Java so they can take it home with them, they can now do their thing. Learning BotScript will require a lot less time than learning Java, since you do not need to explain general aspects (like what a class is or what an object is)

Edited by fixthissite

 

Would you mind pming me a small example of what you envision a small basic script to look like written in your script?

 

It's hard to explain my stance on this, It's not an overall objection to an idea, it's an objection to the reasoning.

Java is a very widely used programming language.

And I don't know how many people learn java for the soul purpose of script writing, i feel it'd be more of an adapted benefit.

But if you did happen to learn through scripting then at least you have something to walk away with in the end.

 

but at the end of the day you want to put large amount of time and effort into a system to remove a few brackets in the future be my guest, it just seems like alot of effort for very little gain.

 

tl;dr? : 

>would be cool

>too much effort for little gain

 

 

The idea is good and would help those who want to script but don't know how. In OmniPocket, I use my own minor script language (like OP highlights here) to create presets which allow more control for me (the script writer) within my own API without steering away from the AIO nature of the script. Now, of course, OP and I have different uses for this, but it's still a good idea.

Here's an example script that I am working on for a basic blackjacker:

#Pollinveach Blackjacking
#TODO: add positions, finalise
#also todo: work on luring -> house -> KO -> pickpocket twice

define HOUSE_POS {x, y, z}

walkto shantay_pass
tag SHANTAY "Shantay" NPC_TYPE
interact SHANTAY "Buy-pass"
tag PASS "Shantay Pass" OBJECT_TYPE
interact PASS "Go-through"
walkto pollninveach

#and so forth

It looks a bit complicated here, but everything is handled by the API:

  • Walks to shantay_pass (internal var)
  • Locates the nearest "Shantay" NPC and buys a pass
  • Locates the nearest pass object and goes through it
  • Walks to pollninveach (internal var)

 

I very much think that having a minor scripting language for OSBot will attract those who are looking for baby steps to create scripts. Of course, having java should still be an option, however.

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.