SRL Archive - Simba (Testing) Scripts

Grand Exchange Downloader!


mixster

2010-02-21 12:08:45

program GE_Price_Downloader;
type
item = record
name: string;
id, minP, curP, maxP: Integer;
end;

var
items: array of item;
c, p, f: Integer;
n, e: TStringArray;
s: string;


// [url]http://itemdb-rs.runescape.com/viewitem.ws?obj=10392[/url]
// [url]http://itemdb-rs.runescape.com/results.ws?query=&sup=Initial[/url] Letter&cat=A


procedure Writelm(input: array of Variant);
var
i: Integer;
s: string;
begin
for i := 0 to High(input) do
s := s + toStr(input[i]);
Writeln(s);
end;

function ExplodeM(str, del: string): TStringArray;
var
i: Integer;
begin
repeat
SetLength(Result, High(Result) + 2);
i := Pos(del, str);
if i < 1 then
Break;
Result[High(Result)] := Copy(str, 1, i - 1);
Delete(str, 1, i + Length(del) - 1);
until False;
Result[High(Result)] := str;
end;

function ConvertPrice(input: string): Integer;
var
f: Extended;
begin
input := Replace(Lowercase(Trim(input)), ',', '', [rfReplaceAll]);
if (Pos('m', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('m', input) - 1), 0) * 1000000
else if (Pos('k', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('k', input) - 1), 0) * 1000
else
f := StrToFloatDef(Input, 0);
Result := Round(f);
end;

begin
SetLength(n, 27);
for c := 0 to 25 do
n[c] := Chr(Ord('A') + c);
n[26] := 'Other';

