PDA

View Full Version : YoHoJo Video Tutorial #2: Making your VERY FIRST script for RUNESCAPE



YoHoJo
12-13-2011, 06:14 PM
Part 1:
http://youtu.be/qfumZWrm_DE?hd=1
46 Minutes 39 Seconds


Part 2:
http://youtu.be/QhgZZmoD0Yc
47 Minutes 07 Seconds


Yes, they run a bit long, but no one said scripting was easy (it is :p) and it takes time to learn and explain things! If you no longer want to be a leecher noob failface I suggest you get cozy and watch them!

They are a bit long and sloppy because I did them 'on the spot' instead of planning them out and using a premade script.
I wanted you guys to see the process from scratch and all of the common problems and roadbumps scripters have to deal with regularly.
I felt doing it this would would be a more 'real' and helpful experience compared to just reading though a premade script.
Sorry they are a bit long and sloppy, but I feel this was the best way to make them and hope you guys enjoy!

Post any questions here, and feel free to leave comments on the videos themselves too if you wish.

I can help further explain anything covered in the videos here, so don't be shy and ask away!


If you enjoy my video tutorials, please feel free to https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4KJKW5C772ATS),it would really mean a lot!

shstiger2009
12-13-2011, 06:33 PM
YES. YES. Finally! Will be watching as soon as I get home from work. Your video tuts are so helpful!

Thanks. :p

Kyle Undefined
12-13-2011, 07:40 PM
Awesome job YoHoJo! :D This should help the new people out!

H_N
12-13-2011, 08:19 PM
Great tutorial, shame about the coughing :p

I noticed the problem whilst finding the tree colours with the FindObj functions and how it struggled due to the colours. You mentioned better techniques of finding object, would that be using Bitmap or DTM, which is more accurate?

Once I get a bit more time I'll have a go at making my first script, I was thinking something simple, possibly picking/collecting an item, i feel as i have the basics and im picking up things pretty quick I feel, waiting for part two now.

Thanks again

YoHoJo
12-13-2011, 08:34 PM
Great tutorial, shame about the coughing :p

I noticed the problem whilst finding the tree colours with the FindObj functions and how it struggled due to the colours. You mentioned better techniques of finding object, would that be using Bitmap or DTM, which is more accurate?

Once I get a bit more time I'll have a go at making my first script, I was thinking something simple, possibly picking/collecting an item, i feel as i have the basics and im picking up things pretty quick I feel, waiting for part two now.

Thanks again

Yeah it's really dumb and annoying! Sometimes it gets better, sometimes (the worst times!) it acts up.

Yeah in part 1 the FindObj isn't optimal at all but it's okay. Bitmaps and DTMs are more for static things like items/buttons/interface etc (sometimes bitmaps work well on mainscreen though if made properly).
The alternative method is TPAs, Length Width and Desnity checks, # of Pixels found checks, along with the backbone of good autocolor generated from using a program called ACA (AutoColor Aid).

Actually in part 2 I switched to using FindObjTPA (I think it's called?) and got it working A LOT better and almost always heading to a tree and not a stump/ground/branches etc.

And hooray! Even if it's a really basic lame script, you should post it in the 'First Script' section to get some feedback on your code from other members.

@Everyone, Part 2 is now up! At the moment it's not processed all the way so 480p is the highest quality you can view it in. Over time (few hours or less) youtube will process it better and the 1080p option will be available. Link to part 2 is now in the first post.

Nsight
12-13-2011, 10:50 PM
Very nice watch, and very helpful. I've been looking foward to this. Thank you so much for your time and effort you put in here and to help everybody!

eXoTiK
12-14-2011, 01:56 AM
Thank you very much for the tutorials. Within the first tutorial, I managed to make a near flawless yak killer. I've since made my own functions which work better than some of srl's included functions. Haven't finished video 2 yet, but I will be certain to do so after I've finished testing my script.

makulu
12-14-2011, 08:46 PM
Awesome video. Very beginner-friendly and you have a nice calm voice too.

Keep em coming! :D

Gushers
12-15-2011, 04:28 AM
Thanks man! This has helped a lot and I'm doing really good so far typing it and what not. My only problem is the beginning where it says:
($DEFINE SMART) ($i SRL\SRL.scar) ($i SRL\SRL\Misc\Stats.simba)

- I have it typed exactly like yours but mine doesn't turn red and when I try to compile I get this error: [Error] (4:3): 'BEGIN' expected at line 3.

YoHoJo
12-15-2011, 04:29 AM
Right under the
Program YourProgramNameHere;
line put all of that include stuff and it should work.
Ah! Problem is you are using ()s when you need to use {}s

Gushers
12-15-2011, 04:40 AM
Right under the
Program YourProgramNameHere;
line put all of that include stuff and it should work.
Ah! Problem is you are using ()s when you need to use {}s

Oo wow haha thanks man! That fixed it! So I use {'s just for the beginning?

YoHoJo
12-15-2011, 04:46 AM
Just use {} around the include stuff.
Example:
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SRL\SRL\Misc\Debug.SCAR}
{$i SRL\SRL\Misc\Stats.simba}

And if you don't want to use SMART at the time (as in you are testing/autoing on web browser) then put a // in front of the {$DEFINE SMART} line.


{}s can also be used elsewhere in the script to comment stuff out.

Like if you have some code you don't want to be executed/compiled but still keep it in the script for later use/reference for just notes to yourself you can put them between {}s.

shstiger2009
12-15-2011, 08:56 AM
Great video. I agree about making the script while videoing, shows the trial and error. Also, I like basic! It's easy, less code, and for things like this it works perfectly. I don't see the need for anything more complicated for scripts like this. :p

copperhaxor
12-15-2011, 05:46 PM
Ok ive tryed making flash bots on flash games and runescape and another game but every script i get the same errors

[Error] (39:2): Identifier expected at line 38
Compiling failed.

Its always the same i duno what im doing wrong ive copyed your video word for word...


FYI this is a Procedure line that it highlights, and if i delete the procedure it does the same but highlights the End at the end of my script

YoHoJo
12-15-2011, 05:54 PM
Post the script sillyhead! No way I can help without seeing it!
Please put Simba tags around it when you post it.

copperhaxor
12-15-2011, 07:25 PM
Ahh thanks but i figured out what i did wrong, its so noob as well :P
i was putting

Begin
Procedure Fuzz;
var
x, y:integer;


when it should of been

Procedure Fuzz;
var
x, y:integer;

begin


heh, but i did get my bot working its for a flash game on neopets called 'Kill evil fuzzles' and it completely destroys the game i got 3X the current highscore with it, i doubt it will qualify though heh but was fun thanks for the help! im gonna go onto the second video now

copperhaxor
12-15-2011, 07:42 PM
Edit:

Ok I have this code and it says it compiles successively but then nothing happens, the cursor just vanishes and it doenst click or anything :S


Function find:Boolean;
var
x, y:integer;

begin
if FindColorSpiralTolerance(x, y, 9360328, 13, 15, 502, 319, 50) then
begin
getmousepos(x, y);
case random(2) of
1: Mouse(x, y, 5, 5, True);
2: begin
Mouse(x, y, 5, 5, False);
wait(100+Random(100));
ChooseOption('Att');
end;
end;
end;
end;

begin
setupsrl;


repeat
find;
until(false)
end.

Failedpure
12-16-2011, 04:09 AM
Thank you sir will be watching all of it tomorrow. Please keep making these vids I benefit so much by watching them

nen
12-17-2011, 09:18 AM
Hate to be that guy that hates, but the tutorial was made so much longer because of you almost getting distracted. You also need to know what you're going to do before you make a tutorial. You took a lot of other people's/your own code and just modified that which doesn't help people at all.

It did help me get the basics though but I could have learnt a lot more in the time taken to watch those videos.

Yanhua
12-17-2011, 09:27 AM
When is part 3 going to be released? :P

YoHoJo
12-17-2011, 10:08 AM
Hate to be that guy that hates, but the tutorial was made so much longer because of you almost getting distracted. You also need to know what you're going to do before you make a tutorial. You took a lot of other people's/your own code and just modified that which doesn't help people at all.

It did help me get the basics though but I could have learnt a lot more in the time taken to watch those videos.

" you almost getting distracted"
Wat?

"you also need to know what you're going to do before you make a tutorial"
I stated in the first post they were made this way on purpose (long/sloppy)

They are a bit long and sloppy because I did them 'on the spot' instead of planning them out and using a premade script.
I wanted you guys to see the process from scratch and all of the common problems and roadbumps scripters have to deal with regularly.
I felt doing it this would would be a more 'real' and helpful experience compared to just reading though a premade script.
Sorry they are a bit long and sloppy, but I feel this was the best way to make them and hope you guys enjoy!

I didn't take/modify too much of my own/others code I wrote most of it from scratch, and the things that I did copy/paste I explained exactly what they did and how they worked and that they are common things used in everyone's scripts so you (the learners) can also just copy and paste them.

Tons of people have requested videos because they are lazy or just feel they would learn better by watching and hearing someone do it along with them which is why I made them. If you think you learn better by just reading/pictures then you can feel free to check out the other tutorials we have in this section.

Also, no I'm not mad at all, just responding to your post, everyone learns differently and at a different pace and that's okay. For some people slow and explaining every little thing is nicer.

If you check out my first tutorial I'm sure you will find it a lot more structured and planned out.


When is part 3 going to be released? :P

You mean tutorial 3 :p.
Um no clue... whenever I'm not lazy! Glad you're all enjoying and learning from it!

jakeyboy29
12-17-2011, 11:16 AM
I have to say, these tutorials are good revison for me getting back into the realm of scripting. Thankyou

Austintheman
12-18-2011, 07:59 AM
One of the best tutorials out there, I honestly thought I could never make a script, but after watching these vids i've learned a lot.

Could you make a part 3 that powermines any type of ore? I'll try to create one my self though with the knowledge of these videos.

Again, many thanks man. I've learned so much more from the videos than the ones that are written out lol.

TheJokester117
12-20-2011, 05:38 AM
I'm about to check these out today and tomorrow. Your first video was very helpful and I hope I can learn to make like a basic PowerChopper or something after these videos. I gotta start somewhere haha.

E: So I finished both of the tutorial videos, and got the script working. It works great until the dropping procedure, and I get these errors:

New window: 3997982
[Hint] (91:10): Variable 'Result' never used at line 90
Compiled successfully in 484 ms.
SRL Compiled in 15 msec
Error: Exception: FindDTMs: DTM[] is not valid. at line 150
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

I've tried restarting Simba and my computer, thinking it might have been a memory leak of sorts to no avail. Any suggestions?

iitwinz
12-21-2011, 08:01 AM
These tutorials are GREAT!

btw, do you mind me using those procedures/functions you wrote on there?

or would you rather we try to do it ourselves?

YoHoJo
12-21-2011, 08:11 AM
These tutorials are GREAT!

btw, do you mind me using those procedures/functions you wrote on there?

or would you rather we try to do it ourselves?

Go for it I don't mind they're pretty basic.
Just give credit I guess, and know a scriptthis simple will not get you SRL membership :p.
Glad you enjoyed and learned!

i_liek2feesh
12-21-2011, 08:47 AM
Great tutortial, and disreguard everything else you may have seen in my post.

lilcmp1
12-29-2011, 02:20 AM
Thanks for the tuts. They helped a ton. Using it and some help from others I've got a cray fish power fish lol :D You've done a great job of making everything understandable even to those of us who've never scripted. I can't thank you enough because without these I'd still feel like making a script would be beyond my capabilities.

YoHoJo
12-31-2011, 10:03 AM
Thank you everyone for the positive feedback, enthusiasm, and for watching along and creating your first scripts!
Hope to see many of you advance even further by looking at other scripts and tutorials, and I will be slowly making more video tutorials in the future!

Dan the man
01-01-2012, 08:32 AM
I am having an issue with the script I have done. When I go to compile it, it will say:

[Error] C:\Simba\Includes\SRL/SRL/core/simba.simba(11:1): Semicolon (';') expected at line 10
Compiling failed.

And it ipens up a new tab with a script name "Simba" which it states is the Scar Standard Resource Library, simba.simba

I am not sure what I have done wrong as I have copied word for word off you.

program powerchopper

{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SRL\SRL\Misc\Stats.simba}


Const
SRLStats_Username = 'a'; // SRL Stats Username
SRLStats_Password = 'a'; // Your SRL Password
BreakEvery = '5'; // How many minutes to break after
BreakFor = '2'; // How long to break for
Version = '1.0B';
NumberOfPlayers = 1; // How many players
StartPlayer = 0; // Player to start with

procedure DeclarePlayers;
var 1:integer;
begin
NumberOfPlayers(NumberOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 NumberOfpPlayers-1 do
players[i].BoxRewards := ['note', 'ostume', 'XP', 'amp'];

with Players[0] do
begin
Name := ''; // Player username
Pass := ''; // Player password
Active := True;
Integers[1] := 4; // 1=bright copper, 2=Darkcopper, 3=tin, 4=iron.
Integers[2] := 4; // Seconds to try mining rock before clicking another
end;
end;


Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End



Function CheckAndClick(UpText, Option:String; X, T:Integer; RClick:Boolean):Boolean;
begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x,y);
If RClick Then
begin
Mouse(x, y, 0, 0 False);
Results:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End
End
End


Procedure AntiBan;
begin
Case Random(250) of
0: begin StatusGuise ('AntiBan') GameTab(tab_stats) HoverSkill ('Woodcut', False) GameTab(28) End;
1: begin StatusGuise ('AntiBan') SleepAndMoveMouse(7000 + Random(500)) End;
2: begin StatusGuise ('AntiBan') GameTab(tab_inv) ExamineInv; Gametab(28); end
3: begin StatusGuise ('AntiBan') RandomAngle(1); End;
4: begin StatusGuise ('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: begin StatusGuise ('AntiBan') Gametan(tan_stats) hoverskill ('random', False); GameTab(28); End;
end;
end;

Procedure FailSafe (Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
ProgressReport;
TerminateScript;
end;




Function ChopDown:Boolean;
begin
If FindObjectCustom(seX, seY, ['Chop', 'Down', 'own', 'hop', 'ree', 'tree'], [1318686, 1450785, 923159], 924954 , 10) Then
End




Begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(False);
End.

KFC
01-01-2012, 06:20 PM
These text guides make no sense to me! you need to make them into more video tutorials FASTER so im not a



leecher noob failface

!







just kidding, take your time. the vid tuts are very helpful though :thumbsup:



EDIT: your next vid tut (if more) should be all about walking :p.

Mokwa
01-02-2012, 12:58 AM
I'm about to check these out today and tomorrow. Your first video was very helpful and I hope I can learn to make like a basic PowerChopper or something after these videos. I gotta start somewhere haha.

E: So I finished both of the tutorial videos, and got the script working. It works great until the dropping procedure, and I get these errors:

New window: 3997982
[Hint] (91:10): Variable 'Result' never used at line 90
Compiled successfully in 484 ms.
SRL Compiled in 15 msec
Error: Exception: FindDTMs: DTM[] is not valid. at line 150
The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

I've tried restarting Simba and my computer, thinking it might have been a memory leak of sorts to no avail. Any suggestions?

Can't help you completly but, after using your DTMs variables, you must release it - or it'll downgrade your script -; and in the case of the error, I think that's because you didn't load your DTM correctly.


dtmFish := DTMFromString('mwQAAAHic42RgYOBhgABOIOYHYikoZgdiYS BmBmIOqBpuIBYAYhGoWkYgZoPK5yXEA0kmApgwYCQCwwEAE0sC Gg==');



I am having an issue with the script I have done. When I go to compile it, it will say:
[Error] C:\Simba\Includes\SRL/SRL/core/simba.simba(11:1): Semicolon (';') expected at line 10Compiling failed.

Dan, you forgot adding an ";" in the end of the name of the program, it should be:

program powerchopper;

[XoL]
01-02-2012, 01:03 AM
EDIT: your next vid tut (if more) should be all about walking :p.

Yes! A walking tut would be amazing. That is one thing I just can't seem to get right.

devinluttrell
01-02-2012, 05:58 AM
Function CheckAndClick(UpText, Option:String; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End else
Begin
Mouse(x, y, 0, 0,True);
Wait (100+Random(50));
FFlag(0);
End;
End;
End;

I get an error on mmouse "[Error] (49:10): Unknown identifier 'X' at line 48" I don't get it. I even re watched over that part a couple of times. Still didn't get it. Help?

YoHoJo
01-02-2012, 06:02 AM
Need to declare it as variable
(See 2nd and 3rd line of code I added)

Function CheckAndClick(UpText, Option:String; RClick:Boolean):Boolean;
var
X, Y:Integer;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End else
Begin
Mouse(x, y, 0, 0,True);
Wait (100+Random(50));
FFlag(0);
End;
End;
End;

loser69
01-04-2012, 03:25 PM
Thanks for this great vid also you have good taste in music

YoHoJo
01-04-2012, 04:06 PM
Thanks for this great vid also you have good taste in music

Hey thanks a lot, glad you all are enjoying them and learning so much.
I'm starting to see a lot of people with their 'first scripts' based off of these tutorials, it's great to see!

Yeah I try to keep some nice interesting lyric-less music in the back for you guys, glad you like that too!

Wetish
01-07-2012, 03:22 PM
I really liked it. But could you post your finished code?

poopy2177
01-07-2012, 06:40 PM
Love how you explain things! it really is easy to learn with the videos and if you think about it 40 minutes isn't that long to learn code scripting is easier then I thought I might be putting in some effort into it in the future thank you!

Giant Panda
01-11-2012, 12:38 PM
really helpful tutorials, im doing the first video of your second tutorial at the moment and when i try to do findobj i cant, i noticed on the youtube video you said to make sure you have SRl enabled but im getting this error

"Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''

any ideas as to the problem? I definitely have SRl and i ran all the auto updaters.

YoHoJo
01-11-2012, 12:40 PM
I think I replied to your comment on youtube already.
SRL update, change anything that says .scar at end to .simba instead and you'll be good.

Giant Panda
01-11-2012, 12:42 PM
ah sorry I haven't refreshed the youtube page because didn't want to lose my place, thanks for the tip I'll do that now :)

EDIT: ok i can do findobj now, thanks again :)

Giant Panda
01-11-2012, 01:17 PM
Ok i have done all the way up to the bit with the hooray we found a tree, when compiling im getting this error

"Exception in Script: Unknown compiler directives at 5:3"

you know why? sorry about all these questions im just a nooby leech ^^

YoHoJo
01-11-2012, 01:20 PM
Can't help at all unless I see code.
Copy/paste it here and put Simba tags around it.
5:20am and I haven't slept though, I'll get to it later :p.

Giant Panda
01-11-2012, 01:21 PM
program PowerChopper;
{$DEFINE SMART}
{$i SRL\SRL.simba}
{$1 SRL\SRL\Misc\Stats.simba}

const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 120; // How long to bot before break
BreakFor = 7; // Break Length
NumbOfPlayers = 1;
StartPlayer = 0;
Version = '1.0';
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP']

with PLayers[0] do
begin
Name := ''; //Username.
Pass := ''; //Password.
Active := '';
Integers[1] := ''; //1=BrightCopper, 2=DarkCopper, 3=Tin, 4=Iron.
Integers[2] := ''; //Seconds to try mining a rock before clicking another.
end;

end;


Procedure StatsGuise(wat:String);
begin
Status(wat);
Disguise)wat);
end;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUpText(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag90);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;

Procedure ANtiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcut', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse (2000 + Random(4000)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(tab_Stats); Wait(2000 + Random 1500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill ('random', False); GameTab(28); End;
End;
End;


Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;


Function ChopDown:Boolean;
Begin
If FindObjCustom(X. Y, ['Chop', 'down', 'p d'], [2109748, 3164508, 2571332, 3098458, 3625833, 1252894, 1384736, 1252637], 30) Then
WriteLn(':D:D:D:D:D:D');


begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(false);


end.

YoHoJo
01-11-2012, 01:28 PM
Man odd error, normally it tells you what line is wrong, you got a lot of small errors I caught by eye though.

Disguise)wat); Should be Disguise(wat);

