SRL Archive - Archive

tom99 - SRL Member Application


tom99

2011-06-11 12:54:32

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


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I know some basic things in assembly.


Are you a member of any other communities?
powerbot,rsbuddy


Tell us about yourself…
From: tom99
My name is Tom, i live in Norway 20y/o, currently working as a gardener.



Please show us one (or multiple) of your scripts.
Construction script, can be used from level 1.
I got 50 construction from it.
It keep track of how much money used in report.
For instructions how to use go to http://villavu.com/forum/showthread.php?t=64750



program Chaircarpentry;
{.include SRL\SRL\misc\SMART.SCAR}
{.include SRL\SRL.scar}
{.include Reflection/Reflection.simba}
{.include SRL\SRL\Misc\stats.simba}
var
planks,plankcosts,planksused,teleports,teleportcosts,teleportsused,countert,counterp,constructionxp:integer;
const
SmartWorld = 12;
Members = true;
SignedClient = true;
HighDetail = False;
SRLStats_Username = '';
SRLStats_Password = '';

procedure DeclarePlayers;
begin

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

With Players[0] Do
Begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
End;
end;



procedure startstats;
begin
SetupSRLStats(132, SRLStats_Username, SRLStats_Password);
end;

procedure startsmart;
begin
Smart_Server := SmartWorld;
Smart_Members := Members;
Smart_Signed := SignedClient;
Smart_SuperDetail := HighDetail;
SetupSRL;
end;
procedure instillkameravinkel;
begin
wait(2000);
mouse(549,18,12,14,true);
setangle(true);
end;

procedure teletodeamonhein;
var
x,y:integer;
begin
mousespeed:=(10+random(35));
mouse(681,178 ,14,20,true);
mousespeed:=(10+random(35));
x:=(689+random(18));
y:=(376+random(15));
mouse(x,y,0,0,false);
mousespeed:=(10+random(35));
mouse(x,y+55,-188,8,true);
WaitForAnimation(8000);
repeat
wait(1000);
if(getanimation = -1) then break;
until(false)
wait(1000);
end;

Procedure walk2deamonbank;
var
ThePath1: TTileArray;
begin
ThePath1:= [Tile(3451, 3701), Tile(3447, 3718), Tile(3449, 3719)];
walkpath(thepath1);
LoginPlayer;
wait(500+random(500));
end;

procedure apnebank;
var
bank,minid:TNPC;bankx:tpoint;xt,yt:integer;TheVarArr: TVariantArray;
begin
thevararr:= [8013,8794,2347,4820,960]
writeln('Contacting Bank');
if(findnpc(9710,minid)) then
Begin
writeln('Found bank');
bankx := tiletoms(minid.tile,0);
mousespeed:=(10+random(35));
mouse(bankx.x,bankx.y,2,2,false);
mousespeed:=(10+random(35));
mouse(bankx.x,bankx.y+38,-82,10,true);
wait(500);
repeat
if(findcolortolerance(xt,yt,3358280,137, 53,344, 77,1)) then
break;
wait(1000);
until(false)
writeln('Opened bank');
R_DepositAllButEx(thevararr);
end;
end;



procedure tautplanker;
var
xg,yg:integer;
begin
wait(2000);
mousespeed:=(10+random(35));
mouse(76,303,22,12,true);
wait(100+random(300));
mousespeed:=(10+random(35));
sendkeys('plank');
writeln('Widraw options');
xg:=46+random(11);yg:=98+random(15)
mouse(xg,yg,0,0,false);
writeln('Widraw');
mousespeed:=(10+random(35));
mouse(xg,yg+104,70,6,true);
mousespeed:=(10+random(35));
end;

procedure movingtohouse;
var
xt,yt,aroom:integer;
begin
aroom := BitmapFromString(27, 20, 'meJytlEsKhEAMRI/mQpARUdCFiP' +
'hBZjZz/wsoCKGodIcogVpJ+fpXlf7371Nqt69H9FezHEnaa91Az+r' +
'OTQqwnnctNOc8ZENgNc4kNOc8ZCNgOYwoNOc8ZLOBaI4Civ9WCBCZ' +
'gUBRCNCWBuZS4dkwJQerp6PreSaKN3WZOmW/gsQJO2gPBzvwVDppi' +
'v6YZOpLwxKJLmByIc00xgIaPtNK7X46bOkUOkgvhFdddEM48ASZsymt');

