SRL Archive - Archive

hayhay89 - SRL Member Application Form


HayHay89

2008-04-22 04:16:37

<!– BEGIN TEMPLATE: formanswers –>
hayhay89 - SRL Member Application Form
hayhay89

What is the meaning to life?
99.9% Scripting!!!!! and 0.1% School ha wat am i kidding 100% scripting!!

Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
Java

Other Communitys
None

How Long have You Played Runescape
4-6 years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

MY name is Hayhay89

Been trying to learn Scar for bout 2 months now and made this script

was pritty hard with ent finder and stuff

People who have helped me but i wrote allmost everthing my self

Zephrys and Timer helped me heaps mostly zephrys tho and Pvh And Ip-drowner

id hope to get in


things i no

-dtms/ddtms didnt use them tho
-radialwalk
-standards KInder
-the basics
-Multiplayer ( was a hard 1)
-Most things in general cant name everthing lol

well thanks

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program Fallycutter;
{.Include SRL/SRL/Misc/Smart.Scar}
{.Include SRL/SRL.Scar}

var
X, Y, Oak, Banked, Antiban, Loads: integer;
Axe,Trys: integer;
const
Smartworld = 142;
Smartsigned = True; //is smart signed true for yes false for no
Loadz = 3; //how many loads to do before switching players


procedure DeclarePlayers;
begin
NumberOfPlayers(1);

Players[0].Name := 'klklk';
Players[0].Pass := 'hgdfgdf';
Players[0].Nick := 'gdfgdf'; // 3/4 of name.
Players[0].Loc := 'Bank';
Players[0].Active := True;
Players[0].Integers[2] := 0000; //Bank Pin.
end;

procedure WhileChopping; forward;

procedure Intro;
begin
ClearDebug;
WriteLn('Oak Fally Cutter/Banker');
WriteLn('Made And Created BY Hayhay89');
WriteLn('First Sscript For RS Woot');
WriteLn('Post Progress reports At Thread');
WriteLn('THANKS FOR USEING');
end;

procedure Location(TheLocation: string);
begin
Players[CurrentPlayer].Loc := TheLocation;
WriteLn('Location: ' + TheLocation);
end;

procedure Noban;
begin
case Random(14) of
0: begin
randommovement;
MakeCompass('N');
SetAngle(true);
end;
1: GameTab(1 + random(10));
2: HoverSkill('woodcutting', false);
3: begin
GameTab(2);
Wait(2000 + random(4000));
GameTab(4);
end;
6: PickUpMouse;
end;
Antiban := Antiban + 1
end;

function CheckAxe: boolean;
var
TIA:TIntegerArray;
i: integer;
begin
TIA:= [Axe];
for i:=0 to High(TIA) do
begin
if not FindDTM(TIA[i], X, Y, MIX1, MIY1, MIX2, MIY2) then
Continue
else
begin
Result := True;
break;
end;
end;
end;



{
procedure Switchtime; //is it time to change players
begin
if (Loads >= Loadz) then
begin
writeln('Load reached.. switching!');
SetupPlayer;
nextplayer(true);
end else
exit;
end; }

function SwitchTime: Boolean; //Changed so its better
begin
if (Loads >= Loadz) then
Result := True;
end;

procedure Countlogs;
begin
end;

procedure LoadDtms;
begin
Oak := DTMFromString('78DA633464666038CFC8800C72438C181E026' +
'990E87F2060D402AAB98DAA06220B2381B43150CD0D026A6C806A' +
'2E1150630E54739C801A4D22D42801D59C25A04681B09B01F61B0' +
'DFB');

Axe := DTMFromString('78DA63D464666038CBC8800C9A9304181E026' +
'990E87F20605403AAB98DAA06220B2381B43650CD79026A74806A' +
'0E115003B2EB0201352A4035D709A83102AA3982AAC636281A558' +
'D167EBB98801800F59A0EB5');
end;

procedure Freedtms;
begin
FreeDTM(Oak);
FreeDTM(Axe);
end;