If FindObjCustom(X. Y, should be If FindObjCustom(X, Y,

Need an end for your ChopDown function.

Just keep comparing your code to the video's and try to find it :p
Can't seem to help much more because Simba isn't say which line is the problem.

Giant Panda
01-11-2012, 01:36 PM
ok thanks for the help ill have a look

EDIT: Spent almost an hour comparing the scripts and after the couple typos have been changed it's exactly the same, still getting the same error.

Exception in Script: Unknown compiler directives at 5:3

Teh hot shot
01-12-2012, 02:05 AM
Oh gawd, I think im a leecher :3, il try and follow your guide, thanks :)))))

vashanddou
01-12-2012, 03:46 PM
Well time to actualy make my own script =D
instead of just offering help.

poopy2177
01-14-2012, 08:48 PM
Procedure DropLogs;
var
x, y, LogDTM, I: Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
LogDTM:= DTMFromString('m1gAAAHic42JgYOBngABmIOYBYgkglgNiSS CWAmJRqBpuIBYGYg4gFoey+YCYC6oXBJiAOMReBcrCj/8zEAcYicQIAACI7gL1');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];
For I:=0 To 27 Do
begin
SlotBox:=InvBox(LogPattern[I]);
if FindDTM(LogDTM, x, y, SlotBox.X1,SlotBox.Y1,SlotBox.X2,SlotBox.Y2) then
begin
MouseItem(LogPattern[I],False);
ChooseOption('Dro');
end;
end;

end;

I keep getting
[Error] (131:35): Type mismatch at line 130
Thats the MouseItem(LogPattern[I],False);
And I can not figure it out I'm sorry it's probably somthing really dumb

BTW once I get this figured out I'll be working on my first script thanks a bunch

YoHoJo
01-14-2012, 10:32 PM
Look up MouseItem in the function list on the left side of Simba.
I think instead of false you need to put 1, 2, or 3 meaning left, right, or no click.
Forgot which number is what though. I think you can put SRL_MOUSE_RIGHT instead of false maybe, try that.

poopy2177
01-14-2012, 11:41 PM
Look up MouseItem in the function list on the left side of Simba.
I think instead of false you need to put 1, 2, or 3 meaning left, right, or no click.
Forgot which number is what though. I think you can put SRL_MOUSE_RIGHT instead of false maybe, try that.
hmm when I put 1 it does left click but 2 or 3 does nothing (only Hovers over Logs doesnt Click them) and SRL_MOUSE_RIGHT doesn't work either?

Figured it out sorta but had to add more code put questions in blue
Procedure DropLogs;
var
x, y, LogDTM, I: Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

begin
LogDTM:= DTMFromString('m1gAAAHic42JgYOBngABmIOYBYgkglgNiSS CWAmJRqBpuIBYGYg4gFoey+YCYC6oXBJiAOMReBcrCj/8zEAcYicQIAACI7gL1');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];
For I:=0 To 27 Do
begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(LogDTM, x, y, SlotBox.X1,SlotBox.Y1,SlotBox.X2,SlotBox.Y2)Then
Begin
{if} MMouseItem(LogPattern[I]) //then??why don't I need?
begin //since no if then again why do I need a begin?
Mouse(x,y, 2,2,False);
ChooseOption('Dro');
end;
End;
end;

end;

Mec
01-16-2012, 03:44 AM
Bro maybe you should just record the actual simba client, because is hard to see your video even in fullscreen, see what threads is of no importance

YoHoJo
01-16-2012, 04:19 AM
'see what thread is of no importance'? What?
Full screen and make quality 1080p and it will be high quality. No one else has had troubles.

Mec
01-16-2012, 05:38 AM
'see what thread is of no importance'? What?
Full screen and make quality 1080p and it will be high quality. No one else has had troubles.

It just irritating to full screen your your video to see what code your implementing then to have to exit and compare it to mine then reopen etcetc

all-in-all thanks for these tutorials helped greatly now i just need to figure out walking and banking.. greatly T.T ha

jkruges
01-16-2012, 08:51 AM
program powerchopper;
//{$DEFINE SMART}
{$i SRL/SRL.simba}



Const
NumbOfPlayers= 1;
StartPlayer= 0;
procedure DeclarePlayers;
var i: integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'] ;
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := True; //True if you want this player to be ran in the script, false if not
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false) Gametab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
0: Begin StatsGuise('AntiBan') RandomAngle(1); End;

Procedure FailSafe (Reason:String);
begin
Players[CurrentPlayer].loc:=Reason;
Logout;
Stats_Commit;
ProgressReport;
TerminateScript;
End;




Function ChopDown:Boolean;
Var
X, Y: Interger;
Begin
If FindObjCustom(X, Y, ['Chop', 'down'], [1583142, 2440257, 2569785, 3821399],30) then
WriteLn('tree found');
End;
begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
until(false);

End.
[Error] (37:1): Syntax error at line 36
Compiling failed.
any ideas? compared it to the vid, and i copyed that line of another script. its rather odd

Spiker
01-16-2012, 09:25 AM
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false) Gametab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
0: Begin StatsGuise('AntiBan') RandomAngle(1); End;


[Error] (37:1): Syntax error at line 36
Compiling failed.
any ideas? compared it to the vid, and i copyed that line of another script. its rather odd