mousespeed:=(10+random(35));
mouse(487, 33,5,4,true);
mousespeed:=(10+random(35));
mouse(649, 174,16,21,true);
mousespeed:=(10+random(35));
mouse(573, 223,16,15,true);
setangle(false);
repeat
wait(1000);
if(findcolortolerance(xt,yt,11295114,10,10,510,330,5)) then
break;
until(false)
mousespeed:=(10+random(35));
writeln('Found portal, entering.');
mouse(xt,yt,-4,3,true);
wait(100+random(300));
wait(5000+random(500));
MakeCompass('W')
repeat
wait(1000);
if(findcolortolerance(xt,yt,8864621,10,10,510,330,5)) then
break;
until(false)
mousespeed:=(10+random(35));
mouse(xt,yt,-3,-3,true);
wait(3000+random(500));
mousespeed:=(10+random(35));
mouse(194, 415,190,0,true);
repeat
wait(1000);
if(findcolortolerance(xt,yt,11295114,10,10,510,330,5)) then
break;
until(false)
mouse(549,18,12,14,true);
setangle(true);
end;

procedure gaatilstol;
var
stol,stol2,x,y:integer;
begin
mousespeed:=(10+random(35));
stol := DTMFromString('mAAEAAHic42FgYChmYmDIAuJMJgi7AorrgLgGiMuAuACIK4G4CIitgXpMgNgSiO2B2JEBIgbimwKxMZTWg+KIQHeGmFAvhsRIXzBOjQ0Ei4HYMBpZnhWohxTMSCJGBgAzJxR5');
stol2 := DTMFromString('mFQEAAHic42VgYChiYmDIBuIsKF0GxJVAXA/E1UBcAsR5aGxroD5TILYEYjsgdmCAiFkBsRkUg+QNoFgfiGPCXRgSot0ZUuO9GPIzg8A0jA+SA4nB+CCcmezHwA/URypmJAOjAAD4WBdG');
repeat
wait(1000);
if(finddtm(stol2,x,y,545,1,703, 163)) then
break;
until(false);
mouse(x,y,1,1,true);
while isMoving() do wait(100);
wait(2500);
end;

