SRL Archive - SRL Suggestions

Restarting SMART during runtime


Coh3n

2011-03-02 13:30:53

So I got this on both my MSI runs last night (both were going for over 10 hours):

[9:52:18]: 'Runescape has been updated.'
[9:52:20]: Thank-you for using MSI Phoenix scripts!
[9:52:20]: Successfully executed.
So I was thinking, since SRL knows when there's an update, if there's a way to restart SMART, it would be very simple to add, then our scripts can run straight through updates (assuming you're using color, or the hooks didn't change).

Anyone know if it's possible?

Gu3st...

2011-03-02 13:38:09

It's possible, but the problem is that you have to open runescape in your browser once after a runescape update in order for smart to work.

If you don't you'll get the "Error starting smart, make sure the target page has an applet deceleration" error…

Coh3n

2011-03-02 13:39:54

From: Zyt3x
It's possible, but the problem is that you have to open runescape in your browser once after a runescape update in order for smart to work.

If you don't you'll get the "Error starting smart, make sure the target page has an applet deceleration" error…

Oh, right. :(

Well, there has to be a reason why that happens, the question is, is it fixable?

Gu3st...

2011-03-02 13:41:49

Yeah, I've been wondering the same…. :/

Is this a SMART related bug? or has JaGeX made it so that if you don't load the "http://www.runescape.com/game.ws?j=1" site it wont load properly (SMART isn't using this site)?

Echo_

2011-03-02 13:43:20

It's possible, just get SMART to sense an update (ie reading a change in the client version number), get the application to dispose all running actions and re-invoke the main method.

Coh3n

2011-03-02 13:44:02

From: Zyt3x
Yeah, I've been wondering the same…. :/

Is this a SMART related bug? or has JaGeX made it so that if you don't load the "http://www.runescape.com/game.ws?j=1" site it wont load properly (SMART isn't using this site)?

Actually, you can always call OpenWebPage(''); to load RS in the web browser. Only thing is, I don't think there's a way to close it after it's loaded.

From: Echo_
It's possible, just get SMART to sense an update (ie reading a change in the client version number), get the application to dispose all running actions and re-invoke the main method.

I have no idea how to do that, but it doesn't sound too hard.

Echo_

2011-03-02 13:57:46

From: Coh3n
Actually, you can always call OpenWebPage(''); to load RS in the web browser. Only thing is, I don't think there's a way to close it after it's loaded.


I have no idea how to do that, but it doesn't sound too hard.


Yeah, java has pretty good support for self-updating applications, it shouldn't be too challenging to implement.

Coh3n

2011-03-02 14:40:27

From: Echo_
Yeah, java has pretty good support for self-updating applications, it shouldn't be too challenging to implement.

Would SMART have to be modified, or could it be done through Simba?

Train

2011-03-02 14:46:14

OpenWebPage('http://runescape.com/game.ws? something like this');
Wait(10000);
Inc(Smart_Server);//some failsafe
SetupSmartEx(Smart_Server, True, True, False);

no?

Coh3n

2011-03-02 15:43:38

I forgot that you could restart SMART that way. That may just work. Just may have to deal with RS being open in your browser. Would probably also have to check the hooks upon restarting to see if they've been updated.

Iamadam

2011-03-02 16:03:20

SMART could be fixed so this wasn't a problem anymore… just sayin.

Wizzup?

2011-03-02 16:09:32

From: Iamadam
SMART could be fixed so this wasn't a problem anymore… just sayin.


Yeah, I was wondering as to why this was happening. It's really annoying to have to fire up your web browser. (Actually I only use a web browser to macro because SMART/Java somehow disregards my proxy settings)

Coh3n

2011-03-02 19:25:39

From: Iamadam
SMART could be fixed so this wasn't a problem anymore… just sayin.

Do you have any idea how? :rolleyes:

Flight

2011-03-02 19:32:35

From: Wizzup?
Yeah, I was wondering as to why this was happening. It's really annoying to have to fire up your web browser. (Actually I only use a web browser to macro because SMART/Java somehow disregards my proxy settings)


That's probably the safest method I believe.

I think until Smart has this ability, the only option is to have Simba manually open a webpage, wait until the login screen is present (which confirms the cache is updated and Smart is ready to run), have it close out the webpage, and restart Smart, ect…

Echo_

2011-03-02 19:57:26

