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)
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.


