SRL Archive - Test corner

HomePortLoc->LumbyBank


shaunthasheep

2007-04-28 20:01:59

Center of Lumbycastle to lumby bank
(my second walking procedure today)

this uses findobj, and some mouse clicks on map.
if you want to use this please ask me.

I need testers to test this out(how it works on other computers)
if you see a possible bug or encounter one please tell me what part you were on
etc. may walk out of castle and get lost, tell me what part this happend at etc. walking 2 second door

and ill probally make the GoToBank part rely on Banker Dot on MM.

(this uses TreePixel to go infront of the lumby door. this is so if someone was to put this in a script it can start anywhere in the lumby general location, but still ask me if you want to use this first in your script)

Pick This Pixel:



script

program CenterToBank;
{.include SRL/SRL.scar}

const TreePixel = 1195050;

var
MyMark, OX, OY : integer;

begin
SetupSRL;
ActivateClient;

MakeCompass('W');
if RadialWalk(TreePixel, 340, 381, 70, 2, 0) then //Bush Color Pixel!
begin
HighestAngle;
repeat
MarkTime(MyMark);
if FindObj(OX, OY, 'Large', 2056574, 20) then
begin
if IsUpTextMulti('Op', 'pe', 'en') then
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('Open', 1);
Break;
end else
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('Walk', 1);
Break;
end;
Wait(50);
end;
if TimeFromMark(MyMark) > 110000 then
begin
Writeln('Lost!');
Logout;
end;
until(TimeFromMark(MyMark) > 120000)

Flag;
Wait(1000 + random(1000));

MouseFlag(MMCX + 18 + random(5), MMCY - 5, 0, 0);
MakeCompass('E');
HighestAngle;

repeat
MarkTime(MyMark);
if FindObj(OX, OY, 'Door', 6916264, 20) then
begin
if IsUpTextMulti('Op', 'pe', 'en') then
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('Open', 1);
Break;
end else
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('Walk', 1);
Break;
end;
end;
if TimeFromMark(MyMark) > 110000 then
begin
Writeln('Lost!');
Logout;
end;
Wait(50);
until(TimeFromMark(MyMark) > 120000)

Flag;
Wait(1000 + random(1000));
MakeCompass('W');
MouseFlag(MMCX + 2, MMCY - 34, 0, 0);

repeat
MarkTime(MyMark);
if FindObj(OX, OY, 'Stair', 602956, 20) then
begin
if IsUpTextMulti('Cli', 'mb', 'up') then
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('Climb', 1);
Break;
end;
end;
if TimeFromMark(MyMark) > 110000 then
begin
Writeln('Lost!');
Logout;
end;
Wait(50);
until(TimeFromMark(MyMark) > 120000)

Wait(10000);

repeat
MarkTime(MyMark);
if FindObj(OX, OY, 'Stair', 602956, 20) then
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('up', 1);
Break;
end;
if TimeFromMark(MyMark) > 110000 then
begin
Writeln('Lost!');
Logout;
end;
Wait(50);
until(TimeFromMark(MyMark) > 120000)

Wait(10000);

if FindSymbol(OX, OY, 'bank') then
begin
MouseFlag(OX, OY, 0, 0);
end else
begin
MouseFlag(MMCX - 47, MMCY, 0, 0);
end;

MakeCompass('N');

repeat
MarkTime(MyMark);
//my getto bank...
//gonna change it so it finds banker...
//for more accurate banking
if FindObj(OX, OY, 'booth', 607067, 20) then
begin
Writeln('Found Bank');
if IsUpTextMulti('ank', 'boo', 'use') then
begin
Mouse(OX, OY, 0, 0, False);
ClickOption('uickly', 1);
Break;
end;
end;
if TimeFromMark(MyMark) > 110000 then
begin
Writeln('Lost!');
Logout;
end;
until((TimeFromMark(MyMark) > 120000) or (BankScreen))

end else
begin
Writeln('Couldn''t Find Bushes!!');
Logout;
end;
end.

this is like jahuro's script but purely 100% my code

Ruroken

2007-04-29 13:37:30

Nice, will try it out.

RAM

2007-05-08 18:02:59

Sorry, Not much luck with this one, But I wish it was as i can see this will be very useful…..Started it in a few different places around the castle yard, seems to find the door ok, But then it just lagged really bad and froze, I experimented in adding a few waits before finding door and it seemed to help….rotated camera around and clicked inside castle, not sure which set of stairs it was intended to go to, but it went towards both a few different times..I only got it to go up the stairs once, and when it got to the top, it just lagged out again..Again, I experimented with adding waits, but didn't seem to help…I redownloaded it again, just to make sure I had the original version, but it would just go to the door and click inside of it , but stayed to the front…after 45 minutes of messing with it, I gave up, Sorry…If you makes some changes and want me to try again, just let me know, Thanks, Sorry I couldn't be of any more help, RAM

Johura

2007-05-11 09:18:16

I think we might need a new function. Walktoobj colour;:)