First of all, you cannot have 0 twice. (I'm pretty sure.) Make the second one a '2'.
Secondly, you need to add another "End;" to "close" the Case loop/method.
Third, you need some semicolons here and there.
Should end up looking like this:


Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End;

jkruges
01-16-2012, 09:43 AM
First of all, you cannot have 0 twice. (I'm pretty sure.) Make the second one a '2'.
Secondly, you need to add another "End;" to "close" the Case loop/method.
Third, you need some semicolons here and there.
Should end up looking like this:


Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End;


thanks for pointing that out, did not even notice.
i still get the same error though.

Ortiz817
01-16-2012, 02:15 PM
think i fixed it for you i added lines of text on your errors so you could see were it wrong program powerchopper;
//{$DEFINE SMART}
{$i SRL/SRL.simba}



Const
NumbOfPlayers= 1;
StartPlayer= 0;
procedure DeclarePlayers;
var i: integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'] ;
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := True; //True if you want this player to be ran in the script, false if not
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End; //you added this one but this one ended case

End; //this one ends procedure

Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;




Function ChopDown:Boolean;
Var
X, Y: Integer;//you had interger
Begin
If FindObjCustom(X, Y, ['Chop', 'down'], [1583142, 2440257, 2569785, 3821399],30) then
WriteLn('tree found');
End;
begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
until(false);

End.

jkruges
01-16-2012, 02:30 PM
think i fixed it for you i added lines of text on your errors so you could see were it wrong

Thank you very much! that worked. ive only ever programed in java before and eclipse helps so much with syntax

Giant Panda
01-17-2012, 07:34 PM
i worked out what was wrong, i deleted lines of code until i found the problem. sadly i went from the end to the beginning which is a shame because it was the 4th line

"{$i SRL\SRL\Misc\Stats\.simba"

causes "unknown compller directives at 5:3"

YoHoJo
01-17-2012, 07:36 PM
I think in SRL 5 you no longer need to include stats, so you can remove that entire line completely and it should work.

Giant Panda
01-18-2012, 12:33 PM
now its saying it wants a semi colon on this line

with Players[0] do

dunnno where it would work though and you dont have a semi colon in your tutorial

YoHoJo
01-18-2012, 10:02 PM
now its saying it wants a semi colon on this line

with Players[0] do

dunnno where it would work though and you dont have a semi colon in your tutorial

Copy/Paste a few lines above/below it too. Or just copy/paste that entire procedure.

Giant Panda
01-19-2012, 01:35 PM
Copy/Paste a few lines above/below it too. Or just copy/paste that entire procedure.

procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP']

With Players[0] do
begin
Name := ''; //Username.
Pass := ''; //Password.
Active := '';
Integers[1] := ''; //1=BrightCopper, 2=DarkCopper, 3=Tin, 4=Iron.
Integers[2] := ''; //Seconds to try mining a rock before clicking another.
end;

end;

YoHoJo
01-19-2012, 09:05 PM
Semicolon after
* * Players[i].BoxRewards := ['XP']

Skywalk
01-19-2012, 09:41 PM
The tutorials are REALLY AWESOME

but i keep getting this message with any script:

Exception in Script: Unable to find file 'srl\srl.scar' used from ''
do i have to update it or something

slakan
01-19-2012, 09:44 PM
change to

SRL\SRL.simba

i think :)

Giant Panda
01-23-2012, 10:37 AM
thanks for the help

ignore this post if you saw it before i worked out the problem :)

Skywalk
01-24-2012, 06:04 PM
Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''
why doesn't it work?

Kyle Undefined
01-24-2012, 06:09 PM
.scar is outdated, this tutorial needs to be updated to use SRL 5.

Bwuk
01-24-2012, 07:04 PM
Amazing tutorials did learn abit :).

poopy2177
01-25-2012, 04:37 AM
I love your tuts yohojo do you think you could make a video tut on tpa's? that would help me a lot or maybe I just need to spend more time re reading the guides in the advanced section/=

Caotom
01-25-2012, 05:04 AM
Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''
why doesn't it work?

{$DEFINE SRL5}
{$DEFINE SMART}

{$i SRL/srl.simba}
{$i SPS/sps.simba}

try using that as your defines, it worked (at least compiled) for me.

Thank you YoHoJo, for making these, I seriously appreciate it. I was struggling to maintain enough concentration to read all the normal guides and try to learn everything. The hands on way you have done them really helped :)

Skywalk
01-26-2012, 09:11 PM
it works fine now :)
thanks a lot

Supertrent1
01-27-2012, 05:04 AM
IDK what I'm doing :D Here is the script I have so far. I am at about 19 mins in your vid and I'm so confused.
program PowerChopper;

{$DEFINE SMART}
{$i include SRL\SRL.simba}
{$i Include SRL\SRL\Misc\Stats.simba}


Const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery= 120;
Breakfor= 5;
Version= '1.0Beta'; //NO TOUCHY!










procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['Mine','ine'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;

Function ChopDown;
Var
Sex, SeY: Integer;
Begin
If FindObjCustom(Sex, Sey, ["Chop:, "down"], [2107946, 1252376, 1976102], 30) Then
WriteLn ('Hooray');






Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Mining', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Begin
SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
Until (false)

End

I'm getting Exception in Script: Unable to find file 'include SRL\SRL.simba' used from ''

Could you show me what I'm doing wrong

I'm sorry and thank you if you can!

i p0t u drop
01-29-2012, 11:21 AM
For when u add SetAngle(True); i get error saying

[Hint] (68:10): Variable 'Result' never used at line 67
[Error] (93:17): Type mismatch at line 92
Compiling failed.

line 67 says Function HoverMining:Boolean;

please help

Firefighter_Emt18
01-31-2012, 02:33 AM
i dont know what i am doing wrong but when it comes to the part about finding the findodj in the function box i doesnt show up and turns the text box orange.

help i dont know what i am doing wrong

YoHoJo
01-31-2012, 02:52 AM
Copy/Paste the error, it will be in the box at the bottom of simba.

Firefighter_Emt18
01-31-2012, 03:04 AM
there is no error. when i try and search for findobj in the function list tab it doesnt find anything

YoHoJo
01-31-2012, 03:08 AM
Make sure your includes at top look like this:
{$DEFINE SMART}
{$i SRL\SRL.simba}

or
//{$DEFINE SMART}
{$i SRL\SRL.simba}

if you don't want to use SMART

Firefighter_Emt18
01-31-2012, 03:17 AM
ah i fixed it thank you a accidentally typed
{$i SRL\SRL\.simba}
but i fixed it and took out the hyphen next to .simba and it works now

thank you

fmylifehard
01-31-2012, 08:36 AM
Thank you very much for the tutorial, ill be attempting my first script here shortly. may take awhile though, going for agility first time up :P

Failedpure
02-01-2012, 03:16 AM
IDK what I'm doing :D Here is the script I have so far. I am at about 19 mins in your vid and I'm so confused.
program PowerChopper;

{$DEFINE SMART}
{$i include SRL\SRL.simba}
{$i Include SRL\SRL\Misc\Stats.simba}


Const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery= 120;
Breakfor= 5;
Version= '1.0Beta'; //NO TOUCHY!










procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['Mine','ine'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;

Function ChopDown;
Var
Sex, SeY: Integer;
Begin
If FindObjCustom(Sex, Sey, ["Chop:, "down"], [2107946, 1252376, 1976102], 30) Then
WriteLn ('Hooray');






Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Mining', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Begin
SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
Until (false)

End

I'm getting Exception in Script: Unable to find file 'include SRL\SRL.simba' used from ''

Could you show me what I'm doing wrong

I'm sorry and thank you if you can!
Do you have srl and simba up to date?

Addyo
02-01-2012, 05:29 PM
hey ok so for {$i SRL\SRL\Misc\Stats.simba} i get this
Exception in Script: Unable to find file 'SRL\SRL\Misc\Stats.simba' used from ''

any ideas what im missing?

YoHoJo
02-01-2012, 07:34 PM
hey ok so for {$i SRL\SRL\Misc\Stats.simba} i get this
Exception in Script: Unable to find file 'SRL\SRL\Misc\Stats.simba' used from ''

any ideas what im missing?

Don't need that line anymore since SRL5

Addyo
02-01-2012, 10:10 PM
Fixed old issue... nonw i get this -.-


Function CheckAndClick(UpText:String; X,Y:Integer; Stronger:Boolean):Boolean
Begin <----Problem "[Error] (48:1): Semicolon (';') expected at line 47"
Compiling failed.
MMouse(x, y, 5, 5);
If WaitUptext(upText, 1500+Random(500))
Begin
Resault:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Resault:=WaitOption(Option, 2000);
If Resault then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;



then i put a simocolon behind begin and it says the same thing...Soooo frustrating

YoHoJo
02-03-2012, 04:36 AM
Function CheckAndClick(UpText:String; X,Y:Integer; Stronger:Boolean):Boolean;
Begin <----Problem "[Error] (48:1): Semicolon (';') expected at line 47"
Compiling failed.
MMouse(x, y, 5, 5);
If WaitUptext(upText, 1500+Random(500))
Begin
Resault:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Resault:=WaitOption(Option, 2000);
If Resault then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;


Need a ; after Boolean, use code up there ^

Ortiz817
02-04-2012, 05:19 PM
would i need to make a new function to take the hunter trap or can i leave it like this If FindObjCustom(x, y, ['set', 'Trap', 'set-trap'], [2304302, 2435889], 1) Then
GetMousePos(x, y);
Mouse(x, y, 1, 1, False);
wait(100)
WaitOptionmulti(['Set', 'trap'], 500);

If FindObjCustom(a, b, ['Take', 'Net'], [2304302, 2435889], 1) Then
GetMousePos(a, b);
Mouse(a, b, 1, 1, True);
Wait(100)
WaitOptionmulti(['Take', 'Net'], 100);
Repeat
Trap;
Until(false)
end;

botter5214
02-07-2012, 02:22 PM
Thanks this video helped so much!

Skywalk
02-07-2012, 04:47 PM
i keep getting this now

[Error] C:\Simba\Includes\SRL/SRL/core/login.simba(325:16): Unknown identifier 'Result' at line 324
Compiling failed.

can anyone help me

Skywalk
02-07-2012, 04:50 PM
never mind i tried reinstalling and everthing works fine now

Chivava
02-07-2012, 07:03 PM
I have just watched part 1, and it looks really promising, and i can surely promise you, that i have learned more about Simba than, reading tutorials, so i really thank you!

Bbl, to comment on part 2.

IsoMorphic
02-08-2012, 09:53 AM
[Error] (98:4): Identifier expected at line 97

And that line is

Until (InvCount = PlusOne)

Even from PMS i copied that still didnt work :O

ryno101
02-08-2012, 04:33 PM
dunno what the problem is but my script just wont recognize its inv is full and wont start dropping logs, the findobj will hopefully turn into picking up nests

i also get this;
[Hint] (175:10): Variable 'Result' never used at line 174

program Firstwillow;

//{$DEFINE SMART}
{$DEFINE SRL5} //
{$i srl/srl.simba}
{$i SPS/sps.simba}

const
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True; // Set to True if using a RS-Members account. False if F2P.
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)
LoadsPerLogin= 15; //How Many Loads To Do Per Login!
LoadsTotal= 9999; //How Many Total Lods To Do Per Character!
AntiBDrop= True; //False for faster dropping. True for antiban dropping.
Sleepyweepy= 3; //Minutes to wait before logging in again.0 = Disabled.
YDebug= True; //Shows whats happening on the runescape screen in a
//debug window, so you dont have to open/close SMART.


var
TooLong:Integer;

procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(uptext, option:string; x,y:integer; rclick:boolean) :boolean;
Begin
MMouse(x, y, 5, 5);
if waitUptext (Uptext, 1500+ random (500)) then
Begin
Result:=True;
GetMousePos(x, y);
If RClick then
Mouse(x, y, 0, 0,False);
result:=WaitOption(Option, 2000);
if result Then FFlag(0);
end else
Begin
Mouse(x, y, 0, 0,true);
Wait(100+Random(50));
FFlag(0);
End;
End;


Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('woodcut', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', True);
End;
End;

Procedure FailSafe(Reson:String);
Begin
Players[CurrentPlayer].Loc:=Reson;
Logout;
Stats_Commit;
//progressreport;
Writeln(Reson);
TerminateScript;
End;
Function IvyColour: Integer;
Var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
Begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.50, 0.40);

if not (FindColorsTolerance(arP, 2700598, MSX1, MSY1, MSX2, MSY2, 3)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;

arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);

for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;

ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);

if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;


//function FindObject(var fx, fy: Integer): Boolean;
//var
//: TPointArray;
// ararP: T2DPointArray;
// tmpCTS, i, arL: Integer;
// P: TPoint;
//begin
// tmpCTS := GetColorToleranceSpeed;
// ColorToleranceSpeed(2);
// SetColorSpeed2Modifiers(0.26, 2.36);

// if not(FindColorsTolerance(arP, 2766647, MSX1, MSY1, MSX2, MSY2, 3)) then
// begin
// Writeln('Failed to find the color, no object found.');
// ColorToleranceSpeed(tmpCTS);
// SetColorSpeed2Modifiers(0.2, 0.2);
// Exit;
// end;

// SortTPAFrom(arP, Point(MSCX, MSCY));
// ararP := SplitTPAEx(arP, 10, 10);
// arL := High(ararP);

// for i := 0 to arL do
// begin
// P := MiddleTPA(ararP[i]);
// MMouse(P.x, P.y, 5, 5);
// Wait(100 + Random(100));
// if (IsUpText('Take')) then
// begin;
// Result := True;
// Break;
// end;
// end;

// ColorToleranceSpeed(tmpCTS);
// SetColorSpeed2Modifiers(0.2, 0.2);

// If (i = arL + 1) Then
// Begin
// Writeln('FindObject could not find object.');
// Exit;
// End;

// GetMousePos(fx, fy);
//End;
Function ChopDown:Boolean; //this is line 174
Var
Boo, Bee, PlusOne, TreeCounter, TooLong: Integer;
Begin
FindNormalRandoms;
MarkTime(TooLong);
PlusOne:= InvCount + 1;
Boo:=MSCX
Bee:=MSCY
if findobjtpa( Boo, Bee, IvyColour, 8, 1, 30, 60, 300, ['llow']) Then
writeln('got one');
getmousepos(Boo, Bee);

Case Random(2) of
0:Mouse(Boo, Bee, 5, 5, True);
1: Begin
mouse(Boo, Bee, 5,5, False);
WaitOption('illow', 6500+Random(150));
End;
End;

Flag;
MarkTime(TreeCounter);
if (TimeFromMark(TooLong) > 15000) then
FailSafe ('could not find willow');



repeat
if (TimeFromMark(TooLong) > 15000) then
FindNormalRandoms;
StatsGuise('AntiBan and Waiting');
AntiBan;
Wait(3500);
If Invcount=PlusOne Then
Writeln ('We Got One');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)

End;




Procedure DropLogs;
Var
Boo, Bee, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;


Begin


FindNormalRandoms;
LogDTM := DTMFromString('mrAAAAHic42BgYLBnYmAwB2IbIHYDYk8g9g BiEyj2ZWRgcIZiByD2AuIQIA4FYncgNjcUBJrChAfjB4wEMAwA AI0XBO4=');
LogPattern :=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];
For i:=0 to 27 do
Begin
StatsGuise('Dropping Log' + IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(LogDTM,Boo,Bee,SlotBox.X1,SlotBox.Y1, SlotBox.X2,SlotBox.Y2) Then
Begin
MouseItem (LogPattern[I],2);
ChooseOption('Dro');
MarkTime(TooLong);
End;
End;

End;
Begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
if invFull then
DropLogs;
Until(False);

End.

MrBubbles
02-11-2012, 09:41 PM
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

ALSO Type mismatch at line 80 (when I have SetAngle(False); enabled.)


program powerchopper;
//{$DEFINE SMART}
{$i SRL/SRL.simba}



Const
NumbOfPlayers= 1;
StartPlayer= 0;
procedure DeclarePlayers;
var i: integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'] ;
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := True; //True if you want this player to be ran in the script, false if not
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End;

End;

Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
X, Y, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount +1;
If FindObjCustom(X, Y, ['Chop', 'down'], [1451815, 1517606, 1583399, 1253921],15) then
Begin
StatsGuise('Tree Found!');

GetMousePos(X, Y);
Case Random(2) Of
0: Mouse(X, Y, 5, 5, True); //Left click
1: Begin
Mouse(X, Y, 5, 5, False); //Right click
WaitOption('Chop', 500); //Waits for chop to appear or waits 500ms
End;
End;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=PlusOne Then
WriteLn('We have obtained a log!');
Until (InvCount = PlusOne) Or (TimeFromMark(TreeCounter) > 7000)

End;
End;
begin

SetupSRL;
DeclarePlayers;
//SetAngle(False); //Sets angle to the lowest, True sets to highest
Repeat
ChopDown;
until(false);

End.

snowshoes
02-11-2012, 10:19 PM
I love your tutorial, thank you so much. but I'm having a hard time figuring out the stuff you copy and pasted in, any way you can point me to where I can get that stuff? Please and Thank you =3

Love and Light,

Mr. Freeweed
02-11-2012, 10:35 PM
Some of the SRL calls have changed try


ClickNorth(SRL_ANGLE_HIGH); //Or SRL_ANGLE_LOW or SRL_ANGLE_NONE
SetAngle(SRL_ANGLE_HIGH); //Or SRL_ANGLE_LOW

There is a whole thread on new srl function and procedure calls. Just search "set angle error srl5" or something =)


The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]


These are in the srl5 antirandoms. Most likely you stopped the scripted before they were freed.

GoodLuck


The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

ALSO Type mismatch at line 80 (when I have SetAngle(False); enabled.)


program powerchopper;
//{$DEFINE SMART}
{$i SRL/SRL.simba}



Const
NumbOfPlayers= 1;
StartPlayer= 0;
procedure DeclarePlayers;
var i: integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal'] ;
With Players[0] do
begin
Name := ''; //Character Name
Pass := ''; //Character Pass
Active := True; //True if you want this player to be ran in the script, false if not
End;
End;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000+Random(500)); End;
2: Begin StatsGuise('AntiBan') RandomAngle(1); End;
End;

