SRL Archive - Archive

ShadowSeeker - SRL Member Application


ShadowSeeker

2010-01-12 04:55:38

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?
C++, Java, Scar, and a bit of PHP.


Are you a member of any other communities?
Rsnl ( dutch runescape community )


Tell us about yourself…
From: ShadowSeeker
Well i'm Jeroen Maljers, a 17 years-old boy from the netherlands.

I live in a pretty boring little village, actually, it's EXTREMELY boring, lol. Anyways, that is one of the reasons my interests went into the digital stuff :P.

I have a pretty normal life, i go to school, live with my parents, i have a pet-dog etc. Need to know more? just ask!.



Please show us one (or multiple) of your scripts.
program New;
{.include SRL/SRL.Scar}
var x,y,mining,smithing: integer;

const
debugs = true;

procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := '-'; //username
Players[0].Pass := '-'; //password
Players[0].Nick := '-'; //3-4 letters from your username
Players[0].pin := '-'; // Bank pin if any
Players[0].Booleans[0] := False; // Just mine when true, false causes just smithing
Players[0].Booleans[1] := False; // Causes mining and smithing when set to true -- both set to false = JUST smith
Players[0].Booleans[1] := False; // Get 'rare' ores, silver + gold. I advise false. (Since gold etc has long respawn)
Players[0].Strings[0] := 'steel'; // Which ore to smelt, if starting from bank. Auto to smith when walking back
Players[0].Strings[1] := 'auto'; // Ores needed, auto for picking best
Players[0].Strings[2] := 'auto'; // don't touch >.<! (Secondary ore)
Players[0].Integers[0] := 0; // don't touch >.<! (Number of first ore)
Players[0].Integers[1] := 0; // don't touch >.<! (Number of Second ore)
Players[0].loc := 'bank';
Players[0].Active := true;

end;


function sWait(number : integer): boolean;
var i,k,j,l: integer;
begin
j :=(number + 10);
k:=random(3) + 1; // if random = 0 / 0 = fail, so + 1.
l:=random(4) + 1;
for i:=1 to k do
j := j + (j / l);
wait(j);
end;

procedure debug(text: String);
begin
if(debugs = true) then
Writeln(text);
end;


function smeltwindow : boolean;
var i : integer;
begin
if not LoggedIn then exit;
for i:=0 to 10 do
begin
sWait(5);
if(findtext(x,y,'smelt',npcchars,305,355,380,395)) then
begin
debug('Smelting screen');
result:=true;
exit;
end;
sWait(100);
end;
end;

function FailSafeFurnace : boolean;
begin
if not(loggedIn)then exit;
if(findsymbol(x,y,'furnace')) then
if distance(mmcx, mmcy, x, y) >= 10 then
begin
debug('Reclicking furnace');
mouse(x,y,5,5,true);
end;
//if(FindObjEx(x,y,['urna','nace'],['2631724','2434344','2960946','2895152'],10,300,200,1,MSX1,MSY1,MSX2,MSY2)) then
if findcolortolerance(x,y,2565930,MSX1,MSY1,MSX2,MSY2,10)then
begin
GetMousePos(x,y);
Mouse(x,y,3,3,true);
wait(300+random(300));
if(smeltwindow) then
begin
result:=true;
exit;
end;
end;
end;

function findfurnace : boolean;
var
points: TPointArray;
i,k: integer;
R: T2DPointArray;
begin
if not LoggedIn then exit;
FindColorsTolerance(points,3421241,MSX1,MSY1,MSX2,MSY2,25);
if length(points) = 0 then
FindColorsTolerance(points,2236965,10,10,508,325,10);
r := TPAtoATPAEx(points, 10, 10);
k:=High(points);
for I:=0 to k do
begin
if not LoggedIn then exit;
if (smeltwindow) then exit;
sWait(30);
MiddleTPAEx(r[i], x, y);
MMouse(x,x,10,10);
if (pos('urnace', rs_GetUpText) > 0) then
begin
sWait(10);
GetMousePos(x,y);
mouse(x,y,5,5,true);
result := True;
exit;
end;
findnormalrandoms;
if(not(result)) then // failsafe kai
repeat
k:=k+1;
if(failsafefurnace) then
result:=true;
until(result) or (k > 5);
end;
debug('Furnace finding failed');
// Switch players
end;

