SRL Archive - Archive

Footy - SRL Member Application


Footy

2012-09-23 20:28:27

How Long have You Played Runescape?
7 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
PascalScript
Slowly learning Javascript


Are you a member of any other communities?
RSBuddy - Footy4102


Tell us about yourself…
From: Footy
My name is Nathan. I enjoy sports and learning new stuff( :p ). This is my second time applying, hopefully this time I will show I got what it takes to be a member, :D

The script I'm showing today is my NardahCooker. It is one of the newer scripts I've made. This script cooks most fish at the Nardah oven. The Procedure HumanMMouse is Flights, everything else is mine.



Please show us one (or multiple) of your scripts.
program NardahCooker;
{$DEFINE SMART}
{$i srl/srl.simba}

type TCookingRecord = record
FishDTM, CookedFishDTM, XPEarned:integer;
WhatFish:string;
end;

const
Row = 1; //Row of fish in bank
Column = 2; //Column of fish in bank
ToCook = 4800; //How many fish to cook

var
TRecord:TCookingRecord;
Cooked, Breaks, CookscreenDTM:integer;



procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //Username Here!
Players[0].Pass := ''; //Password Here!
Players[0].Pin := ''; //Pin here!
Players[0].Active := True;
Players[0].Integers[0] := 4; //What fish here!


End;

procedure LoadDTM;
begin
CookScreenDTM := DTMFromString('mWAAAAHicY2FgYGhhZGDYB8SfgfgTkD+LEYKnQ/H/GfIMCzwFGB5s8GH4//8/gwhQDTJmRMMgAADfgw1x');
end;

procedure FreeTheDTMs;
begin
FreeDTMs([CookScreenDTM, TRecord.FishDTM, TRecord.CookedFishDTM]);
end;

procedure LoadTCookingRecordandDTMs;
begin
case (Players[CurrentPlayer].Integers[0]) of

1: begin
TRecord.WhatFish := 'Shrimp';
TRecord.XPEarned := 30;
TRecord.FishDTM := DTMFromString('m6wAAAHic42ZgYHBhYmBwAmJ3IA4E4hAgjgZiXyC2A+JQqDiIr8/IwKANxNZArArEZkCsBcQ2QKwDFQPJgdRNSxQBms5EFP7PQDxgJAEjAQA0iwey');
TRecord.CookedFishDTM := DTMFromString('m6wAAAHic42ZgYHBhYmBwAmJ3IA4E4hAgjgZiXyC2A+JQqDiIr8/IwKANxNZArArEZkCsBcQ2QKwDFQPJgdRNSxQBms5EFOZiIB4wkoCRAADVvQa9');
end;

2: begin
TRecord.WhatFish := 'Trout';
TRecord.XPEarned := 70;
TRecord.FishDTM := DTMFromString('mlwAAAHicY2dgYChhYmAoB+IcIK4D4jIouwGIjRgZGMwYIbQeEKsDsTUQqwBxf2cnUDcTVszFgBsw4sFQAADmMgZg');
TRecord.CookedFishDTM := DTMFromString('mwQAAAHic42RgYChlYmDIBeJiIG4C4iogzoTyq4E4D4iNGRkYDIHYEoi1gVgLiK2gbCMgtgbizNgooGlMeDEXA2HASASGAwBaCgdC');
end;

3: begin
TRecord.WhatFish := 'Salmon';
TRecord.XPEarned := 90;
TRecord.FishDTM := DTMFromString('mggAAAHicY2NgYJjPxMAwA4hnA/FKIF4ExJOB2IiRgcEAiK2AWBeINYDYEohnxIcAdTFhYC4G7IARB4YAAIsVBlg=');
TRecord.CookedFishDTM := DTMFromString('mrAAAAHic42BgYFjAxMCwGIhnAvF0KHsVEK8B4slAbMjIwGACxNaMELYWEOsAsRoQmwPxLktJoClMODEXA37ASADDAABDNQfQ');
end;