End;

Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
X, Y, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount +1;
If FindObjCustom(X, Y, ['Chop', 'down'], [1451815, 1517606, 1583399, 1253921],15) then
Begin
StatsGuise('Tree Found!');

GetMousePos(X, Y);
Case Random(2) Of
0: Mouse(X, Y, 5, 5, True); //Left click
1: Begin
Mouse(X, Y, 5, 5, False); //Right click
WaitOption('Chop', 500); //Waits for chop to appear or waits 500ms
End;
End;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=PlusOne Then
WriteLn('We have obtained a log!');
Until (InvCount = PlusOne) Or (TimeFromMark(TreeCounter) > 7000)

End;
End;
begin

SetupSRL;
DeclarePlayers;
//SetAngle(False); //Sets angle to the lowest, True sets to highest
Repeat
ChopDown;
until(false);

End.

X I I V
02-12-2012, 01:51 PM
[Error] C:\Simba\Includes\SRL/SRL/core/simba.simba(4:24): Semicolon (';') expected at line 3
Compiling failed.

Help please? :)

YoHoJo
02-12-2012, 01:53 PM
Need to see the script too.

Copy/paste it here and put simba tags around it.

X I I V
02-12-2012, 01:55 PM
Oh wow thanks for a quick reply :P
Now I'm getting this?

[Error] (23:5): Unknown identifier 'Pass' at line 22
Compiling failed.


program PowerChopper;

//{$DEFINE SMART}
{$i SRL\SRL.simba}

Const
Version = '1.0';
SRLStats_UserID = ''; // Your SRL Stats username.
SRLStats_Password = ''; // Your SRL Stats Password.
BreakEvery = ''; // Break after how many minutes?
BreakFor = ''; // Break for how long?


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
Name :=''; // Username
Pass :=''; // Password
Nick :=''; // 3-4 letters of your username
Active := True;
Integers[1] := 25; // Number of loads
Integers[2] := 5; //Seconds to try mining rock before clicking another.
end;

Function CheckAndClick(UpText:String X,Y:Integer; Stronger:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(upText, 1500+Random(500))
Begin
Resault:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Resault:=WaitOption(Option, 2000);
If Resault then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;

Procedure AntiBan;
Begin
Case Random(250) Of
0: Begin StatsGuise("Antiban") GameTab(tab_Stats) HoverSkill("Woodcut", False) GameTab(28) End;
1: Begin StatsGuise("Antiban") SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise("Antiban") GameTab(tab_Inv) ExamineInv; GameTab(28) End;
3: Begin StatsGuise("Antiban") RandomAngle(1); End;
4: Begin StatsGuise("Antiban") GameTab(tab_Stats); Wait(3000 + Random(800)); End;
5: Begin StatsGuise("Antiban") GameTab(tab_Stats) HoverSkill("random", False) GameTab(28) End;
End;
End;

Procedure FailSafe(Reason:String);
Begin;
Players(CurrentPlayer).Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;



Function ChopDown:Boolean;
Var
X, Y: Integer;
Begin
If FindObjCustom(X, Y, ["Chop", "down", "p d"), [988693, 1055002, 1186845, 2240560], 30) Then
WriteIn("Hooray, we found a tree!");
End;



Begin
SetupSRL;
DeclarePlayers;
//Repeat
ChopDown;
//Until(false);

End.

YoHoJo
02-12-2012, 01:56 PM
You need a Begin after the line with Players[0] do

Also, make sure you space your stuff out properly like I do in the video!
(Like 2 spaces after each line after a begin, etc)

X I I V
02-12-2012, 01:58 PM
thanks but yea I did do the spaces except when i pasted it they got deleted -.-

X I I V
02-12-2012, 02:02 PM
Don't worry I got it :P

YoHoJo
02-12-2012, 02:04 PM
; After String

String;

X I I V
02-12-2012, 02:06 PM
Alright hopefully last thing...

[Error] (36:3): 'THEN' expected at line 35
Compiling failed.

YoHoJo
02-12-2012, 02:10 PM
need a than after
If WaitUptext(upText, 1500+Random(500))

After that you spelled Result wrong a bunch of times, so fix those.

Then says something about this line:

If RClick Then

So read my code better, and copy it exactly :p.

I must go now, good luck!

X I I V
02-12-2012, 02:11 PM
thanks so much bro, repped :)

X I I V
02-13-2012, 02:41 PM
Getting this error...
This is the error message:

[Hint] (82:10): Variable 'Result' never used at line 81
Compiled successfully in 1112 ms.
SRL Compiled in 10 msec
Successfully executed.

And here is the script

program PowerChopper;

//{$DEFINE SMART}
{$i SRL\SRL.simba}

Const
Version = '1.0';
SRLStats_UserID = ''; // Your SRL Stats username.
SRLStats_Password = ''; // Your SRL Stats Password.
BreakEvery = ''; // Break after how many minutes?
BreakFor = ''; // Break for how long?


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
Begin;
Name :=''; // Username
Pass :=''; // Password
Nick :=''; // 3-4 letters of your username
Active := True;
Integers[1] := 25; // Number of loads
Integers[2] := 5; //Seconds to try mining rock before clicking another.
End;
End;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(X, Y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(X, Y);
If RClick Then
Begin
Mouse(X, Y, 0, 0, False);
Result:=WaitOption(Option, 2000);
If Result then FFlag(0);
End Else
Begin
Mouse(X, Y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) HoverSkill('Woodcut', false); Gametab(28); End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28) End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(tab_Stats); Wait(3000 + Random(800)); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False) GameTab(28) End;
End;
End;

Procedure FailSafe(Reason:String);
Begin;
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;



Function ChopDown:Boolean;
Var
treeX, treeY, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount +1;
If FindObjCustom(treeX, treeY, ['Chop', 'down', 'p d'], [1252636, 1055002], 10) Then
Begin
StatsGuise('Hooray, we found a tree!');
GetMousePos(treeX, treeY);
Case Random(1) Of
0: Mouse(treeX, treeY, 5, 5, True);
1: Begin
Mouse(treeX, treeY, 5, 5, False);
ChooseOption('Chop');
WaitOption('Chop', 500);
End;
End;

Repeat;
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=Plusone Then
Writeln('We got one');
Until (InvCount=Plusone) Or (TimeFromMark(TreeCounter) > 7000)

End;
End;



Begin
SetupSRL;
DeclarePlayers;
SetAngle(SRL_ANGLE_LOW);
//Repeat
ChopDown;
//Until(false);

End.

in flames 57xx
02-14-2012, 12:13 AM
Well basically here's my error. Instead of just hovering to one tree and saying "we found a tree", it instead hovers over a tree, then another, and another... eventually going onto different colors (like the Runescape client frames and stuff), and then just spazzes out and leaves the window and goes to my start button and gets stuck there.


program Chopps;
//{$DEFINE SMART}
{.include SRL\SRL.simba}
{.Include SRL\SRL\Misc\Debug.simba}

Const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 120;
Breakfor = 5;
Version = '1.0';
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first char)




procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Mining', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['Mine','ine'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;

Procedure FailSafe(Reason:String);
Begin;
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown: BooLean;
Var
x, y: Integer;

Begin
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
if FindObjCustom(x, y, ['Chop', 'down'], [1055001 , 1911853, 1845288, 1252379 ], 15) Then
WriteLn('Yea i found a tree');
End;



Begin

SetupSRL;
DeclarePlayers;
//Repeat
Chopdown;
//Until(False);

End.











And this is the debug box:


Hint] (72:10): Variable 'Result' never used at line 71
Compiled successfully in 858 ms.
SRL Compiled in 15 msec
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

Help please and thank you :P <3

Zaros
02-16-2012, 08:16 PM
THANK YOU YOHOJO! I have become slightly enlightened to the various functions and procedures offered by SRL and Simba! Off to read more tutorials!

Really appreciated this :) I might start off with something easier... say a fletcher or something.

t4nner
02-18-2012, 08:12 PM
I have no clue what I'm doing wrong with the codes. I'm trying to make the script that'll pick flax for me, then bank the inventory full (Which I haven't written yet. ): ). While I've had the tests going, it seems to like to open up "text.simba" or "inventory.simba", causing the script to screw up.

Any Suggestions?

program Cats;
//{$DEFINE SMART}
{.include SRL\SRL.simba}
{.Include SRL\SRL\Misc\Debug.simba}

Const
SERVER = '72'; // Enter "0" to pick a random server.
SRLStats_Username = ''; // Your SRL Stats Username.
SRLStats_Password = ''; // Your SRL Stats Password.
NumbOfPlayers = 1; //How many players are you using
StartPlayer = 0; //Player to start auoting with! (0 means first char)
BreakEvery = 120; // Break interval.
BreakFor = 5; // Break time.
Version = '1.0';




procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['ostume', 'ithril', 'lay'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Active := True;
end;

end;



Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;


Function CheckAndClick(X,Y:Integer):Boolean;
Begin
MMouse(x, y, 5, 5);
{Wait(100 + Random(50));
If CountUpColor('B', 41, 5, 86, 24, 70, 140) Then}
If WaitUpTextMulti(['Pic','ick'], 150) Then
Begin
Result:=True;
GetMousePos(x, y);
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;
End;

Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Craft', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
// ProgressReport;
TerminateScript;
End;



Function PickFlax:Boolean;
Var
x, y, PlusOne: Integer;
Begin
PlusOne:= InvCount +1;
If FindObjCustom(x, y, ['Flax', 'ick', 'Pic'], [14474423, 4877641, 12429665, 15592920, 2966317], 30) Then
Begin
StatsGuise('Flax Found!')
WriteLn('Flax Found!');
GetMousePos(x, y);

Case Random(2) Of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Pick', 500);
End;
End;

Repeat
Antiban;
Wait(100);
If InvCount=PlusOne Then
Writeln('Flax Obtained!');
Until (InvCount=Plusone)

End;
End;










begin

SetupSRL;
DeclarePlayers;
Repeat
PickFlax;
Until(false);

end.

Debug Console:

[Hint] (87:10): Variable 'Result' never used at line 86
Compiled successfully in 1234 ms.
SRL Compiled in 0 msec
Flax Found!
Error: Exception: Out of memory at line 801
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

bloopy62
02-19-2012, 09:18 PM
I freaking love this community! The day I realize that I really want to learn scripting I find these tuts and Coh3n's beginners tuts and there is just so much info! It has helped so much and I actually understand! Thank you so much!

kunzy
02-21-2012, 10:47 AM
gonna watch them tommo when i have time, i appericate it :) thankyou ill post back what i learnt =o

