xtubbiex
2012-06-10 15:35:03
I am tryng to mke a seers village magic tree cuttah but if won't walk to trees please help me
program MagicCuttah;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
const
RandomBreaks = False; // Make False True if you don't want random minibreaks 40sec
LongBreak = False; //Make True if you want 10-15 mins breaks.
AxeWield = True; //Make True if you're equiping you're hatchet
var
Woodcuttinglevel, Antibans, LogsChopped:Integer;
Procedure WalkToTrees;
Var
myPath : array of TPoint;
Begin
SPS_Setup(RUNESCAPE_SURFACE, ['6_6', '6_7']);
myPath := [Point(339, 276), Point(336, 304), Point(337, 332), Point(327, 364), Point(334, 396), Point(323, 417), Point(326, 435), Point(327, 462), Point(322, 494), Point(342, 67), Point(331, 126), Point(328, 159), Point(320, 191), Point(316, 214), Point(310, 234), Point(298, 251), Point(279, 273), Point(252, 283), Point(242, 257)];
SPS_WalkPath(MyPath);
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Pin := ''; // Bank Pin. Leave it if you don't have one.
Players[0].Active := True;
end;
procedure CheckLevels;
begin
GameTab(Tab_Stats);
GetAllLevels;
WoodcuttingLevel := Players[CurrentPlayer].Level[SKILL_WOODCUTTING];
GameTab(Tab_Inv);
end;
procedure Antiban;
begin
Case Random(200) of
0..1: begin HoverSkill('cooking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); WriteLn('Performing Antiban'); Inc(Antibans); end;
2..3: begin HoverSkill('firemaking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); WriteLn('Performing Antiban'); Inc(Antibans); end;
4: begin HoverSkill('random', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); WriteLn('Performing Antiban'); Inc(Antibans); end;
5..7: begin RandomRClick; WriteLn('Performing Antiban'); Inc(Antibans); end;
8..10: begin PickUpMouse; WriteLn('Performing Antiban'); Inc(Antibans); end;
11..13: begin RandomMovement; WriteLn('Performing Antiban'); Inc(Antibans); end;
14..16: begin BoredHuman;WriteLn('Performing Antiban'); Inc(Antibans); end;
17: begin ExamineInv; WriteLn('Performing Antiban'); Inc(Antibans); end;
18..24: begin SleepAndMoveMouse(Random(5000)); WriteLn('Performing Antiban'); Inc(Antibans); end;
25: begin FindNormalRandoms; WriteLn('Performing Antiban'); Inc(Antibans); end;
end;
end;
Procedure TakeBreaks;
begin
WriteLn('Doing small break like 40 sec')
Wait(30000 + Random(20000));
end;
Procedure TakeLongBreaks;
begin
WriteLn('Doing Long break like 15 mins')
ExitToLobby;
Wait(900000 + Random(400000));
LogInPlayer;
end;
Procedure Startup;
begin
if(not LoggedIn)then
begin
repeat
FindNormalRandoms;
LoginPlayerToLob;
until LobbyScreen;
OpenWorldScreen;
if not WorldScreen then
OpenWorldScreen;
if WorldScreen then
begin
writeln('picking world 15 cuz there are low amount of players');
SelectWorld(15);
LogInPlayer;
end;
end;
If LoggedIn then
begin
Antiban;
CheckLevels;
FindNormalRandoms;
WriteLn('Starting up');
MakeCompass('N');
GameTab(Tab_Inv);
SetAngle(SRL_ANGLE_HIGH);
end;
end;
procedure Progress;
var
LogPH, XPPH :Integer;
begin
LogPH := Round((LogsChopped * 3600) / (GetTimeRunning / 1000));
XPPH := Round(((LogsChopped * 250) * 3600) / (GetTimeRunning / 1000));
ClearDebug;
Writeln('***********Mage Tree Cutter**********');
Writeln('* ~By XTubbiex~ ');
Writeln('* XP earned: ' + IntToStr(LogsChopped * 250)+ ' (' + IntToStr(XPPH) + ' P/H)');
Writeln('* Logs Chopped: ' + IntToStr(LogsChopped));
writeln('* Woodcutting Level: '+ IntToStr(WoodcuttingLevel));
Writeln('* AntiBan Preformed: ' + IntToStr(Antibans));
Writeln('* Total Time: ' + TimeRunning);
Writeln('*************************************');
end;
Procedure Bank;
var
AxeWielded:Boolean;
begin
repeat
if OpenBankNpc then
begin
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
Wait(randomrange(500,700));
end;
Until BankScreen;
If Bankscreen then
begin
MouseItem(1,mouse_Right);
WaitOption('27', 500);
CloseBank;
end;
End;
Procedure Mainloop;
var
x, y:Integer;
MyPath, MyPath2:TpointArray;
Begin
x := MSCX;
y := MSCY;
If LoggedIn then
if (InvCount > 1) then
begin
Bank;
SPS_Setup(RUNESCAPE_SURFACE, ['6_6', '6_7']);
myPath2 := [Point(339, 276), Point(336, 304), Point(337, 332), Point(327, 364), Point(334, 396), Point(323, 417), Point(326, 435), Point(327, 462), Point(322, 494), Point(342, 67), Point(331, 126), Point(328, 159), Point(320, 191), Point(316, 214), Point(310, 234), Point(298, 251), Point(279, 273), Point(252, 283), Point(242, 257)];
SPS_WalkPath(MyPath2);
WriteLn('Walking to tha treez');
end;
If (InvCount = 1) then
begin
SPS_Setup(RUNESCAPE_SURFACE, ['6_6', '6_7']);
myPath := [Point(339, 276), Point(336, 304), Point(337, 332), Point(327, 364), Point(334, 396), Point(323, 417), Point(326, 435), Point(327, 462), Point(322, 494), Point(342, 67), Point(331, 126), Point(328, 159), Point(320, 191), Point(316, 214), Point(310, 234), Point(298, 251), Point(279, 273), Point(252, 283), Point(242, 257)];
SPS_WalkPath(MyPath);
WriteLn('Walking to tha treez');
end;
end;
begin
ClearDebug;
DeclarePlayers;
Smart_Server := 16;
Smart_Members := False;
Smart_Signed := False;
Smart_SuperDetail := False;
SetUpSRL;
if (RandomBreaks) then
TakeBreaks;
Startup;
If LoggedIn then
repeat
MainLoop;
Antiban;
FindNormalRandoms;
until(AllPlayersInactive);
end.