SRL Archive - First Scripts

Lletya Flax Picker


Grihmm

2011-12-31 04:33:53

Note: Not yet working. If you try to leech and then complain that it doesn't work I will ignore you.


Notes:
-You must start in the square in front of the left most banker in Lletya.

-You must have done some of Regicide to get to Lletya.


4/20/2012 I updated this. Currently, it will walk from the bank to next to the flax, and then back after a few seconds. That's all I've gotten done tonight. I'm trying to wrap my head around FindColorsSpiralTolerance and TPAs, and then I will finish it.

program new;

//{$DEFINE SMART}
{.include SRL\SRL.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
{$i SRL/SRL\Misc\Debug.simba}
{$i sps/sps.simba}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;

procedure AntiRandoms;
begin
FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
LampSkill := 'prayer'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the prayer skill

LevelUp;
end;

procedure WalkToBank;

var cx,cy:Integer;

begin
WriteLn('Starting WalkToBank');
WriteLn('Trying to find way to bank');
if ObjDTM_Find('65:49:4:10:7:67:30:10:7:75:30:1:7:86:62:1:7:30:75', cx,cy, True) then
begin
WriteLn('Found way to bank');
end else
WriteLn('Couldnt find way to bank');
if ObjDTM_Walk('65:49:4:10:7:67:30:10:7:75:30:1:7:86:62:1:7:30:75', 2, 3000, 5, True) then
begin
WriteLn('Wooooooot we made it back to the bank!');
end else
WriteLn('Son of a..we didnt make it back to the bank..');
WriteLn('WalkToBank is ending now');
end;
procedure WalkToFlax;

var cx,cy:Integer;

begin
WriteLn('Starting WalkToFlax');
WriteLn('Trying to find way to flax');
if ObjDTM_Find('95:108:3:1:7:102:93:1:7:48:106:1:7:106:120',cx,cy, True) then
begin
WriteLn('Found way to flax');
end else
WriteLn('Couldnt find way to flax');
if ObjDTM_Walk('95:108:3:1:7:102:93:1:7:48:106:1:7:106:120', 2, 3000, 5, True) then
begin
WriteLn('Woooot we made it to flax');
end else
WriteLn('We didnt make it to flax');
WriteLn('WalkToFlax is ending now');
end;

procedure MainLoop;
begin
SetAngle(SRL_ANGLE_HIGH);
WalkToFlax;
Wait(2000);
WalkToBank;
end;

procedure PickFlax(x,y,xs,ys,color,xe,ye:Integer);

var
TPA:TPointArray;
I:Integer;

begin
FindColorsSpiralTolerance(x,y,TPA,color,xs,ys,xe,ye,0);
end;


//The real deal is below.

begin
// These 4 lines HAVE to be set BEFORE you call SetupSRL;
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

ClearDebug;
SetupSRL;
ObjDTM_Setup;
DeclarePlayers;
LoginPlayer;


MainLoop;
end.

Grihmm

2012-01-01 01:47:07

Bump

Justin

2012-01-01 03:22:32

Change
FindObjCustom(x, y, ['pick', 'flax'], [15591530, 1326867, 1525270], 3;
to
FindObjCustom(x, y, ['pick' 'flax'], [15591530, 1326867, 1525270], 3);

Grihmm

2012-01-01 08:46:55

Ohhh. Thank you. :)

Grihmm

2012-01-03 02:21:30

Could this please be moved to the new Testing Scripts section? Thank you.

unknownrpg

2012-04-19 00:25:58

wow i actually put in a request for this script gunna test it out cool stuff bub

unknownrpg

2012-04-19 00:58:30

well i gave it a try, i know its not finished or workin yet or whatnot but edited script little bit so it would compile, and once id get it rollin it would sit at (current player;), just a heads up lemme know if u get it up n rolling n need a tester

Grihmm

2012-04-19 01:23:48

This is kinda old. I haven't worked on it in a while. I suppose I could in a day or two. I'm kind of busy with work right now.

Grihmm

2012-04-21 02:17:45

I updated my script, still not fully functioning, but I got the walking running. If someone could run it for 2 minutes to make sure it works for people other than me that would be cool. :) Also, feedback.