SRL Archive - Archive

hunt3rx3 - SRL Member Application


Shatterhand

2012-01-19 07:27:30

How Long have You Played Runescape?
6 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
Some C


Are you a member of any other communities?
Not really


Tell us about yourself…
From: hunt3rx3
Im 19, been playing RS for years. Found this site a few days ago, and started scripting immediately. Its cool, I love doing this. Im getting better and better at it.
Gonna make a lot of script.



Please show us one (or multiple) of your scripts.
program VarTab;

{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i srl/srl/misc/online.simba}

var
x, y, law, fire, clay, tab, profit : Integer;

procedure Antiban;
begin
case Random(100) of
0: PickUpMouse;
1..5: HoverSkill('Magic', False);
2: HoverSkill('Ranged', False);
3: HoverSkill('Strength', False);
end;
wait(RandomRange(2000,4000));
end;

function FindDemonLeft(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 1.37);

if not(FindColorsTolerance(arP, 10330835, 201, 140, 228, 180, 26)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 17.84) and (X <= 88.30) and (Y >= 18.43) and (Y <= 90.82) and (Z >= 19.43) and (Z <= 96.88) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 4, 4);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Talk')) then
begin;
Result := True;
Break;
end;
end;

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

if (i = arL + 1) then
begin
Exit;
end;

GetMousePos(fx, fy);
end;
function FindDemonRight(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.79);

if not(FindColorsTolerance(arP, 10330306, 290, 138, 310, 175, 27)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 14.29) and (X <= 84.59) and (Y >= 14.71) and (Y <= 87.24) and (Z >= 15.70) and (Z <= 92.50) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 3, 3);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Talk')) then
begin;
Result := True;
Break;
end;
end;

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

if (i = arL + 1) then
begin
Exit;
end;

GetMousePos(fx, fy);
end;
function FindDemonDown(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.70);

if not(FindColorsTolerance(arP, 5004429, 248, 182, 272, 213, 39)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 0.35) and (X <= 58.49) and (Y >= 0.31) and (Y <= 60.65) and (Z >= 0.17) and (Z <= 63.88) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 3, 3);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Talk')) then
begin;
Result := True;
Break;
end;
end;

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

if (i = arL + 1) then
begin
Exit;
end;

GetMousePos(fx, fy);
end;
function FindLectern(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.16, 0.99);

if not(FindColorsTolerance(arP, 9216168, 244, 128, 270, 144, 10)) then
begin
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

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

for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);

if (X >= 24.94) and (X <= 43.81) and (Y >= 25.64) and (Y <= 46.23) and (Z >= 16.45) and (Z <= 47.18) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;

SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 4, 4);
arL := High(ararP);

for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('Study')) then
begin;
Result := True;
Break;
end;
end;

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

if (i = arL + 1) then
begin
Exit;
end;

GetMousePos(fx, fy);
end;

function TalkToDemon : Boolean;
var
i, nextBMP: Integer;
begin
i:=0;
nextBMP := BitmapFromString(19, 12, 'meJyzaI43a4qxaI4Do3gIAooYlIZIO+pxq4gASSAbKGLZlmDdkQRHkoVuQCSR6wxEELZUqSeQzWOhXFRb8fb9exNnG04daZFka4iUdIU3EEHUiGU7QRBcL1CZiqE2UNfff/+AKDkvE6hXKMQIqACiF0gC1QjHWQJJ0Ux7ZMRjpgjUe/HiJYjepUuXMSuL8LppQQwHkoJRJnAE1C6UbAokgQjI5TCQFlGS3rx5C0Tv/sOHRJSlIcqAiC9YB44EIgygKFQPyGXRFBOUk+js79m1a/fp02dWrVoN5PL5aUFs4fFRQ0a8AepABGQAdcmoK86eM2fylCmzZ8+pbW5gkeYBugEoBbGF00kGE3HYSUmrygMtAiKgU31DA0C6TEWB4kBZbg95iBoICWHAEYsib2RCNFAjMIhYpHg4rMQhauDK0NQjLLUSB+pl4GMEkpi64HZh2giVQtKCpozNRJQ8BABBW6fQ');
repeat until FindDemonLeft(x,y) or FindDemonRight(x,y) or FindDemonDown(x,y)
Mouse(x,y,0,0,mouse_right); Wait(RandomRange(1000,2000));
Writeln('Talking to Demon');
repeat until WaitOption('Fe',100) Wait(RandomRange(2000,3000));
if FindBitmapToleranceIn(nextBMP, x, y, MCX1, MCY1, MCX2, MCY2, 30) then
begin
MouseBox(225,463,293,472,mouse_left); Wait(RandomRange(1000,2000));
MouseBox(118,387,400,394,mouse_left); Wait(RandomRange(1000,2000));
Writeln('Paying for Demon');
Result:=False;
Exit;
end else
begin
repeat until FindNPCChatText('Un',ClickLeft)
Result:=True;
end;
FreeBitmap(nextBMP);
end;