brandon8081
02-22-2012, 02:44 AM
Your tutorials are amazing, I have gotten the basics down.

ILikeSmoothHeads
02-22-2012, 06:10 PM
I love you man! Part 1 down, Part 2 to go!



Edit: I haven't a clue why this won't compile, says mismatch at line 105:

program Chopper;
//{$DEFINE SMART}
{$i SRL\SRL.simba}


Const
SRLStats_Username = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery= 120;
Breakfor= 5;
Version= '1.0Beta';
NumbOfPlayers=1;
StartPlayer=0;



procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('Antiban') GameTab(tab_Inv) ExamineInv; GameTab(28) End;
3: Begin StatsGuise('Antiban') RandomAngle(1); End;
4: Begin StatsGuise('Antiban') GameTab(tab_Stats); Wait(3000 + Random(800)); End;
5: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('random', False) GameTab(28) End;
End;
End;


Function ChopDown:Boolean;
Var
Sex, SeY, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount +1;
Sex:=MSCX;
Sey:=MSCY;
If FindObjTPA(Sex, Sey, 3161417, 5, 1, 15, 60, 40, ['Cho']) Then
begin
StatsGuise('Hooray we found a tree!');
GetMousePos(seX, Sey);
Case Random(2) of
0: Mouse(seX, seY, 5, 5, True);
1: begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
end;
end;

Flag;


repeat
MarkTime(TreeCounter);
Antiban;
wait(500);
If InvCount=PlusOne Then
WriteLn('We got a log!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)
end;
end;


Procedure DropLogs;
var
sex, sey, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

begin
LogDTM := DTMFromString('mwQAAAHic42RgYJjGxMDQC8SdQDwBiOcA8R IgXgDFM4H4CVDdXSB+BsQfgfgtEL8C4sdAfAeIbwNxkK0KQ5Cl JEN9mjmQxwTG9vrSYNrRUIbB10qJgRD4D8SMRGA4AADbsBK7') ;
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28];

For I:=0 To 27 Do
begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM, sex, sey, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
begin

MouseItem(LogPattern[I],False);
ChooseOption('dro');

end;
end;

end;




Begin


SetupSRL;
DeclarePlayers;
Repeat;
ChopDown;
If InvFull Then
DropLogs;
Until (false)

End.


[Hint] (57:10): Variable 'Result' never used at line 56
[Error] (106:37): Type mismatch at line 105
Compiling failed.

YoHoJo
02-22-2012, 11:32 PM
Change
MouseItem(LogPattern[I],False);
to like
MouseItem(LogPattern[I],SRL_MOUSE_RIGHT);

I think would fix it. SRL updated and changed a few things.

ILikeSmoothHeads
02-23-2012, 06:55 AM
Thanks, SRL_MOUSE_RIGHT was unknown but MOUSE_RIGHT worked. Thanks alot :)

itz_Adren
02-23-2012, 07:45 AM
Thanks, because i cant understand anything when i only read it.

ILikeSmoothHeads
02-23-2012, 05:08 PM
MOUSE_RIGHT compiled, but now when I run it, when the inventory is full, it doesn't do anything, just stops and runs antibans forever?

Heyy, the dropping doesn't work, my script is as I posted above except it now says MOUSE_RIGHT where false was. Please help, I really want to finidh this script...

bump...can anyone else help if anyone has had the same problem as me?

lure4fun
02-28-2012, 12:11 AM
i have the same problem let me research it a bit more

xtrapsp
02-28-2012, 12:16 AM
Smooth can you post this in it's own thread or PM Yohojo please... what your doing is considered Spam

Rezozo
03-01-2012, 02:09 AM
Hey YoHoJo, This Tut, has inspired me to make my own RuneScape Script.
Could you answer some questions please?
When using a DTM on a MiniMap, would it go like this:
if FindDtm(BankDtm,x,y) //Where BankDtm is my dtm, and x,y are the co ordinates
This is probably wrong. Can you give some advice?

lolbus
03-04-2012, 10:52 AM
Would you mind uploading your tutorial chopper on this forum for learners reference? Think it will be great help for me

lolbus
03-04-2012, 03:38 PM
Scripting Tutorial #2 (1/2): Creating Your First Runescape Script

At 02:30 of the video, you said that all this basic functions that are usually the same can be copypasted from another script, but you didn't provide an example of the 'another script' nor your 'pms' folder and make us type out all these basic function ourselves. lols

Paradoxium
03-04-2012, 03:53 PM
Hey YoHoJo, This Tut, has inspired me to make my own RuneScape Script.
Could you answer some questions please?
When using a DTM on a MiniMap, would it go like this:
if FindDtm(BankDtm,x,y) //Where BankDtm is my dtm, and x,y are the co ordinates
This is probably wrong. Can you give some advice?

joeygupta use this.

FindDTMRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/30, aFound)

//x,y are for the coor its going to fetch
//MMX1,MMY1,MMX2,MMY2 is the area its going to look for your DTM (MMX1,MMY1 top right of box. MMX2,MMY2 bottom left of box)
//-Pi/4, Pi/4, This searches in a circle going clockwise. -Pi/4 is where its going to start seaching and Pi/4, is where its going to end google a unit circle for more info
//Pi/30 the increments it is going to search by. the bigger the slower but higher chance of finding it
//aFound = angle where it found x,y

osunateosu
03-06-2012, 05:37 AM
Hey YoHoJo, the videos are very helpful! Just went through the first two tutorials and learned alot! I was wondering if you ever found out what was wrong with the failsafe at the end of your second video and if you could help me out on getting that to work! Keep up the good work, it really does help tremendously for absolute beginner scripters like myself.

Rezozo
03-07-2012, 03:25 AM
joeygupta use this.

FindDTMRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/30, aFound)

//x,y are for the coor its going to fetch
//MMX1,MMY1,MMX2,MMY2 is the area its going to look for your DTM (MMX1,MMY1 top right of box. MMX2,MMY2 bottom left of box)
//-Pi/4, Pi/4, This searches in a circle going clockwise. -Pi/4 is where its going to start seaching and Pi/4, is where its going to end google a unit circle for more info
//Pi/30 the increments it is going to search by. the bigger the slower but higher chance of finding it
//aFound = angle where it found x,y

Thanks yo, was waiting for a reply, needed to get back to scripting. Saver!
If you ever need anything, just ask!

Rezozo
03-09-2012, 11:45 PM
How would you make it search for the object circling around your player, instead of going 1,1 to x,y ?

jkrules22
03-18-2012, 06:02 AM
Hey can you give me a hand with my script, Im on your 2nd tutorial pt. 2, about 1\4th of the way into it. When Im trying to compile my script it says: [Error] (1:1): Unexpected end of file at line 0
Compiling failed.


Im not sure what to do from here.
Here where Im at with the script:

Program PowerChopper;


//{$DEFINE SMART}
{$i SRL\SRL.simba}




Const
SRLSTATS_USERNAME = ''; // SRL Stats Username.
SRLSTATS_PASSWORD = ''; // SRL Stats Password.
BreakEvery= 120; // How many minutes to break after.
BreakFor= '5'; // How long to break for.
NumbOfPlayers= 1; // How many players are you using?
StartPlayer= 0; // Player to start autoing with.
Version= '1.0'; // NO TOUCHY!

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player Username
Pass := ''; // Player Password
Pin := ''; //Pin for bank
Active := true;
end;
end;


Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;


Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
x, y, PlusOne, TreeCounter:Integer;
Begin
PlusOne:= InvCount + 1;
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 2;
x:=MSCY;
y:=MSCY;
If FindObjTPA(x, y, 3426909, 5, 1, 15, 60, 450, ['Chop']) Then
Begin
WriteLn('FK yea Ive found a tree, ima cut yu down!');
GetMousePos(x, y);
Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;


Repeat;
MarkTime(TreeCounter);
Antiban;
Wait(250);
If InvCount=PlusOne Then;
Writeln('Muwahahaha!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000);

End;














begin

SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(False);
end;



Any Ideas?

Yea Im definetly doing something wrong lol, I tried making my own simple script for big barn world (lol), And its doing the same thing, At first when i compiled it, it failed because I forgot a couple semicolins, then after I fixed them I try compiling it again and it said the same thing. Anybody's help would be Highly appreciated.

Convex
03-18-2012, 05:03 PM
Very helpful! I'm going to get into coding, now. Hope it doesn't take too long to learn. :)

wazzzup
03-20-2012, 08:25 PM
Thanks for the tutorials, I appreciate you taking the time to teach us..I somewhat know everything from the first video but it helps me become more fluent in writing which allows me to go onto more complex stuff, once again ty!

rife
03-21-2012, 06:30 AM
Thanks YoHoJo.

I'm not very keen on making my own scripts quite yet but I'm adjusting the scripts I use to better suit my needs as my way of learning. Once I've got more experience I'll start working on my own scripts.

Keep up the good work!

10wnu9
03-21-2012, 08:12 PM
Type Mismatch On "MouseItem(LogPattern(I),False*);"

Also Great tutorial, helped out alot, I used yours and I think Grotts? I don't know his name, it's a beginner script thing though, But yeah, somebody said change false to 2 but that does not help, Also I think I had something wrong above this and it was only hovering over every log, I fixed it and now this.

Help?

IsoMorphic
03-22-2012, 10:13 AM
Hey can you give me a hand with my script, Im on your 2nd tutorial pt. 2, about 1\4th of the way into it. When Im trying to compile my script it says: [Error] (1:1): Unexpected end of file at line 0
Compiling failed.


Im not sure what to do from here.
Here where Im at with the script:

Program PowerChopper;


//{$DEFINE SMART}
{$i SRL\SRL.simba}




Const
SRLSTATS_USERNAME = ''; // SRL Stats Username.
SRLSTATS_PASSWORD = ''; // SRL Stats Password.
BreakEvery= 120; // How many minutes to break after.
BreakFor= '5'; // How long to break for.
NumbOfPlayers= 1; // How many players are you using?
StartPlayer= 0; // Player to start autoing with.
Version= '1.0'; // NO TOUCHY!

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player Username
Pass := ''; // Player Password
Pin := ''; //Pin for bank
Active := true;
end;
end;


Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;


Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
x, y, PlusOne, TreeCounter:Integer;
Begin
PlusOne:= InvCount + 1;
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 2;
x:=MSCY;
y:=MSCY;
If FindObjTPA(x, y, 3426909, 5, 1, 15, 60, 450, ['Chop']) Then
Begin
WriteLn('FK yea Ive found a tree, ima cut yu down!');
GetMousePos(x, y);
Case Random(2) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;


Repeat;
MarkTime(TreeCounter);
Antiban;
Wait(250);
If InvCount=PlusOne Then;
Writeln('Muwahahaha!');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000);

End;














begin

SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(False);
end;



Any Ideas?

Yea Im definetly doing something wrong lol, I tried making my own simple script for big barn world (lol), And its doing the same thing, At first when i compiled it, it failed because I forgot a couple semicolins, then after I fixed them I try compiling it again and it said the same thing. Anybody's help would be Highly appreciated.

At the end of your script insteal of
end; make it
end.

Zockuito
03-25-2012, 01:49 AM
Awesome tutorial. Can't wait to start making my own scripts. >:)

historyles
03-26-2012, 04:57 AM
I have absolutely no knowledge of scripting (obviously) just joined, but im looking forward to learning, and coming a helpful person in this community, while im scripting will i ever need to download any other secondary programs, or is it simply just simba.

brandon8081
03-27-2012, 04:36 AM
I have absolutely no knowledge of scripting (obviously) just joined, but im looking forward to learning, and coming a helpful person in this community, while im scripting will i ever need to download any other secondary programs, or is it simply just simba.

Almost everything is done in SIMBA. Some other programs could be ACA, which is the Auto Color Aid program created by Nielsie

