Toterache
2007-10-22 12:32:19
Well, after 5 days of hard labor and work, spending about 4-6 hours a day, i finally wrote a program that opens up Runescape, chooses high settings, logs into the best fit non-member world, enters password and username, and logs in, even passing the welcoming screen. :D,
of cousre this only works if you have Google set as your Starting site, and you have the microsoft internet explorer for Windows xp..(I mainly used DTMs, they are my favorit of all commands ^^).
Well, here it is, my very first working scribt *drummroll*:
Please don't be too hard judging this, remember, I have been at this for less than a week, and some of my main controls didn't want to work, so I had to revise this from top to bottom. :(
EDIT: I just realized that one of the things I said was not completely true, this isn't my first script, but my first scribt that uses more than "begin", "movemouse", "clickmouse", "wait", "end", and actually works! :D
of cousre this only works if you have Google set as your Starting site, and you have the microsoft internet explorer for Windows xp..(I mainly used DTMs, they are my favorit of all commands ^^).
Well, here it is, my very first working scribt *drummroll*:
{---For this to work you need to have the internet symbol in the quickstart bar--}
program RunescapeLogger; //remember to put your username and pass
{.include SRL/SRL.scar} //in line 218/219
var
x,y,Gsymbol,InternetDTM,PlayDTM,HighSettings,BestWorld,DoneLoad,ExistingUser,
LoginDTM, ClickToPlay, SecondLoad,GoogleScreen,RSscreen,Detailscreen,WorldScreen: integer;
procedure OpenInternet;
begin
InternetDTM := DTMFromString('78DA630C606060E06740013A0D17C0342394C' +
'F1808243851D5789FFF81AA260CD31C59AB04543520BB4450D584' +
'6CF980AAC6134808A0AA31997A15450D006CE609C1');
begin
if(FindDTM(InternetDTM,x,y,0,0,1023,767)= True) then
writeln('Found Internet Symbol')
movemouse(x,y)
writeln('Moved mouse on the Internet Symbol')
wait(1000)
clickmouse(x,y,true)
wait(4000)
writeln('Opened Internet Window')
writeln('Mission Success')
end;
begin
FreeDTM(InternetDTM);
end;
end;
procedure WaitForGoogleScreen;
begin
GoogleScreen := DTMFromString('78DA63BCC5C8C01009C448E0FFFFFF601A26C' +
'AF802C80A4355030370353F31D56098C3C3C4C0104A408D04504D' +
'0401350F81AC10026AAE3262D885EE6600A7101600');
begin
repeat
wait(2500)
until(FindDTM(GoogleScreen,x,y,0,0,1023,767)=True)
writeln('Loaded the Internet [google] screen)')
end;
FreeDTM(GoogleScreen);
end;
procedure GetOntoRunescape;
begin
Gsymbol := DTMFromString('78DA636C65606030634001FFFFFF07D38C503' +
'EE364202184A6664730AA9A4A202182AAE6FC733473228084309A' +
'39268CA86A74818418AA9A3F7FFEA0AA61C574F3A9573F51D5EC0' +
'61292A86A5EBC7C8DAA4607C8AA20E0F7CB40A290115511C31914' +
'350049CF1ABD');
begin
if(FindDTM(Gsymbol,x,y,0,0,1023,767)= True) then
writeln('Found the Google icon')
wait(500)
movemousesmooth(x,y)
clickmouse(x,y,true)
wait(200)
sendkeys('www.runescape.com' + chr(13))
writeln('going onto Runescape website, now...')
wait(5000)
end;
begin
FreeDTM(Gsymbol);
end;
end;
Procedure FindRSHomepage;
begin
RSscreen := DTMFromString('78DA63DCC4C8C0E0C9800292A775836946289' +
'FB108C852475553DDD887AA662F90A584AA66EDE67DA86A9E0059' +
'8604CCB164626050415573E2F8095435CF81AC085435AAEA6AA86' +
'AB89830D46417D4A0AA3101AAF1475513199B86AAA60BC80A4755' +
'6365CC81AA663DD01C035435D7AFDD40510300F0EA16D8');
begin
repeat
wait(5000)
until(FindDTM(RSscreen,x,y,0,0,1023,767)=True)
writeln('Loaded the Runescape Homepage')
end;
FreeDTM(RSscreen);
end;
procedure PressPlay;
begin
PlayDTM := DTMFromString('78DA63DCC9C4C010C2C8800C2E6EAF01D3305' +
'1C646A01A2F54356A8A92A86AE603D534A2AAD9BE201755CD1BA0' +
'9A265435C63A0AA86AAE01D578A3AAD1D3944555B305A8C602554' +
'D654539AA1A05660686045435465A68E62401CD49455563666681' +
'A20600244F0F84');
begin
if(FindDTM(PlayDTM,x,y,0,0,1023,767)= True) then
writeln('found play symbol')
clickmouse(x,y,true)
end;
begin
FreeDTM(PlayDTM)
end
end;
Procedure WaitForDetailScreen;
begin
DetailScreen := DTMFromString('78DA63FCC2C8C020C5801530C2E863986A5EB' +
'E7C89AAC6988981418C8039CC4035EA04D43C01B23408A8F90E64' +
'4D439533D1514155B30D681727238A1A0D4646543509401633AA9' +
'A5FCF6EA0A80100C5380C5B');
begin
repeat
wait(3000)
until(FindDTM(DetailScreen,x,y,0,0,1023,767)=True)
writeln('Loaded the Detail Screen')
end;
FreeDTM(DetailScreen);
end;
procedure Settings;
begin
HighSettings := DTMFromString('78DA6354616460E003622450149304A661A28' +
'C1140D66714250C9D1529A86A8280ACC7A86A264F6C4755630364' +
'5D4355E3622E85AA4603C8BA85AA66F38A3E54354240D62354354' +
'2BCACA86ABE01890FA86A78858551D5DC01123F50D5A8A948A2AA' +
'B904243850C3C7DA450855CD1520218FAA864F901D55CD6B20A18' +
'FAA26D95313D3CDD6A86A2C4CD0CC5104B2DC51D5A82B73A0AA71' +
'02B21C50D54CEA0C405513096419A3AA59399517554D1690258DA' +
'AE6EA191F54353940161BAA9AE5335A50D40000A9C22060');
begin
if(FindDTM(HighSettings,x,y,0,0,1023,767)= True) then
writeln('found and chose high quality setting')
clickmouse(x,y,true)
end;
begin
FreeDTM(HighSettings);
end;
end;
procedure WaitForWorldScreen;
begin
WorldScreen := DTMFromString('78DA630C6462609061C00A1861B41E508D140' +
'135154035B2A8729B376F46553315A86621AA1A3B23195435AF81' +
'AC45A86A1CCC7451D56C049A730655CD996D2DA86ADE0059A750D' +
'518E929A1AA7103B28451D5880BF1A0AA1104DAA543C0EF207F69' +
'E1570300345D0EC0');
begin
repeat
wait(3000)
until(FindDTM(WorldScreen,x,y,0,0,1023,767)=True)
end;
FreeDTM(WorldScreen)
end;
procedure ChooseBestWorld;
begin
BestWorld := DTMFromString('78DA639CC0C8C0C006C448C0D4500D4CC3441' +
'9A763AA31D0554155B301C8E24255A3A82482AAE61890C58BAA66' +
'D39A29A86A42802C7E54351BD72E4455138AE99E4D2B67A1AAF10' +
'5B2BEA12861D8BC7A06AA9A9540D6070634F74C4355B30BC8FA89' +
'AA46534D16558D0790751C55CDFFFFFF51D51C04B24E306005703' +
'5E7802C1B547FD99BEAA0AAF103B2AC51D598EBA9A2AAB90D64A9' +
'A1AA313650C734471E4D8D21AA39007FF51EB8');
begin
if(FindDTM(BestWorld,x,y,0,0,1023,767)= True) then
writeln('will now choose the best world for you')
clickmouse(x,y,true)
writeln('chose the best world, waiting for load to be completed...')
end;
begin
FreeDTM(BestWorld)
end;
end;
procedure WaitForLoad;
begin
DoneLoad := DTMFromString('78DA63DCC1C8C0B01188918095B5339886893' +
'2B23231306C4255030370352540D6065435FFFFA3AA01004A5906' +
'08');
begin
repeat
wait(5000)
until(FindDTM(DoneLoad,x,y,0,0,1023,767)= True)
writeln('Load Completed')
end;
begin
FreeDTM(DoneLoad)
end;
end;
procedure FindExistingUser;
begin
ExistingUser := DTMFromString('78DA6364656260B8C1C8800CECEC3DC1344C9' +
'4F12C907511558DAF7F14AA9AF340D66B026A3C8076BD40556364' +
'6C8DAAC613A8E6320135EC4035F750D5FCFFFF1F558D0950CD5D0' +
'26A1E03593751D5C0004C14000CE91445');
begin
if(FindDTM(ExistingUser,x,y,0,0,1023,767)= True) then
Writeln('Found icon of Existing User')
ClickMouse(x,y,true)
Writeln('Opened icon of Existing User')
Writeln('Will fill out the Log-in form')
wait(500)
SendKeys('Username' + chr(13)) //Fill out your Username here!!!
SendKeys('Password') //Fill out your Password here!!!
wait(100)
end;
begin
FreeDTM(ExistingUser)
end;
end;
procedure PressLogin;
begin
LoginDTM := DTMFromString('78DA63CC646460F803C448E0FFFFFF601A26C' +
'AB81CC8FA80AAC6C8D81A55CD52208B9509BF1A5D20EB3DAA39BE' +
'FE51A86A0C802C3626FC6A72802C4654354E2E7EA86AE280ACAFA' +
'876797885A0AAA906B27E12F05704903503550D0CC0D57460AA09' +
'0A89435103003C0613EF');
begin
if(FindDTM(LoginDTM,x,y,0,0,1023,767)= True) then
Writeln('Will attempt to login now')
MoveMouseSmooth(x,y)
wait(100+random(100))
ClickMouse(x,y,true)
end;
begin
FreeDTM(LoginDTM)
end;
end;
procedure WaitTillSecondLoadIsDone;
begin
SecondLoad := DTMFromString('78DA633CCFC8C0C0C5C4800CFEFFFF0FA619A' +
'17CC62420EB25238A9A80D83854356D40963AAA39EFBE54A3AA91' +
'64226C972A13865D790AA2A86A94816A7450CDF18072616A00A1B' +
'50EC0');
begin
repeat
wait(5000)
until(findDTM(SecondLoad,x,y,0,0,1023,767)= true)
end;
begin
FreeDTM(SecondLoad)
end;
end;
procedure PressToPlay;
begin
ClickToPlay := DTMFromString('78DA63BCCCC8C0F00A8891C0FFFFFFC1344C9' +
'4B10AC87A8FAA46DFD400558D181303C34B02E61C01B2CEA2AAF1' +
'606240557301C812604251932AC08AAA2609C8BA886A4E5B7733A' +
'A1A39260C7342D91851D54802E52F10704F2790C58B6ACEBB2FD5' +
'286A0038A2158A');
begin
if(FindDTM(ClickToPlay,x,y,0,0,1023,767)= True) then
writeln('login was successfull, have fun playing')
ClickMouse(x,y,true)
end;
begin
if not(FindDTM(ClickToPlay,x,y,0,0,1023,767)= True) then
writeln('login was not successful, please re-check your data')
end;
begin
FreeDTM(ClickToPlay)
end;
end;
begin
ClearDebug;
OpenInternet;
WaitForGoogleScreen;
GetOntoRunescape;
FindRSHomepage;
PressPlay;
WaitForDetailScreen;
Settings;
WaitForWorldScreen;
ChooseBestWorld;
WaitForLoad
FindExistingUser;
PressLogin;
WaitTillSecondLoadIsDone;
PressToPlay;
end. //FINISHED MY FIRST WORKING SCRIPT!!!!
//After about 10-15hours of research,
//and 3 hours of scribting. :D
//EDITED: Now 3 more hours of Research
//to add the timer "failsafe",
//and 2 more hours of scribting. ^^
Please don't be too hard judging this, remember, I have been at this for less than a week, and some of my main controls didn't want to work, so I had to revise this from top to bottom. :(
EDIT: I just realized that one of the things I said was not completely true, this isn't my first script, but my first scribt that uses more than "begin", "movemouse", "clickmouse", "wait", "end", and actually works! :D