• Log in or sign up for an account here: https://www.sythe.org/login

simple autoranger

the scar noob

Forum Addict
Joined
Jan 21, 2007
Sythe Gold
0
Messages
620
Hello i made this autoranger this night (it's 03:48 pm right now) so i dunno if it actually works, or if it works good.
It picks up the arrows and it also equips them when there are 25 or more arrows found in the inventory.
It also needs when your hp get low (setted as a const) by using realeatifneeded .
Plz post comments, bugs, proggys or whatever :)

I'M GOING TO SLEEP NOW IT'S 04:04 pm now!!

Code: (also attached as a .txt file)

{
This is a simple autoranger that i've made in like +- 1 hour
(maybe a litlle bit more) so i dunno if it works perfect.
Plz post comments, bugs, proggys or whatever
}
program SimpleRanger;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
{.include SRL/SRL/Skill/Ranging.scar}


var
killed :Integer;


const
killnumbah = 50;
pickarrows = True;
arrowcolor = 0;
foodcol = 0;
eathp = 10;
col1 = 0;
col2 = 0;
col3 = 0;
name = '';


procedure DeclarePlayers;
begin
HowManyPlayers :=3; //Note: 0 counts as a player too
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;


Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;


Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=True;

end;


procedure NoBan;
begin
case random(10) of
0: HoverSkill('random', False);
1: Hoverskill('ranged',False);
2: RotateEvery(20 + Random(10));
3: LeaveScreenEvery(5 + Random(5));
4: HoverEvery(15 + Random(5), 'magic');
5: begin
GameTab(1+random(12));
GameTab(4);
end;
6: PickUpMouse;
7: BoredEvery(9 + Random(24));
8: DoEmote(1 + Random(20));
end;
end;


function pickuparrows :Boolean;
begin
if(pickarrows)then
begin
repeat
if(findobj3(x,y,'ake',arrowcolor,2))then
begin
ChooseOption(x,y,'ake');
wait(300);
end;
until(not(findobj3(x,y,'ake',arrowcolor,2)))
end else
exit;
end;



procedure equipthearrows;
begin
if(InvArrows >=25)then
begin
EquipArrows;
FindNormalRandoms;
wait(500);
end;
end;


procedure RandomClicker;
begin
case random(3) of
0: begin
Mouse(x,y,1,1,True);
end;

1: begin
ChooseOption(x,y,'ttack');
end;

2: begin
Mouse(x+random(3),y-random(2),0,0,True);
end;
end;
end;


procedure fight;
begin
repeat
if(findcolorspiraltolerance(x,y,col1,MSX1,MSY1,MSX 2,MSY2,10))then
begin
MMouse(x,y,2,2);
wait(250+random(100));
FindNormalRandoms;
end;
until(IsUpTextMulti('ack','ttac',name))
RandomClicker;
NoBan;
FindNormalRandoms;
OutFight;
killed := killed + 1
realeatifneeded(foodcol, eathp, True);
pickuparrows;
equipthearrows;
FindNormalRandoms;
end;


procedure report;
begin
Writeln('The script is running for: '+TimeRunning);
Writeln('You killed a total of '+IntToStr(killed)+' monsters.');
Writeln('THanks you for using my autoranger and plz post comments and bugs ');
end;


begin
SetupSRL;
DeclarePlayers;
ActivateClient;
repeat
fight;
until(killed>=killnumbah)
report;
Logout;
NextPlayer(True);
end.
 
an auto fighter? lol nice...use randomhuman command to make it more antiban ;D
 
randomhuman command even doesn't excist, probably you wanne says something else :)
But however it has anti ban functions ;)
 
doesnt click lke 99% of the time so takes like 20 mins to get monster. also, need to choose attack style. good start tho. ur on ur way man!
EDIT: fixed it up a bit, but im not sure if there is a procedure to check if your health bar is showing, because this...
Code:
repeat
if(findcolorspiraltolerance(x,y,col1,MSX1,MSY1,MSX2,MSY2,10))then
begin
//MMouse(x,y,2,2);
Mouse(x,y,1,1,true);
wait(250+random(100));
FindNormalRandoms;
end;
until(IsUpTextMulti('ack','ttac',name))
keeps pressing sometimes
 
one more thing: it misses picking up the arrows a lot and picks up other items.
Code:
ChooseOption(x,y,'ake');
doesnt work for some reason...
 
cool i dint try it yet
 
omg i'm not a first time i only made this bad script at like 4 pm, should i make it better ot just close t his thread?
Because i know what to do, for example:
repeat
if(findcolorspiraltolerance(x,y,col1,MSX1,MSY1,MSX2,MSY2,10))then
begin
MMouse(x,y,2,2);
Mouse(x,y,1,1,true);
wait(250+random(100));
FindNormalRandoms;
end;
until(IsUpTextMulti('ack','ttac',name))
error
it has to be
repeat
if(findcolorspiraltolerance(x,y,col1,MSX1,MSY1,MSX2,MSY2,10))then
begin
MMouse(x,y,2,2);
wait(250+random(100));
FindNormalRandoms;
end;
until(IsUpTextMulti('ack','ttac',name))
Mouse(x,y,1,1,true);
because after the text is attack is should click, not in that repeat/until...
So what should i do? Make it better or close this thread?
 
works for me, Needs a few touch ups, make it look more formal.
 
Runescape Gamblingrunescape gambling
Back
Top