You could probably do it via batch, here's a little snippet I came up with.
@echo off
title Client Reloader by Echo_
start iexplore http://world8.runescape.com/
ping 127.0.0.1 -n 60
taskkill /IM iexplore.exe
exit

Basically it starts up Runescape in your web browser, gives it 60 seconds to download client and cache updates, and then closes the browser. If we could find a way to run these type of things upon sensing an RS update, I think we would be in pretty good shape :)

Coh3n

2011-03-02 20:09:32

From: Echo_
You could probably do it via batch, here's a little snippet I came up with.
@echo off
title Client Reloader by Echo_
start iexplore http://world8.runescape.com/
ping 127.0.0.1 -n 60
taskkill /IM iexplore.exe
exit

Basically it starts up Runescape in your web browser, gives it 60 seconds to download client and cache updates, and then closes the browser. If we could find a way to run these type of things upon sensing an RS update, I think we would be in pretty good shape :)

Nice. Would need to work with the users default browser if that's possible, though. Not everyone has IE. I'm also not sure if you can run a batch with Simba. I'm sure it's possible for it to be added though.

Flight

2011-03-02 20:16:27

I don't quite know if 60 seconds would be long enough, but then again I don't see how you could detect if the client has completed loading via a batch file. :p

noidea

2011-03-02 21:10:22

From: Coh3n
Nice. Would need to work with the users default browser if that's possible, though. Not everyone has IE. I'm also not sure if you can run a batch with Simba. I'm sure it's possible for it to be added though.


Everyone running Simba on Windows has ie.

Instead of opening the browser to get the client cache, why don't we just write a tool to dl the cache? This way a browser etc wont need to be opened. It'll be cleaner and use less resources.

Flight

2011-03-02 21:15:30

Do you think it's possible for Jagex to detect if you're downloading the cache directly or via the Runescape website?

pyroryan

2011-03-02 21:22:24

From: Flight
Do you think it's possible for Jagex to detect if you're downloading the cache directly or via the Runescape website?


They shouldn't be able to if you use proper headers, user-agent, etc.

lordsaturn

2011-03-02 21:47:13

From: Zyt3x
It's possible, but the problem is that you have to open runescape in your browser once after a runescape update in order for smart to work.

If you don't you'll get the "Error starting smart, make sure the target page has an applet deceleration" error…


I think it happens because SMART loads runescape.jar and not loader.jar, loader.jar handles the updates? No? Maybe?

Coh3n

2011-03-02 23:30:10

From: noidea
Everyone running Simba on Windows has ie.

Yes, but not everyone uses Windows. :p

grats

2011-03-03 00:58:31

From: Coh3n
Actually, you can always call OpenWebPage(''); to load RS in the web browser. Only thing is, I don't think there's a way to close it after it's loaded.


I have no idea how to do that, but it doesn't sound too hard.


To close it, have the script press alt f4 lol…

running through an update would be awesome though.

Harry

2011-03-03 01:13:27

From: Coh3n
Yes, but not everyone uses Windows. :p

Even WINE has IE preinstalled, I think.

You could have SMART load an unsigned world if it detects an update, as it will load fine. I just see no reason why one would want this, considering the hooks break most of the time after an update –> your script would be running blind.

NCDS

2011-03-03 01:18:16

From: Harry
Even WINE has IE preinstalled, I think.

You could have SMART load an unsigned world if it detects an update, as it will load fine. I just see no reason why one would want this, considering the hooks break most of the time after an update –> your script would be running blind.


Unless your script requires no Reflection..

Harry

2011-03-03 01:31:48

From: NCDS
Unless your script requires no Reflection..

Or some major change happens in RS breaking the script, unplanned issues, etc. Would be okay I guess if SRL had more failsafes, but I still think the risk outweighs the benefits.

KingKong

2011-03-03 02:19:30

From: noidea
Everyone running Simba on Windows has ie.


I run simba on win and I don't have IE….

Gu3st...

2011-03-03 10:36:30

To all of you saying we could open up runescape in the web-browser and close it afterwards; imo that is a big no-no… It avoids the problem, rather than solving it.

From: lordsaturn
I think it happens because SMART loads runescape.jar and not loader.jar, loader.jar handles the updates? No? Maybe?
Yeah, that sounds possible… Either that or they use JavaScript or something similar

noidea

2011-03-03 17:56:04

From: KingKong
I run simba on win and I don't have IE….


Sorry. A properly working machine*…
http://en.wikipedia.org/wiki/Removal_of_Internet_Explorer