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 ..
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 ..
pascal Code:{$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/.
Code:{******************************************************************************* 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]. *******************************************************************************}
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
so how to i put the number of the item into a var ..
soz having problems making sense of Inc(ItemCount);
Rogeruk's Al-Kharid Tanner V1.1 [Released]
Rogeruk's Barbarian Crafter [Coming Soon]
Rogeruk's Guild Fisher [Coming Soon]
!! - Taking Requests - !!
Inc(ItemCount) just increments ItemCount by one. So if ItemCount is 0, then you Inc(ItemCount);, ItemCount is 1.
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
so does this look right .. ( the FindObjectEx )
not sure if i still use the MSX1 MSY1Simba Code:myBox := InvBox(i);
if(FindObjEx(x, y, ['ape', 'rass'], [5940247], 5, 9, MSX1, MSY1, MSX2, MSY2))then
Inc(ItemCount);
@SEX
i dont know DTMs Yet ..
Instead of MS, do MI. MS is Main Screen, MI is Main Inventory. You may want more colors as well.
You can use a color. Although, I don't think that would be as reliable.
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
Simba Code: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 ..
Progress Report:####################################### ## ## ## SnapeRunner V0.1A - Sm0k3 ## ## ## ####################################### ####################################### Time Running: 13 Minutes and 55 Seconds Picked: 1428 Earned: 0 #######################################
Heres the whole thing
Simba Code: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.
Last edited by sm0k3; 04-04-2011 at 02:11 PM.
Create a DTM and use:
Simba Code:Count := CountItems(SnapeDTM, 'dtm', []);
If your only picking up one think, you could just use InvCount
Rogeruk's Al-Kharid Tanner V1.1 [Released]
Rogeruk's Barbarian Crafter [Coming Soon]
Rogeruk's Guild Fisher [Coming Soon]
!! - Taking Requests - !!
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)
Last edited by Floor66; 04-04-2011 at 02:35 PM.
Ce ne sont que des gueux
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
Last edited by sm0k3; 04-04-2011 at 03:04 PM.
Simba Code:'snape': Result := DTMFromString('78DA63746062602862644006BC31560C5F804' +
'220D1FF40C06886A9868181094CC244196D80FC4A026AEC81FC5A' +
'026A1C81FC3A026A3C8950E303E4D71050E307E4571150E305E49' +
'71050E34144F880DC5C40408D05905F4D849A3CFC6A00024D0F59' +
'');
Try that, found it in an old script. Might work.
If not, read tutorials
Rogeruk's Al-Kharid Tanner V1.1 [Released]
Rogeruk's Barbarian Crafter [Coming Soon]
Rogeruk's Guild Fisher [Coming Soon]
!! - Taking Requests - !!
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:
Simba Code:if(FindObjEx(x, y, ['ape', 'rass'], [5940247,4026127,3693068], 5, 9, MyBox.X1, MyBox.Y1, MyBox.X2, MyBox.Y2))then
You are only picking up one thing(snapegrass)?
InvCount;
otherwise use:
Simba Code: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;
Last edited by footballjds; 04-04-2011 at 05:22 PM.
got that done .. player now stops mid path does antiban and never gets any further i stopped it and got this ..
[SIMBA ]
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]
[/SIMBA]
Simba Code: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.
Last edited by sm0k3; 04-04-2011 at 08:25 PM.
sm0k3 for your sake I hope that someone changed that password for you and PMed you it.
Ce ne sont que des gueux
Simba Code: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 ..
Last edited by sm0k3; 04-04-2011 at 08:31 PM.
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.
Ce ne sont que des gueux
.. 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
Rogeruk's Al-Kharid Tanner V1.1 [Released]
Rogeruk's Barbarian Crafter [Coming Soon]
Rogeruk's Guild Fisher [Coming Soon]
!! - Taking Requests - !!
There are currently 1 users browsing this thread. (0 members and 1 guests)