function EntFinder: boolean;//made my bobbo edited largely by me
var
X, Y: integer;
begin
if FindColorTolerance(X, Y, 51657, 80, 6, 127, 20, 5) and IsUpText('Chop') then
begin
MFNF(MMCX, MMCY, -3, 3);
Result := True;
EntsAvoided := EntsAvoided + 1;
end;
end;



procedure ProgressReport;
begin
Cleardebug;
Writeln('[---------OakCutter--------------]');
Writeln('Time Running '+TimeRunning+ ' WoW');
Writeln('');
WriteLn(' ¤ Banked ' + IntToStr(Banked) + ' times');
Writeln('Cut how many logs');
Writeln('');
Writeln('did antiban ' + IntToStr(Antiban) + ' many times');
Writeln('');
Writeln('Post this progress report');
Writeln('[----Made by hayhay89---]')
end;

procedure FindRandoms;
begin
if (not LoggedIn) then
Exit;
FindNormalRandoms;
if (findfight) then
begin
RunAway('W', True, 1, 2000)
if FindSymbol(x, y, 'Tree') then
begin
mouse(x, y + 20, 6, 6, true);
FFlag(2);
Exit;
end else
Logout;
end;
end;

procedure ChopOak;
begin
if not LoggedIn then Exit;
FindRandoms;

if FindObjTPA(x, y, 2510664, 10, 1, 5, 5, 15, ['Oak']) then
begin
case Random(5) of
0, 1, 2: begin
Wait(30 + Random(20));
Mouse(x, y, 3, 3, True);
Wait(7000 + Random(1000));
FindRandoms;
end;
3, 4: begin
Mouse(x, y, 2, 3, False);
wait(60 + random(80));
ChooseOption('Chop');
FindRandoms;
end;
end;
WhileChopping; //Waits while chopping
end;
end;

procedure WalkToBank;
begin
if (not(LoggedIn)) then Exit;
if not RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 2, 1) then
RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 2, 1);
RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 1, 2);
if not RadialWalk(8232867, 345, 376, 54, 1, 2) then
begin
if FindSymbol(x, y, 'Bank') then
begin
mouse(x, y + 20, 6, 6, true);
FFlag(2);
Writeln('We are at the bank');
Location('At Bank');
Exit;
end;
end;
end;
procedure WhileChopping;
begin
if (not(LoggedIn)) then Exit;
while (IsUpText('Oak')) do
begin
FindRandoms;
Noban;
if (EntFinder) then
DoEmote(4);
if (InvFull) then Break;
end;
end;

procedure Bank;
begin
If not (Loggedin) then Exit;
if (OpenBank('feb',False,False)) then
begin
if (PinScreen) then
begin
InPin(IntToStr(Players[CurrentPlayer].Integers[2]));
wait((500)+random( 450));
If (BankScreen) then
Deposit(2, 28, True) ;
end else
if (FindSymbol(x, y, 'Bank')) then
begin
Mouse(x, y, 0, 0, True)
Bank;
Trys:= Trys+1;
If (trys>= 5) then
begin
logout;
exit;
end;
end;
end;
end;
procedure walktoOaks;
begin
if (not(LoggedIn)) then Exit;
Setrun(true);
if not RadialRoadWalk(FindFallyRoadColor, 210, 168, 65, 1, 2) then
RadialRoadWalk(RoadColor, 205, 185, 64, 1, 1);
FindRandoms;
if not RadialRoadWalk(FindFallyroadcolor, 192, 171, 65, 1, 1) then
if not RadialRoadWalk(FindFallyRoadColor, 199, 164, 67, 1, 1) then
begin
if not RadialRoadWalk(RoadColor, 181, 110, 36, 1, 2) then
if not RadialRoadWalk(RoadColor, 172, 131, 65, 2, 1) then
if not RadialRoadWalk(RoadColor, 182, 142, 59, 1, 1) then
RadialRoadWalk(RoadColor, 183, 143, 68, 1, 1);
Findrandoms;
end;
end;

