SRL Archive - OSR Help

Explain this code?


Zackeri

2013-02-27 17:05:46

Page := Between('<iframe id="game" src="', '"', GetPage('http://www.runescape.com/game.ws?j=1'));

what does:<iframe id="game" src="' do??

I know between is the string inbetween the first 2 strings, right? then that string is stored in page?

Just need some explanation here

King

2013-02-27 17:48:06

07 Scape does not load using iframe, if you are trying to load another URL in SMART.

Neodymium

2013-02-27 18:12:40

That normally searches the page source for the iframe it contains, which is something like "http://world1.runescape.com/,123deadbeef768".
It then splits the string into arrays using the comma as the delimiter.
The end parameters end up to be:

[0]: http://world1.runescape.com/
[1]: 123deadbeef789
Go to an old school world and look at the url. Try to make it the same. Keep in mind you need to remove the "," it adds back in later in the chain.

Frito

2013-02-28 15:57:48

I can't seem to figure it out still. :duh:

Neodymium

2013-02-28 16:13:06

From: Neodymium
Change the GetSmartParams (or whatever it is) function to set the values yourself.

SetLength(Params, 2);
Params[0] := 'http://__________.runescape.com/';
Params[1] := ''; // what is after the last "/" in the url
Go to "http://oldschool.runescape.com/slu" and just find a world (choose the best world would work).
Look at the url and separate it into each parameter, as shown above.

The EOC url looks something like "http://world1.runescape.com/,123abcd463", but as you can tell, there is no comma in the url for old school.
Make sure you remove the "," that is concatenated to the Params[1] when SMART is being spawned, or else it will not work.
Also, reduce the height (the second integer) by 50 pixels, should be 503 I think.

three word limit