SRL Archive - SRL Archives

AttackMonsterSpiral


Pwnd

2006-03-29 00:13:14

Finds the closest monster to yourself.

Thanks Bebe ;D


{*****************************************************************************
Procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
By: Bebemycat2 edited by Pwnd
Description: Now uses FindColorSpiralTolerance so it'll search from your feet out.
Finds the monster specifyed by color1,color2,color2 and MonsterName and clickss to fight it.
If it doesn't find the 3 colors then it will try for 2 out of the 3 colors 3 times
If that doesn't work then it will exit out of the procedure
*****************************************************************************}

procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
var
xa, ya: integer;
begin
xa:= 259;
ya:= 196;
if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
(Option2('Attack ' + MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
(Option2('Attack ' + MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
if(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
(Option2('Attack ' + MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
(Option2('Attack '+ MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
exit;
end;

WhiteShadow

2006-03-29 19:13:39

From: Pwnd
Finds the closest monster to yourself.

Thanks Bebe ;D


{*****************************************************************************
Procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
By: Bebemycat2 edited by Pwnd
Description: Now uses FindColorSpiralTolerance so it'll search from your feet out.
Finds the monster specifyed by color1,color2,color2 and MonsterName and clickss to fight it.
If it doesn't find the 3 colors then it will try for 2 out of the 3 colors 3 times
If that doesn't work then it will exit out of the procedure
*****************************************************************************}

procedure AttackMonsterSpiral (Color1, color2, color3 : Integer; MonsterName :String; Tolerence :integer);
var
xa, ya: integer;
begin
xa:= 259;
ya:= 196;
if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
(Option2('Attack ' + MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
(Option2('Attack ' + MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
if(FindColorSpiralTolerance(xa, ya, color2, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
(Option2('Attack ' + MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
if(FindColorSpiralTolerance(xa, ya, color1, 79, 95, 592, 429, Tolerence))and
(FindColorSpiralTolerance(xa, ya, color3, 79, 95, 592, 429, Tolerence))and
(Option2('Attack '+ MonsterName + ''))then
Mouse(x, y, 5, 5, true)
else
exit;
end;



Sweet. Grr whenever I use "else" I get an error. :mad:

Pwnd

2006-03-29 19:28:08

From: WhiteShadow
Sweet. Grr whenever I use "else" I get an error. :mad:

You're probably using it wrong..

You have to do

if()then
begin
…..
…..
end else
begin
….
….
end;

or

if()then
….
else
…..

WhiteShadow

2006-03-29 20:13:28

From: Pwnd
You're probably using it wrong..

You have to do

if()then
begin
…..
…..
end else
begin
….
….
end;

or

if()then
….
else
…..


What's the difference between end else and else?

Pwnd

2006-03-29 20:16:30

Ok, this helps if you know some java, but I'll help you out.

If()then
…
else
…

You can only put one more method after the if statement and the else.. sort of like this

if(loggedin)then
exit;
else
login;

Now, end else is for multiple things..

if(loggedin)then
begin
writeln('Logged in');
exit;
end else
begin
writeln('Not logged in');
writeln('Logging in');
Login;
end;

It's hard to read, but I was to lazy to space it out.

Hopefully you can understand that… If not, just ask again.

phantombmx

2006-03-29 20:32:31

nice! i might use this is a few weeks… dont feel bad.. just i dont have the time atm:o

WhiteShadow

2006-03-29 21:05:56

From: Pwnd
Ok, this helps if you know some java, but I'll help you out.

If()then
…
else
…

You can only put one more method after the if statement and the else.. sort of like this

if(loggedin)then
exit;
else
login;

Now, end else is for multiple things..

if(loggedin)then
begin
writeln('Logged in');
exit;
end else
begin
writeln('Not logged in');
writeln('Logging in');
Login;
end;

It's hard to read, but I was to lazy to space it out.

Hopefully you can understand that… If not, just ask again.


Thanks, I get it. I was using else like it was an end else before silly me.

Pwnd

2006-03-29 21:52:18

From: phantombmx
nice! i might use this is a few weeks… dont feel bad.. just i dont have the time atm:o

No worries. I barely made any of it. I just added the "spiral" part and where the spiral starts, so… I guess it's better in a sense.

The Un-Named

2006-03-30 04:51:49

I'll try it in my autofighter when I relese version 2.

It should work, some minor testing. I'm just lazy. XD