4: begin
Trecord.WhatFish := 'Tuna';
TRecord.XPEarned := 100;
TRecord.FishDTM := DTMFromString('mbQAAAHicY2VgYMhlYmBIAeJ8IC4C4jggtmFkYLAEYmcgNgFiFyDuaW8DqmZCwSIMmIARCwYDAJc0BQ8=');
TRecord.CookedFishDTM := DTMFromString('mWAAAAHicY2FgYGhhZGDYB8SfgfgTkD+LEYKnQ/H/GfIMCzwFGB5s8GH4//8/gwhQDTJmRMMgAADfgw1x');
end;

5: begin
TRecord.WhatFish := 'Lobster';
TRecord.XPEarned := 120;
TRecord.FishDTM := DTMFromString('mggAAAHicY2NgYDjLBMGXgXgPEB8C4itA7M/IwJAExK5AHAzEsUAcBsRRxtJAXUwYmIsBO2DEgSEAACAeB5Y=');
TRecord.CookedFishDTM := DTMFromString('mlwAAAHicY2dgYKhkYmBoAOJqIM4A4gIgrgPidiAuZWRgKATiViCuAOICIM4D4hwgnusrCtTNhBVzMeAGjHgwFAAAg9oHtw==');
end;

6: begin
TRecord.WhatFish := 'Swordfish';
TRecord.XPEarned := 140;
TRecord.FishDTM := DTMFromString('mggAAAHicY2NgYFjExMAwE4gnAfFKIF4NxLOB2JeRgSESiGOB2BuII6D0rJxFQF1MGJiLATtgxIEhAADzfAeI');
TRecord.CookedFishDTM := DTMFromString('mbQAAAHicY2VgYFjAxMAwE4hnAPFqKPZjZGCIBOIgRgg7HIjrI9uAqplQMBcDJmDEgsEAABCxBk8=');
end;

7: begin
TRecord.WhatFish := 'MonkFish';
TRecord.XPEarned := 160;
TRecord.FishDTM := DTMFromString('mggAAAHicY2NgYChlYmCoAuJmIM4A4hwgbgfiIEYGhmgg9mOEsGOAOBKIUz0sgLqYMDAXA3bAiANDAABScgXn');
TRecord.CookedFishDTM := DTMFromString('mlwAAAHicY2dgYChhYmAoBeIMIK4A4kYgbgHiWiAOYmRgiAXiQCD2hdJeQBwJxEEedkDdTFgxFwNuwIgHQwEADnIGng==');
end;

8: begin
TRecord.WhatFish := 'Shark';
TRecord.XPEarned := 200;
TRecord.FishDTM := DTMFromString('mlwAAAHicY2dgYHBnYmDwBOJwILYDYmcg9gfiECAuY2RgqAPiQiBuBuJsKG4B4sTYGKBuJqyYiwE3YMSDoQAA6MMGoQ==');
TRecord.CookedFishDTM := DTMFromString('mlwAAAHicY2dgYHBnYmDwBOJwILYDYmcg9gfiECAuY2RgqAPiQiBuBuJsKG4B4sTYGKBuJqxYkgE3YMSDoQAA7HQGsA==');
end;

9: begin
TRecord.WhatFish := 'Rocktail';
TRecord.XPEarned := 230;
TRecord.FishDTM := DTMFromString('mbQAAAHicY2VgYPBgYmCIAGI3IHYEYn8gDmNkYAgAYn8gjgFiTyCO6JwPVM2EgrkYMAEjFgwGAHS1BLw=');
TRecord.CookedFishDTM := DTMFromString('mbQAAAHicY2VgYPBgYmCIAGI3IHYEYn8gDmNkYAgAYn8gjgFiTyCO6JwPVM2EgjUYMAEjFgwGAHn7BNo=');
end;

end;


end;

procedure SetupStuff;
begin
SetupSRL;
DeclarePlayers;
Loginplayer;
wait(randomrange(500, 1000));
FindNormalRandoms;
wait(randomrange(500, 1000));
Clicknorth(SRL_ANGLE_HIGH);
end;


