ownedlikenoob
2010-02-15 13:15:58
first off, This script is for the private server CrisesX. All the script does is finds the plank, clicks it then waits till the game is over and you get 2 points. It's pretty simple.
Here is the problem I am getting… As you see here:
I'm basically telling it to just press the "L" key and delete it and repeat (So I don't log out)
BUT! I am also telling it that if it does Disconnect (and find login screen) then to break from tht loop it is in and exit to the full loop. It is a loop inside of a loop. I have tried using variables, using Exit; and Break; and they don't work. It just keeps pressing l and deleting it until it is out of Pest control. (It even repeats it on the Login screen.)
Here is the whole script:
Yes I know my standards suck but this is for my personal use only so I don't really care about standards as of now.
EDIT: Found the error, Look in my main loop, Check is not under repeat. It only checks for the login screen at the beginning of the script and that's it. So basically it will only log you in once. All I needed to do was move Check; under repeat.
Pretty noob mistake :) But Hey, I wrote this at 3am so There's bound to be mistakes.
Here is the problem I am getting… As you see here:
Begin
repeat
KeyDown(76);
Keyup(76);
wait(1000);
KeyDown(8);
wait(2000);
KeyUp(8)
until(findColor(x,y,Login,0,0,600,600));
end;
I'm basically telling it to just press the "L" key and delete it and repeat (So I don't log out)
BUT! I am also telling it that if it does Disconnect (and find login screen) then to break from tht loop it is in and exit to the full loop. It is a loop inside of a loop. I have tried using variables, using Exit; and Break; and they don't work. It just keeps pressing l and deleting it until it is out of Pest control. (It even repeats it on the Login screen.)
Here is the whole script:
program CrisesXPC;
{.include srl/srl.scar}
Const
Board = 6195110;
Login = 2564863;
var
x,y,i : integer;
Procedure Check;
Begin
If (FindColor(x,y,Login,0,0,515, 338)) then
begin
WriteLn('Not Logged in, Logging in');
Mouse(375, 257,0,0,true);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
Wait(500);
Typesend(''); //username
Wait(1000);
Mouse(376, 269,0,0,true);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
KeyUp(8);
KeyDown(8);
Wait(1000);
TypeSend('') //Pass here
Mouse(625, 215,0,0,true); //Login Button
Wait(5000);
end
else
end;
Procedure InPc;
Begin
repeat
KeyDown(76);
Keyup(76);
wait(1000);
KeyDown(8);
wait(2000);
KeyUp(8)
until(findColor(x,y,login,0,0,600,600));
end;
begin
SetupSRL;
i:= -2
Mouse(199, -35,0,0,True);
Wait(200);
Mouse(685, 482,0,0,true);
Wait(200);
Mouse(721, 260,0,0,True);
Check;
WriteLn('Logged in, Looking for boat');
Repeat
SymbolAccuracy := 0.5;
if (FindSymbol(x, y, 'magic shop')) then
begin
i := i + 2;
Writeln('Congrats you have ganed ' +IntToStr(i)+ ' points!');
If (FindColor(x,y,Board,0,0,515, 338)) then
Mouse(x,y,0,0,True);
WriteLn('Should be in boat')
Mouse(578, 182,0,0,True);
Mouse(589, 257,0,0,True);
Wait(30000);
Mouse(642, 187,0,0,true);
SymbolAccuracy := 0.8;
end else
InPc;
Until(False);
end.
Yes I know my standards suck but this is for my personal use only so I don't really care about standards as of now.
EDIT: Found the error, Look in my main loop, Check is not under repeat. It only checks for the login screen at the beginning of the script and that's it. So basically it will only log you in once. All I needed to do was move Check; under repeat.
Pretty noob mistake :) But Hey, I wrote this at 3am so There's bound to be mistakes.
SetupSRL;
i:= -2
Mouse(199, -35,0,0,True);
Wait(200);
Mouse(685, 482,0,0,true);
Wait(200);
Mouse(721, 260,0,0,True);
Check;
WriteLn('Logged in, Looking for boat');
Repeat
SymbolAccuracy := 0.5;
if (FindSymbol(x, y, 'magic shop')) then
begin
i := i + 2;
Writeln('Congrats you have ganed ' +IntToStr(i)+ ' points!');
If (FindColor(x,y,Board,0,0,515, 338)) then
Mouse(x,y,0,0,True);
WriteLn('Should be in boat')
Mouse(578, 182,0,0,True);
Mouse(589, 257,0,0,True);
Wait(30000);
Mouse(642, 187,0,0,true);
SymbolAccuracy := 0.8;
end else
InPc;
Until(False);
end.