Smart-Overhaul
Brandon
2013-05-06 18:18:32
Kevin
2013-05-06 18:33:29
Very nice job Brandon! Just release an API for this and BAM, pbot has some intense competition from you (because da**, you're impressive) ;)
senrath
2013-05-06 18:36:03
Neat. I'll take a look at the source when I get some free time.
Flight
2013-05-06 19:23:06
Very cool indeed, I'm gonna check this out today. So you're not planning to work on this anymore, Brandon? I wonder if it would be difficult to create such a thing to load up OSR and possibly lead to reflection. I wish I had the knowledge to do so.
Wetish
2013-05-06 19:43:48
Looks cool. I am looking forward to sifting through the source for blocking input. Great job. ;)
Brandon
2013-05-06 19:44:05
From: Flight
Very cool indeed, I'm gonna check this out today. So you're not planning to work on this anymore, Brandon? I wonder if it would be difficult to create such a thing to load up OSR and possibly lead to reflection. I wish I had the knowledge to do so.
Glad to see you guys like it. Nah I'm too bored of it already (I almost never finish projects I start).. Most likely I'd would work on it if I have nothing else to do.
It'd be pretty easy to get it working for Oldschool. Just swap the parameters and the width/height. That's it.
Flight
2013-05-06 19:54:26
From: Brandon
Glad to see you guys like it. Nah I'm too bored of it already (I almost never finish projects I start).. Most likely I'd would work on it if I have nothing else to do.
It'd be pretty easy to get it working for Oldschool. Just swap the parameters and the width/height. That's it.
Sounds good, I think I can manage that. Perhaps I'll make a thread later on over at Mopar to see how I might go about using reflection and creating just a couple hooks. I believe I have the wrong path set for my JDK as I get the error "javac invalid target release: 1.7". It's been far too long since I've work with java, let alone building libraries with Ant. I'll look through some old private server communities for quick tutorials.
From: Flight
Sounds good, I think I can manage that. Perhaps I'll make a thread later on over at Mopar to see how I might go about using reflection and creating just a couple hooks. I believe I have the wrong path set for my JDK as I get the error "javac invalid target release: 1.7". It's been far too long since I've work with java, let alone building libraries with Ant. I'll look through some old private server communities for quick tutorials.
https://github.com/NKNScripts/nknbotThat's my bot.
Loads oldschool, has 7-10ish hooks. includin the canvas.
I never figured out how to override the applets Paint method, so I couldn't really paint correctly. :I
Have a go with it, wouldn't be too hard to add reflection.
@BrandonAny idea how I can override the paint method in the applet in frame.java?
I want to be able to paint without having to grab the graphics every time, as that makes it disappear on another command.
Brandon
2013-05-06 20:13:59
From: NKN
https://github.com/NKNScripts/nknbot
That's my bot.
Loads oldschool, has 7-10ish hooks. includin the canvas.
I never figured out how to override the applets Paint method, so I couldn't really paint correctly. :I
Have a go with it, wouldn't be too hard to add reflection.
@Brandon
Any idea how I can override the paint method in the applet in frame.java?
I want to be able to paint without having to grab the graphics every time, as that makes it disappear on another command.
:o Nice bot! Gunna check that out :D
Uhh the way I paint is through double buffering.
In the canvas's getGraphics method, I have two buffered Images. The first is a Debugging Buffer and the second is the GameBuffer. I learned this from over at MoparIsTheBest. I noticed that you're drawing directly on the game graphics and since RS is double buffered, it'll either flicker or just get drawn over.
Works like this:
//Overriding the Canvas's getGraphics method with my own..
@Override
public Graphics getGraphics() {
if (super.getGraphics() != null && bot != null && bot.getBotBuffer() != null && bot.getGameBuffer() != null) {
Graphics g = bot.getBotBuffer().getGraphics(); //Get the Debug Buffered-Image.
g.drawImage(bot.getGameBuffer(), 0, 0, null); //Draw the game's Image on it.
bot.drawGraphics(g); //Draw whatever the bot wants to draw onto the Debug Image.
g.dispose();
Graphics2D G = (Graphics2D) super.getGraphics();
G.drawImage(bot.getBotBuffer(), 0, 0, null); //Draw the Debug Image onto the Canvas.
//If I remove my debug buffer, my canvas will be completely black.
return bot.getGameBuffer().getGraphics(); //Return the GameBuffer's graphics..
}
return super.getGraphics(); //My buffered weren't create yet so let the component paint normally.
}
//Bot's drawGraphics method:
public void drawGraphics(Graphics g) { //Draws everything onto the Debug Image which the above function will draw onto the Game's image.
g.setColor(Color.green);
Point Position = InputManager.getMousePos();
g.fillOval(Position.x - 2, Position.y - 2, 4, 4);
}
From: Brandon
:o Nice bot! Gunna check that out :D
Uhh the way I paint is through double buffering.
In the canvas's getGraphics method, I have two buffered Images. The first is a Debugging Buffer and the second is the GameBuffer. I learned this from over at MoparIsTheBest. I noticed that you're drawing directly on the game graphics and since RS is double buffered, it'll either flicker or just get drawn over.
Works like this:
//Overriding the Canvas's getGraphics method with my own..
@Override
public Graphics getGraphics() {
if (super.getGraphics() != null && bot != null && bot.getBotBuffer() != null && bot.getGameBuffer() != null) {
Graphics g = bot.getBotBuffer().getGraphics(); //Get the Debug Buffered-Image.
g.drawImage(bot.getGameBuffer(), 0, 0, null); //Draw the game's Image on it.
bot.drawGraphics(g); //Draw whatever the bot wants to draw onto the Debug Image.
g.dispose();
Graphics2D G = (Graphics2D) super.getGraphics();
G.drawImage(bot.getBotBuffer(), 0, 0, null); //Draw the Debug Image onto the Canvas.
//If I remove my debug buffer, my canvas will be completely black.
return bot.getGameBuffer().getGraphics(); //Return the GameBuffer's graphics..
}
return super.getGraphics(); //My buffered weren't create yet so let the component paint normally.
}
//Bot's drawGraphics method:
public void drawGraphics(Graphics g) { //Draws everything onto the Debug Image which the above function will draw onto the Game's image.
g.setColor(Color.green);
Point Position = InputManager.getMousePos();
g.fillOval(Position.x - 2, Position.y - 2, 4, 4);
}
Last question:
How are you at injecting dummy files into Runescape, so it generates a runtime error, and you use these runtime errors to map out all the fields and methods in the jar.
Brandon
2013-05-07 00:33:46
From: NKN
Last question:
How are you at injecting dummy files into Runescape, so it generates a runtime error, and you use these runtime errors to map out all the fields and methods in the jar.
Pretty bad. I haven't looked into Injection yet. I usually just replace the super class of what I think RS is using and throw an error in that to see how things work.. Bad method of course lol.
I need to look into Injection/Reflection in Java for finding out information.
Flight
2013-05-07 01:43:33
From: Brandon
Pretty bad. I haven't looked into Injection yet. I usually just replace the super class of what I think RS is using and throw an error in that to see how things work.. Bad method of course lol.
I need to look into Injection/Reflection in Java for finding out information.
That'd be great. My knowledge on the subject is quite limited but I've worked with clients from many eras in RS, hopefully it's enough to be considered "basic". If you decide to go that way let me know if there's anything I can help with.
Chris!
2013-05-07 02:07:37
This looks great, Brandon!
:D glad you finally released, one question tho, how did you get smart to compile with java 7, with the canvas hack ?
lol, you get bored pretty easily, seems really nice though shame you couldn't finish off doing it to smart. :)
fungo
2013-05-07 11:15:06
Great!
Silentcore
2013-05-07 12:08:20
Great job, Good thing you spend your boring times doing something productive. Keep it up.
StickToTheScript
2013-05-07 14:07:59
This is stinking amazing!! Awe man!! I want to give it a shot!!!!
Brandon
2013-05-08 08:08:01
From: Kasi
:D glad you finally released, one question tho, how did you get smart to compile with java 7, with the canvas hack ?
https://mega.co.nz/#!8FlhgQhI!VMkLMGRdODWj5wWEmFL9AA4zj3QfRkSZjcAxpsYF-88That's the Smart I have (rev2 which uses an event queue like the original smart but more effective and its just as effective as my own listeners, includes: both source, makefile, and binaries).. I of course need to add the Debug Painting to it. Other than that, everything else was working when I where I last left off. I'm pretty sure debug graphics is the only thing I left out as it was the least important feature while I was overhauling it.. Kinda left it for last. Copied a ton of code from my Bot in the OP and modified it to work with this SMART :l Easier to just write a bot from scratch tbh..
I didn't have to change anything in Simba to run it as I kept all the Main arguments in the same order.

Meh.. again.. never finished the SMART overhaul either :l
a) Too much to do by myself and it gets boring..
b) No one really cares much about how smart operates or seems to want to change anything in it.
c) The code is pretty lengthy and hard to just "change". Would require a whole re-write except for some things as seen above..
d) I kept all of the JNI and Events. Just changed them so they aren't so annoying and I can't get rid of the spawning error unless I re-write the JNI myself which is quite a lot to change..
e) I'd prefer if Ben did his own releases and edits.. Don't wanna get on his bad-side ;)
@Brandon
Hmm, I think alot of people would actually notice + appreciate SMART changes something like tab support (smart_SpawnTab, smart_SpawnClient?) would be amazing, and even smaller things like the icons make the client look great. And about Ben well.. he doesn't seem to have the time anymore + interests are in other places currently although he does get round to updating SMART when needed which is great :), but at the same time i can fully understand that SMART is his "baby" and could be somewhat reluctant to add someone elses work.
Flight
2013-05-09 03:21:45
When using your version of SMART 8.1 I'm getting an access violation when "SmartSpawnClient" is called. Any suggestions Brandon?
Also I've been reading over one of Fasga's tutorials on Mopar about loading the class files from the RS client. It's only the first step in implanting reflection so next I'll read up and try to learn to basics.
Brandon
2013-05-09 09:54:52
@Olly, yeah I can probably see a SmartSpawnTab or just have it spawn one automatically with each TabId being ProcessID + TabIndex OR the Canvas HashCode. Would require me to edit quite a bit though. Especially on the JNI side of things.
Uhh did you compile it or just use the binaries?
The only thing in the include I changed was: "While (Not SmartActive) Do" in SmartParams.simba.
Its statically compiled but I worked on it on Windows 8. Perhaps you'd have to compile it for you machine. Just run: Make clean windows on the makefile.
The only problem which tab is that it uses a crap load of CPU. You even if you close it the tab it still uses te CPU. There isn't a way to clear the CPU in java yet.
Flight
2013-05-09 11:07:24
From: Brandon
Uhh did you compile it or just use the binaries?
The only thing in the include I changed was: "While (Not SmartActive) Do" in SmartParams.simba.
Its statically compiled but I worked on it on Windows 8. Perhaps you'd have to compile it for you machine. Just run: Make clean windows on the makefile.
Yep I complied them in the same way you listed in your compiling SMART tutorial (thanks for that by the way). Yes I also changed that quick in SmartParams. It's odd because I downloaded Ben's current 8.1, compiled and ran it smoothly (I still have problems switching it to OGL mode, but this is beside the point).
Brandon
2013-05-09 14:35:30
From: Frostie
The only problem which tab is that it uses a crap load of CPU. You even if you close it the tab it still uses the CPU. There isn't a way to clear the CPU in java yet.
Ahh don't say that.. Perhaps the JVM part is true but that doesn't stop anything. I can destroy tabs just fine and dispose of them. I'm running this in a 2GB-Ram Hyper-V vm (don't mind the ugly looking tabs.. I didn't add a look and feel to them).. I'm considering adding Tabs to smart or finishing the overhaul but seriously.. its a lot to re-write and its pretty difficult to just addTabs.. how would pairing work? :S Its not just the Java side I'd have to deal with.. I can see why Ben either didn't want to add it or just doesn't like overhauling smart without necessary need. These aren't really needs but just "wants". I can attach the source or the jar if you actually want to see that these screenies aren't faked.
[ATTACH=CONFIG]21164[/ATTACH][ATTACH=CONFIG]21165[/ATTACH]
And the code for that is:
public static void main(String[] args) { //This main is just for testing.. removed args from Simba to test the tabs.
//Test args..
exec_args = new String[]{
"C:/Simba/Plugins/libsmartjni64.dll", "http://world4.runescape.com/", ",f2352222102415942500",
"765", "553", "s", "", "", ""
};
Frame F = new Frame(100);
ByteBuffer img = ByteBuffer.allocateDirect(765 * 553 * 4);
ByteBuffer dbg = ByteBuffer.allocateDirect(765 * 553 * 4);
addTab(F, new Client(root, params, initseq, useragent, img, dbg, width, height));
addTab(F, new Client(root, params, initseq, useragent, img, dbg, width, height));
}
public static void addTab(final Frame frame, final Client client) {
new Thread(new Runnable() {
@Override
public void run() {
frame.addClient(client);
client.start();
client.setDebug(false);
client.setGraphics(true);
client.setKeyInput(false);
client.setMouseInput(false);
frame.updateUI();
}
}).start();
}
//Inside the Frame class..
private void addListeners() {
TabCloseButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (((ClientApplet) component).getApplet().getComponentCount() > 0) {
Frame.this.removeClient((ClientApplet) component);
}
}
});
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
Frame.this.removeAllClients();
Main.destruct();
}
});
}
private void removeClient(final ClientApplet loader) {
if (loader == null || loader.getApplet() == null || loader.getApplet().getComponentCount() < 1) {
return;
}
synchronized (this.TabPane) {
this.TabPane.remove(loader);
}
try {
new Thread(new Runnable() {
@Override
public void run() {
if (loader.getApplet() != null && loader.getApplet().getComponentCount() > 0) {
EventHandler.remove(loader.getApplet().getComponent(0));
clients.remove(loader.getApplet().getComponent(0).getClass().getClassLoader().hashCode());
}
loader.remove(loader.getApplet());
loader.getApplet().destroy();
}
}).start();
} catch (Exception Ex) {
System.out.println(Ex.getMessage());
}
}
private void removeAllClients() {
synchronized (this.TabPane) {
this.TabPane.removeAll();
}
synchronized (clients) {
for (Client client : clients.values()) {
if (client != null && client.getLoader() != null && client.getCanvas() != null) {
EventHandler.remove(client.getCanvas());
clients.remove(client.getCanvas());
client.getLoader().remove(client.getApplet());
client.getApplet().destroy();
}
}
clients.clear();
}
System.gc();
}
From: Flight
Yep I complied them in the same way you listed in your compiling SMART tutorial (thanks for that by the way). Yes I also changed that quick in SmartParams. It's odd because I downloaded Ben's current 8.1, compiled and ran it smoothly (I still have problems switching it to OGL mode, but this is beside the point).
Uhh gimmie some time and I'll fix it if I can find it. I can't seem to reproduce the access violation but perhaps I missed something.
footballjds
2013-05-09 14:42:50
new benland? :p
From: Brandon
Ahh don't say that.. Perhaps the JVM part is true but that doesn't stop anything. I can destroy tabs just fine and dispose of them. I'm running this in a 2GB-Ram Hyper-V vm (don't mind the ugly looking tabs.. I didn't add a look and feel to them).. I'm considering adding Tabs to smart or finishing the overhaul but seriously.. its a lot to re-write and its pretty difficult to just addTabs.. how would pairing work? :S Its not just the Java side I'd have to deal with.. I can see why Ben either didn't want to add it or just doesn't like overhauling smart without necessary need. These aren't really needs but just "wants". I can attach the source or the jar if you actually want to see that these screenies aren't faked.
[ATTACH=CONFIG]21164[/ATTACH][ATTACH=CONFIG]21165[/ATTACH]
And the code for that is:
public static void main(String[] args) { //This main is just for testing.. removed args from Simba to test the tabs.
//Test args..
exec_args = new String[]{
"C:/Simba/Plugins/libsmartjni64.dll", "http://world4.runescape.com/", ",f2352222102415942500",
"765", "553", "s", "", "", ""
};
Frame F = new Frame(100);
ByteBuffer img = ByteBuffer.allocateDirect(765 * 553 * 4);
ByteBuffer dbg = ByteBuffer.allocateDirect(765 * 553 * 4);
addTab(F, new Client(root, params, initseq, useragent, img, dbg, width, height));
addTab(F, new Client(root, params, initseq, useragent, img, dbg, width, height));
}
public static void addTab(final Frame frame, final Client client) {
new Thread(new Runnable() {
@Override
public void run() {
frame.addClient(client);
client.start();
client.setDebug(false);
client.setGraphics(true);
client.setKeyInput(false);
client.setMouseInput(false);
frame.updateUI();
}
}).start();
}
//Inside the Frame class..
private void addListeners() {
TabCloseButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (((ClientApplet) component).getApplet().getComponentCount() > 0) {
Frame.this.removeClient((ClientApplet) component);
}
}
});
this.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
Frame.this.removeAllClients();
Main.destruct();
}
});
}
private void removeClient(final ClientApplet loader) {
if (loader == null || loader.getApplet() == null || loader.getApplet().getComponentCount() < 1) {
return;
}
synchronized (this.TabPane) {
this.TabPane.remove(loader);
}
try {
new Thread(new Runnable() {
@Override
public void run() {
if (loader.getApplet() != null && loader.getApplet().getComponentCount() > 0) {
EventHandler.remove(loader.getApplet().getComponent(0));
clients.remove(loader.getApplet().getComponent(0).getClass().getClassLoader().hashCode());
}
loader.remove(loader.getApplet());
loader.getApplet().destroy();
}
}).start();
} catch (Exception Ex) {
System.out.println(Ex.getMessage());
}
}
private void removeAllClients() {
synchronized (this.TabPane) {
this.TabPane.removeAll();
}
synchronized (clients) {
for (Client client : clients.values()) {
if (client != null && client.getLoader() != null && client.getCanvas() != null) {
EventHandler.remove(client.getCanvas());
clients.remove(client.getCanvas());
client.getLoader().remove(client.getApplet());
client.getApplet().destroy();
}
}
clients.clear();
}
System.gc();
}
Uhh gimmie some time and I'll fix it if I can find it. I can't seem to reproduce the access violation but perhaps I missed something.
Good job. Never took the time to do some work. But I don't need the source. I would start using the final modifier.
Mhmmm, like Brandon said nothing of this is needed, Ben still does a great job of keeping up to date with SMART but.. if your willing to put some effort into SMART it would be nice to know if Ben would like/accept the features (providing up to scratch etc.).
So yeah at the end of day (official wise) its down to @BenLand100
Flight
2013-05-09 20:44:26
From: Brandon
Uhh gimmie some time and I'll fix it if I can find it. I can't seem to reproduce the access violation but perhaps I missed something.
Great great I'll of course keep an eye on this thread. I just thought maybe it's something simple I over-looked and you'd be able to point it out immediately.
Oh yes, do you have plans on making AcidBot into a plugin to communicate with Simba?
Brandon, if you have any desire to add like, hooks or w/e, you should let me see how you do it. :P I'd like to learn how other people program.
@Brandon
From: NKN
Brandon, if you have any desire to add like, hooks or w/e, you should let me see how you do it. :P I'd like to learn how other people program.
@Brandon
This is for Java.You need to either learn bcel or asm. They are both bytecode api's. You should really get a good understanding of bytecode then move on to learning the api. For hooks they won't last forever so you need to make a updater which will allow the hooks to be automatically updated. I do like asm more than bcel so i'll give you the link for the api docs and a pdf of it. Sorry, i don't know Pascal
Api Docs:
HereAsm Book:
Here
From: Frostie
This is for Java.You need to either learn bcel or asm. They are both bytecode api's. You should really get a good understanding of bytecode then move on to learning the api. For hooks they won't last forever so you need to make a updater which will allow the hooks to be automatically updated. I do like asm more than bcel so i'll give you the link for the api docs and a pdf of it. Sorry, i don't know Pascal
Api Docs: Here
Asm Book: Here
http://github.com/nknscripts/nknbotI have my own bot lol I know how it works
From: NKN
http://github.com/nknscripts/nknbot
I have my own bot lol I know how it works
Didn't seem like it btw i checked your source you should use final modifiers.
From: Frostie
Didn't seem like it btw i checked your source you should use final modifiers.
-shrug- yolo
From: NKN
-shrug- yolo
But hey good job.
Brandon
2013-05-09 23:15:51
From: Frostie
Didn't seem like it btw i checked your source you should use final modifiers.
LOL.. what is with you and final? -_- There's not really "benefits" to it other than to help someone else reading your code realize that things don't change.. It doesn't provide any speed increases or anything.
@Flight; Uhh I'm not sure if I'd add acidbot to simba but I'm actually re-writing all of Smart's pairing to see if I can get tabs working and to remove that stupid cannot spawn clients as well as the left over Smart.pid files that it leaves all over the place..
Just started on the JNI. Hopefully it goes well.. if not, well then I guess there's no changing smart other than Benland doing it himself.
From: Brandon
LOL.. what is with you and final? -_- There's not really "benefits" to it other than to help someone else reading your code realize that things don't change.. It doesn't provide any speed increases or anything.
@Flight; Uhh I'm not sure if I'd add acidbot to simba but I'm actually re-writing all of Smart's pairing to see if I can get tabs working and to remove that stupid cannot spawn clients as well as the left over Smart.pid files that it leaves all over the place..
Just started on the JNI. Hopefully it goes well.. if not, well then I guess there's no changing smart other than Benland doing it himself.
I doesn't really do anything. But pyroryan said you look like a beginner programmer.
Brandon
2013-05-09 23:42:47
From: Frostie
I doesn't really do anything. But pyroryan said you look like a beginner programmer.
:S and you believe that? Think about it. What about the guys that know multiple languages and instead don't initialize variables via initializer lists and rather initialize via constructor?
Such guys would be C/C++ programmers. I tend to initialize everything to null and then set my variables in the constructor or a function that sets them for me. Initializing them all at the start for me looks pretty dirty unless its static or something :S.
Yeah java has standards but some of them are really stupid standards. As well as stupid ways of doing things. Aka "Layouts".. Pfft.. every other language uses a location on screen to place buttons not some extremely long layout with padding.. or adding "public" before every single function..
But then again, to each their own. LOL I remember when Ben changed my code from using "SomeMethodName" to "someMethodName" with lowercase beginning letter :S.
Making it all final is like the difference between doing:
public void foo() { //bracket on init line.
}
//and
public void foo()
{ //bracket on following line. Java guys will complain for this :S
}
From: Brandon
:S and you believe that? Think about it. What about the guys that know multiple languages and instead don't initialize variables via initializer lists and rather initialize via constructor?
Such guys would be C/C++ programmers. I tend to initialize everything to null and then set my variables in the constructor or a function that sets them for me. Initializing them all at the start for me looks pretty dirty unless its static or something :S.
Yeah java has standards but some of them are really stupid standards. As well as stupid ways of doing things. Aka "Layouts".. Pfft.. every other language uses a location on screen to place buttons not some extremely long layout with padding.. or adding "public" before every single function..
But then again, to each their own. LOL I remember when Ben changed my code from using "SomeMethodName" to "someMethodName" with lowercase beginning letter :S.
Making it all final is like the difference between doing:
public void foo() { //bracket on init line.
}
//and
public void foo()
{ //bracket on following line. Java guys will complain for this :S
}
Is lowcasing procedure names some java standard? I noticed that see like in a RSPS the code to send a message to the whole server was "sM(String)" or "sendMessage(String)" or how on Powerbot I think its "walkTile"
It actually looks neat to me
senrath
2013-05-09 23:54:41
From: Officer Barbrady
Is lowcasing procedure names some java standard? I noticed that see like in a RSPS the code to send a message to the whole server was "sM(String)" or "sendMessage(String)" or how on Powerbot I think its "walkTile"
It actually looks neat to me
Yup. Camel case is the Java standard.
Flight
2013-05-10 00:08:11
From: Brandon
@Flight; Uhh I'm not sure if I'd add acidbot to simba but I'm actually re-writing all of Smart's pairing to see if I can get tabs working and to remove that stupid cannot spawn clients as well as the left over Smart.pid files that it leaves all over the place..
Ah right I figured you'd want to keep AcidBot separate but just making sure. I sure like the layout and I'd love to use it in line with Simba so of course I was curious to know. :p I'm only interested in reflection for an OSR client, not so much for the normal EoC RS.
This is a bit off-topic and I apologize if it seems like spam, but is it normal for SMART to "freeze" when the mode is changed from Safemode to OpenGL via the dropbox? Ever since that option was added to SMART it's not worked for me (and everyone else I assume?), even Ben's current 8.1. If it matters I have 8.1 load up the OpenGL plugin on start up, which is great; now I just need SMART to switch to OGL mode. :p
Keep up the good work Brandon, I for one am rooting for you. :thumbsup:
From: Brandon
:S and you believe that? Think about it. What about the guys that know multiple languages and instead don't initialize variables via initializer lists and rather initialize via constructor?
Such guys would be C/C++ programmers. I tend to initialize everything to null and then set my variables in the constructor or a function that sets them for me. Initializing them all at the start for me looks pretty dirty unless its static or something :S.
Yes i do believe that. PryoRyan is one of the top java programming out there.
Yeah java has standards but some of them are really stupid standards. As well as stupid ways of doing things. Aka "Layouts".. Pfft.. every other language uses a location on screen to place buttons not some extremely long layout with padding.. or adding "public" before every single function..
But then again, to each their own. LOL I remember when Ben changed my code from using "SomeMethodName" to "someMethodName" with lowercase beginning letter :S.
Making it all final is like the difference between doing:
public void foo() { //bracket on init line.
}
//and
public void foo()
{ //bracket on following line. Java guys will complain for this :S
}
Yes i do believe that pyroryan is one of the best java programmers out there.
Here are some reasons to use it.
Just ensures the variable won't be accidentally reinitialized. It's conventional to use for global fields (at the top of a class.) It doesn't have much effect on performance, but it's conventional. It isn't particularly necessary to do with local fields (within a method, or similar, because it has no effect on the bytecode produced), but I still do it anyways to keep a consistent flow and ensure I don't accidentally reinitialize fields.
Brandon
2013-05-10 00:26:43
From: Frostie
Yes i do believe that pyroryan is one of the best java programmers out there.
Here are some reasons to use it.
Just ensures the variable won't be accidentally reinitialized. It's conventional to use for global fields (at the top of a class.) It doesn't have much effect on performance, but it's conventional. It isn't particularly necessary to do with local fields (within a method, or similar, because it has no effect on the bytecode produced), but I still do it anyways to keep a consistent flow and ensure I don't accidentally reinitialize fields.
I know he is. Himself, Drags, and Trilez are good. I'm only saying, there are some "conventions" you can ignore. For me, I personally only make a variable final or atomic when I need to pass it to a thread or wrap it in a synchronized block, and I make things static when I want them to live in memory or all instances to access them. I also use final in replacement for the keyword "const" in C. Other than that, photographic memory helps. Its why I learn so fast ;) I'm not saying you should use final. I'm saying, you don't need to over do it.
Also note that in Assembly, C, C++: Constant values create LARGER executables. Not sure if Java somehow gets rid of this with the final keyword. If its the same then its not something I want. Also final doesn't have a large effect on non-primitve variables.
@Flight; The Smart overhaul has the same layout.. Well I'm hoping to get it working and approved by Ben.
For OGL: That's because you need to be in OpenGL mode first before you load up Smart. If you can't get smart into OGL mode, does it have an error or stacktrace? If it does, your drivers need updating. Hmm I got it working in OGL mode :S.
Flight
2013-05-10 03:14:20
From: Brandon
@Flight; The Smart overhaul has the same layout.. Well I'm hoping to get it working and approved by Ben.
For OGL: That's because you need to be in OpenGL mode first before you load up Smart. If you can't get smart into OGL mode, does it have an error or stacktrace? If it does, your drivers need updating. Hmm I got it working in OGL mode :S.
Regarding my graphics card & drivers: I just downloaded and installed the most up-to-date driver for my graphics card (ATI Radeon 3000) and now my OpenGL version is 6.14.10.11672. Furthermore, I once again loaded up RS in the normal browser in default, lowest OGL graphic settings. I even updated my Runescape Launcher to the newest and loaded/logged in with OGL settings, just incase I needed their extra files on my computer for it to work. It didn't.
I changed Ben's current SMART to load OpenGL on default in the Client class:
private OperatingMode operatingMode = OperatingMode.OpenGL;
Still when SMART loads it constantly reads < 0.35 fps and freezes like I said before. Switching the mode-selector to SafeMode unfreezes it and when I try to change the GFX settings to OGL via the graphics settings on the login page I get an error in SMART and Runescape says something like "Unable to use these settings".