function WaitFlag(time:integer):boolean;
var
counter:integer;
begin
marktime(counter);
repeat
wait(randomrange(200, 400));
if FlagPresent then
begin
result := true;
exit;
end;
until(timefrommark(counter)) > time;
writeln('Flag didnt appear!');
Result := False;
end;

procedure MouseOffscreen;
var
w, h:integer;
begin
getclientdimensions(w, h);
case random(10) of
0..5: mmouse(randomrange(0, w), randomrange(-54, -60), 1, 1); //North
6: mmouse(w + randomrange(30, 50), randomrange(0, h), 2, 2); //East
7..8: mmouse(randomrange(0, w), h + randomrange(30, 50), 2, 2);//South
9: mmouse(0 - randomrange(10, 30), randomrange(0, h), 2, 2); //West
end;
end;

procedure Minibreaker;
begin
if not(loggedin) then
exit;
case random(150) of
1: begin
writeln('Taking a quick break! Be right back!');
MouseoffScreen;
wait(randomrange(30000, 100000));
writeln('Were back! Lets start cooking!');
inc(breaks);
end;
end;
end;

procedure Antiban;
begin
if not(loggedin) then
exit;
FindNormalRandoms;
case random(4000) of
1: begin writeln('Antiban: Short AFK'); MouseOffScreen; wait(randomrange(10000, 30000)); end;
2..5: begin writeln('Antiban: Checking skills'); Gametab(tab_stats) wait(randomrange(10000, 20000)); gametab(tab_Inv); wait(randomrange(100, 200)); end;
6..8: begin writeln('Antiban: Checking Fletching XP'); Gametab(tab_stats) wait(randomrange(200, 600)); HoverSkill('Fletching', false); wait(randomrange(2000, 10000)); Gametab(tab_Inv); wait(randomrange(200, 450)); end;
9..12: begin writeln('Antiban: Sleepandmovemouse'); sleepandmovemouse(randomrange(1000, 10000)); end;
14..15: begin writeln('Antiban: Checking whos online'); Gametab(tab_Friends); wait(randomrange(2000, 3000)); Gametab(tab_Inv); wait(randomrange(100, 200)); end;
16..17: begin writeln('Antban: Checking moneys'); if ismoneypouchopen then Exit else togglemoneypouch(true); wait(randomrange(1000, 5000)); togglemoneypouch(false); wait(randomrange(100, 600)); end;
18..19: begin writeln('Antiban: Checking XP Counter'); togglexpbar(true); wait(randomrange(600, 5000)); togglexpbar(false); wait(randomrange(700, 1500)); end;
end;
end;

procedure Proggy;
begin
if not(loggedin) then
exit;
FindNormalRandoms;
Cleardebug;
writeln('***************************************************');
Writeln(' Footys AIO Cooker');
Writeln('***************************************************');
Writeln('Time running = ' + (TimeRunning));
Writeln('We are Cooking ' + (TRecord.WhatFish) + '!');
Writeln('We have Cooked ' + IntToStr(Cooked) + ' Fish so far!!');
Writeln('We have Earned ' + IntToStr(TRecord.XPEarned * Cooked) + ' XP so far!');
Writeln('We are Cooking ' + IntToStr(round(3600000 * 1.0 / GetTimeRunning * Cooked)) + ' Fish per hour!');
Writeln('We are Earning ' + IntToStr(round(3600000 * 1.0 / GetTimeRunning * TRecord.XPEarned * Cooked)) + ' XP Per hour!');
Writeln('We have Taken ' + IntToStr(Breaks) + ' MiniBreaks so far!');
Writeln('Thanks for using Footys AIO Cooker!!! Please leave feedback on the script thread!');
Writeln('***************************************************');
end;

procedure HumanMMouse(eX, eY, rX, rY: Integer); //Procedure by Flight
var
randSpeed: extended;
X,Y,A,Dist,MP: integer;
begin
A := MouseSpeed;
GetMousePos(X, Y);
Dist := Distance(X, Y, eX, eY);
MP := Round(Dist/150);
if MP < 0 then
MP := 1;

