Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Simple_eater_and_prayer;
- {$i srl/srl.simba}
- const
- USERNAME = '';
- PASSWORD = '';
- var
- Brewcount: integer;
- function IsLoggedIn(): Boolean;
- var
- x, y: Integer;
- begin
- result := findcolortolerance(x, y, 6256642, 696, 136, 713, 150, 5);
- end;
- procedure LoggingIn();
- var
- count, x, y: Integer;
- begin
- Wait(200);
- MoveMouse(376, 188);
- WriteLn('entering username');
- Wait(200);
- ClickMouse(x, y, MOUSE_LEFT);
- count := 0;
- repeat
- Inc(count);
- PressKey(VK_Back);
- until (count > 25);
- Wait(250);
- SendKeys(USERNAME, 0, 0);
- Wait(1000);
- WriteLn('entering password');
- MoveMouse(376, 233);
- Wait(200);
- ClickMouse(x, y, MOUSE_LEFT);
- Wait(200);
- count := 0;
- repeat
- PressKey(VK_Back);
- Inc(count);
- until (count > 25);
- SendKeys(PASSWORD, 50, 25);
- WriteLn('logging in');
- Wait(1000);
- MoveMouse(377, 271);
- Wait(1000);
- ClickMouse(x, y, MOUSE_LEFT);
- Wait(8000);
- WriteLn('logged in! (?)')
- end;
- function Lowish_HP(): Boolean;
- var
- x, y, i: Integer;
- colours: TIntegerArray;
- begin
- colours := [1912114]
- for i := 0 to High(colours) do
- begin
- if FindColorTolerance(x, y, colours[i], 706, 22, 709, 22, 20) then
- begin
- WriteLn('Health Point is low');
- Result := True
- end else
- // WriteLn('Health point not low');
- end;
- end;
- function Lowish_Prayer: Boolean;
- var
- x, y, i: Integer;
- colours1: TIntegerArray;
- begin
- colours1 := [1779756]
- for i := 0 to High(colours1) do
- begin
- if FindColorTolerance(x, y, colours1[i], 716, 63, 718, 63, 20) then
- begin
- WriteLn('Prayer Point is low');
- Result := True
- end else
- // WriteLn('Prayer point not low');
- end;
- end;
- function Restore: Boolean;
- var
- x, y, i: Integer;
- potDTMs: TIntegerarray;
- begin
- potDTMs := [
- DTMFromString('mbQAAAHicY2VgYNjPhMDHgHgnEC9iZGCYC8TTGSHsZUC8RieaYb1uDMM2vUSGUFFdhuVaEQySQP3omBELBgMAqUMM4Q=='),
- DTMFromString('mggAAAHicY2NgYJjAxMAwFYjnAvFMKHsaEC9ghOCFQDwHiKdA6SVa4WAcKqrL0KHkzlBeUckwVyOYQRJoFjbMiANDAAC3tw46'),
- DTMFromString('mggAAAHicY2NgYMhlYmDIBOJCIM4B4gwgTgfiuYwMDAuheDoQzwPiJUC8oKCVYYlWOEOmlDlDWVk5w9GmOWC+JNAsbJgRB4YAAK3KDs4='),
- DTMFromString('mggAAAHicY2NgYDjAxMBwBIhPQvE5KP85IwPDHSC+DcQPgPgJFO+pnspQUFDEEB4RwxARGcsQ4RzIML+sg0ESaBY2zIgDQwAAMiMSYw==')
- ];
- for i := 0 to High(potDTMs) do
- if FindDTM(potDTMs[i], x, y, 548, 206, 737, 467) then
- begin
- WriteLn('Drinking ' + toStr(i + 1) + ' dose restore');
- MMouse(x, y, 2, 2);
- clickmouse(x, y, mouse_left);
- Wait(1250);
- Result := True;
- exit;
- end else
- WriteLn('Can''t drink Restore');
- for i := 0 to high(potDTMs) do
- FreeDTM(potDTMs[i]);
- end;
- {procedure heal; //with sharks
- begin
- shark:= DTMFromString('mbQAAAHicY2VgYMhmYmBIAuI0IC4E4jIgLmJkYKgC4lwgzgHiSiAOsFRlmFYSyVAR68EQ6WLC0J4RwKAM1I+OGbFgMAAAvbgKXw==');
- if FindDTM(shark, x, y, 535, 205, 737, 466) then
- begin
- Wait (25 + random(25));
- Writeln('Eating Shark');
- MMouse(x, y, 1, 1);
- begin
- Mouse(x, y, 1, 1, true);
- end
- end else
- //ToBank;
- //Bank;
- end; }
- function Brew: Boolean;
- var
- x, y, i: Integer;
- potDTMs: TIntegerArray;
- begin
- if (not Lowish_HP()) then
- exit;
- //else
- potDTMs := [
- DTMFromString('mggAAAHicY2NgYJjGxMAwFYhnA3E/EM8E4klA/BYo9wSIPwDxZyB+CcTvgPjwQVOG40cCGebP0wTyGBlmzdRgOHrEg0ESyMOGGXFgCAAA4SsR4g=='),
- DTMFromString('mbQAAAHicY2VgYMhiguACIM4F4jQgrmNkYCgB4nogrgDiWiA+ctiJoba2jmHjel2GwweNwHxJoH50zIgFgwEAb8YNYQ=='),
- DTMFromString('mWAAAAHicY2FgYMhlYmBIZ4LQ2UCsw8jAoAfEhkBsBsQFBUUM5eUVDEVFxQwP7k9jkATqQcaMaBgEANvdCUo='),
- DTMFromString('mggAAAHicY2NgYHBkgmB3ILYEYhcgdgLiGkYGhkIgroXiEiBuBOIjh+wZamvrGObP02TYuF6XIS0tk+HIYScGSaBZ2DAjDgwBAEgfDkc=')
- ];
- for i := 0 to High(potDTMs) do
- if FindDTM(potDTMs[i], x, y, 548, 206, 737, 467) then
- begin
- WriteLn('Drinking ' + toStr(i + 1) + ' dose Brew ');
- MMouse(x, y, 2, 2);
- clickmouse(x, y, mouse_left);
- Wait(1250);
- Result := True;
- if (i >= 2) then
- begin
- writeln ('Drank 3 or more brews so restoring');
- restore;
- break;
- end;
- end else
- WriteLn('Can''t drink brew');
- for i := 0 to high(potDTMs) do
- FreeDTM(potDTMs[i]);
- end;
- begin
- setupsrl;
- mouseresetclientarea;
- imageresetclientarea;
- repeat
- // if not IsLoggedIn() then
- // begin
- // LoggingIn();
- // Wait(500 + random(200));
- // Compass_Reset;
- // end;
- if Lowish_HP() then
- Brew();
- if Lowish_Prayer() then
- Restore();
- until false;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement