Great tutortial, and disreguard everything else you may have seen in my post.
Last edited by i_liek2feesh; 12-21-2011 at 09:33 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 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.
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!
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.
Simba Code: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.
Last edited by KFC; 01-01-2012 at 10:01 PM.
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==');
Dan, you forgot adding an ";" in the end of the name of the program, it should be:
program powerchopper;
Last edited by Mokwa; 01-02-2012 at 01:04 AM.
Anti-Leech Movement Prevent Leeching Spread the word
Insanity 60 Days (Killer workout)
XoL Blog (Workouts/RS/Misc)
Simba Code: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?
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;
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!
I really liked it. But could you post your finished code?
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!
My Soul Wars Scipt Proggress:[100%....]Probably won't release though I like it for myself
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.
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.
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
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 ^^
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 .
Simba Code: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.
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
Can't seem to help much more because Simba isn't say which line is the problem.
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
Last edited by Giant Panda; 01-11-2012 at 02:28 PM.
Oh gawd, I think im a leecher :3, il try and follow your guide, thanks ))))
Well time to actualy make my own script =D
instead of just offering help.
If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly.
Simba Code:Procedure DropLogs;
var
x, y, LogDTM, I: Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
LogDTM:= DTMFromString('m1gAAAHic42JgYOBngABmIOYBYgkglgNiSSCWAmJRqBpuIBYGYg4gFoey+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 gettingThats the MouseItem(LogPattern[I],False);Code:[Error] (131:35): Type mismatch at line 130
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
Last edited by poopy2177; 01-14-2012 at 08:51 PM.
My Soul Wars Scipt Proggress:[100%....]Probably won't release though I like it for myself
There are currently 1 users browsing this thread. (0 members and 1 guests)