SRL Archive - Archive

skvatboy - SRL Member Application


skvatboy

2009-07-16 22:40:23

My second try I hope i have improve to get the `yes´

http://www.villavu.com/forum/showthread.php?t=47452
How Long have You Played Runescape?
4 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
none


Are you a member of any other communities?
No


Tell us about yourself…
From: skvatboy
Am a 20 years
a communicate expert in denmark
and i like the open source commuter in here
the freedom of share



Please show us one (or multiple) of your scripts.
program EoNewtB;

{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/misc/FaladorColorFinder.scar}
const
SmartWorldNo = 120;
Signed = True;
Amount = 200;
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(1);
CurrentPlayer := 0;

Players[0].Name := ''; //Player username
Players[0].Pass := ''; //Player password
Players[0].Nick := ''; //Player nickname - 3-4 letters of Player usernamne.
Players[0].Active := True; //Is the player active (do you want to auto on this acc)?
Players[0].Pin := ''; //Bank Pink, leave as '' for no bank pin... MUST BE A STRING!
Players[0].BoxRewards := ['XP', 'ostume', 'Gem', 'ithril', 'oal', 'une', 'mote', 'oins'];
end;

function DTMWalks(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;
x, y, i, t, Tole: Integer;
begin
case WalkNumber of
1:begin
repeat
Tole:= Tole + 5;
dtmMainPoint.x := 625;
dtmMainPoint.y := 91;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 10206142;
dtmMainPoint.Tolerance := Tole;

dtmSubPoints[0].x := 625;
dtmSubPoints[0].y := 91;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 10206142;
dtmSubPoints[0].Tolerance := Tole;

dtmSubPoints[1].x := 633;
dtmSubPoints[1].y := 60;

dtmSubPoints[2].x := 604;
dtmSubPoints[2].y := 74;

dtmSubPoints[3].x := 605;
dtmSubPoints[3].y := 54;

dtmSubPoints[4].x := 598;
dtmSubPoints[4].y := 95;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;

for t := 1 to 4 do
with dtmSubPoints[t] do
begin
AreaSize := 0;
AreaShape := 0;
Color := FindFallyRoadColor;
Tolerance := tole;
end;

Result := AddDTM(TempTDTM);
if DTMRotated(Result, x, y, MMX1, MMY1, MMX2, MMY2) then Exit;

try
FreeDTM(i);
except
end;
until(tole > 50)
end;
end;
end;

function OpenFWBBank: Boolean;
var
x, y, BankSpot : Integer;
Begin
If(Not(LoggedIn)) Then Exit;
FindNormalRandoms;
FindBank('fwb');
if BankScreen then
Result := true
else
Writeln('Not Found by (FindBand)');
BankSpot := DTMWalks(1);
if FindDTM(BankSpot, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Writeln('Found by DDTM');
Result := OpenBank('fwb', False, False);
end;
Result := False;
FreeDTM(BankSpot);
end;

Procedure CheckGetCash;
var
x, y : Integer;
Begin
If(Not(LoggedIn)) Then Exit;
gametab(tab_Inv);
IF (CoinAmount('inv') > 50) Then Exit;
if not BankScreen then OpenFWBBank;
FindCoins(X, Y, 'bank');
begin
Mouse(x, y, 4, 4,false);
Wait(150 + random(200));
if (Amount > 0) then
begin
ChooseOption('Withdraw-X')
Wait(1000 + Random(100));
TypeSend(IntToStr(Amount));
end;
if (Amount = 0) then
ChooseOption('ll');
end;
Deposit(2, 28, True);
CloseBank;
end;

Procedure DoorClosed;
Var
TPA: TPointArray;
I: Integer;
Begin
If(Not(LoggedIn)) Then Exit;
FindColorsTolerance(TPA, 3891047, msx1, msy1, mscx, msy2, 5);
For I := 0 To High(TPA) Do
begin
MMouse(TPA[i].x, TPA[i].y,2,2);
Wait(100 + Random(200));
If Isuptext('los')then Exit;
If Isuptext('ett')then
begin;
Mouse(TPA[i].x, TPA[i].y, 2, 2, True);
Writeln('Door clik');
Break;
end;
Writeln('Door open');
end;
end;

function MageShopFloor: Integer;
var
FloorColor, c, TX, TY, MageShopbit : Integer;
begin
MageShopbit := BitmapFromString(4, 4, 'beNorKH739sV/JMRXU' +
'AxB77CyAR4+HBM=');
while (c <= 80) do
begin
c := c + 5;
if (FindTransparentBitmapTolerance(MageShopbit, TX, TY, clBlack, MMX1, MMY1, MMX2, MMY2, c)) then
begin
FloorColor := GetColor(TX, TY);
Result := FloorColor;
break;
end;
end;
if (Result = 0) then
WriteLn('FloorColor NOT Found');
FreeBitmap(MageShopbit);
end;

procedure WalkToMagic;
var
x, y, sp1, sp2 : Integer;
begin
sp1 := DTMFromString('78DA63AC65666088636440065159320C46401' +
'A24FA1F0818BB816A32206A602A9DD4B8189491F88CE54035D904' +
'D4B420EC828919CB73A0A80100D3180A63');
sp2 := DTMFromString('78DA636C66626058C98002F2D323185280342' +
'310FF0702C68940352B20724C50356FBFBC601081AA0101C64CA0' +
'CC7C026A8A81323D5036544CDF930B450D009F951060');

If(Not(LoggedIn)) Then Exit;
FindNormalRandoms;
MakeCompass('n');
SetRun(true);
begin
if not RadialWalk(FindFallyRoadColor, 200 , 230, 50, 2, 2) then
RadialWalk(FindFallyRoadColor, 190 , 240, 50, 2, 2);
repeat
RadialWalk(FindFallyRoadColor, 165, 195, 63, 2, 2)
Until FindSymbol(x, y, 'tree') or ((FindFallyRoadColor) > 0);
WriteLn('Find tree');
repeat
if not RadialWalk(FindRoadColor, 165, 195, 70, 2, 2) then
RadialWalk(FindRoadColor, 155, 200, 70, 2, 2);
FFlag(0);
until ((MageShopFloor) > 0) or FindSymbol(x, y, 'resting spot');
WriteLn('resting spot or shop flor');
if FindDTM(sp1, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk to sp1');
FFlag(10);
end;
if FindDTM(sp2, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk to door or sp2');
FFlag(10);
end;
end;
FreeDTM(sp1);
FreeDTM(sp2);
end;


Procedure WalkToBank;
var
x, y, sp1, C: Integer;
begin
If(Not(LoggedIn)) Then Exit;
sp1 := DTMFromString('78DA63AC65666088636440065159320C46401' +
'A24FA1F0818BB816A32206A602A9DD4B8189491F88CE54035D904' +
'D4B420EC828919CB73A0A80100D3180A63');
if FindDTM(sp1, X, Y, MMx1, MMy1, MMx2, MMy2) then
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk to sp1');
FFlag(10);
end;

repeat
WriteLn('walk');
if not RadialRoadWalk(FindRoadColor, 345, 370, 65, 2, 2) then
RadialWalk(FindRoadColor, 350, 375, 70, 2, 2);
FFlag(0);
Until (FindFallyRoadColor) > 0;
C := 0;
repeat
if (C > 0) then
WriteLn('walkFallyRoad');
if not RadialRoadWalk(FindRoadColor, 355,390, 65, 2, 2) then
RadialRoadWalk(FindFallyRoadColor, 350,390, 65, 2, 2);
FFlag(2);
Inc(C);
until FindSymbol(x, y, 'bank') or (C > 10);
end;

Procedure FindBrtty;
Var
TPA: TPointArray;
I: Integer;
Begin
FindColorsTolerance(TPA, 4336963, msx1, msy1, msx2, msy2, 5);
For I := 0 To High(TPA) Do
Begin
MMouse(TPA[i].x, TPA[i].y, 2, 2);
Wait(100 + Random(200));
If Isuptext('ett')then
begin;
Mouse(TPA[i].x, TPA[i].y, 2, 2, False);
ChooseOption('Trade')
Break;
end;
end;
end;

procedure ByNewts;
var
x, y, Newt: Integer;
begin
Newt := BitmapFromString(5, 9, 'beNqbN+/q+fNXzp3bv3Xr8tmze5q' +
'a7t++LSazTVRqlbDEvAVTp4jL7heT2SkqLAxE03t7Prx7B2ED0cy+vicPH965' +
'fv3y2TOnDx+eO2kinHt8/75F06ZBuBdOnTy8a9fmFSuA3FtXr545ehRo1/rFi' +
'4Hc6xcvnjhwYPfGDasAVkNUxw==');
If(Not(LoggedIn)) Then Exit;
if not(ShopScreen) then Exit;
if(FindBitmapIn(Newt, x, y, msx1, msy1, msx2, msy2))then
begin
Writeln('News');
MMouse(x, y, 5, 5);;
If Isuptext('ye of')then
Mouse(x, y, 1, 1, False);
ChooseOption('X');
begin
Wait(100 + Random(1000));
TypeSend('28');
if InvFull then
closewindow;
end;
end;
FreeBitmap(Newt);
end;

Procedure ChatsSetUp;
Begin
If(Not(LoggedIn)) Then Exit;
setrun(true)
gametab(4);
MakeCompass('n');
FindNormalRandoms;
SetAllChats('all', 'on', 'off', '', '', '');
SetAngle(True);
end;

procedure SetupScript;
begin
{$IFDEF SRL_SMART}
Smart_Server := SmartWorldNo;
Smart_Signed := Signed;
{$ENDIF}
SetupSRL;
DeclarePlayers;
SetAudioOff;
If (Not(LoggedIn)) then LoginPlayer;
end;

begin
SetupScript;
ChatsSetUp;
repeat
CheckGetCash;
WalkToMagic;
DoorClosed;
FindBrtty;
ByNewts;
WalkToBank;
OpenFWBBank;
until(not(LoggedIn));
end.

Awkwardsaw

2009-07-16 23:58:44

i have to say, huge improvement to the first one, but there are a few things you missed out on: anti randoms(unless i looked over it) and anti-ban. honestly, that alone makes me want to say no =\

i only looked over it real fast though.

there are other parts that can be shortened a few lines, but im not too extreamly picky about it, since it happens to every one.

the walking fail safes are better, although they can be better and more of them( it can never hurt ;))

again, it looks a hell of a lot better, but im not going to vote still.

JAD

2009-07-17 00:07:57

@Saw, he calls FindNormalRandoms in there.

In OpenFWBBank, you need a begin end after your else. If you only want to do one statement after an if then, then you don't need a begin end. Otherwise, It Writeln's if it's not at the bank screen, but will still try to open bank again.

Then if you find the DTM, you just click the mouse. No uptext check. You should MMouse there, check uptext, getMousePos, and then Mouse x,y,0,0,true.

The result is always going to be false in OpenFWBBank too because you never exit, and you have Result := false as the second to last line.

In DoorClosed, if the uptext is ett, you should GetMousePos(x,y) then Mouse(x,y,0,0,true) or else it will click in a different spot then you found the uptext in, thus it could miss. It also just looks unhuman if you don't.

In WalkToMagic, you have repeat radial road walking with no waits. This is really going to click a LOT which will seem pretty unhuman and may mess up your script.

You have no mark time in that loop as well. What if it keeps finding road color but never finds tree? Infinite loop.

Again below that you have an infinite too.

In ByNewts, maybe a bitmap isn't the best thing to search for the item. Static DTM's are usually the best thing for inventory items and shop items because they don't change.

Maybe set an amount of loads people can decide to do or how long they want to auto for? Just until not logged in for the main loop isn't the best idea. Also you should add multiplayer in case people want to use multiple players.



Yes from me. You don't seem to have a complete understanding of everything in your script, but you seem to have a good understanding of SCAR/SRL in general. Good job!

Gu3st...

2009-07-17 00:11:59

Yes

Imo this is members worthy.

bugger0001

2009-07-17 01:56:42

From what I saw in your script I have to say, it's a good one. Though missing some essentials such as multiplayer, anti-randoms(you have some, but clearly not enough), standards are a bit off(here and there you have one-space indenting, then two-space and occasionally even three-space, although they're not disturbing ;)). Then some errors from the script:
  • Begin, end; missing from lines 95- 104
  • lines 143-144: I think you wouldn't need the second If statement there
  • lines 193-201 contain potential endless loops
  • some minor stuff that could be shortened or just I personally don't favour, but aren't that important

I'm going to hold my vote untill I see some changes or comments about the things I mentioned.

Coh3n

2009-07-17 02:43:15

Okay there isn't much I noticed that hasn't been said already, but here are my comments. I'll outline the Pros/Cons/Suggestions.

Pros

1: I like what the script does, as it's unique, I haven't seen many Eye Of Newt buyers.

2: You seem to have a good knowledge of DDTMs/TPAs/Bitmaps.

3: Looks like you've looked through SRL a bit, although there are some functions that may be better for what you're trying to do.

4: I did look at your last application, and you have improved a lot, and the fact that you're applying again is awesome. That tells me you don't just give up, and you're willing to improve your work. :)

Cons

1: Line 201/241/250 isn't right, you're missing a set of brackets for the until command, AFAIK.

2: Line 266 you're missing a semicolon at the end.

3: No multiplayer (I think that's been pointed out). Mulitplayer isn't hard to add at all, it tells me maybe you don't understand simple concepts that well.

4: Your standards are pretty good, they're better than a lot of applications I've looked at. Try not to capitalize bold words, it doesn't look as nice, IMO, but if you like it better, stay consistent. When you indent it's two spaces, in some cases you only do one space, which can make your code harder to read. I'm very picky about organization, so good standards are more important to me than other people.

5: It's just over 300 lines, which is pretty short, which doesn't give a whole lot of space for showing us your SCAR knowledge.

6: No progress report? That just tells me maybe you're too lazy to add that little extra feature to make your script more appealing to the public.

Suggestions:

1: Making your own custom procedures for something that's already in SRL shows a lot more knowledge of SCAR, although it's not a huge deal.

2: Line 288, you should say if ChooseOption('X') then, then you can have an else statement and add a failsafe or exit the procedure.

3: You spelled 'buy' wrong in ByNewts, although that doesn't really matter, just thought I'd let you know. :p

4: Add more failsafes, your script should be able to run so that if it messes up, there's plenty of back up actions it can do to get back on track.

That's pretty much it that I noticed. I'm sorry that the Cons/Suggestions outweigh the Pros, but I only want to help you to make your script better. :)

As this will be the first script I vote on, I'm going to hold my vote, and wait and see what other people say. Right now, I'm leaning toward a Yes. Although there are a a lot of things that would make me say no, the "Pros #4" really makes me want to say Yes. :)

My apologies in advance if I insulted you in anyway, that was not my intention. :)

Cheers.

Blumblebee

2009-07-17 07:01:21

im still on the fence about it, Yes it is alot better, but for some reason I'm not sure if you fully comprehend tpa's or you are just copying from a tutorial (as the tpas are identical aside from colors), which makes me think, what else have you blindly done and not fully understood.

You still have a shitload of endless loops and other such sloppy scripting habits, but all in all its a lot better effort than that of last time.

an example of blindly copying (or so it seems) is the way you load your dtm. You have an exact copy of the loading style of that of BobboHobbo's tut, using a case statement to load the DDTM, however this is useless as you have one ddtm, the case statement is for loading multiples.

Your Open Bank function will always return false aswell as you have "result := False" at the end of the function, thus even if it was true at one point, it will be detered to false. You are also missing a crutial begin..end nesting in that function aswell. Lastly, you also make it return a boolean for absolutly no reason, you dont utilize the boolean it returns thus it would be suffice to be a procedure aswell. Again, to me I see this as sloppy and an attempt to gain membership, and is not a functioning script.

I wont vote atm, and tbh I wont vote at all, but what I would like to see is you release this script to the public. If you manage to get a progress report from someone with over 2 loads in it then you have a yes from me. However, It seems to me that this script still wont work, the usage of some techniques seem to be used to impress not to function properly.

With all my nit-picking n such keep in mind its still a good script, dont take my stuff too harsh, the things I type come from more of a generalization/sterotype so please, prove me wrong. Good Luck.

Daniel

2009-07-17 07:05:35

Yes.

You've taken into consideration the suggestions given previously, and you seem actively trying to get in, which shows effort :)

Good work, and keep it up ;)

skvatboy

2009-07-17 11:27:13

From: bugger0001

  • Begin, end; missing from lines 95- 104
  • My Mistake I just try to cleanup my script
  • lines 143-144: I think you wouldn't need the second If statement there
  • It is to stop the TPA if the door are open Maybe Break instead of exit
  • lines 193-201 contain potential endless loops
  • ye add a time limit :)
  • some minor stuff that could be shortened or just I personally don't favour, but aren't that important
  • hmm :S Thank for the list

Phran6

2009-07-17 22:33:02

yes, i saw your effort.

Baked0420

2009-07-17 23:49:02

I looked at the poll and it looks like we're getting a new member :). Good luck with the rest of your votes, since it looks like everyone is leaning towards yes, I won't look over your script this time, but I trust it's much better, I see positive posts about this script, with you improving, good job. Hopefully the rest of the people who vote think you deserve members also.

Coh3n

2009-07-17 23:56:18

Now that I've seen a few more people vote, I'm going to vote yes, not because I think your script is outstanding, but because you came back to apply for a second time, and listened to the advise from your previous application.

I hope getting accepted into member's wont stop you from scripting just because you have access to better scripts. I would really like to see some better code and more efficient scripts coming from you.

Good luck. :)

skvatboy

2009-07-18 00:43:58

A Thanks to All for the vote and comments
I still have a lot to learn
Is not about the scripts i try and hope to learn the basics of programme

Awkwardsaw

2009-07-18 01:09:40

have fun :p

and good luck i guess

bugger0001

2009-07-18 18:09:53

I see some positive changes since my last post in this thread, yet there are still potential endless loops in your walking procs. Try to get rid of those aswell and you'll get a YES from me ;)

JPHamlett

2009-07-18 20:48:28

ill look at it in a little

ian.

2009-07-18 20:53:52

/me is curious who voted no and why..

Naike

2009-07-20 02:33:54

Yes ;)

Dynamite

2009-07-20 03:10:53

Yes. ;)
Only 1 major criticism
procedure ByNewts;
change to:
procedure ByeNewts;

!!!! :P

T~M

Coh3n

2009-07-21 04:08:20

From: The Man
Yes. ;)
Only 1 major criticism
procedure ByNewts;
change to:
procedure ByeNewts;

!!!! :P

T~M


Ehm what? Is he saying good-bye to the newts? It's spelled "buy". :p

Awkwardsaw

2009-07-21 04:50:28

From: Coh3n
Ehm what? Is he saying good-bye to the newts? It's spelled "buy". :p


double pwnt :p

Naum

2009-07-21 20:09:13

Yes from me,

General Stuffs:

1. Sp1 is used twice in a procedure, maybe make a global procedure with it in, instead of loading it them freeing it.


2.DANGER..DANGER:

If Isuptext('ye of')then
Mouse(x, y, 1, 1, False);
ChooseOption('X');

Son, if you have an 'if then' statement is will only carry out the procedure or function below it. That's why you need a begin and end there:

If Isuptext('ye of')then
Begin
Mouse(x, y, 1, 1, False);
ChooseOption('X');
End;
Few, that's better :).


3.Just a small issue, incase RS insanely updates again :p:
gametab(4);
to..
gametab(Tab_Inv);


4.Also, you do not need to set the Result to false (except is it is meddled with before) as SCAR automatically sets the Result to False:
Function lol:Boolean;
Begin

End;

begin
SetupSRL;
writeln(BoolToStr(lol));
end.


5.One more thing:
  until(not(LoggedIn));
Could potentially be endless.. Maybe you want to have a loads variable so the person can set the amount of loads. Or make it log out after a set amount of time.

Looks like you'll be getting in, Best of Luck :D

Markus

2009-07-22 01:12:37

Wait, no multiplayer??
Did you do this on purpose or just a small thing you forgot?
*holds his vote for a couple of days to get this sorted*

Home

2009-07-22 01:57:12

From: N1ke!
Yes ;)


++1 (:


~Home

D1zl3

2009-07-22 03:04:07

I looked over the script, and couldnt find anything wrong that someone didnt already outline, and you seem really dedicated to learning, so its a yes from me :D

skvatboy

2009-07-22 19:10:06

NaumanAkhlaQ: thx for your list
Markus: i had one acc for testing so i forgot :(

Awkwardsaw

2009-07-22 20:18:17

you should release this script :) after you fix it up and add multi player ofcorse

bugger0001

2009-07-23 11:56:06

Mate, you got my YES ;)

Hobbit

2009-07-27 20:42:45

IN!

Welcome and make sure to read all the stickies! :)

Cheers
Hobbit