Lennie
03-27-2012, 09:54 PM
I tried to follow these tutorials, but it's the first time I try something (LOL). Anyways. I get this strange error:
[Error] (21:20): Unknown identifier 'StartPlayer' at line 20
Although, StartPlayer is normal used as like in every script?
Please help me out, thanks (:

wanna b auto
03-28-2012, 01:46 PM
Would you mind putting up the code from the videos. The videos are on full screen and I literally can't see the code lol

I don't want to read through lots of written tutorials. Videos are way better.

Need to get some bots working for RS coz I don't want to play it by hand any more I don't have the time.

If only nexus still worked :(...

xtrapsp
03-28-2012, 02:08 PM
Would you mind putting up the code from the videos. The videos are on full screen and I literally can't see the code lol

I don't want to read through lots of written tutorials. Videos are way better.

Need to get some bots working for RS coz I don't want to play it by hand any more I don't have the time.

If only nexus still worked :(...

Change your screen resolution to the correct settings.

mightyz
04-02-2012, 01:52 PM
Hello, i just completed the part 1 video and all seems to go smoothly and im getting it but i keep getting the compiling error hopefully someone can help me out

[Hint] C:\Simba\Includes\SRL/SRL/core/mapwalk.simba(1353:3): Variable 'BOX' never used at line 1352
[Error] (90:85): Syntax error at line 89
Compiling failed.

line 89 is

If FindObjCustom(SeX, SeY, ['hop', 'own'], [1318686, 1450785, 923159, 924954], 20,) Then


This is the entire code i've done so far

program PowerChopper;
//{$DEFINE SMART}
{$i srl/srl.simba}


{$IFDEF SMART}
{$i srl/srl/misc/paintsmart.simba}
{$ENDIF}

Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = '';// Your SRL Stats Password
BreakEvery = 120; // How Many Minutes To Break After
BreakFor = 5; //How Long To Break For
Version = '1.0';

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username;
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
end;
end;
// AntiBan
procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;
// Failsafe
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc := Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Procedure StatsGuide(wat:string);
begin
Status(wat);
Disguise(wat);
end;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) then
begin
Result := True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result := WaitOption(Option,2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
end;
end;
end;

// Chop Tree's
Function ChopDown:Boolean;
Var
seX, seY, PlusOne, TreeCounter: Integer;
begin
PlusOne := InvCount + 1;//thats a plus it just fucked up for some reason
If FindObjCustom(SeX, SeY, ['hop', 'own'], [1318686, 1450785, 923159, 924954], 20,) Then
begin
GetMousePos(Sex, Sey);

Case Random(2) of
0: Mouse(SeX, SeY, 5, 5, True);
1: begin
Mouse(SeX, SeY, 5, 5, False);
WaitOption('hop', 500);
end;
end;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100)
If InvCount=Plusone Then
Writeln('We got one');
Until (InvCount=Plusone) Or (TimeFromMark(TreeCounter) > 7000)

end;
end;















procedure MainLoop;
begin
end;

begin
SetupSRL
ClearDebug
DeclarePlayers
LoginPlayer
MainLoop
SetAngle(False);
Repeat
ChopDown;
Until(false);
end.

YoHoJo
04-02-2012, 05:55 PM
Extra comah after the 20/before the closing parenthesis.

lukas76
04-10-2012, 11:57 PM
Great tutorial man very helpful! (it's not that much different from java thankfully!)

Spandzbab
04-21-2012, 09:59 PM
Hey man love your tutorials, would it be possible for you to release the script you made while making the videos? I just wanted to compare it to mine because it's hard to compare anything from your video to my screen because I have to have it on full screen.

Hopefully you'll make some more tutorials soon, can't wait.

Roflme
04-22-2012, 03:50 PM
I could use some help :(

program PowerChopper;

//{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i SRL\SRL\Misc\Debug.simba}

Const
SRLStats_Username = '';
SRLStats_Password = '';
BreakEvery = 120;
BreaFor = 50;
Verson = '1.0';

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
BoxRewards := ['XP','xp','lamp'];
LampSkill := Skill_Woodcutting;
Active := True;
end;
end;


Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(Uptext, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
Begin
MMouse(x, y, 5, 5)
If WaitUptext(UpText, 5000) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(X, Y, 0, 0, False);
Result:= WaitOption(Option, 5000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(100));
FFlag(0);
End;
End;
End;

Procedure Antiban;
Begin
Case Random(250) of
0: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(29) End;
1: Begin StatsGuise('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('Antiban') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('Antiban') RandomAngle(1); End;
4: Begin StatsGuise('Antiban') GameTab(Tab_Stats); Wait(3000+Random(500)); GameTab(28); End;
5: Begin StatsGuise('Antiban') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;


Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
aX, aY, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount + 1;
If FindObjCustom(aX, aY, ['Chop', 'down', 'p d'], [1384483, 1582376], 8) Then
Writeln('Tree found, chopping it down');
Wait(500);
Begin
StatsGuise('Tree found, chopping it down');
GetMousePos(aX, aY);
Case Random(2) Of
0: Mouse(aX, aY, 5, 5, True);
1: Begin
Mouse(aX, aY, 5, 5, False);
Wait(500+Random(100));
ChooseOption('Chop');
End;
End;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(500);
If InvCount=PlusOne Then
Writeln('Chopped down, searching for another tree.');
Until (InvCount=PlusOne) or (TimeFromMark(TreeCounter) > 7000)
End;
End;

begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(false);
end.

^That's what I've made so far. It compiles just fine. But every time it goes to cut the trees I get this error message:


[Hint] (80:10): Variable 'Result' never used at line 79
Compiled successfully in 593 ms.
SRL Compiled in 0 msec
Tree found, chopping it down
Exception: Range check error at line 286
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

When it left clicks it'll begin cutting the tree, and then this error appear. When it right clicks I will get the error message before it can select to 'Chop down'.


EDIT: Went back a few pages, saw that others were having the same problem as well. Although the only answer I could find was:





These are in the srl5 antirandoms. Most likely you stopped the scripted before they were freed.

GoodLuck

But I never stopped the script so I'm a little lost.

EDIT 2: Been playing around with it for the past two weeks and STILL can't get anything to work. It just gives me the same error.

benny999
04-30-2012, 08:04 AM
edit: its ok i figured it out just some wrong wording and my dtm for the logs was up s**t creek thanks great tut enjoying learning for once

Lordzsolt
05-04-2012, 05:34 PM
Awesome videos, you're helping yourself by helping me learn to make a script for you :)

JK, thanks a lot!

pulse0
05-05-2012, 09:04 AM
nevermind.. fixed it. i feel stupid aha. thanks great tut so far.

Roflme
05-07-2012, 06:07 PM
Program PowerChopper;

//{$DEFINE SMART}
{$i SRL\SRL.simba}


Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = '';// Your SRL Stats Password
BreakEvery = 120; //How Many Minutes To Break After
BreakFor = 20; //How Long To Break For
Version = '1.0';


procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Your Runescape username
Players[0].Pass := ''; //Your Runescape password
Players[0].Active := True;
end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(Uptext, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5)
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 5000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(100));
FFlag(0);
End;
End;
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
1: Begin StatsGuise('AntiBan') RandomAngle(1); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False); GameTab(tab_Inv); End;
3: Begin StatsGuise('AntiBan') GameTab(tab_Stats); Wait(3000+Random(500)); GameTab(tab_Inv); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
seX, seY: Integer;
Begin
if FindObjCustom(seX, seY, ['Chop', 'Down'], [1056282, 1582114], 5) Then
begin
StatsGuise('Hooray, we found a tree');

GetMousePos(seX, seY);
Case Random(2) Of
0: Mouse(seX, seY, 5, 5, True);
1: Begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

End;
End;
begin
SetupSRL;
DeclarePlayer;
//repeat
ChopDown;
//until(false);
end.


New window: 14288022
[Hint] (71:10): Variable 'Result' never used at line 70
Compiled successfully in 578 ms.
SRL Compiled in 0 msec
Exception: Range check error at line 840
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

Been trying to fix it for two weeks and I'm still as lost as I was at the beginning. I tried searching around the forums but I found nothing.

I scripted until around 30:40 of part 1, when you are trying to display the randomness of the left and right clicking.

b3astown
05-10-2012, 11:57 PM
Amazing script. Thanks to u, I made my first script with minimal scripting knowledge. I hope to make more advanced scripts, but I couldn't have done it without u..

Thank you for taking up time to make this splendid script

sipfer2
05-14-2012, 05:27 PM
First of all nice tutorial, working with simba since i ve watched it (about 1-2 weeks ago) thanks for it! ;)

i ve got a question, is there a function which checks if there is a interface opened in the chat box? like when talking to a npc where you can select different answers?

Abu
05-16-2012, 06:41 AM
i ve got a question, is there a function which checks if there is a interface opened in the chat box? like when talking to a npc where you can select different answers?

You can look here: http://docs.villavu.com/srl-5/chat.html

jhony6180
05-22-2012, 07:12 PM
hi :P

i gots another question / problem lmao



Begin
FindNormalRandoms;
SlotBox := InvBox(LogPattern[I]);
If FindDTM(LogDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
End;
Begin
MouseItem(LogPattern[I],False);
ChooseOption('Dro');
End;
End;
.

this part of the script is stopping compiling for some reason .....

heres what the debug at boottom says

[Error] (101:37): Type mismatch at line 100
Compiling failed.

any help would be appreciated :)

insidethefire666
05-29-2012, 04:16 AM
been watching this video and this is my first day at scripting and i feel that my woodcutter pro with multiple locations and trees will be up soon and flawless thanks a lot man this video helped epically

BigRedJapan
05-31-2012, 12:16 AM
MouseItem(LogPattern[I],False);

This is Wrong! idk what to do!

YoHoJo
05-31-2012, 12:20 AM
It would help if you told what the error was.
I think you just change the false to a 2, or maybe a 1 and it's fixed.

BigRedJapan
05-31-2012, 12:24 AM
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,23, 27,4,8,14,24,28];
StatsGuise('Dropping Logs:' + IntToStr(I));
For I:=0 To 27 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(LogDtm, seX, seY,SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I],False);
//MouseItem(LogPattern[I],False);
ChooseOption('Dro');
End;
End;
End;

[Error] (142:39): Type mismatch at line 141
Compiling failed.

probably a 2 cuz we want it to right click!

YoHoJo
05-31-2012, 01:23 AM
Use simba tags when posting code too.
Okay so, replace with 2, does it fix?

Syntax
05-31-2012, 10:46 PM
Helped me out a lot, thanks Yohojo.

Mufasa
06-01-2012, 11:05 AM
Going to be following your 3rd tutorial today ^-^.

Thank you for the first 2 man:spot:

Will probably follow the 3rd video through, read 2-3 written guides then re-watch yours (they're just that good:sasmokin:) xD

Easy to follow, explanations for each command used, letting us know trial and error isn't exclusive to us noobs and all round enjoyable to follow along ^-^

+Repped:garfield:

http://img214.imageshack.us/img214/8554/ddddddddddddddu.jpg

ggsus
06-03-2012, 11:48 PM
Hey, i'm having problems with this error ( i'm about 18 mins into the first tutorial), i know it's simple, but I don't know what to do lmao :S. Please help, thanks!
On line 52,it's:

If FindObjCustom( X, Y ['Chop','Ivy'] [4091477, 5147243, 4157527, 4353142] 10,) then

the error i'm getting is:

[Error] (52:25): Semicolon (';') expected at line 51
Compiling failed.



program CWIvyCutter;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i srl/srl/misc/debug.simba}
{$i srl/srl/misc/paintsmart.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:=True;
end;
Procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;


// Failsafe
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc := Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
end;

Var
X, Y: Integer;


Function Chopdown:boolean;
begin

If FindObjCustom( X, Y ['Chop','Ivy'] [4091477, 5147243, 4157527, 4353142] 10,) then
begin
Writein('Hurray! We Found Ivy!');

end;




begin
SetupSRL;
DeclarePlayers;
Repeat
Chopdown;
until(false);


end.

YoHoJo
06-03-2012, 11:55 PM
Forgot some commas

You have
If FindObjCustom( X, Y ['Chop','Ivy'] [4091477, 5147243, 4157527, 4353142] 10,) then
You need
If FindObjCustom( X, Y, ['Chop','Ivy'], [4091477, 5147243, 4157527, 4353142] ,10 (Remove extra comma here)) then

ggsus
06-04-2012, 12:49 AM
thanks :), now i have one last problem.. It says:
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.


program CWIvyCutter;
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i srl/srl/misc/debug.simba}
{$i srl/srl/misc/paintsmart.simba}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:=True;
end;
Procedure Statsguise(wat:string);
begin
status(wat);
Disguise(wat);
end;
Procedure Antiban;
begin
if(not(LoggedIn))then Exit;
begin
case Random(100) of
10: RandomRClick;
30: PickUpMouse;
50: RandomMovement;
70: BoredHuman;
89: ExamineInv;
end;
end;
end;


// Failsafe
Procedure FailSafe(Reason:String);
begin
Players[CurrentPlayer].Loc := Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
end;

Var
X, Y, Plusone, Treecounter: Integer;


Function Chopdown:boolean;
begin
Plusone:=invcount+1;
If FindObjCustom( X, Y, ['Chop','Ivy'], [4091477, 5147243, 4157527, 4353142] ,10) then
begin
Statsguise('Hurray! We found Ivy!');
getmousepos(x,y);
Case Random(2) of
0: Mouse(x, y, 5, 5, true);
1: Begin
mouse(x, y, 5, 5, false);
Chooseoption('chop');
waitoption('chop',500);
end;
end;

repeat
Marktime(Treecounter);
antiban;
wait(100);
if invcount=Plusone then
statsguise('We Got one!');
Until (invcount=Plusone) or (timefrommark(Treecounter) > 3000)

begin
SetupSRL;
DeclarePlayers;
Repeat
Chopdown;
until(false);
end.

YoHoJo
06-04-2012, 01:02 AM
Last end in script must ALWAYS end with period.
End.

You seem to also be missing some begins (or end; s ) around your script.

ggsus
06-04-2012, 01:15 AM
sorry for bugging you :(, where am i missing them? I changed the last end to a period, but it says error compiling there because there is no semi-colon.. I'm really bad at this lmao. :(
Thanks

TehNeonFishy
06-04-2012, 08:50 PM
Exception: Range check error at line 286
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

This error appears when I run the script, it doesn't print the "we got one" but it does manage to cut the tree. the inventory Simba tab also opens when the error occurs, but not to any certain function. Any ideas? =/

Function ChopTree:Boolean;
Var
X, Y, PlusOne, TreeCounter: Integer;
Begin
PlusOne:= InvCount + 1;
If FindObjCustom(X, Y, ['Chop', 'down', 'p d'], [1054486, 1516579, 2833741, 1252637], 10) Then
Begin
StatsGuise('Hooray, we found a tree');
GetMousePos(X, Y);
Case Random(1) Of
0: Mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=PlusOne Then
Writeln('We got one.');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000)

