This is my first simba script
also my first reflection script
dont have reflection
go here
http://villavu.com/forum/showthread....707#post710707
this is a willow chopper and banker with reflection and antiban
This is my first simba script
also my first reflection script
dont have reflection
go here
http://villavu.com/forum/showthread....707#post710707
this is a willow chopper and banker with reflection and antiban
~Austin~
I looked through the code briefly and I suggest you take a look at these two tutorials. The way you have tried to create a failsafe is a little ineffective.
Scripting standards -
http://villavu.com/forum/showthread.php?t=3293
Failsafes -
http://villavu.com/forum/showthread.php?t=43037
Also, you should add some time marks into your repeats so you don't have them repeating forever if the condition is not met. For instance, in bank1 you have
You could do something likeSCAR Code:repeat
OpenBank('db',true,true);
wait(500);
if (not(R_loggedin)) then
loginplayer;
until bankscreen = true
SCAR Code:MarkTime(z); // z should be declared as an integer
repeat
OpenBank('db',true,true);
wait(500);
if (not(R_loggedin)) then
loginplayer;
if(TimeFromMark(z) > 60000)then
TerminateScript;
//60000 is 60 seconds. So, if the script has been trying to open the bank for 60 seconds and still hasn't done it, then the script will terminate.
until bankscreen = true
Good job for your first script, though.
Last edited by bbri06; 05-17-2010 at 02:47 AM.
Pascal Code:program Treechopper;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/reflection/reflection.simba}
{dont have reflection http://blanddns.no-ip.org:81/repos/reflection}
{see my tut to set it up http://villavu.com/forum/showthread.php?p=710707#post710707}
var
x, y, a, b, c, d, e2, f, t, t1, t2: Integer;
r1, r2: String;
Bank, Trees, e: TTile;
{------------------------------------------------------------------------------}
{------------------------------PLayer setup------------------------------------}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Your RuneScape username.
Pass := ''; // Your RuneScape password.
Nick := ''; // 3-4 LOWERCASE letters from username.
Active := True; // Use this player?
end;
end;
{------------------------------------------------------------------------------}
{---------------------------------keep out-------------------------------------}
procedure Report;
begin
t := GetTimeRunning / 1000;
t1 := t / 60;
t2 := t1 / 60;
d := c * 28;
ClearDebug;
Writeln('-----Willow tree------');
Writeln('-------Chopper--------');
Writeln('Total loads ' + IntToStr(c) + ' Total logs ' + IntToStr(d));
Writeln('-----Current act------');
Writeln(' ' + r1 + ' ');
Writeln(' ' + r2 + ' ');
Writeln('------Time running----');
Writeln(' ' + IntToStr(t2) + ' hrs ' + IntToStr(t1) + ' mins ' + IntToStr(t) + ' sec');
Writeln('Levels gained: ' + IntToStr(b));
Writeln('Pos ' + IntToStr(e2) + ' anim ' + IntToStr(GetAnimation) + ' ');
end;
procedure StartUp;
begin
MakeCompass('n');
SetAngle(True);
r1 := 'Starting up.';
r2 := 'Making compass north.';
Report;
Bank := Tile(3092, 3243);
Trees := Tile(3085, 3237);
end;
procedure FaiSafe;
begin
repeat
if (not(R_LoggedIn)) then
LoginPlayer;
if not(FindObjCustom(x, y, ['illow'], [10076602, 5207920], 5)) then
begin
Inc(a);
Wait(2750 + Random(500));
r1 := 'No tree found, waiting.';
r2 := 'Try ' + IntToStr(a);
Report;
Writeln('No trees found waiting.');
end else
begin
r1 := 'Tree found! Moving on.';
r2 := 'Tries ' + IntToStr(a);
Report;
Writeln('Trees found right postion. Moving on.');
Wait(250 + Random(500));
a := 0;
Exit;
end;
Writeln('Try ' + IntToStr(a));
if(a = 5)then
begin
r1 := 'No tree found, max trys.';
r2 := 'logging out';
Report;
Writeln('LOST! logging out.');
LogOut;
TerminateScript;
end;
until False;
end;
procedure Bank1;
begin
if (not(R_LoggedIn)) then
LoginPlayer;
WalkToTile(Bank, 0, 0);
R_Flag;
r1 := 'Walking...';
r2 := ' ';
Report;
r1 := 'Looking for bank...';
r2 := ' ';
Report;
repeat
OpenBank('db', True, True);
Wait(250 + Random(500));
if (not(R_LoggedIn)) then
LoginPlayer;
until BankScreen;
r1 := 'Depositing all.';
r2 := ' ';
Report;
DepositAll;
CloseBank;
r1 := 'Waiting...';
r2 := ' ';
Report;
WalkToTile(Trees, 0, 0);
if (not(R_LoggedIn)) then
LoginPlayer;
R_Flag;
r1 := 'Entering failsafe...';
r2 := ' ';
Report;
FailSafe;
end;
procedure AntiBan;
begin
if (not(R_LoggedIn)) then
LoginPlayer;
case Random(8) of
1..3: SmartMoveMouse(x + Random(342), y + Random(452));
4: Wait(234 + Random(34));
5: MakeCompass(Random(180));
6: MakeCompass(Random(-180));
7, 8: RandomMovement;
end;
end;
procedure FindTrees;
begin
repeat
if (not(R_loggedin)) then
LoginPlayer;
r1 := 'Searching for tree.';
r2 := '';
Report;
if(FindObjCustom(x, y, ['illow'], [10076602, 5207920], 5))then
begin
SmartClickMouse(x, y, True);
R_Flag;
repeat
AntiBan;
Wait(1000 + Random(250));
if(LevelUp)then
begin
Inc(b);
LevelUp;
end;
until not((GetAnimation = 875) or (InvFull));
r1 := 'Tree gone.';
r2 := 'Or full.';
Report;
Wait(750 + Random(500));
until InvFull;
r1 := 'Full!';
r2 := 'Banking.';
Report;
Bank1;
end;
begin
SetupSRL;
Report;
DeclarePlayers;
LoginPlayer;
repeat
Wait(50 + Random(50));
until R_RSReady;
StartUp;
repeat
FindTrees;
until False;
end.
Just standardized it.
The fail safe worked before i added reflection and it work a bit during reflection its if it gets lost that its supposed to log out
edit:
i really suck at standerds but i look at how the script runs instead of what it looks like.
edit2:
If you really what i can reupload with the standerized one that some one posted
btw not my first script
could some one get a report?
Last edited by austin2162; 05-17-2010 at 03:30 AM.
~Austin~
Standards are mostly just for readability and debugging. It's just something to have if you want it to look professional and be easy to fix.
![]()
So I've noticed. I suck at them. But I'm just happy if they work the way I want![]()
~Austin~
This thread belongs in one of the scripts section. This isn't reflection development.
On the other hand, good job with making this script.![]()
Thanks Rasta.
~Austin~
The flow of the script seemed quite odd. Actually, it was confusing and could have been done better. I'm not trying to sound rude, but I think that you could learn a lot by making this into different functions/procedures for more failsafes (if(CanBank)then DoBank; etc.). The reason for that is so it doesn't try to skip steps even if it didn't do the previous. And it wasn't very structured.
Nothing too important, but I think you could learn a lot from expanding and perfecting this.![]()
Good news on yew chopper simba+reflection its gone for 3 hrs and collected 217 yew logs, it currently runs in edgeville and has dual tree support
~Austin~
I can standardize it for you.
I ll send it to you when I finish
~Austin~
So i think i fail at setting up reflection or maybe simba, when i run this i get this.
i think every things upto dateCode:[Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Characters.simba(131:3): Variable 'TESTSTRING' never used at line 130 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Characters.simba(167:3): Variable 'TESTSTRING' never used at line 166 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Characters.simba(211:3): Variable 'I' never used at line 210 [Error] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Objects.simba(90:21): Unknown identifier 'SmartGetFieldShort' at line 89 Compiling failed.
Thanks
~Rya
I see Now, says the blind man
I believe you need the newer SMART that's in Opendev "libsmart.dll" and place it into Simbas plugins folder.
Also the hooks need to be updated so it won't work until then anyways.
(Scripts outdated until I update for new SRL changes)
AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
Summer = me busy, won't be around much.
Now i get
Any idea's ?Code:[Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Characters.simba(131:3): Variable 'TESTSTRING' never used at line 130 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Characters.simba(167:3): Variable 'TESTSTRING' never used at line 166 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Characters.simba(211:3): Variable 'I' never used at line 210 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Objects.simba(69:4): Variable 'THETYPE' never used at line 68 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Objects.simba(133:3): Variable 'IDX' never used at line 132 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Objects.simba(133:3): Variable 'I' never used at line 132 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Objects.simba(196:4): Variable 'NL' never used at line 195 [Hint] C:\Users\Ryan\Desktop\Auto\Simba\Includes\srl\srl\Reflection\Objects.simba(244:4): Variable 'NL' never used at line 243 [Error] (60:21): Closing parenthesis expected at line 59 Compiling failed.![]()
I see Now, says the blind man
your probably missing a ")" on line 59![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)