SRL Archive - Outdated / Broken

[ProjectRS06] Universal Pickpocketer


Toby1

2013-01-26 13:02:21


program PRS06_PickPocketer;
var
pickpocket,
X, Y: Integer;

procedure ClickColor;
begin
if (FindColor(X, Y, COLOR_OF_NPC_HERE, 0, 0, 760, 500)) then
begin
Status('Looking for color...');
MoveMouse(X, Y);
GetMousePos(X, Y);
Wait(300 + Random(50));
ClickMouse(X, Y, mouse_right);
end;
end;

procedure Steal;
begin
pickpocket := BitmapFromString(71, 14, 'meJzdk0EOwCAIBP2dH+i1/3+GvR' + 'nCugWlJFrDAYmuDEK97vpHa2ItXMxLKa5QSpmV6heToJzKw7SlwhT' + 'XVlDqMEI5AY+A6k4/IH0cPda3bEj98SllM4gU6pW+2EW5ZQp5yip5' + 'FXxpS6zGUG3BjyubDex/usG/fwWFysibAcWaIQ7ladQI1Ps4ywFk9' + 'TSH11RGcfxEmb+aJhbHKqHP6skU/Mp4cpgbUsSN/fvRtgPUA8ABJPo=');
if (FindBitmap(pickpocket, X, Y)) then
begin
Status('Stealing..');
MoveMouse(X, Y);
GetMousePos(X, Y);
ClickMouse(X, Y, mouse_left);
end;
FreeBitmap(pickpocket);
end;

begin
ActivateClient;
ClearDebug;
repeat
ClickColor;
Wait(300);
Steal;
until(isKeyDown(113));
end.

Change
COLOR_OF_NPC_HERE

to the color of the npc you want to steal from.
The script will look for color and right click, and look for the word "pickpocket"

it will work with any NPC that has the "pickpocket" option, farmers, master farmers, heros, paladins, guards, knights, men etc.

rj

2013-01-26 13:35:41

Good job

Joebots

2013-01-26 14:33:55

Need help with changing the color, I tried black and brown on level 2 mans and nothing works.

rj

2013-01-26 14:36:47

use a unique color

Dormik

2013-01-26 14:58:25

Is it possible to use a bitmap? But I dont think its better to detect, is it?
*to find the NPC btw

Toby1

2013-01-26 15:15:24

From: Joebots
Need help with changing the color, I tried black and brown on level 2 mans and nothing works.


Did you put replace it with COLOR_OF_NPC_HERE ? and did you then run the script? did the debug say anything? does it right click anything?

@Dormik not sure what you mean, sorry

Lemonade

2013-01-26 16:58:39

I think joebots just wrote black,brown there he doesnt know that u must a color picker

Pew

2013-01-27 02:11:21

Nice Script man.

You planning to add an eating function?

ffsok

2013-01-27 03:00:11

Can someone give a quick run through of how to use findcolor?

Toby1

2013-01-27 05:52:21

From: Pew
Nice Script man.

You planning to add an eating function?


I have added a script that eats shrimps, but its not at all reliable, but I may release it.

@ffsok

function FindColor(var x, y: Integer; col, x1, y1, x2, y2: Integer): Boolean;

here are some more procedures/functions to find colors :) :
http://docs.villavu.com/simba/scriptref/colourfinding.html

Joebots

2013-01-27 13:07:22

I use "pick color" and then try starting it but nothing happens.

Synyster

2013-01-27 13:51:41

Good script. Just 3 things that I think are a must.

Slow down a bit, spams way too fast.
Add an option to steal from stalls.
After running for about 10 minutes, it logs out. Possibly a function that rotates your camera every so often?

Other than that, it's flawless.

Lemonade

2013-01-28 00:11:36

To slow down the mouse change 300 to 800 (its on the two lines wait)

apalapa

2013-01-28 03:49:17

I added to it a bit, it rotates the camera if it can't find the color (makes it continue for longer), it has an auto login that repeats until it can login (for if the server crashes overnight or you dc), and it randomizes the clicking a little more :p

Toby1

2013-01-30 18:39:21

From: Synyster
Good script. Just 3 things that I think are a must.

Slow down a bit, spams way too fast.
Add an option to steal from stalls.
After running for about 10 minutes, it logs out. Possibly a function that rotates your camera every so often?

Other than that, it's flawless.


Thanks! yea I have a login/logout procedure but it is part of my ProjectRS06 include and I didn't think I should take it out and place it just in the script. I might post my include so far here at SRL-forums though :). it has some functions and procedures for PRS06 :p.

@apalapa goodjob! :D

Corbyz

2013-02-07 14:55:10

Can you explain how to put the color in? i have the color of the npc but idk if it is suppose to be Hex? or RGB or what please explain.

Gh0stt

2013-02-09 23:21:09

From: Corbyz
Can you explain how to put the color in? i have the color of the npc but idk if it is suppose to be Hex? or RGB or what please explain.


Simply click the little eye dropper icon on Simba (left of the target), then click/get the colour that you want and then little window should then come up. The window that comes up should have a highlighted number.

That is the number you should use. :)


________________________________________________________________________________________________________________________________
Awesome script! I hope one day Ill be able to make one like that!

I edited your code a lil with my extremely limited knowlage to make it look a little more human like: :p


program PRS06_PickPocketer;
{$i srl/srl.simba} // added this for mmouse
var
pickpocket,
X, Y: Integer;

procedure ClickColor;
begin
if (FindColor(X, Y, COLOUR GOES HERE, 0, 0, 760, 500)) then
begin
MouseSpeed:= 15
Status('Looking for color...');
mmouse(X, Y, 1, 1); // replaced from below
// MoveMouse(X, Y);
GetMousePos(X, Y);
Wait(749 + Random(1025));
ClickMouse(X, Y, mouse_right);
end;
end;

procedure Steal;
begin
pickpocket := BitmapFromString(71, 14, 'meJzdk0EOwCAIBP2dH+i1/3+GvR' + 'nCugWlJFrDAYmuDEK97vpHa2ItXMxLKa5QSpmV6heToJzKw7SlwhT' + 'XVlDqMEI5AY+A6k4/IH0cPda3bEj98SllM4gU6pW+2EW5ZQp5yip5' + 'FXxpS6zGUG3BjyubDex/usG/fwWFysibAcWaIQ7ladQI1Ps4ywFk9' + 'TSH11RGcfxEmb+aJhbHKqHP6skU/Mp4cpgbUsSN/fvRtgPUA8ABJPo=');
if (FindBitmap(pickpocket, X, Y)) then
begin
Status('Stealing..');
mmouse(X, Y, 1, 1); //replaced the below
// MoveMouse(X, Y);
GetMousePos(X, Y);
ClickMouse(X, Y, mouse_left);

end;
FreeBitmap(pickpocket);
end;

begin
ActivateClient;
ClearDebug;
repeat
ClickColor;
Wait(489);
Steal;
until(isKeyDown(113));
end.

polo

2013-02-10 12:15:29

Good working script, thanks for sharing.

voltag00

2013-02-10 13:07:43

No eating function? Can't run it that long then

voltag00

2013-02-10 13:30:19

Also it gets caught on lagg about ever 5-10 minutes. (where it only has the option to walk here, so it just sits there)

deividuskis

2013-02-10 14:50:34

Woudnt be just easer to tell us the colours of the farmers men and master farmer?

Gh0stt

2013-02-10 19:08:57

From: deividuskis
Woudnt be just easer to tell us the colours of the farmers men and master farmer?


Lol.. Use the eye dropper icon on Simba and it takes you about 5 seconds to get the colour and paste it into the right place…