SRL Archive - OSR Help

I want to make a barbarian agility bot for SoulSplit


remember me

2013-04-28 17:05:23

i got this code right now:
program SoulSplitAgility;
{$i SRL/SRL.simba}
var
x, y : Integer;
procedure ClickRope;
begin
wait(1000);
if
FindColorTolerance(x, y, 10543, 187, 167, 361, 314, 2) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

procedure WalkToLog;
begin
if
FindColorTolerance(x, y, 7702932, 230, 251, 267, 287, 10) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

procedure ClickLog;
begin
if
FindColorTolerance(x, y, 935537, 201, 150, 263, 200, 10) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(5000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

procedure ClickNet;
begin
if
FindColorTolerance(x, y, 2307136, 122, 135, 145, 218, 10) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickLedge;
begin
if
FindColortolerance(x, y, 14424, 174, 91, 218, 162, 1) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickLadder;
begin
if
FindColorTolerance(x, y, 737368, 3, 181, 514, 336, 1) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure WalkWall;
begin
if
FindColorTolerance(x, y, 608609, 246, 6, 288, 29, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(5000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickWall;
begin
if
FindColorTolerance(x, y, 8553356, 386, 82, 432, 134, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickWall1;
begin
if
FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickWall2;
begin
if
FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure WalkRound;
begin
if
FindColorTolerance(x, y, 608609, 388, 170, 421, 199, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure WalkEnd;
begin
if
FindColorTolerance(x, y, 5529705, 385, 129, 422, 164, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

begin
setupsrl;
repeat
ClickRope;
WalkToLog;
ClickLog;
ClickNet;
ClickLedge;
ClickLadder;
WalkWall;
ClickWall;
ClickWall1;
ClickWall2;
WalkRound;
WalkEnd;
until (IsKeyDown(114)); // F3 to stop the script
end.

how can i make it more accurate and better because if i run the script now it will just click most of the times miss
anyone maybe a better way to do this
i like to hear it from you

rj

2013-04-28 17:07:38

Why not make it go up and down the ladder -.- faster xp/hr

Ian

2013-04-28 17:08:23

Does it miss by clicking near what you want of does it click something else altogether? I recommend using ACA to get colors to make sure they're the best possible :)

maikel233

2013-04-28 17:09:39

So you just created an script with no camera rotation…
writeln('move your camera a little bit'); Haha

remember me

2013-04-29 04:26:38

Does it miss by clicking near what you want of does it click something else altogether? I recommend using ACA to get colors to make sure they're the best possible

So you just created an script with no camera rotation…
writeln('move your camera a little bit'); Haha

sometimes it click on something other and sometimes it click on the good thing but,
then it doesn't work because there was no swing or climb etc option.
maikel how can i make that rotation then?
and it's on a rsps

remember me

2013-04-29 05:34:00

i got this code now:
program SoulSplitAgility;
{$i SRL/SRL.simba}
var
x, y : Integer;
procedure ClickRope;
begin
wait(1000);
if
FindColorTolerance(x, y, 10543, 187, 167, 361, 314, 2) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

procedure WalkToLog;
begin
if
FindColorTolerance(x, y, 7702932, 230, 251, 267, 287, 10) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

procedure ClickLog;
begin
if
FindColorTolerance(x, y, 935537, 201, 150, 263, 200, 10) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(5000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

procedure ClickNet;
begin
if
FindColorTolerance(x, y, 2307136, 122, 135, 145, 218, 10) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
function LedgeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.15, 2.73);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 1265516, MSX1, MSY1, MSX2, MSY2, 11);
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
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 3.71) and (X <= 14.54) and (Y >= 3.47) and (Y <= 14.78) and (Z >= 0.46) and (Z <= 5.59) then
begin
Result := arC[i];
//Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

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

if (i = arL + 1) then
//Writeln('AutoColor failed in finding the color.');
end;
procedure ClickLedge;
begin
if
FindColortolerance(x, y, 14424, 174, 91, 218, 162, 1) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
function LadderColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.00);

FindColorsSpiralTolerance(MSCX, MSCY, arP, 2907004, MSX1, MSY1, MSX2, MSY2, 0);
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
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 12.49) and (X <= 12.53) and (Y >= 11.93) and (Y <= 11.97) and (Z >= 4.01) and (Z <= 4.05) then
begin
Result := arC[i];
//Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;

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

if (i = arL + 1) then
//Writeln('AutoColor failed in finding the color.');
end;
procedure ClickLadder;
begin
if
FindColorTolerance(x, y, LadderColor, 3, 181, 514, 336, 5) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure WalkWall;
begin
if
FindColorTolerance(x, y, 608609, 246, 6, 288, 29, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(5000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickWall;
begin
if
FindColorTolerance(x, y, 8553356, 386, 82, 432, 134, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickWall1;
begin
if
FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure ClickWall2;
begin
if
FindColorTolerance(x, y, 6580328, 320, 146, 368, 191, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(3000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure WalkRound;
begin
if
FindColorTolerance(x, y, 608609, 388, 170, 421, 199, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;
procedure WalkEnd;
begin
if
FindColorTolerance(x, y, 5529705, 385, 129, 422, 164, 50) then
begin
MMouse(x, y, 0, 0);
Wait(500);
ClickMouse2(mouse_Left);
Wait(4000);
end else
begin
writeln('i cant find the color');
writeln('move your camera a little bit');
Terminatescript
end
end;

begin
setupsrl;
repeat
ClickRope;
WalkToLog;
ClickLog;
ClickNet;
ClickLedge;
ClickLadder;
WalkWall;
ClickWall;
ClickWall1;
ClickWall2;
WalkRound;
WalkEnd;
until (IsKeyDown(114)); // F3 to stop the script
end.

does someone knows what the best way of walking is because my walking now is just colorclicking and fails much

Im New Sry

2013-04-29 06:34:22

From: Officer Barbrady
Why not make it go up and down the ladder -.- faster xp/hr


This. Only annoying thing that happens is that screen always rotates to one or another direction by 1 degree and auto clicker will fail after some time.