function FindOres(OreColour : string;var tx,ty:integer;x1,y1,x2,y2:integer):boolean;
var
RockDTM,oreColor:integer;
MainP: TDTMPointDef;
SubP: Array [0..6] of TDTMPointDef;
TempDTM: TDTM;
begin
case lowercase(oreColour) of
'tin': oreColor:=10457746;
'copper': oreColor:=2714831;
'iron': oreColor:=1712956;
'coal': oreColor:=2702653;
'silver': oreColor:=11983351;
'gold': oreColor:=1814411;
'mithril': oreColor:=6438976;
'adamant': oreColor:=36882472;
end;

MainP.x := 580;
MainP.y := 502;
MainP.AreaSize := 0;
MainP.AreaShape := 0;
MainP.Color := oreColor;
MainP.Tolerance := 20;

SubP[0].x := 580;
SubP[0].y := 502;
SubP[0].AreaSize := 0;
SubP[0].AreaShape := 0;
SubP[0].Color := 3372236;
SubP[0].Tolerance := 20;

SubP[1].x := 575;
SubP[1].y := 517;
SubP[1].AreaSize := 0;
SubP[1].AreaShape := 0;
SubP[1].Color := 65536;
SubP[1].Tolerance := 0;

SubP[2].x := 594;
SubP[2].y := 499;
SubP[2].AreaSize := 0;
SubP[2].AreaShape := 0;
SubP[2].Color := 65536;
SubP[2].Tolerance := 0;

SubP[3].x := 583;
SubP[3].y := 491;
SubP[3].AreaSize := 0;
SubP[3].AreaShape := 0;
SubP[3].Color := 65536;
SubP[3].Tolerance := 0;

SubP[4].x := 565;
SubP[4].y := 500;
SubP[4].AreaSize := 0;
SubP[4].AreaShape := 0;
SubP[4].Color := 65536;
SubP[4].Tolerance := 0;

SubP[5].x := 564;
SubP[5].y := 512;
SubP[5].AreaSize := 0;
SubP[5].AreaShape := 0;
SubP[5].Color := 65536;
SubP[5].Tolerance := 0;

SubP[6].x := 589;
SubP[6].y := 511;
SubP[6].AreaSize := 0;
SubP[6].AreaShape := 0;
SubP[6].Color := 65536;
SubP[6].Tolerance := 0;

TempDTM.MainPoint := MainP;
TempDTM.SubPoints := SubP;
RockDTM := AddDtm(TempDtm);

result := findDTM(RockDTM, tx, ty, x1, y1, x2, y2);

freedtm(RockDTM);

end;

function NumberOfOres(FirstOre, SecondOre, BarType:string; AmountOne,AmountTwo: integer) : boolean;
begin
// set first ores
Players[CurrentPlayer].Strings[1] := FirstOre;
Players[CurrentPlayer].Strings[2] := SecondOre;
//Set amount of each ore =x
Players[CurrentPlayer].Integers[0] := AmountOne;
Players[CurrentPlayer].Integers[1] := AmountTwo;
//TheBar we're making o.o
Players[CurrentPlayer].Strings[0] := BarType;
debug('Using bar : ' + BarType);
end;

function getstats : boolean;
begin
gametab(2);
mining:= GetSkillLevel('mining');
smithing:= GetSkillLevel('smithing');
end;

