SRL Archive - OSR Help

Inventory


sm0k3

2011-04-04 07:49:03

anyone know a reliable way to count the amount of one item in inventory .. no reflection plz ..

need to find out how many snapegrass is in inv before i bank ..

i luffs yeww

2011-04-04 07:54:06


{$i SRL/SRL.scar}
var
i, itemCount: Integer;
myBox: TBox;

begin
SetupSRL;
for i := 1 to 28 do
begin
myBox := InvBox(i);
if(FindDTM(item, blah blah))then
Inc(ItemCount);
end;
end.

Or black lists or bitmaps or color checks. Also, amount.scar in core/.

Sex

2011-04-04 07:57:57

From: sm0k3
anyone know a reliable way to count the amount of one item in inventory .. no reflection plz ..

need to find out how many snapegrass is in inv before i bank ..

{*******************************************************************************
function CountItemsIn(Area, ItemType: string; Item: Integer; Tol: TIntegerArray): Integer;
By: masquerader modified by ZephyrsFury
Description: Counts the number of items found within the Area. (Does not count stacks)
Parameters:
Area - 'inv', 'shop', 'bank', 'trade', 'your trade'.
ItemType - SRL_DTM, SRL_Bitmap, SRL_BitmapMask, SRL_Color
Item - name/value of your dtm/bmp/color/bmpmask.
Tol - 'dtm' - [] (dtm's can't have tolerance).
'bmp' - [BMPTol].
'color' - [COLOUR Tol, Min Colour Count].
'bmpmask' - [BMPTol, ContourTol].
*******************************************************************************}

sm0k3

2011-04-04 08:01:29

so how to i put the number of the item into a var ..

soz having problems making sense of Inc(ItemCount);

rogeruk

2011-04-04 08:04:10

From: sm0k3
so how to i put the number of the item into a var ..

soz having problems making sense of Inc(ItemCount);


Inc(ItemCount)

Increases ItemCount by one.

It really means..

ItemCount := ItemCount + 1;

i luffs yeww

2011-04-04 08:04:15

Inc(ItemCount) just increments ItemCount by one. So if ItemCount is 0, then you Inc(ItemCount);, ItemCount is 1.

Sex

2011-04-04 08:11:21

From: sm0k3
so how to i put the number of the item into a var ..

soz having problems making sense of Inc(ItemCount);

Or, you can just use the SRL function.
TotalSnapegrass := CountItemsIn('inc', 'dtm', SnapegrassDTM, []);         

sm0k3

2011-04-04 08:12:43

so does this look right .. ( the FindObjectEx )
myBox := InvBox(i);
if(FindObjEx(x, y, ['ape', 'rass'], [5940247], 5, 9, MSX1, MSY1, MSX2, MSY2))then
Inc(ItemCount);
not sure if i still use the MSX1 MSY1

@SEX

i dont know DTMs Yet ..

i luffs yeww

2011-04-04 08:14:51

Instead of MS, do MI. MS is Main Screen, MI is Main Inventory. You may want more colors as well.

Sex

2011-04-04 08:16:06

You can use a color :p. Although, I don't think that would be as reliable.

sm0k3

2011-04-04 09:56:48


Procedure countinv;
var
i: Integer;
myBox: TBox;

begin
for i := 1 to 28 do
begin
myBox := InvBox(i);
if(FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MIX1, MIY1, MIX2, MIY2))then
begin
Inc(ItemCount);
end else
Writeln('Error: cant Check inv')
end;
end;

it allways seems to check the same item spac in inv .. and doesnt inc he var .. ItemCount is declaired for the whole script ..

also the script just gave me a progress report after 1 run .. and it says ..


#######################################
## ##
## SnapeRunner V0.1A - Sm0k3 ##
## ##
#######################################

#######################################
Time Running: 13 Minutes and 55 Seconds
Picked: 1428
Earned: 0
#######################################

Heres the whole thing



program SnapeRunner;
{$DEFINE SMART} //Uncomment for SMART
{.include SRL/SRL.scar}
{.i SRL/SRL/core/SPS/SPS.simba}

const

sUser = '';// Stats username
sPass = '';// Stats Password
sPrice = 267 ; // Set this to Price of snapegrass . or what you sell them for .
SMARTstats = 'True';// set false if you dont want Stats Shown in SMART
Version = 'Beta'; // Scripts Version Name
Runs = 2 ; // How Many runs do you want Set 0 To go on forever

var

MainPath1, MainPath2, MainPath3: TPointArray; // Main Path Between snapegrass and Bank TPointArray
Movestart: TPointArray; // Path From Tele poin in Fallador
x, y, t, Picked, itemCount, sRuns, earns, antibans, SnP: Integer;
loc: string;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'banked';
end;
end;

