Log in

View Full Version : Need help with my first script (Its a wine maker)



Johura
01-28-2007, 08:25 AM
{Name : Wine Maker}
{Author : JAHURO}
{Description : Makes and drinks wine in cook's guild}
{Version : 0.3}
{Date : 28/1/2007}
{Contact : Jahuro24@hotmail.com}

{Special thanks to : Pentti (Helping me with this script)

{VBright}
{Highest angle of view}
{Start inside the cooks guild, in front of the door}
{Nothing in inventory}
{Make the client face north}
{Remember you need the chefs hat to enter}

program Winemaker;
begin
Const
stairs=4669512;
secondstairs=2246496;
jug=8290184;
grapes=7213714;
sink=6770760;

Writeln('{~~~~~~~~~~~~~~~~~~~~~~~~}');
Writeln('{~~Wine Maker By Jahuro~~}');
Writeln('{~~~~~~~~~~~~~~~~~~~~~~~~}');

wait(5000);

Procedure clickstairs;
Begin
Findcolor(x,y,stairs,0,0,500,400)
MouseC(x,y,1)
wait(3000);
end;

Procedure clicksecondstairs;
Begin
Findcolor(x,y,secondstairs,0,0,500,400)
MouseC(x,y,1)
wait(3000);
end;

Procedure getgrapes;
Begin
Findcolor(x,y,grapes,0,0,500,400)
MouseC(x,y,1)
wait(1000);
end;

Procedure getjug;
Begin
Findcolor(x,y,jug,0,0,500,400)
MouseC(x,y,1)
wait(1000);
end;

Procedure clicksecondstairs;
Begin
Findcolor(x,y,secondstairs,0,0,500,400)
MouseC(x,y,1)
wait(3000);
end;

/Procedure clickstairs;
Begin
Findcolor(x,y,stairs,0,0,500,400)
MouseC(x,y,1)
wait(3000);
end;

// Fill Jug
wait(2000);
// Use Jug with Grapes
wait(1000);
// Drop all

end.
end.

Johura
01-28-2007, 08:28 AM
Btw, I forgot to say thanks.

Pentti
01-28-2007, 08:37 AM
Well first at all in function FindColor(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean; you have put your x and y coordinates right and color right, but these xs, ys, xe, ye... these are like coordinates of box where it finds the color, xs and xy is top left coordinates and xe and ye is bottom right coordinates, it will find color in box you set.

-------------------------------------------------|
| |
| |
|xs,xy.---------------- |
| | Fins color | |
| | in this | |
| | area | |
| | | |
| ----------------.xe,ye |
| |
| |
| |
|-------------------------------------------------|

Johura
01-28-2007, 08:51 AM
Sorry i dont understand. Can you please fix it for me ??

Pentti
01-28-2007, 08:54 AM
If you are finding these colors in runescapes MainScreen then you put there MainScreen edge coords, something like this:
FindColor(x,y,color,0,0,500,400)

Johura
01-28-2007, 08:59 AM
Ok thanks. Now would you be able to help me with the adding grapes to the jug?

Boreas
01-28-2007, 04:24 PM
Use SRL or you will get banned.

I recommend you try non RS scripts first to get comfortable with the commands. See my FAQ (link in sig)

For clicking items in inventory, you can use DTMs, and commands in inventory.scar. I'll prolly write a tut on inventory by the time you're ready for RS scripts.

Johura
01-29-2007, 05:33 AM
Thanks :). Im might try to script for neopets first lol.

ronny.m.p
02-04-2007, 12:59 PM
lolz thats what i was doing when i was learning to script...