function OresTomine : boolean; // If this can be made smaller, PLEASE tell :)
begin
if(Players[currentplayer].Strings[1] = 'auto') then // Lol i assume this will work =x
begin
debug('deciding ores');
if (GetSkillLevel('mining') >= 70) then
if (GetSkillLevel('smithing') >= 70) then
begin;
NumberOfOres('adamantite','coal','adamantite',4,24);
exit;
end;
if (inrange(GetSkillLevel('mining'), 55, 99)) then
if (GetSkillLevel('smithing') > 50) then
begin;
NumberOfOres('mithril','coal','mithril',5,23);
exit;
end;
if (GetSkillLevel('mining') >= 40) then
if (GetSkillLevel('smithing') >= 40) then
if(Players[0].Booleans[1] = True) then //Rare golds -.-
begin;
NumberOfOres('gold','','gold',28,0);
exit;
end;
if (GetSkillLevel('mining') >= 20) then
if (GetSkillLevel('smithing') >= 20) then
if(Players[0].Booleans[1] = True) then //Rare golds -.-
begin;
NumberOfOres('silver','','silver',28,0);
exit;
end;
if (GetSkillLevel('mining') >= 30) then
if (GetSkillLevel('smithing') >= 30) then
begin;
NumberOfOres('iron','coal','steel',28,0);
exit;
end;
if (GetSkillLevel('mining') >= 15) then
if (GetSkillLevel('smithing') >= 15) then
begin;
NumberOfOres('iron','','iron',28,0);
exit;
end;
if (GetSkillLevel('mining') < 15) then //Redundant?
begin
NumberOfOres('copper','tin','bronze', 28,0);
exit;
end;
end;
end;

function GetBarSmeltPos : Boolean;
var
tx,ty : integer;
begin
if not LoggedIn then exit;
ty := 405+random(5);
if (smeltwindow) then
begin
case LowerCase(Players[CurrentPlayer].Strings[0]) of
'bronze': tx:=1;
'iron': tx:=3;
'silver': tx:=4;
'steel': tx:=5;
'gold': tx:=6;
'mithril': tx:=7;
'adamant': tx:=8;
'rune': tx:=9;
end;
tx := tx + (50 * tx);
debug(inttostr(tx));
mouse(tx,ty,10,10,false);
result := true;
end;
end;


function SmeltRandom : boolean;
begin
if chooseOption('X') then
begin
if(findtext(x,y,'mount',upchars,240,380,320,420)) then
begin
debug('Amount screen found');
sWait(20);
typesend(inttostr(28+random(71)));
sWait(10);
result:=true;
end;
end;
end;

function SelectBar : boolean;
var tx :integer;
begin
if not LoggedIn then exit;
if (smeltwindow) then
if(Players[currentplayer].Strings[1] = 'auto') then
OresToMine; // Bad? :S
if(GetBarSmeltPos) then
begin
sWait(20);
if(smeltwindow) then
if(Players[currentplayer].Strings[0] = 'steel') or (Players[currentplayer].Strings[0] = 'bronze') then
if(SmeltRandom) then
begin
result:=true;
exit;
end else
if chooseOption('all') then
begin
result:=true;
exit;
end;
result:=false;
end;
end;


procedure progress;
begin
writeln('using character: ' + Players[CurrentPlayer].Nick + '. Mining: ' + inttostr(mining) + '. Smithing ' +
inttostr(smithing) + '.');
writeln('Smelting : ' + Players[CurrentPlayer].Strings[0]);
end;

function WithDrawWhichOres : boolean;
begin
if not loggedin then exit;
if(Players[0].Strings[1] = 'steel') then
NumberOfOres('iron','coal','steel',9,18);
if(Players[0].Strings[1] = 'bronze') then
NumberOfOres('copper','tin','bronze',28,0);
if(Players[0].Strings[1] = 'mithril') then
NumberOfOres('mithril','coal','mithril',4,20);
if(Players[0].Strings[1] = 'adamant') then
NumberOfOres('adamantite','coal','adamant',4,24);
end;

