hey every one im following yohojos scripting tut's there have been a few problems so far but have mostly figured them out, i just came across a new one though, im trying to make my first powercutter, and im trying to set the angle but the way yohojo says to do it with
this is supposed to make it set the angle as low as possible, although it does not, i tried tinkering with:Simba Code:SetAngle(False)
Simba Code:procedure SetAngle(ANGLE: Integer);
begin
if ((Angle = SRL_ANGLE_NONE) or (not LoggedIn)) then
Exit;
KeyDown((Angle * 2) + 38);
Sleep(1000 + Random(300));
KeyUp((Angle * 2) + 38);
Wait(500 + Random(100));
end;
but im getting errors that state:
[Error] (88:11): Duplicate identifier 'SETANGLE' at line 87
here is the full script of what i have so far.
Simba Code://TVJJ'S First PowerChopper//
program PowerChopper;
//{$include srl/srl/misc/smart.simba}
{$I SRL/SRL.simba}
{$I srl/srl/misc/debug.simba}
{$I sps/sps.simba}
{$Include SRL/SRL/skill/fighting.simba}
Const
SRLStats_Username = ''; //Your SRL stats Username.
SRLStats_Password = ''; //Your SRL stats Password.
BreakEvery = '3'; //How many minutes to break after.
BreakFor = '1'; //How long to break for.
Version = '1.0a'; // No need to touch.
NumbOfPlayers = 1; //How many players are you using
StartPlayer = 0; // Player to start autoing with (0 means first char)
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
With Players[0] do
Begin
Name := ''; //Player Username
Pass := ''; //Player Password
Active := True;
Integers[1] := 4; //copper etc
Integers[2] := 4; //Seconds to try mining another rock
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
end;// declare players
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Function CheckAndClick(UpText, Option:String; x,y:integer; RClick:Boolean) :Boolean;
Begin
MMouse(x, y, 5, 5);
if WaitUpText (UpText, 1500+Random(500)) Then
Begin
Result:=True;
GetMousePos(x, y);
If RClick Then
Begin
Mouse(x, y, 0, 0, False);
Result:= WaitOption (Option, 2000);
If Result Then FFlag (0);
End else
Begin
Mouse(x, y, 0, 0, True);
Wait (100+Random(50));
FFlag(0);
End;
End;
End;
Procedure Antiban;
Begin
Case Random(192) Of
0: HoverSkill('Woodcut', 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;
procedure SetAngle(ANGLE: Integer);
begin
if ((Angle = SRL_ANGLE_NONE) or (not LoggedIn)) then
Exit;
KeyDown((Angle * 2) + 38);
Sleep(1000 + Random(300));
KeyUp((Angle * 2) + 38);
Wait(500 + Random(100));
end;
Function ChopDown: Boolean;
Var
X, Y: Integer;
begin
//Ex. FindObjCustom(x, y, ('att', 'ack'), [123456, 345678], 5);//
If FindObjCustom(X, Y, ['Chop', 'Down', 'p d'], [2108982, 1252123, 1713960, 2307133], 2) Then
StatsGuise('Hooray, we found a tree');
GetMousePos(X, Y);
Case Random(1) of
0: Mouse (X, Y, 5, 5, True);
1: Begin
Mouse(x, y, 5, 5, False);
WaitOption ('chop', 500);
End;
End;
end;
begin
SetupSRL;
DeclarePlayers;
SetAngle;
//Repeat
Chopdown;
//Until(false);
End.
and again any and all help is greatly appricated


Reply With Quote