procedure secondwalk;
begin
if (not(LoggedIn)) then Exit;
if not RadialRoadWalk(RoadColor, 181, 110, 36, 1, 2) then
if not RadialRoadWalk(RoadColor, 172, 131, 65, 2, 1) then
if not RadialRoadWalk(RoadColor, 182, 142, 59, 1, 1) then
begin
RadialRoadWalk(RoadColor, 183, 143, 68, 1, 1);
setrun(False);
Location('Trees');
Findrandoms;
end;
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function AmIAtTree(Pixles_Away: Integer): Boolean;
By: Timer edited by me
Description: Finds The Exact Middle Of The Tree Symbol. Subracts It From The
Center Coords... And If Its Smaller Or Eaqual To Pixles_Away It Will Result
True...
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}

function AmIAtTree(Pixles_Away: Integer): Boolean;
var
Tree: TPointArray;
TreeAt: TPoint;
Temp: array[0..2] of Integer;
begin
FindColorsTolerance(Tree, GetSymbolColor(X, Y, 'tree'), MMX1, MMY1, MMX2, MMY2, 0);
TreeAt := MiddleTPA(Tree);
Temp[0] := MMCX - TreeAt.X;
Temp[1] := MMCY - TreeAt.Y;
Temp[2] := Temp[0] + Temp[1];
Temp[2] := Round(Temp[2] / 2);
if Temp[2] <= Pixles_Away then
Result := True
else
Result := False;
end;

procedure Oaks;
begin
if (not(LoggedIn)) then Exit;
repeat
ChopOak;
if (EntFinder) then
DoEmote(1+Random(8));
Noban;
FindRandoms;
if (InvFull) then
begin
Writeln('Inv Full, going back to bank');
Location('To Bank');
Break;
end;
until (not(LoggedIn)) ;
end;

procedure SetupPlayer;
begin
if (not(LoggedIn)) then Exit;
Wait(2000);
MakeCompass('n');
SetAngle(True);
Retaliate(False);
SetChat('off', 2);
if not (CheckAxe) then
begin
Writeln('No Axe');
LogOut;
end;
end;

procedure WAlk;
begin
if (not(LoggedIn)) then Exit;
repeat
walktoOaks;
Secondwalk;
if (AmIAtTRee(20)) then
begin
Writeln('We are at the Oak Trees');
Location('Oaks');
Exit;
end;
until(not (LoggedIn));
end;

procedure SetupScript;
begin
SmartSetupEx(Smartworld, False, Smartsigned);
wait(15000);
SetTargetDC(SmartGetDC);
SetupSRL;
Intro;
DeclarePlayers;
LoadDtms;
Loginplayer;
SetupPlayer;
end;

begin
SetupSRL;
SetupScript;
repeat
SetupPlayer;
IF not LoggedIn then
Nextplayer(false);

repeat

case Players[CurrentPlayer].Loc of
'Bank' : Walk;
'Oaks' : Oaks;
'To Bank' : WalkToBank;
'At Bank' : Bank;
end;

until(SwitchTime);

NextPlayer(LoggedIn);
until(False);



end.

——————————————————
<!– END TEMPLATE: formanswers –>

Daniel

2008-04-22 04:46:19

I vote yes, your standards are very goofy (as you noticed) but i think you'll learn more if you're in members. You provided credit where appropriate.

Good luck on getting into members :)

P.S: Don't pick on him from his last application.

Sir R. M8gic1an

2008-04-22 06:20:59


Nextplayer(Players[CurrentPlayer].Active);
End.

not multiplayer. not sure on what to vote, im at school atm. you used FindObjTPA which caught my eye. i'll have a better look when i get home.

-RM

mixster

2008-04-22 11:38:59

There's a good base, but you haven't grasped some aspects needed. For example, you have multiple dtm's just for finding an axe when you can use an item mask to do the job just as well and you didn't check the equipment panel, so it could return false results. Also, you used a series of if not then's when a case could've been much more simple and easy to read (same with the location checking in the main loop).
For your walking, you don't have any fail safes or checks to see if you have reached the trees or not and the don't tell the user to log out and go to the next user if it can't walk properly, find the bank or open the bank.
You also don't call the setupScript procedure as far as I can tell, so it won't actually work properly as SMART won't start up etc. Lastly, you have a useless check the beginning of your repeat to make it go to the next player if the char isn't logged in, even though the script should log the player in if it did call setupScript and it has a NextPlayer(loggedIn) at the end of the first repeat which will automatically login the next player, so it will always return true as long as you haven't been somehow logged out while returning to the beginning of the repeat loop making it near useless.

