Log in

View Full Version : Please help me on script



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 :)

Drax
02-02-2012, 01:05 AM
Here you go i got it to compile.


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,t: Integer;
Begin
MarkTime(t);
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(t) > 30000) Then
FailSafe('Could Not Find Tree');
begin
Repeat
FindNormalRandoms;
AntiBan;
Wait(1000);
If InvCount=Plusone Then
Writeln('We Gota Yew');
Until (InvCount=Plusone) Or (TimeFromMark(TreeCounter)>8000);
end;
end;
end;


Begin
SetupSRL;
DeclarePlayers;
Repeat
YewCutting;
Until(False);
End.

Addyo
02-02-2012, 01:10 AM
Fail of a question but how do i get that back into simba with out it going just ina straight line accross and not down?


btw THANKS!. took me friggin hours messing around with it and couldnt get to compile..
If you havnt noticed i suck at scripting and im new to all this

Inception
02-02-2012, 01:17 AM
Fail of a question but how do i get that back into simba with out it going just ina straight line accross and not down?


Copy & Paste?

Addyo
02-02-2012, 01:19 AM
i did that and it just goes like straight across -----------------------------------------
insted of going down the lines it stays on the line i paste it one. :(

Hero
02-02-2012, 01:53 AM
Lol this?

Drax
02-02-2012, 02:09 AM
Btw you left your bank pin in the the script :D

Addyo
02-02-2012, 02:49 AM
Lol this?

yea im new and dont know what im doing.. but thanks :)
and :0 i almost thought i left user name and pass too...near heart attack lmfao

Drax
02-03-2012, 08:05 AM
yea im new and dont know what im doing.. but thanks :)
and :0 i almost thought i left user name and pass too...near heart attack lmfao

Haha Yeah I could of got free cash ;)

kevin33
02-03-2012, 08:07 AM
To copy and paste down instead of one line, copy and paste onto wordpad then copy and paste again into simba client.