View Full Version : Help
spin3x
06-04-2012, 02:10 PM
Is there anything wrong with this code?
program TheivingNearReality;
{$i SRL/SRL.simba}
Procedure StartTheiving;
var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, 3850947, 9, 0, 515, 316, 5) then // Colors[i] represents a single color
begin
{MoveMouse(x, y);
ClickMouse(x, y, 1);}
end;
end;
begin
StartTheiving;
repeat
StartTheiving;
until(false);
end. Doesnt seem to do anything. Its for an rsps.
I just want it to find a monster and then click on it.
Runaway
06-04-2012, 04:25 PM
I fixed your standards and added the SetupSRL that you were missing:
program TheivingNearReality;
{$i SRL/SRL.simba}
Procedure StartTheiving;
var
x, y: Integer;
begin
if FindColorSpiralTolerance(x, y, 3850947, 9, 0, 515, 316, 5) then
Mouse(x, y, 0, 0, mouse_left);
end;
begin
SetupSRL;
repeat
StartTheiving;
until(false);
end.
^ That will end up spam clicking whatever you're trying to pickpocket, though. You need to either add a static wait after each time you click, or use some other method to find out what's going on after clicking (like looking at the chat box).
spin3x
06-04-2012, 05:46 PM
Thank you so much. Reped
spin3x
06-04-2012, 07:47 PM
Guys can anyone tell me what would be the easiest way to do the following:
When it sees that its low hp it click a super restore in the inventory (Inve is full of super restores and nothing else) This is for an RSPS so I want it to be the simplest method. I cant figure out how it would click an inve spot 6 times (finish a super restore flask) and then click the other 27 spots 6 times.
Thank you
Runaway
06-04-2012, 08:41 PM
Try this:
var
PotArray: TIntegerArray;
// Declare as a global var
// ...
procedure SetupPots;
var
hPot, i: Integer;
begin
SetLength(PotArray, 28);
for i := 1 to 28 do
begin
if (i > 1) and (PotArray[i - 1] <> 0) then
begin
PotArray[i] := 6;
Continue;
end;
MouseItem(i, mouse_move);
if WaitUptext('mpty', 300) then
begin
PotArray[i] := 0;
Continue;
end;
end;
hPot := High(PotArray);
if (PotArray[hPot] = 0) then
Writeln('Out of super restore pots!');
end;
function DrinkDose: Boolean;
var
x, y, i: Integer;
begin
Result := False;
for i := 1 to 28 do
begin
if (PotArray[i] <> 0) then
begin
MouseItem(i, mouse_move);
if WaitUptext('mpty', 300) then
begin
PotArray[i] := 0;
Continue;
end else
begin
IncEx(PotArray[i], -1);
GetMousePos(x, y);
ClickMouse2(mouse_left);
Writeln('Drank a dose of super restore!');
Result := True;
Exit;
end;
end;
end;
end;
// ...
begin
SetupSRL;
SetupPots;
repeat
StartThieving;
if (HPPercent < 70) then
DrinkDose;
WaitThieving;
until(false);
end.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.