Here's the part in the Client class that's defined for OpenGL mode:
case OpenGL: {
int c = 0;
long time = System.currentTimeMillis();
//JFrame img = new JFrame("Teh Buffar");
//ImageIcon icon = new ImageIcon(buffer);
//img.add(new JLabel(icon));
//img.setVisible(true);
while (operatingMode == OperatingMode.OpenGL) {
sleep(refresh);
c++;
if (c % 100 == 0) {
Main.debug((1.0/((System.currentTimeMillis()-time)/1000.0)) + " fps");
time = System.currentTimeMillis();
}
//Main.copyGLBuffer(0,0,width,height,nativeBuff);
//nativeBuff.rewind();
//for (int i = 0; i < len; ++i) {
// bufferData[i] = nativeDebug.get() >> 8;
//}
}
//img.setVisible(false);
} break;
And the last bit, here's my SmartSpawnClient line in SmartParams:
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, '', '', '', 'OpenGL32.dll');
Again, this is the standard SMART v8.1 compile directly from Ben's GitHub; it's not your overhauled SMART since I've an access violation error with that one. :( I hope you have better news about your overhauled SMART 8.1 because I'm going no where fast with Ben's.
Brandon
2013-05-10 03:28:23
From: Flight
Regarding my graphics card & drivers..
https://github.com/BenLand100/SMART/pullsSpecifically this one:
https://github.com/BenLand100/SMART/pull/13See that 7-month old pull :(? That is the pull that supports OpenGL. I think he's really busy these days. Current Smart on Ben's github doesn't do anything with OpenGL.. Technically, it should "Render" OpenGL and DirectX properly, except that Ben's BlitThread does all the drawing and since there is no drawing under the OpenGL/DirectX switch cases, you will just see black with an FPS counter that hovers near 0 :l
That exception you got.. I used to get when my drivers were outdated but seeing as you have the latest OpenGL drivers, that can't possibly be.
Meh I'm still trying to figure out a way to properly pair tabs without breaking any of the current methods and at the same time extending the functionality.
Flight
2013-05-10 05:17:22
From: Brandon
https://github.com/BenLand100/SMART/pulls
Specifically this one: https://github.com/BenLand100/SMART/pull/13
See that 7-month old pull :(? That is the pull that supports OpenGL. I think he's really busy these days. Current Smart on Ben's github doesn't do anything with OpenGL.. Technically, it should "Render" OpenGL and DirectX properly, except that Ben's BlitThread does all the drawing and since there is no drawing under the OpenGL/DirectX switch cases, you will just see black with an FPS counter that hovers near 0 :l
That exception you got.. I used to get when my drivers were outdated but seeing as you have the latest OpenGL drivers, that can't possibly be.
Meh I'm still trying to figure out a way to properly pair tabs without breaking any of the current methods and at the same time extending the functionality.
Thanks for the quick replies Brandon. I added all of you commits to SMART and I'm still at the same place. A few successful compiles after those edit my Makefile stopped producing a smart.jar, just simply stopped compiling all .java files. I honestly have no idea why, I compiled once, received all 3 files (2 .dlls & 1 jar), cut those and placed them in Simba's plugins, compiled SMART again (with no edits to anything) and since then it no longer produces a jar. I even went all the way back to a fresh copy of 8.1, re-did all your OpenGL commits, edited the Makefile to compile your SharedLibrary classes, and the same problem occurs: only the .dlls are produced, no jar. Is there something wrong with my Makefile/compiler? :/
I think I'm going to give up on this, I'm just out of luck here, no matter which way I go about it. Thanks for all of your help Brandon and I apologize if I've wasted time.
pyroryan
2013-05-12 14:01:25
From: Frostie
I doesn't really do anything. But pyroryan said you look like a beginner programmer.
I don't recall ever saying that Brandon looked like a beginning programmer. In fact, I think this is the first time I've even talked about a Brandon from villavu/SRL within the past year.
Brandon
2013-05-14 23:19:44
@BenLand100;
:) Smart v8.1 Rev-2 anyone? I must admit.. took a lot of re-writing and work but I got most suggested Smart features completed.. Well almost all. I just have to add back all Ben's copyrights and documentations (though the over use of comments annoy me :( and do some more extensive testing). Iunno though.. I think I've had enough but here's the source if anyone wants to continue. I did a lot already and its useable..
SOURCE:
[ATTACH]21238[/ATTACH]
Pictures:
Features so far:- Simba can now spawn Smart Tabs.
- Smart now has its own built in console so you don't get that stupid black cmd looking thing for each smart client.
- Each tab can have different input methods. Ex: Tab one can have mouse disabled, tab two can have it enabled, etc..
- Closing a tab cleans the resources the tab used. IE: CPU and Memory usage goes down. Ex: 4 Tabs at 100% CPU each using 25%. One tab closes, CPU will go down to 75%. Close another and it'll be at 50% etc.. Close the client OR all the tabs and the CPU drops to 0.
- Each Simba tab can be paired to one smart tab. IE: One Tab running a mining script will interact with a unique tab in smart. The other tab can then run whatever it wants at the same time.
- The built in console can be hidden or shown. Ex: It's that console looking button.. It'll hide the Text area at the bottom.
- Console popup menu allows you to clear it, select all, or copy.
- Deletes all Smart.TabID and Smart.PID files that are not in use when Simba closes. This cleans up all those left over files from the old smart.
Smart itself works perfectly. Either myself, or Ben or whoever decides to continue on this would only have to do testing and test the pairing with the tabs. I'm pretty sure I got it all though but just in case I missed something or messed up something.
The new functions look like:
- int PID = SmartSpawnProcess(RemotePath, JavaArguments, ListOfPlugins);
- SmartSpawnClient(PID, Root, Params, Width, Height, InitSequence, UserAgent);
- SmartSetMouseInput(Enabled);
- SmartSetKeyboardInput(Enabled);
- SmartSetDebug(Enabled);
- SmartSetGraphic(Enabled);
- SmartSetConsole(Visible);
- SmartClientCount(UnPaired);
- SmartProcessCount();
- SmartClientCount(PID);
etc..
Flight
2013-05-14 23:54:13
From: Brandon
:) Smart v8.1 Rev-2 anyone?
Great stuff, I'm gonna to play a bit with this now. By the way, have you added your OpenGL commits to this version of SMART already?
Edit:
Oh yeah, do you have the Makefile for this?
@Brandon
Impressive.. impressive…
I suppose the debug box can be filled with debug() from simba?
Brandon
2013-05-14 23:57:37
From: Flight
Great stuff, I'm gonna to play a bit with this now. By the way, have you added your OpenGL commits to this version of SMART already?
Ne pas. I added the plugins loader but I forgot to make it actually use the OGL plugin when you change modes. No problem though its really only three lines of code at most to make it use the plugin. All other plugins will work. The OGL/DX ones need manual usage though that's why.
StickToTheScript
2013-05-15 00:02:55
I really would love to test this. If you ever get a stable version or just one where you need testers, feel free to give me a shout!
Flight
2013-05-15 00:04:25
From: Brandon
Ne pas. I added the plugins loader but I forgot to make it actually use the OGL plugin when you change modes. No problem though its really only three lines of code at most to make it use the plugin. All other plugins will work. The OGL/DX ones need manual usage though that's why.
Ok I assume that's covered in your commits to SMART on Github; I'll browse that, compare it to yours and see what's still needed for OpenGL. Also Brandon, do you have the Makefile for this source?
Brandon
2013-05-15 00:12:02
From: Flight
Ok I assume that's covered in your commits to SMART on Github; I'll browse that, compare it to yours and see what's still needed for OpenGL. Also Brandon, do you have the Makefile for this source?
Yeah its on the github in Client.java and Main.java. It says "SharedLibrary" and the function name is GetGLBuffer.
Uhh I used eclipse/netbeans for compiling Smart.jar and I used the makefile for compiling SmartRemote and SmartJNI.
There is a makefile included that is able to compile all of them which I was using at once but you'll have to move all the files around into a folder called src then run make clean windows and it'll compile all of them.
Uhh if you can't get it to work or don't have an IDE, gimmie like a day or so.. I'll upload a more complete version with a revised SmartParams.simba file that would be able to run this smart. Well.. that's if I work on it at least. I most likely would complete it as there isn't much left to do.
Missed my message, does debug() in simba print into the debug box on smart you added?
Brandon
2013-05-15 00:28:04
From: Ollybest
Missed my message, does debug() in simba print into the debug box on smart you added?
Nope but I could do that. It wouldn't be too hard at all to add a function like: Procedure SmartDebugText(Text: String);
I left the debug as default where it prints anything that smart would normally print in the black console/cmd. And to help with debugging where a user can copy paste what's in the debug box and paste it on a thread to show the error they got if any. But yeah I actually thought about making scripts able to debug text in smart's debug console. Would probably be pretty nice.
From: Brandon
Nope but I could do that. It wouldn't be too hard at all to add a function like: Procedure SmartDebugText(Text: String);
I left the debug as default where it prints anything that smart would normally print in the black console/cmd. And to help with debugging where a user can copy paste what's in the debug box and paste it on a thread to show the error they got if any. But yeah I actually thought about making scripts able to debug text in smart's debug console. Would probably be pretty nice.
Even cooler if you could color code it "smartDebugText(s: string; color: TColor); :)
Brandon
2013-05-15 01:11:51
From: Ollybest
Even cooler if you could color code it "smartDebugText(s: string; color: TColor); :)
Done.
Added SmartParams.Simba (Works 100% (Tested 50 spawns 4 at a time in my 1.5gb ram Virtual Machine since my lappy is working hard on other stuff), AND its Backwards Compatible). SetupSmartEx for spawning this Smart and SetupSmart the untouched original function for spawning all other versions of smart.
Added OpenGL/DxPlugin loader.
Added SmartSetConsoleOutput(Visibility: Integer);
Added SmartDebugText(Text: String; Color: Integer);
Possible: If Ben's reflection Beta branch is completed, I'll add it after doing all the copyright and docs.
SmartSetConsoleOutput: 0 = Shows Smart's Output. 1 = Shows Script's Output. 2 = Shows Both Output.
Not sure if each Script should have its own debug box such that when you switch tabs it shows that script's box. If so, I'll add that.. If not, then the feature is complete.
All for a grand total of 38 exports and 1 bug in SmartClientCountPID. This bug isn't major and doesn't affect spawning tabs.. It only affects spawning tabs for a user specified smart process. All it is supposed to do is return a list of all clients belonging to a certain SmartProcess.. SmartClientCount(Unpaired: Boolean) returns a list of all clients matching the criteria as usual.
Just need to edit the Remote to fix the stupid SmartClientCountPID and do more tests.
This is what I'm testing with:
(*
Smart Params
============
.. contents::
*)
{$DEFINE SRL_SMART}
{$DEFINE SMART}
{$loadlib libsmartremote}
function GetSmartParams: TStringArray;
var
Params: TStringArray;
Page: String;
begin
Page := Between('<iframe id="game" src="', '"', GetPage('http://www.runescape.com/game.ws?j=1'));
Params := Explode(',', Page);
Result := Params;
end;
procedure FixSmartSpeed; //No longer needed but meh..
var
T: Integer;
begin
T:= GetSystemTime + 2000;
While (Not SmartIsActive) Do
begin
if (GetSystemTime >= T) Then
Break;
Wait(500);
end;
While (GetColor(382, 252) = 0) Do
begin
If RSReady then
Break;
SmartSetRefresh(SmartGetRefresh + 1);
MMouse(4, 4, 0, 0);
SmartSetRefresh(SmartGetRefresh - 1);
if (GetSystemTime >= T) Then
Break;
Wait(500);
end;
end;
function SmartGetClientIDs: TIntegerArray;
var
I, Count: Integer;
begin
Count := SmartClientCount(True);
SetLength(Result, Count);
If (Count > 0) then
For I:= 0 to (Count - 1) do
Result[I] := SmartClientID(I);
end;
Function SmartGetClientIDsEx(PID: Integer): TIntegerArray;
var
I, Count: Integer;
Begin
Count := SmartClientCountPID(PID);
SetLength(Result, Count);
If (Count > 0) then
For I:= 0 to (Count - 1) do
Result[I] := SmartClientID(I);
End;
Function SmartProcessIDs: TIntegerArray;
var
I, Count: Integer;
Begin
Count := SmartProcessCount;
SetLength(Result, Count);
If (Count > 0) Then
For I:= 0 to (Count - 1) do
Result[I] := SmartProcessID(I);
End;
procedure SmartKillClients; //SmartKillProccess as well..
var
IDs: TIntegerArray;
I: Integer;
begin
IDs := SmartGetClientIDs;
For I := High(IDs) DownTo 0 Do
If SmartKillClient(IDs[I]) Then
Writeln('Killed Client: ' + ToStr(IDs[I]))
else
Writeln('Failed To Kill Client: ' + ToStr(IDs[I]));
end;
procedure FreeSRL; Forward;
procedure SetupSRL; Forward;
procedure SixHourFix;
var
Trash: TVariantArray;
Refresh: Integer;
begin
FreeSRL;
Refresh := SmartGetRefresh;
SmartKillClient(SmartCurrentClient);
SetupSRL;
try
CallProc('SMART_FreeDebug', Trash);
CallProc('SMART_SetupDebug', Trash);
except
end;
SmartSetRefresh(Refresh);
try
if (not LoginPlayer) then
srl_Warn('SixHourFix', 'Could not log in player', warn_Terminate);
except
srl_Warn('SixHourFix', 'Players not declared', warn_Terminate);
end;
end;
function PairSmart(ID: Integer): Boolean;
var
I, Count: Integer;
IDs: TIntegerArray;
begin
IDs := SmartGetClientIDs; //COuld make a PairSmartEx to pair with PID.
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
If (IDs[I] = ID) and SmartPairClient(ID) then
begin
SetEIOSTarget('libsmartremote', ToStr(ID));
Writeln('Paired with SMART[' + ToStr(ID) + ']');
Result := True;
Exit;
end;
Writeln('** Failed To Pair Client: ' + ToStr(ID) + '; Client Does Not exist **');
end;
function InitSmart(ForceNew: Boolean): Integer;
var
I, Count: Integer;
IDs: TIntegerArray;
Params: TStringArray;
begin
If (Not ForceNew) then
begin
Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
end;
Params := GetSmartParams;
If (Length(Params) <> 2) then
begin
Writeln('** Failed To Grab Smart Parameters **');
Writeln('** Please check your internet connection/firewall **');
TerminateScript;
Exit;
end;
{$IFDEF SMART8}
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '');
{$ELSE}
Result := SmartSpawnClient(0, Params[0], ',' + Params[1], 765, 553, 's', '');
{$ENDIF}
If (Result > 0) Then
begin
try
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Loading SMART: ' + Params[0] + Params[1]);
except
WriteLn('** Fatal Error: Pairing Clients; Terminating Script **');
TerminateScript;
end;
end else
begin
Writeln('** Smart Cannot Spawn Clients **');
TerminateScript;
end;
end;
Function InitSmartEx(PID: Integer; ForceNew: Boolean): Integer;
var
I, Count: Integer;
IDs: TIntegerArray;
Params: TStringArray;
begin
If (Not ForceNew) then
begin
Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) Then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
end;
Params := GetSmartParams;
If (Length(Params) <> 2) then
begin
Writeln('** Failed To Grab Smart Parameters **');
Writeln('** Please check your internet connection/firewall **');
TerminateScript;
Exit;
end;
Result := SmartSpawnClient(PID, Params[0], ',' + Params[1], 765, 553, 's', '');
If (Result > 0) Then
begin
try
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Loading SMART: ' + Params[0] + Params[1]);
except
WriteLn('** Fatal Error: Pairing Clients; Terminating Script **');
TerminateScript;
end;
end else
begin
Writeln('** Smart Cannot Spawn Clients **');
TerminateScript;
end;
end;
procedure SetupSmart(ForceNewClient: Boolean);
var
T: Integer;
begin
T:= GetSystemTime + 120000;
Smart_CurrentClient:= InitSmart(ForceNewClient);
if (Smart_CurrentClient <= 0) then
begin
writeln('*** Smart Failed To Load ***');
TerminateScript;
end;
if (SRL_SixHourFix) then
SRL_Procs[SRL_OnRSUpdate]:= @SixHourFix;
While (GetColor(382, 252) <> 0) Do
begin
if RSReady then
break;
Wait(100);
if (GetTimeRunning >= 120000) then
begin
Writeln('*** Failed To Detect Clients ***');
TerminateScript;
end;
end;
end;
procedure SetupSmartEx(ForceNewClient: Boolean);
var
T, PID: Integer;
Processes: TIntegerArray;
begin
T:= GetSystemTime + 120000;
Processes := SmartProcessIDs;
if (Length(Processes) = 0) then //If no processes are alive, spawn a new client..
PID := SmartSpawnProcess(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), '', '') //SimbaPluginsFolder, JavaArgs, PluginsToLoad.
if (MaxClientsPerProcess = 0) then //if MaxClientsPerProcess.. Need to edit this and fix it..
//So that if MaxClientsPerProcess = SmartGetClientIDsPID(PID) then spawn a new Smart and add a tab..
PID := Processes[RandomRange(0, Length(Processes) - 1)]
else
PID := Processes[0];
Smart_CurrentClient:= InitSmartEx(PID, ForceNewClient);
if (Smart_CurrentClient <= 0) then
begin
writeln('*** Smart Failed To Load ***');
TerminateScript;
end;
if (SRL_SixHourFix) then
SRL_Procs[SRL_OnRSUpdate]:= @SixHourFix;
While (GetColor(382, 252) <> 0) Do
begin
if RSReady then
break;
Wait(100);
if (GetTimeRunning >= 120000) then
begin
Writeln('*** Failed To Detect Clients ***');
TerminateScript;
end;
end;
end;
Flight
2013-05-15 01:22:56
From: Brandon
Done.
Added SmartParams.Simba (Works 100% (Tested 50 spawns 4 at a time in my 1.5gb ram Virtual Machine since my lappy is working hard on other stuff), AND its Backwards Compatible). SetupSmartEx for spawning this Smart and SetupSmart the untouched original function for spawning all other versions of smart.
Added OpenGL/DxPlugin loader.
Added SmartSetConsoleOutput(Visibility: Integer);
Added SmartDebugText(Text: String; Color: Integer);
Well that was quick, you beat me to it. Did you upload this to the OP already? I must have missed it. Also I'll probably just compile the client itself minus the plugins if you've already implanted OpenGL. Wonderful job Brandon.
From: Brandon
Possible: If Ben's reflection Beta branch is completed, I'll add it after doing all the copyright and docs.
I'm quite sure that it's not. But whether it's incomplete in the client itself or the plugins I'm not sure.
Would be nice if each script(tab) had a separate debug box, its something that simba always lacked :p
Ashaman88
2013-05-15 12:10:05
This is awesome Brandon! So will it just reload said tab when the six hours is up?
footballjds
2013-05-15 13:33:20
From: Ollybest
Would be nice if each script(tab) had a separate debug box, its something that simba always lacked :p
That would be amazing!
Brandon
2013-05-16 00:47:37
From: footballjds
That would be amazing!
Believe me it is.. Especially when I get to create it.. Took me so long to create a nice console and make one for each tab..
http://i.imgur.com/qbDrePq.pnghttp://i.imgur.com/VLmI1yy.pngI wrote a sort of parser for BBCodes for the console (needs work as its case sensitive and I decided to limit the BB-Codes that can be entered):
private static String BBToHTML(String text) {
HashMap<String, String> BBCodes = new HashMap<>();
BBCodes.put("\\r|\\n|\\r\\n", "<br/>");
BBCodes.put("\\[b\\](.+?)\\[/b\\]", "<b>$1</b>");
BBCodes.put("\\[i\\](.+?)\\[/i\\]", "<span style='font-style:italic;'>$1</span>");
BBCodes.put("\\[u\\](.+?)\\[/u\\]", "<span style='text-decoration:underline;'>$1</span>");
BBCodes.put("\\[center\\](.+?)\\[/center\\]", "<div align='center'>$1");
BBCodes.put("\\[align=(.+?)\\](.+?)\\[/align\\]", "<div align='$1'>$2");
BBCodes.put("\\[color=(.+?)\\](.+?)\\[/color\\]", "<span style='color:$1;'>$2</span>");
BBCodes.put("\\[img\\](.+?)\\[/img\\]", "<img src='$1' />");
BBCodes.put("\\[img=(.+?),(.+?)\\](.+?)\\[/img\\]", "<img width='$1' height='$2' src='$3' />");
BBCodes.put("\\[url\\](.+?)\\[/url\\]", "<a href='$1'>$1</a>");
BBCodes.put("\\[url=(.+?)\\](.+?)\\[/url\\]", "<a href='$1'>$2</a>");
for (Map.Entry<String, String> entry: BBCodes.entrySet()) {
text = text.replaceAll(entry.getKey().toString(), entry.getValue().toString());
}
return text;
}
Uhh for the HTML stuff its pretty cool but its also limited: No Javascript, Applets, DOM scripting, nothing like that. Just pure HTML. Outgoing connections and links are caught and a message is displayed to the user:
Only thing left that I can think of right now is to document it all and touch up the makefile as I finished everything and tested everything.. But of course, someone else always finds a bug in someone else's code..
bored of debugging?
Make a button that displays all the tabs on one page (obviously massively zoomed out) so a user can keep track of all there bots on 1 screen :p
But on a more serious note what you've done above is amazing.
From: Brandon
Believe me it is.. Especially when I get to create it.. Took me so long to create a nice console and make one for each tab..
http://i.imgur.com/qbDrePq.png
http://i.imgur.com/VLmI1yy.png
I wrote a sort of parser for BBCodes for the console (needs work as its case sensitive and I decided to limit the BB-Codes that can be entered):
private static String BBToHTML(String text) {
HashMap<String, String> BBCodes = new HashMap<>();
BBCodes.put("\\r|\\n|\\r\\n", "<br/>");
BBCodes.put("\\[b\\](.+?)\\[/b\\]", "<b>$1</b>");
BBCodes.put("\\[i\\](.+?)\\[/i\\]", "<span style='font-style:italic;'>$1</span>");
BBCodes.put("\\[u\\](.+?)\\[/u\\]", "<span style='text-decoration:underline;'>$1</span>");
BBCodes.put("\\[center\\](.+?)\\[/center\\]", "<div align='center'>$1");
BBCodes.put("\\[align=(.+?)\\](.+?)\\[/align\\]", "<div align='$1'>$2");
BBCodes.put("\\[color=(.+?)\\](.+?)\\[/color\\]", "<span style='color:$1;'>$2</span>");
BBCodes.put("\\[img\\](.+?)\\[/img\\]", "<img src='$1' />");
BBCodes.put("\\[img=(.+?),(.+?)\\](.+?)\\[/img\\]", "<img width='$1' height='$2' src='$3' />");
BBCodes.put("\\[url\\](.+?)\\[/url\\]", "<a href='$1'>$1</a>");
BBCodes.put("\\[url=(.+?)\\](.+?)\\[/url\\]", "<a href='$1'>$2</a>");
for (Map.Entry<String, String> entry: BBCodes.entrySet()) {
text = text.replaceAll(entry.getKey().toString(), entry.getValue().toString());
}
return text;
}
Uhh for the HTML stuff its pretty cool but its also limited: No Javascript, Applets, DOM scripting, nothing like that. Just pure HTML. Outgoing connections and links are caught and a message is displayed to the user:
Only thing left that I can think of right now is to document it all and touch up the makefile as I finished everything and tested everything.. But of course, someone else always finds a bug in someone else's code..
Great work man.
I would +rep but you know…
Wow, this all looks really nice :)
Flight
2013-05-18 20:57:32
@Brandon: How are you coming along on the overhauled SMART 8.1? Got a source ready for us yet? :D
Brandon
2013-05-18 22:53:03
From: Flight
@Brandon: How are you coming along on the overhauled SMART 8.1? Got a source ready for us yet? :D
Yeah (source & bin). There's simba folder as well with changes I made and a ReadMe that includes everything I changed.. My current C++ compiler is
x64-4.8.0-release-posix-seh-rev2.7 for X64 ONLY.
For both x32 & x64, I use:
x64-4.8.0-release-posix-sjlj-rev2.7 which compiles both x32 & x64 for windows. I believe codeblocks still ships with 4.7.2? Iunno. Something like that. No difference though.
http://www.mediafire.com/?9afg7trrn29q9axYou can make changes in the makefile at the very top to specify what java you are using to compile it with if you want.
I haven't changed too much in the smart since my last post but it includes everything I said it would and everything I said it did. :( Poor acidbot lol I stopped dev on it.. Meh.. spare time..
Flight
2013-05-18 23:49:48
Damn Brandon you've worked a lot on this man, just reading through your list of changes & explanations; amazing work. This is much appreciated. I'm going to go through it today see how it works out and what not. Great job man. :thumbsup:
Edit:
In your SmartParams, where is the 'MaxClientsPerProcess' variable defined? I don't see it being loaded from the plugins.
Edit2:
I don't see how to load libraries while spawning SMART, like the OpenGL library. Is this no longer in the parameters? Hm, changing the default operating mode to OpenGL froze SMART on start up.
Brandon
2013-05-19 01:55:17
From: Flight
Damn Brandon you've worked a lot on this man, just reading through your list of changes & explanations; amazing work. This is much appreciated. I'm going to go through it today see how it works out and what not. Great job man. :thumbsup:
Edit:
In your SmartParams, where is the 'MaxClientsPerProcess' variable defined? I don't see it being loaded from the plugins.
Edit2:
I don't see how to load libraries while spawning SMART, like the OpenGL library. Is this no longer in the parameters? Hm, changing the default operating mode to OpenGL froze SMART on start up.
Ooops I defined it in globals.simba. And yeah the parameters are still there type SmartSpawnClient into the functions box to see what params it takes.. I was working on finding a way to load OpenGL per tab but that's simply not possible :( DLL's on Windows can only load once per process so yeah..
Uhh it shouldn't freeze smart it loads fine here :S I will check it again.
Flight
2013-05-19 02:25:16
From: Brandon
Ooops I defined it in globals.simba. And yeah the parameters are still there type SmartSpawnClient into the functions box to see what params it takes.. I was working on finding a way to load OpenGL per tab but that's simply not possible :( DLL's on Windows can only load once per process so yeah..
Uhh it shouldn't freeze smart it loads fine here :S I will check it again.
Ah right, well "SmartSpawnClient" doesn't include a parameter for loading plugins, that's done in "SmartSpawnProcess". I'll try it now and see what happens. By the way I've edited the client to use OpenGL as the default operating mode. I'm not sure if this is needed but just to be safe… I'll edit this post after I've tried it with loading OpenGL.
No success when it comes to GL and I've tried every combination I can think of.
Brandon
2013-05-19 03:08:47
From: Flight
Ah right, well "SmartSpawnClient" doesn't include a parameter for loading plugins, that's done in "SmartSpawnProcess". I'll try it now and see what happens. By the way I've edited the client to use OpenGL as the default operating mode. I'm not sure if this is needed but just to be safe… I'll edit this post after I've tried it with loading OpenGL.
No success when it comes to GL and I've tried every combination I can think of.
Hmmmm I'm checking it now.. I somehow managed to mess up either my drivers or the client. Mine simply says "Runescape cannot enter that mode, please visit our page… blah blah blah.." Only when I load it with Simba. Loading it otherwise works just fine :S
The regular smart isn't loading OGL either when it used to.. :l gah.. I'll sort this out.
EDIT:


OpenGL/DirectX modes works perfectly fine on my windows 7 laptop but no longer works on my windows 8. Also notice that I did not have to switch the Modes either.. When I switch the modes, it displays all the OpenGL models/hooks from GLHook/DxHook. If I put the mode in safemode, the hooks won't show but the rendering works just fine.
I found two bugs then: a: ModeSwitching needs a fix. b: Graphics button needs a fix.
EDIT: Fixed ModeSwitching. Fixed Graphics Button. Fixing OpenGL/DirectX black screen that you're talking about.
EDIT: Fixed Black Screen/Freezing for OpenGL/DirectX.. Turns out my synchronization was locking the AwtEventQueue.. Extra stupid.. I'm thinking I should let it display the black screen if RS itself is not in OpenGL/DirectX mode or just let it render (all minus the freezing).
See the commented out code below:
@Override
protected void dispatchEvent(AWTEvent event) {
//synchronized (Block) { //CAUSE OPENGL/DIRECTX Modes TO LOCK.. Should never synchronize in the dispatchEvent function.
//AWT takes care of that.. Safemode doesn't lock however :l lol..
if (event instanceof UnblockedEvent) {
AWTEvent e = ((UnblockedEvent) event).event;
((Component) e.getSource()).dispatchEvent(e);
} else if (Block.containsKey(event.getSource())) {
boolean Input[] = Block.get(event.getSource());
if (event instanceof KeyEvent && Input[1]) {
super.dispatchEvent(event);
} else if (event instanceof MouseEvent || event instanceof MouseWheelEvent) {
if (Input[0]) {
super.dispatchEvent(event);
} else if (Input[1] && event.getID() == MouseEvent.MOUSE_CLICKED && event.getSource() instanceof Canvas) {
Canvas canvas = ((Canvas) event.getSource());
if (canvas.getMousePosition() != null && canvas.isShowing() && !canvas.isFocusOwner()) {
canvas.requestFocusInWindow();
}
}
} else if ((event instanceof FocusEvent || event instanceof WindowEvent) && Input[0]) {
super.dispatchEvent(event);
} else {
super.dispatchEvent(event);
}
} else {
super.dispatchEvent(event);
}
//}
}
EDIT Plugin loaders:
package JNI;
import java.io.File;
import java.util.ArrayList;
import smart.Main;
public class PluginLoader {
private static PluginLoader instance = new PluginLoader();
private static ArrayList<String> Plugins = new ArrayList<>();
private PluginLoader() {
}
public static PluginLoader getInstance() {
return instance;
}
public static void load(String Path) {
File plugin = new File(Path.trim());
String pluginName = plugin.getName().toLowerCase();
if (plugin.isFile() && !Plugins.contains(pluginName)) {
System.load(plugin.getAbsolutePath());
Plugins.add(pluginName);
Main.debug("Loaded: Smart_" + plugin.getName());
if (pluginName.contains("opengl32.dll")) {
GLDXLoader.OpenGLLoaded = true;
} else if (pluginName.contains("d3d9d.dll") || pluginName.contains("d3d11d.dll")) {
GLDXLoader.DirectXLoaded = true;
}
}
}
public static void loadAll(String[] Paths) {
for (String Path : Paths) {
load(Path);
}
}
public static void loadAll(String PluginsPath, String[] Paths) {
for (String Path : Paths) {
load(PluginsPath + "/" + Path);
}
}
}
package JNI;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
import smart.OperatingMode;
public class GLDXLoader {
private int ByteSize = 0;
private IntBuffer IBuffer = null;
private ByteBuffer BBuffer = null;
private OperatingMode Mode = null;
private BufferedImage Image = null;
public static boolean OpenGLLoaded = false;
public static boolean DirectXLoaded = false;
//ByteSize = ((ImageWidth * BitsPerPixel + 31) / 32) * 4 * ImageHeight;
private static native void GetOpenGLBuffer(IntBuffer Buffer);
private static native void GetDirectXBuffer(IntBuffer Buffer);
public GLDXLoader(ByteBuffer Buffer, int ImageWidth, int ImageHeight) {
if (Buffer != null) {
this.BBuffer = Buffer;
this.IBuffer = BBuffer.order(ByteOrder.LITTLE_ENDIAN).asIntBuffer();
}
}
public GLDXLoader(int ImageWidth, int ImageHeight) {
ByteSize = ImageWidth * ImageHeight * 4;
BBuffer = ByteBuffer.allocateDirect(ByteSize).order(ByteOrder.LITTLE_ENDIAN);
IBuffer = BBuffer.asIntBuffer();
}
public void SetSize(int ImageWidth, int ImageHeight) {
BBuffer = null;
IBuffer = null;
ByteSize = ImageWidth * ImageHeight * 4;
BBuffer = ByteBuffer.allocateDirect(ByteSize).order(ByteOrder.LITTLE_ENDIAN);
IBuffer = BBuffer.asIntBuffer();
}
private void readBuffer(IntBuffer Buffer, OperatingMode Mode) {
Buffer.rewind();
switch (Mode) {
case OpenGL:
GetOpenGLBuffer(Buffer);
case DirectX:
GetDirectXBuffer(Buffer);
default:
break;
}
}
public void setMode(OperatingMode Mode) {
switch (this.Mode = Mode) {
case OpenGL:
OpenGLLoaded = true;
break;
case DirectX:
DirectXLoaded = true;
break;
default:
break;
}
}
public ByteBuffer GetBuffer() {
readBuffer(IBuffer, Mode);
return BBuffer;
}
public void GetBuffer(ByteBuffer Buffer) {
readBuffer(Buffer.asIntBuffer(), Mode);
}
public void GetBuffer(IntBuffer Buffer) {
readBuffer(Buffer, Mode);
}
public BufferedImage VerticalFlip(BufferedImage imageIn) {
AffineTransform tx = AffineTransform.getScaleInstance(1, -1);
tx.translate(0, -Image.getHeight(null));
AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
imageIn = op.filter(imageIn, null);
return imageIn;
}
public BufferedImage HorizontalFlip(BufferedImage imageIn) {
AffineTransform tx = AffineTransform.getScaleInstance(-1, 1);
tx.translate(-Image.getHeight(null), 0);
AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
imageIn = op.filter(imageIn, null);
return imageIn;
}
public BufferedImage AxisFlip(BufferedImage imageIn) {
AffineTransform tx = AffineTransform.getScaleInstance(-1, -1);
tx.translate(-Image.getWidth(null), -Image.getWidth(null));
AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
imageIn = op.filter(imageIn, null);
return imageIn;
}
}
Why are tab-IDs so big (56k)
just wondering :p
Brandon
2013-05-19 15:46:48
From: Ollybest
Why are tab-IDs so big (56k)
just wondering :p
Believe me I thought about making them smaller.. It was pretty hard coming up with a way to make ID's unique but I thought I'd just make life simple and use the ThreadID.. aka the ID of the Thread that spawned the client. The downside to this is that IF threads are process threads and not system threads then I'll have to append the Process ID to it. No matter, the user never has to keep track of this info anyway. I can simply make the Tabs show "Tab 1", "Tab 2", etc, and still use the ThreadID's under the hood.
EDIT: Going to use Ben's Process Pairing mixed with my Tab-Pairing. This would get rid of that extremely rare crash on load I just experienced after fixing the modes.
From: Brandon
Believe me I thought about making them smaller.. It was pretty hard coming up with a way to make ID's unique but I thought I'd just make life simple and use the ThreadID.. aka the ID of the Thread that spawned the client. The downside to this is that IF threads are process threads and not system threads then I'll have to append the Process ID to it. No matter, the user never has to keep track of this info anyway. I can simply make the Tabs show "Tab 1", "Tab 2", etc, and still use the ThreadID's under the hood.
EDIT: Going to use Ben's Process Pairing mixed with my Tab-Pairing. This would get rid of that extremely rare crash on load I just experienced after fixing the modes.
ah, so there is alot of logic behind it. :)
but… this might be some fun, adding custom mouse presets (the red dot….. a cross, a big dot… etc).
From: Ollybest
ah, so there is alot of logic behind it. :)
but… this might be some fun, adding custom mouse presets (the red dot….. a cross, a big dot… etc).
I might tinker with it and add an option to upload your own image, and use that as a curser.
Think anyone would use?
From: NKN
I might tinker with it and add an option to upload your own image, and use that as a curser.
Think anyone would use?
Meh, id rather just have a small set of presets.
From: Ollybest
Meh, id rather just have a small set of presets.
WELL FINE.
From: NKN
WELL FINE.
"meh
id rather…"
:D go ahead if you want to lol
So wait, Brandon, you're actively developing this?
Brandon
2013-05-19 16:48:10
From: Sin
So wait, Brandon, you're actively developing this?
Originally I didn't have any plans to and I still don't really.. I was working on this first then I gave up on editing smart because there was so much to do.. So I wrote my own bot from scratch which I named after sulphuric acid after watching discovery channel ;).. Then I gave up on that because I got bored and decided I'll just see how much I can do to smart.. And yeah.
Meh I just wanna finish something for once I guess.. As soon as I finish fixing and adding everything, I think I'll move on to something else really. As soon as I fix that stupid pairing thing I mentioned earlier, I think I'll be finished. I'm sorta looking forward to SRL's reflection rebirth and NKN bot.
EDIT: Added previous plugin loader to previous post.
From: Brandon
Originally I didn't have any plans to and I still don't really.. I was working on this first then I gave up on editing smart because there was so much to do.. So I wrote my own bot from scratch which I named after sulphuric acid after watching discovery channel ;).. Then I gave up on that because I got bored and decided I'll just see how much I can do to smart.. And yeah.
Meh I just wanna finish something for once I guess.. As soon as I finish fixing and adding everything, I think I'll move on to something else really. As soon as I fix that stupid pairing thing I mentioned earlier, I think I'll be finished. I'm sorta looking forward to SRL's reflection rebirth and NKN bot.
EDIT: Added previous plugin loader to previous post.
Sadly, NKN bot is on hold, until I figure out how to fix that double buffer.(no idea how to code that atm lol.)
Brandon
2013-05-19 18:10:33
From: NKN
Sadly, NKN bot is on hold, until I figure out how to fix that double buffer.(no idea how to code that atm lol.)
Couldn't get your code to run.. I uncommented your code to download the jar and inject but:
Exception in thread "main" java.lang.VerifyError: (class: client, method: getCameraPitch signature: ()I) Expecting to find integer on stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getConstructor0(Class.java:2723)
at java.lang.Class.newInstance0(Class.java:345)
at java.lang.Class.newInstance(Class.java:327)
at com.nkn.generic.frame.<init>(frame.java:131)
at com.nkn.Main.<init>(Main.java:16)
at com.nkn.Main.main(Main.java:9)
BUILD SUCCESSFUL (total time: 22 seconds)
Also, why not just override the canvas class via java -jar NKNBot.jar -XBootclasspath/p:"NKNBot.jar" where NKNBot.jar contains your own java.awt.Canvas.java class?
RSBot used to do it differently:
c.getMethod("provideLoaderApplet", new Class[]{java.applet.Applet.class}).invoke(null, this); where "this" is their own custom class that extends applet.
from:
https://github.com/Ineedajob/RSBot/blob/master/src/org/rsbot
From: Brandon
Couldn't get your code to run.. I uncommented your code to download the jar and inject but:
Exception in thread "main" java.lang.VerifyError: (class: client, method: getCameraPitch signature: ()I) Expecting to find integer on stack
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
at java.lang.Class.getConstructor0(Class.java:2723)
at java.lang.Class.newInstance0(Class.java:345)
at java.lang.Class.newInstance(Class.java:327)
at com.nkn.generic.frame.<init>(frame.java:131)
at com.nkn.Main.<init>(Main.java:16)
at com.nkn.Main.main(Main.java:9)
BUILD SUCCESSFUL (total time: 22 seconds)
Also, why not just override the canvas class via java -jar NKNBot.jar -XBootclasspath/p:"NKNBot.jar" where NKNBot.jar contains your own java.awt.Canvas.java class?
RSBot used to do it differently:
c.getMethod("provideLoaderApplet", new Class[]{java.applet.Applet.class}).invoke(null, this); where "this" is their own custom class that extends applet.
from:
https://github.com/Ineedajob/RSBot/blob/master/src/org/rsbot
Don't uncomment anything, it's all injecting already in frame.java. ;)
I'd like to use a double buffer, seems idk.. less hacky to me.
Brandon
2013-05-19 18:26:16
If I don't uncomment, it won't load.. it cannot find a gamepack.jar without downloading one.
And both methods I mentioned HAVE to use double buffers because RS by nature is Double Buffered. Overriding it is also less hacky because the other way, you'd have to inject/reflect it ;).
From: Brandon
If I don't uncomment, it won't load.. it cannot find a gamepack.jar without downloading one.
And both methods I mentioned HAVE to use double buffers because RS by nature is Double Buffered. Overriding it is also less hacky because the other way, you'd have to inject/reflect it ;).
Whoops, thought I left that in there.
:3
You should write a guide on creating that canvas thing. I don't really get overloading stuff.
Flight
2013-05-19 21:30:59
From: Ollybest
ah, so there is alot of logic behind it. :)
but… this might be some fun, adding custom mouse presets (the red dot….. a cross, a big dot… etc).
I use this 40x40 cross as my mouse cursor, I like it much better:

From: NKN
Whoops, thought I left that in there.
:3
You should write a guide on creating that canvas thing. I don't really get overloading stuff.
You've probably already read this but incase you've missed it:
http://www.moparisthebest.com/smf/index.php/topic,396252.0.htmlEdit:
Oh yeah, let me know when you've added your most resent fixes & plugins work to the OP, Brandon.
Wu-Tang Clan
2013-05-19 22:17:52
Wow. I tried learning Java and all I have for you is respect. This is quite awesome- too bad I don't understand it. Maybe I'll get back into it…
Brandon
2013-05-19 23:09:31
From: Joseph D
Wow. I tried learning Java and all I have for you is respect. This is quite awesome- too bad I don't understand it. Maybe I'll get back into it…
From: NKN
Whoops, thought I left that in there.
:3
You should write a guide on creating that canvas thing. I don't really get overloading stuff.
@Flight; I'll add them later I guess.. Too tired now after such a long tutorial..
Here:
http://villavu.com/forum/showthread.php?t=103202It's a lot about the client..
Brandon
2013-05-22 19:58:02
From: Brandon
@Flight; I'll add them later I guess.. Too tired now after such a long tutorial..
Here: http://villavu.com/forum/showthread.php?t=103202
Merged Benland's Client Pairing with my Client Pairing.
It's a lot about the client..
@Flight; Updated OP and notified as requested. I believe I'm finished everything now unless there are bugs or anything to address..
Wait. so it fixed the pairing issues where Simba would randomly choose one? o.O
Brandon
2013-05-22 20:24:34
From: NKN
Wait. so it fixed the pairing issues where Simba would randomly choose one? o.O
That I did not do. I never knew that happens and I never actually was asked to look into that. What I did was browse the forums for Suggested Smart features from a while back and implemented those as well as the suggestions on this thread + the features of my Acid-Bot.
Also, that's actually a Simba issue. I believe all scripts run in a thread. When the script is finished running the thread dies and Smart is unpaired because the thread it was paired to died.
Simba doesn't re-use threads or use a thread pool. If it did, that would be fixed automatically.. Though I have a way of fixing it, it'd be sorta a pain unless its really needed/wanted.
From: Brandon
That I did not do. I never knew that happens and I never actually was asked to look into that. What I did was browse the forums for Suggested Smart features from a while back and implemented those as well as the suggestions on this thread + the features of my Acid-Bot.
Also, that's actually a Simba issue. I believe all scripts run in a thread. When the script is finished running the thread dies and Smart is unpaired because the thread it was paired to died.
Simba doesn't re-use threads or use a thread pool. If it did, that would be fixed automatically.. Though I have a way of fixing it, it'd be sorta a pain unless its really needed/wanted.
Whats your way of fixing it?
Brandon
2013-05-22 20:36:48
From: NKN
Whats your way of fixing it?
Well it's pretty difficult with the way EIOS works but I'd edit Simba and export a function like GetCurrentTab.
Then in Smart I'd pair like:
getpid() + _ + TabID. And that would permanently pair Smart with the Specified Tab. The downside to this is that if a SimbaTab closes then it'd mess everything else up..
Another way is to just make Simba re-use its threads rather than wasting resources spawning new ones everytime we press play.. When simba closes then the thread dies.
If you have any other ideas then I'd be glad to hear them if I have to implement this..
From: Brandon
Well it's pretty difficult with the way EIOS works but I'd edit Simba and export a function like GetCurrentTab.
Then in Smart I'd pair like:
getpid() + _ + TabID. And that would permanently pair Smart with the Specified Tab. The downside to this is that if a SimbaTab closes then it'd mess everything else up..
Another way is to just make Simba re-use its threads rather than wasting resources spawning new ones everytime we press play.. When simba closes then the thread dies.
If you have any other ideas then I'd be glad to hear them if I have to implement this..
Is it possible to have a function in Simba that picks what TabID it uses, then you can set the tab in DelcarePlayers? That'd allow for each script to use its own tab ID?
Brandon
2013-05-22 20:43:00
From: NKN
Is it possible to have a function in Simba that picks what TabID it uses, then you can set the tab in DelcarePlayers? That'd allow for each script to use its own tab ID?
Well that would be pointless because you can already force scripts to pair with a certain SmartID or Tab.
From: Brandon
Well that would be pointless because you can already force scripts to pair with a certain SmartID or Tab.
Wait… then what's the issue with it then?
Brandon
2013-05-22 20:45:21
From: NKN
Wait… then what's the issue with it then?
The issue with that is that when a script is finished executing or you stop it, you have to manually type in which client you want to pair with. There is no way to automatically do it.. Only Scar 4.00 can do that because each script has its own process.
Justin
2013-05-22 21:06:05
Title updated as requested (Smart-Overhaul)
Flight
2013-05-22 21:32:21
From: Brandon
@Flight; Updated OP and notified as requested. I believe I'm finished everything now unless there are bugs or anything to address..
Wonderful news Brandon, I'll get on this and do some testing this morning. As always this is much appreciated. :)
Hey Brandon, how are you loading up OGL mode via Simba? Everything I've tried renders the same result. I'm quite sure I've loaded OpenGL32.dll correct as an external plugin (I wouldn't know since there's no confirmation from SMART when a plugin is loaded) and I set the Operating Mode to OpenGL at the splash screen and again during the client loading. I even changed SMART's default Operating Mode to OpenGL; same results. So I'd sure love to know how you're doing it.
Brandon
2013-05-23 01:17:06
From: Flight
Wonderful news Brandon, I'll get on this and do some testing this morning. As always this is much appreciated. :)
Hey Brandon, how are you loading up OGL mode via Simba? Everything I've tried renders the same result. I'm quite sure I've loaded OpenGL32.dll correct as an external plugin (I wouldn't know since there's no confirmation from SMART when a plugin is loaded) and I set the Operating Mode to OpenGL at the splash screen and again during the client loading. I even changed SMART's default Operating Mode to OpenGL; same results. So I'd sure love to know how you're doing it.
Oh god.. I feel so stupid.. I was printing "Plugin Loaded" before the Frame was even showing.. No wonder you couldn't see it.. When I run it via command line, it was showing but I didn't notice that it never printed in the console..
I'll update the OP. All I did was switch a couple lines around so that it loads plugins AFTER the frame shows.. Now you should always see that Mini-Console as intended..
EDIT: OP Updated.. *sigh*..
It prints plugin information, it'd look like:

Sawyer
2013-05-23 08:11:30
@Ggzz
How exactly should I install this new smart? What steps should I take?
footballjds
2013-05-23 11:25:23
great work brandon, do you have a paypal? or would you prefer another form of donation?
Brandon
2013-05-23 16:23:31
From: footballjds
great work brandon, do you have a paypal? or would you prefer another form of donation?
Free of charge no donation necessary.. I did it in my boredom free-time. Just donate it to the site or benland I guess..
@the guy questioning how to setup, its the same as the regular Smart 8.0 setup.
So what do I put in the plug-ins folder, the whole file or just the contents bin?
Brandon
2013-05-23 16:36:00
From: Officer Barbrady
So what do I put in the plug-ins folder, the whole file or just the contents bin?
You replace your Smart plugins with these plugins. So yeah the contents of the bin. Then you replace your .Simba files with the corresponding ones in the Simba folder.
Everything else from there is the same.
footballjds
2013-05-23 17:16:37
From: Brandon
Free of charge no donation necessary.. I did it in my boredom free-time.
I get that. but it's bad-ass
Get this error after installing everything:
[Error] C:\Simba\Includes\SRL/SRL/misc/SmartParams.Simba(446:12): Unknown identifier 'MaxClientsPerProcess' at line 445
Compiling failed.
Brandon
2013-05-23 19:10:28
From: Officer Barbrady
Get this error after installing everything:
[Error] C:\Simba\Includes\SRL/SRL/misc/SmartParams.Simba(446:12): Unknown identifier 'MaxClientsPerProcess' at line 445
Compiling failed.
You can just add a variable with the same name to your Globals.simba or just add a var to the function. That variable isn't used yet.
YoHoJo
2013-05-23 19:16:39
Creamed my pants.
++rep.
WOW
Very nice Brandon! Looks great
Sawyer
2013-05-23 22:18:41
@Brandon[Error] C:\Simba2\Includes\SRL/SRL/misc/SmartParams.Simba(315:131): Invalid number of parameters at line 314
Compiling failed.
That message comes up in the debug box when I try to run a script to open smart. This is lines like 312-315 or so in your SmartParams:
{$IFDEF SMART8}
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '');
{$ELSE}
Did I not correctly put the files in?
EDIT: Defining Smart works, not SMART8
Flight
2013-05-23 22:25:01
From: Sawyer
@Brandon
[Error] C:\Simba2\Includes\SRL/SRL/misc/SmartParams.Simba(315:131): Invalid number of parameters at line 314
Compiling failed.
That message comes up in the debug box when I try to run a script to open smart. This is lines like 312-315 or so in your SmartParams:
{$IFDEF SMART8}
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '');
{$ELSE}
Did I not correctly put the files in?
In your script you'll want to define SMART as "{$DEFINE SMART}", not SMART8.
Sawyer
2013-05-23 22:27:28
From: Flight
In your script you'll want to define SMART as "{$DEFINE SMART}", not SMART8.
Ah, thanks. It says
{IFDEF SMART8} though…
EDIT: It worked, Thanks Flight :) I'll see how smartgraphics and the 6 hour reload work for it.
Great work Brandon!!
Hazzah
2013-05-24 08:54:27
This makes me want to start botting again!
+Repd
e: Apparently I must spread some reputation around first :/
Sawyer
2013-05-24 21:59:05
After 6 hours, it said SMART can not spawn clients even though it loaded. Could be just a rare error. I will test it more.
From: Sawyer
After 6 hours, it said SMART can not spawn clients even though it loaded. Could be just a rare error. I will test it more.
I've had that before on the normal SMART8. Not often but occasionally.
grats
2013-05-24 23:14:47
really good stuff and some little updates I wish were added way long ago when I botted, all nice
Brandon
2013-05-24 23:16:19
From: Sawyer
After 6 hours, it said SMART can not spawn clients even though it loaded. Could be just a rare error. I will test it more.
Not an error. By Design, Smart's sockets time-out after 10 seconds/tries (1 second per try C++ side, 500ms Unpairing time Java side).
500ms means that if you connected successfully to a smart and somehow get disconnected (never happens unless a script is terminated), you have a 500ms interval time to reconnect and thats pretty flawless. The problem is the C++ side where the sockets are non-blocking and use "select" to send a pulse of commands every 10 seconds/tries. After connecting, it stops trying being its connected. If you didn't connect within 10 seconds, it times-out and gives that error you saw there (aka returns -1).
In all reality, the design of the original smart which was incorporated into this one is that Java side = server and C++ side = client. Server constantly listens and client has to connect.
I can of course change the amount of time it takes to time-out or get rid of it all together by making the socket asynchronous instead of non-blocking I guess.. I sorta chose to leave the original code there as to not get rid of completely everything Ben wrote. I didn't choose the time-outs, they use the exact same ones as the original Smart 7.2/8.0/8.1
Sawyer
2013-05-25 00:12:21
From: Brandon
Not an error. By Design, Smart's sockets time-out after 10 seconds/tries (1 second per try C++ side, 500ms Unpairing time Java side).
500ms means that if you connected successfully to a smart and somehow get disconnected (never happens unless a script is terminated), you have a 500ms interval time to reconnect and thats pretty flawless. The problem is the C++ side where the sockets are non-blocking and use "select" to send a pulse of commands every 10 seconds/tries. After connecting, it stops trying being its connected. If you didn't connect within 10 seconds, it times-out and gives that error you saw there (aka returns -1).
In all reality, the design of the original smart which was incorporated into this one is that Java side = server and C++ side = client. Server constantly listens and client has to connect.
I can of course change the amount of time it takes to time-out or get rid of it all together by making the socket asynchronous instead of non-blocking I guess.. I sorta chose to leave the original code there as to not get rid of completely everything Ben wrote. I didn't choose the time-outs, they use the exact same ones as the original Smart 7.2/8.0/8.1
Ah… it didn't do the sixhourfix again, but this time the debug read:
'Runescape has been updated.'
Runescape has been updated! Waiting 5 minutes to restart SMART!
SRL Compiled in 47 msec
Loading SMART: http://world7.runescape.com/f149607114943218756
*** Failed To Detect Clients ***
Successfully executed.
Should I manually increase the timeout times? Are those in smartparams?
From: Brandon
If you didn't connect within 10 seconds, it times-out and gives that error you saw there (aka returns -1).
I've had that error before even when it spawns instantly, and the it doesn't wait 10 seconds to five me the error, the error happens right when it spawns.
Sawyer
2013-05-25 09:23:23
I also had some errors where it said it paired with the smart, but never actually did anything with it. Just sat there at the login screen even though the simba debug box said it was logging in.
EDIT: It was just working last night, but now simba doesn't interact with the SMART at all.
EDIT2: GAH! I feel stupid. I wasn't activating the client!
Brandon
2013-05-25 09:58:00
From: Sawyer
I also had some errors where it said it paired with the smart, but never actually did anything with it. Just sat there at the login screen even though the simba debug box said it was logging in.
EDIT: It was just working last night, but now simba doesn't interact with the SMART at all.
EDIT2: GAH! I feel stupid. I wasn't activating the client!
Kk I will fix all this stuff when I get home if it can or needs fixing.. Just make a list of all bugs or something. I re-wrote the OpenGL JNI so far so that you pass the JNIBuffer pointer once, it auto-rewinds and stores it so that every frame it writes to the pointer for the regular full RS fps without delay/need for a thread.
I cannot seem to fine the line that prints: "*** Failed To Detect Clients ***" anywhere in any of the source files. Are you sure? :S
EDIT: Found the line.. That's an SRL problem. What the chunk of code does is that it looks for a black screen or RSReady. If its found, then it knows that SMART is on the screen. TBH, I was the one who came up with that idea because at that time in SRL's history, when smmart had just been re-written by Ben from 7.2 to 8.0, SMART had this really really slow loading problem. It was so bad you had to toggle the Slider up and down to make it load nice and fast AND we had to detect Smart being on the screen so that we can move the mouse 1-2px to load faster..
With this version of Smart and Smart "8.1 original", these lines of code need not even be there. However, if it is there then the only time it should fail is if you're in a wrong mode such that Simba cannot detect the colours OR if Smart actually didn't spawn. That being said, SMART is only not spawned when it returns -1.
That all being said, I will still push an update that fixes some bugs and feeds Smart an OpenGL pointer.
EDIT2: Ok so I changed it to check the "CurrentProcess" such that when it kills a tab, it will add a Tab back to the CurrentSmart when the 6hr fix is kicked in. I'll test all of this before pushing an update.
Sawyer
2013-05-25 12:46:12
From: Brandon
Kk I will fix all this stuff when I get home if it can or needs fixing.. Just make a list of all bugs or something. I re-wrote the OpenGL JNI so far so that you pass the JNIBuffer pointer once, it auto-rewinds and stores it so that every frame it writes to the pointer for the regular full RS fps without delay/need for a thread.
I cannot seem to fine the line that prints: "*** Failed To Detect Clients ***" anywhere in any of the source files. Are you sure? :S
EDIT: Found the line.. That's an SRL problem. What the chunk of code does is that it looks for a black screen or RSReady. If its found, then it knows that SMART is on the screen. TBH, I was the one who came up with that idea because at that time in SRL's history, when smmart had just been re-written by Ben from 7.2 to 8.0, SMART had this really really slow loading problem. It was so bad you had to toggle the Slider up and down to make it load nice and fast AND we had to detect Smart being on the screen so that we can move the mouse 1-2px to load faster..
With this version of Smart and Smart "8.1 original", these lines of code need not even be there. However, if it is there then the only time it should fail is if you're in a wrong mode such that Simba cannot detect the colours OR if Smart actually didn't spawn. That being said, SMART is only not spawned when it returns -1.
That all being said, I will still push an update that fixes some bugs and feeds Smart an OpenGL pointer.
EDIT2: Ok so I changed it to check the "CurrentProcess" such that when it kills a tab, it will add a Tab back to the CurrentSmart when the 6hr fix is kicked in. I'll test all of this before pushing an update.
Alright, sounds good. I'll keep testing it to the sixhour limit.
EDIT: I have noticed that simba does not interact sometimes with the smart. I'm not sure why it doesn't.
Le Jingle
2013-05-25 16:15:19
This great, like creating a tutorial for more purposes than just SMART :p Will have to play with your work and some html/js libs to make some fun down the road.
Again great detail, love the effort and lackadaisical-dedication (said with great respect) :)
Cheers,
Lj
Awesome job :) One suggestion though, adding an option to show an overview of all tabs.
So far I just have one update method that gets called, but you can notify and update the overview dynamically if you make a method in Canvas or Client (assuming this is similar to your tutorial)

package org.obduro.loader.ui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Set;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.obduro.loader.Client;
import org.obduro.loader.utils.ClientPool;
import org.obduro.loader.utils.Utilities;
public class OverviewPanel extends JPanel {
private static final long serialVersionUID = 5060519844144818836L;
private HashMap<Integer, Client> clients;
private int width = 1, height = 1;
public OverviewPanel(){
setPreferredSize(new Dimension(750, 570));
setBackground(Color.RED);
update();
}
public void update(){
removeAll();
clients = ClientPool.getClients();
int size = clients.size();
while(width * height < size){
if(width < height){
width++;
}else{
height++;
}
}
System.out.println("Hashmap size: " + size);
System.out.println("Width: " + width + ", height: " + height);
System.out.println("JPanel width: " + getWidth() + ", height: " + getHeight());
setLayout(new GridLayout(width, height));
Set<Integer> keys = clients.keySet();
int tabNumber = 0;
for(int key : keys){
Client client = clients.get(key);
BufferedImage image = client.getPaintBuffer();
Graphics2D g2d = image.createGraphics();
g2d.setColor(Color.WHITE);
g2d.setFont(new Font("Verdana", Font.BOLD, 40));
g2d.drawString("Tab #" + tabNumber++, 0, 50);
Image resizedImage = Utilities.scaleImage(getWidth()/width, getHeight()/height, image);
ImageIcon icon = new ImageIcon(resizedImage);
JLabel label = new JLabel(icon);
add(label);
System.out.println("Added label!");
}
}
}
Brandon
2013-05-25 17:22:14
From: J J
Awesome job :) One suggestion though, adding an option to show an overview of all tabs.
So far I just have one update method that gets called, but you can notify and update the overview dynamically if you make a method in Canvas or Client (assuming this is similar to your tutorial)
Ahh cool Idea. I think someone suggested that a while back but I didn't have too much free time.
If you're going to do that, don't forget that ClientPool access (if you're using one) should be synchronized if using multiple threads or Copy-Constructed in place such that changes to the original won't affect the copy (vice-versa).
Meh.. just came home from the engineering shop.. I'll think about it and I'll prob push an update for the current bugs later or tomorrow.. kinda tired lol.
From: Brandon
Ahh cool Idea. I think someone suggested that a while back but I didn't have too much free time.
If you're going to do that, don't forget that ClientPool access (if you're using one) should be synchronized if using multiple threads or Copy-Constructed in place such that changes to the original won't affect the copy (vice-versa).
Meh.. just came home from the engineering shop.. I'll think about it and I'll prob push an update for the current bugs later or tomorrow.. kinda tired lol.
My Client returns a copy of the buffer so it won't modify the actual buffer when resizing. I have it updating real time now, works smoothly. I still have to look in multiple threads, I hope you can answer my question in the tutorial thread :P
Has some unexpected behaviour though, game_crash seems to occur some times.. Not sure why.
package org.obduro.loader.ui;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Set;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.obduro.loader.Client;
import org.obduro.loader.utils.ClientPool;
import org.obduro.loader.utils.Utilities;
public class OverviewPanel extends JPanel {
private static final long serialVersionUID = 5060519844144818836L;
private HashMap<Integer, Client> clients;
private HashMap<Integer, JLabel> labels;
private int width = 1, height = 1;
public OverviewPanel(){
setPreferredSize(new Dimension(750, 570));
setBackground(Color.RED);
setDoubleBuffered(true);
updateAll();
}
private ImageIcon resize(BufferedImage image, int number){
Graphics2D g2d = image.createGraphics();
g2d.setColor(Color.WHITE);
g2d.setFont(new Font("Verdana", Font.BOLD, 40));
g2d.drawString("Tab #" + number, 0, 50);
Image resizedImage = Utilities.scaleImage(getWidth()/width, getHeight()/height, image);
return new ImageIcon(resizedImage);
}
public void updateAll(){
removeAll();
clients = ClientPool.getClients();
labels = new HashMap<Integer, JLabel>();
int size = clients.size();
while(width * height < size){
if(width < height){
width++;
}else{
height++;
}
}
setLayout(new GridLayout(width, height));
Set<Integer> keys = clients.keySet();
int tabNumber = 1;
for(int key : keys){
Client client = clients.get(key);
ImageIcon icon = resize(client.getGameBuffer(), tabNumber++);
JLabel label = new JLabel(icon);
labels.put(key, label);
add(label);
}
revalidate();
}
public void update(int hashCode){
Set<Integer> keys = clients.keySet();
int tabNumber = 1;
for(int key : keys){
if(key == hashCode){
JLabel label = labels.get(hashCode);
Client client = clients.get(hashCode);
ImageIcon icon = resize(client.getGameBuffer(), tabNumber++);
label.setIcon(icon);
label.revalidate();
}
tabNumber++;
}
}
}
And in the Client class
/**
* Custom implementation of drawing the graphics
* @param g graphics to draw with
* @return graphics we have drawn
*/
public Graphics drawGraphics(Graphics2D g){
Graphics paintGraphics = paintBuffer.getGraphics();
paintGraphics.drawImage(gameBuffer, 0, 0, null);
paintGraphics.setColor(Color.WHITE);
paintGraphics.drawString("Custom drawing hashcode #" + getCanvas().getClass().getClassLoader().hashCode(), 100, 100);
paintGraphics.dispose();
if(g != null){
g.drawImage(paintBuffer, 0, 0, null);
}
overviewPanel.update(getCanvas().getClass().getClassLoader().hashCode());
return gameBuffer.getGraphics();
}
I just give an instance of OverviewPanel and let it call the update method. Not the most efficient but it seems to get the job done..
Vinyl Scratch
2013-05-26 12:02:07
Woooaahhh.. I go for a few days and I come back, and Brandon's taken up the SMART mantle? I like what you've done with it, man. Supa sexy.
And then JJ's bein' all cool and coming up with this multi-panel idea. I like it! I might (try) and join in on the development.
Though, I did get a small bug. I'm not sure how to fix it.
<Big picture>
http://puu.sh/31B1i.png</bigpicture>
Sawyer
2013-05-26 14:35:36
I have also noticed that the mouse cursor from the SMART stays in the smart screen even after you terminate the script and take over with your mouse.. I'm not sure if that means Jagex could know you have two mouses?
You should add different mouse options maybe, like the crosshair one, default one, and the one were a stream follows wherever the mouse went
Sawyer
2013-05-26 14:52:44
From: Officer Barbrady
You should add different mouse options maybe, like the crosshair one, default one, and the one were a stream follows wherever the mouse went
That's a good idea.
From: Sawyer
That's a good idea.
Yea I know that's why I suggested it
Brandon
2013-05-26 15:19:50
Ohh I made it so that the mouse stayed there when I was debugging.. I can remove it and make it only be there when MouseInput is enabled. Its a one liner to remove.
No jagex can't detect it. The original Smart has a boolean that prevents the mouse from drawing when input is enabled. I'll just add:
if (!MouseInputEnabled) {
//Draw Mouse..
}
[/Java]
And as for the multiple Mouse drawings, that'll require me to add either a combobox or radio-group buttons.. Iunno :l
I'm actually working on the next release right now but meh..
From: Brandon
Ohh I made it so that the mouse stayed there when I was debugging.. I can remove it and make it only be there when MouseInput is enabled. Its a one liner to remove.
No jagex can't detect it. The original Smart has a boolean that prevents the mouse from drawing when input is enabled. I'll just add:
if (!MouseInputEnabled) {
//Draw Mouse..
}
[/Java]
And as for the multiple Mouse drawings, that'll require me to add either a combobox or radio-group buttons.. Iunno :l
I'm actually working on the next release right now but meh..
I wish we could add it in our scripts like I could on powerbot but I think it requires muiltithreading (on powerbot I forgot what it was but under paint I would always copy and paste the snippet)
Would just be something cool to add at the end you or if you finish
Brandon
2013-05-26 15:42:41
From: Officer Barbrady
I wish we could add it in our scripts like I could on powerbot but I think it requires muiltithreading (on powerbot I forgot what it was but under paint I would always copy and paste the snippet)
Would just be something cool to add at the end you or if you finish
EDIT: Now only draws mouse when script is running.. Stop the script, mouse disappears.
I think I fixed all the bugs / suggestions and updated OP.
Ohh I see what you mean.
Something like
Procedure SmartSetMouseImage(Img: Bitmap);
Hmmm.. I can add it but the thing is, Images in Simba aren't just raw pointers. They're a class wrapper around RBG arrays. Even so, if it was a raw pointer, I'd have to copy the data to the SHM file and let Smart read from that..
The only thing I can think of is to allow Smart to load an Image file and draw that as the cursor.. Thus:
Procedure SmartSetMouseImage(FilePath: String);
There's not really a way that I can think of to pass images directly from Simba to Smart nicely without bloating/increasing the SharedMemory file size OR using a socket to send/receive the Image.
As for the mouse streaming, that's because PB reads java directly via .class files and classloader. Smart communicates with Simba through JNI.. Yeah you can make Smart read .class files and load a mouse and all the custom stuff or write a parser but that's a lot of stuff to do :l
Rather just have a default "set" of mouse cursors, small circle, large cross… lines across the screen you get it :p
Itankbots
2013-05-26 17:57:55
@Brandon
You sure you don't want Any sort of donation? I know this is an open source community, but you have put a ton of time into this project, and a Smart-overhaul has been something we have greatly needed for a long time.
If you need any Rsgp or any type of donation /Help Let us know , Me and im sure others would be more then willing to help :P
Vinyl Scratch
2013-05-27 00:26:47
From: Itankbots
@Brandon
You sure you don't want Any sort of donation? I know this is an open source community, but you have put a ton of time into this project, and a Smart-overhaul has been something we have greatly needed for a long time.
If you need any Rsgp or any type of donation /Help Let us know , Me and im sure others would be more then willing to help :P
Vouch. I'd donate some.
Itankbots
2013-05-27 07:02:45
:l Im confused…Where to I put all the new smart Files? There are a bunch ive never seen before lol. Just put all the folders in the plugin folder? or put the class files themselves in the plugin folder?
I already switched the New simba globals and parma's files out, I got the part, just no idea what to do with the rest lol
Edit: Bin File seems to be empty for me?.. :(
Flight
2013-05-27 08:06:44
Yeah there's no pre-compiled plugins in that newest version. By the way, Brandon, the Makefile has different commands now; what's the command for compiling? Make windows is no longer an option? Nevermind, I don't know why it didn't work for me before, perhaps I had changed my path to the wrong place. But you should know only the SMART jar itself compiles, the others have errors while compiling. :/
Itankbots
2013-05-27 08:33:43
From: Flight
Yeah there's no pre-compiled plugins in that newest version. By the way, Brandon, the Makefile has different commands now; what's the command for compiling? Make windows is no longer an option? Nevermind, I don't know why it didn't work for me before, perhaps I had changed my path to the wrong place. But you should know only the SMART jar itself compiles, the others have errors while compiling. :/
Ahh ok, thanks for all your help flight ^^ i shall just wait for the plugins to be added :c time to downgrade back to old smart lol
Brandon
2013-05-27 12:22:17
From: Flight
Yeah there's no pre-compiled plugins in that newest version. By the way, Brandon, the Makefile has different commands now; what's the command for compiling? Make windows is no longer an option? Nevermind, I don't know why it didn't work for me before, perhaps I had changed my path to the wrong place. But you should know only the SMART jar itself compiles, the others have errors while compiling. :/
Uhh its the same commands :S I didn't touch the make.. Well I did. The only thing I changed in the makefile was my path to the JDK because I develop on different laptops all the time and this laptop is x64 JDK installed.
Other than that, it should all compile. I just tested it. I ran: Make Clean Windows. and Make Clean Windows -BitFLG=-m64.
Both compile. Uhh sorry about not including the binaries. What compiling errors did you get
@Flight;? Shouldn't have any :l
@Itankbots; I updated OP to have the binaries as well as source.
Note (I realized why some of you can't get OpenGL to show up even though it's loaded)
: If compiling OpenGL and GLHook for Smart with Pascalscript, the makefile needs to know this. You'll notice that the OpenGL makefile has:
-DGLHOOK_SMART which tells it to compile for Smart. Removing it will make it compile for the browser.
GLHook's Makefile has:
-DGLHOOK_SMART -DPASCALSCRIPT which tells it to compile for Smart and PascalScript. Removing these will make it compile for browser and Lape.
Anyway, I re-upped everything to include source and binary and set Smart/Pascalscript as default compilation defines.
Itankbots
2013-05-27 12:42:46
From: Brandon
Uhh its the same commands :S I didn't touch the make.. Well I did. The only thing I changed in the makefile was my path to the JDK because I develop on different laptops all the time and this laptop is x64 JDK installed.
Other than that, it should all compile. I just tested it. I ran: Make Clean Windows. and Make Clean Windows -BitFLG=-m64.
Both compile. Uhh sorry about not including the binaries. What compiling errors did you get @Flight;? Shouldn't have any :l
@Itankbots; I updated OP to have the binaries as well as source.
Note (I realized why some of you can't get OpenGL to show up even though it's loaded): If compiling OpenGL and GLHook for Smart with Pascalscript, the makefile needs to know this. You'll notice that the OpenGL makefile has:
-DGLHOOK_SMART which tells it to compile for Smart. Removing it will make it compile for the browser.
GLHook's Makefile has:
-DGLHOOK_SMART -DPASCALSCRIPT which tells it to compile for Smart and PascalScript. Removing these will make it compile for browser and Lape.
Anyway, I re-upped everything to include source and binary and set Smart/Pascalscript as default compilation defines.
Awesome man! Thanks, ill test it out and let you know if i find any bugs or anything :)
Edit: Seems to be stuck on loading smart up for me…Does this happen on the first time for the new client?
http://gyazo.com/2921c76b7f30e290847169a114a643de^ kept loading till the 3min market then terminated.
Yeah doesn't seem to want to load the client at all..Just keeps saying loading please wait till it terminates :/
Brandon
2013-05-27 13:29:51
From: Itankbots
Awesome man! Thanks, ill test it out and let you know if i find any bugs or anything :)
Edit: Seems to be stuck on loading smart up for me…Does this happen on the first time for the new client?
http://gyazo.com/2921c76b7f30e290847169a114a643de
^ kept loading till the 3min market then terminated.
Yeah doesn't seem to want to load the client at all..Just keeps saying loading please wait till it terminates :/
I can't replicate that problem :S Try deleting the Smart.PID and SmartCP.PID files if you have them and then load this version. Perhaps the old ones interfere.
I hope you replaced the Simba files as well with the ones issued.
Itankbots
2013-05-27 13:35:04
From: Brandon
I can't replicate that problem :S Try deleting the Smart.PID and SmartCP.PID files if you have them and then load this version. Perhaps the old ones interfere.
I hope you replaced the Simba files as well with the ones issued.
Yeah i did. Idunno, ill Look at it tomorrow, been up since yesterday, tired, probably failing something stupid lol
Sawyer
2013-05-27 19:22:34
@Brandon
I still notice that when SMART First loads up, simba does not interact with it. Have any ideas what could cause that? After it's loaded and I restart the script, it works fine. It hasn't reloaded after 6 hours for me yet though :|
Brandon
2013-05-27 20:42:24
From: Sawyer
@Brandon
I still notice that when SMART First loads up, simba does not interact with it. Have any ideas what could cause that? After it's loaded and I restart the script, it works fine. It hasn't reloaded after 6 hours for me yet though :|
In Simba's debug box, does it print "Paired with: [PIDHere]". Or something similar? If so, I just fixed that and now it will only pair with clients with a current port. Basically this is how it will work now:
OnClosing: Sets Process Port to Zero. Sets All Client Ports to Zero. That way, it will never pair with a zombie ever!
OnPairing: Checks Controller and Port. If controller is zero and 0 < Port <= 65535, it will pair. This gets rid of Zombies and Smart Spawn Clients error.
However, I'm not sure what you mean by interact with it on first load.
{$DEFINE SMART}
{$I SRL/SRL.Simba}
begin
SetupSRL;
while(true) do
begin
MMouse(random(100), random(100), random(100), random(100));
end;
end.
That's the script I used to see if it would move the mouse as soon as RS is finished loading (aka at the login screen because that's how the SRL include is programmed to work).
Sawyer
2013-05-27 21:03:14
From: Brandon
In Simba's debug box, does it print "Paired with: [PIDHere]". Or something similar? If so, I just fixed that and now it will only pair with clients with a current port. Basically this is how it will work now:
OnClosing: Sets Process Port to Zero. Sets All Client Ports to Zero. That way, it will never pair with a zombie ever!
OnPairing: Checks Controller and Port. If controller is zero and 0 < Port <= 65535, it will pair. This gets rid of Zombies and Smart Spawn Clients error.
However, I'm not sure what you mean by interact with it on first load.
{$DEFINE SMART}
{$I SRL/SRL.Simba}
begin
SetupSRL;
while(true) do
begin
MMouse(random(100), random(100), random(100), random(100));
end;
end.
That's the script I used to see if it would move the mouse as soon as RS is finished loading (aka at the login screen because that's how the SRL include is programmed to work).
It loads smart, then said it is paired, then says welcome to runescape, then said my username as If it is logging in, but nothing happens. However, if I then restart the script the second time, it works.
Brandon
2013-05-27 21:17:36
From: Sawyer
It loads smart, then said it is paired, then says welcome to runescape, then said my username as If it is logging in, but nothing happens. However, if I then restart the script the second time, it works.
Very nice bug report. I was able to replicate this and narrow it down to Smart_FixSpeed := True. Try removing this from the script and let me know how it goes. If it works then I know exactly what the problem is: SmartFixSpeed tries to toggle a refresh bar that isn't there in this version of smart.
Let me know if my suggestion works. If it did, I will be removing the throw UnSupportedException from the next update and removing the Smart(Set/Get)Refresh function.
Sawyer
2013-05-27 21:53:12
From: Brandon
Very nice bug report. I was able to replicate this and narrow it down to Smart_FixSpeed := True. Try removing this from the script and let me know how it goes. If it works then I know exactly what the problem is: SmartFixSpeed tries to toggle a refresh bar that isn't there in this version of smart.
Let me know if my suggestion works. If it did, I will be removing the throw UnSupportedException from the next update and removing the Smart(Set/Get)Refresh function.
It worked, thanks Brandon. That was the problem.
Le Jingle
2013-05-28 01:15:22
Added in some Mouse Option paints aside the graphics options. (default = dot, also crosshair, scope, and linear lines) - @Officer Barbrady
hi @pyroryan :)
Also, are the .simba gl files the same as your GLhook thread? (I didn't find them in the src folders in main post) @Brandon ++ nice work :)
E: err file to large R.I.P.
Itankbots
2013-05-28 06:15:02
Still Doesn't work for me :/
It just keeps saying loading please wait. Then hit the 3 min timeout. Ive downloaded and replaced all the new plugins and all the new simba files from the latest upload on the OP. So I have no idea what is causing it…
http://gyazo.com/fd3a54d8bab6917e6f041fd8737a9beaTried Clearing my Temp Folder and everything, just sits here loading smart forever :l
Sawyer
2013-05-28 08:17:28
@Brandon
It did not do the sixhourfix, but I believe it said debugging 413. Then said sixhourfix could not log in the player. (Accidentally did not get a copy/paste of the debug box of simba) :(
Brandon
2013-05-28 14:13:32
From: Itankbots
Still Doesn't work for me :/
It just keeps saying loading please wait. Then hit the 3 min timeout. Ive downloaded and replaced all the new plugins and all the new simba files from the latest upload on the OP. So I have no idea what is causing it…
http://gyazo.com/fd3a54d8bab6917e6f041fd8737a9bea
Tried Clearing my Temp Folder and everything, just sits here loading smart forever :l
KK I will look into this. I still cannot get it to NOT spawn but I'll look into probable causes :S
From: Sawyer
@Brandon
It did not do the sixhourfix, but I believe it said debugging 413. Then said sixhourfix could not log in the player. (Accidentally did not get a copy/paste of the debug box of simba) :(
I just fixed this. Again, due to SixHourFix calling SmartSetRefresh. For now, don't worry about it. I'm going to update the OP soon with a version that completely removes SmartSetRefresh that way it won't throw unexpectedly on you. For now I'm heading out to teach Cpp.
Sawyer
2013-05-28 19:31:05
From: Brandon
I just fixed this. Again, due to SixHourFix calling SmartSetRefresh. For now, don't worry about it. I'm going to update the OP soon with a version that completely removes SmartSetRefresh that way it won't throw unexpectedly on you. For now I'm heading out to teach Cpp.
Sounds good. Nice work.
Le Jingle
2013-05-29 22:51:09
https://www.dropbox.com/s/irx3110tdx8qbj7/SMART.zip^ Should be Brandon's files with mouse selection options (I think I complied too in there so the .jar for SMART is ready-to-use, but again, src attached so can compile yourself).
+ If I remember correctly, the mouse paints were somewhat small?
+ implemented in the way the Graphics option is
Think I'll try to get the GLhook working now, also
@Brandon, I don't mean to pester, but were you releasing updated files w/o aforementioned flaws (in prev posts)? :D
Cheers,
Lj
From: Le Jingle
https://www.dropbox.com/s/irx3110tdx8qbj7/SMART.zip
^ Should be Brandon's files with mouse selection options (I think I complied too in there so the .jar for SMART is ready-to-use, but again, src attached so can compile yourself).
Think I'll try to get the GLhook working now, also @Brandon, I don't mean to pester, but were you releasing updated files w/o aforementioned flaws (in prev posts)? :D
Oh good, Finally we may see some OGL scripts! (wasn't really used before because it wasn't supported with SMART)
From: Officer Barbrady
Oh good, Finally we may see some OGL scripts! (wasn't really used before because it wasn't supported with SMART)
Actually it was, it just wasn't as "accessible" as this.
I installed it, and simba crashes after I run it am I doing something wrong lol?

Client never loads, including the test script
running java 1.7 u 21
Dunno what I'm doing wrong but now my scripts arent' running :(
EDIT: fixed, it was SmartSetRefresh
New problem: why is runescape so laggy on smart?
Ashaman88
2013-05-30 19:27:22
SRL Compiled in 0 msec
Error: Exception: Access violation at line 323 (or 349 w/ latest dl)
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap, SRL - Options Bitmap]
highlights
If SmartPairClient(IDs
) then
In ssmartparams file.
I've had this happen when I hit stop right after I hit start w/ a smart already up. Then when I hit play again it gives me that error. When I close out of smart and hit play after that, the error still occurs (although smart console pops up, but doesn't load rs). I have to completely close out of simba to get it working again. What did I do!!?
Brandon
2013-05-30 19:40:30
From: Ashaman88
SRL Compiled in 0 msec
Error: Exception: Access violation at line 323 (or 349 w/ latest dl)
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap, SRL - Options Bitmap]
highlights
If SmartPairClient(IDs) then
In ssmartparams file.
I've had this happen when I hit stop right after I hit start w/ a smart already up. Then when I hit play again it gives me that error. When I close out of smart and hit play after that, the error still occurs (although smart console pops up, but doesn't load rs). I have to completely close out of simba to get it working again. What did I do!!?
OP Updated.. I'm still trying to find what causes that FPS thing the post above yours mentioned, but Smart should be flawless now. No null pointers or crashes. See the test scripts for an example.
From: Brandon
OP Updated.. I'm still trying to find what causes that FPS thing the post above yours mentioned, but Smart should be flawless now. No null pointers or crashes. See the test scripts for an example.
Runescape is really laggy on this smart :s got any idea? (it's pretty stable on 8.0)
Ooh and I like it a lot :) it's neat!
Brandon
2013-05-30 19:57:54
From: Sjoe
Runescape is really laggy on this smart :s got any idea? (it's pretty stable on 8.0)
Ooh and I like it a lot :) it's neat!
I took note of it. I'm looking into it but there's a ton of code to sift through so yeah.
EDIT: I found the source of the FPS issue you mentioned.. Now to find a fix or replace my EventHandler completely.. *sigh*.. Note to self: Old Smart's code and AcidBot's is not compatible with this smart. -__-
EDIT2: Due to the change in EventHandling AND a slight change to the Canvas, extremely fast laptops/computers would allow very fast deliberate events to break through the handler and get dispatched. My old method of blocking would block 100% (this one works 99.99%). Guess its completely different. Yes the 0.01% counts ;)
Anyway, as long as you don't minimize->maximize->minimize and repeat it a ton of times in ONE second while holding down a key at the exact same time, it will be fine. This is the
exact same behaviour of the Original Smart 8.0/8.1 I wanted to get rid of.. Too bad I can't use my EventHandler from AcidBot though. Thus there are no disadvantages over this vs. the Original Smarts; Only advantages.
:(
No biggie though. It will NOT affect you in any way and you will NOT notice and difference to the prior versions I released other than a massive speed/fps increase.
For those who downloaded older versions, due to these changes I advice you redownload: Rev5, 30/05/2013 20:37 EST Update.
@Sjoe; redownload.
Ashaman88
2013-05-30 20:25:15
From: Brandon
I took note of it. I'm looking into it but there's a ton of code to sift through so yeah.
EDIT: I found the source of the FPS issue you mentioned.. Now to find a fix or replace my EventHandler completely.. *sigh*.. Note to self: Old Smart's code is not compatible with this smart. -__-
We believe! ;)
From: Brandon
I took note of it. I'm looking into it but there's a ton of code to sift through so yeah.
EDIT: I found the source of the FPS issue you mentioned.. Now to find a fix or replace my EventHandler completely.. *sigh*.. Note to self: Old Smart's code and AcidBot's is not compatible with this smart. -__-
EDIT2: Due to the change in EventHandling AND a slight change to the Canvas, extremely fast laptops/computers would allow very fast deliberate events to break through the handler and get dispatched. My old method of blocking would block 100% (this one works 99.99%). Guess its completely different. Yes the 0.01% counts ;)
Anyway, as long as you don't minimize->maximize->minimize and repeat it a ton of times in ONE second while holding down a key at the exact same time, it will be fine. This is the exact same behaviour of the Original Smart 8.0/8.1 I wanted to get rid of.. Too bad I can't use my EventHandler from AcidBot though. Thus there are no disadvantages over this vs. the Original Smarts; Only advantages.
:(
No biggie though. It will NOT affect you in any way and you will NOT notice and difference to the prior versions I released other than a massive speed/fps increase.
For those who downloaded older versions, due to these changes I advice you redownload: Rev5 30/05/2013 20:37 EST Update.
@Sjoe; redownload.
Cheers mate! I'll test it tomorrow :)
Brandon
2013-05-30 20:50:49
Edit: Found a way to block 100%.. Use Rev5.1, 30/05/2013 - 21:17 EST Update. I fixed that 0.01% :D
https://mega.co.nz/#!Mdl3XZKS!aG9IdAzusgT1ulozgTuOz2L2Mh57oDZ-ubA4eoTojpwPerfect. So now back to where we were with no lag/fps issues or crashes or anything. :D
Updated OP. Let me know if there's any problems.
Flight
2013-05-30 21:51:18
The only thing I've been testing with this client is OpenGL mode, so keep this in mind when reading my replies.
Has anyone at all, aside from Brandon, successfully loaded this client up in OpenGL mode through Simba?
@Brandon:
Same issues as before, I change the mode to OpenGL (on the splash screen), the client appears but pauses for quite a long time, then the Operating Mode automatically changes back to Safemode and the client continues to load.
Can you tell me if I'm doing something wrong here? Test script:
{$DEFINE SMART}
{$DEFINE CSMART}
{$I SRL/SRL.Simba}
{$I GLHook/GLHook.simba}
{$I SRL/SRL/Misc/Debug.Simba}
var
BMP, I: Integer;
Str: String;
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
writeln(Smart_CurrentProcess);
GLHSetDebug(True, True, 3);
end.
In SmartParams.simba, removed "s" (even left it in for the sake testing) from InitSequence in 'InitSmartEx'. After none of that worked I changed the SMART to use OpenGL as the default Operating mode. Everything yielded the same result. Also, the OpenGL32 plugin was successfully loaded, according to the splash screen.
Any ideas?
Brandon
2013-05-30 22:07:39
From: Flight
The only thing I've been testing with this client is OpenGL mode, so keep this in mind when reading my replies.
Has anyone at all, aside from Brandon, successfully loaded this client up in OpenGL mode through Simba?
@Brandon:
Same issues as before, I change the mode to OpenGL (on the splash screen), the client appears but pauses for quite a long time, then the Operating Mode automatically changes back to Safemode and the client continues to load.
Can you tell me if I'm doing something wrong here? Test script:
{$DEFINE SMART}
{$DEFINE CSMART}
{$I SRL/SRL.Simba}
{$I GLHook/GLHook.simba}
{$I SRL/SRL/Misc/Debug.Simba}
var
BMP, I: Integer;
Str: String;
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
writeln(Smart_CurrentProcess);
GLHSetDebug(True, True, 3);
end.
In SmartParams.simba, removed "s" (even left it in for the sake testing) from InitSequence in 'InitSmartEx'. After none of that worked I changed the SMART to use OpenGL as the default Operating mode. Everything yielded the same result. Also, the OpenGL32 plugin was successfully loaded, according to the splash screen.
Any ideas?
I can teamviewer you and see what problems you're getting if you like. Are you also having that same problem with Original Smart 8.1 as well?
Flight
2013-05-30 22:10:25
From: Brandon
I can teamviewer you and see what problems your getting if you like. Are you also having that same problem with Original Smart 8.1 as well?
I'm afraid I don't have teamviewer, and yes it's the same issue I've had ever since SMART 8.1 with the plugin loader.
Brandon
2013-05-30 22:12:07
From: Flight
I'm afraid I don't have teamviewer, and yes it's the same issue I've had ever since SMART 8.1 with the plugin loader.
Right click your script console box and press Debug. Does it have any errors or anything in there and your RS is in OpenGL mode right or is it just the plugin that is giving you problems?
Don't worry about the OperatingMode. If you get your RSClient/Smart into OpenGL mode itself, then you can worry about the plugin/Modes. As long as your Smart displays:

Then you are fine. Only thing left to do after that is switch the Mode from "SafeMode" to OpenGL mode and the plugin will display the overlay.
For me, the only things I have to do when going into OpenGL mode is to edit SmartParams and SRL.simba to get rid of the infinite loops:
SmartParams.simba Line 497 I added: if (Length(Smart_Plugins) > 0) then break;
SRL.simba Line 215 I added: if (Length(Smart_Plugins) > 0) then break;
That way, it breaks out of the silly loop and lets OpenGL load.
Flight
2013-05-30 22:25:50
From: Brandon
Right click your script console box and press Debug. Does it have any errors or anything in there and your RS is in OpenGL mode right or is it just the plugin that is giving you problems?
By RS I assume you're talking about SMART? Yes, I change it to OpenGL on the splash screen and even as the default operating mode in SMART itself. When the actual SMART client starts to load SMART forces the operating mode back to Safemode on it's own.
SMART[3036]: Client Spawned: 49962
SMART[3036]: Socket Disconnected.
SMART[49962]: Socket Connected
SMART[49962]: Remote TID: 2720
java.lang.RuntimeException:
at yv. (yv.java:223)
at ca.i(ca.java:13)
at d.j(d.java:56)
at cy.i(cy.java:50)
at ge.fd(ge.java:1875)
at wt.fu(wt.java:1835)
at ft.fb(ft.java:1828)
at oo.h(oo.java:568)
at ph.s(ph.java:240)
at client.ao(client.java:1362)
at ns.b(ns.java:582)
at ns.l(ns.java:558)
at ns.run(ns.java:515)
at java.lang.Thread.run(Unknown Source)
SMART[49962]: Socket disconnected; Unpairing
From that debug it like problems in the gamepack jar rather than SMART.
Edit:
Ok I'll try what you've done quick, keep an eye on this post.
Brandon
2013-05-30 22:30:56
From: Flight
By RS I assume you're talking about SMART? Yes, I change it to OpenGL on the splash screen and even as the default operating mode in SMART itself. When the actual SMART client starts to load SMART forces the operating mode back to Safemode on it's own.
From that debug it like problems in the gamepack jar rather than SMART.
PERFECT! A good error report. Ok this is the problem with Runescape/Jagex NOT smart.. See there is no way to catch internal errors like that either :( (unless you "hook" them). When running runescape using a "JDK" which I assume you are doing since you also compile Smart yourself like I do, you can't enter OpenGL/DirectX mode.
See the libraries for JDK and JRE are completely different. I don't know why at all but it does that. It's the same as this silly error I found that someone else had the same error as me a while back as well:
http://stackoverflow.com/questions/16779623/java-x32-vs-x64-jvm-crashes/16779698?noredirect=1#16779698x32 vs. x64 JDK's.. Works for JRE though :l Don't worry about x32 vs. x64 unless you're developing for Smart. For getting into OpenGL mode, simply changing the path works.
The fix is simple. Remove JDK from your path and set it to your JRE:

Doing so will allow you to enter any mode on RS. If you leave it as JDK, you will be unable to enter any mode regardless of whether loading the plugin or not lol. Kinda silly.
Oh well I sure didn't know about that… With the path being set to JRE will I still be able to compile and so forth? Nevermind, don't answer that question, I'll change the path and see if MinGW still works for me. I'll also try loading up RS in the browser and setting it to OpenGL, hopefully this will save the settings on my computer and SMART will reflect those settings and load up in OpenGL. I'll edit this post with the results, so give me a few minutes.
This will not affect Mingw because Mingw isn't for Java. Only JDK/JRE is for Java. And yes you will still be able to compile and play as you normally would. The reason is because the Makefile contains your JDK path needed to compile.
Flight
2013-05-30 22:38:54
From: Brandon
PERFECT! A good error report. Ok this is the problem with Runescape/Jagex NOT smart.. See there is no way to catch internal errors like that either :(. When running runescape using a "JDK" which I assume you are doing since you also compile Smart yourself like I do, you can't enter OpenGL/DirectX mode.
See the libraries for JDK and JRE are completely different. I don't know why at all but it does that. It's the same as this silly error I found that someone else had the same error as me a while back as well: http://stackoverflow.com/questions/16779623/java-x32-vs-x64-jvm-crashes/16779698?noredirect=1#16779698
x32 vs. x64 JDK's.. Works for JRE though :l Don't worry about x32 vs. x64 unless you're developing for Smart. For getting into OpenGL mode, simply changing the path works.
The fix is simple. Remove JDK from your path and set it to your JRE:
Doing so will allow you to enter any mode on RS. If you leave it as JDK, you will be unable to enter any mode regardless of whether loading the plugin or not lol. Kinda silly.
Oh well I sure didn't know about that… With the path being set to JRE will I still be able to compile and so forth? Nevermind, don't answer that question, I'll change the path and see if MinGW still works for me. I'll also try loading up RS in the browser and setting it to OpenGL, hopefully this will save the settings on my computer and SMART will reflect those settings and load up in OpenGL. I'll edit this post with the results, so give me a few minutes.
Edit:
You were right on the money about the java path, Brandon. How weird… Perhaps this should be noted in the OP for people having problems loading up SMART in OpenGL mode.

Thanks a million mate. :) One other quick question: to make this client load up Oldschool RS it would just take some modifications to the SmartParams, yes? I would love to have this running OSRS.
Brandon
2013-05-30 22:55:16
From: Flight
Edit:
You were right on the money about the java path, Brandon. How weird… Perhaps this should be noted in the OP for people having problems loading up SMART in OpenGL mode.
Thanks a million mate. :) One other quick question: to make this client load up Oldschool RS it would just take some modifications to the SmartParams, yes? I would love to have this running OSRS.
Glad I can be of help. I'll add it to the OP in a sec (probably tomorrow or something lol.. Kinda lazy & I'm working on releasing an API ;) ). I just wasn't sure at the time if it was just me that had that JDK/JRE problem or not so I didn't want to burden anyone else with more "instructions". Damn jagex.. bothers me to know that happens lol.
Yes it should be a simple change. As far as I can remember, I think the OSR include doesn't touch the original smart and loads RS; no? Yeah I believe it would be a simple change to SmartParams. I never tested this theory though.
Sawyer
2013-05-30 23:23:20
@BandonI get this error when I try to run the newest verson :
[Error] C:\Simba2\Includes\SRL/SRL/misc/SmartParams.Simba(72:14): Unknown identifier 'SmartEnabled' at line 71
Compiling failed.
Should I assign it a boolean or something?
Brandon
2013-05-30 23:40:43
From: Sawyer
@BandonI get this error when I try to run the newest verson :
[Error] C:\Simba2\Includes\SRL/SRL/misc/SmartParams.Simba(72:14): Unknown identifier 'SmartEnabled' at line 71
Compiling failed.
Should I assign it a boolean or something?
You need to replace the corresponding Simba files with the ones included in the zip. Then at the top of your script put:
{$DEFINE CSMART}
which lets SRL know to use this custom Smart. If you want to ever switch back to the old one, simple remove that Define :)
The readme has a list of functions added and removed:
SmartIsActive
SmartIsKeyboardEnabled
SmartIsMouseEnabled
SmartSetMouseInput
SmartSetKeyInput
SmartWriteConsole
SmartClearConsole
etc..
Sawyer
2013-05-30 23:55:28
From: Brandon
You need to replace the corresponding Simba files with the ones included in the zip. Then at the top of your script put:
{$DEFINE CSMART}
which lets SRL know to use this custom Smart. If you want to ever switch back to the old one, simple remove that Define :)
The readme has a list of functions added and removed:
SmartIsActive
SmartIsKeyboardEnabled
SmartIsMouseEnabled
SmartSetMouseInput
SmartSetKeyInput
SmartWriteConsole
SmartClearConsole
etc..
AH! That was it. Thanks :) I thought it was just {$DEFINE SMART} . Thanks:)
Le Jingle
2013-05-31 00:39:48
Not sure what I'm doing wrong, here's what I've got:
- using latest bin folder uploads via OP links,
- placed jre7 in my path after my jdk
- replaced upp'd .simba files
- replaced the smart, libsmartjni + libsmartremote, and gl hook libs in the simba plugins + threw the gl lib into the rs bin
the {$DEFINE GL_Hooks} accounts for those two infinite loop breaks that you pointed out a couple posts ago to Flight
Flight
2013-05-31 00:50:46
@Le Jingle: Was the OpenGL32.dll plugin loaded successfully? It would say on the splash screen if it was. Also, I may be wrong but I don't think you should have both JRE
and JDK in your path; try removing the path to JDK and keeping JRE only.
@Brandon:
Give me a second, I have a couple questions for you, and some good news to counter the questions. :p
Alright first off I modified, again, all 3 files from the SRL-OSR include to reflected the changes you made in the normal SRL include to load up this custom SMART, and it indeed worked. Of course I had to change more than what I planned on but it was a success. :)