randSpeed := (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
MMouse(RandomRange(eX-(A*MP), eX+(A*MP)), RandomRange(eY-(A*MP), eY+(A*MP)), 0, 0);
GetMousePos(X, Y);
MMouse(eX, eY, rX, rY);
MouseSpeed := A;
end;
function BankProcedure:boolean;
var
x, y:integer;
begin
if not loggedin then
exit;
if not bankscreen or pinscreen then
begin
writeln('We arent at the bank! Logging out!');
Logout;
FreeTheDTMs;
Terminatescript;
end;
if pinscreen then
inpin(Players[CurrentPlayer].Pin);
wait(randomrange(500, 1000));
DepositAll;
Withdraw(column - 1, row - 1, 28);
WaitFindDTM(x, y, TRecord.FishDTM, 1000);
repeat
closebank;
wait(randomrange(500, 1250));
until(not bankscreen);
if findDTM(TRecord.FishDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
Result := True else
Result := False;
end;

procedure BanktoOven;
var
BankTPA:TPointArray;
box:Tbox;
tmpCTS, counter, counter2, x, y, C:Integer;
Mouseoff:boolean;
begin
if not loggedin then
exit;

FindNormalRandoms;
colortolerancespeed(2);
SetColorSpeed2Modifiers(0.02, 0.51);
if Findcolorstolerance(BankTPA, 3568017, 399, 211, MSX2, MSY2, 16) then
writeln('We found possible colors for the oven') else
begin
writeln('We found no colors for the oven!');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
FreeTheDTMs;
Logout;
Exit;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Box := GetTPABounds(BankTPA);
Invmouse(randomrange(1, 13), mouse_move);
if waituptext('Use', 500) then
writeln('Found the fish in our inv!') else
begin
writeln('We didnt find the fish in our inv! Lets log out!');
Logout;
FreeTheDTMs;
Terminatescript;
end;
clickmouse2(mouse_left);
findnormalrandoms;
wait(randomrange(50, 250));
case random(2) of
0: begin
writeln('Mousebox this time');
MouseTBox(Box, Mouse_move);
end;

1: begin
writeln('HumanMMouse this time');
HumanMmouse(randomrange(box.x1, box.x2), randomrange(box.y1, box.y2), 2, 2);
end;
end;
if waituptextmulti(['lay', 'Clay', 'lay o', 'lay O'], 500) then
wait(randomrange(20, 120)) else
begin
findnormalrandoms;
writeln('We didnt find the oven uptext that time! Lets try again');
MouseTBox(Box, mouse_move);
if waituptextmulti(['lay', 'Clay', 'lay o', 'lay O'], 500) then
writeln('We found the uptext this time! Moving on!') else
begin
writeln('We didnt find the uptext the second time!');
Logout;
Exit;
end;
end;
clickmouse2(mouse_left);
if didredclick then
writeln('Red clicked!') else
begin
writeln('Red never clicked! Lets see if the cooking screen comes up!');
wait(randomrange(1500, 2500));
if DTMExists(CookScreenDTM) then
writeln('We are at the oven!') else
begin
writeln('We arent at the oven! Logging out!');
Logout;
Exit;
end;
end;
findnormalrandoms;
wait(randomrange(300, 700));
marktime(counter);
repeat
wait(randomrange(50, 200));
if timefrommark(counter) > 10000 then
begin
writeln('The CookScreenDTM Never showed!!');
Logout;
FreeTheDTMs;
Exit;
end;
until(findDTM(CookScreenDTM, x, y, MCX1, MCY1, MCX2, MCY2));
findnormalrandoms;
writeln('We found the cookscreen DTM!');
wait(randomrange(100, 400));
case random(2) of
0: Mousebox(246, 411, 277, 447, mouse_left);

1: begin
HumanMMouse(randomrange(246, 277), randomrange(411, 477), 2, 2);
wait(randomrange(15, 80));
clickmouse2(mouse_left);
end;
end;
findnormalrandoms;
if random(2) = 0 then
Mouseoff := True else
Mouseoff := False;
if Mouseoff then
MouseoffScreen;
marktime(counter2);
Minibreaker;
repeat
wait(randomrange(500, 2000));
if mouseoff then
wait(randomrange(50, 100)) else
case random(3) of
1: Sleepandmovemouse(randomrange(500, 2000));
end;
if not MouseOff then
antiban;
findnormalrandoms;
if not findDTM(TRecord.FishDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if timefrommark(counter2) < 10000 then
begin
writeln('False positive!!');
Logout;
FreeTheDTMs;
Exit;
end;
writeln('Weve cooked all the fish! Lets bank!');
C := CountItems('DTM', TRecord.CookedFishDTM, []);
Cooked := Cooked + C;
exit;
end;
until(timefrommark(counter2) > 90000);
writeln('Something went wrong, we must have missclicked! Lets bank and try again!');
end;



procedure OventoBank;
var
BankTPA:TPointArray;
tmpCTS, counter, counter2, L, x, y, i:integer;
BankATPA:T2DPointArray;
TheResult:Boolean;
begin
if not loggedin then
exit;
colortolerancespeed(2);
SetColorSpeed2Modifiers(0.14, 1.08);
findnormalrandoms;
if findcolorstolerance(BankTPA, 6981788, 0, 82, 54, 123, 4) then
writeln('We found possible colors for the bank!') else
begin
writeln('We found no colors for the bank!');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Logout;
FreeTheDTMs;
Terminatescript;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
BankATPA := SplitTPAEx(BankTPA, 6, 4);
SortATPASize(BankATPA, true);
L := High(BankATPA);
marktime(counter);
for i := 0 to L do
begin
MiddleTPAEx(BankATPA[i], x, y);
mmouse(x, y, 5, 5);
if waituptext('Bank Uptext', 500) then
begin
writeln('We found the bank! Lets click on it!');
clickmouse2(mouse_left);;
break;
end;
if timefrommark(counter) > 5000 then
begin
writeln('We didnt find the bank! Logging out!');
Logout;
Terminatescript;
end;
end;
findnormalrandoms;
writeln('We clicked the bank!');
marktime(counter2);
repeat
wait(randomrange(50, 200));
if timefrommark(counter2) > 15000 then
begin
writeln('The bank never opened! Logging out!');
Logout;
FreeTheDTMs;
Terminatescript;
end;
until(Bankscreen or Pinscreen);
if pinscreen then
inpin(Players[CurrentPlayer].Pin);
wait(randomrange(1000, 2000));
writeln('Bank is opened');
BankProcedure;
end;

begin
SetupStuff;
DeclarePlayers;
LoadDTM;
LoadTCookingRecordandDTMs;
Minibreaker;
repeat
BanktoOven;
OventoBank;
Minibreaker;
Proggy;
until(cooked > ToCook);
Writeln('All fish have been cooked!');
FreeTheDTMs;
end.

Nebula

2012-09-23 21:02:09


procedure OventoBank;
var
BankTPA:TPointArray;
tmpCTS, counter, counter2:integer;
box:TBox;
TheResult:Boolean;
begin
if not loggedin then
exit;
colortolerancespeed(2);
SetColorSpeed2Modifiers(0.14, 1.08);
findnormalrandoms;
if findcolorstolerance(BankTPA, 6981788, 0, 82, 54, 123, 4) then
writeln('We found possible colors for the bank!') else
begin
writeln('We found no colors for the bank!');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Logout;
FreeTheDTMs;
Terminatescript;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Box := GetTPABounds(BankTPA);
TheResult := False;
marktime(counter);
repeat
if timefrommark(counter) > 6500 then
begin
writeln('We never found the uptext! Logging out!');
Logout;
FreeTheDTMs;
Exit;
end;
findnormalrandoms;
mmouse(randomrange(Box.X1, Box.X2), randomrange(Box.Y1, Box.Y2), 2, 2);
if waituptext('ank Ban', 500) then
begin
writeln('We found the bank!');
clickmouse2(mouse_left);
TheResult := True;
end else
begin
writeln('Uptext wasnt correct! Lets try again!');
Clicknorth(SRL_ANGLE_HIGH);
end;
findnormalrandoms;
until(TheResult);
writeln('We clicked the bank!');
marktime(counter2);
repeat
wait(randomrange(50, 200));
if timefrommark(counter2) > 15000 then
begin
writeln('The bank never opened! Logging out!');
Logout;
FreeTheDTMs;
Terminatescript;
end;
until(Bankscreen or Pinscreen);
if pinscreen then
inpin(Players[CurrentPlayer].Pin);
wait(randomrange(1000, 2000));
writeln('Bank is opened');
BankProcedure;
end;

You don't assign a CTS to tmpCTS.

You don't make the TPA into an ATPA. (by not filtering out bad points or sorting, you lose accuracy and time)


if pinscreen then
inpin(Players[CurrentPlayer].Pin);
wait(randomrange(1000, 2000));
You forgot a begin and end here

You can have one variable for a counter instead of 2 since they never overlap.

You never use WaitFlag :/



From: Nebula
I'd vote yes if I saw ATPA usage, better/more condensed loops, and just overall quality improvement.


From: Nebula
I'd vote yes if I saw ATPA usage


From: Nebula
better/more condensed loops

maybe kinda not really

From: Nebula
overall quality improvement

a bit


Dunno what to vote.

E:decided to vote yes

Footy

2012-09-23 21:09:03

:duh: Forgot the ATPA's… I guess I'll add some tomorrow. Thanks for the feedback.

NKN

2012-09-23 21:10:34

Voted yes.
You're very helpful, have lots of scripts, and know what you're doing.
You can only get better from becomming SRL, and I truly don't think you're applying to get the scripts, you just want to show your dedication to the community.

Script is decent enough, could use more advanced TPA stuff, but all in all it's good.

For all of you voting no, look at his contributions and activity. It's a community role first, (Even though his script is still good.)

:)

Footy

2012-09-23 21:12:45

Thanks NKN! I appreciate your kind comments! :D

John

2012-09-23 21:17:14

Yes,
-Helpful
-Script wise It's good, a few small mistakes but your willing to learn so no doubt they'll be fixed in no time :)
-Activity wise Awesome!

Footy

2012-09-23 21:24:23

Thanks guys! I'll try to expand the script tomorrow for those who are unsure.

Le Jingle

2012-09-23 22:32:04

Hi Footy, good to see you've kept on truckin' and applied again!
I think you have high potential.

Straight to the point, I'll dive into my Pro's/Con's list:

Pro's
  • cooking record
  • low amount of global vars
  • format/standards, for the most part (some places it's iffy, but still readable)

Con's
  • Lack of TPA's utilization (I know it's already been brought up, but TPA's do play a good role in Applications as far as I know/think) Examples of uses where they could be very handy = BankTPA. Possibly very useful for finding where to click to cook.
  • Procedures - I'd personally break up a couple of your procedures and make them into one or more functions. This could help speed up the script, provide more accuracy, and help failsafe/clarity-wise. (procedures I look at in specific = BankProcedure, BanktoOven, OventoBank)
  • Unused func, as Nebula mentioned
  • Condensed code bits, mini breaker could be added into the antiban (variants)/where you choose to use it.

Simplicity was "on the fence" for me. This is because I think you managed to keep everything neat and simple whilst providing it makes sense - yet, I didn't like the lack of information on parts that could be expanded.

Overall, you are very active - something I hope you maintain.
You also contribute to new persons around the forums, helping the community grow - again I like to see this up kept in the long run.

For the moment, I'm holding my vote to see what changes, as you posted/intend, to make within the script.

Cheers,
Lj

Flight

2012-09-23 23:04:36

You're helpful, very active, willing to learn, and I like the attitude. The script I do like, lots of randomness and human-like behavior; obviously a big plus for me.


[XoL]

2012-09-23 23:22:47

Voted Yes, mainly on character plus dedication to these forums.
Also I think your scripts are fine

JPHamlett

2012-09-24 01:31:41

I love you footy

P1ng

2012-09-24 01:49:42

I like your script, I pointed out a few points in response to the PM you sent me (mainly the ones LJ pointed out). But all in all, I believe you have yourself a perfectly good script there.

You're insanely active, you're a nice guy, you contribute around the forums and keep very active. I can see that you are willing to learn and by becoming an SRL member you can only go to bigger and better things from here.

vote: Yes

J J

2012-09-24 04:08:25

Your WaitFlag
function WaitFlag(time:integer):boolean;
var
counter:integer;
begin
marktime(counter);
repeat
wait(randomrange(200, 400));
if FlagPresent then
begin
result := true;
exit;
end;
until(timefrommark(counter)) > time;
writeln('Flag didnt appear!');
Result := False;
end;

How I would make it
function WaitFlag(time:integer): boolean;
var
counter: integer;
begin
MarkTime(counter);
while(counter < time) do
begin
wait(RandomRange(100, 200));
if FlagPresent then
break;
end;
Result := counter < time;
end;
In my opinion better code, looks cleaner and achieves the same thing. I try to avoid Exits as much as possible, but sometimes you can't avoid them :P

The TPA you've made looks a bit messy but it looks like it would get the job done.

On a more positive side, I like how you are using records and overall it's looking good. Activity and helpfulness are a big plus, so I'm definately going to vote Yes :)

Footy

2012-09-24 07:03:11

Thanks for the feedback and votes guys! I'll add some of your suggestions after school today(9 hours from now).

Daniel

2012-09-24 07:16:40

From: J J
Your WaitFlag
function WaitFlag(time:integer):boolean;
var
counter:integer;
begin
marktime(counter);
repeat
wait(randomrange(200, 400));
if FlagPresent then
begin
result := true;
exit;
end;
until(timefrommark(counter)) > time;
writeln('Flag didnt appear!');
Result := False;
end;

How I would make it
function WaitFlag(time:integer): boolean;
var
counter: integer;
begin
MarkTime(counter);
while(counter < time) do
begin
wait(RandomRange(100, 200));
if FlagPresent then
break;
end;
Result := counter < time;
end;
In my opinion better code, looks cleaner and achieves the same thing. I try to avoid Exits as much as possible, but sometimes you can't avoid them :P

Your one would not work the way you expect them to. No TimeFromMark.

Footy

2012-09-24 07:52:08

I've added a quick ATPA before I go to school. :) Its in the OventoBank procedure.

litoris

2012-09-24 11:09:50

Voting yes because of overall attitude in the community. Scripting skills are good enough, and you have experimented with new stuff since your last app and you are making new scripts all the time. Aside from better use of TPAs(ATPAs are needed obviously) you could add more failsafes(script should be able to run even if there's occasional lag) and try advanced walking methods over long paths. You could also add a proggy from the script to prove that it works.

Footy

2012-09-24 11:13:31

From: litoris
Voting yes because of overall attitude in the community. Scripting skills are good enough, and you have experimented with new stuff since your last app and you are making new scripts all the time. Aside from better use of TPAs(ATPAs are needed obviously) you could add more failsafes(script should be able to run even if there's occasional lag) and try advanced walking methods over long paths. You could also add a proggy from the script to prove that it works.



Thank you! I can run the script after school for a few hours to get you a proggy.

Emaziz

2012-09-24 13:03:05

I'll vote yes if you get my remaining 30 quest points on my main for me :)
jk, I voted yes anyway =)

Mat

2012-09-24 13:19:35

From: Emaziz
I'll vote yes if you get my remaining 30 quest points on my main for me :)
jk, I voted yes anyway =)

remaining 30 quest points :)
Made me lol :D
&#26159;
&#20320;&#20284;&#20046;&#38750;&#24120;&#27963;&#36291;&#65292;&#36825;&#23601;&#26159;&#20026;&#20160;&#20040;&#25105;&#25237;&#20102;&#36190;&#25104;&#31080;:)
&#37239;&#35910;

