PDA

View Full Version : Unfinished Dharok Bot Near-Reality



Irae
09-03-2012, 09:33 AM
By no means is this bot done I'm still working on it and want to see what people think :D

program DharokBot;
{$i srl\srl.simba}
const
Dharok_the_Wretched = 4071801;
HELM = 5735316;
PLATEBODY = 5735316;
GREATAXE = 5735316;
PLATELEGS = 5735316;
var
x, y, w, h, kills: integer;
Procedure Pickuphelm;
begin
if srl_infight = false then
if(FindColor(x, y, HELM, MSX1, MSY1, MSX2, MSY2))then
begin Mouse(x, y, 1, 1, true);
end;
end;
Procedure Pickupbody;
begin
if srl_infight = false then
if(FindColor(x, y, PLATEBODY, MSX1, MSY1, MSX2, MSY2))then
begin Mouse(x, y, 1, 1, true);
end;
end;
Procedure Pickuplegs;
begin
if srl_infight = false then
if(FindColor(x, y, PLATELEGS, MSX1, MSY1, MSX2, MSY2))then
begin Mouse(x, y, 1, 1, true);
end;
end;
Procedure Pickupaxe;
begin
if srl_infight = false then
if(FindColor(x, y, GREATAXE, MSX1, MSY1, MSX2, MSY2))then
begin Mouse(x, y, 1, 1, true);
end;
end;
Procedure prayers;
begin
Movemouse(708, 150)
Wait(500)
Clickmouse(708, 150, 1)
end;

Procedure prayersmelee;
begin
Movemouse(678, 310)
Wait(500)
Clickmouse(678, 310, 1)
end;

procedure KillDharok;
begin
GetClientDimensions(w, h);
if srl_infight = false then
if FindColor(x, y, Dharok_the_Wretched, 0, 0, w-1, h-1)then
begin
Mouse(x, y, 0, 0, True);
Writeln('Dharok Found!');
wait(50000);
Inc(kills);
end else
wait(100);
end;
procedure WaitDharok;
begin
GetClientDimensions(w, h);
if srl_inFight = true then
if FindColor(x, y, Dharok_the_Wretched, 0, 0, w-1, h-1)then
end;

begin
ClearDebug;
SetUpSRL;
Prayers;
Prayersmelee;

repeat

pickuphelm;
pickupbody;
pickuplegs;
pickupaxe;
Waitdharok;
Killdharok;

until
end.

Oxygen
09-03-2012, 02:32 PM
There is no SRL_infight anymore. Flight has a script that makes animation a breeze.

Olly
09-03-2012, 05:46 PM
There is no SRL_infight anymore. Flight has a script that makes animation a breeze.

Function srl_InFight: Boolean;
begin
Result := InRange(Length(GetFightBarTPA(MFBox)), 30, 240);
end;

Hmm..?

print
09-03-2012, 05:47 PM
what does this do?

Vinyl Scratch
09-03-2012, 06:04 PM
program DharokBot;
{$i srl\srl.simba}

const
Dharok_the_Wretched = 4071801;
HELM = 5735316;PLATEBODY = 5735316;
GREATAXE = 5735316;PLATELEGS = 5735316;

var
x, y, w, h, kills: integer;