for c := 0 to High(n) do
begin
s := GetPage('http://services.runescape.com/m=itemdb_rs/results.ws?query=&sup=Initial Letter&sub=All&cvis=1&vis=0&sortby=name&order=1&cat=' + n[c]);
for p := 1 to StrToIntDef(Between('page=', '&amp', Copy(s, Pos('Next &gt;', s), 200)), 1) do
begin
s := GetPage('http://services.runescape.com/m=itemdb_rs/results.ws?query=&sup=Initial Letter&sub=All&cvis=1&vis=0&sortby=name&order=1&cat=' + n[c] + '&page=' + IntToStr(p));
Delete(s, 1, Pos('tbody>' + #10 + '<tr', s) + 10);
e := ExplodeM(s, '</tr>' + #10 + '<tr');
e[High(e)] := Copy(e[High(e)], 1, Pos('</tr>', e[High(e)]));
Writelm([n[c], ':', p]);
end;
end;

SetLength(items, High(e) + 1);
for c := 0 to High(e) do
begin
with items[c] do
begin
name := Between('alt="', '"', e[c]);
id := StrToIntDef(Between('obj=', '"', e[c]), -1);
if (id < 0) then
begin
Writelm([c, ': ', name, ' :: ', id, ' :: ', minP, '; ', curP, '; ', maxP, ';']);
Continue;
end;
s := GetPage('http://services.runescape.com/m=itemdb_rs/' + Replace(name, ' ', '_', [rfReplaceAll]) + 'viewitem.ws?obj=' + IntToStr(id));
minP := ConvertPrice(Between('<b>Minimum price:</b> ', #10 + '</span>', s));
curP := ConvertPrice(Between('<b>Market price:</b> ', #10 + '</span>', s));
maxP := ConvertPrice(Between('<b>Maximum price:</b> ', #10 + '</span>', s));
Writelm([c, ': ', name, ' :: ', id, ' :: ', minP, '; ', curP, '; ', maxP, ';']);
end;
end;

f := RewriteFile(AppPath + 'ge_db.csv', False);
if (f = -1) then
begin
Writeln('Error making a file to save the output to, so you basically wasted all this time!');
TerminateScript;
end;

for c := 0 to High(items) do
if not (WriteFileString(f, IntToStr(items[c].id) + ',"' + items[c].name + '",' + IntToStr(items[c].minP) + ',' + IntToStr(items[c].curP) + ',' + IntToStr(items[c].maxP) + #10 + #13)) then
begin
Writeln('Error writing line regarding the following item:');
Writeln(IntToStr(items[c].id) + ',' + items[c].name + ',' + IntToStr(items[c].minP) + ',' + IntToStr(items[c].curP) + ',' + IntToStr(items[c].maxP));
end;

CloseFile(f);
end.

Ran it with just 'Other' items and it went fine - currently doing it for everything. When finished, I'll attach a csv of all items.

Edit: Attached the complete list - there's a few items with 0 for prices as my nets failed and page loading did not work. Zip'd as too big as csv/txt file to upload.

Baked0420

2010-02-21 13:07:17

i ran it, then I looked for the file it saved, I think this is it, but it has no useful info in it, but here it is:


-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

-1,"RuneScape",0,0,0

EDIT: Just figured I'd mention, I did run this is Simba, and not mistakenly ran in SCAR.

mixster

2010-02-21 13:16:13

I ran it in Simba and it worked perfectly :(
Do you have the latest Simba? Also, Windows or Linux?

mixster

2010-02-21 13:18:03

I ran it in Simba and it worked perfectly :(
Do you have the latest Simba? Also, Windows or Linux?

Bah, silly double post. To appease anyone else who is annoyed by this, please view this picture of a cat.

mastaraymond

2010-02-21 13:22:44

No works here either!

mixster

2010-02-21 13:24:53

Bah humbug.

What does Simba write out when doing it? I started to rerun and it was fine, so I can only assume it's something silly and most likely Windows related.

Baked0420

2010-02-21 13:35:29

just downloaded Simba today, almost positive it'd be the latest version then. And Windows Vista.

EDIT: Just read your last post, it writes out:

'A'':'1
'A'':'2
'A'':'3
'A'':'4
'A'':'5
'A'':'6
'A'':'7
'A'':'8
'A'':'9
'A'':'10
'A'':'11
'A'':'12
'B'':'1
'B'':'2
'B'':'3
'B'':'4
'B'':'5
'B'':'6
'B'':'7
'B'':'8
'B'':'9
'B'':'10
'B'':'11
'B'':'12
'B'':'13
'B'':'14
'B'':'15
'B'':'16
'B'':'17
'C'':'1
'C'':'2
'C'':'3
'C'':'4
'C'':'5
'C'':'6
'C'':'7
'C'':'8
'C'':'9
'C'':'10
'C'':'11
'C'':'12
'D'':'1
'D'':'2
'D'':'3
'D'':'4
'D'':'5
'D'':'6
'D'':'7
'D'':'8
'E'':'1
'E'':'2
'E'':'3
'E'':'4
'F'':'1
'F'':'2
'F'':'3
'F'':'4
'F'':'5
'G'':'1
'G'':'2
'G'':'3
'G'':'4
'G'':'5
'G'':'6
'G'':'7
'G'':'8
'G'':'9
'G'':'10
'H'':'1
'H'':'2
'H'':'3
'H'':'4
'I'':'1
'I'':'2
'I'':'3
'I'':'4
'I'':'5
'J'':'1
'K'':'1
'K'':'2
'L'':'1
'L'':'2
'L'':'3
'L'':'4
'M'':'1
'M'':'2
'M'':'3
'M'':'4
'M'':'5
'M'':'6
'M'':'7
'M'':'8
'M'':'9
'M'':'10
'M'':'11
'M'':'12
'M'':'13
'N'':'1
'O'':'1
'O'':'2
'O'':'3
'O'':'4
'O'':'5
'P'':'1
'P'':'2
'P'':'3
'P'':'4
'P'':'5
'P'':'6
'P'':'7
'P'':'8
'Q'':'1
'R'':'1
'R'':'2
'R'':'3
'R'':'4
'R'':'5
'R'':'6
'R'':'7
'R'':'8
'R'':'9
'R'':'10
'R'':'11
'R'':'12
'R'':'13
'S'':'1
'S'':'2
'S'':'3
'S'':'4
'S'':'5
'S'':'6
'S'':'7
'S'':'8
'S'':'9
'S'':'10
'S'':'11
'S'':'12
'S'':'13
'S'':'14
'S'':'15
'S'':'16
'S'':'17
'S'':'18
'S'':'19
'S'':'20
'T'':'1
'T'':'2
'T'':'3
'T'':'4
'T'':'5
'T'':'6
'T'':'7
'T'':'8
'T'':'9
'U'':'1
'U'':'2
'U'':'3
'V'':'1
'V'':'2
'V'':'3
'W'':'1
'W'':'2
'W'':'3
'W'':'4
'W'':'5
'W'':'6
'X'':'1
'Y'':'1
'Z'':'1
'Z'':'2
'Other'':'1
'Other'':'2
0': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
1': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
2': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
3': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
4': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
5': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
6': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
7': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
8': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
9': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
10': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
11': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
12': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
13': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
14': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
15': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
16': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
17': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
18': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
19': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
20': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
21': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
22': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
23': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
24': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
25': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
26': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
27': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
28': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
29': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
30': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
31': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
32': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
33': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
34': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
35': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
36': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
37': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
38': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
39': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
40': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
41': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
42': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
43': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
44': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
45': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
46': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
47': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
48': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
49': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
50': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
51': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
52': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
53': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
54': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
55': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
56': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
57': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
58': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
59': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
60': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
61': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
62': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
63': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
64': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
65': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
66': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
67': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
68': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
69': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
70': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
71': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
72': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
73': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
74': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
75': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
76': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
77': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
78': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
79': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
80': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
81': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
82': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
83': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
84': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
85': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
86': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
87': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
88': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
89': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
90': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
91': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
92': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
93': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
94': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
95': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
96': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
97': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
98': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
99': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
100': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
101': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
102': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
103': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
104': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
105': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
106': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
107': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
108': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
109': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
110': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
111': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
112': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
113': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
114': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
115': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
116': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
117': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
118': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
119': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
120': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
121': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
122': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
123': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
124': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
125': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
126': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
127': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
128': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
129': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
130': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
131': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
132': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
133': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
134': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
135': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
136': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
137': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
138': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
139': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
140': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
141': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
142': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
143': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
144': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
145': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
146': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
147': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
148': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
149': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
150': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
151': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
152': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
153': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
154': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
155': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
156': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
157': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
158': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
159': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
160': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
161': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
162': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
163': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
164': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
165': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
166': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
167': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
168': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
169': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
170': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'
171': ''RuneScape'' :: '-1' :: '0'; '0'; '0';'

not yet done, that's just to show you what it's doing, and it keeps going with that, and towards the end after z it starts writing something else, forget what exactly, but once it's done I'll update what it wrote, just thought since that's basically all it does, it might give you an idea of what's going on.

and lol at your double post

mixster

2010-02-21 13:39:18

So then it must be Windows related! However, I dunno why unless Ray accidentallyed GetPage? I know Linux version has all the advanced web functions and Ray did mention that GetPage shouldn't work well until using the advanced stuffs, but I suppose it could relate to a caps sensitivity issue with a replace or a delete & pos or something.

mastaraymond

2010-02-21 13:43:05

From: mixster
So then it must be Windows related! However, I dunno why unless Ray accidentallyed GetPage? I know Linux version has all the advanced web functions and Ray did mention that GetPage shouldn't work well until using the advanced stuffs, but I suppose it could relate to a caps sensitivity issue with a replace or a delete & pos or something.

Maybe runescape returns a different HTML page on Windows? :p

Baked0420

2010-02-21 13:49:50

put in the rest of the debug from Simba, and why would RuneScape have two different HTML pages, one for windows and one for linux? isn't HTML HTML no matter what? shouldn't it, for the most part with a few exceptions, work no matter which operating system, since it's only a webpage. And how can you tell which OS people are on from HTML, I guess using JavaScript? But I would've thought it'd be the same either way.

mastaraymond

2010-02-21 14:03:43

I was just kidding baked ;)

@Mixster, you're using the wrong EOL silly, windows has CRLF!


(It's a simba bug, it shouldn't turn change the EOL's..)

mixster

2010-02-21 14:06:56

Wat
That should only affect the saving? In regards to the actual page parsing, if it works on Linux it should work on Windows :(

Baked0420

2010-02-21 14:14:26

From: mastaraymond
I was just kidding baked ;)

@Mixster, you're using the wrong EOL silly, windows has CRLF!


(It's a simba bug, it shouldn't turn change the EOL's..)


oh ok, you made me really think, why would you do that to me? :p lol

and I have no clue what EOL or CRLF is, so I guess I'm done here, but if you ever need me to test it again or if I can help in some way just let me know, I'd be glad to :)

mastaraymond

2010-02-21 14:16:24

From: mixster
Wat
That should only affect the saving? In regards to the actual page parsing, if it works on Linux it should work on Windows :(

No ^_^, it's because of the internals of GetPage.. The raw data was being put in a TStringList which (unwillingly) converted the EOL's

Widget

2010-02-22 03:37:50

From: Baked0420
oh ok, you made me really think, why would you do that to me? :p lol

and I have no clue what EOL or CRLF is, so I guess I'm done here, but if you ever need me to test it again or if I can help in some way just let me know, I'd be glad to :)


EOL = "End of line", the character that it uses to denote it's a different line (as in you pressed enter).

CR = Carrige Return, or Chr(13), also the Enter/Return key
LF = Line Feed, or Chr(10), I don't think this was ever a legit key

Windows uses CRLF (in scar this would be Chr(13)+Chr(10), try running writeln('a'#$0D#$0A'b'); ), and Linux generally uses just CR (#$0D), which happens to make files saved in Linux look like they're on one giant line when opened with most Windows programs since it goes "wtf mate."

Also ray, make it so that Chr(0)s get passed on properly so I can parse RSBot's hooks file with Simba since it's separates its values with #0s

senrath

2010-02-22 03:50:11

From: Widget

Windows uses CRLF (in scar this would be Chr(13)+Chr(10), try running writeln('a'#$0D#$0A'b'); ), and Linux generally uses just CR (#$0D), which happens to make files saved in Linux look like they're on one giant line when opened with most Windows programs since it goes "wtf mate."


Which is why, until Windows stops being stupid about this, any program should check for both configurations.

Baked0420

2010-02-22 06:43:15

From: Widget
EOL = "End of line", the character that it uses to denote it's a different line (as in you pressed enter).

CR = Carrige Return, or Chr(13), also the Enter/Return key
LF = Line Feed, or Chr(10), I don't think this was ever a legit key

Windows uses CRLF (in scar this would be Chr(13)+Chr(10), try running writeln('a'#$0D#$0A'b'); ), and Linux generally uses just CR (#$0D), which happens to make files saved in Linux look like they're on one giant line when opened with most Windows programs since it goes "wtf mate."

Also ray, make it so that Chr(0)s get passed on properly so I can parse RSBot's hooks file with Simba since it's separates its values with #0s



ohhhhh, thanks for the explanation :)

mixster

2010-02-22 11:31:58

From: mastaraymond
No ^_^, it's because of the internals of GetPage.. The raw data was being put in a TStringList which (unwillingly) converted the EOL's


Bitch - making me think my code was wrong!

mastaraymond

2010-02-22 11:52:26

Yeah fixed those errors! It should all work gravy now :-).