Addyo
02-02-2012, 12:43 AM
so i made this woodcut script from yoHojo's scripting tutorial, i cant get it to compile every time i try i keep getting different error codes i have no idea where i went wrong so if any one could help that would be greaaat:D
program EdgevilleYewCutterv1;
{$DEFINE SMART}
{$i SRL\SRL.simba}
Const
SERVER = 104; // Enter "0" to pick a random server.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 180; //How Many Minutes To Break After
BreakFor = 5; //How Long To Break For
Version ='1.0';
NumbOfPlayers = 1; //How many players are you using
StartPlayer = 0; //Player to start auoting with! (0 means first char)
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Pin := '0034'; // Leave blank if the player doesn't have a bank pin
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(260) Of
0: HoverSkill('WoodCutting', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;
Procedure FailSafe(Reason:String);
Begin
//Players(currentPLayer).Loc:=Reason;
LogOut;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
function treeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.07);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3884109, MSX1, MSY1, MSX2, MSY2, 10);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.58) and (X <= 11.00) and (Y >= 2.67) and (Y <= 11.20) and (Z >= 2.20) and (Z <= 9.19) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function YewCutting:Boolean;
Var
seX, seY, PlusOne, TreeCounter: Integer;
Begin
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:= InvCount + 1;
//If FindObjCustom(seX, seY ['Chop', 'Down', 'p d'], [1251865, 1383194, 1780006, 1383707,] 10) Then
seX:=MSCX;
seY:=MSCY;
If FindObjTPA(SeX, SeY, TreeColor, 5, 1, 15, 80, 600, ['Cho']) Then
Begin
StatsGuise('Hooray, We found a yew');
GetMousePos(seX, seY);
Case Random (2) Of
0: Mouse(seX, seY, 5, 5, True);
1: Begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
End;
End;
Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) Then
FailSafe('Could Not Find Tree');
Repeat
If
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) Then
FindNormalRandoms;
AntiBan;
Wait(1000);
If InvCount=Plusone Then
Writeln('We Gota Yew');
Until InvCount=Plusone Or (timeFromMark(treeCounter) > 8000)
End;
End;
Begin
SetupSRL;
DeclarePlayers;
Repeat
YewCutting;
Until(False);
End.
p.s. Soon to be a edgeville yew cutter once i get all walking paths done and rest of tree scritping finshed :)
program EdgevilleYewCutterv1;
{$DEFINE SMART}
{$i SRL\SRL.simba}
Const
SERVER = 104; // Enter "0" to pick a random server.
MEMBERS = False; // Set to True if using a RS-Members account. False if F2P
SRLStats_Password = ''; // Your SRL Stats Password
BreakEvery = 180; //How Many Minutes To Break After
BreakFor = 5; //How Long To Break For
Version ='1.0';
NumbOfPlayers = 1; //How many players are you using
StartPlayer = 0; //Player to start auoting with! (0 means first char)
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Pin := '0034'; // Leave blank if the player doesn't have a bank pin
Active := True;
Integers[1] := 4; //1=BrightCopper,2=DarkCopper,3=Tin,4=Iron.
Integers[2] := 4; //Seconds to try mining rock before clicking another.
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure Antiban;
Begin
Case Random(260) Of
0: HoverSkill('WoodCutting', False);
1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
2: ExamineInv;
3: RandomAngle(1);
4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
5: HoverSkill('random', False);
End;
End;
Procedure FailSafe(Reason:String);
Begin
//Players(currentPLayer).Loc:=Reason;
LogOut;
Stats_Commit;
//ProgressReport;
TerminateScript;
End;
function treeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.07);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 3884109, MSX1, MSY1, MSX2, MSY2, 10);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 2.58) and (X <= 11.00) and (Y >= 2.67) and (Y <= 11.20) and (Z >= 2.20) and (Z <= 9.19) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function YewCutting:Boolean;
Var
seX, seY, PlusOne, TreeCounter: Integer;
Begin
MarkTime(TooLong);
FindNormalRandoms;
PlusOne:= InvCount + 1;
//If FindObjCustom(seX, seY ['Chop', 'Down', 'p d'], [1251865, 1383194, 1780006, 1383707,] 10) Then
seX:=MSCX;
seY:=MSCY;
If FindObjTPA(SeX, SeY, TreeColor, 5, 1, 15, 80, 600, ['Cho']) Then
Begin
StatsGuise('Hooray, We found a yew');
GetMousePos(seX, seY);
Case Random (2) Of
0: Mouse(seX, seY, 5, 5, True);
1: Begin
Mouse(seX, seY, 5, 5, False);
WaitOption('Chop', 500);
End;
End;
Flag;
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) Then
FailSafe('Could Not Find Tree');
Repeat
If
MarkTime(TreeCounter);
If (TimeFromMark(TooLong) > 30000) Then
FindNormalRandoms;
AntiBan;
Wait(1000);
If InvCount=Plusone Then
Writeln('We Gota Yew');
Until InvCount=Plusone Or (timeFromMark(treeCounter) > 8000)
End;
End;
Begin
SetupSRL;
DeclarePlayers;
Repeat
YewCutting;
Until(False);
End.
p.s. Soon to be a edgeville yew cutter once i get all walking paths done and rest of tree scritping finshed :)