PDA

View Full Version : [2007 RS] + [first script] Man/Woman Thiever



Word
02-27-2013, 12:37 AM
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
02-27-2013, 02:59 AM
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
02-27-2013, 03:25 AM
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
02-27-2013, 06:44 AM
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.


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
02-27-2013, 06:50 AM
Really nice, I was thinking of doing something similar. Do add some failsafes, though, like log out on 1hp for example.

Word
02-27-2013, 07:13 AM
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
02-27-2013, 09:02 AM
Yeah, but I don't think SPS is working for 2007 yet...

Word
02-27-2013, 12:12 PM
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
02-27-2013, 08:54 PM
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
02-27-2013, 08:58 PM
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
02-28-2013, 07:13 PM
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
03-01-2013, 12:17 AM
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
03-01-2013, 12:20 AM
[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
03-01-2013, 12:43 AM
[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
03-02-2013, 10:07 AM
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
03-02-2013, 11:20 AM
Awesome work :D!

Maxo
03-02-2013, 01:49 PM
Exception in Script: Unable to find file 'Troll.simba' used from ''

Help please

Edit: Did i really post this :$

jokdaris
03-02-2013, 02:25 PM
Exception in Script: Unable to find file 'P07Include.simba' used from 'C:\Users\User\Downloads\Pickpocket.simba'
Ehh, some1 help?

Aqua3
03-02-2013, 10:15 PM
Exception in Script: Unable to find file 'Troll.simba' used from ''

Help please

I have the same problem..

Word
03-02-2013, 10:25 PM
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?


I have the same problem..
No, you don't, that's anti-leech.

Aqua3
03-02-2013, 10:44 PM
How do I fix?

Word
03-02-2013, 11:02 PM
How do I fix?

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

akiponki
03-11-2013, 07:00 AM
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
03-11-2013, 02:24 PM
got the fist bait :D, but how do i select the colour? could someone pm me how to?

Eduard
03-15-2013, 07:29 AM
Anti leech is forbidden.

Croppy
03-15-2013, 07:42 AM
is this working some one?

Mastemine
03-22-2013, 03:39 AM
anti-leech is not allowed according to the rules of this forum.

purecoldpk
03-25-2013, 05:11 AM
Did two anti-leeches, it clicks on the man but doesn't do anything after, help ?

deathcrow
03-26-2013, 02:18 AM
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
03-27-2013, 03:35 PM
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
03-27-2013, 06:33 PM
Looks really good. When I get more free time, I'm planning on making my own scripts <3

Ashaman88
07-15-2013, 09:56 PM
antileech not allowed. moved to outed. pm if/when antileech is removed and script is updated.