There are also a lot of good points about it, but it's easier to pick out the flaws than the pro's, I just hope you will use my criticisms constructively to improve the script :)

Iron Man

2008-04-22 11:53:15

I see this sort of thing in your walking to and from the trees

if not RadialRoadWalk(FindFallyRoadColor, 210, 168, 65, 1, 2) then
RadialRoadWalk(RoadColor, 205, 185, 64, 1, 1);

What happens if the second one messes up?

Like mixster said you should have used a universal DTM for your axes instead of individual ones.

For your oak procedure, maybe make the DoEmote more random? Like DoEmote(1 + Random(15)); that way your not doing the same thing every time a ent pops up.

For this part in your loop you should use a case.

if (Players[CurrentPlayer].Loc = 'Bank') then
begin
Walk;
end;

if (Players[CurrentPlayer].Loc = 'Oaks') then
begin
Oaks;
end;

if (Players[CurrentPlayer].Loc = 'To Bank') then
begin
WalkToBank;
end;

if (Players[CurrentPlayer].Loc = 'At Bank') then
begin
Bank;
end;

Edit:

No from me from what the reasons in mixsters post, this post and some people below my post's said.

EvilChicken!

2008-04-22 12:00:35

I wanted to vote NO, but FindObjTPA prevented it. You should learn arrays and stuff. And I don't like your DTM usage.

I'm leaning towards a no, but since I feel nice today I'm not voting as for now.

Sp0rky

2008-04-22 12:04:29


WriteLn('OAK FALLY CUTTER/BANKER');
WriteLn('MADE AND CREATED BY HAYHAY89');
WriteLn('FIRST SCRIPT FOR RS WOOT');
WriteLn('POST PROGGIES AT THREAD');
WriteLn('DONT POST THIS SCRIPT ANYWHERE!!!!!');
WriteLn('POST BUGS AND STUFF');
WriteLn('THANKS FOR USEING');


Your caps, spelling mistakes and general grammar are going to bug the f-bomb out of me. No.

Naum

2008-04-22 13:40:14

ok now this:

1.
This Function Should be renamed to FindTheAxe as it is what it does:
This Is alright but you can shorten it from this:
function CheckAxe: boolean;
begin
if not FindDTM(Bronze, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Iron, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Steel, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Black, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Mith, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Addy, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Rune, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('No AXe Next PLayer');
Result := False;
end else
begin
Writeln('Found axe')
Result := True;
end;
end;

to this, by making a DTM mask

function FindTheAxe: boolean;
var
AxeMask, AxeCol : Integer;
begin
AxeMask := DTMFromString('78DA635465606058CA800618914820AD09245' +
'613500332671D01350A4062150135D244B84703482C23A0461248' +
'ACC5AF06001A0805A5');
Begin
if ( not( FindDTM(x, y, AxeMask, MIX1, MIY1, MIX2, MIY2))) Then
begin
Writeln('No AXe Next PLayer');
Result := False;
end else
begin
MMouse(x,y,1,1);
AxeCol:=GetColor(x,y);
WriteLn('AxeColor is '+IntToStr(AxeCol)+'!!!')
Writeln('Found axe')
Result := True;
end;
end;
end;
This function now find the axe moves its mouse over it and registars the color.
And if you wanted to go far you could add all the colors of the axes and by using
SimilarColors

you can determine which axe color it is :).

2.
Dont you mean 'cut' in your proggie
' ¤ Casted '

' ¤ CHopped '
^ ;) ^

3.
Not sure about this but shouldn't
WhileChopping;

be on to of the procedure you are calling it in?

4.In your oaks procedure might want to add some randommess:
 DoEmote(4);

could be..

DoEmote(1+Random(8));

Yeah much more I can see, but personally I dont think this script is worthy of a 'yes', sorry m8 its a no…

But keep it up :D

