Log in

View Full Version : Need help with script please :) ((BattleScape))



noobscam
09-11-2010, 12:00 PM
Okay first off I just have to say; wow ... I mean, I remember using SRL and SCAR since like ... 2004 ? ;P I thought it got removed.

Ok, so here we go. Uhm, I'm currently trying to make a simple script that fishes manta rays on BattleScape..

Yes, I am a noob, and I can't really code this stuff lol, started 5 minutes ago.

This is what I've got:


program NewFish;
var
amin,gamin,vamin,hamin:integer;
procedure FishingMantas;
begin
vamin := 500 + random (78);
wait (vamin)
Writeln('Fishing Mantas...')
Hamin := 500 + random(70);
wait(hamin);
MoveMouse(567,237)
Hamin := 500 + random(70);
wait(hamin);
ClickMouse(567,237,False)
Gamin := 100 + random (400);
wait(gamin);
MoveMouse(557,269)
Hamin := 500 + random(70);
wait(hamin);
ClickMouse(557,269,True)
Amin := 2000 + random(500);
wait (amin);
vamin := 500 + random (78);
wait (vamin)
Writeln('Fishing Mantas...')
Hamin := 500 + random(70);
wait(hamin);
MoveMouse(567,237)
Hamin := 500 + random(70);
wait(hamin);
ClickMouse(567,237,False)
Gamin := 100 + random (400);
wait(gamin);
MoveMouse(557,269)
Hamin := 500 + random(70);
wait(hamin);
ClickMouse(557,269,True)
Amin := 2000 + random(500);
wait (amin);

end;

//--------------------------------------------------------------------

procedure WalkingToBank;
begin
vamin := 500 + random (78);
wait (vamin)
Writeln('Walking to Bank...')
Hamin := 500 + random(70);
wait(hamin);
MoveMouse(955,16)
Hamin := 500 + random(70);
wait(hamin);
ClickMouse(955,16,True);
Amin := 2000 + random(500);
wait (amin);
WalkingToBank;
repeat

until(False);
end;
begin
end.
//BattleScape FishingBot ;))


Well, what happens is, first, I got it working with only the fishing (without banking)..
Then, I tried to add banking, so I started testing. The banking part is not finished.. But I tried running it, after adding the bank part, but, however, it just said "Successfully compiled" and then "successfully executed" and stopped.. Please help me ? Feel free to also give me some advise please :redface:

Freddy1990
09-12-2010, 03:57 PM
You have to call your procedures in the main method, for example at the bottom it should say:

begin
FishingMantas;
end.

I don't think that scripts should compile though, unless you're using a very outdated copy of SCAR, get the beta release of SCAR 3.25 here: http://freddy1990.com/svn/scarprerelease/ It's very stable, when using it I suggest moving to WindMouse it will work far more efficiently, instead of
MoveMouse(557,269)
Hamin := 500 + random(70);
wait(hamin);
ClickMouse(557,269,True)
you'd just put
ClickWindMouse(557, 269, 0, 0, True);

Make sure you put a semicolon after every line of code with the exception of keywords like then, do and begin.
Finally, you don't have to store the wait time in variables, you can just do
Wait (2000 + random(500));
instead of
Amin := 2000 + random(500);
wait (amin);

noobscam
09-13-2010, 08:39 AM
Oooh thank you very much ! ;D Yeah, I did use an outdated version of SCAR lol, from like 2007/2008 xDD so thank you for your help :)


EDIT: Do you have any tips for me that could help?

Freddy1990
09-13-2010, 10:06 AM
I'm assuming that BattleScape is a private server, so you shouldn't really have to worry about much, a simple script will suffice for it...

noobscam
09-13-2010, 01:05 PM
Yes, that's right, but I was thinking if you had any tips to improve my script ;D

Freddy1990
09-14-2010, 12:26 AM
Well, unless you're going to add an Exit somewhere I'd remove WalkingToBank from WalkingToBank or you're going to fail at recursion :p

noobscam
09-14-2010, 09:27 AM
Haha, ok thanks :) and thank you for your replies :D