Could you explain Random(); for a bit?
Random(x): Integer; returns a random integer (number), anywhere from 0 to x. So if x is 9001, it could be 0, 1, 2, 3, ... 9000, 9001. Hope that helps.
Well, the random is all about chances if something will happen. So, if we have Random(8), 8 becomes the denominator in a fraction. If we have 3 other options to execute in the script, there is a 1/8 chance that each one of those will happen. Since we only have three other options, there is a 5/8 chance that nothing at all will execute.
thinks a lot at least i know some thing about making scripts now.... off to learn how to walk
Very nice tutorial, I especially like how you show all the smaller pieces of code while you are explaining them instead of putting one mass of code up and trying to explain it all afterwards. Very good at explaining everything overall, maybe expand on it or post a tutorial on other things not described in this tutorial but still commonly used in tree cutting scripts.
thanks great tut.
like the layout.
ill def be checking out some more of ur tuts.
thanks
wow it works very well after a few tweaks.
again, thanks for the amazing guide.
my first script... Done.
now its time to develop it so i can use it for more than 1 trip and add some more AntiBan.
had a problem with clicking oaks instead of normals due to the colour similarities.
is there a way to get round this easily, thought of checking uptext or something.
thanks again
Edit: Sorry for the double post didn't realise i was the last.
Last edited by mounty1; 01-06-2010 at 01:17 AM. Reason: double post
Thanks for the tutorial Griff, it's nice and I've found that I could easily model this into another similar application like a power miner (well attempting too )
By the way, I think I may have stumbled across a little typo:
I am not sure if the semi-colon was intentionally there, but I'll check any waysCode:; Begin your procedure, and then write
~ Craig`
Last edited by Craig`; 01-06-2010 at 07:35 AM.
I have tried to run this, it compiles but gives the following error
[Runtime Error] : Exception: Can't allocate the DIB handle in line 545 in script C:\Users\twobac\Desktop\scarprerelease\includes\SR L\SRL\Core\Text.scar
which is
FindColorsTolerance(TPA, 4016722, B.X1, B.Y1, B.X2, B.Y2, 0);
Any ideas?
ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457
Thanks for the quick reply, think ur tut is pretty good, learnt a couple of things already just from reading it.
This is now a basic Ivy cutter and works pretty well. What function makes the inventory tab being displayed all the time, is it the InvFull procedure?
Thanks again for the tut.
Last edited by twobac; 03-23-2010 at 04:09 AM.
ScarPreRelease 3.23 rev 80, Includes - Dev Rev 457
I did everything step by step it still says cant identify HowManyPlayers in line 5 what can I do?
Nice tutorial I managed to edit the script so it works as a miner instead of logging. How can I set it so that it will click a different rock after it has clicked the current one? I don't want to make a script for use but for learning purposes so it doesn't have to be the safest method. ; )
It shows me these error
[Error] (25:1): Type mismatch at line 24
Compiling failed.
And it says that the mistake is on here:
program New;
{.include srl/srl.scar}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
Procedure ChopTree;
Var x,y: Integer;
Begin
If FindObj(x,y,'hop',1785912, 35)Then
Mouse(x,y,0,0, False);
ChooseOption('Hop')
Repeat
Wait(1200+random(250));
Until not IsUpText('yew')or('InvFull')
Until('InvFull')
End;
begin
SetUpSRL;
ActivateClient;
end.
I think the tutorial is out of date seen as we use simba now not scar
And last post was over a year ago but anyway
It look like you have 2 until. But onlyt one repeat
program New;
{.include srl/srl.scar}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
end;
Procedure ChopTree;
Var x,y: Integer;
Begin
If FindObj(x,y,'hop',1785912, 35)Then
Mouse(x,y,0,0, False);
ChooseOption('Hop')
Repeat
Wait(1200+random(250));
Until not IsUpText('yew')or('InvFull')
Repeat
Wait(1200+random(250));
Until('InvFull')
End;
Procedure AntiBan;
Begin
If(Not LoggedIn))then
Exit;
Case;Random(8)of
0:
Begin
HoverSkill('Woodcutting'),false)
Wait(2453+random(432));
End
1:PickUpMouse;
2:
Begin
MakeCompass('N');
Wait(100)+random(133));
MakeCompass('S');
Wait(50+random(133));
MakeCompass('N')
End;
End;
End;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
ChopTree;
end.
Got this error
[Error] (25:1): Type mismatch at line 24
Compiling failed.
Stickyfied!
SRL is a Library of routines made by the SRL community written for the Program Simba.We produce Scripts for the game Runescape.
Use Simba tags.
Simba Code:Until not IsUpText('yew')or('InvFull')
Why did you put InvFull in ' ' ? Everything between ' ' compiler recognise as string. So you placed String instead of Boolean in logical statement and got type mismatch error.
Additionally everything related with not should be in bracket. Try:
Simba Code:Until not(IsUpText('yew')or(InvFull))
Thanks! And I don't know if you were behind it, but I like the tut cup too
Maybe all this calls for an update of the tutorial!
@Gaston: It won't compile right now, check back in a few days for an update (I'll probably get it done once my Christmas holidays start), but for now the main ideas still work
Last edited by Griff; 12-22-2011 at 12:49 AM.
I plan on reading through this and the other stickies a few more times so I'll hopefully have a grasp on what I'm doing when my computer comes in the mail and I can gtfo this iPad (iPads are nice btdubs GET ONE )
one of the better tutorials out there after generally finding my way around it with all the programs i should soon be able to construct a basic script also very clear and helpful instructions very easy to follow.
when i do either of these functions it just hovers the inventory icon (the little bag) and does nothing... this is how i call it;
Simba Code:repeat
CutTreesOrWE;
until(invcount = 20) or (InvFull));
and doesnt work so i make my own FindcolorSpiral(); to find the log(cuz its wc script) in a certain Inventbox with custom xs,ys,xe,ye and works pretty good ^^
There are currently 1 users browsing this thread. (0 members and 1 guests)