function LoopAwkwardOre : boolean;
var tx,ty,i,k: integer;
begin
for i:=0 to 1 do
if(findOres(Players[CurrentPlayer].Strings[i],tx,ty,MSX2,MSY1,MSX2,MSY2)) then
mouse(tx,tx,10,10,false);
if chooseOption('X') then
begin
for i:=k to 10 do
if(findtext(x,y,'mount',upchars,240,380,320,420)) then
begin
debug('Amount screen found');
sWait(20);
typesend(inttostr(Players[CurrentPlayer].Integers[i]));
sWait(10);
result:=true;
end;
end;
end;


function AwkwardOre : boolean;
begin
if not loggedin then exit;


end;

Function GetOres : boolean;
begin
if(Players[CurrentPlayer].Integers[0] <> 28) then
if(AwkwardOre) then
begin
result:=true;
debug('Awkward ores taken out :)');
exit;
end else
if findOres(Players[CurrentPlayer].Strings[1],tx,ty,MSX2,MSY1,MSX2,MSY2) then
mouse(tx,tx,10,10,false);
if chooseOption('all') then
begin
if(findtext(x,y,'mount',upchars,240,380,320,420)) then
begin
debug('Amount screen found');
sWait(20);
typesend(inttostr());
sWait(10);
result:=true;
end;
end;
end;
end;



begin
setupsrl;
declareplayers;
activateclient;
getstats;
progress;
if (FindFurnace) then
if(selectbar) then
swait(3000);
end.

YoHoJo

2010-01-12 05:11:02

Hmm, your using the old black outline color "65536" for your DDTMs instead of the new one.
How old is this script, just wondering =D

Anyways script shows a use of a lot of things I like, but no multiplayer support, your main loop doesnt seem very complete at all actually:
begin
setupsrl;
declareplayers;
activateclient;
getstats;
progress;
if (FindFurnace) then
if(selectbar) then
swait(3000);
end.

doesn't even seem to repeat itself?

ShadowSeeker

2010-01-12 05:14:34

This was the only succesfull script i made, it's approx a year old i think.

I had quite a big break from any scripting stuff, i have another script i made, which is also quite old.. It's ment for bolt enchanting. But i thought i could give it a try with an old script to atleast show my capabilitys?

:P

MasterKill

2010-01-12 05:33:02

You have made a good start tough. Try to make it multi player and let it repeat itself so you could leave your pc for a couple of hours.

To become SRL member you would have to show us you understand SRL's basics, and how to make a script with those. Good that you want to show what your capable of, but It's not good enough "yet" to become SRL Member in my opinion.

no for now.

YoHoJo

2010-01-12 05:36:24

Yeah, I agree you have got the hand of a lot of the required stuff it takes, but you still have more to learn. Why not take a look at the intermediate and advanced scripting tutorial section here ( http://www.villavu.com/forum/forumdisplay.php?f=191 ) (since its obvious you know most of the basics, which is good), and maybe learn how to use a few more techniques. I say you are close, and have what it takes, but still need some work at it. :D

Naum

2010-01-12 05:40:47

Many SRL Members would like to see your recent scripting skills, to show that you're up to speed with all recent scripting. And that you can still script.
The script looks pretty good, even though it may be a year or so old :).

You could look at Smithing.Scar a bit more, as most of the procedures and functions in there can be used/replaced in your script by them. My only other main concern, as mhera bayta ;) YoHoJo rightly pointed out, is multi-player.

Judging by your script; I'm 100% sure that if you can remind and refresh yourself then apply, you'll be getting my vote no problem.
Although you've been around for quite a bit of time your post count, although not really mattering, might express some concern among members.

However, I shall be holding my vote until I can hear other members cite their views. :)

Raskolnikov

2010-01-12 20:14:58

^ Alot of what he said and more:

This is a fairly good script, and I think it defenatly qualifies for members, just make sure you keep it updated to today's standards (check my tutorial for standards)

However, an issue I have is your lack of posts. Become an active member of the community, and I am sure many will vote you in.

Good luck, and I am on the edge right now, leaning to a yes.