Scripting is way to hard for me, I try'd and yes i know i give up fast but i can' do anything about it,
Please let this topic to rest now.
Scripting is way to hard for me, I try'd and yes i know i give up fast but i can' do anything about it,
Please let this topic to rest now.
It's actually pretty easy, you just have to take it slowly. I thought I couldn't do it but, I took the time to read the tuts, and then I eventually got it. Don't give up![]()
~Penguin
Semi-active
http://i44.tinypic.com/33vk9aq.jpg
SELL AUTOED GOODS AT MID-MAX! DON'T LET PRICES FALL AND GIVE US LESS PROFIT. (Put this in your sig)
Ok I just want to point out something.
When declaring something such as x and y for a procedure like you have.
ex.
SCAR Code:procedure mine;
var x,y:integer;
begin
blah
blah
end;
^ that means x and y is declared for that procedure only and will only work for that procedure unless you take the time to declare it for every procedure.
If you want x,y declared to be used in the whole script, do this.
SCAR Code:Program Gold_Digga_0_1;
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Skill\Mining.Scar}
var
x, y: Integer;
procedure yourprocedure;
begin
{what your procedure does;}
end;
^ that declares it at the beginning. So it will be declared the whole script.
Yay for advise!!!
I do visit every 2-6 months
Ah, but Zasz, there is one problem to that!
If you declare it at the top of the script, then it will be the same throughout the script. If you declare it for each procedure, it will only be declared for that procedure.
Example:
SCAR Code:procedure mine1;
var
x,y:integer;
begin
X := 50;
Y := 50;
Movemouse(x, y);
end;
procedure mine2;
var
x,y:integer;
begin
X := 100;
Y := 100;
Movemouse(x, y);
end;
Begin
Mine1;
Wait(2500);
Mine2;
End.
That is if it's for two different procedures.
SCAR Code:Var
X, Y : Integer;
procedure mine1;
begin
X := 50;
Y := 50;
Movemouse(x, y);
end;
procedure mine2;
var
x,y:integer;
begin
Movemouse(x, y);
end;
Begin
Mine1;
Wait(2500);
Mine2;
End.
That's for one. Notice the problem? You could end up with wonky coordinates in a needed procedure.
~Sandstorm
ummm no?
SCAR Code:Var
X, Y : Integer;
procedure mine1;
begin
X := 50;
Y := 50;
Movemouse(x, y);
end;
procedure mine2;
begin
X := 100;
Y := 100;
Movemouse(x, y);
end;
Begin
Mine1;
Wait(2500);
Mine2;
End.
I do visit every 2-6 months
Yes, that's true. But what happens if you're relying on it to find a color, and it doesn't find the color? It will use the coordinates previously stored in the variable.
~Sandstorm
um i always make it a point to use a different variable to store colors... x,y should be used for default mouse...
Like if(findcolorspiral(x,y,blah,blah)then begin mouse(x,y,6,6,true); end;
x,y should only store for direct uses like above.
I do visit every 2-6 months
That's exactly what I mean. If it's a global variable, then x and y will be the number found in the FindColorSpiral, unless another procedure changes it.
~Sandstorm
There are currently 1 users browsing this thread. (0 members and 1 guests)