Log in

View Full Version : Breaking help



Footy
09-14-2012, 12:12 AM
I've never used a full on breaking system, only a small minibreaker. When I tried to implement the one listed below, It keeps breaking after one and a half minutes. I cant see what I'm doing wrong, could somone point it out?

Constant declarations:
|-----------------------------------------------------------------------|
|---------------------------Breaks Enabled?-----------------------------|
|-----------------------} Breaksenabled = true; {-----------------------|
|-----------------------------------------------------------------------|
|-------------------Break min and max time?(minutes)--------------------|
|--------------------------} Minbreak = 10; {---------------------------|
|--------------------------} Maxbreak = 30; {---------------------------|
|-----------------------------------------------------------------------|
|-----------------------Time Until Next break?(minutes)-----------------|
|------------------------} MinBreaktill = 100; {------------------------|
|------------------------} MaxBreaktill = 250; {------------------------|
|-----------------------------------------------------------------------|

Main loop
begin
Setupstuff;
ActivateClient;
LoadTFletchingRecord
FirstFletch := True;
ChangeCamera;
marktime(BreakCounter);
Bank;
Fletch;
Proggy;
FirstFletch := False;
Timetillbreak := randomrange(MinBreaktill * 60000, Maxbreaktill * 60000);
repeat
bank;
fletch;
FirstFletch := False;
if Breaksenabled then
begin
If timefrommark(BreakCounter / 60000) > TimetillBreak then
begin
Breaktime := randomrange(minbreak, maxbreak);
writeln('Taking break for ' + IntToStr(Breaktime) + ' Minutes!');
Logout;
wait(Breaktime * 60000);
inc(fullbreaks);
writeln('Were back! Lets log in again!');
Marktime(BreakCounter);
Timetillbreak := randomrange(MinBreaktill, Maxbreaktill);
FirstFletch := True;
Loginplayer;
wait(randomrange(500, 1000));
findnormalrandoms;
wait(randomrange(500, 1000));
ChangeCamera;
end;
end;
until(Fletched >= Bows);
ReleaseDTMs
Writeln('THANKS FOR USING FOOTYS M.H.T.U FLETCHER!');
end.

Nebula
09-14-2012, 12:16 AM
I think this is your problem


If timefrommark(BreakCounter / 60000) > TimetillBreak then
Should be

If timefrommark(BreakCounter) / 60000 > TimetillBreak then

Footy
09-14-2012, 12:18 AM
I'll try that, thanks!

Nebula
09-14-2012, 12:27 AM
Also, you convert BreakCounter to minutes which you shouldn't because you compare it to TimeTillBreak, which you already converted to milliseconds. So you should change one of those.

Footy
09-15-2012, 02:23 PM
:duh: Thanks, works perfectly now!

print
09-15-2012, 02:54 PM
i like m.h.t.y =)

Footy
09-15-2012, 03:23 PM
As do I, :D I'm just ironing out some bugs and stuff, and hopefully the first script will be released tomorrow.