SCAR Code:
{
__ __ ___ _ _ _
| \/ |___ __ _ _ _ __ _ __ _ ___ / __| |_ _ _ __| (_)___ ___
| |\/| / -_) _` | ' \/ _` / _` / -_) \__ \ _| || / _` | / _ (_-<
|_| |_\___\__,_|_||_\__,_\__, \___| |___/\__|\_,_\__,_|_\___/__/
|___/
Chain Saw (PowerCutter)
}
{Instructions:
1. Setup players and Tree colors
2. Have characters by the trees you want to cut, the more the better
3. Press play
4. Watch
5. Post on my thread
}
program MeanageStudiosChainsaw;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/WoodCutting.scar}
const
treecolor1 = 2252880; // tree color
TreeColor2 = 3305578; // another tree color
Treetype = 'Norm'; //Norm is for normal, Oak is for oak
LoadsToCut = 3;//Loads to cut per player at a time
Rundir = 'S';//Run direction for fight
Axes = '1';//number of axes in inventory(doesnt count for weilded ones)
Axes3 = 1;//number of axes in inventory(doesnt count for weilded ones)
WantedLogins = 6;//Number of times you want to change players
var
LoadsCut:integer;
Logins:integer;
LogsCut:integer;
LogLoadsCut:integer;
procedure DeclarePlayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='user';
Players[0].Pass :='pass';
Players[0].Nick :='nick';
Players[0].Active:=True;
end;
Procedure ChopTreeNorm;
var Tolerance,P,Found,C :integer;
begin
Tolerance:=10;
begin
repeat
p:=P+1;
Found:=2;
if (FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,Tolerance))or
(FindColorTolerance(x,y,TreeColor2,MSX1,MSY1,MSX2,MSY2,Tolerance))then
MMouse(x,y,3,3)
wait(10+random(10));
if (IsUpText('ree')) then
Found:= 1;
if found = 1 then
begin
if (FindObjMultiText(x,y, 'ree', 'ree', 'ree', Treecolor1, Tolerance)) or
(FindObjMultiText(x,y, 'ree', 'ree', 'ree', Treecolor2, Tolerance)) then
Mouse(x,y,3,3,true);
C:=1;
end;
if Found = 2 then
begin
tolerance:= tolerance+1;
end;
if (tolerance=15) then
begin
Tolerance:=(Tolerance-5)
Wait(7000+random(500))
end;
until ((C=1) or (P=20))
end;
end;
Procedure ChopTreeOak;
var Tolerance,P,Found,C :integer;
begin
Tolerance:=10;
begin
repeat
p:=P+1;
Found:=2;
if (FindColorTolerance(x,y,TreeColor1,MSX1,MSY1,MSX2,MSY2,Tolerance))or
(FindColorTolerance(x,y,TreeColor2,MSX1,MSY1,MSX2,MSY2,Tolerance))then
MMouse(x,y,3,3)
wait(10+random(10));
if (IsUpText('Oak')) then
Found:= 1;
if found = 1 then
begin
if (FindObjMultiText(x,y, 'Oak', 'Oak', 'Oak', Treecolor1, Tolerance)) or
(FindObjMultiText(x,y, 'Oak', 'Oak', 'Oak', Treecolor2, Tolerance)) then
Mouse(x,y,3,3,true);
C:=1;
end;
if Found = 2 then
begin
tolerance:= tolerance+1;
end;
if (tolerance=15) then
begin
Tolerance:=(Tolerance-5)
Wait(7000+random(500))
end;
until ((C=1) or (P=20))
end;
end;
procedure ChopTree3;
begin
if TreeType = 'Oak'
then
begin
ChopTreeOak;
wait (7000+random(1000))
ChopTreeOak;
wait (7000+random(1000))
ChopTreeOak;
end;
if TreeType = 'Norm'
then begin ChopTreeNorm;
ChopTreeNorm;
wait (3000+random(1000))
ChopTreeNorm;
wait (3000+random(1000))
ChopTreeNorm;
end;
end;
procedure SetUp;
begin;
cleardebug;
writeln(' __ __ ')
writeln('| \/ |___ __ _ _ _ __ _ __ _ ___ ')
writeln('| |\/| / -_) _` | ` \/ _` / _` / -_) ')
writeln('|_| |_\___\__,_|_||_\__,_\__, \___| ')
writeln(' |___/')
writeln('Chain Saw')
wait(1500)
cleardebug;
writeln(' ___ _ _ _')
writeln('/ __| |_ _ _ __| (_)___ ___')
writeln('\__ \ _| || / _` | / _ (_-<')
writeln('|___/\__|\_,_\__,_|_\___/__/')
writeln(' ')
writeln('Chain Saw')
wait(1500)
cleardebug;
if(not(loggedin)) then begin
LoginPlayer;
wait(200+random(200))
end;
end;
Procedure FindDeadAxe;
begin
begin
MMouse(586,220,3,3)
Wait(200+random(100))
if (IsUpText('Use')) then
begin
MMouse(628,220,3,3)
Wait(200+random(100))
if (IsUpText('Use')) then
begin
MMouse(664,323,3,3)
Wait(200+random(100))
if (IsUpText('Use')) then
begin
MMouse(771,228,3,3)
Wait(200+random(100))
if (IsUpText('Use')) then
begin
NextPlayer(False)
end;
end;
end;
end;
end;
end;
procedure DropAllLogs2;
begin
If Axes='1' then begin
DropTo(2,28)
end;
if Axes='2' then begin
DropTo(3,28)
end;
if Axes='3' then begin
DropTo(4,28)
end
if Axes='4' then begin
DropTo(5,28)
end
LoadsCut:=LoadsCut+1;
end;
procedure DropAllLogs3;
Var LogsDTM:integer;
IX,IY:integer;
begin
LogsDTM := DTMFromString('78DA63F462626060676440063571160CFF813' +
'448F43F1030DA03D5FC4351C290EE2105A6613A196D806AB850CD' +
'C9F74553130854F317D59CD228334C35DCA8E634255BA3A80100E' +
'EB30D67');
if (not FindDTM(LogsDTM,IX,IY,MIX1,MIY1,MIX2,MIY2)) then begin
DropAllLogs2;
end;
if FindDTM(LogsDTM,IX,IY,MIX1,MIY1,MIX2,MIY2) then begin
repeat
FindDTM(LogsDTM,IX,IY,MIX1,MIY1,MIX2,MIY2)
Mouse(IX,IY,3,3,false);
PopUp('Drop');
LogsCut:=LogsCut+1;
until(not(findDTM(LogsDTM,IX,IY,MIX1,MIY1,MIX2,MIY2)))
end;
end;
procedure ProgressReport;
begin
ClearDebug;
Writeln('Loads Cut And Dropped = '+intToStr(LoadsCut))
end;
Procedure SetChats;
Begin
SetChat('Hide', 1);
SetChat('Hide', 1);
SetChat('Friends', 2);
SetChat('Friends', 2);
SetChat('Off', 3);
SetChat('Off', 3);
End;
procedure AntiRandoms222;
begin
FindNormalRandoms;
FindHead;
FindBirdsNest;
FindTalk;
FindDeadAxe;
if (FindFight) then
begin
RunAwayDirection(RunDir);
Wait(9000 + random(3000));
RunBack;
end;
if(not(loggedin)) then begin
LoginPlayer;
wait(200+random(200))
end;
end;
Procedure ProggyMaths;
var
LogsCutAxes:integer;
Axes2:integer;
begin
Axes2:=Axes3;
LogsCutAxes:=28-Axes2;
LogLoadsCut:=LogsCut/LogsCutAxes;
LoadsCut:=LoadsCut+LogLoadsCut;
end;
Procedure ProgressReport2;
begin
ProggyMaths;
ProgressReport;
SRLRandomsReport;
end;
procedure MainLoop;
begin
repeat
ProgressReport2;
ChopTree3;
AntiRandoms222;
if (invfull)
then begin
DropAllLogs3;
end;
MouseSpeed := MouseSpeed +random(3)
PickUpMouseEvery(50+random(10));
LeaveScreenEvery(10 + random(5));
HoverSkill('woodcutting', false);
ProgressReport2;
ChopTree3;
AntiRandoms222;
MouseSpeed := MouseSpeed -random(3)
if (invfull)
then begin
DropAllLogs3;
end;
if ((LoadsToCut) >= (LoadsCut)) then
begin
NextPlayer(false)
Logins:= Logins+1
end;
until(Logins >= WantedLogins)
end;
begin
SetUpSRL;
NewLine:= Newline;
DeclarePlayers;
DisguiseScar('Meanage Studios Chain Saw');
SetUp;
Setchats;
MainLoop;
end.