procedure lagstoler;
var
stolplass,ferdigstol,x,y,x2,y2,really,brug:integer;bord:variant;plank:TInvItem;brugb:boolean;
begin
stolplass := BitmapFromString(22, 23, 'meJy11FtP6lAQhuH/Hy8wO1qPgA' +
'hUDqUULD1YoKK0FDTxsPH/7BdHR7cF5cbkSUNK52PWWlMKRqnwO8o' +
'16/Ssgf2jitiysN7sqbOaheOSqXb3TsWm8pbtNzuDhuUKySlX2+qt' +
'mb2TteW9wdjuR2h3A6KE2epXG46ijYOTKtYmuMEEJHScUJGmLaF03' +
'lJfynlY9g189sMJvGCl2wvRslyz4aBYNmEclv8YReP4HJRbTtDzxl' +
'zR9+K+OxyOU1zf3CGeLHA1SsMowcB/y2SBRHGlt0v/mtpBMBE8P18' +
'sk/QhWywxv3+Z3a2uYhRnaqdgyPLZfzbHu7oRSfb4YfaE2+Rhmj7S' +
'TzRORTBMLuih0vy8FV40FfLTr/4KygVradoe1p4FsX409f9LWM7mz' +
'2n2rOWssW17VdPedKCEYHH/Avl1EkAtZI2cFAmHxVq+nIEJRzMJEb' +
'ouHTYhs5FPkBGK4kzIigRnLTgyGc61DXAo+uRqY9+PBqsh8WLeMkZ' +
'U5BMcd8STm75VupB8A7TK/U0dqu7lUF7YL/eZScFL8f2/BwkXbRf5' +
'BlCpd378/yEhP1Esn8PCUbG+TQLY0s839YX6sVwTmKhtHt7ePz6h32Q=');
ferdigstol := DTMFromString('mWAAAAHicY2FgYFBjZGBQAmJ1INYC4nVAsaVQvAKIfewlGNytxRiczEUZvGzFGUSAYsiYEQ2DAABLBQX9');
really := BitmapFromString(36, 13, 'meJy1VEEKgDAM29P9iAfx4N4hgn' +
'gWBPEzFsrCXNttwgZlxNolNK06N7hv+OOpj3m/GeBiwoAC9e1fuRo' +
'tOhl00gK/pSWFVG9lMtYiWhTEGGXqsCy2TJL5ATjiZLGpYmtgTiTG' +
'AJbt4jIClJnWk+/K7ZIqmb6SrmNONJixqN5YSyszetVG1VhJaFH1D' +
'hiYfNRtA+vRVUuuuhc/q4ZCPowVj3S+6TSBUQ==');
brug := BitmapFromString(73, 22, 'meJy1ltFtwzAMRL1Jdqjz28JfRb' +
'Nhh8pOqYpDDucjRcuOYwgBo1CknniUc/l9XJ7j4/N7/vo5d1yX/zH' +
'oZuPYKq5tRNPzafY7uEb2uReq5sIAGpzVPh1tnM7mm5YwdnEBjaMt' +
'ARpsLSId+DXaGsc20CbxGZdYCkMj1zE0FaTyGqkqNta6pWYoutkBN' +
'oMBo2EpFO2AGolmNjdpIGawuIpGw9AQ0LqgMM7qtRSN2ijQ+Jm6pV' +
'liogLtwKWd9hoEYzuxXtNSRt0OokXNa0DOpF02Tjcvt0kepjY07MG' +
'kwlU6o4ayGBpmYsCItpdrXl+2tWgPBB/vCJZMxd+7GIssOdpyG9zA' +
'u+ko0b1oadLH/c5RpG6/Htj2pgOSmsKVC2i97DYIwq9smR4d3SzLZ' +
'jk2B8PO0lwY7SdF670R7PAJoquYaBONWUZ2Po5mxcJPNZpJmj7wN0' +
'ESTSVqaGnhoqR5dHYI6ql7xryi4WtUWjxVkyUwU0ESk71gVbPCmb8' +
't0RcBPXGGGrZRIIJWzZLaDiMaubhKz7AwUm30/NNzNs1bWNWhFdTi' +
'X9cvysg1iNbrNT0r8y/qG9Ei0QhavA2US2Xc67VIlF7F5h8Poeg1a' +
'y6dKVQR0XRg4SSP+nPG7h+zdXKSv2c9NI0Mm1cH5vVNHeVXCHJaP+' +
'mdnFZ87yjQLLJd+/oPZNf2LMjg2kjX+yNEpak467A9rhfR/gBD+lw/');
//ferdigstolgammel := DTMFromString('mQwAAAHicY2ZgYFBjZGBQBmItIF4L5C+DYm9bMQYPazEGF3MRBiYgH4YZkTAQAAC2yARC');
writeln('Commencing chairmaking');
repeat
wait(1000);
brugb:=false;
if not (R_ItemExists(960,plank)) then break;
repeat
if(findbitmaptolerancein(stolplass,x,y,10,10,510,330,80)) then
begin
mousespeed:=(10+random(35));
mouse(x+11,y+11,0,0,false);
mousespeed:=(10+random(35));
mouse(x+11,y+70,-60,0,true);
wait(100);
while isMoving() do wait(100);
wait(100+random(50));
end;
wait(500+random(50));
if(findbitmaptolerancein(brug,x,y,136, 53,224, 87,3)) then
brugb:=true;
if(findcolortolerance(x2,y2,3358280,228, 243,471, 315,1)) and (brugb = true) then
begin
mousespeed:=(10+random(35));
mouse(470,35,5,5,true);
brugb:=false;
mousespeed:=(10+random(35));
mmouse(291,170,16,16);
end;
wait(100+random(50));
if(findcolortolerance(x,y,3358280,228, 243,471, 315,1)) and (brugb = false) then
break;
until(false)
wait(400+random(100));
mousespeed:=(10+random(35));
mouse(108,65,6,14,true);
repeat
wait(500);
if(getanimation = 3676) then break;
until(false)
repeat
wait(500);
if(getanimation = -1) then break;
wait(500+random(50));
until(false)
repeat
if(finddtm(ferdigstol,x,y,216, 103,348, 234)) then
begin
mouse(x,y,0,0,false);
mousespeed:=(10+random(35));
mouse(x,y+76,-44,0,true);
while isMoving() do wait(100);
repeat
if(findbitmaptolerancein(really,x,y,195, 356,247, 381,10)) then
begin
wait(50);
break;
end;
until(false)
mousespeed:=(10+random(35));
mouse(256,403,12,2,true);
break;
end;
wait(500+random(500));
until(false)
until(false)
writeln('Done making chairs, repeating.');
end;

