Blazeron
2012-03-03 22:25:55
Hi, I've been working on this Script that makes oak planks i need some suggestions like how to create a fail safe for walking as it occasionally misses its last point.
Another issue im having is the pausing in between banking attempts I would love some help on this
To get it to run have the coins in ur money pouch (or any spot in the inventory other then the first spot)
Have the oak logs sitting in the top Right corner in your bank and begin in the bank
Sorry for the poor readability
Another issue im having is the pausing in between banking attempts I would love some help on this
To get it to run have the coins in ur money pouch (or any spot in the inventory other then the first spot)
Have the oak logs sitting in the top Right corner in your bank and begin in the bank
Program Blazes_Oak_planks;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
Var
myPath:TPointArray;
myPathOne:TPointArray;
myPathTwo:TPointArray;
myPathBackup:TPointArray;
myPathBack:TPointArray;
X,Y:Integer;
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;
FindNormalRandoms;
case Random(8) of
0:
begin
HoverSkill('Woodcutting', false);
wait(2453+Random(432));
end;
1: PickUpMouse;
2:
begin
MakeCompass('N');
wait(100+random(133));
MakeCompass('S');
wait(50+random(133));
MakeCompass('N');
FindNormalRandoms
end;
end;
end;
procedure Walking;
begin
SetAngle(0);
SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);//SPS Areas
SetRun(True);
myPath := [Point(4851, 2969), Point(4850, 2943), Point(4876, 2936), Point(4915, 2938), Point(4966, 2934), Point(4979, 2884), Point(4984, 2829), Point(5014, 2782), Point(5034, 2737), Point(5047, 2706), Point(5045, 2685)];
myPathBackup := [Point(4851, 2973), Point(4850, 2941), Point(4887, 2937), Point(4915, 2937), Point(4941, 2936), Point(4967, 2928), Point(4979, 2904), Point(4978, 2875), Point(4987, 2849), Point(4994, 2823), Point(5009, 2806), Point(5014, 2793), Point(5021, 2761), Point(5035, 2740), Point(5047, 2721), Point(5051, 2695), Point(5047, 2686)]
//myPathBack := [Point(5052, 2689), Point(5039, 2734), Point(5019, 2780), Point(4991, 2816), Point(4977, 2862), Point(4974, 2916), Point(4942, 2935), Point(4881, 2939), Point(4847, 2971)];
SPS_WalkPath(myPath);
SPS_WalkPAth(myPathBackup);
//SPS_WalkPath(myPathBack);
end;
Procedure Musician;
begin
if FindObj(x, y, 'alk-to',8344390 , 35) then
Mouse(x,y,5,5, False);
ChooseOption('isten-to');
Antiban;
end;
procedure WalkBack;
begin
SPS_Setup(RUNESCAPE_SURFACE,['11_7','11_6','10_6','10_7','12_7','12_6']);//SPS Areas
myPathOne := [Point(5043, 2685), Point(5041, 2703), Point(5031, 2730), Point(5015, 2791), Point(4997, 2826)];
SPS_WalkPath(myPathOne);
myPathBack := [Point(5049, 2693), Point(5043, 2715), Point(5028, 2743), Point(5011, 2790), Point(4993, 2831)];
SPS_WalkPath(myPathBack);
Wait(2000 + Random(100));
Musician;
Wait(10000 + Random(2000));
myPathTwo := [Point(4985, 2851), Point(4982, 2897), Point(4954, 2937), Point(4902, 2936), Point(4858, 2936), Point(4850, 2970)];
SPS_WalkPath(myPathTwo);
end;
Procedure WithdrawLogs;
begin
if not LoggedIn then Exit;
Mouse(448, 106, 5, 5, False);
ChooseOption('ithdraw-All');
end;
Procedure Bank;
begin
repeat
if not LoggedIn then Exit;
wait(454+random(158))
OpenBankFast(Bank_VE);//in the () thats the bank const of Varrock East
Wait(100 + Random(100));
if PinScreen then
InPin(''); // in the () theres the pin.
Until(BankScreen);
end;
Procedure Sawmill;
begin
wait(300 + Random(100));
if FindObj(x, y, 'alk-to',4278091 , 25) then
if not LoggedIn then Exit;
Mouse(x,y,5,5, False);
ChooseOption('uy-plank');
Wait(2000 + Random(250));
Mouse(331,115,5,5, False);
ChooseOption('ll');
end;
Procedure DepositPlanks;
begin
if not LoggedIn then Exit;
Mouse(578,230,5,5, False);
Wait(100 + Random(100));
ChooseOption('eposit-All');
end;
Procedure MainLoop;
begin
repeat
if not LoggedIn then Exit;
wait(250+random(158));
Bank;
DepositPlanks;
wait(125+random(133));
WithdrawLogs;
Antiban;
Walking;
Sawmill;
wait(125+random(133));
WalkBack;
Antiban;
until(false)
end;
begin
MouseSpeed := 10;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
MainLoop;
end.Sorry for the poor readability