scriptkitty
2009-12-05 23:45:07
i created a script that would log you into gaiaonline and get your daily chances for the day, coh3n helped me with the LoadBitmaps function and the tut he wrote helped me with the rest. i hope to expand on this script later on
{<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>]
| Gaiadaily |
| Version: beta |
| Scriptkitty |
[<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>]
| what it does: |
| logs into gaia, gets your daily chances for the day |
[<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>]
| Setup: put your user name and password in line 60 and 61 |
[<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>]
| Notes: Please let me know if you have any suggestions |
[<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>}
program gaiadaily;
{.include SRL/SRL.scar}
function LoadBitmaps(Which: Integer): Integer; //LoadBitmaps function from Coh3n
begin
case Which of
0: Result := BitmapFromString(26, 2, 'beNpNjuEKgDAIhN//IbM2KmirH' +
'4u5li7MLagE5TyPDy+RKw49rMjyVnN8pEeYye14cKF8kkhZLID1VJ' +
'iIT9z6mmROHgBC1js2WvnR0KgTKz8Fpxqg07azy5xGXavzzUlfqTS' +
'TbigKkXc='); //username
1: Result := BitmapFromString(27, 2, 'beNodjVsOwyAMBO9/yBiIQpPSC' +
'BUQLzuYuuzXaqWZ7ahhcwnnnMw8qN0vBcrUMcOlAMDH0lv5nFrG/A' +
'y3gzpcRczBAWzWlzmKVmDviNj8ZQTZhfujK6u8v1X8rcRU5IiJMPl' +
'zCR8Rgj58SB2pNyTiyVmExrqUKz3Yfr5WlkM='); //password
2: Result := BitmapFromString(19, 2, 'beNr79qO7u2fbth0MDAxAxs+f' +
'f4AIyHZzd4ewIQgoBRQEKkOWBQqeOXMGyM3KygZyX79+A5H69u0HH' +
'ME1/v37DyoLAJwdRBY='); //login
3: Result := BitmapFromString(10, 1, 'beNpz9fr/yx+IfF0D640s' +
'gWhxaGSDrWOIhkSupm4PANerDAk=');//gaiadailydrawing
4: Result := BitmapFromString(21, 2, 'beNr7/9+3cOJ/MPAtmgRlFE4' +
'CIr+iiQipwolA7n8Y8AMrACIg27ugHyKIzIAjhEg+CCErALEANXZY' +
'Yg=='); //mygaia
5: Result := BitmapFromString(18, 2, 'beNr7/z+gZIp/yWQg+R8GgFwI' +
'Ay4IUYMm6Fc00bdoEpRdOMm3EMr2LZwIZwDVQNlABgA2SlEB'); //Shops
6: Result := BitmapFromString(18, 1, 'beNr7/x8OfAsnwhl+RTA2nFE' +
'4CSgIVQMAxTsqDw=='); //forums
7: Result := BitmapFromString(16, 3, 'beNrL6/UtmvgfDHwLJ8EYE/3g' +
'gkVQQb/CSb5g5F3QDxGBM3wK+hGC+QhZbyRxr7xeIIJK5fXA2V75v' +
'cgKvABmkGa0'); //Wolrd
8: Result := BitmapFromString(15, 2, 'beNor6PcrmvgfBnwLJwK5vkWT' +
'/iMB38JJcFnvgn4ggnBB7HwEG43hAwDZL0O1'); //Games
9: Result := BitmapFromString(15, 2, 'beNrrP+jSf/A/KoCIIJNoU' +
'riUocgCAHcuS40='); //ok button
else
Writeln('Invalid Bitmap Selection.');
end;
end;
procedure glogin; //gaia login sequence
var
username, password, login, x, y, x1, y1, x2, y2 : Integer;
u, p : String;
begin
username := LoadBitmaps(0);
password := LoadBitmaps(1);
login := LoadBitmaps(2);
u := ''; //Put username here between ''
p := ''; //Put Password here between ''
wait(8000)
if FindBitmap(username, x, y) then //looks for the username bitmap
begin
writeln('username found');
Mouse(x, y, 4, 4, True);
wait(500);
TypeKeys(u);
end else
if FindBitmap(username, x, y) then
begin
writeln('username found on the secound try');
Mouse(x, y, 4, 4, True);
wait(500);
TypeKeys(u);
end else
begin
writeln('still could not find... terminating script')
writeln('you might need to adjust the wait time in line 48');
TerminateScript;
end;
if FindBitmap(password, x1, y1) then
begin
Writeln('password found');
Mouse(x1, y1, 4, 4, True);
wait(500);
TypeKeys(p);
end else
begin
writeln('could not find password');
TerminateScript;
end;
If FindBitmap(login, x2, y2) then
begin
Writeln('login button found');
Mouse(x2, y2, 4, 4, True);
wait(500);
writeln('login to gaia online successful');
FreeBitmap(username);
FreeBitmap(password);
FreeBitmap(login);
end else
begin
writeln('could not find login button');
TerminateScript;
end;
end;
procedure getdaily; //finds the daily chance and clicks it)
var
daily, ok, x, y, x1, y1 : Integer;
begin
daily := LoadBitmaps(3);
ok := Loadbitmaps(9);
wait(5000);
if FindBitmap(daily, x, y) then
begin
writeln('daily chance found');
Mouse(x, y, 4, 4, True);
end else
begin
writeln('no daily chance found, did you do it already today?');
end;
wait(7000)
if FindBitmap(ok, x1, y1) then
begin
writeln('ok button found');
Mouse(x1, y1, 4, 4, True);
end else
begin
writeln('adjust the wait time in line getdaily but ignore if no daily chance found');
end;
end;
procedure mygaia;
var
mg, x, y :integer; //mg stands for mygaia bitmap
begin
mg := LoadBitmaps(4);
if FindBitmap(mg, x, y) then
begin
writeln('mygaia found');
Mouse(x, y, 4, 4, True);
wait(5000);
end else
begin
writeln('could not find mygaia');
TerminateScript;
end;
FreeBitmap(mg);
end;
procedure shops;
var
sh, x, y :integer; //sh stands for shops bitmap
begin
sh := LoadBitmaps(5);
if FindBitmap(sh, x, y) then
begin
writeln('shops found');
Mouse(x, y, 4, 4, True);
wait(5000);
end else
begin
writeln('could not find shops');
TerminateScript;
end;
FreeBitmap(sh);
end;
procedure forums;
var
f, x, y :integer; //f stands for forums bitmap
begin
f := LoadBitmaps(6);
if FindBitmap(f, x, y) then
begin
writeln('forums found');
Mouse(x, y, 4, 4, True);
wait(5000);
end else
begin
writeln('could not find forums');
TerminateScript;
end;
FreeBitmap(f);
end;
procedure world;
var
w, x, y :integer; //w stands for world bitmap
begin
w := LoadBitmaps(7);
if FindBitmap(w, x, y) then
begin
writeln('world found');
Mouse(x, y, 4, 4, True);
wait(5000);
end else
begin
writeln('could not find world');
TerminateScript;
end;
FreeBitmap(w);
end;
procedure games;
var
g, x, y :integer; //g stands for games bitmap
begin
g := LoadBitmaps(8);
if FindBitmap(g, x, y) then
begin
writeln('games found');
Mouse(x, y, 4, 4, True);
wait(5000);
end else
begin
writeln('could not find games');
TerminateScript;
end;
FreeBitmap(g);
end;
var
t : integer; //time to wait for page to load
begin
t := 5000;
ClearDebug;
SetupSRL;
OpenWebPage('http://www.gaiaonline.com');
wait(t);
glogin;
wait(t);
getdaily;
wait(t);
mygaia;
wait(t);
getdaily;
wait(t);
shops;
wait(t);
getdaily;
wait(t);
forums;
wait(t);
getdaily;
wait(t);
world;
wait(t);
getdaily;
wait(t);
games;
wait(t);
getdaily;
writeln('script is done!!!');
end.