SRL Archive - OSR Outdated / Broken Scripts

[2007 RS] + [first script] Man/Woman Thiever


Word

2013-02-26 19:37:26

As title says, man/woman thiever. Simple anti-leech:

  • Loop not infinite
  • Colour has to be provided by you
  • One other simple error

Not perfect in any way, since getchatboxtext() wasn't working for me, and neither was P07_IsUpTextMultiCustom() (and because I'm learning pascal, obviously). As simple as it gets, so no doors/perfect wait, YET. Will improve it as I learn.

program WordPocket;

{$i srl/srl.simba}
{$i P07Include.simba}
{$i Troll.simba}

var
x, y, XPPH, noTimes, pickPH: Integer; PBox: TBox; xz: Integer; xyz, xzy : Integer; lol : String; woMan: Integer;

Procedure pickPocketing;
begin
PBox := IntToBox(240, 158, 285, 198);
If AveragePixelShift(PBox, 250, 350) < 100 then
If FindColorSpiralTolerance(x, y, [colour of woman/man], P07_MSX1, P07_MSY1, P07_MSX2, P07_MSY2, 7) then
MMouse(x, y, 1, 0);
ClickMouse2(mouse_Right);
wait(randomRange(200, 300));
P07_ChooseOptionMulti(['ickpocket']);
repeat
wait(randomRange(200, 300));
until AveragePixelShift(PBox, 250, 350) < 100;
noTimes := noTimes + 1;
end;
//woman is: 5572950.
procedure Progress;
begin
pickPH := Round((noTimes * 3600) / (GetTimeRunning / 1000));
XPPH := Round(((noTimes * 8) * 3600) / (GetTimeRunning / 1000));
ClearDebug;
Writeln('Pickpocketed: ' + IntToStr(noTimes) + ' (' + IntToStr(pickPH) + ' per hour)');
Writeln('Experience earned: ' + IntToStr(noTimes * 8)+ ' (' + IntToStr(XPPH) + ' per hour)');
Writeln('Total time running: ' + TimeRunning);
end;
Function arewePocketing: Boolean;
var
PBox: TBox;
Begin
PBox := IntToBox(240, 158, 285, 198);
Result := (AveragePixelShift(PBox, 250, 350) > 90);
End;
begin
SetupP07Include;
ActivateClient;
SetupSRL;
ClearDebug;
xz := 0;
repeat
xz := xz + 1;
pickPocketing;
wait(randomRange(200, 300));
//writeln('Says: '+GetChatBoxText(8, clBlack));
Progress;
until xz = 100;
End.

Credit: guides in the respective sections.

mmmvvvbbb

2013-02-26 21:59:16

Let's try this bad boy out =)

edit: Works quite well. I like the stats. does give weird error that doesn't effect performance
Warning! You passed a wrong ye to a finder function: 1199. The client has a height of 1178, thus the ye is out of bounds. Setting the value to 1177 (h-1) for now.

pure knight

2013-02-26 22:25:52

Local : 1.6 / Latest : 1.7
New P07Include Version Available! Updating…
New P07Include Version Downloaded Please Restart Your Script!
Restarted script but still doesn't work.. How do you fix this?

Word

2013-02-27 01:44:16

From: mmmvvvbbb
Let's try this bad boy out =)

edit: Works quite well. I like the stats. does give weird error that doesn't effect performance
Warning! You passed a wrong ye to a finder function: 1199. The client has a height of 1178, thus the ye is out of bounds. Setting the value to 1177 (h-1) for now.


Yes, I get the same error, but works anyway. Not sure why it does this.

From: pure knight
Local : 1.6 / Latest : 1.7
New P07Include Version Available! Updating…
New P07Include Version Downloaded Please Restart Your Script!
Restarted script but still doesn't work.. How do you fix this?


Nothing to do with me - it's the include that needs to be updated. If this keeps happening, you could try downloading it off here, and putting it into /includes and restarting the script.

Heterodox

2013-02-27 01:50:20

Really nice, I was thinking of doing something similar. Do add some failsafes, though, like log out on 1hp for example.

Word

2013-02-27 02:13:19

From: Valvar
Really nice, I was thinking of doing something similar. Do add some failsafes, though, like log out on 1hp for example.


This, or I was thniking, just walk back from lumbridge if you die? This script will mainly be used by people to get up to 20 or something thieving, not for making money, so a simple deathwalk would also work.

Heterodox

2013-02-27 04:02:42

Yeah, but I don't think SPS is working for 2007 yet…

Word

2013-02-27 07:12:09

From: Valvar
Yeah, but I don't think SPS is working for 2007 yet…


Will walking with DTMs not work? I thought this was still possible, even in RS2007.

barturoDaonly

2013-02-27 15:54:20