&#39532;&#29305;

J J

2012-09-24 13:22:43

From: Daniel
Your one would not work the way you expect them to. No TimeFromMark.

Oh messing Java stuff up with Pascal lately.

function WaitFlag(time:integer): boolean;
var
counter: integer;
begin
MarkTime(counter);
while(TimeFromMark(counter) < time) do
begin
wait(RandomRange(100, 200));
if FlagPresent then
break;
end;
Result := TimeFromMark(counter) < time;
end;

Nebula

2012-09-24 13:51:25

Could be made shorter to this, but I guess it doesn't even matter considering it is never used.


function WaitFlag(time:integer): boolean;
var
counter: integer;
begin
MarkTime(counter);
while((TimeFromMark(counter) < time) and (not result)) do
Result := WaitFunc(@FlagPresent, RandomRange(50, 100), RandomRange(100, 200)
end;

Anyways I decided to vote yes, Hoping that you continue to improve your scripting.

Footy

2012-09-24 15:08:18

From: Mat
remaining 30 quest points :)
Made me lol :D
&#26159;
&#20320;&#20284;&#20046;&#38750;&#24120;&#27963;&#36291;&#65292;&#36825;&#23601;&#26159;&#20026;&#20160;&#20040;&#25105;&#25237;&#20102;&#36190;&#25104;&#31080;:)
&#37239;&#35910;