Procedure AntiBan;
Begin
If Not mFighter[currentplayer].Active Then Exit;
Case Random(80) of
0: Gametab(RandomRange(tab_Combat, tab_Notes));
1: If CalcXP Then HoverSkill('Random', False);
2, 6: PickUpMouse;
7..15: SleepAndMoveMouse(RandomRange(200, 1200));
End;
End;

procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;

procedure DBSMART;
begin
if (SMARTstats = 'True') then
Begin;
PrintOnSmart(
['',
'',
'',
'',
' SnapeRunner - Sm0k3 ',
' +==============================+',
' Time Running: '+ TimeRunning,
'+==============================+',
' ',
' Player Stats ',
' +========================+',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Runs : '+ToStr(sRuns),
' Picked: '+ToStr(SnP),
' Est Gp Earned : '+ToStr(earns)+'gp',
' +========================+'
], Point(10, 70), 196050, 135972);
end;
end;

procedure WalkToStart;
begin
if SPS_WalkPath(movestart) then
Writeln('Walked To Starting Position');
end;
Procedure WalkToWall;
begin
if (loc = 'Bank') then
Wait(1000+Random(600));
begin
if SPS_WalkPath(MainPath1) then
loc:='Wall';
Writeln('Walked To Wall');
end;
if (loc = 'Snape') then
begin
InvertTPA(MainPath2);
if SPS_WalkPath(MainPath2) then
InvertTPA(MainPath2);
loc:='Wall';
Writeln('Walked To Wall');
end
end;
Procedure WalkToSnape;
begin
if SPS_WalkPath(MainPath2) then
begin
loc:= 'Snape';
Writeln('Walked To SnapeGrass');
end;
end;
Procedure countinv;
var
i: Integer;
myBox: TBox;

begin
for i := 1 to 28 do
begin
myBox := InvBox(i);
if(FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MIX1, MIY1, MIX2, MIY2))then
begin
Inc(ItemCount);
SnP:= ItemCount;
end else
Writeln('Error: cant Check inv')
end;
end;
Procedure PickSnape;
var i: integer;
begin
repeat
countinv;
DBSMART;
FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MSX1, MSY1, MSX2, MSY2);
MMouse(x,y,1,1);
Wait(300);
if IsUpText('nape') then //Check it is snape grass
Mouse(x,y,1,1,true);
wait(3000);
until(InvFull);
end;

Procedure WalkToBank;
begin
InvertTPA(MainPath1);
if SPS_WalkPath(MainPath1) then
InvertTPA(MainPath1);
Writeln('Walked To Bank');
loc:='Bank';
end;
Procedure UnderWall;
begin
DBSMART;
Wait(1000+Random(600));
FindObjEx(x, y, ['nder', 'all'], [527160,855309,994671], 5, 9, MSX1, MSY1, MSX2, MSY2);
Mouse(x, y, 2, 2, true);
Wait(1000+Random(600));
end;


procedure DoBank;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
countinv;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
Begin;
OpenBankFast('fwb');
DepositAll;
CloseBank;
SnP:= SnP + itemCount;
End;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Procedure SimStats;
Begin;
Writeln('#######################################');
Writeln('## ##');
Writeln('## SnapeRunner V0.1A - Sm0k3 ##');
Writeln('## ##');
Writeln('#######################################');
Writeln(' ');
Writeln('#######################################');
Writeln(' Time Running: '+ TimeRunning);
Writeln(' Picked: '+ ToStr(itemCount));
Writeln(' Earned: '+ ToStr(earns));
Writeln('#######################################');
DBSMART;
End;

begin
SnP:= 0;
SPS_Areas := ['8_3', '8_4'];

Movestart:=[Point(3484, 1576),Point(3434, 1579),Point(3406, 1610)];

MainPath1:=[Point(3406,1626),Point(3381,1644),Point(3385,1693),Point(3386,1742),Point(3385,1788),Point(3424,1812),Point(3413,1842)];

MainPath2:=[Point(3417,1867),Point(3428,1890),Point(3421,1932),Point(3411,1977),
Point(3402,2017),Point(3361,2044),Point(3310,2036),Point(3269,1984),
Point(3250,1939),Point(3246,1918)];
Smart_Server := 112;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
Wait(700+Random(800));
DBSMART;
SetAngle(True);
wait(2000+Random(600));
t:= Runs;
if (Runs > 0) then
begin
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
MakeCompass('S')
Wait(1000+Random(600));
UnderWall;
MakeCompass('N')
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1
t:= t - 1;
SimStats;
until (t = 0);
end else
begin;
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
MakeCompass('S')
Wait(1000+Random(600));
UnderWall;
MakeCompass('N')
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1
SimStats;
until false;
end;
end.

rogeruk

2011-04-04 10:27:03

Create a DTM and use:
Count := CountItems(SnapeDTM, 'dtm', []);

If your only picking up one think, you could just use InvCount

Floor66

2011-04-04 10:33:23

From: sm0k3

Procedure countinv;
var
i: Integer;
myBox: TBox;

