Sorry about my first reply, I misread your question. 
What you seem to be doing is implying the whole program runs top-down, but you need to create functions and call them in your main loop instead.
Your last end (in your main loop) should be "end.", not "end;".
I also suggest you use "Wait(RandomRange(high, low))" for your waits, so they are not static (and detectable).
Also, try adding constants to your code (the colors for example) to make it a bit easier to edit (like when that area gets a color update) and more readable.
Your fixed script would look something like:
Code:
program silkrunning;
const
SilkColor1 = 12345678;
SilkColor2 = 87654321;
var
AGlobalInt: Integer;
function FindAndThieve(): Boolean;
var
x, y :Integer;
begin
//This moves and left licks
wait(1400); //1000ms = 1s
Writeln('Finding the silk..')
repeat
//Find the silk stall(next to silver stall)
if findcolor(x, y, 1643026,251,151, MS) then
MMouse(x, y, 4, 4, True)
else
begin
Writeln('Finding the silk again..')
//Find the silk stall(next to silver stall)
if findcolor(x, y, 2237264,251,151, MS) then
MMouse(x, y, 4, 4, True)
else
begin
Writeln('Finding the silk again..')
//Find the silk stall(next to silver stall)
if findcolor(x, y, 2237264,251,151, MS) then
MMouse(x, y, 4, 4, True)
else
begin
writeln('Cant find the silk, logging you out');
Logout; //Logs you out
end;
end;
end;
until (p07_InvFull); // Not the real function name I think
if(p07_InvFull) then
findcolor(x, y, 3290937, 308, 174, DB);
end;
// Main loop, change this to what your
begin
while (True) do
begin
FindAndThieve();
Wait(RandomRange(100, 120));
end;
end.
There are probably syntax errors, my if/then/else's may not by formatted correctly, etc.
But you get the idea.