SRL Archive - OSR Help

Looking for help/mentor writing a script


codtwolfy

2011-12-17 03:00:53

What I am interested in making is a Thieving script that blackjacks within the Thieving Guild. I do not think this could be all too difficult, but I would love to work with someone a little more experienced so I can learn hands on. This is pretty good experience and could be useful to many people if gotten down.

I have a very base script as of now, but it is VERY unreliable (no failsafes, antiban, antirandom, etc). I plan on adding these aspects after the main functions are done.

So anyone interested please post here! Thanks! :)

E: Below is the script. There is no loop yet, but it should go through the motions once just to test. It seems as though it does not compile, I will check that tomorrow when I have time. Thanks in the meantime.

program New;
{$i SRL\SRL.scar}

var
loots: Integer;

function FindVolunteer: Boolean;
var
x, y: Integer;
begin
if FindObjCustom(x, y, ['alk', 'osh', 'nte'], [2574683, 6975611], 5) then
x := MSCX;
y := MSCY;
begin
Writeln('Found Coshing volunteer!');
GetMousePos(x, y);
Mouse(x, y, 6, 6, False);
WaitOption('ure', 500);
end else
Writeln('Could not find Coshing volunteer.');
end;

function Talk: Boolean;
begin
while InConvo do
ClickToContinue;
end;

function KnockOut: Boolean;
begin
if not InConvo or AreTalking then
FindObjCustom(x, y, ['alk', 'osh', 'nte'], [2574683, 6975611], 0);
Mouse(x, y, 0, 0, False);
ChooseOption('ock');
end;

function PickPocket: Boolean;
begin
for loots := 0 to 2 do
begin
Wait(300);
FindObjCustom(x, y, ['alk', 'osh', 'nte'], [65535], 0);
Mouse(x, y, 0, 0, False);
ChooseOption('oot');
end;
end;

begin
ClearDebug;
SetupSRL;
ActivateClient;
//DeclarPlayers;
SetAngle(True);
//repeat
FindVolunteer;
Talk;
KnockOut;
PickPocket;
//until ();
end.

YoHoJo

2011-12-17 03:13:34

Best thing to do is just post your script in scripting help, ask whatever questions you have, and everyone can break it down and help you out. That way you lots of advise from all kinds of people.

This post itself belongs in scripting help, I'm going to move the thread, and how about you edit the first post and paste your script?