//Credit to dgby714 for helping me tune the price part.
function GetPrice(ItemID: integer): integer;
var
Letter: string;
begin
Letter := Trim(Between('<b>Current guide price:</b> ', #10'<br><br>', GetPage('http://services.runescape.com/m=itemdb_rs/viewitem.ws?obj=' + IntToStr(ItemID))));
Result := 1;
if (ExtractFromStr(Letter, Letters) <> '') then
begin
case (ExtractFromStr(Letter, Letters)) of
'k': Result := 1000;
'm': Result := 1000000;
'b': Result := 1000000000;
else
Exit;
end;
SetLength(Letter, Length(Letter) - 1);
end;
Result := Ceil(Result * StrToFloatDef(Letter, 0));
end;

procedure report;
var
timer:longint;ts,tm,th:integer;
begin
timer:=GetTimeRunning;converttime(timer,th,tm,ts);
cleardebug;
WriteLn('&Logg&');
writeln('Script has runned for:['+inttostr(th)+' Hours '+inttostr(tm)+' Minutes '+inttostr(ts)+' Seconds. ');
writeln('planks used ['+inttostr(planks)+'] plank costs ['+inttostr(plankcosts)+']');
writeln('teleports used ['+inttostr(teleports)+'] teleport costs ['+inttostr(teleportcosts)+']');
Writeln('Construction xp earned [' +inttostr(constructionxp)+']');
stats_IncVariable('Construction EXP (Gained)', constructionxp);
Stats_Commit;
end;

procedure report2;
begin
incex(planksused,24);
inc(teleportsused);
incex(countert,24);
incex(counterp,1);
planks:=countert;
plankcosts:=(GetPrice(960) * planksused);
teleports:=counterp+1;
teleportcosts:=(GetPrice(8013) * teleportsused);
incex(constructionxp,792);
end;


begin
startsmart;
startstats;
DeclarePlayers;
instillkameravinkel;
repeat
wait(1000);
LoginPlayer;
until(loggedin)
repeat
report
teletodeamonhein
walk2deamonbank
apnebank
tautplanker
movingtohouse
gaatilstol
lagstoler;
report2
until(false)
end.

TravisV10

2011-06-11 14:01:20

hey, I don't code for SRL anymore, so I probably won't vote, but aren't your standards a little off?

i luffs yeww

2011-06-11 14:23:07

Yes, they are off. :p

Just for anyone who cares, tom is in #srl a lot getting help and learning constantly. Asking how and why things work, etc. He's definitely not someone who will just get a yes or a no and quit, from what I can tell. So be constructive if you can when you vote and post.

Not voting yet, but from a click scroll through it didn't look like anything too advanced.

Shuttleu

2011-06-11 16:00:15

i see after showing you correct standards, you still haven't seemed to implement them -_-' (look in my sig if you need reminding)

you dont seem to use SRL's tab function for switching to the equipment tab, you can use ChooseOption to select the teleport option and i would suggest adding waits between the clickings in the first procedure

why have a LoginPlayer after the WalkPath?

more wait issues and no ChooseOption in apnebank

for tautplanker use TypeSend, much safer than SendKeys

and again more With issues and ChooseOption issues

same for the next procedure

in lagstoler the BMP's are way too large
it is also a very large procedure and i would suggest, as i have before, to split it up into several smaller ones
and more choose option and wait issues

you also seem to be missing several semi-colons from the main loop


sorry but its a no from me

~shut

Rich

2011-06-11 16:40:05

Sorry, it's a no from me.

You have very few failsafes. An example of this is walk2daemonbank, and the lack of if not LoggedIn then Exit;.
Also, I can see a few loops which could be infinite. In apnebank you repeat until a colour is found. However, if the colour isn't found, it will just sit there.
There is a possibility of MouseSpeed being 45. If I'm not mistaken, that is scarily quick?
A final thing as well as the points Shut raised is the use of co-ords. I'm not sure how construction works, but generally a good idea would be to use a small bitmap, or at least an uptext check (which I just checked isn't being used in your procedure which teleports to Daemonheim).

Sorry,
Richard.

tom99

2011-06-11 16:46:37

Yes i can see this application is going all downhill but i would like to point out that this
bmp is not easy to reduce. if you see the background of the chair you understand.
why have loginplayer afterwalkpath? just in case network timeout at that point.

Markus

2011-06-11 16:49:17

Sorry, but a no again for the same reasons as above.

cycrosism

2011-06-11 19:35:21

Not enough failsafes and I don't think I saw any TPA's in there, and there is no multiplayer either :(

Holding my vote for now

Smarter Child

2011-06-12 15:33:48

No, for the reasons above.

It is mainly your fail safes that need to be worked on:

Example:

repeat
if(findcolortolerance(xt,yt,3358280,137, 53,344, 77,1)) then
break;
wait(1000);
until(false)

You are repeating the find color over and over, but what if the script does not find the color? I would put something like..


// MarkTime(t);
repeat
if(findcolortolerance(xt,yt,3358280,137, 53,344, 77,1)) then
break;
wait(1000);
until(false); { and then over here you could implement until(TimeFromMark etc. }

Also, try to fix your standards, it is not actually a requirement for SRL membership, however it makes your script look more clean and advanced, and that's never a bad thing ;)