Warning! You passed a wrong ye to a finder function: 502. The client has a height of 481, thus the ye is out of bounds. Setting the value to 480 (h-1) for now.
Error: Exception: Font [P07UpChars] not found. at line 544
The following DTMs were not freed: [0, 1, 2, 3, SRL - Lamp bitmap, 5]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap, SRL - Options Bitmap

Getting this error when I start script

Word

2013-02-27 15:58:34

From: barturoDaonly
Warning! You passed a wrong ye to a finder function: 502. The client has a height of 481, thus the ye is out of bounds. Setting the value to 480 (h-1) for now.
Error: Exception: Font [P07UpChars] not found. at line 544
The following DTMs were not freed: [0, 1, 2, 3, SRL - Lamp bitmap, 5]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap, SRL - Options Bitmap

Getting this error when I start script


Please refer to: http://villavu.com/forum/showthread.php?t=96863&highlight=include and make sure you've done everything specified. Your error will be fixed.

keeks

2013-02-28 14:13:28

can you help me figure out how to solve the Type Mismatch? i literally have no idea what to do ive googled for 30 minutes

Word

2013-02-28 19:17:13

From: keeks
can you help me figure out how to solve the Type Mismatch? i literally have no idea what to do ive googled for 30 minutes


I've think you've added some of your own anti-leech… Which line is this?

NJT

2013-02-28 19:20:52

[Error] C:\Simba\Pickpocket.simba(14:89): Type mismatch at line 13

I get that, its when I pick the colour of the man/woman :) (btw lol @ troll)

Word

2013-02-28 19:43:24

From: NJT
[Error] C:\Simba\Pickpocket.simba(14:89): Type mismatch at line 13

I get that, its when I pick the colour of the man/woman :) (btw lol @ troll)


I unintentionally added another level to the anti-leech: [colour of woman/man] means you replace the whole thing (including '[]' with the number), so using my colour in the script, the line should read:

If FindColorSpiralTolerance(x, y, 5572950, P07_MSX1, P07_MSY1, P07_MSX2, P07_MSY2, 7) then 

Try it now.

peachboy

2013-03-02 05:07:36

Warning! You passed a wrong ye to a finder function: 530. The client has a height of 509, thus the ye is out of bounds. Setting the value to 508 (h-1) for now.

That's what I get when I run the script. It clicks the woman but doesn't pickpocket her. I've already gotten the 07 includes too…

speedster

2013-03-02 06:20:53

Awesome work :D!

Maxo

2013-03-02 08:49:48

Exception in Script: Unable to find file 'Troll.simba' used from ''

Help please

Edit: Did i really post this :$

jokdaris

2013-03-02 09:25:17

Exception in Script: Unable to find file 'P07Include.simba' used from 'C:\Users\User\Downloads\Pickpocket.simba'
Ehh, some1 help?

Aqua3

2013-03-02 17:15:32

From: Maxo
Exception in Script: Unable to find file 'Troll.simba' used from ''

Help please


I have the same problem..

Word

2013-03-02 17:25:20

From: jokdaris
Exception in Script: Unable to find file 'P07Include.simba' used from 'C:\Users\User\Downloads\Pickpocket.simba'
Ehh, some1 help?


Have you set up the P07Include properly?

From: Aqua3
I have the same problem..

No, you don't, that's anti-leech.

Aqua3

2013-03-02 17:44:39

How do I fix?

Word

2013-03-02 18:02:11

From: Aqua3
How do I fix?


Do you think Troll.simba is necessary for the script to run?

akiponki

2013-03-11 03:00:41

may I ask, how many anti-leeches are there and are they all hard to find except 1 I'll need that info before downloading the script. You may delete this message…

dudz

2013-03-11 10:24:16

got the fist bait :D, but how do i select the colour? could someone pm me how to?

Eduard

2013-03-15 03:29:34

Anti leech is forbidden.

Croppy

2013-03-15 03:42:29

is this working some one?

Mastemine

2013-03-21 23:39:13

anti-leech is not allowed according to the rules of this forum.

purecoldpk

2013-03-25 01:11:15

Did two anti-leeches, it clicks on the man but doesn't do anything after, help ?

deathcrow

2013-03-25 22:18:24

Script works just fine.

The anti-leech (even if it is now forbidden? Don't see why it should be.) is very easy to figure out and shouldn't take more than 5 minutes (really should take less than 1 minute).

Thanks for the script, Word.

rudeboy99999

2013-03-27 11:35:49

with a few alterations this works brilliantly as a master farmer pick pocketer :)

just the lack of eating that makes it kind of difficult, good for babysitting though

koo29

2013-03-27 14:33:54

Looks really good. When I get more free time, I'm planning on making my own scripts <3

Ashaman88

2013-07-15 17:56:13

antileech not allowed. moved to outed. pm if/when antileech is removed and script is updated.