begin
for i := 1 to 28 do
begin
myBox := InvBox(i);
if(FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MIX1, MIY1, MIX2, MIY2))then
begin
Inc(ItemCount);
end else
Writeln('Error: cant Check inv')
end;
end;

it allways seems to check the same item spac in inv .. and doesnt inc he var .. ItemCount is declaired for the whole script ..

also the script just gave me a progress report after 1 run .. and it says ..


#######################################
## ##
## SnapeRunner V0.1A - Sm0k3 ##
## ##
#######################################

#######################################
Time Running: 13 Minutes and 55 Seconds
Picked: 1428
Earned: 0
#######################################

Heres the whole thing



program SnapeRunner;
{$DEFINE SMART} //Uncomment for SMART
{.include SRL/SRL.scar}
{.i SRL/SRL/core/SPS/SPS.simba}

const

sUser = '';// Stats username
sPass = '';// Stats Password
sPrice = 267 ; // Set this to Price of snapegrass . or what you sell them for .
SMARTstats = 'True';// set false if you dont want Stats Shown in SMART
Version = 'Beta'; // Scripts Version Name
Runs = 2 ; // How Many runs do you want Set 0 To go on forever

var

MainPath1, MainPath2, MainPath3: TPointArray; // Main Path Between snapegrass and Bank TPointArray
Movestart: TPointArray; // Path From Tele poin in Fallador
x, y, t, Picked, itemCount, sRuns, earns, antibans, SnP: Integer;
loc: string;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'banked';
end;
end;

Procedure AntiBan;
Begin
If Not mFighter[currentplayer].Active Then Exit;
Case Random(80) of
0: Gametab(RandomRange(tab_Combat, tab_Notes));
1: If CalcXP Then HoverSkill('Random', False);
2, 6: PickUpMouse;
7..15: SleepAndMoveMouse(RandomRange(200, 1200));
End;
End;

procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;

procedure DBSMART;
begin
if (SMARTstats = 'True') then
Begin;
PrintOnSmart(
['',
'',
'',
'',
' SnapeRunner - Sm0k3 ',
' +==============================+',
' Time Running: '+ TimeRunning,
'+==============================+',
' ',
' Player Stats ',
' +========================+',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Runs : '+ToStr(sRuns),
' Picked: '+ToStr(SnP),
' Est Gp Earned : '+ToStr(earns)+'gp',
' +========================+'
], Point(10, 70), 196050, 135972);
end;
end;

procedure WalkToStart;
begin
if SPS_WalkPath(movestart) then
Writeln('Walked To Starting Position');
end;
Procedure WalkToWall;
begin
if (loc = 'Bank') then
Wait(1000+Random(600));
begin
if SPS_WalkPath(MainPath1) then
loc:='Wall';
Writeln('Walked To Wall');
end;
if (loc = 'Snape') then
begin
InvertTPA(MainPath2);
if SPS_WalkPath(MainPath2) then
InvertTPA(MainPath2);
loc:='Wall';
Writeln('Walked To Wall');
end
end;
Procedure WalkToSnape;
begin
if SPS_WalkPath(MainPath2) then
begin
loc:= 'Snape';
Writeln('Walked To SnapeGrass');
end;
end;
Procedure countinv;
var
i: Integer;
myBox: TBox;

begin
for i := 1 to 28 do
begin
myBox := InvBox(i);
if(FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MIX1, MIY1, MIX2, MIY2))then
begin
Inc(ItemCount);
SnP:= ItemCount;
end else
Writeln('Error: cant Check inv')
end;
end;
Procedure PickSnape;
var i: integer;
begin
repeat
countinv;
DBSMART;
FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MSX1, MSY1, MSX2, MSY2);
MMouse(x,y,1,1);
Wait(300);
if IsUpText('nape') then //Check it is snape grass
Mouse(x,y,1,1,true);
wait(3000);
until(InvFull);
end;

Procedure WalkToBank;
begin
InvertTPA(MainPath1);
if SPS_WalkPath(MainPath1) then
InvertTPA(MainPath1);
Writeln('Walked To Bank');
loc:='Bank';
end;
Procedure UnderWall;
begin
DBSMART;
Wait(1000+Random(600));
FindObjEx(x, y, ['nder', 'all'], [527160,855309,994671], 5, 9, MSX1, MSY1, MSX2, MSY2);
Mouse(x, y, 2, 2, true);
Wait(1000+Random(600));
end;


procedure DoBank;
Var
i: Integer;
Begin
If (Not (LoggedIn)) Then Exit;
countinv;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
Begin;
OpenBankFast('fwb');
DepositAll;
CloseBank;
SnP:= SnP + itemCount;
End;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Procedure SimStats;
Begin;
Writeln('#######################################');
Writeln('## ##');
Writeln('## SnapeRunner V0.1A - Sm0k3 ##');
Writeln('## ##');
Writeln('#######################################');
Writeln(' ');
Writeln('#######################################');
Writeln(' Time Running: '+ TimeRunning);
Writeln(' Picked: '+ ToStr(itemCount));
Writeln(' Earned: '+ ToStr(earns));
Writeln('#######################################');
DBSMART;
End;

begin
SnP:= 0;
SPS_Areas := ['8_3', '8_4'];

Movestart:=[Point(3484, 1576),Point(3434, 1579),Point(3406, 1610)];

MainPath1:=[Point(3406,1626),Point(3381,1644),Point(3385,1693),Point(3386,1742),Point(3385,1788),Point(3424,1812),Point(3413,1842)];

MainPath2:=[Point(3417,1867),Point(3428,1890),Point(3421,1932),Point(3411,1977),
Point(3402,2017),Point(3361,2044),Point(3310,2036),Point(3269,1984),
Point(3250,1939),Point(3246,1918)];
Smart_Server := 112;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
Wait(700+Random(800));
DBSMART;
SetAngle(True);
wait(2000+Random(600));
t:= Runs;
if (Runs > 0) then
begin
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
MakeCompass('S')
Wait(1000+Random(600));
UnderWall;
MakeCompass('N')
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1
t:= t - 1;
SimStats;
until (t = 0);
end else
begin;
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
MakeCompass('S')
Wait(1000+Random(600));
UnderWall;
MakeCompass('N')
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1
SimStats;
until false;
end;
end.


Bro, what you're doing could work, but is really redundant. FindObject(Ex) is for finding stuff on the Main Screen, not in your inventory!

What you could do is either;
1) Create a DTM of the Snape Grass (can't find a tut atm. It's really easy. Try and open Simba's DTM editor, make sure it's enabled by going to View -> Extensions)
2) Create a bitmap of the Snape Grass (how to: http://villavu.com/forum/showthread.php?t=47374)

sm0k3

2011-04-04 10:34:46

I dont know how to do DTM's .. ????

DTMeditor makes no sense to me .. lol

ill try a bitmap


Right ive got my bitmap .. how do i count the items in my inv with it .. i havent a clue

rogeruk

2011-04-04 12:36:15

    'snape': Result := DTMFromString('78DA63746062602862644006BC31560C5F804' +
'220D1FF40C06886A9868181094CC244196D80FC4A026AEC81FC5A' +
'026A1C81FC3A026A3C8950E303E4D71050E307E4571150E305E49' +
'71050E34144F880DC5C40408D05905F4D849A3CFC6A00024D0F59' +
'');

Try that, found it in an old script. Might work.

If not, read tutorials

Floor66

2011-04-04 12:44:56

From: sm0k3
I dont know how to do DTM's .. ????

DTMeditor makes no sense to me .. lol

ill try a bitmap


Right ive got my bitmap .. how do i count the items in my inv with it .. i havent a clue


function CountBMP(BMP: Integer): Integer;
var
b: TBox;
begin
if not LoggedIn then
Exit;
for i := 1 to 28 do
begin
b := InvBox(i);
if FindBitmapToleranceIn(fill this in yourself) then
Inc(Result);
end
end;

Gu3st...

2011-04-04 12:52:53

The reason why it always seems like it's searching in only one inv spot is because you're using MIX1, MIY1, MIX2 and MIY2 instead of MyBox.X1, MyBox.Y1, MyBox.X2, MyBox.Y2.

This should work:
if(FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MyBox.X1, MyBox.Y1, MyBox.X2, MyBox.Y2))then

footballjds

2011-04-04 13:18:34

You are only picking up one thing(snapegrass)?
InvCount;
otherwise use:

function FindDTMItem(item : integer) : boolean;
var
itemBox : TBox;
DTM : integer;
begin
itemBox := InvBox(item);
DTM := DTMFromString(SnapegrassDTM);
Result := FindDTM(DTM, x, y, ItemBox.x1, itemBox.y1, ItemBox.x2, ItemBox.y2);
FreeDTM(DTM);
end;

function CountSnapes: integer;
var
i: integer;
begin
for i := 1 to 28 do
if FindDTMItem(i) then Inc(result);
end;

sm0k3

2011-04-04 13:58:31

got that done .. player now stops mid path does antiban and never gets any further i stopped it and got this ..


Successfully executed.
The following bitmaps were not freed: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146]


program SnapeRunner;
{$DEFINE SMART} //Uncomment for SMART
{.include SRL/SRL.scar}
{.i SRL/SRL/core/SPS/SPS.simba}

const

sUser = '';// Stats username
sPass = '';// Stats Password
sPrice = 267 ; // Set this to Price of snapegrass . or what you sell them for .
SMARTstats = 'True';// set false if you dont want Stats Shown in SMART
Version = 'Beta'; // Scripts Version Name
Runs = 2 ; // How Many runs do you want Set 0 To go on forever

var

MainPath1, MainPath2, MainPath3: TPointArray; // Main Path Between snapegrass and Bank TPointArray
Movestart: TPointArray; // Path From Tele poin in Fallador
x, y, t, Picked, itemCount, sRuns, earns, antibans, SnP, Snapegr: Integer;
loc: string;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
end;
end;

Procedure AntiBan;
Begin
If Not players[currentplayer].Active Then Exit;
Case Random(80) of
0: Gametab(RandomRange(tab_Combat, tab_Notes));
1: HoverSkill('Random', False);
2, 6: PickUpMouse;
7..15: SleepAndMoveMouse(RandomRange(200, 1200));
End;
Gametab(tab_inv);
End;

procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;

procedure DBSMART;
begin
if (SMARTstats = 'True') then
Begin;
PrintOnSmart(
['',
'',
'',
'',
' SnapeRunner - Sm0k3 ',
' +==============================+',
' Time Running: '+ TimeRunning,
'+==============================+',
' ',
' Player Stats ',
' +========================+',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Runs : '+ToStr(sRuns),
' Picked: '+ToStr(SnP),
' Est Gp Earned : '+ToStr(earns)+'gp',
' +========================+'
], Point(10, 70), 196050, 135972);
end;
end;

procedure WalkToStart;
begin
if SPS_WalkPath(movestart) then
Writeln('Walked To Starting Position');
end;
Procedure WalkToWall;
begin
if (loc = 'Bank') then
Wait(1000+Random(600));
begin
if SPS_WalkPath(MainPath1) then
loc:='Wall';
Writeln('Walked To Wall');
end;
if (loc = 'Snape') then
begin
InvertTPA(MainPath2);
if SPS_WalkPath(MainPath2) then
InvertTPA(MainPath2);
loc:='Wall';
Writeln('Walked To Wall');
end
end;
Procedure WalkToSnape;
begin
if SPS_WalkPath(MainPath2) then
begin
loc:= 'Snape';
Writeln('Walked To SnapeGrass');
end;
end;
Procedure countinv;
var
i: Integer;
myBox: TBox;

begin
ItemCount:= 0;
Snapegr := BitmapFromString(24, 23, 'meJyFlDEKAkEUQ8Va8Ap7BGEbLc' +
'TCQryCl/D+nR8CISZ/ZuAXs7szj/z8zO6P1y51PBzu3zOq1lXXzwm' +
'l77ftUrX/n20h2N9CUCOIcUhQjqmtI7fney6mLe6ZqDIxuW7VGgpW' +
'pAA2hSNty0BxKCl+5IwSODsbh4nRwSmE/jAAeFT3uB9rfZmhoj8GM' +
'Tds7uaMoixyJsy6TgJb05YNYvCEgKD+6Fl8sljqceuoIl2lpwBRbB' +
'tptZqohLQByJhZBji1tp1UouFRMq8G7Vre1kRV2W2tTjNpS5F2W+E' +
'8tCUqH230k9/aKIeKmhCW/xOzfQkZdWTwCWrubf49fgFjIpI=');
for i := 1 to 28 do
begin
myBox := InvBox(i);
CountItemsIn('inv', 'Bitmap', Snapegr, [5]);
SnP:= ItemCount;
End;
end;

Procedure PickSnape;
var i: integer;
begin
repeat
countinv;
DBSMART;
FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MSX1, MSY1, MSX2, MSY2);
MMouse(x,y,1,1);
Wait(300);
if IsUpText('nape') then //Check it is snape grass
Mouse(x,y,1,1,true);
AntiBan;
wait(1000+Random(1600));
until(InvFull);
end;

Procedure WalkToBank;
begin
InvertTPA(MainPath1);
if SPS_WalkPath(MainPath1) then
InvertTPA(MainPath1);
Writeln('Walked To Bank');
loc:='Bank';
end;
Procedure UnderWall;
begin
DBSMART;
Wait(1000+Random(600));
FindObjEx(x, y, ['nder', 'all'], [527160,855309,994671], 5, 9, MSX1, MSY1, MSX2, MSY2);
Mouse(x, y, 2, 2, true);
Wait(500+Random(600));
end;


procedure DoBank;
Var
i: Integer;
Begin
SnP:= 0;
If (Not (LoggedIn)) Then Exit;
countinv;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
Begin;
OpenBankFast('fwb');
DepositAll;
CloseBank;
SnP:= SnP + itemCount;
earns:= sPrice * SnP;
End;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Procedure SimStats;
Begin;
Writeln('#######################################');
Writeln('## ##');
Writeln('## SnapeRunner V0.1A - Sm0k3 ##');
Writeln('## ##');
Writeln('#######################################');
Writeln(' ');
Writeln('#######################################');
Writeln(' Time Running: '+ TimeRunning);
Writeln(' Picked: '+ ToStr(itemCount));
Writeln(' Earned: '+ ToStr(earns));
Writeln('#######################################');
DBSMART;
End;

begin
SnP:= 0;
SPS_Areas := ['8_3', '8_4'];

Movestart:=[Point(3484, 1576),Point(3434, 1579),Point(3406, 1610)];

MainPath1:=[Point(3406,1626),Point(3381,1644),Point(3385,1693),Point(3386,1742),Point(3385,1788),Point(3424,1812),Point(3413,1842)];

MainPath2:=[Point(3416,1868),Point(3418,1883),Point(3418,1924),Point(3413,1953),Point(3143,1969),Point(3402,2020),Point(3372,2048),
Point(3320,2041),Point(3286,2012),Point(3261,1972),Point(3248,1932)];
Smart_Server := 112;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
Wait(700+Random(800));
DBSMART;
SetAngle(True);
wait(2000+Random(600));
t:= Runs;
if (Runs > 0) then
begin
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
AntiBan;
MakeCompass('S');
Wait(1000+Random(600));
UnderWall;
AntiBan;
MakeCompass('N');
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1;
t:= t - 1;
SimStats;
until (t = 0);
end else
begin;
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
AntiBan;
MakeCompass('S');
Wait(1000+Random(600));
UnderWall;
MakeCompass('N');
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1;
SimStats;
until false;
end;
end.

Home

2011-04-04 14:03:26

From: sm0k3
got that done .. player now stops mid path does antiban and never gets any further i stopped it and got this ..


Successfully executed.
The following bitmaps were not freed: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146]


OffTopic. Use Simba tags. Looks nicer OffTopic.

Try editing your SPS Path?
Use Different "Tile" For those points where it fails.

~Home

Floor66

2011-04-04 15:43:57

sm0k3 for your sake I hope that someone changed that password for you and PMed you it.

sm0k3

2011-04-04 16:13:14


program SnapeRunner;
{$DEFINE SMART} //Uncomment for SMART
{.include SRL/SRL.scar}
{.i SRL/SRL/core/SPS/SPS.simba}

const

sUser = '';// Stats username
sPass = '';// Stats Password
sPrice = 267 ; // Set this to Price of snapegrass . or what you sell them for .
SMARTstats = 'True';// set false if you dont want Stats Shown in SMART
Version = 'Beta'; // Scripts Version Name
Runs = 2 ; // How Many runs do you want Set 0 To go on forever

var

MainPath1, MainPath2, MainPath3: TPointArray; // Main Path Between snapegrass and Bank TPointArray
Movestart: TPointArray; // Path From Tele poin in Fallador
x, y, t, Picked, itemCount, sRuns, earns, antibans, SnP, Snapegr: Integer;
loc: string;

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
end;
end;

Procedure AntiBan;
Begin
If Not players[currentplayer].Active Then Exit;
Case Random(80) of
0: Gametab(RandomRange(tab_Combat, tab_Notes));
1: HoverSkill('Random', False);
2, 6: PickUpMouse;
7..15: SleepAndMoveMouse(500+Random(500));
End;
Gametab(tab_inv);
End;

procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;

procedure DBSMART;
begin
if (SMARTstats = 'True') then
Begin;
PrintOnSmart(
['',
'',
'',
'',
' SnapeRunner - Sm0k3 ',
' +==============================+',
' Time Running: '+ TimeRunning,
'+==============================+',
' ',
' Player Stats ',
' +========================+',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Runs : '+ToStr(sRuns),
' Picked: '+ToStr(SnP),
' Est Gp Earned : '+ToStr(earns)+'gp',
' +========================+'
], Point(10, 70), 196050, 135972);
end;
end;

procedure WalkToStart;
begin
if SPS_WalkPath(movestart) then
Writeln('Walked To Starting Position');
end;
Procedure WalkToWall;
begin
if (loc = 'Bank') then
Wait(1000+Random(600));
begin
if SPS_WalkPath(MainPath1) then
loc:='Wall';
Writeln('Walked To Wall');
end;
if (loc = 'Snape') then
begin
InvertTPA(MainPath2);
if SPS_WalkPath(MainPath2) then
InvertTPA(MainPath2);
loc:='Wall';
Writeln('Walked To Wall');
end
end;
Procedure WalkToSnape;
begin
if SPS_WalkPath(MainPath2) then
begin
loc:= 'Snape';
Writeln('Walked To SnapeGrass');
end;
end;
Procedure countinv;
var
i: Integer;
myBox: TBox;

begin
ItemCount:= 0;
Snapegr := BitmapFromString(24, 23, 'meJyFlDEKAkEUQ8Va8Ap7BGEbLc' +
'TCQryCl/D+nR8CISZ/ZuAXs7szj/z8zO6P1y51PBzu3zOq1lXXzwm' +
'l77ftUrX/n20h2N9CUCOIcUhQjqmtI7fney6mLe6ZqDIxuW7VGgpW' +
'pAA2hSNty0BxKCl+5IwSODsbh4nRwSmE/jAAeFT3uB9rfZmhoj8GM' +
'Tds7uaMoixyJsy6TgJb05YNYvCEgKD+6Fl8sljqceuoIl2lpwBRbB' +
'tptZqohLQByJhZBji1tp1UouFRMq8G7Vre1kRV2W2tTjNpS5F2W+E' +
'8tCUqH230k9/aKIeKmhCW/xOzfQkZdWTwCWrubf49fgFjIpI=');
for i := 1 to 28 do
begin
myBox := InvBox(i);
CountItemsIn('inv', 'Bitmap', Snapegr, [5]);
SnP:= ItemCount;
End;
end;

Procedure PickSnape;
var i: integer;
begin
repeat
countinv;
DBSMART;
FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MSX1, MSY1, MSX2, MSY2);
MMouse(x,y,1,1);
Wait(300);
if IsUpText('nape') then //Check it is snape grass
Mouse(x,y,1,1,true);
AntiBan;
wait(1000+Random(1600));
until(InvFull);
end;

Procedure WalkToBank;
begin
InvertTPA(MainPath1);
if SPS_WalkPath(MainPath1) then
InvertTPA(MainPath1);
Writeln('Walked To Bank');
loc:='Bank';
end;
Procedure UnderWall;
begin
DBSMART;
Wait(1000+Random(600));
FindObjEx(x, y, ['nder', 'all'], [527160,855309,994671], 5, 9, MSX1, MSY1, MSX2, MSY2);
Mouse(x, y, 2, 2, true);
Wait(500+Random(600));
end;


procedure DoBank;
Var
i: Integer;
Begin
SnP:= 0;
If (Not (LoggedIn)) Then Exit;
countinv;
For i := 1 To 4 Do
Begin
If OpenBank('veb', True, True) Then
Begin;
OpenBankFast('fwb');
DepositAll;
CloseBank;
SnP:= SnP + itemCount;
earns:= sPrice * SnP;
End;
End;
Writeln('Banking Failed - Changing Players');
NextPlayer(False);
End;

Procedure SimStats;
Begin;
Writeln('#######################################');
Writeln('## ##');
Writeln('## SnapeRunner V0.1A - Sm0k3 ##');
Writeln('## ##');
Writeln('#######################################');
Writeln(' ');
Writeln('#######################################');
Writeln(' Time Running: '+ TimeRunning);
Writeln(' Picked: '+ ToStr(itemCount));
Writeln(' Earned: '+ ToStr(earns));
Writeln('#######################################');
DBSMART;
End;

begin
SnP:= 0;
SPS_Areas := ['8_3', '8_4'];

Movestart:=[Point(3484, 1576),Point(3434, 1579),Point(3406, 1610)];

MainPath1:=[Point(3406,1626),Point(3381,1644),Point(3385,1693),Point(3386,1742),Point(3385,1788),Point(3424,1812),Point(3413,1842)];

MainPath2:=[Point(3416,1868),Point(3397,1888),Point(3418,1900),Point(3413,1950),Point(3143,1969),Point(3402,2020),Point(3372,2048),
Point(3320,2041),Point(3286,2012),Point(3261,1972),Point(3248,1932)];
Smart_Server := 112;
Smart_Signed := True;
SetupSRL;
DeclarePlayers;
ActivateClient;
Wait(1000);
LoginPlayer;
Wait(700+Random(800));
DBSMART;
SetAngle(True);
wait(2000+Random(600));
t:= Runs;
if (Runs > 0) then
begin
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
MakeCompass('S');
Wait(1000+Random(600));
UnderWall; //Problem Starts Here
MakeCompass('N');
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1;
t:= t - 1;
SimStats;
until (t = 0);
end else
begin;
repeat
WalkToStart;
loc:= 'Bank';
WalkToWall;
MakeCompass('S');
Wait(100+Random(600));
UnderWall; // or here .
MakeCompass('N');
SetAngle(True);
WalkToSnape;
PickSnape;
WalkToWall;
UnderWall;
WalkToBank;
DoBank;
sRuns:= sRuns + 1;
SimStats;
until false;
end;
end.

After Going under the wall it just sstands there and checks my notes and stats??? ( somtimes walks a little way first ) ( i have fixed the SPS path though )

@Floor66 and yes someone changed my pass .. no they didnt pm it to me … oops ..

Recovered Luckily .. So So Close ..

Floor66

2011-04-04 16:28:00

you better go and recover the account. when you log back in on it, SAVE a screenshot of the last logged in IP. that way we'll be able to cross-reference it with forum IP records.

sm0k3

2011-04-04 16:40:02

.. their logged in to my acc right now ..

rogeruk

2011-04-04 16:47:50

From: sm0k3
.. their logged in to my acc right now ..


Have you successfully retrieved the account?.

Is it safe?

Check your PM

//Edit. I kept the char logged in as long as i could so could could retrieve it.. this is the last login pic i got

Guy was just above crafting guild when i logged in. It booted me off (maybe cause u changed pass?). Let us know

meatycj

2011-04-04 17:10:07

From: sm0k3
.. their logged in to my acc right now ..


Hope it wont take you long to recover the stuff they took :stirthepot:

sm0k3

2011-04-04 17:30:45

They Took EVERYTHING ….

#all me gp – only 8164k but still.

# dragon spear P++

# Loads of SnapeGrass

# Me Tzhar-Ket-Om

loads of stuff … if i wasnt finding it hard enough to make any gp before

lol im fucked now

Gu3st...

2011-04-04 17:41:06

You did save the IP, right?!

sm0k3

2011-04-04 17:48:18

Yeh its on the last page .. rogeruk posted it he "saved" my acc .. i also have a screenie of the ip when i logged in after he got kicked wen i recoverd…
i gues that would be his.

Gu3st...

2011-04-04 17:56:42

Good :D

rogeruk

2011-04-04 17:56:49

From: sm0k3
Yeh its on the last page .. rogeruk posted it he "saved" my acc .. i also have a screenie of the ip when i logged in after he got kicked wen i recoverd…
i gues that would be his.


86.**.***.246
cpc1-*******cust245.7-3.cable.virginmedia.com

That's mine.

Sorry they must have cleared it out fast :S.

sm0k3

2011-04-04 19:43:36

My own damn fault realy ..

as if i didnt learn the last 2 time's ..
luckily the good peeps here on Villavu
told me and got it changed ..

Dgby714

2011-04-04 23:58:26

Start using Paster =P

Hmm maybe we should add a little safety to the copy.

Harry

2011-04-05 00:57:24

From: rogeruk
this is the last login pic i got

2.121.108.164 if anyone wants to search that up.

footballjds

2011-04-05 12:00:49

From: Harry
2.121.108.164 if anyone wants to search that up.


Someone from UK.
Here is a shit-ton of info:

% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See http://www.ripe.net/db/support/db-terms-conditions.pdf
% Note: this output has been filtered.
% To receive output for a database update, use the "-B" flag.
% Information related to '2.120.0.0 - 2.121.255.255'
inetnum: 2.120.0.0 - 2.121.255.255
netname: BSKYB-BROADBAND
descr: Sky Broadband
country: GB
admin-c: BBH-RIPE
tech-c: BBH-RIPE
status: ASSIGNED PA
remarks: Please send abuse notifications to [email]abuse@sky.com[/email]
mnt-by: BSKYB-BROADBAND-MNT
source: RIPE # Filtered
role: BSkyB Broadband Hostmaster
address: Sky Network Services
address: 1 Brick Lane
address: London
address: E1 6PU
address: England
address: GB
phone: +44 207 032 7000
fax-no: +44 207 900 7812
admin-c: KB533-RIPE
admin-c: PPD-RIPE
tech-c: PPD-RIPE
tech-c: JS2116-RIPE
nic-hdl: BBH-RIPE
abuse-mailbox: [email]abuse@sky.com[/email]
mnt-by: BSKYB-BROADBAND-MNT
source: RIPE # Filtered
% Information related to '2.120.0.0/13AS5607'
route: 2.120.0.0/13
descr: BSkyB Broadband
origin: AS5607
mnt-by: BSKYB-BROADBAND-MNT
source: RIPE # Filtered


from:
http://www.db.ripe.net/whois?searchtext=2.121.108.164

YoHoJo

2011-04-07 02:07:26

So what's gong on now?
"http://img203.imageshack.us/img203/5272/44676761.jpg"
Is the IP address of the guy who stole all of sm0kes stuff?!

Floor66

2011-04-07 02:10:39

I PMed Wizzup with this 2 days ago, no response yet :/

also, @YoHoJo; Yes.

sm0k3

2011-04-09 15:13:23

– BUMP –

.. hmm no word about the Owner of that ip ??

hope we find him ..

OK so My Fault for leaving my details in the script ( 4-5 times :) )

BUT .. We are a community .. and as far as i know..
We Don't want Account thieves among us ..

We Write Bots / Scripts …
We DONT steal pixels .. so it would be nice to find and ban this guy .. :)

YoHoJo

2011-04-09 15:33:20

meatycj 2.121.108.164 [Find Posts by User] [View Other IP Addresses for this User]

Registration IP Addresses

Smoking_Hot 2.121.108.164 [Find Posts by User] [View Other IP Addresses for this User]


asdf

Sex

2011-04-09 15:35:25

From: meatycj
Hope it wont take you long to recover the stuff they took :stirthepot:
Stupid kid!

RAM

2011-04-09 20:02:39

From: Sex
Stupid ass faggot!


I understand your frustration, but please do not lower yourself to their standards…investigating further atm….

~RAM