Log in

View Full Version : DTM's aren't working



i need to bot!
01-21-2012, 01:34 PM
Okay, this is really annoying me... my script just isn't finding my dtms?

I can find nothing wrong with this:

program MehScript;

{$DEFINE Smart}
{$i srl/srl.simba}

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

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Pin := '';
Players[0].Active := true;
LoginPlayer
end;

var
x, y: integer;

function WithdrawPieShell: boolean;
var
x, y, PieShell: Integer;
begin
Result := (false);
PieShell := DTMFromString('78DA639CCAC0C050C98002E696BB8169462 89' +
'FF10390686640034C286A00BFF403E2');
Result := (FindDTM(PieShell, x, y, MSX1, MSX2, MSY1, MSY2));
begin
if (invcount > 0) then
depositall;
if (invcount = 0) then
begin
if FindDTM(PieShell, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln ('found pie shell dtm :)');
if result = (false) then
begin
Writeln ('not found pie shell');
repeat
if isuptext ('ie') then
begin
Mouse (x, y, 0, 0, False);
ChooseOption ('ithdraw-7');
if (invcount = 7) then
end;
end;
freeDTM(PieShell);
end;
end;
end;
end;


function WithdrawStrawberry: boolean;
var
x, y, Strawberry: Integer;
begin
Result := (false);
Result := (invcount = 7);
Strawberry := DTMFromString('78DA638C616060C86240018BAD8CC134239 4C' +
'F5800240E30A0012654351540E2100135F540620701350D40 6223' +
'01355D40620101351D40622501351381C444026A26038999F 8D50' +
'0003DBF0B74');
begin
if FindDTM(Strawberry, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if isuptext ('strawberry') then
begin
repeat
Mouse (x, y, 0, 0, False);
ChooseOption ('ithdraw-7');
until (result);
end;
if (false) then
begin
if FindDTM(Strawberry, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse (x, y, 0, 0, False);
ChooseOption ('ithdraw-7');
end;
end;
end;
end;
end;



procedure WithdrawCookingApple;
var
x, y, CookingApple: Integer;
begin
CookingApple := DTMFromString('78DA630C626060B0624001DCBEBC609A11C A6' +
'79C05249218D00013AA9AD940229A809A45402200BF1A004C 6C03' +
'E4');
begin
if FindDTM(CookingApple, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
repeat
Mouse (x, y, 0, 0, False);
ChooseOption ('ithdraw-7');
until (invcount = 21);
end;
freeDTM(CookingApple);
if (invcount = 28) then
begin
closebank;
end;
end;
end;

procedure WithdrawWatermelon;
var
x, y, Watermelon: Integer;
begin
Watermelon := DTMFromString('78DA638C6660603066400109F542609A11C A6' +
'7BC09248C18D00013A61A2B026A2E020975FC6A00A24404A4 ');
begin
if FindDTM(Watermelon, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
repeat
Mouse (x, y, 0, 0, False);
ChooseOption ('ithdraw-7');
until (invcount = 28);
end;
freeDTM(Watermelon);
end;
end;

function BankColour: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.19, 0.49);

if not (FindColorsTolerance(arP, 4664116, MSX1, MSY1, MSX2, MSY2, 11)) then
begin
Writeln('Failed to find the color, no result(bankcolour).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

function PieShell: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.20, 0.35);

if not (FindColorsTolerance(arP, 4552348, MSX1, MSY1, MSX2, MSY2, 1)) then
begin
Writeln('Failed to find the color, no result(pieshell).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

function Strawberry: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.20, 0.35);

if not (FindColorsTolerance(arP, 4552348, MSX1, MSY1, MSX2, MSY2, 1)) then
begin
Writeln('Failed to find the color, no result(Strawberry).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

function Watermelon: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.08);

if not (FindColorsTolerance(arP, 2710312, MSX1, MSY1, MSX2, MSY2, 6)) then
begin
Writeln('Failed to find the color, no result(Watermelon).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function Apple: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.40, 0.07);

if not (FindColorsTolerance(arP, 1076776, MSX1, MSY1, MSX2, MSY2, 12)) then
begin
Writeln('Failed to find the color, no result(Apple).');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;

procedure camera;
begin
makecompass(180);
end;

procedure bankbanker;
begin
if findobjcustom(x, y, ['ank'], [BankColour], 2) then
begin
Mouse(x, y, 0, 0, false);
chooseoption ('Bank Banker');
if (bankscreen) then
end;
end;

procedure Depositstuff;
begin
if (bankscreen) then
begin
if (InvCount > 0) then
begin
depositall;
end;
end;
end;

procedure UsePieShell;
begin
if (invcount = 28) then
begin
if (bankscreen) then
closebank;
begin
if findobjcustom(x, y, ['Pie Shell'], [PieShell], 2) then
begin
Mouse(x, y, 0, 0, true);
chooseoption ('Use');
end;
end;
end;
end;

begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
camera;
repeat
bankbanker;
until (bankscreen);
Depositstuff;
begin
repeat
WithdrawPieShell;
until (invcount = 7);
if (invcount = 7) then
begin
repeat
WithdrawStrawberry;
until (invcount = 14)
WithdrawWatermelon;
if (invcount = 14) then
begin
repeat
WithdrawCookingApple;
until (invcount = 21)
if (invcount = 21) then
begin
repeat
UsePieShell;
until (invcount = 28)
end;
end;
end;
end;
end.



Sorry about standards.. i will put in later

but when i run this, all I get is 'Warning! You passed wrong values to a finder function: ys > ye (515,337). Swapping the values for now.
Warning! You passed a wrong ye to a finder function: 515. The client has a height of 503, thus the ye is out of bounds. Setting the value to 502 (h-1) for now.' i mean, wth

I was also wondering, instead of saying 'if dtm is found' if i could say 'find dtm', because it is there- the script just can't find it

thanks for any help :-)

i need to bot!
01-21-2012, 02:16 PM
nobody?

go9090go
01-21-2012, 02:24 PM
Did you set the toleranse 10-15?

i need to bot!
01-21-2012, 02:27 PM
would that affect dtms?

how can i change the tolerance on dtms?

Brandon
01-21-2012, 02:31 PM
GO to DTM editor.. DTM Menu -> DTM from string.. Enter:78DA639CCAC0C050C98002E696BB816946289FF10390 686640034C286A00BFF403E2

Now edit your dtm to your liking.. that means u can change the tolerance.. atm your tolerances are at 0 and you only have two points.. When done print it.

i need to bot!
01-21-2012, 07:47 PM
what dtm editor? im using scar

/give up

Hero
01-21-2012, 07:54 PM
what dtm editor? im using scar

/give up

LOL'D Use Simba.....:duh:

i need to bot!
01-21-2012, 10:01 PM
where is dtm editor in simba?

i need to bot!
01-21-2012, 10:03 PM
i see it...

PatDuffy
01-21-2012, 10:26 PM
don't double post btw, there is an edit button

Jhangir
01-22-2012, 01:02 AM
what dtm editor? Im using scar

/give up

wtf?