&#39532;&#29305;


You voted in favor of cool beans? :D

I'm working on a proggy right now, give me a few hours to get a decent one. Thanks for all the feedback guys, I'm walking the 65% line atm…

cause

2012-09-24 15:38:15

Voted yes, decent script, great attitude and community involvement.

Footy

2012-09-24 15:40:38

:D Thanks!

BraK

2012-09-24 15:51:10

Voted yes well because I always vote Yes. ;)

Footy

2012-09-24 15:52:23

From: BraK
Voted yes well because I always vote Yes. ;)


Works for me! :)

E: Heres a proggy. It was interupted by Leo random, so I'll try to get a longer one now.

***************************************************
Footys AIO Cooker
***************************************************
Time running = 21 Minutes and 14 Seconds
We are Cooking Tuna!
We have Cooked 392 Fish so far!!
We have Earned 39200 XP so far!
We are Cooking 1107 Fish per hour!
We are Earning 110725 XP Per hour!
We have Taken 1 MiniBreaks so far!
Thanks for using Footys AIO Cooker!!! Please leave feedback on the script thread!
***************************************************
We found possible colors for the oven
Found the fish in our inv!
Mousebox this time
Red clicked!
We found the cookscreen DTM!
***** Found Random: Leo *****
Leo solver currently disabled
***** Failed Random: Leo *****