Procedure Pickuphelm;
begin
if srl_infight = false then
if(FindColor(x, y, HELM, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure Pickupbody;
begin
if srl_infight = false then
if(FindColor(x, y, PLATEBODY, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure Pickuplegs;
begin
if srl_infight = false then
if(FindColor(x, y, PLATELEGS, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure Pickupaxe;
begin
if srl_infight = false then
if(FindColor(x, y, GREATAXE, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure prayers;
begin
Movemouse(708, 150) Wait(500) Clickmouse(708, 150, 1);
end;

Procedure prayersmelee;
begin
Movemouse(678, 310);
Wait(500);
Clickmouse(678, 310, 1);
end;

procedure KillDharok;
begin
GetClientDimensions(w, h);
if srl_infight = false then
if FindColor(x, y, Dharok_the_Wretched, 0, 0, w-1, h-1)then
begin
Mouse(x, y, 0, 0, True);
Writeln('Dharok Found!');
wait(50000);Inc(kills);
end else
wait(100);
end;

procedure WaitDharok;
begin
GetClientDimensions(w, h);
if srl_inFight = true then
if FindColor(x, y, Dharok_the_Wretched, 0, 0, w-1, h-1)then
end;

begin
ClearDebug;
SetUpSRL;
repeat
Prayers;
Prayersmelee;
repeatpickuphelm;
pickupbody;
pickuplegs;
pickupaxe;
Waitdharok;
Killdharok;
until(not(LoggedIn);
end.

Cleaned up, didn't change how it works, but this is easily read now.

It looks good, other then the un-needed begin... -one line of code-... end; 's

You should also work on your procedures, too.

But hell, better then my first script. It was a yew powerchopper. -.-.. I had forgotten the main loop in it.

Oh well. Best of luck, PM me if you need any help!

E: ... I re-did it in notepad, any mistakes are because I don't have simba on this computer. (I'm at my mom's work.)

Sin
09-03-2012, 07:50 PM
What exactly is this for if I may ask?

Olly
09-03-2012, 07:57 PM
Unfinished Dharok Bot Near-Reality - for the Near-Reality private server, guess it kills the barrow's brothers.

Irae
09-04-2012, 02:18 AM
program DharokBot;
{$i srl\srl.simba}

const
Dharok_the_Wretched = 4071801;
HELM = 5735316;PLATEBODY = 5735316;
GREATAXE = 5735316;PLATELEGS = 5735316;

var
x, y, w, h, kills: integer;

Procedure Pickuphelm;
begin
if srl_infight = false then
if(FindColor(x, y, HELM, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure Pickupbody;
begin
if srl_infight = false then
if(FindColor(x, y, PLATEBODY, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure Pickuplegs;
begin
if srl_infight = false then
if(FindColor(x, y, PLATELEGS, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure Pickupaxe;
begin
if srl_infight = false then
if(FindColor(x, y, GREATAXE, MSX1, MSY1, MSX2, MSY2))then
begin
Mouse(x, y, 1, 1, true);
end;
end;

Procedure prayers;
begin
Movemouse(708, 150) Wait(500) Clickmouse(708, 150, 1);
end;

Procedure prayersmelee;
begin
Movemouse(678, 310);
Wait(500);
Clickmouse(678, 310, 1);
end;

procedure KillDharok;
begin
GetClientDimensions(w, h);
if srl_infight = false then
if FindColor(x, y, Dharok_the_Wretched, 0, 0, w-1, h-1)then
begin
Mouse(x, y, 0, 0, True);
Writeln('Dharok Found!');
wait(50000);Inc(kills);
end else
wait(100);
end;

procedure WaitDharok;
begin
GetClientDimensions(w, h);
if srl_inFight = true then
if FindColor(x, y, Dharok_the_Wretched, 0, 0, w-1, h-1)then
end;

begin
ClearDebug;
SetUpSRL;
repeat
Prayers;
Prayersmelee;
repeatpickuphelm;
pickupbody;
pickuplegs;
pickupaxe;
Waitdharok;
Killdharok;
until(not(LoggedIn);
end.

Cleaned up, didn't change how it works, but this is easily read now.

It looks good, other then the un-needed begin... -one line of code-... end; 's

You should also work on your procedures, too.

But hell, better then my first script. It was a yew powerchopper. -.-.. I had forgotten the main loop in it.

Oh well. Best of luck, PM me if you need any help!

E: ... I re-did it in notepad, any mistakes are because I don't have simba on this computer. (I'm at my mom's work.)

Thanks so much! you have no idea how long i have been working on this. More of an accurate description would be that this is not my "first" one but one that I actually wanted to be worthy of use for other players so I count it as my first :P

I also have another question I'm kinda lost on how to make it to where I can add another few functions to the repeat but only have them do it once like turn on prayer since on near reality on log on prayer is reset back to full so basically I'm trying to get...

Start logged on near dharok
Kill them/pick up drops
Log out after certain amount of time
log in and turn on melee prayer and repeat

But I don't know what to do with it :/

Irae
09-04-2012, 02:20 AM
Unfinished Dharok Bot Near-Reality - for the Near-Reality private server, guess it kills the barrow's brothers.

spot on. ^^ still in progress though.

Irae
09-04-2012, 02:22 AM
What exactly is this for if I may ask?

For the Near-Reality private server for Runescape to kill a specific monster.

jcunit
09-12-2012, 03:32 AM
Have you figured out the srl_infight thing? I can't figure out how I can use it... I'm trying to use it for SoulSplit. Here is my code:

program SkeletonFighter;
{$i SRL/SRL.simba}
const
Skeleton = 8950676;

var
x, y, w, h, kills: integer;

Function srl_InFight: Boolean;
begin
Result := InRange(Length(GetFightBarTPA(MFBox)), 30, 240);
end;

procedure FightSkeleton;
begin
if srl_InFight = false then
if(FindColor(x, y, Skeleton, MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y, 1, 1, true);
end;
end;


begin
SetUpSRL;
FightSkeleton;
end.
The error I get:

[Error] (11:10): Duplicate identifier 'SRL_INFIGHT' at line 10

Vinyl Scratch
09-12-2012, 11:43 AM
Take out the function, you have SRL included, you don't need the function in there.

@Irae, You're going to have to use some co-ords, using like, MMouse(Coord, coord, 3, 3);

If you want, I can throw a procedure together for you. PM me when needed.

jcunit
09-14-2012, 02:05 AM
I thought SRL stuff didn't work for rsps'...

Vinyl Scratch
09-14-2012, 02:50 AM
Most does, uptext doesn't, because the fonts are different.

rizmanist
09-19-2012, 09:20 PM
atlast a rsps bot :)