Sweet! will use this to estimate profit and profit per hour
Sweet! will use this to estimate profit and profit per hour
im having a bit of trouble with my proggie, i've got it to count exp gained and per hr, i've got it to calculate loads done and per hr. but when trying to get logs and logs per hour it keeps reseting. when i try to use Inc(logs); it only counts 1 log per invo i fill, when i use Logs:= InvCount; it counts till 28 then when i drop the load it resets im guessing i dont have them placed properly.. dont mind my code, its a butcher job atm, just kinda reading tuts and going along with it, once i get a little more knowledge ill fine tune/clean up everything,. any suggestions are greatly appreciated.
Simba Code:program new;
{$DEFINE SMART8}
{$i SRL/SRL.simba}
//{$i SRL/SRL/Misc/Stats.simba}
Const
SRLStats_Username = ''; //Your SRL Stats Username
SRLStats_Password = ''; //Your SRL Stats Password
BreakEvery = 120; //How many minutes to break after
BreakFor = 5; //How long to break for
Version = '1.0';
NumbOfPlayers = 1; //How many players you are using
StartPlayer = 0; //Player to start autoing with! (0 means first char)
Var
XPGained, LoadsDone, TimeRun, Logs, TooLong: Integer;
XPPerHr, LoadsPerHr, LogsPerHr, CurrentXp, OriginalXp: Integer;
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.
Nick := ''; //Player nickname - 3-4 letters of Player username.
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;
// with Players[1] do
// begin
// Name := ''; // Player username.
// Pass := ''; // Player password.
// Nick := ''; // Player nickname - 3-4 letters of Player username.
// 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
If(Not(loggedIn)) Then
Exit;
Case Random(100) of
0: HoverSkill('Woodcutting', False);
1: BoredHuman;
2: ExamineInv;
3: Wait(2500 + Random(3000));
4: HoverSkill('Firemaking', False);
5: Wait(3000);
6: CompassMovement(15, 45, True);
7: Wait(4500 + Random(2000));
8: PickUpMouse;
9: RandomTab(True);
10:HoverOnlineFriend;
end;
End;
procedure Failsafe (reason:string);
begin
Players[CurrentPlayer].Loc:=reason;
logout;
Stats_Commit;
Writeln(reason);
//ProgressReport;
TerminateScript;
end;
Function Chopping: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 500);
Writeln(IntToStr(AveragePixelShift(PBox, 500, 650)));
end;
function TeakTreeColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.31, 0.06);
if not (FindColorsTolerance(arP, 5659235, MSX1, MSY1, MSX2, MSY2, 17)) 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
Result := arC[i];
//Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
//Writeln('AutoColor failed in finding the color.');
end;
procedure ChopTeakTree;
var
x, y: integer;
begin
If (Chopping) then
begin
wait(100);
end else
begin
MarkTime(TooLong);
x:=MSCX;
y:=MSCY;
If FindObjTPA(x, y, TeakTreeColor, 1, 1, 1, 1, 1, ['Cho']) Then
begin
MMouse(x, y, 1, 1);
ClickMouse2(mouse_left);
StatsGuise('Chopping Teak Tree')
WaitFunc(@Chopping, 10, 3000);
Logs:= Invcount; {invCount}
end;
end;
end;
procedure DropTeakLogs;
var
x, y, LogDTM, I:Integer;
SlotBox:TBox;
LogPattern:TIntegerArray;
begin
Inc(logs); {here is logs}
MarkTime(TooLong);
LogDTM := DTMFromString('mbQAAAHicY2VgYHjPxMDwHIjvAfENIP4KxBGMDAypQBwDxLlAnAXEDAxMDL3lAWAahn8BSXTMiAWDAQBYAAzJ');
LogPattern:=[1, 5, 9, 13, 17, 21, 25, 2, 6, 10, 14, 18, 22, 26, 3, 7, 11, 15, 19, 23, 27, 4, 8, 12, 16, 20, 24, 28];
For I:=0 to 26 do
begin
StatsGuise('Dropping Teak Log:' + IntToStr(I));
SlotBox:=InvBox(LogPattern[I]);
If FindDTM(LogDTM, x, y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
begin
MouseItem(LogPattern[I], mouse_right);
ChooseOption('Dro');
end;
end;
Inc(LoadsDone); {here is loadsdone}
MarkTime(TooLong);
end;
Procedure HardwoodGroveProggie;
begin
If(Not(LoggedIn)) then
Exit;
ClearDebug;
TimeRun := (GetTimeRunning/1000);
CurrentXP := GetXPBar(1);
XPGained := (CurrentXP - OriginalXP);
XPPerHr := (3600*(XPGained))/((TimeRun));
LoadsPerHr := (3600*(LoadsDone))/((TimeRun));
LogsPerHr := (3600*(Logs))/((TimeRun));
Begin
Writeln('We Have Done: ' + IntToStr(LoadsDone) + ' Loads / Thats ' + IntToStr (LoadsPerHr) + ' Loads Per Hr ');
Writeln('We Have Gained: ' + IntToStr(XPGained) + ' XP / Thats ' + IntToStr (XPPerHr) + ' XP Per Hour ');
Writeln('We Have Cut: ' + IntToStr(Logs) + ' Logs / Thats ' + IntToStr (LogsPerHr) + ' Logs Per Hour ');
end;
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
SetAngle(SRL_ANGLE_LOW);
MakeCompass( 'W');
OriginalXP := GetXPBar(1);
Repeat
ChopTeakTree;
If InvFull Then
DropTeakLogs;
HardwoodGroveProggie; {proggie}
Until(false);
end.
Last edited by pulse0; 02-18-2013 at 07:18 PM.
One place that won't ever allow logs to exceed 28, is, Logs:= Invcount; {invCount}. This would be able to grow/increase by changing it to Logs := Logs + InvCount; Didn't look at any of the other code, but hopefully this may help.
There are currently 1 users browsing this thread. (0 members and 1 guests)