SRL Archive - Gaming

Fantasy online request


fungo

2013-05-07 11:16:31

Hi evryone
i play this game Fantasy online
i'd like to make a script for have an auto-attack
i've found this but does'nt work:

#####

program AutoFighter;

var
x,y: Integer;

const

procedure Attack;
begin
If FindColorTolerance(x, y, 255, 155, 154, 564, 214, 726, 451, 5) then
begin
Writeln('Found NPC > Attacking!')
MoveMouse(x,y+random(3));
wait(randomrange(25,50));
ClickMouse(x,y,mouse_Left);

Wait(5000); //MS to wait. 1000 = 1sec
end;
end;

begin
repeat

Attack; //Procedure Attack

until(false);
end.

#######

The error is
Desktop\123.simba(9:1): Identifier expected at line 8
Compiling failed.

Can some on help me or make a new script?
THanks a lot!!!

Chris!

2013-05-08 06:26:07

You have too many things in your FindColorTolerance line!

If FindColorTolerance(x, y, 255, 155, 154, 564, 214, 726, 451, 5) then

All you need in it are these:


So, for example:

if FindColorTolerance(x, y, examplecolour, xs, ys, xe, ye, tol) then

Also, to get a colour use the colour picker tool in Simba.

I removed some of the numbers in there and it compiled so yeah, there's your problem. :)