Griff

2012-09-24 18:02:25

Yes from me good sir.

Footy

2012-09-24 18:03:07

Thank you good sir! 64% now! You guys are killing me!

Le Jingle

2012-09-24 19:53:36

Granted I didn't have intentions of voting no, I do like the implemented ATPA. As well as most others believe, I too think that you are on a good learning road; I'm reassured that you can continue to learn/pickup TPA/ATPA/etc usage. We all learn at different paces and I do think you are learning at readied speed to one day implement more hard core TPA/ATPA/etc ;)

Yes

C&C (Cheers & Ciao),
Lj

Footy

2012-09-24 19:55:46

What would an example be of a hardcore ATPA function? Dont write me a function, just tell me what kind of stuff it should contain/do. Thanks for the vote! :D

Le Jingle

2012-09-24 19:58:56

From: Footy
What would an example be of a hardcore ATPA function? Dont write me a function, just tell me what kind of stuff it should contain/do. Thanks for the vote! :D


In my opinion, one that deletes false positive values, filters more, contains more than one loop, as well as possible time checks. These are just a few that I think of, from the top of my head: I'm sure there's more/better ideas out there. Also, debug/code comments (describing your code as you go) would have made me vote yes the first go around. :)

Footy

2012-09-24 20:45:03

I might have an idea as to how I'd do some of that. For now though, it seems a little bit past my scripting level. Thanks for the feedback and advice though.

BraK

2012-09-29 13:43:42

In!