^ I stupidly left my username in there. For those of you who saw it let's keep this quiet. :whistling:
Here's the 3 .simba files for SRL-OSR needed to load up this custom SMART: (feel free to add this to the OP Brandon)
https://mega.co.nz/#!pgB1mCJA!IRPv2xdLeg1gBffpnhOaux8VNicLQfAqJoE7FZ5Fcu8Now, about my questions. First off I'd like to point out the mouse-over text on the Enable Graphics button. When you mouse over it, it says "Enable graphics", even when they're already enabled, rather than saying "Disable graphics" while they're enabled. Should be a simple fix I imagine.
Next, while this SMART is loaded up in OpenGL mode no colors, it seems, are being sent to Simba, as if the buffer (I guess?) isn't passing them along? No colors are found, debug images of the client show all black and the DTM editor shows all black.
And my last question. For printing the mouse's current position (the red dot or whatever we choose) would we use the same methods from the Safemode Operating mode for printing the mouse or would it be done differently for OpenGL?
For example, the printing of the mouse in Safemode:
if (renderWhileBlocking && !Frame.isMinimized()) {
final Point P = getMousePos();
if (debugfx) {
debugBuffer.rewind();
for (int I = 0; I < Length; ++I) {
int color = debugBuffer.get();
if (color != transColor) {
debugData[I] = color;
} else {
debugData[I] = bufferData[I];
}
}
} else {
debugGraphics.drawImage(this.gameImage, 0, 0, null);
}
//Draw Mouse...
if (this.drawMouse) {
//debugGraphics.fillOval(p.x - 2, p.y - 2, 4, 4);
debugGraphics.drawLine(P.x - 20, P.y, P.x + 20, P.y);
debugGraphics.drawLine(P.x, P.y - 20, P.x, P.y + 20);
}
if (G != null) {
G.drawImage(this.debugImage, 0, 0, null);
}
}
I tried this only in OpenGL mode:
final Point P = getMousePos();
if (this.drawMouse) {
debugGraphics.drawLine(P.x - 20, P.y, P.x + 20, P.y);
debugGraphics.drawLine(P.x, P.y - 20, P.x, P.y + 20);
}
Now I know I left a lot out here so I might need to add a bit more; do you see any problems if I added this
below the OGL buffer?:
final Point P = getMousePos();
if (this.drawMouse) {
debugGraphics.drawLine(P.x - 20, P.y, P.x + 20, P.y);
debugGraphics.drawLine(P.x, P.y - 20, P.x, P.y + 20);
}
if (G != null) {
G.drawImage(this.debugImage, 0, 0, null);
}
Le Jingle
2013-05-31 00:52:47
@Flight; no it didnt, (now that you say that), I retired and watched, I see now it debugged in red that is failed to load, I'll try removing the jdk for now and edit in if that helps, but other than that I'm out of ideas :s (and thanks)
Edit: removed the jdk from path and Still failed to load plugin, but I can switch to ogl mode if it loads smart in safemode (granted this doesn't seem to help at all) - I don't understand how flight managed to bridge this gap (that appears to be the same issue he faced earlier)
@Brandon; Thanks, that helped load it successfully (I think I was still thinking about those old threads and placing the gl file in the rs cache bin folder >.<
ALSO, after it loaded the plugin and smart spawned successfully, I went to the tools menu and it was still in safe mode. So I clicked OGL mode and then my computer crashed >.> Just saying … >.<
Brandon
2013-05-31 00:55:45
From: Le Jingle
Not sure what I'm doing wrong, here's what I've got:
- using latest bin folder uploads via OP links,
- placed jre7 in my path after my jdk
- replaced upp'd .simba files
- replaced the smart, libsmartjni + libsmartremote, and gl hook libs in the simba plugins + threw the gl lib into the rs bin
the {$DEFINE GL_Hooks} accounts for those two infinite loop breaks that you pointed out a couple posts ago to Flight
Only time you need to remove JDK from path is if you cannot get it to load OpenGL mode. I can see that you already have Smart in OpenGL mode so that's good.
You do not need the Define for GLHook. Well I can't remember why I had it there but that define looks wrong anyway. It's GLHook not Hooks with an 's'.
Anyway, in your console, it printed "Could not map shared memory". The problem for you is that your OpenGL32.dll plugin never loaded. I'm not sure what you mean you placed it in the "RS bin" folder. If you did that then it's only going to load for the official client or whatever client uses the bin folder.
Both GLHook.dll and OpenGL32.dll must be placed in 'C:/Simba/Plugins/' or wherever your Simba plugins folder is. Then when your run the script, it should display a mini-console below the splash screen telling you whether it loaded or not (See the pictures on the OP).
This is actually the script I use to tell if I'm loaded or not:
{$DEFINE SMART}
{$DEFINE CSMART}
{$I GLHook/GLHook.Simba}
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
If Not GLHSetup(ToStr(Smart_CurrentProcess)) Then //It returns a boolean..
Begin
WriteLn('Could Not Setup OpenGL.. Please make sure your plugins are in ~/Simba/Plugins/');
TerminateScript;
End;
GLHSetDebug(True, True, 3);
end.
@Flight; Ask away when ready.
Le Jingle
2013-05-31 01:08:46
From: Le Jingle
@Flight; no it didnt, (now that you say that), I retired and watched, I see now it debugged in red that is failed to load, I'll try removing the jdk for now and edit in if that helps, but other than that I'm out of ideas :s (and thanks)
Edit: removed the jdk from path and Still failed to load plugin, but I can switch to ogl mode if it loads smart in safemode (granted this doesn't seem to help at all) - I don't understand how flight managed to bridge this gap (that appears to be the same issue he faced earlier)
@Brandon; Thanks, that helped load it successfully (I think I was still thinking about those old threads and placing the gl file in the rs cache bin folder >.<
ALSO, after it loaded the plugin and smart spawned successfully, I went to the tools menu and it was still in safe mode. So I clicked OGL mode and then my computer crashed >.> Just saying … >.<
Edit: to clear that up, and to not have a confusing conversation;
smart loaded, plugin loaded, script executed successfully, I look at the rs settings menu and see its still in safe mode, go to the ogl option to veer away from safe mode, then upon clicking ogl mode whole computer crashed.
Brandon
2013-05-31 01:13:07
From: Le Jingle
@Flight; no it didnt, (now that you say that), I retired and watched, I see now it debugged in red that is failed to load, I'll try removing the jdk for now and edit in if that helps, but other than that I'm out of ideas :s (and thanks)
Edit: removed the jdk from path and Still failed to load plugin, but I can switch to ogl mode if it loads smart in safemode (granted this doesn't seem to help at all) - I don't understand how flight managed to bridge this gap (that appears to be the same issue he faced earlier)
@Brandon; Thanks, that helped load it successfully (I think I was still thinking about those old threads and placing the gl file in the rs cache bin folder >.<
ALSO, after it loaded the plugin and smart spawned successfully, I went to the tools menu and it was still in safe mode. So I clicked OGL mode and then my computer crashed >.> Just saying … >.<
Wow.. Never had that been reported or happened before at all. That can't be possible. Only the application would crash if there was a null pointer. And I didn't use any pointers :) IF that happens again, let me know and post any crash logs so I can inspect it.
@Flight; What you you mean get the mouse position? Like SmartGetMousePos(var X, Y: Integer);?
There's two mouse positions really.
One is the OpenGL mouse position within a 3D world. That would be where the current model being drawn lies within the current plane. You shouldn't worry about that because its projected to 2D points for you to click.
Then the second mouse pos is the projected one or the 2D points that you click and the current position of Smart's mouse.
If you mean drawing smart's mouse on the screen like you do for safemode, I have to check if I left out the drawing code. After all, this is the first time I'm seeing any reports for OpenGL being used by anyone so there was a lot less "Smart" testing done (mostly tested with the RSclient itself) :)
Also note that OSRS does NOT have an OpenGL/DirectX mode should you expect that it draws. I would assume that is what you mean by giving you a black screen?
Only EOC has OpenGL and if you switch Smart to OpenGL mode using the combobox at the top left, it would then give Simba the drawing/buffer. Keeping it in Safemode while being in OpenGL mode will give you black screen unless I really missed a line or something.
Flight
2013-05-31 01:14:22
From: Le Jingle
Edit: to clear that up, and to not have a confusing conversation;
smart loaded, plugin loaded, script executed successfully, I look at the rs settings menu and see its still in safe mode, go to the ogl option to veer away from safe mode, then upon clicking ogl mode whole computer crashed.
Your whole computer or just SMART and/or Simba? :/ If it really is your computer it might be out of date graphics cards, no? I would start there personally. I had to update mine the the most recent to fix some of this OGL bs and I'm glad I did.
After you've done that load up normal RS in the normal browser and change your graphic settings to OpenGL. Log in, log out, and close out; maybe this saves your graphics settings so the next time you load up RS (SMART also) it will put you in OGL mode automatically.
@Brandon:
You ninja'd me… Reading your post now…
Edit:
Yes yes, I'm sorry I was not clear, I do indeed mean printing SMART's mouse on the screen as seen in Safemode. On the same note I'm only talking about EoC here, I only mentioned OSR just long enough to tell you I got it working correctly, loaded up (of course the client remains in "safemode") and the mouse is printed there as normal; no problem at all in OSR.
I'm quite sure that I had everything correctly set up; SMART said it was in OpenGL mode in the dropbox but still no colors were being passed along to Simba. If you'd like I can play around with this a bit (with the mouse for sure) and see if I can't make a bit of progress. I'll double check again to make sure I'm in the right mode and everything and see if the buffer is being passed to Simba.
Edit2:
I'm in the correct mode and everything, still no buffer from SMART:

Oh yeah, I tried adding in the mouse-drawing as I mentioned before but to no luck; I'm guessing it's something really simple so maybe it's within my ability to fix. Although I wonder if it's connected at all with the above problem…
Brandon
2013-05-31 02:03:43
@Flight; Thanx! I replicated that problem. So yes I can and will fix it as soon as possible. And I'll be adding your work to the OP indeed (with your credits of course)!
Ok problem 1 (Java logic vs. Cpp Logic caught me off guard again):
client.setOperatingMode(OperatingMode.valueOf(ModeSelector.getSelectedItem().toString())); //Java's toString failed :(
//To:
client.setOperatingMode(OperatingMode.valueOf((String)ModeSelector.getSelectedItem())); //C-Style cast works.
See the difference? Extra retarded!! The first one does NOT work whereas the second one works even though both are casted/converted to strings.
Now that is what I call extremely weird!!
Problem 2: Though I wrote the plugin loader already and it was working in prior released, now I have to either find the one I wrote that is the most up to date working one.. OR start writing it again. (won't take me long). And no I did not switch any other files as I wasn't working on the others.
The file I'm referring to is: Smart/src/JNI/GLDXLoader.java just in case anyone wants to have a shot at it. Beware of another
Java snag if you decide not to wait (which I fixed but again :( ):
http://stackoverflow.com/questions/16711893/intbuffer-or-bytebuffer-as-parameter-problemsThen you should certainly read that!
EDIT: I must either be tired or just retarded.. I just realized I posted the link above to the semi-updated file LOL.. Goodnight :l
Daniel
2013-05-31 03:35:46
Hi Brandon,
Could this replace SMART as-is?
Thanks :)
Flight
2013-05-31 05:52:44
From: Brandon
Ok problem 1 (Java logic vs. Cpp Logic caught me off guard again):
client.setOperatingMode(OperatingMode.valueOf(ModeSelector.getSelectedItem().toString())); //Java's toString failed :(
//To:
client.setOperatingMode(OperatingMode.valueOf((String)ModeSelector.getSelectedItem())); //C-Style cast works.
See the difference? Extra retarded!! The first one does NOT work whereas the second one works even though both are casted/converted to strings.
Now that is what I call extremely weird!!
I edited Frame.java a bit to use an alternate way of converting the selected items to strings, in this case: String.valueOf().
ModeSelector.setSelectedItem(String.valueOf(client.getOperatingMode()));
…and…
client.setOperatingMode(OperatingMode.valueOf(String.valueOf(ModeSelector.getSelectedItem())));
…But no success on my end. :p
The 'GLDXLoader' I honestly have no idea. I looked over it and I haven't worked with anything even close to that so obviously I didn't see anything with mistakes.
Does this new SMART have a better fix for 6 hour re-loading? 8.0 always fail to spawn one but never retries -.-
From: Officer Barbrady
Does this new SMART have a better fix for 6 hour re-loading? 8.0 always fail to spawn one but never retries -.-
He's working on everything man :p Let him do his job!
Ashaman88
2013-05-31 09:43:20
From: Officer Barbrady
Does this new SMART have a better fix for 6 hour re-loading? 8.0 always fail to spawn one but never retries -.-
8.0 works fine for me. It is probably more to do with the include and or your computer setup than anything (have a 1 weeker going right now)
Imma try out this ogl stuff :)
From: Ashaman88
8.0 works fine for me. It is probably more to do with the include and or your computer setup than anything (have a 1 weeker going right now)
Imma try out this ogl stuff :)
What could be going wrong?
Le Jingle
2013-05-31 11:17:45
From: Ashaman88
8.0 works fine for me. It is probably more to do with the include and or your computer setup than anything (have a 1 weeker going right now)
Imma try out this ogl stuff :)
Brandon TV'd me to get mine working :]]] It's a lot different from the usual color and all, but overall pretty neat. Turned out I had an extra s added to a define statement >.> total face palm!
On a side note, when I visualize the overlay for OGL, it seems to slow way way down in rendering/buffer in SMART. Without the overlay though, it's quite nice (although it's tough to learn to grab invisible ID's / guess and check a lot without a visual).
Cheers again though!
Lj
From: Le Jingle
Brandon TV'd me to get mine working :]]] It's a lot different from the usual color and all, but overall pretty neat. Turned out I had an extra s added to a define statement >.> total face palm!
On a side note, when I visualize the overlay for OGL, it seems to slow way way down in rendering/buffer in SMART. Without the overlay though, it's quite nice (although it's tough to learn to grab invisible ID's / guess and check a lot without a visual).
Cheers again though!
Lj
does the OGL include support object finding?
From: Officer Barbrady
does the OGL include support object finding?
yes, everything you will need.
Kevin
2013-05-31 15:15:12
From: Ollybest
yes, everything you will need.
Not even remotely a need, so much as a passing curiosity, but would it be able to add additional 3D model draws and animation into the RS SMART view - obviously not affecting gameplay by any means, simply a visual and personal only draw of an object within the 3d space of what would be the world? (ie: a sign that you place behind a monster, so only part of it is visible, but visually appearing behind said monster).
Why would I want this entirely useless feature? Just to mess around with messing with people using any script I'd want to add that into.
From: Kevin
Not even remotely a need, so much as a passing curiosity, but would it be able to add additional 3D model draws and animation into the RS SMART view - obviously not affecting gameplay by any means, simply a visual and personal only draw of an object within the 3d space of what would be the world? (ie: a sign that you place behind a monster, so only part of it is visible, but visually appearing behind said monster).
Why would I want this entirely useless feature? Just to mess around with messing with people using any script I'd want to add that into.
Everything you need for object finding, ie will give you a TPoint of the object(s) location. :p Im also quite sure you can get the whole object if its covered by something, providing its drawn.
Brandon
2013-05-31 18:16:38
K well I'm alive again.. Was holding out another release to see if I can get the javax.media.opengl.awt.GLCanvas (
http://pastebin.com/9Rd9WVxR) component on the java side.. I cant unless I inject the code at that link into RS so there isn't a way that I personally can think of to draw a custom mouse or anything on the java side in GL/DX modes.
That said, there isn't anything stopping me from having the C++ plugin do it via JNI OR put an overlay above the applet and draw on that (kinda a lot of work I guess? Dunno never tried that yet).
Anyway, @Daniel Yes it can replace As-Is. That being said, it can only do that provided that the includes are replaces or updated to suit this one. There isn't too much to do in that aspect either (if any).
does the OGL include support object finding?
Of course. What else would those ID's and Text be for :S
but would it be able to add additional 3D model draws and animation into the RS SMART view - obviously not affecting gameplay by any means
Yes by moving via glTranslatef and glRotatef or changing the draw coordinates but what is the point of that? I'd be wasting time doing that because only you would be able to see such a change (no one else on the server would see it).
@Flight Yeah.. Had to make changes to the stupid Canvas again.. Its always the canvas:
@Override
public final void setVisible(boolean visible) {
super.setVisible(visible);
this.visible = visible;
if (this.client == null) {
this.client = smart.Frame.getClient(this);
}
if (this.client != null) {
this.client.update(this);
switch (this.client.getOperatingMode()) {
case OpenGL:
try {
this.client.drawGraphics(null); //Pass the pointer to JNI at least once. Can be modified to auto-detect what mode RS is in.
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException Ex) {
Main.StackTrace(Ex);
}
break;
case DirectX:
try {
this.client.drawGraphics(null); //Same as the OpenGL-comment above..
} catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException Ex) {
Main.StackTrace(Ex);
}
break;
default:
//Do nothing for Safemode because getGraphics will handle that. However, getGraphics is never called in OpenGL/DirectX modes..
//Thus we need to call these functions at least once when the canvas and use a Thread OR pass JNI a static buffer pointer.
//Passing a pointer must be done at least once..
break;
}
}
}
//Then these changes:
public static native void GetOpenGLBuffer(IntBuffer Buffer); //Needs to be ran in a thread (Smart 8.0/8.1 does this).
public static native void GetOpenGLStaticBuffer(IntBuffer Buffer); //Called once and the plugin stores the pointer and writes to it every frame.
public static native void GetDirectXBuffer(IntBuffer Buffer); //Needs to be ran in a thread (Smart 8.0/8.1 does this).
public static native void GetDirectXStaticBuffer(IntBuffer Buffer); //Called once and the plugin stores the pointer and writes to it every frame.
Next is due to the way I implemented the plugin (static JNI pointer), there's no longer need for a "Mode" switcher. It can auto-detect when in OpenGL/DirectX/Safemode due to the changes in the canvas (didn't implement this.. Just left it with the mode selector though).
So yeah.. Updated OP with the changes and OSR by Flight.
You can use colour in OpenGL mode so yeah DTM's and bitmaps and w/e else works.
http://i.imgur.com/X1je53e.png
Kevin
2013-05-31 18:33:00
From: Brandon
Yes by moving via glTranslatef and glRotatef or changing the draw coordinates but what is the point of that? I'd be wasting time doing that because only you would be able to see such a change (no one else on the server would see it).
I understand that only you would see that change as I mentioned it as a 'personal only draw.'
The point of that would be for only 1 option I can currently imagine:
Purely for the fun of viewing it and the available animations that you could create and show as an interaction (that would not be interacting with you, as it is purely aesthetic for the script user).
I only asked because I wasn't sure if it would be something that would require time of you, or whether there'd be available access natively via the api you're adding, or whether we will simply have get access. It's not a big deal as it's purely a mostly useless aesthetic "play-around" function.
Brandon
2013-05-31 18:49:48
From: Kevin
I understand that only you would see that change as I mentioned it as a 'personal only draw.'
The point of that would be for only 1 option I can currently imagine:
Purely for the fun of viewing it and the available animations that you could create and show as an interaction (that would not be interacting with you, as it is purely aesthetic for the script user).
I only asked because I wasn't sure if it would be something that would require time of you, or whether there'd be available access natively via the api you're adding, or whether we will simply have get access. It's not a big deal as it's purely a mostly useless aesthetic "play-around" function.
Yeah it wouldn't be difficult to add but I didn't see a use for such a thing which was asked before on the OpenGL thread so I didn't bother adding it. Only use I thought of at the time was for anti-leech where you can spawn a model or move a model to some random location on screen.
And yeah its a lot more work to add OpenGL stuff to the plugin atm because not only would I have to export for Lape, but I'd have to write wrappers and export those for Pascal-Script too. You can see that if you type GLIteratorPointer~ in Simba's function box. It should show one for iterating Ints, Floats, Raw, short, etc.. :( Lape however can do that natively.
Not to mention the limitations I have of passing things to Simba via SharedMemory/Serialization. In the past I found ways around those though. And I also had to write the Simba include as well. Perhaps I might just start working on the plugin again and hopefully finish the walking I started with Kasi.. Though I don't remember where I saved those files at all or how far I got or anything. IIRC, we worked on the text recognition with his good pattern finding skills as well.
TBH, the only time I do anything related to SRL/Smart/OpenGL/Bug-fixing/Internet is when I'm asked to or if I'm tagged/skyped/emailed/msg'd or if I release something here or one the web or anywhere that needs fixing and yeah..
Flight
2013-05-31 22:27:55
Ah there we go, received a fully colored bitmap from the OGL buffer for Simba. :thumbsup: I quickly tested SPS; it works like a charm. Nice to know we can still walk in OGL mode. Very good job Brandon. AFAIK all that's left now is, as you said before, drawing the mouse on the SMART canvas but it sounds like you have some ideas towards that. Keep up the great work!
From: Flight
Ah there we go, received a fully colored bitmap from the OGL buffer for Simba. :thumbsup: I quickly tested SPS; it works like a charm. Nice to know we can still walk in OGL mode. Very good job Brandon. AFAIK all that's left now is, as you said before, drawing the mouse on the SMART canvas but it sounds like you have some ideas towards that. Keep up the great work!
Have you tested the object finding with OpenGL yet?
@Brandon I have a couple questions about open gl:
1) how accurate is object finding, I understand you have to use some sort of tolerance? A I wrong here?
2) how fast is object finding?
3) do we have to update model ids after every update, every login, or whenever the model is changed ie graphical updates)
Thanks in advance
Brandon
2013-05-31 22:47:00
From: Officer Barbrady
Have you tested the object finding with OpenGL yet?
@Brandon I have a couple questions about open gl:
1) how accurate is object finding, I understand you have to use some sort of tolerance? A I wrong here?
2) how fast is object finding?
3) do we have to update model ids after every update, every login, or whenever the model is changed ie graphical updates)
Thanks in advance
1) 100% There is no mistakes for object finding. It's not going to find a random object with a specific ID. You give it a bad ID, it gives you nothing. You give it a valid Object ID, it returns all information about that object. Do what you want with the information. Click it, print it, read it, save it, etc.. It would only make a mistake if my math is off or I made a mistake implementing it.
2) Instant but then again, this depends on Simba. See, C++ side finds the model instantly. As fast as runescape can draw, that is how fast it is found. The second it is drawn on screen, it is recognized and saved. On the other hand, it sends it to Simba/PS/Lape for processing. If Simba's interpreter is slow, it will be slow. Fortunately, I haven't had any "slow" reactions in Simba. This includes text recognition and all that stuff. IIRC, it has chooseoption and all of that 100% accurate as well. Same with recognizing text.
You can see that the FPS is the same with the plugin loaded as without. Well for me it is. Press the Tilde (~) key on your keyboard and type displayfps to turn it on/off and see.
3) No. This isn't Java reflection/injection. There is no hooks involved. The only time an update is required is if Jagex updates their "Engine" to use different OpenGL calls (such as OpenGL 4.X+). And of course graphical updates would change an ID but does not require me to update Smart/Plugins. All it requires is the scripter update their Object-ID. Also colour is an option as well. So best of BOTH worlds are involved here. If you want to use colour, you can. If you want to use OpenGL, you can. If you want both, it's there. Also, this doesn't block Reflection/Injection so if Smart ever gets those back, you can also use those in combination with these options as well or entirely separate.
It's an option not just the only choice which is good.
The include currently has a file with a list of collected ID's I was using and AFAIK, it still works even though I wrote it near mid 2012. You can test it by checking ChooseOptions, GetSkillLevel, etc..
http://i.imgur.com/TZJZ514.png
From: Brandon
1) 100% There is no mistakes for object finding. It's not going to find a random object with a specific ID. You give it a bad ID, it gives you nothing. You give it a valid Object ID, it returns all information about that object. Do what you want with the information. Click it, etc..
2) Instant but then again, this depends on Simba. See, C++ side finds the model instantly. As fast as runescape can draw, that is how fast it is found. The second it is drawn on screen, it is recognized and saved. On the other hand, it sends it to Simba/PS/Lape for processing. If Simba's interpreter is slow, it will be slow. Fortunately, I haven't had any "slow" reactions in Simba. This includes text recognition and all that stuff. IIRC, it has chooseoption and all of that 100% accurate as well. Same with recognizing text.
3) No. This isn't Java reflection/injection. There is no hooks involved. The only time an update is required is if Jagex updates their "Engine" to use different OpenGL calls (such as OpenGL 4.X+). And of course graphical updates would change an ID but does not require me to update Smart/Plugins. All it requires is the scripter update their Object-ID. Also colour is an option as well. So best of BOTH worlds are involved here. If you want to use colour, you can. If you want to use OpenGL, you can. If you want both, it's there. Also, this doesn't block Reflection/Injection so if Smart ever gets those back, you can also use those in combination with these options as well or entirely separate.
The include currently has a file with a list of collected ID's I was using and AFAIK, it still works even though I wrote it near mid 2012. You can test it by checking ChooseOptions, GetSkillLevel, etc..
http://i.imgur.com/TZJZ514.png
Well, I know what I'm doing when I get home!
The reason I thought I would have to change model ids is because I saw a script on tribot were the user had to enter their model I'd each time they used the script
Flight
2013-05-31 22:50:16
From: Officer Barbrady
Have you tested the object finding with OpenGL yet?
Yes of course. Objects are projected as on-screen models and they all have specific ID's.
From: Officer Barbrady
@Brandon I have a couple questions about open gl:
1) how accurate is object finding, I understand you have to use some sort of tolerance? A I wrong here?
2) how fast is object finding?
3) do we have to update model ids after every update, every login, or whenever the model is changed ie graphical updates)
Thanks in advance
1) 100%. Each model on the screen is stored with the variables: ID, Stride, SX, SY and TriangleCount. The SX/SY is (always) the exact center of the model; so when a specific model is found at that very instant the middle of it is exactly found and you cannot 'miss it' unless it has changed position on your screen (NPC/Player walking and/or camera movement). Tolerance… I don't understand that part.
2) Well I just did a test at the fishing place at the barbarian village and this is the speed test:
ALL models found in 16 ms.
1 fishing spots found in 0 ms.
Tested 2 more times for nothing over 40ms.
3) No. The model I got for a fly-fishing spot (there's two different models for this one particularly) was back when this didn't even exist; I found this ID back when we only had Silab's original OGL interception, well over a year ago if I'm not mistaken. Only some models will change IDs and triangle counts if Jagex chooses to update their actual in-game appearance.
Ah darn it, I've been ninja'd, agh…
From: Flight
Yes of course. Objects are projected as on-screen models and they all have specific ID's.
1) 100%. Each model on the screen is stored with the variables: ID, Stride, SX, SY and TriangleCount. The SX/SY is (always) the exact center of the model; so when a specific model is found at that very instant the middle of it is exactly found and you cannot 'miss it' unless it has changed position on your screen (NPC/Player walking and/or camera movement). Tolerance… I don't understand that part.
2) Well I just did a test at the fishing place at the barbarian village and this is the speed test:
ALL models found in 16 ms.
1 fishing spots found in 0 ms.
Tested 2 more times for nothing over 40ms.
3) No. The model I got for a fly-fishing spot (there's two different models for this one particularly) was back when this didn't even exist; I found this ID back when we only had Silab's original OGL interception, well over a year ago if I'm not mistaken. Only some models will change IDs and triangle counts if Jagex chooses to update their actual in-game appearance.
Ah darn it, I've been ninja'd, agh…
Ahh we'll I thought it generated an I'd based off Angles and some complicated math stuff, and I figured if our camera angle changes then the object angles would be different making a different Id so then it would ned s tolerance or something lol. I just didn't fully understand how OpenGL works
Brandon
2013-05-31 22:55:15
From: Officer Barbrady
Well, I know what I'm doing when I get home!
The reason I thought I would have to change model ids is because I saw a script on tribot were the user had to enter their model I'd each time they used the script
Ohh I know what you're talking about. You mean this?
https://tribot.org/forums/index.php?/topic/543-item-ids/?hl=brandon#entry3657I thought they fixed that a while back? It used to be that way before but I came up with this idea to ignore the first few scan-lines on images. This doesn't affect models at all and Inventory/Bank/Interfaces are found perfectly as well. Angles don't affect it either because all triangles/pointers/quads are the same regardless of the angle you're looking at. Only difference is their location on screen which can be used for animation but its really hard to get that down to an art.
I remember when it "looked" like this:




Perfection! Lol.. Dunno where I put that code though and I was sure it had a bug so I removed that. But yeah it still gives you 100% accurate Model info.
@Officer Barbrady; There is other pictures above and on OP as well. Once you try it, you'll see it for yourself ;)
You can see more pics here:
http://villavu.com/forum/showthread.php?t=86230
Just wanna say no more lag! Works great ;)
I'll see if a Six hour reload works for me.
From: Brandon
Ohh I know what you're talking about. You mean this? https://tribot.org/forums/index.php?/topic/543-item-ids/?hl=brandon#entry3657
I thought they fixed that a while back? It used to be that way before but I came up with this idea to ignore the first few scan-lines on images. This doesn't affect models at all and Inventory/Bank/Interfaces are found perfectly as well. Angles don't affect it either because all triangles/pointers/quads are the same regardless of the angle you're looking at. Only difference is their location on screen which can be used for animation but its really hard to get that down to an art.
I remember when it looked like this:

Perfection! Lol.. Dunno where I put that code though and I was sure it had a bug so I removed that. But yeah it still gives you 100% accurate Model info.
Can you show me some more pictures of this OpenGL stuff? I'm getting pumped to arrive home haha
Ashaman88
2013-06-01 14:17:01
From: Officer Barbrady
Can you show me some more pictures of this OpenGL stuff? I'm getting pumped to arrive home haha
From: Ashaman88
Wools was going to add thanks to that comment but I hit "add" instead of the bar
Are you going to convert your Lrc to ope gl?
Or maybe a Lrc fisher? :)
Ashaman88
2013-06-01 14:28:47
From: Officer Barbrady
Wools was going to add thanks to that comment but I hit "add" instead of the bar
Are you going to convert your Lrc to ope gl?
Or maybe a Lrc fisher? :)
Gonna try out OGL LRC first, already have it able to identify present deposits or not :)
From: Ashaman88
Gonna try out OGL LRC first, already have it able to identify present deposits or not :)
Very nice, can it see models that are not on the screen? We wouldn't want to be like powerbot were they run 200 tiles to a gold ore deposit
Ashaman88
2013-06-01 14:32:38
From: Officer Barbrady
Very nice, can it see models that are not on the screen? We wouldn't want to be like powerbot were they run 200 tiles to a gold ore deposit
Not sure - I would probably just have it work like mine does now, but 100% detection and such
Itankbots
2013-06-01 15:11:19
Mine still just gets stuck on the "loading… Please wait" screen. and Never loads the actual smart clients…
I have no idea why…If anyone could help me would be much appreciated. Message me on here or skype peter_knight2191
Brandon
2013-06-01 19:57:55
From: Itankbots
Mine still just gets stuck on the "loading… Please wait" screen. and Never loads the actual smart clients…
I have no idea why…If anyone could help me would be much appreciated. Message me on here or skype peter_knight2191
You can send me a PM with your TV ID and pass if you like or if someone else is willing to help you then that's good too.
@Everyone else. If you find that you sometimes get awkward displays or can't find an ID because there is many on top of it, play around with the Stride. GLHSetStride takes the values: 12, 16, 20, 24, 36, 40. Some strides are only available in HD mode such as 28 and above. Other strides display different ID's.
12 Displays NPC's, whereas 24 displays Ground Items.. etc. So yeah Don't panic if you see a crap ton of ID's at once. GLHEnableFilter would also hide specific ID's or display only specific ones. It takes time to get used to the include. If you want, you can re-write it to your liking because what I wrote was fairly simple and just an example of how an include would be.
I think I covered all that in the tutorial or something.. Meh.. I'll probably go clean up a lot of the OpenGL api and make things a lot simpler (Currently converting a lot of it to C++x11 and Documenting it (finally)).
Couple more suggestions: maybe a button that opens up the Simba scripts folder :)
I was thinking maybe a button that could run Simba scripts automaticity but then I thought well that requires editing Simba and this isn't powerbot but it would still be cool
Brandon
2013-06-01 22:27:30
From: Officer Barbrady
Couple more suggestions: maybe a button that opens up the Simba scripts folder :)
I was thinking maybe a button that could run Simba scripts automaticity but then I thought well that requires editing Simba and this isn't powerbot but it would still be cool
That would be nice but that would limit Smart to only a specific Controller/Client. For example, I don't run Smart with Simba alone. I have a C++x11 Library that runs Smart using C++ compiled code. So I double click, enter my username/pass, it runs Smart and plays my script.
Adding a button like that would also not be helpful if Scar-divi adopts this Smart.
But yeah. Not a bad idea just don't think that would be an option for "everyone". I guess you could argue that they don't have to click it but meh.. What do you think after reading the above?
From: Brandon
That would be nice but that would limit Smart to only a specific Controller/Client. For example, I don't run Smart with Simba alone. I have a C++x11 Library that runs Smart using C++ compiled code. So I double click, enter my username/pass, it runs Smart and plays my script.
Adding a button like that would also not be helpful if Scar-divi adopts this Smart.
But yeah. Not a bad idea just don't think that would be good for "everyone".
You mean Simba? :)
I has another couple ideas but I forgot ffs, if I remember ill post here later ;)
Brandon
2013-06-01 22:48:52
From: Officer Barbrady
You mean Simba? :)
I has another couple ideas but I forgot ffs, if I remember ill post here later ;)
Well not specifically Simba. See, Smart wasn't just made for only Simba and I don't wanna take away the original intent of Smart in which Ben designed it. He still is and always will be the rightful owner of Smart and can do anything he wishes with it at any time.
Ex:
Scar can load smart and Simba can load Smart and any language that uses the same calling convention can load Smart and use it. Adding a button that is specific to Simba would imply that Smart is made for Simba alone. Besides that's what we have the start menu for. Now if Simba came up with a Script repository that needed to be maintained by Smart for whatever reason, then I'd have no problem incorporating that (though it can be done through a plugin.. Same with the button thing).
Ex2(Smart can be loaded by any language with the right calling conventions):
typedef int (*ptr_SpawnProcess)(char* RemotePath, char* JavaArgs, char* Plugins);
typedef int (*ptr_SpawnClient)(int PID, char* Root, char* Parameters, int Width, int Height, char* InitSequence, char* UserAgent);
int main()
{
tstring Bits = _T(sizeof(void*) == 8 ? "64" : "32");
tstring Library = _T("LibSmartRemote") + Bits;
#if defined _WIN32 || defined _WIN64
HANDLE Lib = LoadLibrary((Library + _T(".dll")).c_str());
#else
void* Lib = dlopen((Library + _T(".so")).c_str(), RTLD_LAZY);
#endif
#if defined _WIN32 || defined _WIN64
ptr_SpawnProcess SpawnProcess = reinterpret_cast<ptr_SpawnProcess>(GetProcAddress(Lib, _T("SmartSpawnProcess")));
ptr_SpawnClient SpawnClient = reinterpret_cast<ptr_SpawnClient>(GetProcAddress(Lib, _T("SmartSpawnClient")));
#else
ptr_SpawnProcess SpawnProcess = reinterpret_cast<ptr_SpawnProcess>(dlsym(Lib, _T("SmartSpawnProcess")));
ptr_SpawnClient SpawnClient = reinterpret_cast<ptr_SpawnClient>(dlsym(Lib, _T("SmartSpawnClient")));
#endif
SpawnProcess(...);
SpawnClient(....);
RunScript(...);
}
From: Brandon
Well not specifically Simba. See, Smart wasn't just made for only Simba and I don't wanna take away the original intent of Smart in which Ben designed it. He still is and always will be the rightful owner of Smart and can do anything he wishes with it at any time.
Ex:
Scar can load smart and Simba can load Smart and any language that uses the same calling convention can load Smart and use it. Adding a button that is specific to Simba would imply that Smart is made for Simba alone. Besides that's what we have the start menu for. Now if Simba came up with a Script repository that needed to be maintained by Smart for whatever reason, then I'd have no problem incorporating that (though it can be done through a plugin.. Same with the button thing).
Ex2(Smart can be loaded by any language with the right calling conventions):
typedef int (*ptr_SpawnProcess)(char* RemotePath, char* JavaArgs, char* Plugins);
typedef int (*ptr_SpawnClient)(int PID, char* Root, char* Parameters, int Width, int Height, char* InitSequence, char* UserAgent);
int main()
{
tstring Bits = _T(sizeof(void*) == 8 ? "64" : "32");
tstring Library = _T("LibSmartRemote") + Bits;
#if defined _WIN32 || defined _WIN64
HANDLE Lib = LoadLibrary((Library + _T(".dll")).c_str());
#else
void* Lib = dlopen((Library + _T(".so")).c_str(), RTLD_LAZY);
#endif
#if defined _WIN32 || defined _WIN64
ptr_SpawnProcess SpawnProcess = reinterpret_cast<ptr_SpawnProcess>(GetProcAddress(Lib, _T("SmartSpawnProcess")));
ptr_SpawnClient SpawnClient = reinterpret_cast<ptr_SpawnClient>(GetProcAddress(Lib, _T("SmartSpawnClient")));
#else
ptr_SpawnProcess SpawnProcess = reinterpret_cast<ptr_SpawnProcess>(dlsym(Lib, _T("SmartSpawnProcess")));
ptr_SpawnClient SpawnClient = reinterpret_cast<ptr_SpawnClient>(dlsym(Lib, _T("SmartSpawnClient")));
#endif
SpawnProcess(...);
SpawnClient(....);
RunScript(...);
}
Oo I never knew that I thought it was Simba specific nifty
Lalaji
2013-06-02 18:57:43
Can I suggest an additional feature I don't think smart has right now?
Add an option to start smart minimized, whether its the first time a script starts, or the sixhourfix starting a new client.
Thanks,
Let me know what you think :)
Ashaman88
2013-06-03 12:21:45
Well got LRC script working using OGL detection for the deposits and banking - minimal edits to script. This is pretty cool! I'll post a version of it once I transfer more of the script over to OGL
From: Lalaji
Can I suggest an additional feature I don't think smart has right now?
Add an option to start smart minimized, whether its the first time a script starts, or the sixhourfix starting a new client.
Thanks,
Let me know what you think :)
Simple idea but definitely a good one. It'd be nicer if SMART just started in the background.
Sawyer
2013-06-03 21:52:05
From: Ashaman88
Well got LRC script working using OGL detection for the deposits and banking - minimal edits to script. This is pretty cool! I'll post a version of it once I transfer more of the script over to OGL
I am VERY interested in OGL scripting. Where can I learn more of it?
Flight
2013-06-03 22:03:46
From: Sawyer
I am VERY interested in OGL scripting. Where can I learn more of it?
http://villavu.com/forum/showthread.php?t=88242^ That's the development thread but don't use the OpenGL32.dll or the GLHook.dll from that one, it's outdated. Use the one on the OP of this thread.
I don't think I'll be working with OGL as I've found over time I get hit with an intense amount of lag. I wonder if there's a memory leak somewhere. I've found the more models that are on the MS the slower everything runs. It's actually disappointing. :(
Brandon
2013-06-03 22:11:19
From: Flight
http://villavu.com/forum/showthread.php?t=88242
^ That's the development thread but don't use the OpenGL32.dll or the GLHook.dll from that one, it's outdated. Use the one on the OP of this thread.
I don't think I'll be working with OGL as I've found over time I get hit with an intense amount of lag. I wonder if there's a memory leak somewhere. I've found the more models that are on the MS the slower everything runs. It's actually disappointing. :(
Only if you display the drawings I found this. Such as displaying a ton of ID's at once. No leaks though because I didn't use any pointers. I'm actually re-writing the DLL from scratch and trying to get Smart to do the drawing instead (most likely impossible so I gotta find another way). Also cut down on the massive amount of code that draws the ID's.. It took me 27 lines previously to draw one ID and now 5 lines.
Other than that, I think the above suggested Ideas are good. I might just make it minimize to tray or something. Iunno. We'll see.
Flight
2013-06-03 22:17:47
Then this might be a clue as I only switched on the overlay once in the beginning while acquiring some model IDs, after that I turned it off, or atleast I thought, yet still things slowed over time. Do you think perhaps something in the debugging isn't being switched off when it's supposed to? Only a thought…
Le Jingle
2013-06-03 22:31:12
I know Brandon will either snipe me and/or post a much more detailed and complete post, but try the stride function that was mention via him (Brandon) a couple posts back in this thread. You can display different items via different strides, and also customize which groups/specifics you want painted too.
Hope this helps,
Lj
Sawyer
2013-06-03 22:55:23
From: Flight
http://villavu.com/forum/showthread.php?t=88242
^ That's the development thread but don't use the OpenGL32.dll or the GLHook.dll from that one, it's outdated. Use the one on the OP of this thread.
I don't think I'll be working with OGL as I've found over time I get hit with an intense amount of lag. I wonder if there's a memory leak somewhere. I've found the more models that are on the MS the slower everything runs. It's actually disappointing. :(
Alright Thanks :) I'll read up on it.
Ashaman88
2013-06-03 22:58:29
From: Sawyer
Alright Thanks :) I'll read up on it.
And just read through his include for a place to start
Sawyer
2013-06-04 17:32:41
From: Ashaman88
And just read through his include for a place to start
What Lape include am I supposed to install?
What would be the difference between directx intercepting and OpenGL?
From: Officer Barbrady
What would be the difference between directx intercepting and OpenGL?
One is intercepting DirectX and the other is OpenGL?
From: NKN
One is intercepting DirectX and the other is OpenGL?
…is one faster then the other?
From: Officer Barbrady
…is one faster then the other?
Flight
2013-06-04 20:45:36
From: Officer Barbrady
…is one faster then the other?
I doubt speed would differ that much. If I had to guess I'd say the difference between intercepting the two is very little; Brandon could probably tell you more about it.
Also, on that note,
@Brandon, do you know how Mato was able to use a series of mathematical procedures, in his DX interception, to accurately calculate the player's current tile position? Could the same be done in OpenGL?
euphemism
2013-06-04 20:52:53
From: Flight
do you know how Mato was able to use a series of mathematical procedures, in his DX interception, to accurately calculate the player's current tile position? Could the same be done in OpenGL?
He mentioned this quite a while back in his GLHook thread, yes it is possible. Brandon was working on it with someone, but as I recall it was quite difficult and his partner-in-crime left and so Brandon stopped working on it.
Brandon
2013-06-04 22:13:35
From: Flight
I doubt speed would differ that much. If I had to guess I'd say the difference between intercepting the two is very little; Brandon could probably tell you more about it.
Also, on that note, @Brandon, do you know how Mato was able to use a series of mathematical procedures, in his DX interception, to accurately calculate the player's current tile position? Could the same be done in OpenGL?
From: euphemism
He mentioned this quite a while back in his GLHook thread, yes it is possible. Brandon was working on it with someone, but as I recall it was quite difficult and his partner-in-crime left and so Brandon stopped working on it.
This. My partner in crime is still alive and talks to me on skype and stuff almost every other day. I can do the walking by myself but it'll take quite some time and probably would be 100% accurate but it'd work like SPS assuming I can get the code down.. Its HARD though! Believe me when I say its hard.
Uhh Mato's walking uses the compass angle and an exact point given by the scripter. If the user is not on that EXACT spot, it will not work.. Even if one pixel off, it will not work.
And yeah, OpenGL is not different from directx at all. Infact, I'm fairly certain that I can look at the DirectX calls and write a plugin that hooks that too. The only thing I hate is that I'd have to use all Microsoft API's.. I used directx before but never actually "hooked" it.. A debugger would be nice I guess if I knew one? Meh for OpenGL, I use 3 from best to worst: gDebugger, OllyDbg, glIntercept..
I can get a map from OpenGL and figure out the player's exact position within that map. Thing is, I don't have a way of knowing whether the map is varrock or what not. Its a local position and to walk, using unique points, you need a "Global" position. A hash of the map is difficult because many maps have the same average RBG colour.
My other idea was to use Assembly or a debugger and find where the RS Camera info is stored or write a shader emulator. If I get that Cam info, walking will be as accurate as reflection/injection.
Flight
2013-06-04 23:35:30
From: Brandon
This. My partner in crime is still alive and talks to me on skype and stuff almost every other day. I can do the walking by myself but it'll take quite some time and probably would be 100% accurate but it'd work like SPS assuming I can get the code down.. Its HARD though! Believe me when I say its hard.
Uhh Mato's walking uses the compass angle and an exact point given by the scripter. If the user is not on that EXACT spot, it will not work.. Even if one pixel off, it will not work.
And yeah, OpenGL is not different from directx at all. Infact, I'm fairly certain that I can look at the DirectX calls and write a plugin that hooks that too. The only thing I hate is that I'd have to use all Microsoft API's.. I used directx before but never actually "hooked" it.. A debugger would be nice I guess if I knew one? Meh for OpenGL, I use 3 from best to worst: gDebugger, OllyDbg, glIntercept..
I can get a map from OpenGL and figure out the player's exact position within that map. Thing is, I don't have a way of knowing whether the map is varrock or what not. Its a local position and to walk, using unique points, you need a "Global" position. A hash of the map is difficult because many maps have the same average RBG colour.
My other idea was to use Assembly or a debugger and find where the RS Camera info is stored or write a shader emulator. If I get that Cam info, walking will be as accurate as reflection/injection.
Well that answers my question. I was only curious about tiles and exact positioning via OGL not really pushing you to focus on that, you understand. And because with this custom SMART we can color SPS still works just fine, and in my opinion much better, visually comparing the minimap in safemode to the minimap in OGL; the difference is amazing. I would imagine SPS is extremely accurate in OGL mode as a result.
@Brandon are you still working on this?
Also, when I try to run it, Simba crashes. Smart pops up (does not load game) and then simba crashes.
Do I put the glhook bin stuff into plugins?
Brandon
2013-06-10 20:01:20
From: Officer Barbrady
@Brandon are you still working on this?
Also, when I try to run it, Simba crashes. Smart pops up (does not load game) and then simba crashes.
Do I put the glhook bin stuff into plugins?
You shouldn't have any crashes.. Either something is wrong with your Simba or you're doing something wrong..
I finished working on this.. I just never uploaded the final version which draws the mouse and graphics for OpenGL/DirectX because it's useless to upload without me uploading a modified OpenGL plugin to go along with it..
So I guess this might be another dead unused project I started here and never finished.. :l
Well at least it seems dead anyway.. And it'll be a long time before Simba adds anything to the updater.. For example, Smart 8.0 was supposed to be added 2 weeks ago but meh.. Lets get ready for another couple of months wait? 8.0 has been out more than 10+ months ago. So even if I do finish this today or tomorrow, it won't see any attention or usage for months.
For now, I have other priorities/projects that need attention. Perhaps another day I'll take a look at this and finish it or release a whole new OpenGL plugin. Not to mention Jagex purposely leaking memory or just not cleaning up after themselves would require my attention.
From: Brandon
You shouldn't have any crashes.. Either something is wrong with your Simba or you're doing something wrong..
I finished working on this.. I just never uploaded the final version which draws the mouse and graphics for OpenGL/DirectX because it's useless to upload without me uploading a modified OpenGL plugin to go along with it..
So I guess this might be another dead project I started and never finished.. :l
Can't run the test script inside of the include file I don't get it I moved all of the files into the plugsins
Brandon
2013-06-10 20:07:46
From: Officer Barbrady
Can't run the test script inside of the include file I don't get it I moved all of the files into the plugsins
Not sure what test script you're running or what Simba you're using but that should not be happening.. Also, make sure you don't have any Smart.pid files because if you do and its not the same ones that this Smart makes, then you'll crash for sure.. In other words, any files from the old smart will not be compatible with this one.
From: Brandon
Not sure what test script you're running or what Simba you're using but that should not be happening.. Also, make sure you don't have any Smart.pid files because if you do and its not the same ones that this Smart makes, then you'll crash for sure.. In other words, any files from the old smart will not be compatible with this one.
Ahh those randoms files smart creates? ffs their all over the place and I have to delete them all?
Brandon
2013-06-10 20:10:09
From: Officer Barbrady
Ahh those randoms files smart creates? ffs their all over the place and I have to delete them all?
Every last one.. This smart cannot read those ones because they have different Offsets within memory.. its like going from x32 to x64.. Different registers and addresses.. well this Smart has a lot of different addresses/offsets in the SharedMemory region.
From: Brandon
Every last one.. This smart cannot read those ones because they have different Offsets within memory.. its like going from x32 to x64.. Different registers and addresses.. well this Smart has a lot of different addresses/offsets in the SharedMemory region.
Just deleted them all, searched my whole computer, simba still crashes you got teamviewer?
Brandon
2013-06-10 20:12:54
From: Officer Barbrady
Just deleted them all, searched my whole computer, simba still crashes you got teamviewer?
Yeah.. Msg me the ID and Pass..
Flight
2013-06-10 22:49:11
Hey Brandon, I just noticed something, sending keys to this version of SMART is much slower than Ben's SMART; it takes a bit longer to press and release key. I found this out in OSRS and I haven't tried it in EoC. I haven't noticed any lag with clicking the mouse but the key input is much slower.
Edit:
@Brandon
I've noticed no canvas painting is possible with this version of SMART. None of the debug procedures from SmartGraphics displays on this SMART canvas; any thoughts Brandon?
Edit2:
Ok, so it does draw on the canvas but only for the time the script is running, once stopped the canvas is cleared. Is it supposed to be like this?
Brandon
2013-06-16 01:07:24
From: Flight
Hey Brandon, I just noticed something, sending keys to this version of SMART is much slower than Ben's SMART; it takes a bit longer to press and release key. I found this out in OSRS and I haven't tried it in EoC. I haven't noticed any lag with clicking the mouse but the key input is much slower.
Edit:
@Brandon
I've noticed no canvas painting is possible with this version of SMART. None of the debug procedures from SmartGraphics displays on this SMART canvas; any thoughts Brandon?
Uhh it does :S Unless I uploaded a bad version? The version I have paints in all modes and I was sure that the one on OP paints in safemode. If it's painting the mouse, it should paint the debug. But again, you need to have debugging enabled.
Send keys shouldn't be delaying :S It's a direct copy paste from the original Smart for the keys and mouse functions.
Flight
2013-06-16 01:12:27
From: Brandon
Uhh it does :S Unless I uploaded a bad version? The version I have paints in all modes and I was sure that the one on OP paints. Safe, GL, DX. If it's painting the mouse, it should paint the debug. But again, you need to have debugging enabled.
Send keys shouldn't be delaying :S It's a direct copy paste from the original Smart for the keys and mouse functions.
About the painting, I just did a test and the canvas is only painted on while the script is running, then cleared completely when stopped; is it supposed to be like this?
Yeah I'm not sure about the SendKeys. I tested rotating the minimap by both keypress and holding a key down and releasing over time. SMART8 responded instantly while this SMART was much slower to react. If you'd like to test I'd recommend loading up either RS, first with the normal SMART 8 and have a script rotate to either W/E/S and then print the RS angle; it should be very close. Now do the same with this SMART and you'll see it overshoots the angle by a large amount.
Brandon
2013-06-16 01:22:35
From: Flight
About the painting, I just did a test and the canvas is only painted on while the script is running, then cleared completely when stopped; is it supposed to be like this?
Yeah I'm not sure about the SendKeys. I tested rotating the minimap by both keypress and holding a key down and releasing over time. SMART8 responded instantly while this SMART was much slower to react. If you'd like to test I'd recommend loading up either RS, first with the normal SMART 8 and have a script rotate to either W/E/S and then print the RS angle; it should be very close. Now do the same with this SMART and you'll see it overshoots the angle by a large amount.
Hmm I'll test the keys again. Oh the clearing is probably because I put the painting in the "if (DrawMouse)" statement withing the client.java. Removing it from the if will make it draw constantly. I think I had it in that statement because someone wanted it to stop drawing the mouse when the script stops running.
I'll upload a version when I fix both the if statement and the key sending delay.
EDIT:Fixed both now. It should work fine and it's a lot faster (same speed as the original smart) than before for all input. Added to OP. I again, did not add the OpenGL drawing to this one because it requires me to upload the new plugin as well and it's not finished. However, drawing otherwise works.
Flight
2013-06-16 19:58:43
From: Brandon
Fixed both now. It should work fine and it's a lot faster (same speed as the original smart) than before for all input. Added to OP. I again, did not add the OpenGL drawing to this one because it requires me to upload the new plugin as well and it's not finished. However, drawing otherwise works.
Fantastic job Brandon, I'll try it out this morning!
It works great, thank you. :thumbsup:
Can someone explain to me how to use OpenGL with this? I placed the OpenGL32 plugin in the plugin folder, but Im not good enough to go from there. IRC is dead and Skype is uninterested :P
YoHoJo
2013-06-17 14:05:12
From: Brandon
So even if I do finish this today or tomorrow, it won't see any attention or usage for months.
I can do something about that :)
www.YouTube.com/YoHoJoSRL
From: Brandon
So I guess this might be another dead unused project I started here and never finished.. :l
Well at least it seems dead anyway.. And it'll be a long time before Simba adds anything to the updater.. For example, Smart 8.0 was supposed to be added 2 weeks ago but meh.. Lets get ready for another couple of months wait? 8.0 has been out more than 10+ months ago.
For now, I have other priorities/projects that need attention. Perhaps another day I'll take a look at this and finish it or release a whole new OpenGL plugin. Not to mention Jagex purposely leaking memory or just not cleaning up after themselves would require my attention.
no, No, NO!
We all love this thing, it's so awesome, it's full of great features that everyone has wanted and suggested for a long time, and it's great!
Look at SMART manager:
http://villavu.com/forum/showthread.php?t=76404Same sort of project, wasn't 'official' or anything but TONS of people used and loved it!
You keep working on this Mr! <3
Brandon
2013-06-17 14:09:44
From: King
Can someone explain to me how to use OpenGL with this? I placed the OpenGL32 plugin in the plugin folder, but Im not good enough to go from there. IRC is dead and Skype is uninterested :P
Copy the plugins to the plugins folder.
Copy the ~/Smart/Simba/*.Simba files to the ~/Simba/Includes/SRL/* folder. Aka whichever folder the corresponding file belongs in.
Download the OpenGL include from:
https://github.com/Brandon-T/SRL-GLHook and copy the files to ~/Simba/Includes/
From: Brandon
Copy the plugins to the plugins folder.
Copy the ~/Smart/Simba/*.Simba files to the ~/Simba/Includes/SRL/* folder. Aka whichever folder the corresponding file belongs in.
Download the OpenGL include from: https://github.com/Brandon-T/SRL-GLHook and copy the files to ~/Simba/Includes/
Ive gotten it all downloaded, but now Im getting an access violation error ;(
http://puu.sh/3idHw.pngIm not really sure what I did wrong this time, Its running as an admin as well. I dont want to hijack the thread! Ill see if I can find someone on skype :P
Brandon
2013-06-17 23:39:28
From: King
Ive gotten it all downloaded, but now Im getting an access violation error ;(
http://puu.sh/3idHw.png
Im not really sure what I did wrong this time, Its running as an admin as well. I dont want to hijack the thread! Ill see if I can find someone on skype :P
Turn that one line into an if statement:
{$DEFINE SMART}
{$I GLHook/GLHook.simba}
{$I SRL/SRL/Misc/Debug.Simba}
var
BMP, I: Integer;
Str: String;
begin
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
if (Not GLHSetDebug(True, True, 3)) then
begin
writeln('Failed To Setup GLHook. Please Check the Simba Console for more Info and place the plugins in the right folder.');
TerminateScript;
end;
end.
From: Brandon
Turn that one line into an if statement:
{$DEFINE SMART}
{$I GLHook/GLHook.simba}
{$I SRL/SRL/Misc/Debug.Simba}
var
BMP, I: Integer;
Str: String;
begin
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
if (Not GLHSetDebug(True, True, 3)) then
begin
writeln('Failed To Setup GLHook. Please Check the Simba Console for more Info and place the plugins in the right folder.');
TerminateScript;
end;
end.
Gives me a type mismatch on
if (Not GLHSetDebug(True, True, 3)) then
line, anybody feel free to TV me, Im sure I just messed up on the install /:
Brandon
2013-06-18 02:06:22
From: King
Gives me a type mismatch on if (Not GLHSetDebug(True, True, 3)) then
line, anybody feel free to TV me, Im sure I just messed up on the install /:
Ooops. Meant to put the if statement on the GLHSetup line:
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$DEFINE CSMART}
{$I GLHook/GLHook.Simba}
begin
Smart_Plugins := 'OpenGL32.dll'
SetupSRL;
if NOT GLHSetup(ToStr(SMART_CURRENTPROCESS)) then
begin
writeln('Fail');
TerminateScript;
end;
GLHSetDebug(True, false, 3);
end.
Meh.. I'm in the process of rewriting the plugin already so it'll be easier to use and install I guess.. Not sure if you wanna wait but here's a quick tutorial on installation:
Install Simba as usual.
Enable your Extensions and update your SRL until there's no more updates.
Download the plugins folder.
Copy ~Smart/bin/OpenGL32.dll to ~/Simba/Plugins/.
Copy ~Smart/bin/GLHook.dll to ~/Simba/Plugins/.
Copy ~Smart/Simba/Globals.simba to ~/Simba/Includes/SRL/SRL/Core/.
Copy ~Smart/Simba/SmartParams.simba to ~/Simba/Includes/SRL/Misc/.
Copy ~Smart/Simba/SRL.simba to ~/Simba/Includes/SRL/SRL/.
Download the GLHook include and copy the files to: ~/Simba/Includes.
Thus your folder would look like:
From: Brandon
Ooops. Meant to put the if statement on the GLHSetup line:
{$DEFINE SMART}
{$I GLHook/GLHook.simba}
{$I SRL/SRL/Misc/Debug.Simba}
var
BMP, I: Integer;
Str: String;
begin
SetupSRL;
if (GLHSetup(ToStr(Smart_CurrentProcess))) then
begin
writeln('Failed To Setup GLHook. Please Check the Simba Console for more Info and place the plugins in the right folder.');
TerminateScript;
end;
GLHSetDebug(True, True, 3);
end.
Meh.. I'm in the process of rewriting the plugin already so it'll be easier to use and install I guess.. Not sure if you wanna wait but here's a quick tutorial on installation:
Install Simba as usual.
Enable your Extensions and update your SRL until there's no more updates.
Download the plugins folder.
Copy ~Smart/bin/OpenGL32.dll to ~/Simba/Plugins/.
Copy ~Smart/bin/GLHook.dll to ~/Simba/Plugins/.
Copy ~Smart/Simba/Globals.simba to ~/Simba/Includes/SRL/SRL/Core/.
Copy ~Smart/Simba/SmartParams.simba to ~/Simba/Includes/SRL/Misc/.
Copy ~Smart/Simba/SRL.simba to ~/Simba/Includes/SRL/SRL/.
Download the GLHook include and copy the files to: ~/Simba/Includes.
Thus your folder would look like:
Followed to a T and still getting an access violation error /: IT gets an access violation error at any GL command after the setup command.
Brandon
2013-06-18 13:50:47
From: King
Followed to a T and still getting an access violation error /: IT gets an access violation error at any GL command after the setup command.
What does your console say? View the Simba console and see what it says in it.
Then in your Smartt console, right click it and make sure debug is checked and let me know what that says..
You don't seem to be loading the plugin at all :l That's the only way it would give that error.
Try this script (If it does not work, I'll teamviewer you..):
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$DEFINE CSMART}
{$I GLHook/GLHook.Simba}
begin
Smart_Plugins := 'OpenGL32.dll'
SetupSRL;
if NOT GLHSetup(ToStr(SMART_CURRENTPROCESS)) then
begin
writeln('Fail');
TerminateScript;
end;
GLHSetDebug(True, false, 3);
end.
DemiseScythe
2013-06-18 15:29:19
Alright, I got it to load. Thank you.
Why is the keyboard so slow?
Any GUI guide?
JPHamlett
2013-06-18 16:45:08
[Error] C:\Simba\Includes\SRL/SRL/misc/SmartParams.Simba(69:14): Unknown identifier 'SmartEnabled' at line 68
Compiling failed.
I get this error while trying the new smart.
DemiseScythe
2013-06-18 16:47:10
you need to replace that file with the .simba provided in the SMART folder
@Brandon
Is there any reason why I cannot change into OGL mode, not even manually?
I do have a decent graphic card so I should be able to get into it.

RS says to just delete the cache folders, any other ideas?
Win7 Pro SP1
Edit:
I can switch on the RS launcher so it must be smart related.
djborec
2013-06-18 16:57:35
Getting error in JVM:
Could not find main class: smart.Main. Program will exit.
I am actually running java 6u32 ,dunno if its problem, so jvm can not find main class or main class is not in compiled smart.java from bin folder?
DemiseScythe
2013-06-18 17:06:49
This version is supposed to run in Java 7 as written on the first page. I got 7u17 and it works just fine following the above instructions.
Just update your java and you will be fine.
Brandon
2013-06-18 17:08:29
Wow.. So many having trouble installing how?
From: DemiseScythe
you need to replace that file with the .simba provided in the SMART folder
@Brandon
Is there any reason why I cannot change into OGL mode, not even manually?
I do have a decent graphic card so I should be able to get into it.
Change your Path variable. If it's using JDK path, then change it to the JRE path. Jagex's fault for that one.
djborec
2013-06-18 17:11:47
From: DemiseScythe
This version is supposed to run in Java 7 as written on the first page. I got 7u17 and it works just fine following the above instructions.
Just update your java and you will be fine.
Yes just confirming updated java back to 7 and its working :)
DemiseScythe
2013-06-18 17:15:46
My PATH variable has this:
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\

Can you give me an example of what it should say?
I only got JRE installed on my machine so this is its path
C:\Program Files (x86)\Java\jre7\bin

Changing to DirectX doesnt work either, I am stuck on Safemode.
Brandon
2013-06-18 17:26:00
From: DemiseScythe
My PATH variable has this:
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\

Can you give me an example of what it should say?
I only got JRE installed on my machine so this is its path
C:\Program Files (x86)\Java\jre7\bin
Changing to DirectX doesnt work either, I am stuck on Safemode.
That should not be happening. Try adding that line to your Path and see if anything changes. You should be able to get in OpenGL and DirectX modes regardless :l I also have only JREu21 installed on my test machine.
Does your Original Smart (the version by Benland) get you into OpenGL mode? They both load it the same exact way.
As for the example, it looks like on the OP. When Smart loads any plugin, you'll see that green text at the bottom of the Loading Please Wait screen. If it fails, you see Red Text. If you don't want to load it, it shows nothing.
You should be able to get into OpenGL and DirectX mode WITHOUT the plugin..
djborec
2013-06-18 17:26:47
Oh I hoped it will work pairing in other way -> It will pair particular oepn sript with particular smart ,but it seems like it is pairing script you run with first unused open smart. :/
Anyway also noticed some flickering problems:
[video=youtube_share;OT9cVE9i4qY]
http://youtu.be/OT9cVE9i4qY[/video]
Brandon
2013-06-18 17:31:27
From: djborec
Oh I hoped it will work pairing in other way -> It will pair particular oepn sript with particular smart ,but it seems like it is pairing script you run with first unused open smart. :/
Anyway also noticed some flickering problems.
Hmm Thanx for that report. I'll fix that. It's the JTabbed pane when you hover over it, it switches the Console so it flickers (AWT components mixing with Swing components).
The pairing is the same as the original. If it does that in this one, it does that in the original.
:( Seems like 5b problems with Smart just hit me in one day.
DemiseScythe
2013-06-18 17:37:22
Solved the plugin not loading violation error by adding this line before SetupSRL;
Smart_Plugins := 'OpenGL32.dll'
The OGL thing that is on page 1 never appears, neither the failed version nor the regular version.
I do recall the Benland smart allowing me to get into at least DX mode.

Also where did people get SMART 8.2 from, I downloaded the file on page 1 and it had this smart on it.
I do have the flickering, if not too much trouble, it would be nice if you could add a pause/resume button on the SMART gui, the DisableSMART worked well because it killed the SMART mouse, so I could freely control the character with my mouse. When I do it now with the mouse overrite, my script fights with me over the control of the mouse unless I maximize Simba to pause the script, it shouldn't take over the mouse if it is in use aka the Disable Mouse button turned off kind of how Screensharing programs work, guest can move the mouse as long as the host isn't moving it. I am going to delete my cache to see if that enables me to change modes.
Brandon
2013-06-18 17:41:07
From: DemiseScythe
The OGL thing that is on page 1 never appears, neither the failed version nor the regular version.
I do recall the Benland smart allowing me to get into at least DX mode.
Also where did people get SMART 8.2 from, I downloaded the file on page 1 and it had this smart on it.
As with King, you're also not loading the plugin.. See the last 5 replies where I linked you to the script example that loads the plugin.
DemiseScythe
2013-06-18 18:00:10
From: Brandon
As with King, you're also not loading the plugin.. See the last 5 replies where I linked you to the script example that loads the plugin.
Alright, deleting the preference.dat and preference2.dat files on my computer fixed the switching problem. Thank you a lot and look at the sugestion I left on the previous page.
Brandon
2013-06-18 18:06:12
From: DemiseScythe
Solved the plugin not loading violation error by adding this line before SetupSRL;
Smart_Plugins := 'OpenGL32.dll'
The OGL thing that is on page 1 never appears, neither the failed version nor the regular version.
I do recall the Benland smart allowing me to get into at least DX mode.
Also where did people get SMART 8.2 from, I downloaded the file on page 1 and it had this smart on it.
I do have the flickering, if not too much trouble, it would be nice if you could add a pause/resume button on the SMART gui, the DisableSMART worked well because it killed the SMART mouse, so I could freely control the character with my mouse. When I do it now with the mouse overrite, my script fights with me over the control of the mouse unless I maximize Simba to pause the script, it shouldn't take over the mouse if it is in use aka the Disable Mouse button turned off kind of how Screensharing programs work, guest can move the mouse as long as the host isn't moving it. I am going to delete my cache to see if that enables me to change modes.
Ok great. Glad you got it solved. I'll try and get that all done sometime between today and tomorrow. I left the mouse as a fight because I wasn't sure who'd be the host.. The script or the user? I thought it'd just be best if the user pauses the script or disables the mouse input on smart itself.
For example. You're running a script and you want to move the mouse, shouldn't you pause the script first before trying to move the mouse because it'll just be a big fight between you and Smart. If I make Smart pause and allow you to have input, then your "script" will NOT be paused.. It'd still be running and trying to send Smart commands; so when you un-pause it, the script would be at a different position than it was when you paused Smart.
Unless of course I misunderstand what you mean.
DemiseScythe
2013-06-18 18:24:44
From: Brandon
Ok great. Glad you got it solved. I'll try and get that all done sometime between today and tomorrow. I left the mouse as a fight because I wasn't sure who'd be the host.. The script or the user? I thought it'd just be best if the user pauses the script or disables the mouse input on smart itself.
For example. You're running a script and you want to move the mouse, shouldn't you pause the script first before trying to move the mouse because it'll just be a big fight between you and Smart. If I make Smart pause and allow you to have input, then your "script" will NOT be paused.. It'd still be running and trying to send Smart commands; so when you un-pause it, the script would be at a different position than it was when you paused Smart.
Unless of course I misunderstand what you mean.
If I disable the mouse, I can't click on RS even if I try because the mouse commands from me will not go through. That is how your SMART currently works. What I mean is that when I enable it, Simba should lose control of the mouse until it is re-enabled, sort of the same effect as disabling smart in benland's program. Of course the script will continue but if the script has a failsafe, it shouldnt be a big problem, it is more efficient than pausing and resuming, since I am just looting an item here and there that my script missed. I was trying to pick up something while my script kept attacking the target, someone was able to walk around a rock and steal my loot before I was able to pick it from the floor.
Don't get me wrong, the keyboard overrite is genius, specially for babysitters but for the mouse, I believe it should stop the script while the user is using it. In regards to this, why doesn't both mouse and keyboard start disabled. If the user wants to use the mouse or keyboard, they can enable them afterwards but I believe most of the times the script is supposed to work on its own so it would make more sense if they both were disable from loading. That way hovering the mouse over the SMART window while doing other stuff shouldnt cause a "fight" problem.
Simply put, the modes should be as follows:
Mouse Enabled = User has 100% mouse control
Mouse Disabled = Script has 100% mouse control
No sharing in either mode, the keyboard is fine as it is.
PS. Is there any way to make the plugin more/less sensible ID wise.

It is rather crowded but if it will be too much trouble, it is alright, I'll just have to isolate the items/graphics to get individual IDs. I take it the plugin can see and differentiate all IDs even if they are stacked on top of eachother. Like if you write 6 over a 7 over a 9, a human would just see a mess but the program would see all 3 numbers? Ex. the pile of items south of my character.
Brandon
2013-06-18 18:46:20
From: DemiseScythe
If I disable the mouse, I can't click on RS even if I try because the mouse commands from me will not go through. That is how your SMART currently works. What I mean is that when I enable it, Simba should lose control of the mouse until it is re-enabled, sort of the same effect as disabling smart in benland's program. Of course the script will continue but if the script has a failsafe, it shouldnt be a big problem, it is more efficient than pausing and resuming, since I am just looting an item here and there that my script missed. I was trying to pick up something while my script kept attacking the target, someone was able to walk around a rock and steal my loot before I was able to pick it from the floor.
Don't get me wrong, the keyboard overrite is genius, specially for babysitters but for the mouse, I believe it should stop the script while the user is using it. In regards to this, why doesn't both mouse and keyboard start disabled. If the user wants to use the mouse or keyboard, they can enable them afterwards but I believe most of the times the script is supposed to work on its own so it would make more sense if they both were disable from loading. That way hovering the mouse over the SMART window while doing other stuff shouldnt cause a "fight" problem.
Simply put, the modes should be as follows:
Mouse Enabled = User has 100% mouse control
Mouse Disabled = Script has 100% mouse control
No sharing in either mode, the keyboard is fine as it is.
Kk I just have to remove an if statement to do that. So it's no problem at all. Yeah I forgot to renable the default Mouse/Keyboard. It can also be done via a script for now. For example: SmartSetKeyboard(False); SmartSetMouse(False);. I'll make them be disabled by default.
PS. Is there any way to make the plugin more/less sensible ID wise.
It is rather crowded but if it will be too much trouble, it is alright, I'll just have to isolate the items/graphics to get individual IDs. I take it the plugin can see and differentiate all IDs even if they are stacked on top of eachother. Like if you write 6 over a 7 over a 9, a human would just see a mess but the program would see all 3 numbers? Ex. the pile of items south of my character.
Yeah there's multiple ways:
GLHSetDebug(Overlay, DrawAll, WhatToDraw);
//Overlay will draw on screen if set to true.
//Draw all will cause everything to draw regardless of stride.
//WhatToDraw can range from 0 to 3. 0 = The long ID's you are seeing. 1 = Triangle Count. 2 = Position on screen.
GLHSetStride(Value); //Value can be 8, 12, 16, 20, 24, 28, 36, 40.
//I believe 12 is default and displays all NPC ID's. 24 displays only ground Items, 28+ displays High Detail models.
//Of course, :( I don't remember what ALL the strides do but different strides display different objects/models.
//Make sure DrawAll is set to false if you want to use the stride.
GLHSetFilter(.......); //Filters out ID's base on your input.
//If you want to display things only in specific areas, it can do that. Such as Text, Models, Textures, Colours, etc..
//It's more difficult to use this function than any other atm..
//I need to make it easier or else anyone without OpenGL knowledge would be stuck.. For now, forget that this exists.
//Another way is to just use:
//GLHook_GetModelsByArea or use any of the GLHook_*ByArea, GLHook_*TriangleCount functions.
Yes it will detect anything stacked including Models, Text, Textures.. It can also tell you if an item is highlighted/selected. You can check if clicked as well. It's really up to you to decide what you need.
I'm in the process of re-writing the plugin (No the ID's did not change but it's ridiculously faster and you can use Smart/Browser to draw the things such as Mouse, Models, Text, etc).. Forcing models to draw in specific areas, walking, camera angles, etc.. All is being worked on with my partner in crime
@Kasi;
Teaser (The ID's will be easier to see when I'm finished):
http://i.imgur.com/7RYvMcT.png
DemiseScythe
2013-06-18 18:53:06
Very cool, filtering the IDs will definitely help speed up the scripting a lot. Thank you for the help and I will wait for the next version of SMART. You should add a way to change the font color for the IDs while you are building the next version. I am not too fond of the color blue.
Damn I wish I could get it running -.-
DemiseScythe
2013-06-18 19:37:11
From: Officer Barbrady
Damn I wish I could get it running -.-
What is your problem, I pretty much know the whole thing from troubleshooting it myself
From: DemiseScythe
What is your problem, I pretty much know the whole thing from troubleshooting it myself
My firewall is blocking it, i turned off norton, didnt help, so i tried to turn off the windows firewall and it said
DemiseScythe
2013-06-18 19:56:03
From: Officer Barbrady
My firewall is blocking it, i turned off norton, didnt help, so i tried to turn off the windows firewall and it said
Norton meh, haven't used a brand name antivirus since McAfee, I got a problem with both it and Norton because they are incredibly annoying. I would suggest using MSE, it is light and still powerful protection. Best of all it doesn't do annoying things and doesn't spam me with warnings. I like it a lot and have been virus free for over a year. If you own the computer it might be worth a try. This OGL stuff is pretty cool.
On the other hand, you might have a virus. It is common for malware to take over the firewall and kill microsoft Defender after infection. Even if the virus is removed the programs have been damaged and will not work. I had a problem the other day that wouldn't allow me to turn Windows Defender on after a virus. Either way, if you scan clean, you can just do a simple "sfc /scannow" in the command prompt to repair windows files. If that still doesn't work, installing MSE will enable the windows firewall, you might be able to edit it then, afterwards you can uninstall MSE and go back to Norton if you wish. Good luck.
StickToTheScript
2013-06-19 01:37:48
Brandon.. This looks terrific! Nice job bro! I plan on using this! :D
The Mayor
2013-06-19 02:28:03
Someone should write a proper tutorial on how to install this and how to incorporate OpenGL in your scripts. I would but I don't have a clue ;)
From: The Mayor
Someone should write a proper tutorial on how to install this and how to incorporate OpenGL in your scripts. I would but I don't have a clue ;)
@YoHoJo :)
From: DemiseScythe
Solved the plugin not loading violation error by adding this line before SetupSRL;
Smart_Plugins := 'OpenGL32.dll'
The OGL thing that is on page 1 never appears, neither the failed version nor the regular version.
I do recall the Benland smart allowing me to get into at least DX mode.

Also where did people get SMART 8.2 from, I downloaded the file on page 1 and it had this smart on it.
I do have the flickering, if not too much trouble, it would be nice if you could add a pause/resume button on the SMART gui, the DisableSMART worked well because it killed the SMART mouse, so I could freely control the character with my mouse. When I do it now with the mouse overrite, my script fights with me over the control of the mouse unless I maximize Simba to pause the script, it shouldn't take over the mouse if it is in use aka the Disable Mouse button turned off kind of how Screensharing programs work, guest can move the mouse as long as the host isn't moving it. I am going to delete my cache to see if that enables me to change modes.
I FRAKING LOVE YOU <3 I was so upset with the access violation error, neither I nor Brad could load it >.< Add to the main page please!
Cant load OpenGL through the client, this one or Tribot, updated drivers fully, it works fine on the runescape website. I deleted all caches and retried, still no luck. Ideas? @Brandon
Flight
2013-06-19 20:58:50
From: King
Cant load OpenGL through the client, this one or Tribot, updated drivers fully, it works fine on the runescape website. I deleted all caches and retried, still no luck. Ideas? @Brandon
I had the same issue. If you have JDK set as your PATH in Environment Variables then change it to JRE instead. You can get a more detailed explanation from this post:
http://villavu.com/forum/showthread.php?t=102735&page=7&p=1244506#post1244506
From: Flight
I had the same issue. If you have JDK set as your PATH in Environment Variables then change it to JRE instead. You can get a more detailed explanation from this post:
http://villavu.com/forum/showthread.php?t=102735&page=7&p=1244506#post1244506
Trying in a few minutes, I was in the middle of updating java when I read that!
E* JESUS MOTHER OF GOD THANKYOU<3 I should have read more, thankyou for pointing me to that post :)
Brandon
2013-06-21 09:22:59
There.. Updated. Before you guys start wondering why a lot of the "Tabbed" features are striked-out it's because this version will NOT contain tabs.
Yes you read that right. I kept both versions of Smart. The Tabbed one and the current one on the OP without the Tabs.
Explanation is in the ChangeLog.txt but for the lazy:
There is a massive memory build up in the RS applet now. I don't know what it is but if I close a Tab, the memory is no longer cleaning like it was before. It only started happening since the most recent RS update(s). Yes I tried figuring it out and debugging for hours.. No cigar. Not only is it within the Applet, but also within GLCanvas.java as well.. And the reason? Well.. think about it. Rather than allowing bots to run multiple tabs, Jgx probably remove the clean up functions and let them close the process (ie Stop & Dispose). Well at least that's why I believe that's happening. Only way to have multiple tabs now is to give each tab its own process and I'm certainly not down for that kind of work (If I could even figure out how if that's even possible..)
Related threads that I created to see if anyone else had ideas on solving it:
Each tab with it's own Process Thread:
http://stackoverflow.com/questions/16782611/new-jvm-or-process-per-tabApplet Crash when attempting to clean up:
http://stackoverflow.com/questions/16846813/applet-crash-on-stop-destroyI decided to make this change because I think everyone would rather have more free memory for more bots rather than less memory for few tabs.
Next, to make up for such a massive change, I tried finding a way to minimize Smart to the tray while allowing it to still take input.. Doing this in just Java simply is NEAR impossible or extremely difficult IMO..
http://stackoverflow.com/questions/17228675/jframe-remove-taskbar-iconSo, I added some JNI/C++ code to libsmartjni and reflection to the Java side which takes care of that.. So yeah no more tabs = more memory, and we have minimize to tray and everything else we had before + a bit more. I did keep the source for BOTH Tabbed & Non-Tabbed Smart so if the game is done playing dirty, then I'll add it back.
Ohh and the current Smart plugins can actually load this Smart. It's loaded the EXACT same way as the current Smart. Here's the diffchecker for the include:
SRL.Simba:
http://www.diffchecker.com/f01g534vSmartParams.Simba:
http://www.diffchecker.com/u7fbum5q
Flight
2013-06-21 10:17:31
Ah now that looks good. Yes I believe you made the right decision, TBH. I'll download it tomorrow and see how it does.
With the previous revision of your custom SMART I still had compile errors relating to the plugins (not smart.jar) which prevents me from editing & compiling them, which I need to do if I want to try my hand at reflection. I'm quite sure I have the newest MinGW however. So I'll try out this version tomorrow, like I said, and hopefully it'll compile up successfully for me this time. Otherwise, I'm still kinda stuck there. :S
Brandon
2013-06-21 10:54:52
From: Flight
Ah now that looks good. Yes I believe you made the right decision, TBH. I'll download it tomorrow and see how it does.
With the previous revision of your custom SMART I still had compile errors relating to the plugins (not smart.jar) which prevents me from editing & compiling them, which I need to do if I want to try my hand at reflection. I'm quite sure I have the newest MinGW however. So I'll try out this version tomorrow, like I said, and hopefully it'll compile up successfully for me this time. Otherwise, I'm still kinda stuck there. :S
I use C++x11 compiler for everything and Java JDKu21.
1. I downloaded the latest Mingw/GCC/G++ 4.8.1 from:
http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.8.1/64-bit/threads-posix/sjlj/2. I extracted it to C:/
3. I renamed the folder from Mingw64 to Mingw. So it looks like: C:/mingw/bin.
4. I install MSYS from:
http://sourceforge.net/projects/mingw/files/latest/download5. I do NOT install the compiler from step 4. Only Msys basic system (non-development version). Just check off the box.
6. I run MSYS: C:\MSYS\msys\1.0\msys.bat
7. I type: CD "C:/Users/Brandon/Desktop/Smart" With the quotes.
8. I type "make clean windows" without the quotes.
9. I type "make windows BitFLG=-m64" without the quotes.
10. I then type "exit" without the quotes and I navigate to ~Smart/bin and copy my plugins to ~/Simba/Plugins. voila :)
Kevin
2013-06-21 12:41:23
From: Brandon
There.. Updated. Before you guys start wondering why a lot of the "Tabbed" features are striked-out it's because this version will NOT contain tabs.
Yes you read that right. I kept both versions of Smart. The Tabbed one and the current one on the OP without the Tabs.
Explanation is in the ChangeLog.txt but for the lazy:
There is a massive memory build up in the RS applet now. I don't know what it is but if I close a Tab, the memory is no longer cleaning like it was before. It only started happening since the most recent RS update(s). Yes I tried figuring it out and debugging for hours.. No cigar. Not only is it within the Applet, but also within GLCanvas.java as well.. And the reason? Well.. think about it. Rather than allowing bots to run multiple tabs, Jgx probably remove the clean up functions and let them close the process (ie Stop & Dispose). Well at least that's why I believe that's happening. Only way to have multiple tabs now is to give each tab its own process and I'm certainly not down for that kind of work (If I could even figure out how if that's even possible..)
@Ollybest wants you to know the tabs are the most important and only thing he cares about in your smart. "tell brandon that, the tabs on smart was like.. the only thing i really wanted lol :P"
Also on that note: I'm curious about some more of the specifics of the situation. What operating system are you currently running on? If you hit the max memory of your JVM with tabs, close a couple, and attempt to open a couple of new ones, is the JVM crashing, or is it handling that situation fine?
If those questions don't lead to a hopeful solution, then would you be willing to consider a JNI application that would use a .NET base to create the tabs that are then individually controlled java side as opposed to handling the entire situation Java side? .NET 4.0 has introduced some new functionality with the new TPL that I think could allow you to designate each tab as its own Task and upon closing it, you can forcefully shut it down and enforce an AggregateException if need be (hopefully you wouldn't have to go to that extent however) to ensure the tab is cleaned up completely ignoring any logic that Jgx may have in place in an attempt to keep their memory open.
hey! Tabs are the only thing i would like.. rest are nice extras :P
Ashaman88
2013-06-21 15:07:40
Is the new ogl plugin good to go as well?
Brandon, I installed it with the instructions of the ReadMe that you included in
Smart v8.1 Rev 5.7.zip\SMART\Information, and when I compiled your example
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$DEFINE CSMART}
{$I GLHook/GLHook.Simba}
begin
Smart_Plugins := 'OpenGL32.dll'
SetupSRL;
if NOT GLHSetup(ToStr(SMART_CURRENTPROCESS)) then
begin
writeln('Fail');
TerminateScript;
end;
GLHSetDebug(True, false, 3);
end.
I got the error
[Error] (11:25): Unknown identifier 'SMART_CURRENTPROCESS' at line 10
EDIT: Tried a script that I made awhile ago (non OGL obv :p) and your client loaded fine and the script worked fine, so it seems like it's just OGL that I've managed to not install correctly.
sm0k3
2013-06-21 21:39:45
Change SMART_CURRENTPROCESS to SMART_CURRENTCLIENT and it should go fine …. worked for me …
Who wants to help me with my windows firewall issue?
Hi Brandon, for antiban sake its something ive always wondered What actually happens to the mouse when you move it off the client on smart? (ie mouse(-100, -100, 0, 0)) like does it actually go to -100, -100 or just go off the screen and chill there?
Justin
2013-06-21 22:12:21
From: Officer Barbrady
Who wants to help me with my windows firewall issue?
Re-install windows.
From: Justin
Re-install windows.
No.
Anybody who can legitimately help me?
Thank for who ever de-repped me.
sm0k3
2013-06-21 22:23:55
whats actualy happening ..?
Edit: you said "My firewall is blocking it" how do you know its the firewall blocking it … also im not sure about the error .. can you get to firewall via controlpanel->Windows Firewall if so can you get to the advanced page ( the one that lets you add ports)
Justin
2013-06-21 22:33:11
From: Officer Barbrady
No.
Anybody who can legitimately help me?
Awkward, I was offering legit advice. Whenever there's a problem with windows, it's quicker to reimage your PC…
From: sm0k3
Change SMART_CURRENTPROCESS to SMART_CURRENTCLIENT and it should go fine …. worked for me …
I tried that, but it compiled and then wrote
[Hint] C:\Simba\Includes\GLHook/Amount.Simba(5:10): Variable 'Result' never used at line 4
Compiled successfully in 1419 ms.
SRL Compiled in 16 msec
Paired with SMART[1148]
Fail
Successfully executed.
so I wasn't sure if changing it was the right thing to do.
Also it claimed to have paired with a client even though there wasn't one open, so I don't know what was up with that :/
Brandon
2013-06-21 23:55:10
Ohh jeez.. away for a few hours, all hell breaks loose.
1. Yes the future OpenGL plugin is already in development Asha. You have me on Skype :S The one on the thread atm, is fine as is. I did update it though but it'll never be the same as the next release which is already so far ahead.. The walking is what's stopping myself and Kasi from moving forward though.. It's a killer to get down if we can even get it down at all.. There's too many variables and things we don't know yet.
2. Olly might like the tabs and believe me, no one likes the tabs more than I do.. After all, I spent so much time programming it and getting it done right only to have this happen.. I actually don't mind putting the "Tabbed" source up if he still wants it. Up to him to decide how he wants his memory used. I only made a decision I thought would be beneficial to "Most" users. Not all. Yeah I'm unhappy about it as well but I did try..
3. It is indeed possible to actually load the JVM with another language. See here:
http://avdongre.wordpress.com/2012/07/12/launching-jvm-from-c/ and
http://www.codeproject.com/Articles/24029/Home-Made-Java-Virtual-Machine But like I said, that really is a lot of work.. I'm not going to take on too many projects at once and disappoint everyone. So the answer is both a yes and a maybe and a no. Yes it can be done. Will I do it? I don't actually know. Is it easy to add? NO way!
And Yes I did try maxing out the JVM and w/e else. Doesn't work either. Just crashes it. Maybe it's different for you guys. If you want the tabbed source, I can upload it.
4. When the mouse is not within the bounds of Smart, it sends a MouseExited event. Similar to the user themselves moving the mouse out of the window. See InputManager.java for implementation details. It's the same as the official Smart. Copy Pasta.
5. Delete your Smart.pid files and Smart.cp files. Your script seems fine to me. As for that firewall thing, believe me.. I tried to help him over TV. It'd take more than just half an hr.. I even recompiled Smart on his comp and modified it over TV for him specifically. He cannot open Windows firewall due to:
http://answers.yahoo.com/question/index?qid=20111213192413AA7SNR6and no I didn't try fixing it.. I simply tried re-writing Smart's sockets but no cigar.. His comp doesn't let it connect to "Local" ports :l awkward.. Not even 127.0.0.1.. aka LocalHost. Iunno. Someone else could try to help him or else he'll have to wait till I'm not as busy as usual or just reformat if he's up to it (which I doubt.. usually a pain to do).
From: Brandon
5. Delete your Smart.pid files and Smart.cp files. Your script seems fine to me.
Thanks, I deleted those stray smart files and it loaded the client. When it loaded, the graphics mode tab was set to safemode. Does this need to be manually set to OGL mode every time or is there something the script can call to get it to automatically load OGL? Also, when the game had loaded (in safemode according to the tab) there was only an AutoSetup button for the graphics, and when I pressed it the client closed. Here's a picture:
[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(82:12): Unknown identifier 'SmartClientCountPID' at line 81
When I'm trying to run an osrs script :(
Replaced all the according files.
Brandon
2013-06-22 21:13:46
From: Sjoe
[Error] C:\Simba\Includes\SRL-OSR/SRL/misc/SmartParams.Simba(82:12): Unknown identifier 'SmartClientCountPID' at line 81
When I'm trying to run an osrs script :(
Replaced all the according files.
If you get that, then you didn't replace all files. That function doesn't exist.
@BMWxi, There's no way to force OpenGL mode. If you're in it, you're in it. ie. Smart will automatically be in that mode the next time it starts.
If you're not in it, then you're in some other mode. Smart forces safemode by holding down the 's' key which is defined in SmartParams as one of the parameters.
From: Brandon
If you get that, then you didn't replace all files. That function doesn't exist.
@BMWxi, There's no way to force OpenGL mode. If you're in it, you're in it. ie. Smart will automatically be in that mode the next time it starts.
If you're not in it, then you're in some other mode. Smart forces safemode by holding down the 's' key which is defined in SmartParams as one of the parameters.
How do I get into OpenGL mode so that SMART will automatically be in that mode when it starts?
DemiseScythe
2013-06-23 17:23:46
From: BMWxi
How do I get into OpenGL mode so that SMART will automatically be in that mode when it starts?
There is an additional file in the .zip for rev 5.7
Look for a file named information, it has a SRL.simba and SmartSettings.simba that you will also need to replace in addition with the plugins.
If you do that, whenever you have {$DEFINE GLHOOK} in your script, the script will load into either OGL or DirectX mode, simply go into the settings, change it to OGL, fixed and min settings and you are set to go the next time your client loads. If there is no {$DEFINE GLHOOK} at the top of your script, the client will load into Safemode to allow the use of normal color only scripts.
Those of you saying that their client dissappeared, when you clicked the purple icon, look at your system tray, that button simply minimizes the client to it, it does not close it.
From: DemiseScythe
There is an additional file in the .zip for rev 5.7
Look for a file named information, it has a SRL.simba and SmartSettings.simba that you will also need to replace in addition with the plugins.
If you do that, whenever you have {$DEFINE GLHOOK} in your script, the script will load into either OGL or DirectX mode, simply go into the settings, change it to OGL, fixed and min settings and you are set to go the next time your client loads. If there is no {$DEFINE GLHOOK} at the top of your script, the client will load into Safemode to allow the use of normal color only scripts.
Those of you saying that their client dissappeared, when you clicked the purple icon, look at your system tray, that button simply minimizes the client to it, it does not close it.
In my information folder it has SRL.simba and SmartParams.simba, no SmartSettings.simba.
I replaced SRL.simba and SmartParams.simba with the ones from the rev 5.7 .zip, but it still loads in safemode with the test script.
Where is the SmartSettings.simba?
DemiseScythe
2013-06-23 21:54:21
Meant SmartParams.simba instead and it should work just fine. I cannot get mine to load in safemode without manually entering s with my keyboard but it works fine to loading in OGL.
Make sure you start your script like this:
program Name;
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$I GLHook/GLHook.Simba}
From: DemiseScythe
Meant SmartParams.simba instead and it should work just fine. I cannot get mine to load in safemode without manually entering s with my keyboard but it works fine to loading in OGL.
Make sure you start your script like this:
program Name;
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$I GLHook/GLHook.Simba}
Yeah, I have this at the beginning of mine too.
Brandon
2013-06-24 11:30:07
Updated OpenGL and its include.. Just a pre-beta to the one myself and Kasi are working on. This dll on the OP only has the debugging features of the new dll. Doesn't have the increases in speed and better algorithms/findings, etc.. Just the extra debugging and bug fixes. And I changed the API names a bit so they correspond to the new ones. Not a big deal but I have other uses for the Old API names.
Additions to debugging include being able to single out textures by ID. Being able to single out textures and display them in a brand new HUD display with all necessary information for developers. Filters for all Hooked Data: Models, Fonts, Textures. Easier to read and a change of font/colour. New drawing API written from scratch. See Render.hpp and Render.cpp for more Info on that. And all of this can be hidden as well. In combination with GLHook_GetTexturesByArea and using a for-loop, you can render each texture to the HUD to see what has which ID. Helps with texture stacks. Might look a bit ugly but I'm not a designer.
Using a new print function written with C++x11 features (Variadic Templates in combination with Lambdas). Accepts Infinite Arguments:
template<typename... Args>
void Render::Print(float X, float Y, const char* Text, Args... args)
{
this->Print(X, Y, 1, 1, 1, Text, std::forward(args)...);
}
template<typename... Args>
void Render::Print(float X, float Y, float R, float G, float B, const char* Text, Args... args)
{
using namespace std;
std::size_t Position = 0;
std::string Container(Text);
std::vector<std::string> Arguments;
std::initializer_list<int> {(Arguments.push_back(to_string(args)), 0)...};
for (auto it = Arguments.begin(); it != Arguments.end(); ++it)
{
if ((Position = Container.find("%")) != std::string::npos)
{
Container.replace(Position, 1, *it);
}
}
glColor3f(R, G, B);
glRasterPos2f(X, Y);
glPushAttrib(GL_LIST_BIT);
glListBase(this->Base - 32);
glCallLists(Container.size(), GL_UNSIGNED_BYTE, Container.data());
glPopAttrib();
glFlush();
}
Meh time to sleep now. Enjoy the screenies and new functionality:
Ex:

And:
Turpinator
2013-06-24 20:21:31
Rev 5.7 bug.
On loading rs and displaying… if I move it to a different monitor, the screen goes black and the script basically pauses or something. It appears as if it keeps running, but i have done this while walking a path, and it stops at the last flag clicked before going black.
I have not tested as to whether this is just me, or if it is due to a paint conflict or maybe even my use of ultramon. Nooo idea yet, but if i recall correctly, this did not occur on… 5.2ish.
Kevin
2013-06-25 15:30:50
Shite. I don't like posting questions or "halp me." But I dunno what part I'm missing out on here. I can get the new smart to load in safe mode fine. And in OGL mode it opens up a new SMART (in OGL that I can switch back and forth between SAFE) and as far as I can tell - it is working. Except it doesn't draw anything in OGL mode. Actions still seem to occur, they just aren't drawn (no matter which of the above settings in the top right corner are on/off). If I switch to Safe mode, I can see everything as it has progressed, but switching back to OGL again will just freeze the screen as it continues to not draw.
Any idea what may have led to that issue?
From: Kevin
Shite. I don't like posting questions or "halp me." But I dunno what part I'm missing out on here. I can get the new smart to load in safe mode fine. And in OGL mode it opens up a new SMART (in OGL that I can switch back and forth between SAFE) and as far as I can tell - it is working. Except it doesn't draw anything in OGL mode. Actions still seem to occur, they just aren't drawn (no matter which of the above settings in the top right corner are on/off). If I switch to Safe mode, I can see everything as it has progressed, but switching back to OGL again will just freeze the screen as it continues to not draw.
Any idea what may have led to that issue?
I am at the same stage as Kevin, except when I set Runescape's graphics to OGL from safemode it closes the client.
Also if I click the "Available graphics options have changed" button (which it forces you to do) the client closes.
Brandon
2013-06-25 17:44:38
@Both of you. I haven't touched the client since.. The only updates I made was to the OpenGL plugin. Thus if something is wrong with the plugin, I need to isolate it. Try deleting the plugin and running the client without it. Switch to OpenGL mode. Does it work? If it does, then I probably dynamically compiled the plugin rather than statically. In that case, I'd just have to recompile and re-upload it (the source is there if you guys want to compile it as well).
Kevin
2013-06-25 18:26:11
Removing the OpenGL plugin and running again leaves me with the exact same functionality as prior (although now the plugin can't be found if I run the "Test - OpenGL" for obvious reasons :p).
(Changing RS itself to OpenGL mode just informs me that it cannot draw in that mode and auto changes back to SAFE)
As a side note, I think you have a bug somewhere upon freeing SMART from SIMBA as it SMART.xxxx files will remain permanently in use (can't be deleted - at least until a system restart) if I close simba prior to closing smart.
Flight
2013-06-25 20:34:58
Alright, I still have rev. 56 I believe (still with tabs) but I doubt the procedure here is much different in 57.
For those of you not getting SMART to load up in OpenGL mode, try this. First, make sure the Java in your PATH (environment variables) is using
JRE, not JDK. You can find out more info in this post:
http://villavu.com/forum/showthread.php?t=102735&page=7&p=1244506#post1244506Next, try loading up Runescape in your normal browser; does it load up automatically in OpenGL? If not, switch it to OGL in the normal browser, log in, log out, head back to the home page, load it again; this time is it in OpenGL? It should be… Now run SMART again and see if it doesn't load up in OGL mode.
Also, in initiation part of your script make sure the OpenGL32 plugin is loaded
before SetupSRL:
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
When you first start SMART and that little splash screen appears it will tell you if the plugin was loaded successfully or not (although the debug may need to be enabled for this). As Brandon said before it doesn't matter what mode is displayed in the upper left-hand corner of SMART (Safe/OGL/DirectX), what matters is the mode that is loaded in the client itself. When SMART fully loads check the graphics settings to see if it's automatically in OpenGL, if so
then go ahead and switch SMART's settings to OpenGL mode in the top-left corner.
I hope that helps.
From: Brandon
@Both of you. I haven't touched the client since.. The only updates I made was to the OpenGL plugin. Thus if something is wrong with the plugin, I need to isolate it. Try deleting the plugin and running the client without it. Switch to OpenGL mode. Does it work? If it does, then I probably dynamically compiled the plugin rather than statically. In that case, I'd just have to recompile and re-upload it (the source is there if you guys want to compile it as well).
Using a non-OpenGL script I was able to load the client and switch runescape's graphics to OpenGL without your SMART closing itself. (Using the OpenGL include the client would always close itself when I switched runsecape's graphics to OpenGL)
From: Flight
Alright, I still have rev. 56 I believe (still with tabs) but I doubt the procedure here is much different in 57.
For those of you not getting SMART to load up in OpenGL mode, try this. First, make sure the Java in your PATH (environment variables) is using JRE, not JDK. You can find out more info in this post:
http://villavu.com/forum/showthread.php?t=102735&page=7&p=1244506#post1244506
Next, try loading up Runescape in your normal browser; does it load up automatically in OpenGL? If not, switch it to OGL in the normal browser, log in, log out, head back to the home page, load it again; this time is it in OpenGL? It should be… Now run SMART again and see if it doesn't load up in OGL mode.
Also, in initiation part of your script make sure the OpenGL32 plugin is loaded before SetupSRL:
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
When you first start SMART and that little splash screen appears it will tell you if the plugin was loaded successfully or not (although the debug may need to be enabled for this). As Brandon said before it doesn't matter what mode is displayed in the upper left-hand corner of SMART (Safe/OGL/DirectX), what matters is the mode that is loaded in the client itself. When SMART fully loads check the graphics settings to see if it's automatically in OpenGL, if so then go ahead and switch SMART's settings to OpenGL mode in the top-left corner.
I hope that helps.
I checked my path, it was fine.
The script had the start like this
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
GLHSetup(ToStr(Smart_CurrentProcess));
The splash screen said the plugin was loaded successfully.
I logged in with the website and it was automatically set to OGL (With Chrome my only options are OGL and DX unless I force safemode while it loads).
Thanks for the help both of you :)
Kevin
2013-06-25 22:16:20
As a thing to note in some similarity to BMW, opening RS in a non OGL script, switching to OGL (in RS) simply auto resets itself.
Brandon
2013-06-25 23:02:21
Ok. Both of you try this plugin. If it works for you, I'm putting it on the OP. Also, if you are still getting problems after this you're going to have to rightclick your smart console and enable the debug. Copy and paste everything it prints.
I added a few new lines:
if (!HardwareTest)
{
glEnable(GL_TEXTURE_RECTANGLE);
if (glGetError() == GL_NO_ERROR)
{
ValidHardware = true;
}
glDisable(GL_TEXTURE_RECTANGLE);
HardwareTest = true;
}
It checks if your gfx supports GL_TEXTURE_RECTANGLE.. If it does NOT, then it will simply NOT use the new debugging hud.. All other filters and stuff can be used. Sad to say, if it does NOT, then you have an OpenGL version less than 2.0 and that's pretty sad because those graphics cards are extremely OLD!
If it does, you can see and use the HUD. Oh and I forgot to mention I enabled the FKeys so you can use them in smart rather than having to constantly compile scripts for switching modes and what not (Both in the OP and the following).
https://mega.co.nz/#!xEVzSQQI!SID7mWbCBmCrD42vPvfuPiwhpqRen-hz3fzpLVKsHycI statically compiled the DLL as usual.
Here's the script I used to test it:
{$DEFINE SMART}
{$DEFINE GLHOOK}
{$I GLHook/GLHook.Simba}
var
IDs: Array Of Cardinal;
begin
ClearDebug;
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
SmartSetOperatingMode(0);
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
TerminateScript;
End;
SmartSetOperatingMode(1);
GLHSetDebug(True, False, 0);
SmartSetMouseInput(True);
SmartSetKeyInput(True);
GLHEnabledFilter(0, True); //Models
GLHEnabledFilter(1, True); //Fonts
GLHEnabledFilter(2, False); //Textures
//Displays debugging for all models, textures, fonts.. Changing the dimensions filters models/textures/fonts by that are.
GLHFilterModelsArea(0, 0, 765, 553);
GLHFilterFontsArea(0, 0, 765, 553);
GLHFilterTexturesArea(0, 0, 765, 553);
GLHDrawTextureHud(507195); //Draw this ID on the hud. Should display the RS compass.
end.
The FKeys:
switch (Keys[I])
{
case VK_F1: Stride = 12; break;
case VK_F2: Stride = 16; break;
case VK_F3: Stride = 20; break;
case VK_F4: Stride = 24; break;
case VK_F5: Stride = 28; break;
case VK_F6: Stride = 36; break;
case VK_F7: Stride = 40; break;
case VK_F8: DrawAllStrides = !DrawAllStrides; break;
case VK_F9: ++InfoDisplayed; break;
case VK_F10: LogCalls = !LogCalls; break; //Avoid if you are not a Plugin Developer.. Will write logs to same location as the plugin..
case VK_F11: Overlay = !Overlay; break;
case VK_F12: SaveImages = !SaveImages; break; //Saves textures the same location as the plugin..
default: break;
}
Okay so I just took a deeper look at this and this looks absolutely amazing. Do you think a C1 Dungeoneering script is feasible with this?
Kevin
2013-06-25 23:25:39
From: Brandon
Ok. Both of you try this plugin. If it works for you, I'm putting it on the OP. Also, if you are still getting problems after this you're going to have to rightclick your smart console and enable the debug. Copy and paste everything it prints.
I added a few new lines:
if (!HardwareTest)
{
glEnable(GL_TEXTURE_RECTANGLE);
if (glGetError() == GL_NO_ERROR)
{
ValidHardware = true;
}
glDisable(GL_TEXTURE_RECTANGLE);
HardwareTest = true;
}
It checks if your gfx supports GL_TEXTURE_RECTANGLE.. If it does NOT, then it will simply NOT use the new debugging hud.. All other filters and stuff can be used. Sad to say, if it does NOT, then you have an OpenGL version less than 2.0 and that's pretty sad because those graphics cards are extremely OLD!
If it does, you can see and use the HUD. Oh and I forgot to mention I enabled the FKeys so you can use them in smart rather than having to constantly compile scripts for switching modes and what not (Both in the OP and the following).
https://mega.co.nz/#!xEVzSQQI!SID7mWbCBmCrD42vPvfuPiwhpqRen-hz3fzpLVKsHyc
I statically compiled the DLL as usual.
Here's the script I used to test it:
{$DEFINE SMART}
{$DEFINE GLHOOK}
{$I GLHook/GLHook.Simba}
var
IDs: Array Of Cardinal;
begin
ClearDebug;
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
SmartSetOperatingMode(0);
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
TerminateScript;
End;
SmartSetOperatingMode(1);
GLHSetDebug(True, False, 0);
SmartSetMouseInput(True);
SmartSetKeyInput(True);
GLHEnabledFilter(0, True); //Models
GLHEnabledFilter(1, True); //Fonts
GLHEnabledFilter(2, False); //Textures
//Displays debugging for all models, textures, fonts.. Changing the dimensions filters models/textures/fonts by that are.
GLHFilterModelsArea(0, 0, 765, 553);
GLHFilterFontsArea(0, 0, 765, 553);
GLHFilterTexturesArea(0, 0, 765, 553);
GLHDrawTextureHud(507195); //Draw this ID on the hud. Should display the RS compass.
end.
The FKeys:
switch (Keys[I])
{
case VK_F1: Stride = 12; break;
case VK_F2: Stride = 16; break;
case VK_F3: Stride = 20; break;
case VK_F4: Stride = 24; break;
case VK_F5: Stride = 28; break;
case VK_F6: Stride = 36; break;
case VK_F7: Stride = 40; break;
case VK_F8: DrawAllStrides = !DrawAllStrides; break;
case VK_F9: ++InfoDisplayed; break;
case VK_F10: LogCalls = !LogCalls; break; //Avoid if you are not a Plugin Developer.. Will write logs to same location as the plugin..
case VK_F11: Overlay = !Overlay; break;
case VK_F12: SaveImages = !SaveImages; break; //Saves textures the same location as the plugin..
default: break;
}
Gonna test right now and re-edit with results.
From: Sin
Okay so I just took a deeper look at this and this looks absolutely amazing. Do you think a C1 Dungeoneering script is feasible with this?
C2 is completely feasible in Simba OCR style.
Brandon
2013-06-25 23:30:53
From: Sin
Okay so I just took a deeper look at this and this looks absolutely amazing. Do you think a C1 Dungeoneering script is feasible with this?
Probably when I release the other plugin (if I get to). Right now it's just doable. The walking will be difficult though no? You'd have to ask Ashaman for advice on walking in GLmode. He's actually gotten LRC script working in it. I think he uses SPS? Not sure.
From: Brandon
-Snip-
I tried the new plugin and I got
[Error] C:\Simba\Includes\GLHook/GLCommunication.Simba(142:10): Unknown identifier 'GLHGetPanelItems' at line 141
Compiling failed.
Kevin
2013-06-25 23:59:23
I said I'd edit originally. I lied.
Anyway, so I think I've knocked my issue down a few marks under a Windows 8 error. It appears many drivers for graphics cards compatible with Windows 8 (I use a AMD Radeon HD 7560D, so it's definitely new enough :p) don't support OpenGL without some extra manual work. That would explain my previous issue of:
As a thing to note in some similarity to BMW, opening RS in a non OGL script, switching to OGL (in RS) simply auto resets itself back to safe mode.
To get around that, I will tell my Windows 8 pc to go F*@! itself and work on my typical dev pc instead.
As a side issue beyond that, I get the same missing function error BMW mentioned just now.
Brandon
2013-06-26 00:02:52
From: Kevin
I said I'd edit originally. I lied.
Anyway, so I think I've knocked my issue down a few marks under a Windows 8 error. It appears many drivers for graphics cards compatible with Windows 8 (I use a AMD Radeon HD 7560D, so it's definitely new enough :p) don't support OpenGL without some extra manual work. That would explain my previous issue of:
To get around that, I will tell my Windows 8 pc to go F*@! itself and work on my typical dev pc instead.
As a side issue beyond that, I get the same missing function error BMW mentioned just now.
Lets tackle one thing at a time.
Just remove the lines. I need to know is if the plugin works for you on the Smart side. Aka does your RS get in OpenGL mode now. Does it dispaly IDs, etc. You can download the include from the OP later.
IE. Try this script then (has no include dependencies):
{$DEFINE SMART}
{$DEFINE GLHOOK}
{$loadlib GLHook}
{$I SRL/SRL.Simba}
begin
ClearDebug;
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
SmartSetOperatingMode(0);
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
TerminateScript;
End;
SmartSetOperatingMode(1);
GLHSetDebug(True, False, 0);
SmartSetMouseInput(True);
SmartSetKeyInput(True);
GLHEnabledFilter(0, True); //Models, Fonts, Textures.
GLHEnabledFilter(1, True);
GLHEnabledFilter(2, False);
GLHFilterModelsArea(0, 0, 765, 553);
GLHFilterFontsArea(0, 0, 765, 553);
GLHFilterTexturesArea(0, 0, 765, 553);
end.
From: Brandon
Just remove the lines. I need to know is if the plugin works for you on the Smart side. Aka does your RS get in OpenGL mode now. Does it dispaly IDs, etc. You can download the include from the OP later.
IE. Try this script then (has no include dependencies):
{$DEFINE SMART}
{$DEFINE GLHOOK}
{$loadlib GLHook}
{$I SRL/SRL.Simba}
begin
ClearDebug;
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
SmartSetOperatingMode(0);
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
TerminateScript;
End;
SmartSetOperatingMode(1);
GLHSetDebug(True, False, 0);
SmartSetMouseInput(True);
SmartSetKeyInput(True);
GLHEnabledFilter(0, True); //Models, Fonts, Textures.
GLHEnabledFilter(1, True);
GLHEnabledFilter(2, False);
GLHFilterModelsArea(0, 0, 765, 553);
GLHFilterFontsArea(0, 0, 765, 553);
GLHFilterTexturesArea(0, 0, 765, 553);
end.
Now it loads in OpenGL mode, but the screen is black. When I set SMART's mode to SafeMode the screen has this:
http://i.imgur.com/gdBstSk.pngWhen I press the AutoSetup button the client closes. I'll try putting it into OpenGl mode through the browser first then trying.
Brandon
2013-06-26 00:12:28
From: BMWxi
Now it loads in OpenGL mode, but the screen is black. When I set SMART's mode to SafeMode the screen has this: http://i.imgur.com/gdBstSk.png
When I press the AutoSetup button the client closes. I'll try putting it into OpenGl mode through the browser first then trying.
What in the world.. That should not be happening at all.. There is either something I am missing or you :S It's the same old plugin :l
If one of you can, I'd like to see this for myself. Hopefully you have a compiler on hand as well.. I actually can't think of anything I missed. All ID hooks are the exact same. Only thing I added was the drawing and I disabled it in that last post. Thus the code is the exact same as before with the name change.
From: Brandon
What in the world.. That should not be happening at all.. There is either something I am missing or you :S It's the same old plugin :l
If one of you can, I'd like to see this for myself. Hopefully you have a compiler on hand as well.. I actually can't think of anything I missed. All ID hooks are the exact same. Only thing I added was the drawing and I disabled it in that last post. Thus the code is the exact same as before with the name change.
You can TeamViewer me if you want but I don't have a compiler..
Brandon
2013-06-26 00:19:29
From: BMWxi
You can TeamViewer me if you want but I don't have a compiler..
PM me the info whenever you have free time?
Kevin
2013-06-26 00:35:48
This test script retains the prior issue (which seems to be BMW's newly arrived issue).
SMART opens and loads to a pure black screen. Switching SMART to SAFE mode brings it to the normal login menu (not requiring an auto-setup however). (Side note: I can definitely interact with the RS menu when SMART is in OGL mode as switching back changes the expecting things, it just does not draw anything in OGL mode). Changing RS itself to OGL mode at this point results in the following screen:

This is not my main development pc and as such it has no compiler at the moment, however if you wish I can get one ready. Which do you personally use? I am willing to TV tomorrow, however tonight is getting fairly late for myself.
StickToTheScript
2013-06-26 01:51:56
Lolz. I've been trying to install it but I dont know what i am doing wrong.
Care to make a complete tutorial either here or on the OP?
Also, does with work with Simba 1.0?
From: Brandon
PM me the info whenever you have free time?
The file that has the OGL intercept info is attached :)
sm0k3
2013-06-26 06:14:58
From: Kevin
This test script retains the prior issue (which seems to be BMW's newly arrived issue).
SMART opens and loads to a pure black screen. Switching SMART to SAFE mode brings it to the normal login menu (not requiring an auto-setup however). (Side note: I can definitely interact with the RS menu when SMART is in OGL mode as switching back changes the expecting things, it just does not draw anything in OGL mode). Changing RS itself to OGL mode at this point results in the following screen
This is not my main development pc and as such it has no compiler at the moment, however if you wish I can get one ready. Which do you personally use? I am willing to TV tomorrow, however tonight is getting fairly late for myself.
I was Having this same problem on Windows 8 x64 … The Fix for me in the end was ..
:: Reinstall java (Java7 - JVM)
:: Make Sure Java 7 JVM is in your path and BEFORE JDK7 ie your path should contain somthing like ;C:\Program Files\Java\Java7\bin\ and before the \Java7\JDK\Bin entry ( If you Have one )
:: Open Runescape in your BROWSER Go Graphics settings and set it to OpenGL lowest Settings Fixed Resolution
:: Close Browser
:: Restart Simba
:: Run OGLHook Test Script
:: SMART OpenGL should now work … :)
Ashaman88
2013-06-26 07:29:01
From: sm0k3
I was Having this same problem on Windows 8 x64 … The Fix for me in the end was ..
:: Reinstall java (Java7 - JVM)
:: Make Sure Java 7 JVM is in your path and BEFORE JDK7 ie your path should contain somthing like ;C:\Program Files\Java\Java7\bin\ and before the \Java7\JDK\Bin entry ( If you Have one )
:: Open Runescape in your BROWSER Go Graphics settings and set it to OpenGL lowest Settings Fixed Resolution
:: Close Browser
:: Restart Simba
:: Run OGLHook Test Script
:: SMART OpenGL should now work … :)
Yeah I believe it was the path that I was missing when I had Kevin's error as well.
Also for walking, SPS worked just fine, at least at LRC w/o even modifying the sps map (although the map does look a bit darker).
Excited about testing the F-Key functionality!
tristen8878
2013-06-26 07:31:04
wow this runs super smooth in java 7 now I get 50fps all the time :)
Kevin
2013-06-26 09:18:52
From: sm0k3
I was Having this same problem on Windows 8 x64 … The Fix for me in the end was ..
:: Reinstall java (Java7 - JVM)
:: Make Sure Java 7 JVM is in your path and BEFORE JDK7 ie your path should contain somthing like ;C:\Program Files\Java\Java7\bin\ and before the \Java7\JDK\Bin entry ( If you Have one )
:: Open Runescape in your BROWSER Go Graphics settings and set it to OpenGL lowest Settings Fixed Resolution
:: Close Browser
:: Restart Simba
:: Run OGLHook Test Script
:: SMART OpenGL should now work … :)
This is roughly the same original setup procedure I followed (verified my path and everything), although I hadn't reinstalled my Java 7 JRE yet. Went through the process of uninstalling it (left Java 6 on my machine though) and installing it again and following every step yet again and this time it worked.
Well that settles that and I'm a happy camper! Many thanks and +rep!
Brandon
2013-06-26 12:12:45
@BMWxi; I figured out why yours is different. Thanx for the file ill download when I get home. Really appreciate letting me tv last night to figure it out.
@Everyone who wants to know about GPU programming as well, you're goin to want to read these too..
BMWxi has a special GPU.. Well it's either extremely new and falls within the rare GPU set that does NOT support NPOT textures OR it's extremely old and supports only POT textures.. So on his machine, RS and all games generate textures and models different than it does for ours. Hence we spent a ton of time last night gathering information to make the plugin work. I see 6 curious ppl already downloaded the file he posted.
If you don't know what NPOT is then:
http://www.opengl.org/wiki/NPOT_TextureAnd
http://factor-language.blogspot.ca/2009/04/opengl-textures-and-power-of-two-size.html?m=1Thus what Jagex does on his machine is generate an image with X by Y size and 0 pixels.. Which I thought was impossible. Imagine a 256x256 image with no pixels or a movie with no actors and graphics :S
Then they use another function to add pixels to this image later on.. Quite different from ours. Pattern for him takes 3-4 instructions to the card and for us it takes 1 instruction.
So next time we all go buying laptops or GPU's you should definitely make sure it supports NPOT because that will affect performance drastically! Most new GPU's after 2004 support it as long as it doesn't fall within the rare set.
TLDR; I have to support two different pattern styles. Nothing wrong with that. Nothing wrong with his GPU. Just slightly unusual/different.
Note: this is for directx too! Not just OpenGL. It's the hardware not software. Gotta hate hardware programming :(
From: Brandon
@BMWxi; I figured out why yours is different. Thanx for the file ill download when I get home. Really appreciate letting me tv last night to figure it out.
@Everyone who wants to know about GPU programming as well, you're goin to want to read these too..
BMWxi has a special GPU.. Well it's either extremely new and falls within the rare GPU set that does NOT support NPOT textures OR it's extremely old and supports only POT textures.. So on his machine, RS and all games generate textures and models different than it does for ours. Hence we spent a ton of time last night gathering information to make the plugin work. I see 6 curious ppl already downloaded the file he posted.
If you don't know what NPOT is then:
http://www.opengl.org/wiki/NPOT_Texture
And
http://factor-language.blogspot.ca/2009/04/opengl-textures-and-power-of-two-size.html?m=1
Thus what Jagex does on his machine is generate an image with X by Y size and 0 pixels.. Which I thought was impossible. Imagine a 256x256 image with no pixels or a movie with no actors and graphics :S
Then they use another function to add pixels to this image later on.. Quite different from ours. Pattern for him takes 3-4 instructions to the card and for us it takes 1 instruction.
So next time we all go buying laptops or GPU's you should definitely make sure it supports NPOT because that will affect performance drastically! Most new GPU's after 2004 support it as long as it doesn't fall within the rare set.
TLDR; I have to support two different pattern styles. Nothing wrong with that. Nothing wrong with his GPU. Just slightly unusual/different.
Note: this is for directx too! Not just OpenGL. It's the hardware not software. Gotta hate hardware programming :(
Thanks for doing all this Brandon, hopefully it will benefit more people than just me. :)
As for either very new or very old, I'm leaning towards very old, as this machine is from 2006.
Kevin
2013-06-26 17:16:31
Brandon, you are truly amazing for working so hard for everyone. You even put up with a ton of stupid sh!7 for people you've never met. You are a man among men.
Also, POT textures seem overly inefficient to me… Is there any reason they would have been advantageous now or in the past?
Brandon
2013-06-26 17:37:48
From: Kevin
Brandon, you are truly amazing for working so hard for everyone. You even put up with a ton of stupid sh!7 for people you've never met. You are a man among men.
Also, POT textures seem overly inefficient to me… Is there any reason they would have been advantageous now or in the past?
Yup. Math. It's all in the math. Works like this:
Instead of doing multiplication, you do something called bit-shifting. Simba has "shl" and "shr" functions that do this. Aka Shift Left and Shift Right.
Works like:
int Multiply(int X, int PowerOfTwo)
{
int Multiplier = 2;
for (int I = 0; I < PowerOfTwo; ++I)
{
Multiplier *= Multiplier;
}
return X * Multiplier;
}
int Multiply(int X, int PowerOfTwo)
{
return X << PowerOfTwo;
}
Now guess which one is faster? The shifting. If you put the value 8 for X and 2 for PowerOfTwo, it's going to return 32. Which is the equivalent of doing:
(2 * 2) * X.. If the Power of Two was "3", then it's (2 * 2 * 2) * X..
It's for something called MipMapping. It's where if you have an image, it keeps dividing the dimensions by 2 until it gets smaller and becomes a 1x1 image. Each image it divides by two, it saves it:
256x256
128x128
64x64
32x32
16x16
8x8
4x4
2x2
1x1
Now imagine you are far away from an image in game, your graphics card already knows what image to show because it created the above image dimensions. Without mipmapping, it will never know which pixel on the image to show but with it, it always shows the same pixel/image depending on your distance from it.
Also, in assembly, when you get close to the hardware and you want maximum speed, we don't multiply, we bit-shift if we can. Otherwise we do multiplication (usually for floating point numbers.. aka values with decimals as you can't shift on those).
Kevin
2013-06-26 17:44:18
From: Brandon
-long quote-
I'm familiar with shifting, it's commonly used in ASM as multiplication takes many more cycles than a single cycle bit shift. Although, I'm still a little curious… For the graphics card to already have all those prior mentioned (2^y)x(2^y) images loaded and ready, it would have to store them all in memory prior, correct?
If what I'm thinking is correct, that would mean POT textures would have a longer initialization time and require more memory than NPOT at the benefit of a significantly faster render time later as opposed to resizing the texture on distance; or did I make a mistake somewhere with that?
Getting this error Brandon, and apparently Kevin is too:
[Error] C:\Simba\Includes\GLHookInclude/GLCommunication.Simba(150:10): Unknown identifier 'GLHGeTTextures' at line 149
Compiling failed.
Brandon
2013-06-26 17:50:30
From: Kevin
I'm familiar with shifting, it's commonly used in ASM as multiplication takes many more cycles than a single cycle bit shift. Although, I'm still a little curious… For the graphics card to already have all those prior mentioned (2^y)x(2^y) images loaded and ready, it would have to store them all in memory prior, correct?
If what I'm thinking is correct, that would mean POT textures would have a longer initialization time and require more memory than NPOT at the benefit of a significantly faster render time later as opposed to resizing the texture on distance; or did I make a mistake somewhere with that?
Yup. You only enable mipmapping for textures you need them on. Otherwise you can just choose to disable it or not use it at all. Some graphics cards don't need to use the mipmapping. They just prefer that the textures are power of two because it makes it easier and faster to do calculations.
Also, you can't mipmap "NPOT" textures. So all graphics cards have to at some point do the math anyway. I'd rather longer loading and faster game play.
@Sin; the zip on the OP should contain an include no? It says GLHookInclude. Just rename the folder to GLHook and you're good to go. I think you're using the wrong include ;)
From: Brandon
snip

That's my Includes folder atm.
GLHook didn't have any Simba files, GLHookInclude did, so I renamed everything in the script to include GLHookInclude rather than GLHook.
I'll reinstall it, but what should I do? Rename the GLHookInclude folder to GLHook and copy JUST THAT to the Includes folder?
Fank you.
Brandon
2013-06-26 19:46:33
From: Sin
That's my Includes folder atm.
GLHook didn't have any Simba files, GLHookInclude did, so I renamed everything in the script to include GLHookInclude rather than GLHook.
I'll reinstall it, but what should I do? Rename the GLHookInclude folder to GLHook and copy JUST THAT to the Includes folder?
Fank you.
Yes sir. That last sentence.
From: Brandon
Yes sir. That last sentence.
Fank you?
Edit:
[Error] C:\Simba\Includes\GLHook/GLCommunication.Simba(150:10): Unknown identifier 'GLHGeTTextures' at line 149
Compiling failed.
That's what I get now :/
edit: disregard i found it
Brandon
2013-06-26 20:44:53
From: Sin
Fank you?
Edit:
[Error] C:\Simba\Includes\GLHook/GLCommunication.Simba(150:10): Unknown identifier 'GLHGeTTextures' at line 149
Compiling failed.
That's what I get now :/
Ur include is correct. Wrong plugin. The link is:
https://mega.co.nz/#!xEVzSQQI!SID7mWbCBmCrD42vPvfuPiwhpqRen-hz3fzpLVKsHyc OR
https://mega.co.nz/#!QY1HlQyC!fEwi4w4pOOuKyLyudX_6gH6W5XwLDjAlzfN5ThTWa7ASame thing.
From: Brandon
Ur include is correct. Wrong plugin.
I downloaded the one from the OP :x
Im still getting this error Brandon:
[Error] C:\Simba\Includes\GLHook/GLCommunication.Simba(150:10): Unknown identifier 'GLHGeTTextures' at line 149
I force updated the SRL include (So that I have a fresh one)
I took everything out of the bin folder in the SMART8 package, and moved it to C/Simba/Plugins.
I moved SRL.simba from SMART/Information to Simba/Includes and replaced the SRL there.
I moved SMARTParams.simba from SMART/Information to Simba/Includes/SRL/SRL/misc and replaced the one there
I downloaded the OGL package from the link you posted.
Extracted it to my Desktop.
Took out GLHookInclude and moved it to Simba/Includes.
Renamed it to GLHook.
:(
Brandon
2013-06-27 00:31:39
From: Sin
Im still getting this error Brandon:
[Error] C:\Simba\Includes\GLHook/GLCommunication.Simba(150:10): Unknown identifier 'GLHGetTextures' at line 149
I force updated the SRL include (So that I have a fresh one)
I took everything out of the bin folder in the SMART8 package, and moved it to C/Simba/Plugins.
I moved SRL.simba from SMART/Information to Simba/Includes and replaced the SRL there.
I moved SMARTParams.simba from SMART/Information to Simba/Includes/SRL/SRL/misc and replaced the one there
I downloaded the OGL package from the link you posted.
Extracted it to my Desktop.
Took out GLHookInclude and moved it to Simba/Includes.
Renamed it to GLHook.
:(
@BMW, thanx!
If you want me to do it, TV me and I can show you whenever you have some free time. Probably take less than a couple seconds to drag-drop it. Everything you did actually sounds right tbh. There should be NO error :l. I just did it on BMWxi's system. I'm not sure if you missed something because those instructions actually seem correct. Except: You're using the OpenGL plugins from the Smart.zip? If so then that is wrong.
Note to self: In the future, put plugins and folders together already. This way users can drag drop directly with no confusion.

Tried reinstalling Java.
Reset my Path
Opened in browser first
Nothing…
StickToTheScript
2013-06-27 00:51:49
I cant manage to get this thing working… Lol. I keep getting random errors and other crap. SPS errors, cannot compile, and a lot more. :p
Is there a detailed guide on how to install this?
THat would be useful.. :D
From: StickToTheScript
I cant manage to get this thing working… Lol. I keep getting random errors and other crap. SPS errors, cannot compile, and a lot more. :p
Is there a detailed guide on how to install this?
THat would be useful.. :D
read the READme.
if anyone needs any help setting this up, feel free to pm me.
sm0k3
2013-06-27 04:43:45
This May have been asked but is there any kinda tutorial or list of how functions work for this ??
I'm noticing an odd debug/minimap bug that occurs sometimes depending on the compass angle
[youtube]L0rz81_0J4A[/youtube]
settings:
GLHSetDebug(True, True, 1);
GLHEnabledFilter(0, True);
GLHEnabledFilter(1, True);
GLHEnabledFilter(2, False);
From: sm0k3
This May have been asked but is there any kinda tutorial or list of how functions work for this ??
all the GL functions can be found in GLHookInclude folder.
StickToTheScript
2013-06-27 09:00:52
From: Kasi
read the READme.
if anyone needs any help setting this up, feel free to pm me.
Lol. I never saw that.. :p
Whenever you have time, add me on Skype or PM me and i'll let you TV in. Thanks for all the effort :)
Brandon
2013-06-27 12:26:58
From: BMWxi
I'm noticing an odd debug/minimap bug that occurs sometimes depending on the compass angle
settings:
GLHSetDebug(True, True, 1);
GLHEnabledFilter(0, True);
GLHEnabledFilter(1, True);
GLHEnabledFilter(2, False);
That is not a bug. LOL. It's the result of having the same stride set as the glDrawElements function which enabled Lines. In other words, it will not draw the filled models if your stride is the same. Instead it will draw the models using lines so you can see which is which. However, sometimes RS does not clear the cache/flush the graphics to the screen immediately and the result is what you're calling a glitch.
Simply do: GLHSetStride(……..); or use the FKeys and experiment. Avoid using F10. F1-F12 is fine. F10 is for logging textures. F12 will save all images to the same location as your Plugins.
You can see this in Commands.cpp:
void Commands()
{
//#ifndef GLHOOK_SMART
int Keys[] = {VK_F1, VK_F2, VK_F3, VK_F4, VK_F5, VK_F6, VK_F7, VK_F8, VK_F9, VK_F10, VK_F11, VK_F12};
for (size_t I = 0; I < sizeof(Keys)/sizeof(int); ++I)
{
if (GetAsyncKeyState(Keys[I]) & 1)
{
switch (Keys[I])
{
case VK_F1: Stride = 12; break;
case VK_F2: Stride = 16; break;
case VK_F3: Stride = 20; break;
case VK_F4: Stride = 24; break;
case VK_F5: Stride = 28; break;
case VK_F6: Stride = 36; break;
case VK_F7: Stride = 40; break;
case VK_F8: DrawAllStrides = !DrawAllStrides; break;
case VK_F9: ++InfoDisplayed; break;
case VK_F10: LogCalls = !LogCalls; break;
case VK_F11: Overlay = !Overlay; break;
case VK_F12: SaveImages = !SaveImages; break;
default: break;
}
}
}
//#endif
}
Vinyl Scratch
2013-06-27 23:52:45
Hey, Brandon, could you do us all a favor and explain in detail how to install OGL and your SMART? I'm sure alot of people would be helped.
Kevin
2013-06-28 00:04:16
From: Vinyl Scratch
Hey, Brandon, could you do us all a favor and explain in detail how to install OGL and your SMART? I'm sure alot of people would be helped.
He's got a read-me if you download it and pop open the smart and detailed installation has been mentioned a few times in here :P
Installation instructions:
1. Copy ~Smart/bin/* To ~Simba/Plugins/
2. Copy ~Smart/Simba/SRL.Simba To ~Simba/Includes/SRL/
3. Copy ~Smart/Simba/SmartParams.Simba To ~Simba/Includes/SRL/SRL/Misc/
* All files in the folder in the specified location.
Installing GLHook/OpenGL32:
1. Download the GLHook Include:
https://github.com/Brandon-T/SRL-GLHook2. Extract the files to ~Simba/Includes/*
Vinyl Scratch
2013-06-28 00:05:57
From: Kevin
He's got a read-me if you download it and pop open the smart and detailed installation has been mentioned a few times in here :P
Installation instructions:
1. Copy ~Smart/bin/* To ~Simba/Plugins/
2. Copy ~Smart/Simba/SRL.Simba To ~Simba/Includes/SRL/
3. Copy ~Smart/Simba/SmartParams.Simba To ~Simba/Includes/SRL/SRL/Misc/
* All files in the folder in the specified location.
Installing GLHook/OpenGL32:
1. Download the GLHook Include: https://github.com/Brandon-T/SRL-GLHook
2. Extract the files to ~Simba/Includes/*
Ah. I haven't downloaded, so I didn't know about that.
Thanks, Kevin.
DemiseScythe
2013-06-29 16:23:51
From: NKN

Tried reinstalling Java.
Reset my Path
Opened in browser first
Nothing…
Search your computer for:
Preferences.dat
Preferences2.dat
And delete both, there might be more than 1 copy of each.
@Brandon
Why do IDs change sometimes? For NPC Models.
Sometimes there is a set of them, then the other times it is a completely different set with a few IDs in common between both sets.
Brandon
2013-06-29 16:38:08
From: DemiseScythe
@Brandon;
Why do IDs change sometimes? For NPC Models.
Sometimes there is a set of them, then the other times it is a completely different set with a few IDs in common between both sets.
What? ID's for models don't change at all. Must be different models. For example. Male bankers and female bankers would have different IDs because they are different models. Some male bankers would have different IDs from other male bankers because they have a different style on. Maybe clothing or hair or eyes or even fingers. Something as small as a single vertex difference would give them a unique ID. If you track a specific model, you'll see that it always has the exact same ID unless the model received an update recently.
DemiseScythe
2013-06-29 19:33:01
Is GetTPanelById the same as GetTexturesById?
From: DemiseScythe
Search your computer for:
Preferences.dat
Preferences2.dat
And delete both, there might be more than 1 copy of each.
@Brandon
Why do IDs change sometimes? For NPC Models.
Sometimes there is a set of them, then the other times it is a completely different set with a few IDs in common between both sets.
I got that now.. now I just have a FPS of 3
DemiseScythe
2013-06-29 20:19:59
Not your cache, only those two files, restore your cache if you can. Only the preference ones should be deleted as well as all .#### files. Use your java 7. Tbh even try uninstalling jdk, then after you switch into ogl, reinstall

Edit: Solved.
Make sure to have all functions from the test script on page 14 on the script to fix it.
Kevin
2013-06-29 21:34:51
I apologize as I do hate asking questions even now :s
As you can see, it appears to me that the OpenGL plugin is loading (and it tells me it's loading).

However, I seem to be having some sort of issue with it even still as I can't seem to access many of the functions in it as seen here:

I am grabbing every *.dll in the "Smart v8.1 Rev 5.7\SMART\bin" folder and pasting them all in the "Simba\Plugins" folder. I'm not really sure where to go with this now, if you (or anyone else here) would have any idea of how to go about working around this?
edit - the include for the script would be"
{$DEFINE SMART}
{$DEFINE GLHOOK}
{$I SRL/SRL.Simba}
{$I GLHook/GLHook.Simba}
DemiseScythe
2013-06-29 21:38:06
If you can see the paint, the plugin is working. Keep playing around until you get used to OGL.
Kevin
2013-06-29 22:35:53
From: DemiseScythe
If you can see the paint, the plugin is working. Keep playing around until you get used to OGL.
But I can't call several function that (I believe) are stored in the plugin. Several functions I would refer to as important such as GLHEnabledFilter or GLHFilterModelsArea.
Flight
2013-06-29 22:49:07
From: Kevin
But I can't call several function that (I believe) are stored in the plugin. Several functions I would refer to as important such as GLHEnabledFilter or GLHFilterModelsArea.
Did the function names change with the most recent OpenGL plugin? When you load the plugin for the first time in Simba all of the functions should be printed in the debug box. From there you can check if the functions still exist of if they've been renamed recently.
Kevin
2013-06-29 23:27:37
From: Flight
Did the function names change with the most recent OpenGL plugin? When you load the plugin for the first time in Simba all of the functions should be printed in the debug box. From there you can check if the functions still exist of if they've been renamed recently.
Hmm… Maybe I'm looking through the function list incorrectly, but I can't see any of the GLH functions - the ones I can successfully call nor the ones I can't call.
As a side note, how does one find the MeanID of an item?
DemiseScythe
2013-06-30 00:21:00
From: Kevin
Hmm… Maybe I'm looking through the function list incorrectly, but I can't see any of the GLH functions - the ones I can successfully call nor the ones I can't call.
As a side note, how does one find the MeanID of an item?
procedure GLH_IdentifyItem(x1, y1, x2, y2: Integer);
var
I, L: Integer;
GI: TTextureArray;
begin
ClearDebug;
GI := GLHook_GetTexturesByArea(InttoBox(x1, y1, x2, y2));
L := Length(GI);
if L > 0 then
begin
for I := 1 to L-1 do
begin
Writeln('Item Number: ' + IntToStr(I));
Writeln('Coordinates: (' + IntToStr(GI[I].X) + ', ' + IntToStr(GI[I].Y-50) + ')');
Writeln('BaseID: ' + IntToStr(GI[I].BaseID));
Writeln('MeanID: ' + IntToStr(GI[I].MeanID));
end;
end;
end;
You can identify 28 items at a time by having them in inventory
1234
5678
9…
use this params:
GLH_IdentifyItem(545, 255, 740, 515);
Brandon
2013-06-30 00:44:27
From: Kevin
Hmm… Maybe I'm looking through the function list incorrectly, but I can't see any of the GLH functions - the ones I can successfully call nor the ones I can't call.
As a side note, how does one find the MeanID of an item?
You're simply using the wrong plugin. I need to update the OP. I'll do it later but if you download the plugins from "GLHook v3.0" as it says on the OP, you'll be able to see the GLHFilter* functions. Then you can simply do: GLHDrawHudTexture(SomeID); and it'll display all information about that specific texture on screen. It'll display everything you need to know. Or you can do what Demise just showed above.
Kevin
2013-06-30 01:24:51
From: Brandon
You're simply using the wrong plugin. I need to update the OP. I'll do it later but if you download the plugins from "GLHook v3.0" as it says on the OP, you'll be able to see the GLHFilter* functions. Then you can simply do: GLHDrawHudTexture(SomeID); and it'll display all information about that specific texture on screen. It'll display everything you need to know. Or you can do what Demise just showed above.
As in: "GLHook v3.0\GLHook\bin\Release\GLHook.dll" and "GLHook v3.0\OpenGL32\bin\OpenGL32.dll" to "Simba\Plugins"? When I use those dlls instead, I have an even more limited access among the functions wherein I can't even access functions like 'GLHGetPanelItems' (and neither set of dlls allow access to GLHDrawHudTexture as far as I can see).
Brandon
2013-06-30 01:37:43
From: Kevin
As in: "GLHook v3.0\GLHook\bin\Release\GLHook.dll" and "GLHook v3.0\OpenGL32\bin\OpenGL32.dll" to "Simba\Plugins"? When I use those dlls instead, I have an even more limited access among the functions wherein I can't even access functions like 'GLHGetPanelItems' (and neither set of dlls allow access to GLHDrawHudTexture as far as I can see).
Or you're just not calling the right functions:

Look through the include. There is no function with "Panel" in the name. Look in the Simba console and you should see the function is GLHDrawTextureHud.
Kevin
2013-06-30 02:00:45
Aw. 'GLHDrawHudTexture' was the name you originally said; sorry I didn't even check for any similar names.
As for 'GLHGetPanelItems': that is most definitely called within GLCommunication.Simba. So would that include be invalid, referencing old code and simply remaining outdated?
Brandon
2013-06-30 05:28:32
From: Kevin
Aw. 'GLHDrawHudTexture' was the name you originally said; sorry I didn't even check for any similar names.
As for 'GLHGetPanelItems': that is most definitely called within GLCommunication.Simba. So would that include be invalid, referencing old code and simply remaining outdated?
No you just never updated your include (it came with the DLLs). I just finished re-writing Smart from scratch again and updating the OP and the Github for all three projects. It shouldn't be hard to install now. It's an exact copy of the original Smartv8.1 with some of the new features added. It shouldn't have any problems. Did 103 tests straight no problems/bugs found.. Hopefully it's the same for everyone.
No one should have a problem installing now I hope (No SRL-Include changes either). Same installation as the Original Smart v8.x.
The latest files don't have .simba files is this how it's supposed to be? Last time I had to replace abunch of include files.
Also, whats a test for the new smart to get it to load?
this one gives me a smart params error
{$DEFINE SMART}
{$I SRL/SRL.Simba}
begin
setupsrl;
end.
thanks
From: Officer Barbrady
The latest files don't have .simba files is this how it's supposed to be? Last time I had to replace abunch of include files.
Also, whats a test for the new smart to get it to load?
this one gives me a smart params error
{$DEFINE SMART}
{$I SRL/SRL.Simba}
begin
setupsrl;
end.
thanks
From: Brandon
No one should have a problem installing now I hope (No SRL-Include changes either). Same installation as the Original Smart v8.x.
…
SRL->setting->override update
SRL->Update.
As for the params problem fix it yourself. go to the file and add an extra parameter to the function under {$IFDEF SMART8}. If your gonna use the smart put {DEFINE SMART8} at the top of your script.
xxpoopyxx
2013-06-30 13:21:01
ererm how do i install this?
From: Kasi
…
SRL->setting->override update
SRL->Update.
As for the params problem fix it yourself. go to the file and add an extra parameter to the function under {$IFDEF SMART8}. If your gonna use the smart put {DEFINE SMART8} at the top of your script.
But he said there should be no problems:
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '', -1);
<— type mismatch
Brandon
2013-06-30 13:29:10
From: Officer Barbrady
The latest files don't have .simba files is this how it's supposed to be? Last time I had to replace abunch of include files.
Also, whats a test for the new smart to get it to load?
this one gives me a smart params error
Exactly the same as the original Smart v8.1.. See this old 2012 post:
http://villavu.com/forum/showthread.php?t=90171&p=1102330#post1102330
From: Brandon
Exactly the same as the original Smart v8.1.. See this old 2012 post:
http://villavu.com/forum/showthread.php?t=90171&p=1102330#post1102330
W0000T:
Brandon
2013-06-30 13:37:16
From: Officer Barbrady
W0000T
:o See it actually works on your comp now. FINALLY! Lol. Guess your comp hated the C++x11 features :( Aka the console.
You can do SmartShowConsole(true/false); right before SetupSRL if you want debugging. Hopefully it works for everyone else too. I'm heading out to Ribfest so yeah. I'll check in on the thread later.
xxpoopyxx
2013-06-30 13:41:27
so what files do i put where? do i just use the bin?
From: xxpoopyxx
so what files do i put where? do i just use the bin?
https://mega.co.nz/#!ZJh0ibSR!IdAsY1zqOw5jTfPPrbMrVjad51kBxECoMY6KW4sCEzkextract and run that. if your Simba Path aint "C:\Simba" then change it when it prompts you.
xxpoopyxx
2013-06-30 14:13:58
k got it any official release coming?
How do you make it load OpenGL with the newest one now?
I get a acess voilation error when I try to print the GL_uptext
Also, the screen freezes when I try to set the mode to openGL, but I am able to set the mode to OpenGL via RS
From: Officer Barbrady
How do you make it load OpenGL with the newest one now?
I get a acess voilation error when I try to print the GL_uptext
Also, the screen freezes when I try to set the mode to openGL, but I am able to set the mode to OpenGL via RS
no way you can do it with that include (SmartParams.simba), make your own function to load it. the last param of SmartSpawnClient is plugins.
Kevin
2013-06-30 15:23:21
Firstly my own fault, but as a note: I ran the new installer, and it may be good to think first about how it overrides all includes one may or may not have been working on <.<
Also, having now run the installer, my SmartParams seems to be referencing a new procedure: 'SmartClientCount' that can't be found? Replacing that with the original version of 'SmartGetClients' fixes that. After that, I'm back to introducing issues that had long since gone away and now I can no longer run the example script I include at the end due to the long since mentioned failure to find the function 'GLHGeTTextures' mentioned in GLCommunication.Simba.
I assume this was supposed to be as simple as running the newly included bat file "runme_noob.bat" and directing it at the relevant simba folder?
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$I GLHook/GLHook.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
begin
ClearDebug;
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
SmartSetOperatingMode(0); //To Safemode.
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
End;
SmartSetOperatingMode(1); //To OpenGLMode.
GLHSetDebug(True, true, 0);
//Testing Mouse Drawing GLX Beta Test v0.1..
while(true)do
begin
MMouse(Random(100), Random(100), 1, 1);
sleep(10);
end;
end.
Edit: As another note - I did have it all working before I ran the new installer for any updates.
Final Edit: Kasi helped me out with this. It appears certain dlls weren't being overridden till he manually deleted them and re-updated.
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$DEFINE CSMART}
{$I GLHook/GLHook.Simba}
begin
Smart_Plugins := 'OpenGL32.dll'
SetupSRL;
if NOT GLHSetup(ToStr(SMART_CURRENTPROCESS)) then
begin
writeln('Fail');
TerminateScript;
end;
GLHSetDebug(True, false, 3);
end.
"Unknown identifier 'Smart_Plugins' "
hmmm
Kevin
2013-07-01 11:42:44
Helping Barbrady over Skype.
Edit: In depth instructions (follow all even if you have installed a prior version):
Close all SMART instances. Remove all SMART.xxxxx (where xxxxx is a series of numbers) files and remove your preferences.dat files wherever they are on your pc.
Force update SRL to most recent version. Close all Simba instances.
Next, make sure your path variable is setup. On a Windows machine, that means going to System Properties->Advanced System Settings -> Environment Variables. In this new screen, there will be a list of variables.
Go to 'Path' and make sure your JRE is in it. Your Path variable should be a list of semicolon separate values. One of them should look similar to: 'C:\Program Files (x86)\Java\jre7\bin;' If that is not there, you will need to find where your JRE is installed (might be jre6 and might be in base Program Files instead of x86) and copy that full path to the bin into your path variable (make sure it is still ; separated in the Path variable). If you have a jdk in your Path variable, you will need to make sure your jre is before it!
If you installed a prior version of OpenGL, you will need to open your plugins folder and remove all dlls unrelated to SPS or ODTM (this way running the installer will only leave you with the new ones and you won't have any old dlls in place).
Download the installer here:
https://mega.co.nz/#!ZJh0ibSR!IdAsY1zqOw5jTfPPrbMrVjad51kBxECoMY6KW4sCEzk then run the .bat file. If your Simba installation is in the default location 'C:\Simba' then type 'y' (without the quotes) and hit enter. If your Simba installation is elsewhere, then type 'n' (without the quotes) and hit enter, then type the full path to your Simba folder.
Open up a legitimate browser and go to
www.runescape.com . Open up the game, set all settings as normal (low settings, Max brightness, fixed mode) then also set to OpenGL mode. Close completely out of your browser.
Finally open up Simba again. Run the following script:
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$I GLHook/GLHook.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
begin
ClearDebug;
SetupSRL;
Writeln('Setting up GL hook');
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
End;
Writeln('debugging..');
GLHSetDebug(True, true, 0);
Writeln('Moving mouse..');
while(true)do
begin
MMouse(Random(100), Random(100), 1, 1);
sleep(10);
end;
end.
The first run will likely error because you can't set the OGL debug mode in SAFE mode. You will have to manually change the opened SMART to OGL mode (top left of SMART). Then run the script again and verify it's working. I hope that helps some people out.
Running this test script:
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$I GLHook/GLHook.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
begin
ClearDebug;
SetupSRL;
Writeln('Setting up GL hook');
if (NOT GLHSetup(ToStr(SMART_CURRENTCLIENT))) THEN
Begin
Writeln('Failed to Setup GLHook. Please Check your Installation.');
End;
Writeln('debugging..');
GLHSetDebug(True, true, 0);
Writeln('Moving mouse..');
while(true)do
begin
MMouse(Random(100), Random(100), 1, 1);
sleep(10);
end;
end.
Does not debug the models, instead I get the writeln error (after like 2-3 minutes) "Failed to Setup GLHook. Please Check your Installation." and then access violation at: GLHSetDebug(True, true, 0);
Runescape is in Opengl mode and so is the smart -.- I manually installed the smart/opengl from the OP because the autoinstall gives me error (yes I run it as admin)
From: Officer Barbrady
I manually installed the smart/opengl from the OP because the autoinstall gives me error (yes I run it as admin)
I think this is because you have other smart plugins in your folder. try deleting and trying again. i would include it in the updater but didnt wanna delete other plugins.
[XoL]
2013-07-01 20:03:43
I keep getting this, all my folders "seem" correct (Looks like a simple error, but I can't find where I went wrong…)
[Error] C:\Simba\Includes\SRL/SRL/misc/SmartParams.Simba(282:145): Type mismatch at line 281
Compiling failed.
I used a clean copy of simba (then updated) then checked my paths then installed ogl.
From: Kasi
I think this is because you have other smart plugins in your folder. try deleting and trying again. i would include it in the updater but didnt wanna delete other plugins.
Only plugins I have are smart, opengl, glhook32, and sps (I deleted all the smart ones before I re-installed the new smart to be sure)
EDIT: I ran the Auto-Install and now it seems to work?
But I am still having the same problems with opengl
Brandon
2013-07-01 22:15:57
:S I'd expect include problems from guys with the green name but not guys with the orange ones.. Oh well.
If I edit the include, I get complaints about "not being able to install the include", "too many changes to the include", "too hard to figure out", "too many files to replace", "too many changes for SRL-6", "Not working in Lape". If I don't edit the include, I get complaints about "not loading", "compiling error at: 'some line here'", "Can't load plugins anymore", "Old include was better".
All of the above is going to confuse me. I can't please devs and I can't please users and I can't please everyone at the same time.
Now don't get me wrong. I have no problem replying to each and every problem or solving them at all. As shown previously. However, I don't like being confused.
But here goes:
If you want to load Smart v8.1, change SmartParams.simba LINE 294 to:
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '', '');
If you want to load OpenGL or any plugin in Smart v8.1, change SmartParams.simba LINE 294 to:
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '', 'OpenGL32.dll');
If you want to load multiple plugins in Smart v8.1, change SmartParams.simba LINE 294 to:
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, 's', '', '', 'OpenGL32.dll, DirectX.dll, SomePlugin.dll, etc.dll');
So on and so forth. These were already mentioned by
Benland100 and myself :l exactly 11 months ago..
If you want the easy way out, then copy the following.. I only changed 1 line in Smart.Simba and added 2 variables; In SRL.Simba I only added a break.
SmartParams.Simba:
(*
Smart Params
============
.. contents::
*)
{$DEFINE SRL_SMART}
{$DEFINE SMART}
{$loadlib libsmartremote}
var
Smart_Plugins: String;
{$IFDEF GLHOOK}
const InitSeq = '';
{$ELSE}
const InitSeq = 's';
{$ENDIF}
(*
GetSmartParams
~~~~~~~~~~~~~~
.. code-block:: pascal
function GetSmartParams: TStringArray;
Grabs The Correct Parameters For passing to the SmartClient.
.. note::
By: Brandon.
Modified By: Mormanman, Benland100.
Example:
.. code-block:: pascal
*)
function GetSmartParams: TStringArray;
var
Params: TStringArray;
Page: String;
begin
Page := Between('<iframe id="game" src="', '"', GetPage('http://www.runescape.com/game.ws?j=1'));
Params := Explode(',', Page);
Result := Params;
end;
(*
FixSmartSpeed
~~~~~~~~~~~~~
.. code-block:: pascal
procedure FixSmartSpeed;
Fixes Smart's Loading Speed.
Moves the Mouse & Adjusting the Canvas Refresh rate.
.. note::
By: Brandon.
Example:
.. code-block:: pascal
*)
procedure FixSmartSpeed;
var
T: Integer;
begin
T:= GetSystemTime + 2000;
While (Not SmartEnabled) Do
begin
if (GetSystemTime >= T) Then
Break;
Wait(500);
end;
While (GetColor(382, 252) = 0) Do
begin
{$IFDEF GLHOOK}
break;
{$ENDIF}
If RSReady then
Break;
SmartSetRefresh(SmartGetRefresh + 1);
MMouse(4, 4, 0, 0);
SmartSetRefresh(SmartGetRefresh - 1);
if (GetSystemTime >= T) Then
Break;
Wait(500);
end;
end;
(*
SmartGetClientIDs
~~~~~~~~~~~~~~~~~
.. code-block:: pascal
function SmartGetClientIDs: TIntegerArray;
Grabs All Client ID's of the current remote.
.. note::
By: Mormanman.
Example:
.. code-block:: pascal
*)
function SmartGetClientIDs: TIntegerArray;
var
I, Count: Integer;
begin
Count := SmartGetClients(True);
SetLength(Result, Count);
If (Count > 0) then
For I:= 0 to (Count - 1) do
Result[I] := SmartClientID(I);
end;
(*
SmartKillClients
~~~~~~~~~~~~~~~~
.. code-block:: pascal
procedure SmartKillClients;
Kills all Smart clients.
.. note::
By: Mormanman.
Example:
.. code-block:: pascal
*)
procedure SmartKillClients;
var
IDs: TIntegerArray;
I: Integer;
begin
IDs := SmartGetClientIDs;
For I := High(IDs) DownTo 0 Do
If SmartKillClient(IDs[I]) Then
Writeln('Killed Client: ' + ToStr(IDs[I]))
else
Writeln('Failed To Kill Client: ' + ToStr(IDs[I]));
end;
(*
SixHourFix
~~~~~~~~~~
.. code-block:: pascal
procedure SixHourFix;
Kills The Current Smart Client and Restarts it.
Fixes the 6 hour login.
.. note::
By: Brandon.
Example:
.. code-block:: pascal
*)
procedure FreeSRL; Forward;
procedure SetupSRL; Forward;
procedure SixHourFix;
var
Trash: TVariantArray;
Refresh: Integer;
begin
FreeSRL;
Refresh := SmartGetRefresh;
SmartKillClient(SmartCurrentClient);
SetupSRL;
try
CallProc('SMART_FreeDebug', Trash);
CallProc('SMART_SetupDebug', Trash);
except
end;
SmartSetRefresh(Refresh);
try
if (not LoginPlayer) then
srl_Warn('SixHourFix', 'Could not log in player', warn_Terminate);
except
srl_Warn('SixHourFix', 'Players not declared', warn_Terminate);
end;
end;
(*
PairSmart
~~~~~~~~~
.. code-block:: pascal
function PairSmart(ID: Integer): Boolean;
Pairs A Client To The Current Controller.
.. note::
By: Benland100, Brandon.
Example:
.. code-block:: pascal
*)
function PairSmart(ID: Integer): Boolean;
var
I, Count: Integer;
IDs: TIntegerArray;
begin
IDs := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
If (IDs[I] = ID) and SmartPairClient(ID) then
begin
SetEIOSTarget('libsmartremote', ToStr(ID));
Writeln('Paired with SMART[' + ToStr(ID) + ']');
Result := True;
Exit;
end;
Writeln('** Failed To Pair Client: ' + ToStr(ID) + '; Client Does Not exist **');
end;
(*
InitSmart
~~~~~~~~~
.. code-block:: pascal
function InitSmart(ForceNew: Boolean): Integer;
Initializes A Smart Remote Client.
Terminates the current script upon failure.
Terminates all clients of the current remote upon failure.
ForceNew Creates a new client.
.. note::
By: Benland100, Mormanman, Brandon.
Example:
.. code-block:: pascal
*)
function InitSmart(ForceNew: Boolean): Integer;
var
I, Count: Integer;
IDs: TIntegerArray;
Params: TStringArray;
begin
If (Not ForceNew) then
begin
Ids := SmartGetClientIDs;
Count := Length(IDs);
If (Count > 0) then
For I:= 0 To (Count - 1) Do
begin
If SmartPairClient(IDs[I]) then
begin
Result := IDs[I];
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Paired with SMART[' + ToStr(Result) + ']');
Exit;
end;
end;
end;
Params := GetSmartParams;
If (Length(Params) <> 2) then
begin
Writeln('** Failed To Grab Smart Parameters **');
Writeln('** Please check your internet connection/firewall **');
TerminateScript;
Exit;
end;
{$IFDEF SMART8}
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, InitSeq, '', '');
{$ELSE}
Result := SmartSpawnClient(ReplaceWrap(PluginPath, '\', '/', [rfReplaceAll]), Params[0], ',' + Params[1], 765, 553, InitSeq, '', '', Smart_Plugins);
{$ENDIF}
If (Result > 0) Then
begin
try
SetEIOSTarget('libsmartremote', ToStr(Result));
Writeln('Loading SMART: ' + Params[0] + Params[1]);
except
WriteLn('** Fatal Error: Pairing Clients; Terminating Script **');
TerminateScript;
end;
end else
begin
Writeln('** Smart Cannot Spawn Clients **');
TerminateScript;
end;
end;
(*
SetupSmart
~~~~~~~~~~
.. code-block:: pascal
procedure SetupSmart(ForceNewClient: Boolean);
Sets Up a new Smart Client and waits until it's on screen.
Terminates The current script upon failure.
.. note::
By: Mormanman.
Modified By: Brandon.
Example:
.. code-block:: pascal
*)
procedure SetupSmart(ForceNewClient: Boolean);
var
T: Integer;
begin
T:= GetSystemTime + 120000;
Smart_CurrentClient:= InitSmart(ForceNewClient);
if (Smart_CurrentClient <= 0) then
begin
writeln('*** Smart Failed To Load ***');
TerminateScript;
end;
if (SRL_SixHourFix) then
SRL_Procs[SRL_OnRSUpdate]:= @SixHourFix;
While (GetColor(382, 252) <> 0) Do
begin
{$IFDEF GLHOOK}
break;
{$ENDIF}
if RSReady then
break;
Wait(100);
if (GetTimeRunning >= 120000) then
begin
Writeln('*** Failed To Detect Clients ***');
TerminateScript;
end;
end;
end;
{* Functions Below Here are From the Original Smart.Simba *}
{*
By: Unknown Author.
Finds a Windows by partial title and Sets it as the target.
*}
function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
T : TSysProcArr;
I : Integer;
begin
T := GetProcesses;
for I := High(T) downto 0 do
if Pos(TitlePrefix, T[I].Title) <> 0 then
begin
Result := True;
if SetAsTarget then SetTarget(T[I]);
Exit;
end;
end;
{*
By: Unknown Author.
Gets the position of the actual mouse (Not Smart's Mouse).
*}
procedure GetRealMousePos(var X, Y : Integer);
var
KMTarget, ITarget: Integer;
begin
{$IFDEF LAPE}
writeln('GetRealMousePos not implemented yet in SRL-5 Lape!');
TerminateScript;
{$ELSE}
KMTarget := GetKeyMouseTarget;
ITarget := GetImageTarget;
FindAndSetTarget('SMART', True);
GetTClient.IOManager.GetMousePos(X, Y);
FreeTarget(GetImageTarget);
SetKeyMouseTarget(KMTarget);
SetImageTarget(ITarget);
// These are not universial offsets, but works somewhat for some Windows themes.
X := X - 8;
Y := Y - 25;
{$ENDIF}
end;
{*
By: Unknown Author.
Returns if the "Real Mouse" (Not Smart's Mouse) Is Within a given Box.
*}
function IsRealMouseInBox(B : TBox): Boolean;
var
P : TPoint;
begin
GetRealMousePos(P.X, P.Y);
Result := PointInBox(P, B);
end;
SRL.Simba:
//----------------------------------------------------------------------------//
//-- SRL Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebe, BenLand100, benleegt, Boreas, c0de, Cheesehunk --//
//-- Coh3n, dakota, Dankness, driger1592, EvilChicken!, Flyboy, --//
//-- Freddy1990, Hobbit, IceFire908, inferno, Kernel Klink, Knightstreak, --//
//-- Krazy_Meerkat, Krichevskoy, Liquid, Lorax, lordsaturn, Mad Cow, --//
//-- marpis, Markus, masquerader, mastaraymond, moparisthebest, --//
//-- Mutant Squirrle, n3ss3s, N1ke, Naum, Nava2, NCDS, nielsie95, --//
//-- phantombmx, pups, Pyro, RAM, Rasta Magician, realrune, Renax, Ron, --//
//-- RsN, SKy Scripter, solemn wishes, Spky, SRL, Starblaster100, --//
//-- Stupid3ooo,Sumilion, tarajunky, The Claw, The_Rs_Monkey, TRiLeZ, --//
//-- Wizzup?, WT-Fakawi, XxKanexX, Yakman, YoHoJo, ZephyrsFury, _ChArMz, --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
//-- SRL Level 1 Includes --//
//-- --//
//-- Low Level SCAR Math, Mouse Movement and Color routines. --//
//----------------------------------------------------------------------------//
// For development:
//{$DEFINE CompileSRL}
{$DEFINE SRL5}
{$IFDEF Lape}
{$include SRLLape.simba}
{$ENDIF}
{$IFDEF SMART8}
{$IFNDEF SMART}
{$DEFINE SMART}
{$ENDIF}
{$ENDIF}
{$IFDEF SMART}
{$IFNDEF SRL_SMART}
{$IFDEF SIMBAMAJOR980}
{$I SRL/SRL/Misc/Smart.Simba}
{$ELSE}
Procedure ActivateClient; {$IFDEF LAPE}override;{$ENDIF} begin end;
{$ENDIF}
{$ENDIF}
{$ENDIF}
//{$include SRL/SRL/core/defines.simba}
{$ifdef Simba}
{$i SRL/SRL/core/simba.simba}
{$endif}
{$include SRL/SRL/core/globals.simba}
{$include SRL/SRL/core/math.simba}
{$include SRL/SRL/core/mouse.simba}
{$include SRL/SRL/core/color.simba}
{$include SRL/SRL/core/players.simba}
//----------------------------------------------------------------------------//
//-- SRL Level 2 Includes --//
//-- --//
//-- Interface and OCR routines. --//
//----------------------------------------------------------------------------//
{$include SRL/SRL/core/text.simba}
{$include SRL/SRL/core/timing.simba}
{$include SRL/SRL/core/SRLlog.simba}
{$include SRL/SRL/core/chat.simba}
{$include SRL/SRL/core/bitmaps.simba}
{$include SRL/SRL/core/amount.simba}
{$include SRL/SRL/core/gametab.simba}
//----------------------------------------------------------------------------//
//-- SRL Level 3 Includes --//
//-- --//
//-- MapWalking, AntiRandoms, Objects, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//
{$include SRL/SRL/core/animation.simba}
{$include SRL/SRL/core/flag.simba}
{$include SRL/SRL/core/worldswitcher.simba}
{$include SRL/SRL/core/login.simba}
{$include SRL/SRL/core/autocolor.simba}
{$include SRL/SRL/core/mapwalk.simba}
{$include SRL/SRL/core/object.simba}
{$include SRL/SRL/core/inventory.simba}
{$include SRL/SRL/core/bank.simba}
{$include SRL/SRL/core/symbol.simba}
{$include SRL/SRL/core/rc.simba}
{$include SRL/SRL/core/cautorespond.simba}
{$include SRL/SRL/core/antiban.simba}
{$include SRL/SRL/core/globalstats.simba}
{$include SRL/SRL/core/antirandoms/antirandoms.simba}
{$IFDEF LoadExtraFonts}
{$include SRL/SRL/misc/fontupdater.simba}
{$ENDIF}
{$IFNDEF SIMBAMAJOR980}
{$IFDEF SMART}
{$IFNDEF SRL_SMART}
{$include SRL/SRL/misc/SmartParams.Simba}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$DEFINE SRL_OPENDEV}
{*******************************************************************************
procedure FreeSRL;
by: SRL Dev Team
Description: Tries to free all the variables it allocated during runtime.
*******************************************************************************}
procedure FreeSRL;
begin
FreeSRLBitmaps;
FreeSRLFonts;
end;
{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team
Last Edit: 22 June 2010 -- Nava2
Description: Sets up all variables needed to run SRL.
*******************************************************************************}
procedure SetupSRL;
var
t: Integer;
begin
{$IFNDEF SMART}
{$IFDEF SIMBA}
if (not IsTargetValid) then
srl_Warn('SetUpSRL', 'Target client is not valid! ' +
'Drag the crosshairs over the target client.', warn_Terminate);
{$ENDIF}
{$ENDIF}
SetupBoxes; //Sets up box variables in globals.simba
t := GetTimeRunning;
MouseSpeed := 15;
{$IFDEF UseLaptopMouse}LMouse_MissChance := 75;{$ENDIF}
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
// these need to be removed eventually (no longer used)
SRL_OnFindRandomCall := nil;
LampSkill := 'mining';
//SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadSRLBitMaps;
LoadSRLFonts;
{$IFNDEF SRL_RANDOMS_TEST}
_SetRandoms();
{$ENDIF}
SetupSRLAutoResponder;
SRL_RandomScreenShot := False;
UseFindMod := True;
LogoutOnMod := True;
UseFindTrade := True;
UseAutoResponder := True;
GraphicsSet := False;
AllowPVP := False;
SRL_DisableIPLog := false;
SRL_SavePath := includePath + 'SRL/logs/';
SRL_StartTime := theDate(DATE_MONTH)+' at '+theTime;
WarnSensitivity := -2;
SetupAutoColors;
{$IFDEF LoadExtraFonts}
srl_UpdateFonts(srl_FontsUp2date);
{$ENDIF}
AddOnTerminate('FreeSRL');
SetSupressExceptions(true);
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning - t) + ' msec');
{$IFDEF SRL_SMART}
{$IFDEF SIMBAMAJOR980}
if (Smart_Server = 0) then
begin
Smart_Server := RandomWorld(Smart_Members, False);
Smart_Signed := True;
Smart_SuperDetail := False;
end;
Writeln('SMART Initialized.' + #10 + 'Loaded: Server ' + IntToStr(Smart_Server) + ', Members: ' + BoolToStr(Smart_Members)
+ ', Signed: ' + BoolToStr(Smart_Signed) + ', Super Detail: ' + BoolToStr(Smart_SuperDetail) + '.');
SmartSetupEx(Smart_Server, Smart_Members, Smart_Signed, Smart_SuperDetail);
SetTargetArray(SmartImageArray, 765, 553);
{$ELSE}
SetupSmart(Smart_ForceNew);
if (SRL_SixHourFix) then
SRL_Procs[srl_OnRSUpdate] := @SixHourFix;
{$ENDIF}
repeat
{$IFDEF GLHOOK}
break;
{$ENDIF}
{$IFNDEF SIMBAMAJOR980}
{$IFDEF SMART}
If Smart_FixSpeed then
FixSmartSpeed;
{$ENDIF}
{$ENDIF}
Wait(100);
if (GetTimeRunning - t) > 120000 then
Break;
until(RSReady);
{$ENDIF}
SetupGauss;
SRL_ResetNavBar;
Proc_WorldSwitcherEnabled
end;
{$ifdef CompileSRL}
begin
SetupSRL;
end.
{$endif}
{$ifdef LAPE}
begin
SetupSRL;
end.
{$endif}
You can use the same old test scripts as before.
Gu3st...
2013-07-02 03:23:14
With newest Java (also uninstalled all others, including jdk), newest SRL, newest GLHook, newest SMART v8.1, newest OpenGL dll plus replaced SRL.simba and SmartParams.simba with those you posted above, new preferences.dat and no unused smart.xxxxx files I still can't get this to work…
After setting the (new) runescape preferences to opengl and all the other runescape settings (fixed, max brightness, etc), I then open up simba and type in this:
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$i GLHook/GLHook.simba}
begin
setupSRL;
end.
I click run, SMART opens up fine, runescape loads in SmartMode and I get a java.lang.RunTimeException whenever I try to change from SafeMode into OpenGL. RuneScape prompts me with an alert saying it can't use that display option and changes me back to SafeMode. Additional info: Changing from SafeMode into OpenGL or DirectX on the drop-down menu on the SMART user interface freezes the screen; clicking and sending keystrokes still get through, but the drawing of the client has stopped.
Tried reinstalling java, restarting windows, reinstalling plugins, reupdating SRL and resetting preferences, but to no avail.
It seems like a runescape preferences setting issue, but I'd love to be able to change between modes in SMART…
Is there a way to force runescape into OpenGL mode? It doesn't seem to like loading in anything else but safemode when I'm opening it in smart
E: I know it must be a bit frustrating to hear so many people having errors, but I guess most of us are just too stupid to get it to work properly :(
From: Zyt3x
With newest Java (also uninstalled all others, including jdk), newest SRL, newest GLHook, newest SMART v8.1, newest OpenGL dll plus replaced SRL.simba and SmartParams.simba with those you posted above, new preferences.dat and no unused smart.xxxxx files I still can't get this to work…
After setting the (new) runescape preferences to opengl and all the other runescape settings (fixed, max brightness, etc), I then open up simba and type in this:
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$i GLHook/GLHook.simba}
begin
setupSRL;
end.
I click run, SMART opens up fine, runescape loads in SmartMode and I get a java.lang.RunTimeException whenever I try to change from SafeMode into OpenGL. RuneScape prompts me with an alert saying it can't use that display option and changes me back to SafeMode. Additional info: Changing from SafeMode into OpenGL or DirectX on the drop-down menu on the SMART user interface freezes the screen; clicking and sending keystrokes still get through, but the drawing of the client has stopped.
Tried reinstalling java, restarting windows, reinstalling plugins, reupdating SRL and resetting preferences, but to no avail.
It seems like a runescape preferences setting issue, but I'd love to be able to change between modes in SMART…
Is there a way to force runescape into OpenGL mode? It doesn't seem to like loading in anything else but safemode when I'm opening it in smart
E: I know it must be a bit frustrating to hear so many people having errors, but I guess most of us are just too stupid to get it to work properly :(
thats because your not loading the plugin. this should replace everything for you. it has numbered instructions too.
https://mega.co.nz/#!ocg0ACib!N-WCMjwUJfr8WwkMI17CD2sXyhxGzxOYxcZo4BkPMd0look at the test.simba too.
@Zyt3x
I had to make sure java was in my path, then load the browser with RS(not SMART close out of all smart and simba stuff) set it to openGL via RS browser, Load SMART, if it's not in OpenGL set it to OpenGL, then use the dropdown box at the top and set it to OpenGL
Thats what Kevin told me to do and worked for me (well…stopped client freezing still can't debug stuff)
[XoL]
2013-07-02 11:04:19
From: Brandon
His solution
Thank you! I got it working for the most part now
DemiseScythe
2013-07-02 11:10:18
From: Zyt3x
With newest Java (also uninstalled all others, including jdk), newest SRL, newest GLHook, newest SMART v8.1, newest OpenGL dll plus replaced SRL.simba and SmartParams.simba with those you posted above, new preferences.dat and no unused smart.xxxxx files I still can't get this to work…
After setting the (new) runescape preferences to opengl and all the other runescape settings (fixed, max brightness, etc), I then open up simba and type in this:
{$DEFINE GLHOOK}
{$DEFINE SMART}
{$i GLHook/GLHook.simba}
begin
setupSRL;
end.
I click run, SMART opens up fine, runescape loads in SmartMode and I get a java.lang.RunTimeException whenever I try to change from SafeMode into OpenGL. RuneScape prompts me with an alert saying it can't use that display option and changes me back to SafeMode. Additional info: Changing from SafeMode into OpenGL or DirectX on the drop-down menu on the SMART user interface freezes the screen; clicking and sending keystrokes still get through, but the drawing of the client has stopped.
Tried reinstalling java, restarting windows, reinstalling plugins, reupdating SRL and resetting preferences, but to no avail.
It seems like a runescape preferences setting issue, but I'd love to be able to change between modes in SMART…
Is there a way to force runescape into OpenGL mode? It doesn't seem to like loading in anything else but safemode when I'm opening it in smart
E: I know it must be a bit frustrating to hear so many people having errors, but I guess most of us are just too stupid to get it to work properly :(
All scripts must have all of these components to run correctly in OGL:
program Name;
{$DEFINE SMART}
{$DEFINE GLHOOK}
{$I GLHook/GLHook.Simba}
begin
Smart_Plugins := 'OpenGL32.dll';
SetupSRL;
SmartSetOperatingMode(0); // Loads SMART in Safemode
GLHSetup(ToStr(SMART_CURRENTCLIENT)); // Enables OGL
SmartSetOperatingMode(1); // Changes into OGL mode
//Enter Rest of Main Loop here
end.
Note SMART define has to go before GLHook now so make sure to reverse those, not sure if that matters but it fixed some problems for me. The Key part are the three lines after SetupSRL; If you installed correctly, it should work just fine.
Aph0tix
2013-07-02 20:09:23
As a casual user and not a scripter; is this worth updating to?
From: Aph0tix
As a casual user and not a scripter; is this worth updating to?
Maybe. People are updating to it for OpenGL TBH maybe I'm wrong though.. but there are no OpenGL scripts out so I wouldn't say it's "worth" updating to unless you really want to. If you tired of the random smart.xxxx files appearing around your computer then yes, definitely upgrade to this.
[XoL]
2013-07-02 20:44:12
From: Aph0tix
As a casual user and not a scripter; is this worth updating to?
Not yet, maybe in a few weeks.
The Mayor
2013-07-04 23:31:05
Kevin's Mega link no longer exists, and OP is outdated?
E: Kasi's link worked.
E2: Too hard :(
Brandon
2013-07-05 02:48:07
From: The Mayor
Kevin's Mega link no longer exists, and OP is outdated?
E: Kasi's link worked.
E2: Too hard :(
How can the OP be outdated when it's a git source?
Too hard? :S You install it the same way you would the regular smart plugins. Drag/Drop.
Only annoying part should be the loading of plugins which no one seems to be able to do even after my last post.
Meh just use the regular Smart I guess.. This is just an option. I read somewhere Smart 8 was added to Simba :S
From: The Mayor
Kevin's Mega link no longer exists, and OP is outdated?
E: Kasi's link worked.
E2: Too hard :(
Kevin's link was my link, i removed after i updated. if you think its too hard mention my name on skype for help
The Mayor
2013-07-14 16:14:28
From: Kasi
Kevin's link was my link, i removed after i updated. if you think its too hard mention my name on skype for help
I managed to get it installed, Demise sent me her files :D
anth_
2013-07-15 07:02:32
From: The Mayor
I managed to get it installed, Demise sent me her files :D
Heya matey, any chance you could send them to me?
Thanks :)
footballjds
2014-01-02 10:00:26
Brandon, is this still in dev? Couldn't find your git stuff.
Brandon
2014-01-02 11:37:37
From: footballjds
Brandon, is this still in dev? Couldn't find your git stuff.
Uhh I gotta go through a lot of stuff to find the code. I don't remember which computer I coded this on. It isn't on git. I deleted the git after all the changes were added to the Smart v8.3. I got so used to Smart v8.3, I didn't even know I had these threads or projects existing..
If anyone has sources, it'd most likely either be Demise (long time no see) or Kasi (long time no see either). I'll see if I can find it.
Also, it isn't in dev anymore because Smart v8.3 added all the features this had except for the sockets (pairing) stuff and the sexy console. All the plugin loading and stuff, Smart does that better for sure.
The OP says v8.1 was the last version uploaded to git but the pictures show v8.3. I remember I failed at using git at that time so I used to release them via mediafire links.
EDIT:I could only find the Java source on my external HDD. I can't find the C code(Simba plugin):
https://github.com/Brandon-T/Acid-LoaderEDIT2:Yup.. the rest are on mediafire (in the trash) lol.. I'll restore them and sort it out later :l
http://i.imgur.com/Si3VXkd.pngSo un-organized.. lol.
EDIT3:Found my mega-upload account and the source to the very last version that I ever worked on:
https://mega.co.nz/#!QUdHjBAR!UfiZvUv7jM0r2AAYRpv4h3KlvgNJCN9wQ2WhvQ_nykU