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
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
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?
hi :P
i gots another question / problem lmao
this part of the script is stopping compiling for some reason .....HTML Code: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; .
heres what the debug at boottom says
[Error] (101:37): Type mismatch at line 100
Compiling failed.
any help would be appreciated![]()
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
Goals:
Learn to script(doing)
Write Basic Yew and magic log cutter(DONE!NEEDS WALKING AND BANKING 1ST)
Create Universal Fighter
MouseItem(LogPattern[I],False);
This is Wrong! idk what to do!
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.
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!
Helped me out a lot, thanks Yohojo.
Going to be following your 3rd tutorial today ^-^.
Thank you for the first 2 man
Will probably follow the 3rd video through, read 2-3 written guides then re-watch yours (they're just that good) 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
![]()
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.
Code: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.
Last edited by ggsus; 06-04-2012 at 12:50 AM.
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
thanks, now i have one last problem.. It says:
[Error] (1:1): Unexpected end of file at line 0
Compiling failed.
Code: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.
Last edited by ggsus; 06-04-2012 at 01:15 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.
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
Last edited by ggsus; 06-04-2012 at 11:28 PM.
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? =/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]
Simba Code: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.
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!!!
Hey man thanks for the tutorial, I'm having problems with one of the lines though, I get a compiling error:
Simba Code:Internal error (20) at line 29
Compiling failed.
Line 29:
Simba Code:FindColorSpiralTolerance(x, y, 416254, 192, 433, 439, 648, 20) then
EDIT: Nevermind, I found what was missing.
Last edited by Bu3; 06-19-2012 at 09:54 PM.
Just watched the first video now watching the other two, Finally finished exams to can learn to script.
Thanks for these!
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:
Simba Code: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.
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.![]()
Thx Euphemism and Vinyl for the awesome siggy and avatar!
There are currently 1 users browsing this thread. (0 members and 1 guests)