solemn wishes
2006-12-30 17:56:56
hi guys,
i see that there are many topics on the word switching problem so i thought that i would try and help out with a bit of code i wrote a while back. Which still works.
these peices of code have the following features -
. counts players in a world
. detects if using ie or firefox
. randomly selects worlds
. chooses members worlds if set to
. pretty fast
for any of you taking up the challenge of amking a new one or updating the old one my code might come in handy as i took quite a different approach to most otehr worlds switchers.
i see that there are many topics on the word switching problem so i thought that i would try and help out with a bit of code i wrote a while back. Which still works.
these peices of code have the following features -
. counts players in a world
. detects if using ie or firefox
. randomly selects worlds
. chooses members worlds if set to
. pretty fast
for any of you taking up the challenge of amking a new one or updating the old one my code might come in handy as i took quite a different approach to most otehr worlds switchers.
Function WorldSelectionMenu : boolean;
Var backM, Btypee , backIE : integer;
wx, wy : integer;
Btype : string;
begin
backIE := BitmapFromString(6, 2, '7ECA4C81CB4EC8E8B1B5E1976' +
'CC22F6CC22F87CD56F6FBF2FFFFFFFFFFFF90D1636CC22F');
backM := BitmapFromString(3, 4, 'F1F3F2C2DFC37AC17A84C5852C' +
'A12A17981737A631C8F2B6009000D8F8C8E5FFD3009000');
If(FindWindowTitlePart('RuneScape', False))Then
Begin
GetClientDimensions(wx, wy);
Writeln('RuneScape Client Sucesfully Found')
Writeln('Client Width := ' + IntToStr(wx));
Writeln('Client Height := ' + IntToStr(wy));
result:= true;
end;
If Result then begin
If(FindWindowTitlePart('Internet', False))Then Btype:=('Internet Explorer');
If(FindWindowTitlePart('Mozilla', False)) Then Btype:=('Mozilla');
end;
Activateclient;
If(Btype<>'')then begin writeln('You are using '+ Btype)
If(Btype='Internet Explorer')then Btypee:= backIE else
Btypee:= backM;
end;
If(findbitmapspiraltolerance(Btypee, x, y, 4, 4, 61, 113, 5))then
Begin
wait(random(500)+random(250))
Mouse(x,y,4,3,true)
End;
While(Not(getcolor(494 ,201)=16777215))do wait(250+random(250)) wait(1000+random(250))
end;Function RandomSelectWorld : boolean;
Var FreeI, MoveMe : integer;
stype, MemersI : integer;
W, H : integer;
begin
MoveMe := BitmapFromString(7, 3, 'z78DA73757533717375C54B3A' +
'39BA18BA393B5BB898B93959383B19B859E0275D89361300E1F11' +
'FB6');
MemersI := BitmapFromString(3, 3, 'E7BD3AF4CF5EFCFCFFECC442' +
'F7D567FCFCFFF3CB4BFAD866FDDC71');
FreeI := BitmapFromString(4, 3, 'E8E8E8C2C2C2A0A0A0858585E8' +
'E8E8C2C2C2B4B4B4B8B8B8BEBEBEBEBEBED0D0D0D0D0D0');
If(findbitmapspiraltolerance(MoveMe, x, y, 1009, 118, 1027, 682, 0))then
Begin
Mouse(x,y,5,5,true) holdmouse(x, y, true)
Mmouse(x,y,0,250) releasemouse(x, y, true)
End;
wait(500+random(500))
If(memfree='members')then stype:= MemersI Else
stype:= FreeI;
If(findbitmapspiraltolerance(stype, x, y, 268, 124, 728, 691, 0))then
Begin
Mouse(x+20,y,5,5,true)
wait(500)
Result:= true;
end;
If(FindWindowBySize(766, 504))Then
GetClientDimensions(W, H);
If(result)Then Begin
while(not(ClickOption('Exist', 1))) Do wait(1000+random(1000))
Loginplayer;
end;
end;Function CountPlayers : boolean;
Var PlayerMM : integer;
x1, y1, x2, y2, c : integer;
begin
PlayerMM := BitmapFromString(4, 4, 'z78DA3330000137570434C0' +
'108140576710C41471310241B02643572310743605418808007FD' +
'21749');
x1:= 649; y1:= 83;
x2:= x1; y2:= y1;
Repeat
If(findbitmapspiraltolerance(PlayerMM, x, y, x1, y1, x2, y2, 0))then begin
c:= c + 1;
end;
x1:= x1 - 6; x2:= x2 + 6;
y1:= y1 - 6; y2:= y2 + 6;
until(x1<570)Or(y1<5)
c:= c / 2;
Writeln('There are ' + inttostr(c) + ' players in this area')
Result:= true; PlayersA:= c;
end;