akadhox
2013-04-07 11:31:25
Hey orginally i wrote this script to run in browser but i decided i wanted to minimize it so i added {$DEFINE SMART8} and then script loads up fine, it even chops willows fine, but with the sps walkpath it doesn't do what it's supposed to do(doesn't walk in the right place), heres the script
~~~~~~~~~~~CHOPS WILLOWS AND BANKS AT CATHERBY~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~CHOPS WILLOWS AND BANKS AT CATHERBY~~~~~~~~~~~~~~~~~~~~~~~~~
program new;
{$DEFINE SMART8}
{$i srl-osr/srl.simba}
{$I SPS/sps-osr.simba}
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :=''; // Enter your Username
Players[0].Pass :=''; // Enter your Password
Players[0].Nick :='aid'; // Enter 2nd 3 letters of your NickName
players[0].Active:=True;
end;
//Don't forget to credit Solidone40
Procedure Antiban;
Begin
Case Random(100) Of
1: HoverSkill('Woodcutting', False); //replace 'magic' with 'skill'
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('smithing', False); // replace 'smithing' with 'skill', or delete.
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
end;
Procedure MiniBreaker;
Begin
Case Random (160) Of
1: Wait(40000 + random(7400));
2: Wait(25500 + random(8550));
3: Wait(60040 + random(6759));
4: Wait(20400 + random(2549));
end;
end;
Procedure ChopTree; // Chops willows south west of Catherby
var x, y: integer;
begin
repeat
FindNormalRandoms;
if FindObjCustom(x, y, ['hop', 'Chop', 'down', 'hop down illow', 'Chop Down Willow'], [1847350, 3297881, 3825769, 4221299, 4352885, 2308413], 5) then
MMouse(x, y, 4, 4);
ClickMouse2(True);
AntiBan;
LevelUp;
FindNormalRandoms;
repeat
Wait(1500 + Random(250))
FindNormalRandoms;
LevelUp;
AntiBan;
until not IsUpText ('hop') or InvFull;
until InvFull;
end;
Procedure EmptyInventory; // OLD METHOD OF BANKING DO NOT USE
begin
if InvFull then
if OpenBank('db', false, true) then
DepositAll;
FindNormalRandoms;
AntiBan;
end;
Procedure WalkToBank; //RADIALWALK, ONLY USE IF SPS DOESN'T WORK
var x, y, xs, xe, ye: integer;
begin
GameTab(tab_Stats);
MakeCompass('N');
RadialWalkTolerance(7236982, 44, 77, 53, 1, 1, 5);
RadialWalkTolerance(7236982, 86, 120, 62, 1, 1, 5);
RadialWalk(13356748, 51, 62, 52, 1, 1);
OpenBankNPCEx('Gray');
DepositAll;
end;
Procedure SPSWalktoBank;
var
ToCatherbyBank: tpointarray;
ToWillows: tpointarray;
MyLoc: TPoint;
begin
MakeCompass('S');
SPS_AnyAngle := True
SPS_Debug := True;
ToCatherbyBank := [Point(157, 144), Point(201, 139), Point(217, 104)]
ToWillows := [Point(216, 109), Point(201, 139), Point(157, 144), Point(123, 164)]
SPS_Setup(runescape_other, ['Catherby']);
MyLoc:=sps_getMyPos;
writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
SPS_WalkPath(ToCatherbyBank);
MakeCompass(Random(10));
OpenBankNPCEx('Gray');
Deposit(2, 28, True);
CloseBank();
MiniBreaker;
MakeCompass('S');
SPS_WalkPath(ToWillows);
MyLoc:=sps_getMyPos;
if(not (MyLoc = Point(123, 164))) then
SPS_WalkPath([Point(123, 164)]);
end;
begin
ClearDebug;
SetUpSRL;
DeclarePlayers;
SetScreenName(Players[0].Nick)
LoginPlayer;
repeat
ChopTree;
SPSWalkToBank;
MiniBreaker;
until(false);
end.