
Originally Posted by
purerange86
It's functional but there's gotta be a better way to do this. Anyone able to show me how?
Ok so firstly you don't need a begin and end if only one statement follows the 'then'
Simba Code:
if isUpText('hello') then
writeLn('hi');
Simba Code:
if isUpText('hello') then
begin
writeLn('hi');
writeLn('hey');
end;
Simba Code:
procedure drinkpray;
begin
if finddtm(pray1,x,y,mix1,miy1,mix2,miy2) then
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true)
else
if finddtm(pray2,x,y,mix1,miy1,mix2,miy2) then
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true)
else
if finddtm(pray3,x,y,mix1,miy1,mix2,miy2) then
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true)
else
if finddtm(pray4,x,y,mix1,miy1,mix2,miy2) then
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true)
else
if findcolortolerance(10933076,x,y,744,488,904,738,3) then
begin
mmouse(x,y,1,1);
wait(133+random(222));
if isuptext('rink') then
clickmouse2(mouse_left);
end else
writeln('no more pray');
end;
E:
I guess if you didn't want a particular order you could just use or:
Simba Code:
procedure drinkpray;
begin
if finddtm(pray1,x,y,mix1,miy1,mix2,miy2) or
finddtm(pray2,x,y,mix1,miy1,mix2,miy2) or
finddtm(pray3,x,y,mix1,miy1,mix2,miy2) or
finddtm(pray4,x,y,mix1,miy1,mix2,miy2) then
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true)
else
if findcolortolerance(10933076,x,y,744,488,904,738,3) then
begin
mmouse(x,y,1,1);
wait(133+random(222));
if isuptext('rink') then
clickmouse2(mouse_left);
end else
writeln('no more pray');
end;