Log in

View Full Version : Work faster



Littellj
03-07-2012, 07:29 AM
Ok so i would like to get it to move faster, I'm not sure exactly how CTS2 works but when i dont // out the 2nd debug it shows that it's generating a new color every round of pickpocketing. Is this how it is suppose to work? If this is true should i just try CTS1 or 0 to try and make it generate faster? Or is there a way to make it use just one Color the whole time its running.

program testbandit;
{$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].Active:=True;
End;




procedure StatsGuise(wat:String);
begin
StatsGuise(wat);
Disguise(wat);
end;



procedure Antiban;
begin
case Random(10) of
20: HoverSkill('Thieving', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
end;
Writeln('Antiban in action!');
end;



function Bandit: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.42, 0.14);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 1714004, MSX1, MSY1, MSX2, MSY2, 7);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
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;



///////////////Taken from YoHoJo's powerminner////////////

Procedure DropJunk;
var
x, y, Lockpick, Antipoision, I: Integer;
SlotBox:TBox;
DropingPattern:TIntegerArray;

begin
Lockpick:= DTMFromString('mrAAAAHic42BgYOhjZmCYD8QzgHgiELcDcQ sQtwJxDxBXMDIwFAJxHhAXAXE9ELcAcQcQ1wKxnbU10BQmPBg/YCSAYQAA5GsJNg==');
Antipoision:= DTMFromString('mAAEAAHiclc0xDkBQFETRebTWYGmCgiBYhp KSRiKhQmzRTX6j9G9ymmkmklSEToUaLXp0KJEiQYYch0kjJizY zG0nblzYsWLG8DS8BB7+F8M8fXsB8IkOcA==');
DropingPattern:= [9,13,17,21,25,10,14,18,22,26,7,11,15,19,23,27,8,12 ,16,20,24,28];

for I:= 0 to 21 do
Begin
SlotBox:= InvBox(DropingPattern[I]);
if FindDTM(Lockpick,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) or
FindDTm(Antipoision,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(DropingPattern[I], Mouse_Right);
ChooseOption('Dro');
end;
end;

FreeDTM(Lockpick);
FreeDTM(Antipoision);

end;



Procedure Pickpocket;
var
x, y: integer;
begin
repeat
if(not(LoggedIn))then
Exit;

SetAngle(SRL_ANGLE_HIGH);
x:=MSCX;
y:=MSCY;

If FindObjTPA(x, y, Bandit, 5, 2, 5, 10, 20,['Atta'])then

begin
WriteLn('Found Bandit');

Mouse(x, y, 10, 10, False);
WaitOption('Pick', 500)
end;
until(InvFull);
begin
FindNormalRandoms;
WriteLn('Droping');

DropJunk; //Droping

end;


end;






begin
Smart_Server := 0;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

SetUpSRL;
DeclarePlayers;
LoginPlayer;
repeat
FindNormalRandoms;
Pickpocket;
Until(false);

end.

Daniel
03-07-2012, 10:14 AM
Generally the colour should stay the same, unless you're doing something which involves RS having to show the "Loading..." alert in the top-left corner. Just call it once to get your colour, store it in a variable, and you should be right :)

Littellj
03-07-2012, 04:15 PM
How would I store it as a variable?

Would I put a var section at the top and then Bandits: Integer ?