SRL Archive - Other Scripts

(Dutch TribalWars) Farming bot


Laur€ns

2008-07-12 10:05:03

This is another script I made (simple) :)
Just say what you think and about the standards…

program New;
{.include SRL/SRL.scar}
var
attacks: integer;

const
Coord1 = 489; //Coordinaten dorp 1 (x-axis)
Coord2 = 610; //Coordinaten dorp 2 (y-axis)
WaitingTime = 1080000; //Time for troops to visit village
AttacksToDo = 1000; //Number of attacks

Speer = True; //Use spear?
Sword = False;
Axe = False;
Bow = False;

Scout = False;
LightCav = False;
HorseBow = False;
Heavy Cav = False;

Ram = False;
Catapult = False;

Paladin = True;
Nobleman = False;

procedure MainScreen;
begin
Mouse(324,269,2,2,True);
end;

procedure Map;
begin
Mouse(272,269,2,2,True);
end;

Procedure ClickVillage;
begin
Mouse(Coord1,Coord2,2,2,True);
end;

Procedure SendTroops;
begin
Mouse(230,450,2,2,True);
end;

Procedure Clickall;
begin
if Spear then
Mouse(355,443,0,0,True);
if Sword then
Mouse(355,471,0,0,True);
if Axe then
Mouse(355,493,0,0,True);
if Bow then
Mouse(355,522,0,0,True);
if Scout then
Mouse(506,443,0,0,True);
if LightCav then
Mouse(506,467,0,0,True);
if HorseBow then
Mouse(506,497,0,0,True);
if HeavyCav then
Mouse(506,527,0,0,True);
if Ram then
Mouse(661,443,0,0,True);
if Catapult then
Mouse(661,468,0,0,True);
if Paladin then
Mouse(815,445,0,0,True);
if Nobleman then
Mouse(815,470,0,0,True);
end;

procedure Attack;
begin
Mouse(600,555,0,0,True);
end;

Procedure Confirm;
begin
Mouse(174,534,0,0,True);
attacks:=attacks+1
end;

Procedure Proggy;
begin
writeln('* '+inttostr(attackstodo)+' attacks to do');
if attacks = 1 then
writeln('* '+inttostr(attacks)+' attack done!');
if attacks > 1 then
writeln('* '+inttostr(attacks)+' attacks done!');
writeln('* '+inttostr(AttacksToDo-attacks)+' attacks to go');
writeln('\******************************/');
writeln(' Running for '+TimeRunning+'!');
end;
{Mainloop}
begin
SetupSRL;
GetApplication.MiniMize
repeat
Cleardebug;
MainScreen;
Map;
ClickVillage;
SendTroops;
ClickAll;
Attack;
Confirm;
Proggy;
Wait(WaitingTime);
Wait(WaitingTime);
until(Attacks > attackstodo);
end.

3Garrett3

2008-07-12 10:11:25

Ahh. TribalWars. I just recently quit that game. Such a simple game, yet suprisingly addictive. Oh well. I can't understand because its dutch. I could look through the script more, but it would involve lots of confusion with the language.

Laur€ns

2008-07-12 10:18:08

(translating.. :p)

3Garrett3

2008-07-12 10:29:21

Oh.. Well that makes sense. I was thinking of maybe having some sort of Case for the troops it sends, but I dont know.. hmm.. I cant think of how to make it shorter. I am really rusty at scripting though, I havnt made a real attempt at scripting since like.. November. But ya. I'm blanking right now. If you have msn, you could add me. Or I could scroll up and see if you do. Ok. It appears you do have msn. Add me then:

[email]maniac234@hotmail.com[/email]

You can just chat it up with me if you want about this. Maybe I will think of something to help you out in a second.