Sir R. M8gic1an

2008-04-22 15:06:26

I vote no. i re-went over the script.


function CheckAxe: boolean;
begin
if not FindDTM(Bronze, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Iron, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Steel, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Black, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Mith, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Addy, X, Y, MIX1, MIY1, MIX2, MIY2) then
if not FindDTM(Rune, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('No AXe Next PLayer');
Result := False;
end else // trouble here, it'll think the else is
begin //about the if not FindDTM(Rune..)
Writeln('Found axe')
Result := True;
end;
end;

much better ways to do it, to keep it pretty much the same way as you have now, with al the DTM's you could do it this way:


function CheckAxe: boolean;
var
TIA:TIntegerArray;
i: integer
begin
TIA:= [Bronze, Iron, Steel, Black, Mith, Addy, Rune];
for i:=0 to High(TIA) do
begin
if not FindDTM(TIA[i], X, Y, MIX1, MIY1, MIX2, MIY2) then
Continue
else
begin
Result := True;
break;
end;
end;
end;


if not RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 2, 1) then
RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 2, 1);
RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 1, 2);

//your autocoloring three times!
MyRoad: integer;
MyRoad := FindFallyRoadColor;
if not RadialWalk(MyRoad...) then
if not RadialWalk(MyRoad...) then
if not RadialWalk(MyRoad...) then
//it's faster to keep it in a var than to autocolor it so often. but do make sure you re-autocolor that var every once in a while.

if your bank procedure finds the bank the first time it'll just open it but not do anything. won't deposit.


procedure Bank;
begin
if (not(LoggedIn)) then Exit
if (not OpenBankFast('feb')) then //if not... what if it does?
if (not OpenBankQuiet('feb')) then
begin
if FindSymbol(x, y, 'bank') then
begin
Mouse(x, y, 2, 2, true);
FFlag(3);
if OpenBankFast('feb') then
begin
if (PinScreen) then
InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
Wait(500 + Random(100));
Deposit(2, 28, True);
CloseBank;
Banked := Banked + 1
Loads := Loads + 1
Switchtime;
end;
end;
end;
end;

and i see you already added an until(false) at the end of the script compared to this morning when i posted.

you didn't test this script, did you? alrays test it before submitting it to something like this.

and there is a FindEnt and a FindAxe procedure in SRL/skills/Woodcutting.scar, just in case you don't know about it.

it's a no, but you're on the right way; good luck.

~RM

Metagen

2008-04-22 20:28:24

Definite yes! this is the most ingenious script i have ever seen!

Daniel

2008-04-22 21:12:46

Oh, c'mon. This script is worthy. Who cares if he has a few flaws. This meets the requirements for an App.

Santa_Clause

2008-04-22 21:27:57

From: IP-Drowner
Oh, c'mon. This script is worthy. Who cares if he has a few flaws. This meets the requirements for an App.


Do you always have to try to influence other people's decisions?

Daniel

2008-04-22 21:29:40

From: Santa_Clause
Do you always have to try to influence other people's decisions?

Yes i have to :)
What about you? :)
It's what i do ;)

EvilChicken!

2008-04-23 00:48:14

I voted yes.

HayHay89

2008-04-23 00:56:25

From: EvilChicken!
I voted yes.


Umm if it was allright with u i was wondering wat changed your mind?>

Edit:Added cases for the location

Edit1:instead of all these dtm got 1 instead

Gu3st...

2008-04-23 08:46:43

I think you are worthy.

But i dont want to mention the bugs that other ppl already said.

Cazax

2008-04-23 18:22:32

procedure Countlogs;
begin
end;
whats that?

if not RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 2, 1) then
RadialRoadWalk(FindFallyRoadColor, 345, 376, 54, 2, 1);
Thats not a failsafe… the same parameters…

if FindSymbol(x, y, 'Bank') then
begin
mouse(x, y + 20, 6, 6, true);
FFlag(2);
Writeln('We are at the bank');
Location('At Bank');
Exit;
end;
what if it fails?

DoEmote(4);
should be +random(x)?

Wizzup?

2008-04-27 06:24:12

Welcome!