End;
End;

Begin
SetupSRL;
DeclarePlayers;
SetAngle(SRL_ANGLE_LOW);
Repeat
ChopTree;
Until(false);

End.

abibot
06-15-2012, 03:41 AM
Some of the SRL calls have changed try


ClickNorth(SRL_ANGLE_HIGH); //Or SRL_ANGLE_LOW or SRL_ANGLE_NONE
SetAngle(SRL_ANGLE_HIGH); //Or SRL_ANGLE_LOW

There is a whole thread on new srl function and procedure calls. Just search "set angle error srl5" or something =)



These are in the srl5 antirandoms. Most likely you stopped the scripted before they were freed.

GoodLuck

Thanks Mr. Freeweed, cleared up the SetAngle(false) compiling error. YoHoJo, perhaps you could add a note to your vid to help out future learners?

THANKS YoHoJo!

YoHoJo
06-15-2012, 03:44 AM
Yeah I've been meaning to add annotations/comments/edit description etc etc to address all of the fixes and things that need to be done.

It's not very many but you need to change some .scar to .simba and change some true/false to 1/2s and stuff.

Glad so many people are enjoying these!!!

YoHoJo
06-16-2012, 10:19 PM
It's summer time!
What better time than now to start leaning how to script?!

Bu3
06-19-2012, 09:17 PM
Hey man thanks for the tutorial, I'm having problems with one of the lines though, I get a compiling error:

Internal error (20) at line 29
Compiling failed.


Line 29:
FindColorSpiralTolerance(x, y, 416254, 192, 433, 439, 648, 20) then

EDIT: Nevermind, I found what was missing.

ShadowsTM
06-22-2012, 02:06 PM
Just watched the first video now watching the other two, Finally finished exams to can learn to script.
Thanks for these!

Tigerheart
09-22-2012, 09:04 PM
Just confused about line 23 on your script with the
for i ;= 0 to NumbOfPlayers-1 do
Players(i).BoxRewards (= ('mote', 'ostume', What is the whole scripting part here

Le Jingle
09-22-2012, 09:15 PM
Just confused about line 23 on your script with the
for i ;= 0 to NumbOfPlayers-1 do
Players(i).BoxRewards (= ('mote', 'ostume', What is the whole scripting part here

This means, for all players you are setting up, they will each be assigned those reward box details. It could also be written as:

Players[0].BoxRewards := ['mote', 'ostume']; // .. etc
Players[1].BoxRewards := ['mote', 'ostume']; // .. etc
Players[2].BoxRewards := ['mote', 'ostume']; // .. etc
//etc (for more players)


The for to do loop saves code. A good practice too.

Footy
09-22-2012, 09:16 PM
Its a for..to..do loop. As a beginner, you don't need to worry about these. If you have any other questions, feel free to PM me. :)
E: Looks like Jingle explained it for you. :D

Sax
10-15-2012, 05:15 PM
Hey. I loved your guide. I wonder if you could post the code of the script or send me via PM. Please it would be great :D

Silentcore
10-15-2012, 05:40 PM
Hey. I loved your guide. I wonder if you could post the code of the script or send me via PM. Please it would be great :D

If i'm not mistaken, he mentions something about writing it yourself because it's good practice. I know its a bit hard to see but try your best and write the functions yourself. I'm not trying to be mean but I bet that when you type them, you will feel like you learned something.

Rezozo
10-15-2012, 07:13 PM
Plus this was made ages ago, I do not think he still has it :P

Sax
10-15-2012, 09:23 PM
If i'm not mistaken, he mentions something about writing it yourself because it's good practice. I know its a bit hard to see but try your best and write the functions yourself. I'm not trying to be mean but I bet that when you type them, you will feel like you learned something.

right right right I think you're right. I'll write the code. Thanks :spot:

speedster
10-17-2012, 02:00 AM
After a while coding, stuff keeps getting easier and easier. Although I saw some scripts with incredible advanced coding... I need to study some more to reach that level.

Hapayboy
10-21-2012, 03:53 PM
[Error] (4:1): Semicolon (';') expected at line 3
Compiling failed.



As far as I know, I"m actually copying your first youtube video and it worked like 5 seconds ago but then when I tried to play it instead of compile it. It gives me this shit


procedure Startgame;
begin
movemouse (251, 381);
clickmouse (251, 381, 1);
wait (500);
movemouse(436, 357);
clickmouse(436, 357, 1);
wait(500)
movemouse (374, 172);
clickmouse (374, 172, 1);
wait (500);
end;

Footy
10-21-2012, 04:00 PM
You need to name the program first. Just put Program Programname; as your first line, feel free to change the name to whatever.

NKN
10-21-2012, 04:03 PM
Edit: I lied, that's not line 3.

Enslaved
10-25-2012, 09:22 AM
[Error] (4:1): Semicolon (';') expected at line 3
Compiling failed.



As far as I know, I"m actually copying your first youtube video and it worked like 5 seconds ago but then when I tried to play it instead of compile it. It gives me this shit


procedure Startgame;
begin
movemouse (251, 381);
clickmouse (251, 381, 1);
wait (500);
movemouse(436, 357);
clickmouse(436, 357, 1);
wait(500)
movemouse (374, 172);
clickmouse (374, 172, 1);
wait (500);
end;
instead of doing movemouse, you can directly use clickmouse
but its nicer to change clickmouse into clickmouse2 as it allows you to change the script in future for humanlike mouse movements

Runehack123
10-26-2012, 01:56 PM
DTM is used in video#2 and video#3.
How come the DTM is never released in your TuT?

I mean no offence by questioning, but based on what I read about DTMs and bitmaps, you can cause memory leaks by not releasing them...?

Mat
10-26-2012, 09:52 PM
http://i.imgur.com/5OOBX.png
Like Lol? Condoms = YohojoSRL?
:d

Hapayboy
11-05-2012, 12:27 AM
I have a script for a runescape private server that steals from stalls and on this rsps (soulsplit) it gives you straight Gp at pretty fast rates, This is my script I have so far it is **"NEXT"** to flawless after 6 hours or the eventually it will mess up somewhere (the server has a "macro dection system and teleports you after a few clicks). I'm looking for something that can have it reset it to a location, i have tried it and failed I'm saying if it can't find lets so COLOR then make it do fixit, I've had some ideas on looking off other scripts and none are a bighelp
Fixit = trying to do what my problem is
Stealsilk = finds the color and steals it
program SilkStealer;
{$i srl\srl.simba}
var
const
COLOR = 1414674; //replace 000 with the numbers you get for each stall.
AMOUNT = 22767; //replace 000 with the amount gained from when you steal from the stall
var
x, y, w, h, loot, money :Integer;
procedure StealSilk;
begin
GetClientDimensions(w, h);
if FindColor(x, y, COLOR, 0, 0, w-1, h-1)then
begin
loot := (loot + 1);
Mouse(x, y, 0, 0, True);
end else
wait(100);
end;
procedure teleport;
begin
movemouse (1045,173)
wait (25)
clickmouse (1045,173,1)
wait(500)
movemouse (871,266)
wait (25)
clickmouse (871,266,1)
wait (2000)
movemouse (559, 353)
wait (500)
clickmouse (559,353,1)
wait (10000)
end;
procedure fixit;
begin
If NoChange then
teleport;
end;
procedure login;
begin
if FindColor(x, y, 1478316, 0, 0, w-1, h-1)then
begin
mouse(719, 348, 0, 0, true);
wait(15000)
end else
wait(1)
end;
begin
ClearDebug;
SetUpSRL;
MouseSpeed := 1000;
AddOnTerminate('Proggy');
repeat
ClearDebug;
Stealsilk;
FixIt;
login;
until (IsKeyDown(114)); //pres F3 to stop and continue to Proggie!
end.

marc2333
11-05-2012, 07:35 PM
All of you Tutu or simply awsome ! Thanks alot

SparticusBlind
11-08-2012, 04:34 AM
I really like your tutorial! After watching your first video I attempted to write my own code for spank the monkey. I wrote it and then tried getting it to run and it wouldn't run...I then went back and compared your script to mine and they seemed identical. It seems the code for "holdmouse" is not functioning whenever I try it. Any opinions?


program SpankTheMonkey;

var
x, y:Integer;

begin
MoveMouse(545, 189);
HoldMouse(545, 221, 1);
MoveMouse(22, 190);
ReleaseMouse(x, y, 1);
end.

CRASH_OVERRIDE
11-17-2012, 01:50 AM
This is the simba script used in part2#1 and part2#2 All updated to the latest simba release:
program PowerChopper;

{$DEFINE SMART}
{$I SRL/SRL.simba}
//{$i SRL/SRL/Misc/Stats.simba}


Const
SRLStats_Username = ''; //Your SRL Stats Username
SRLStats_Password = ''; //Your SRL Stats Password
BreakEvery = 120; //How many minutes to break after
BreakFor = 5; //How long to break for
Version = '1.0';
NumbOfPlayers = 1; //How many players you are using
StartPlayer = 0; //Player to start autoing with! (0 means first char)

Var
TooLong: Integer;

procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Nick := ''; //Player nickname - 3-4 letters of Player username.
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;

// with Players[1] do
// begin
// Name := ''; //Player username.
// Pass := ''; //Player password.
// Nick := ''; //Player nickname - 3-4 letters of Player username.
// Active := True;
// Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
// Integers[2] := 4; //Seconds to try mining rock before clicking another.
// end;

end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('AntiBan') GameTab(tab_stats) Hoverskill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
Writeln(Reason);
TerminateScript;
End;

Function ChopDown:Boolean;
Var
seX, SeY, PlusOne, TreeCounter: Integer;
Begin
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:= InvCount + 1;
//If FindObjCustom(seX, seY, ['Chop', 'down', 'p d'], [3426909, 2833741], 5) Then
Sex:=MSCX;
Sey:=MSCY;
If FindObjTPA(SeX, SeY, 2899791, 10, 1, 15, 60, 600, ['Cho']) Then
Begin
StatsGuise('Found a tree');
GetMousePos(seX, seY);

Case Random(2) Of
0: Mouse(seX, seY, 5, 5, True);
1: Begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) Then
FailSafe('Could not find Tree');
Repeat
If (TimeFromMark(TooLong) > 30000) Then
FailSafe('Could not find Tree');
FindNormalRandoms;
StatsGuise('Antiban and Waiting');
Antiban;
Wait(1000);
If InvCount=Plusone Then
WriteLn('Chopped log successfully');
Until (InvCount=Plusone) Or (TimeFromMark(TreeCounter) > 5000)

End;
End;

Procedure DropLogs;
Var
SeX, SeY, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;


Begin
MarkTime(TooLong);
LogDTM := DTMFromString('mggAAAHicY2NgYFBlZmBQAWJxIFYEYn0gNg LivYwMDJuBeBcQnwDiI0C8B4j9rJWAupgw8H8G7IARB4YAAHhR By0=');
LogPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19, 23,27,4,8,12,16,20,24,28]
StatsGuise('Dropping Logs');
For I:=0 To 27 Do
Begin
FindNormalRandoms;
StatsGuise('Dropping Log:' + IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,Sex,Sey,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2)Then
Begin
MouseItem(LogPattern[I],mouse_Right);
ChooseOption('Dro');
End;
End;
MarkTime(TooLong);
End;

begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
If InvFull Then
DropLogs;
Until(false);

End.

I reallly REALLY REALLY do suggets you watch the videos first. But i am posting this because in all honesty i was lost as well with all of this, i had to download his video from youtube in 1080p to watch and pause and watch and pause until i got all of the script. And in the end i missed 2 very small things a ; and mouse_Right one of them was an update. After 5 hours of hard work watching these tutorials to then have a script not work is rather upsetting. So after spending another 3 hours on these forums i was given help and now the script is working fine.

If the admins to not approve please remove my post. But i really do think that if you guys want to train newbies like myself you need something that is up-to-date. I have also posted the updates on the Paint script/tutorial.

YoHoJo
01-03-2013, 10:45 PM
Hello World

Sjoe
01-04-2013, 03:39 AM
Hello World

Hi there

Loved your tutorials ;) Very helpful

wayiyi
01-05-2013, 12:36 PM
Can you tell me how to fix this problem?
[Hint] C:\Users\2345324\Desktop\PowerChopper.simba(91:10) : Variable 'Result' never used at line 90
[Error] C:\Users\234
[Error] C:\Users\Sam5324\Desktop\PowerChopper.simba(170:4) : Identifier expected at line 169
Compiling failed.
program PowerChopper;

{$DEFINE SMART}
{$i SRL/SRL.simba}

const
SRLStats_Username = '';
SRLStats_Password = '';
NumbOfPlayers= 1;
StartPlayer= 0;
Var
Toolong:Integer;

procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
Integers[1] := 4;
Integers[2] := 4;
end;

end;


Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;


Function CheckAndClick(UpText:String; X,Y:Integer; RClick:String):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);

Case RClick Of

'R':
Begin
Mouse(x, y, 0, 0, False);
WaitOption('hop', 4000);
FFlag(0);
End;

'L':
Begin
Mouse(x, y, 0, 0,True);
Wait(100+Random(50));
FFlag(0);
End;

End;
End;

End;

Procedure Antiban;
Begin
Case Random(5000) Of
0: Begin StatsGuise ('Antiban') GameTab(Tab_Stats) HoverSkill('Woodcut', False) GameTab(28) End;
1: Begin StatsGuise ('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise ('Antiban') GameTab(tab_Inv)ExamineInv; GameTab(28); End;
3: Begin StatsGuise ('Antiban') GameTab(Tab_Stats); Wait (7000 + Random(500)); GameTab(22) End;
End;
End;


Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
WriteLn(Reason);
TerminateScript;
End;

Function ChopDown:Boolean;
Var
X, Y, PlusOne, TreeCounter, TooLong: Integer;
Begin
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:= InvCount + 1;
if FindObjCustom(X, Y, ['Chop', 'Down', 'p d'], [2239796, 2766654, 1252636], 5) Then
x:=MSCX;
y:=MSCY;
If findObjTPA(X, Y, 3426909, 10, 1, 15, 60, 600, ['Cho']) Then
Begin
StatsGuise('we got one');
GetMousePos(x, y);

Case Random(2) Of
0: Mouse(X, Y, 5, 5, True);
1: Begin
Mouse(X, Y, 5, 5, False);
WaitOption('Chop', 4000);
End;
End;

Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 120000) Then
FailSafe('Cant find tree');

Repeat
If (TimeFromMark(TooLong) >120000) Then
FailSafe('Cant find tree');
FindNormalRandoms;
StatsGuise('Antiban')
FailSafe('Cant find tree');
Antiban;
MarkTime(TreeCounter);
Antiban;
Wait(1000);
If InvCount=PlusOne Then
Writeln('we got one');
Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 17000)

