jstemper
2015-04-14 21:59:08
program Simple_eater_and_prayer;
{$i srl/srl.simba}
var
x, y,count : integer;
shark:Integer;
one_dose:Integer;
two_dose:integer;
three_dose:integer;
four_dose:integer;
const //credit goes to hoodz from villavu forums for this
USERNAME = '';//type account username in here
PASSWORD = '';//type account password in here
function IsLoggedIn: boolean;//credit goes to hoodz
begin
if findcolortolerance(x, y, 6256642, 696, 136, 713, 150, 5) then
begin
result := true
end
else
begin
result := false
end;
end;
procedure LoggingIn;//credit goes to hoodz
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;
procedure compass_reset;
begin
movemouse(542, 20);
clickmouse(542, 20, 1);
end;
function Lowish_hp: boolean;
begin
if findcolortolerance(x, y, 255, 724, 26, 742, 38, 5) or
findcolortolerance(x, y, 2070783, 724, 26, 742, 38, 5) or
findcolortolerance(x, y, 65535, 724, 26, 742, 38, 5) then
begin
result := true
end
else
begin
result := false
end;
end;
function Lowish_prayer: boolean;
begin
if findcolortolerance(x, y, 65535, 736, 66, 757, 80, 5) then
begin
result := true
end
else
begin
result := false
end;
end;
procedure eating_sharks;
var
x, y:integer;
begin
if FindDTM(shark, x, y, 548, 206, 734, 459) then
begin
mmouse(x, y, 1, 1);
wait(randomrange(100, 200));
clickmouse2(mouse_Left);
wait(randomrange(150, 250));
end;
end;
procedure restoring_prayer;
var
x, y:integer;
begin
if FindDTM(one_dose, x, y, 548, 206, 734, 459) or
FindDTM(two_dose, x, y, 548, 206, 734, 459) or
FindDTM(three_dose, x, y, 548, 206, 734, 459) or
FindDTM(four_dose, x, y, 548, 206, 734, 459) then
begin
mmouse(x, y, 1, 1);
wait(randomrange(100, 200));
clickmouse2(mouse_Left);
wait(randomrange(150, 250));
end;
end;
procedure free_the_slaves;
begin
FreeDtm(shark);
FreeDtm(one_dose);
FreeDtm(two_dose);
freedtm(three_dose);
freedtm(four_dose);
writeln('freed the slaves')
end;
procedure eating;
Begin
mousespeed := 60
repeat
if (not lowish_hp) then
begin
writeln('you are not low hp')
end;
if (lowish_hp) then
begin
writeln('you are low hp, you are being attacked')
shark:= DTMFromString('mbQAAAHicY2VgYHBkYmCwBWIbIPYEYi8gfgwUfwnE96EYxA5x0GfICHFlqE0LZoj0sGaYUBrPgA0wYsFgAAD8AgsP');
eating_sharks;
end;
until(false)
end;
procedure drinking;
Begin
mousespeed := 60
repeat
if (not lowish_prayer) then
begin
writeln('you are not low prayer')
end;
if (lowish_prayer) then
begin
writeln('you are low prayer, you are very holy')
One_dose:=DTMFromString('mbQAAAHicY2VgYHBgYmBwBGJ3ILYFYlcgfgMUfwzEH4D4PRC/AOLqbUsYUtOyGLT6MhmqtixmcHPzZMAGGLFgMAAAZ38Mxg==');
Two_dose:=DTMFromString('mbQAAAHicY2VgYMhmYmDIBeICIE4D4iwgfgsUfwTE74D4AxC/AGKrA30MwSHhDHqzihgs9/cyVKydx4ANMGLBYAAAt4MNyg==');
Three_dose:=DTMFromString('mWAAAAHicY2FgYJjMxMAwHYinAfEMIH4LFHsExO+B+BUQWx2awBAcEs5gubeHwXR9EwM6YETDIAAAkb4Lgw==');
Four_dose :=DTMFromString('mWAAAAHicY2FgYDjIBMF7gPgQEL8Eij0C4tdA/A6ITdY1MBitqGWwOT4ZzEYHjGgYBADOZwxm');
restoring_prayer;
end;
until(false)
end;
begin
mousespeed := 35
repeat
if (not isloggedin) then
begin
loggingin;
compass_reset;
end;
if (isloggedin) then
begin
eating;
drinking;
end;
free_the_slaves;
until(false)
end.
Alright, everything compiles correctly, but I don't understand why it doesn't do both, "eating;" and "drinking;" at the end of the script. basically it will eat sharks once it sees yellow, orange, or red hp, and sip a prayer pot once it sees yellow pray numbers. But like I said, it will only eat, and only if I delete "eating;" then it will drink. Can anyone help me so it compiles both these commands?