SRL Archive - FAQ

How the Bot nuke update effects current tutorials.


RuneShadow

2011-11-05 17:43:15

Ive recently come over here from powerbot to continue writing scripts for macro clients, i used to be a good script writer with 5 scripts. Now ive come over here to continue writing scripts, but first the scripting was a bit different so i decided to go through some of the tutorials. Most were very simple and i understood them, however, when i tried to get my script to run it would not work. All the script had to do was click on colors, but when i started it the mouse just went to the top right hand corner of the screen and did nothing. So i just copied and pasted the tutorial script and ran it, and it did the exact same thing.

Now i noticed that the tutorial was kinda old, so im just wondering if there are any new tutorials which show you how to script after the nuke update?

Jakkle

2011-11-05 18:00:48

You could go learn MSI and help out here http://villavu.com/forum/showthread.php?t=57726

weequ

2011-11-05 18:02:04

From: RuneShadow
Ive recently come over here from powerbot to continue writing scripts for macro clients, i used to be a good script writer with 5 scripts. Now ive come over here to continue writing scripts, but first the scripting was a bit different so i decided to go through some of the tutorials. Most were very simple and i understood them, however, when i tried to get my script to run it would not work. All the script had to do was click on colors, but when i started it the mouse just went to the top right hand corner of the screen and did nothing. So i just copied and pasted the tutorial script and ran it, and it did the exact same thing.

Now i noticed that the tutorial was kinda old, so im just wondering if there are any new tutorials which show you how to script after the nuke update?
Color clicking script would be the same. Can you post the script so we can take a look at what's wrong?

Nava2

2011-11-05 18:05:27

Usually when the mouse does that, its because you didn't set your parameters correctly.

If you post some code, it would greatly help us!

What I mean is:


var
x,y:Integer;
begin
FindColor(x,y, COLOUR, MSX1,MSY1,MSX2,MSY2); // was findcolor false? If it was, x,y will be 0!
Mouse(x,y,0,0);
end;

E: Also, the nuke does not have any effect on tutorials that are colour based.. we just have some legacy tutorials in there.

Markus

2011-11-05 18:58:42

you didn't target runescape with the crosshairs, did you? Also I don't see which colour you are looking for in the findcolor (as it takes 7 arguments, not 6)

BraK

2011-11-05 19:35:48

From: Nava2
Also, the nuke does not have any effect on tutorials that are colour based.. we just have some legacy tutorials in there.


I've been working on getting rid of the Legacy Tutorials for awhile >.>

RuneShadow

2011-11-05 20:15:19

This is what ive done so far, currently just learning the different api and will do some more advanced stuff later. I cant find the exact tutorial that i used, but i do know that it was old. Heres the code

program DeclarePlayers;
{$i srl/srl/misc/smart.scar}
{$i srl/srl.scar}

Const
treecolor1=2118737;
timetochop=5000;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins'];
end;

procedure Antiban;
begin
case Random(60) of
10: RandomRClick;
20: HoverSkill('Mining', False);
30: PickUpMouse;
40: RandomMovement;
50: BoredHuman;
59: ExamineInv;
end;
end;

procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := 'woodcutting';
LevelUp;
end;

procedure chop;

var x,y :Integer;
begin
if(FindColorSpiralTolerance(x,y,treecolor1,msx1,msy1,msx2,msy2,25))then
MMouse(x,y,3,3);
if(IsUpText('hop'))then
begin
GetMousePos(x,y);
Mouse(x,y,3,3,true);
end;
end;

procedure treewait;
begin
Wait(timetochop)
end;



begin
Smart_Server := 15;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;

ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
ActivateClient;

repeat
treewait;
chop;
Antiban;
AntiRandoms;
until(false)

end.

What am i doing wrong lol?

Infantry001

2011-11-05 21:53:55

I don't think you're doing anything wrong - perhaps FindColor is not finding the color?

Try something like this:


if FindColor(...) then
begin
...
end else
Writeln('Did not find tree color!');

So, if the script doesn't find the tree color, it will output "Did not find tree color" into the debug box at the bottom.