procedure ClickLectern;
var
tabBMP : Integer;
begin
tabBMP := BitmapFromString(45, 49, 'meJzN2GFKAzEQBeDD+MuTldJaS1jbriIe0JvoGQSDA8OSTF7eTKII80Mwm/n6drK6Tema0nVZVq3L5UXrdnvV+rq/I0vW6yaybfppdD4/5To9LrmOD+lwOO/3p93uuDV4AevzmxTjMTEqGQRsK4BRiRrI/E1AGKMSYUwBBDAiyQwxgAu9AAaTa8vIgQgjAAiv1FhEIozWvYh9Rv4qZUggtSEGCOwgEpPBd++uIRkSiHdzb1x4jckYAfDXmoF0V7oA5FECjNYOAYC5FZ4QHMWgAexmMn4pCoYhErCg2PDz4z1Xt2+9rHsMhUFGwTDMNeRhZOQjDCYQfiqkBZZ0Gcyn7k4mZuDf4kD+G4M5pPi+dG8ZkLgYoBczwNMZdUfyqdLt8gcMVxqB+zISReCktAIZjCL2R20iI/AUbUlcBrJjIJDxKKYEwj+1Wr3w/xvhw+uNYpAhksGpyD9v35WYWxYoc6siCpNRS2IYcgLrl2jAcGHwtbUBvMC2JBjDXFUz8gsCnkkeE1imUdSM1ocFHldigOGaySmAwgAY3jHwDozJCM9k4MgUw1kw5mJw9yKKZVnD524QUHypHttzEOBlkJgwQL+4njJvZPcCEGPw808C1JDrG9H2SiE=');
repeat until FindLectern(x,y);
Writeln('Clicking lectern');
Mouse(x,y,0,0,mouse_left);
repeat until FindBitmapToleranceIn(tabBMP, x, y, MSX1, MSY1, MSX2, MSY2, 30)
MouseBox(228,224,273,279,mouse_right);
repeat until WaitOption('e-All',100)
Writeln('Making tabs...');
FreeBitmap(tabBMP);
end;

procedure WhileTabbing;
begin
repeat
Wait(1000);
Antiban;
FindNormalRandoms;
until (InvCount=4) Wait(RandomRange(2000,6000));
profit:=profit+24*(tab-law-clay-fire);
ClearDebug;
Writeln('Time running: '+TimeRunning+' Profit made: '+IntToStr(profit));
end;
var
nextBMP : Integer;

begin
Smart_Server := 20;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
law:=GetGEPrice('Law rune');
fire:=GetGEPrice('Fire rune');
clay:=GetGEPrice('Soft clay');
tab:=GetGEPrice('Varrock teleport');
profit:=0;
ClearDebug;
Writeln('Starting script. Current profit per tab: '+IntToStr(tab-clay-fire-law));
ToggleXPBar(True);
ToggleMoneyPouch(False);
repeat until (InvCount=4)
while LoggedIn do
begin
repeat until TalkToDemon
repeat until (InvCount=28); Wait(RandomRange(500,3000));
ClickLectern;
WhileTabbing;
end;

end.

RISK

2012-01-19 07:29:40

Can you post the script in
 tags in your post, please? It would make it much easier to review it.

Thanks.

Bobzilla69

2012-01-19 07:29:58

[offtopic] wow you made all of those scripts (he linked first script section of forums)[/offtopic]

think he meant to link this

also i vote no, very basic for me, you should take a look at the tutorials.

edit:
you repeats alot of code and seem to use autocolor procedure to find mouse location in same function, what is it find color in wrong location?
need failsafes.

Shatterhand

2012-01-19 07:34:30

From: Bobzilla69
you repeats alot of code and seem to use autocolor procedure to find mouse location in same function, what is it find color in wrong location?
need failsafes.

Umm wat do u mean? It looks for the colors with the 'talk' option in given boxes. It wont click on anything else.

Bobzilla69

2012-01-19 09:12:15

From: hunt3rx3
Umm wat do u mean? It looks for the colors with the 'talk' option in given boxes. It wont click on anything else.


so if it click on another object, lets say another npc, not the one intended, it would select talk wouldn't it?

Shatterhand

2012-01-19 10:33:37

From: Bobzilla69
so if it click on another object, lets say another npc, not the one intended, it would select talk wouldn't it?


Oh i see, but theres only 1 npc in the poh.
How to do it in the other way? (not needed for this script, but..)

Bobzilla69

2012-01-19 10:44:31

if there is only one NPC and no change of another you should be fine but you can condense all your procedures down, you whave like 2-3 for finding the demon where as one can be used and you simply provide changes to it, in your case its color.

Flight

2012-01-19 10:50:37

This is kinda surprising. Just in case, I'm gonna wait and see what YoHoJo says, being our Copy-Buster after all.

Shatterhand

2012-01-19 10:57:08

From: Bobzilla69
if there is only one NPC and no change of another you should be fine but you can condense all your procedures down, you whave like 2-3 for finding the demon where as one can be used and you simply provide changes to it, in your case its color.


I made different ones, cause each function checks the colors in different "boxes". So it wont click the NPC if its not next to me in those three spots.

Bobzilla69

2012-01-19 10:58:32

which is why i said you can provide the info to it so only one would be needed. i am sure there are tutorials on this

Hobbit

2012-01-29 18:32:57

The poll has closed and you didn't quite make it this time. Please take the suggestions made here and read some more in the tutorial section and improve your script. You may reapply in 4 weeks time.


Cheers
Hobbit