End;
End;

Procedure DropLogs;
var
X, Y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;

Begin
MarkTime(TooLong);
LogDTM := DTMFromString('mwQAAAHic42RgYLBnYmCwAGJjIDYDYlcgdg FiDyaIHAjXMDIwtABxExBXAXEZlF0PxO1AXA7EsW6aDM2ZVgw1 yeZgOtxRDSwGwiEOqmA+MYCRCAwHABzIDsk=');
LogPattern:=([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ,18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28]);
StatsGuise('dropping logs:' + IntToStr(I));
For I:=0 To 27 Do
Begin
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(LogDTM,X,Y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
MouseItem(LogPattern[I],0);
ChooseOption('Dro');
End;

End;



Begin

SetupSRL;
DeclarePlayers;
Repeat
ChopDown
If InvFull Then;
DropLogs
Until(False);

End.

The Killer
01-05-2013, 12:45 PM
^use simba tags. Result var not being used is because you used a function instead of a procedure (functions should be used to return a result.)

wayiyi
01-05-2013, 03:16 PM
I still cant get it working

rytoke
01-12-2013, 05:39 AM
Thanks for the tutorial, it's really well made, anyway;
here is my problem.

[Hint] C:\Simba\Scripts\PowerChopper.simba(70:10): Variable 'Result' never used at line 69
[Error] C:\Simba\Scripts\PowerChopper.simba(126:40): Type mismatch at line 125
Compiling failed.

line 125 consists of the following;

119: Begin
FindNormalRandoms;
StatsGuise('Dropping Log:' + IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTm(LogDTM,SeX,SeY,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
Begin
125: MouseItem(LogPattern[I],False);
ChooseOption('Dro');
End;
End;
MarkTime(TooLong);
130: End;

Added the line numbers as a reference.

digitalninja
01-30-2013, 03:45 PM
Hey YoHoJo,

Loved your script ... used it to create my own Citadel Loomer and after a few errant/missed semi-colons finally got it to work. I then went back to another Citadel Loom script and was able to decipher the code based on everything you had taught in this tutorial! Wicked job ... really appreciate it!

Cheers,

DN

digitalninja
01-31-2013, 04:59 PM
I have a follow up question ... I am having the same issue your tutorial was having where it would left click even if the text was not there. (ie it will click a color similar to the loom even though it doesnt say "weave"). Was there a better function to be using or a reason why this is happening?

Gucci
01-31-2013, 05:18 PM
I have a follow up question ... I am having the same issue your tutorial was having where it would left click even if the text was not there. (ie it will click a color similar to the loom even though it doesnt say "weave"). Was there a better function to be using or a reason why this is happening?

Try using a secondary UpText check like WaitUpText('text', WaitTime)

digitalninja
01-31-2013, 08:09 PM
Try using a secondary UpText check like WaitUpText('text', WaitTime)

Thanks Gucci ... after watching the 2nd script it also looks like the FindObjTPA worked a little better as well. Amazing how a few little 'tweaks' to tolerance made everything run smooth! I was also on the IRC channel this morning and didnt understand 1/2 of what was being said (it was about lape and 1/2 is optimistic ... I didnt understand a damn word). Just means I got me some more tutorials to watch!

melkoo
03-09-2013, 10:58 PM
I am using rs07 dunno if this changes anything

Hopefully I can get some help!



program PowerChopper;
//{$DEFINE SMART8}
{$i SRL\SRL.simba}

Const
SRLStats_Username = '';// Your SRL Stats Username
SRLSTats_Password = '';// Your SRL Stats Password
BreakEvery = 120; //How many minutes to break after
Breakfor = 5; //How long to break for
Version = '1.0';
NumbOfPlayers = 1; //How many players you are using
StartPlayer = 0; //Player to start auting with (0 means first char)

Procedure DeclarePlayers;
var i:integer;
begin
NumberOfPLayers(NumbOfPlayers);
CurrentPLayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player Password.
Active := True;
Integers[1] := 4; //1=BrightCopper, 2=DarkCopper, 3=Tin, 4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;
end;

Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
end;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
Begin
MMouse (x, y, 5, 5);
If WaitUptext (UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos (x, y);
If RClick Then
Begin
Mouse (x, y, 0, 0, False);
Result := WaitOption (Option, 2000);
If Result then FFlag (0);
End Else
Begin
Mouse (x, y, 0, 0, True);
Wait (100+Random(50));
FFlag(0);
End;
End;
End;

Procedure Antiban;
Begin
Case Random(250) of
0: Begin StatsGuise ('AntiBan') Gametab(tab_Stats) Hoverskill('Woodcut', False) GameTab(28) End;
1: Begin StatsGuise ('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise ('AntiBan') GameTab (tab_Inv) ExamineInv; GameTab(28) End;
3: Begin StatsGuise ('Antiban') RandomAngle (1); End;
4: Begin StatsGuise ('Antiban') GameTab (Tab_Stats); Wait(3000 + Random(500)); GameTab (28); End;
5: Begin StatsGuise ('Antiban') GameTab(Tab_Stats); HoverSkill ('Random', False); GameTab (28); End;
End;
End;

Procedure Failsafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function Chopdown:Boolean;
Var
X, Y, PlusOne, Treecounter: Integer;
Begin
PlusOne:= InvCount + 1;
If FindObjCustom(X, Y, ['Chop', 'Down', 'p' ,'d'], [3627896, 3166827, 3627896, 1454376, 269596, 2044719 ], 10) Then
Begin
StatsGuise('This is the start of something Great!');
GetMousePos(X, Y);
Case Random(1) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=Plusone Then
WriteLn('We got one');
Until (InvCount=Plusone) or (TimeFromMark(TreeCounter) > 7000)
End;
end;


begin
SetupSRL;
DeclarePlayers;
SetAngle(SRL_ANGLE_LOW);
//Repeat
ChopDown
//Until(False);
end.



My first problem is the

SetAngle(SRL_ANGLE_LOW); It does not put the angle all the way down when I execute the script. I orignally tried using SetAngle(False); But then I get this compiling error

[Error] C:\Simba\Scripts\powerchopper.simba(112:17): Type mismatch at line 111
Compiling failed.

Also when I try to get it to write "We got one" using the WriteLn command nothing gets written.

Another problem is that when

Case Random(1) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

If It choses the 1 instead of 0 it does not click Chop Down it just opens up the drop down menu (From when you rightclick in runescape) but dosnt do anything




Function Chopdown:Boolean;
Var
X, Y, PlusOne, Treecounter: Integer;
Begin
PlusOne:= InvCount + 1;
If FindObjCustom(X, Y, ['Chop', 'Down', 'p' ,'d'], [3627896, 3166827, 3627896, 1454376, 269596, 2044719 ], 10) Then
Begin
StatsGuise('This is the start of something Great!');
GetMousePos(X, Y);
Case Random(1) of
0: Mouse(x, y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption('Chop', 500);
End;
End;

Repeat
MarkTime(TreeCounter);
Antiban;
Wait(100);
If InvCount=Plusone Then
WriteLn('We got one');
Until (InvCount=Plusone) or (TimeFromMark(TreeCounter) > 7000)
End;
end;

aBsTrUcT
03-10-2013, 01:40 AM
Can you use this scripting tutorial to script in Old School RS?

Thanks

count to potato
06-16-2013, 07:01 PM
Hey Yohojo, you make some great videos! You seem very composed during them.

I'm getting this error:
[Error] C:\Simba\Scripts\Powerchopper.simba(34:1): 'BEGIN' expected at line 33
Compiling failed.

program Powerchopper;
{$DEFINE SMART8} // Change to {$DEFINE SMART} if not using SMART8.
{$i SRL/srl.simba}
{$i SRL/SRL/Misc/SmartGraphics.simba}
//{$i SRL/SRL/Misc/Stats.simba}


Const
SRLStats_Username = ''; //Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 120; //How Many Minutes to Break After
BreakFor = 5; //How Long to Break For
Version = '1.0';


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Bank PIN
Member := true;
Active := true;
end;

end;

proceudre StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y,);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('Antiban') GameTab(tab_Stats) Hoverskill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('Antiban') RandomAngle(1); End;
3: Begin StatsGuise('Antiban') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
4: Begin StatsGuise('Antiban') GameTab(tab_inv) ExamineInv; GameTab(28); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
X, Y: Integer;
Begin
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
If FindObjCustom(X, Y, ['Chop', 'Dead'], [1979453, 2173748], 23) Then
WriteLn('Woot, we found a tree!');
End;




Begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(false);


End.

What am I doing wrong here? :duh: Anyone?

edit: Also I'm chopping dead trees, that's why the uptext option is different.

Ian
06-16-2013, 07:45 PM
Hey Yohojo, you make some great videos! You seem very composed during them.

I'm getting this error:
[Error] C:\Simba\Scripts\Powerchopper.simba(34:1): 'BEGIN' expected at line 33
Compiling failed.

program Powerchopper;
{$DEFINE SMART8} // Change to {$DEFINE SMART} if not using SMART8.
{$i SRL/srl.simba}
{$i SRL/SRL/Misc/SmartGraphics.simba}
//{$i SRL/SRL/Misc/Stats.simba}


Const
SRLStats_Username = ''; //Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 120; //How Many Minutes to Break After
BreakFor = 5; //How Long to Break For
Version = '1.0';


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name :=''; // Username
Pass :=''; // Password
Pin :=''; // Bank PIN
Member := true;
Active := true;
end;

end;

proceudre StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;

Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean):Boolean;
Begin
MMouse(x, y, 5, 5);
If WaitUptext(UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y,);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption(Option, 2000);
If Result Then FFlag(0);
End Else
Begin
Mouse(x, y, 0, 0, True);
Wait(100+Random(50));
FFlag(0);
End;
End;
End;

Procedure Antiban;
Begin
Case Random(250) Of
0: Begin StatsGuise('Antiban') GameTab(tab_Stats) Hoverskill('Woodcutting', False) GameTab(28) End;
1: Begin StatsGuise('Antiban') SleepAndMoveMouse(7000 + Random(500)); End;
2: Begin StatsGuise('Antiban') RandomAngle(1); End;
3: Begin StatsGuise('Antiban') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
4: Begin StatsGuise('Antiban') GameTab(tab_inv) ExamineInv; GameTab(28); End;
End;
End;

Procedure FailSafe(Reason:String);
Begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;

Function ChopDown:Boolean;
Var
X, Y: Integer;
Begin
//FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 5);
If FindObjCustom(X, Y, ['Chop', 'Dead'], [1979453, 2173748], 23) Then
WriteLn('Woot, we found a tree!');
End;




Begin
SetupSRL;
DeclarePlayers;
Repeat
ChopDown;
Until(false);


End.

What am I doing wrong here? :duh: Anyone?

edit: Also I'm chopping dead trees, that's why the uptext option is different.

On line 33 change proceudre to procedure

Also you'll need to remove the comma after the y on line 45. So change GetMousePos(x, y,); to GetMousePos(x, y);

count to potato
06-16-2013, 08:31 PM
On line 33 change proceudre to procedure

Also you'll need to remove the comma after the y on line 45. So change GetMousePos(x, y,); to GetMousePos(x, y);

Thanks - I'll implement these changes when I get home tonight!

And I know I sent you this in a PM but.. Thank you so much for telling me I left my details in the script. :blushing:
Much love and respect!

Zealon
07-31-2013, 04:53 PM
Even more helpful than your beginner's guide, again, thank you very much for the guide

Athylus
08-12-2013, 09:46 PM
Can this be used for RS07 as well?

Hoodz
08-12-2013, 09:59 PM
Can this be used for RS07 as well?

Yes, but you need another include (srl-osr) and at least smart 8 (smart8.2 for oldschool reflection! Still in development)

Goodluck scripting!

Edit: smart is only needed if you minimise your bot.

Athylus
08-13-2013, 12:35 AM
Thanks for the info. I got that SRL-OSR, followed the 4 videos by Yohojo. Awesome.

Using this to pick potatoes, but the only thing it does is keep moving the mouse over potatoes very fast. Using the exact same code as you provided in the tutorial but of course changed to the potatoes. What's wrong? I've been trying to find a solution the past 2 hours. I'm going to sleep now.

Edit: Only need to be able to walk now! I'm getting better at this by the minute.