From: litoris
If you just search for something like "ick", it will click the first option or something because that phrase exists in all options. User WaitOption instead(so that you don't have to add a separate wait) and look for "ick P", which should choose the appropriate option. There is a script made for there BTW, you could always check that one to see how its author managed certain things.
I've tried using both WaitOption and ChooseOption, both dont work for pickpocketing option, but i changed to try for another option(not the first one) and it picked that, so it's defently somthing to do with the NPC name has the same string as the option.
I tried looking at flights script but instantly closed it off, far to complex for me, literally couldn't understand what was going on,
This is my first attempt at a script and only know the absolute basics.
Heres the script so far xD :
program Pickpocketer;
{$DEFINE SMART}
{.include SRL\SRL.simba}
const
BreakEvery='180';
BreakFor= '6';
StartPlayer= 0;
NumbOfPlayers=1;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
end;
end;
Function Pickpocket_The_Pickpocketers:Boolean;
var
X, Y: Integer;
begin
if (FindObjCustom(X,Y,['Pickpocketing'],[8304356], 10)) then
begin;
Mouse(X,Y,5,5,false);
WaitOption('ickp',500);
end else
if (FindObjCustom(X,Y,['Pickpocketing'],[6458544], 10)) then
begin;
Mouse(X,Y,5,5,false);
WaitOption('ickp',500);
end else
if (FindObjCustom(X,Y,['Pickpocketing'],[8433383], 10)) then
begin;
Mouse(X,Y,5,5,false);
WaitOption('ickp',500);
end else
if (FindObjCustom(X,Y,['Pickpocketing'],[9234685], 10)) then
begin;
Mouse(X,Y,5,5,false);
WaitOption('ickp',500);
end;
end;
begin
SetupSRL;
DeclarePlayers;
Repeat
Pickpocket_The_Pickpocketers;
until(false)
end.
I know this doesn't classify as a script but im just trying to tackle pickpocketing before i try add in failsafes for when i get stunned etc.