I haven't attempted to try out the script but by reading the problems you have described and by looking through the code, it appears that you do not have any waits built into the script. By this, I mean that if you happen to successfully begin to search for the wine (which you appear to do), but you do not specify a specific area for you to check apart from the entire Mainscreen, your mouse will find every color that looks like that and hover over it to see if it matches. This can be solved in a couple of ways.
First, I would recommend you limit the location for which you are looking for the wine and not wanting to look for anything else other than that. This can be done by either selecting a unique colour to the wine (like the grey), or by using the red. But if you are jumping outside of that and hovering over other objects, you can fix this by using a TBox.
TBox can be created and used as such:
Simba Code:
procedure createBox(x1, y1, x2, y2 : Integer);
var
T: TBox;
begin
T := [x1, y1, x2, y2];
end;
Using a TBox to attempt to find this would mean that you cannot afford to move the screen, or you'll never end up finding the wine. So keep that in mind.
As well, it appears you have missed two major parts in writing the script. Telekinetic Grab is not autocastable, which means that you are attempting to find the object without actually selecting the cast. You can do this on your own using DTM's or by using a TBox on the inventory and search for the purple of the hand and select it there.
With that, you appear to have the idea incorrect on how the TMSObject.create works. You initialize it as:
Simba Code:
Wine_Of_Zamorak.create('Cast', ['Wine_Of', 'Of', 'Wine', 'ine Of'], [createCol(3489149, 0, 0, 815, 736, 32)], 50, 0, 0, 0);
This is a little incorrect. The first location where you have put 'Cast' is the name of the object that you are creating.
The second location is the uptext of the object. In this case, you will want something like: ['ine of', 'f zam']
Third, make sure that the Mincount, height, width, and size Tolerance are something correct to what we need to locate the wine of zammy. Otherwise, it can get filtered out.
This means, I would try something like this:
Simba Code:
Wine_Of_Zamorak.create('Wine', ['ine of', 'f zam'], [createCol(3489149, 0, 0, 815, 736, 32)], 50, 0, 0, 0); //Check the last 4 values and make them unique to the wine
There are lots of more efficient ways of doing these things, but for a beginner, I would recommend these for now.