SRL Archive - Archive

joery - SRL Member Application Form


joery

2008-11-06 20:55:18

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

What is the meaning to life?


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


Programming Knowledge
Java, Javascript, html, a little of php.

Other Communitys
sythe,moparisthebest,moparscape,runeserver,rscheata,rsr,rsc,luna

How Long have You Played Runescape
5years.

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

My name is Joery.
I'm 17years old. (becomming 18 on novembre 22th)
I live in Belgium and speak dutch.
My Hobby's are Playing RuneScape.
Scripting anything I like. (Mainly Java)
I've been on this forum since 2006.
I've been inactive for a long time becouse i had given up macroing.
But now since i wanted 99FireMaking I Started scripting again.
First just a simple Script wich would just burn the logs and then I would need to walk to to bank again and withraw logs etc.
(It just burned the logs cuz that was the part i didnd like about firemaking.)
After i got 99FireMaking i made a crafting script.
(It broke long time ago, fixing it now.)
Well, I think this text is getting a bit to long for a paragraph so I am going to stop typing.
Thats it.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

Please note that this script is not ready to be used.
It dous not have any antiradom features.
And still needs more failsafes if you want to run it overnight.


{//Created by Joery
FireMaker By Joery V0.1
}
//For Script setup look at the ScriptSetup procedure. (Line 29)
{
UPDATES:
1) Added Scriptsetup.
2) Added Banking procedures.
3) Added Burning procedures.
4) Added Waling procedures.
5) Added the whole firemaking procedure. (Named it FireMakerByJoery)
6) Created mainloop.
}

{
TODO:
1) Add failsafes to the burning process.
2) Add backup walks to the walking process.
3) Make the script multiplayer.
4) Make progress report.
5) Make script work with SRL Stats.
6) Add Antiban and Antirandoms.
}

{
Use the script in a not to crowded world.
The script will most likeliky fail when walking.
will be adding backup walks in my next version.
}

/////////////////////////////////////////////////////////////////
// Start this script in varrock west bank. //
// Have TinderBox in inventory and have logs visible in bank. //
// Setup player info on line 55, 56, 57 and 58. //
// Use a world wich hasnt got allot people in varrock. //
// Member worlds would be perfect since there empty in varrock //
/////////////////////////////////////////////////////////////////


program FireMaker_By_Joery;
{.include SRL/SRL.scar}

var
x, y: integer;
Bank, Normal, Oak, Willow, Tinder, Maple: integer;

const
NumOfPlayers = 1;
StartPlayer = 0;

procedure ScriptSetup; //This is the setup process. (loads dtm's, defines users, etc.)
begin
NumberOfPlayers(NumOfPlayers);
CurrentPlayer := StartPlayer;
Players[0].Name := 'USERNAME'; // Insert username here.
Players[0].Pass := 'PASSWORD'; // Insert password here.
Players[0].Nick := 'NICK'; //Put your nick here. (If your name is Joery, your nick should be "oery".)
Players[0].Strings[1] := 'normal'; //normal, oak, willow or maple.
Players[0].Active := True;

Normal := DTMFromString('78DA6374606660B0646440064DA976601A26C' +
'AE80954E340408D33508D0B0135FE40358E44D86541408D2D508D397' +
'E35005F740A11');
Oak := DTMFromString('78DA63746666608867644006130A5CC0344C9' +
'4D115A82683801A6FA09A64026AEC806A6208A8F120428D23504D360' +
'135FE4035A9F8D50000DD8B0DA2');
Willow := DTMFromString('78DA637464666058C6C8800CA28394C0344C9' +
'4D10FA8662D0135DE4035EB08A87107AA594F408D0750CD52026A9C8' +
'06A361150630754B304BF1A0071640C68');
Maple := DTMFromString('78DA6374656660E861644006F9BE7C601A26C' +
'AE80654D345408D3D504D0301359E4035ED04D47800D5D41350E30F5' +
'4D3895F0D004FFB09B0');
Tinder := DTMFromString('78DA63CC6566608862644006556585601A26C' +
'A580E549340404D0A504D320135E944D85508549346404D1A504D160' +
'13559403539F8D50000D00E0F75');
end;

procedure BankNormals; //Procedure for takig Normal logs from bank
begin
if FindDtm(Normal, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Normal Logs, Taking them now!')
Mouse(X, Y, 3, 3, False);
wait(250 +random (250));
chooseoption('All');
closebank;
Bank := 0;
end else
begin
Writeln('Could not find any more Normal logs.');
Wait(10);
Writeln('Closing Bank.');
closebank;
end;
end;

procedure BankOaks; //Procedure for takig Oak logs from bank
begin
if FindDtm(Oak, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Oak Logs, Taking them now!')
Mouse(X, Y, 3, 3, False);
wait(250 +random (250));
chooseoption('All');
closebank;
Bank := 0;
end else
begin
Writeln('Could not find any more Oak logs.');
Wait(10);
Writeln('Closing Bank.');
closebank;
end;
end;

procedure BankWillows; //Procedure for takig Willow logs from bank
begin
if FindDtm(Willow, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Willow Logs, Taking them now!')
Mouse(X, Y, 3, 3, False);
wait(250 +random (250));
chooseoption('All');
closebank;
Bank := 0;
end else
begin
Writeln('Could not find any more Willow logs.');
Wait(10);
Writeln('Closing Bank.');

closebank;
end;
end;

procedure BankMaples; //Procedure for takig Maple logs from bank
begin
if FindDtm(Maple, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Maple Logs, Taking them now!')
Mouse(X, Y, 3, 3, False);
wait(250 +random (250));
chooseoption('All');
closebank;
Bank := 0;
end else
begin
Writeln('Could not find any more Maple logs.');
Wait(10);
Writeln('Closing Bank.');
closebank;
end;
end;

procedure BankTinder; //This procedure was mainly here to test if the dtm for tinderbox was working.
begin
if FindDtm(Tinder, x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Tinder Box, Taking out of bank now.')
Mouse(X, Y, 3, 3, False);
wait(250 +random (250));
chooseoption('All');
closebank;
Bank := 0;
end else
begin
Writeln('Could not find Tinder Box.');
Wait(10);
Writeln('Closing Bank.');
closebank;
end;
end;

procedure Banking; //This is the banking process.
begin
if not (LoggedIn) then exit;
Writeln('Starting Procedure: Banking');
Wait(10);
Writeln('Trying to open bank.');
Wait(10);
repeat
OpenBankFast('vwb');
inc(Bank)
Wait(10 + random(10));
until ((bankscreen) or (Bank = 5));
if (bankScreen) then
begin
Writeln('Bank is now open.');
Wait(10);
Writeln('Banking prodedure has finished.');
Wait(10);
Writeln('Now taking logs form bank.');
case Lowercase(Players[currentplayer].strings[1]) of
'normal': BankNormals;
'oak': BankOaks;
'willow': BankWillows;
'maple': BankMaples;
end;
end;
if (Bank = 5) then
begin
Writeln('Having trouble finding bank, Logging out.');
Wait(10);
Writeln('Banking has failed.');
Wait(500);
logout;
end;
end;

Procedure BurnNormal;
begin
repeat
if FindDTM(Tinder, x, y, MIx1, MIy1, MIx2, MIy2) then
begin
Wait(1000 + random(350));
mouse(x, y, 3, 3, true);
wait(250 + random(125));
if FindDTM(Normal, x, y, MIx1, MIy1, MIx2, MIy2) then
mouse(x, y, 3, 3, true);
wait(250 + random(125));
end;
until not FindDTM(Maple, x, y, MIx1, MIy1, MIx2, MIy2);
end;

Procedure BurnOak;
begin
repeat
if FindDTM(Tinder, x, y, MIx1, MIy1, MIx2, MIy2) then
begin
Wait(1000 + random(350));
mouse(x, y, 3, 3, true);
wait(250 + random(125));
if FindDTM(Oak, x, y, MIx1, MIy1, MIx2, MIy2) then
mouse(x, y, 3, 3, true);
wait(250 + random(125));
end;
until not FindDTM(Maple, x, y, MIx1, MIy1, MIx2, MIy2);
end;

Procedure BurnWillow;
begin
repeat
if FindDTM(Tinder, x, y, MIx1, MIy1, MIx2, MIy2) then
begin
Wait(1000 + random(350));
mouse(x, y, 3, 3, true);
wait(250 + random(125));
if FindDTM(Willow, x, y, MIx1, MIy1, MIx2, MIy2) then
mouse(x, y, 3, 3, true);
wait(250 + random(125));
end;
until not FindDTM(Maple, x, y, MIx1, MIy1, MIx2, MIy2);
end;

Procedure BurnMaple;
begin
repeat
if FindDTM(Tinder, x, y, MIx1, MIy1, MIx2, MIy2) then
begin
Wait(1000 + random(350));
mouse(x, y, 3, 3, true);
wait(250 + random(125));
if FindDTM(Maple, x, y, MIx1, MIy1, MIx2, MIy2) then
mouse(x, y, 3, 3, true);
wait(250 + random(125));
end;
until not FindDTM(Maple, x, y, MIx1, MIy1, MIx2, MIy2);
end;

procedure BurnLogs;
begin
if not (LoggedIn) then exit;
case Lowercase(Players[currentplayer].strings[1]) of
'normal': BurnNormal;
'oak': BurnOak;
'willow': BurnWillow;
'maple': BurnMaple;
end;
end;

function DTMWalks(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..5] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1: begin ///Walk out of bank.
dtmMainPoint.x := 640;
dtmMainPoint.y := 109;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7961986;
dtmMainPoint.Tolerance := 15;

dtmSubPoints[0].x := 640;
dtmSubPoints[0].y := 109;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7961986;
dtmSubPoints[0].Tolerance := 15;

dtmSubPoints[1].x := 640;
dtmSubPoints[1].y := 112;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 4153709;
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 641;
dtmSubPoints[2].y := 102;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 4153709;
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 635;
dtmSubPoints[3].y := 104;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 4153709;
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 628;
dtmSubPoints[4].y := 111;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 4153709;
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 649;
dtmSubPoints[5].y := 109;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 4154733;
dtmSubPoints[5].Tolerance := 15;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
2: begin
dtmMainPoint.x := 672;
dtmMainPoint.y := 82;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7830400;
dtmMainPoint.Tolerance := 15;

dtmSubPoints[0].x := 672;
dtmSubPoints[0].y := 82;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7830400;
dtmSubPoints[0].Tolerance := 15;

dtmSubPoints[1].x := 683;
dtmSubPoints[1].y := 56;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 3561843;
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 664;
dtmSubPoints[2].y := 95;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 3561843;
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 687;
dtmSubPoints[3].y := 52;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 3561843;
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 662;
dtmSubPoints[4].y := 93;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 3561843;
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 683;
dtmSubPoints[5].y := 48;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 3561843;
dtmSubPoints[5].Tolerance := 15;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
3: begin
dtmMainPoint.x := 598;
dtmMainPoint.y := 60;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 4612985;
dtmMainPoint.Tolerance := 15;

dtmSubPoints[0].x := 598;
dtmSubPoints[0].y := 60;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 4612985;
dtmSubPoints[0].Tolerance := 15;

dtmSubPoints[1].x := 566;
dtmSubPoints[1].y := 68;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 15;

dtmSubPoints[2].x := 566;
dtmSubPoints[2].y := 57;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 15;

dtmSubPoints[3].x := 566;
dtmSubPoints[3].y := 48;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 15;

dtmSubPoints[4].x := 566;
dtmSubPoints[4].y := 41;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 195836;
dtmSubPoints[4].Tolerance := 15;

dtmSubPoints[5].x := 609;
dtmSubPoints[5].y := 61;
dtmSubPoints[5].AreaSize := 0;
dtmSubPoints[5].AreaShape := 0;
dtmSubPoints[5].Color := 195836;
dtmSubPoints[5].Tolerance := 15;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
end;

function WalkOutOfBank: Boolean;
var
WalkDTM: integer;
begin
WalkDTM := DTMWalks(1);
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Writeln('Walking out of bank.');
Wait(500);
FFlag(0);
Result := True;
Wait(500);
Writeln('Walked out of bank.');
end else
begin
Result := False;
FreeDTM(WalkDTM);
if not (Result) then
begin
Writeln('Walking has failed. Logging out');
Logout;
end;
end;
end;

function WalkToBurnSpot: Boolean;
var
WalkDTM: integer;
begin
WalkDTM := DTMWalks(2);
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Wait(500);
Writeln('Walking to burn spot.');
FFlag(0);
Result := True;
Wait(500);
Writeln('Walked to burn spot.');
end else
begin
Result := False;
FreeDTM(WalkDTM);
if not (Result) then
begin
Writeln('Walking has failed. Logging out');
Logout;
end;
end;
end;

function WalkToBank: Boolean;
var
WalkDTM: integer;
begin
WalkDTM := DTMWalks(3);
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Wait(500);
Writeln('Walking to bank.');
FFlag(0);
Result := True;
Wait(500);
Writeln('Walked to bank.');
end else
begin
Result := False;
FreeDTM(WalkDTM);
if not (Result) then
begin
Writeln('Walking has failed. Logging out');
Logout;
end;
end;
end;

procedure Walking;
begin
If not (loggedin) then exit;
WalkOutOfBank;
WalkToBurnSpot;
end;

procedure ToBank;
begin
If not (loggedin) then exit;
WalkToBank;
end;

procedure FireMakerByJoery;
begin
If not (loggedin) then exit;
setangle(true);
makecompass('n');
repeat
Banking;
Walking;
BurnLogs;
ToBank;
until not (LoggedIn);
end;

begin //Main loop
cleardebug;
setupsrl;
ActivateClient;
ScriptSetup;
Repeat
LoginPlayer;
FireMakerByJoery;
until (not LoggedIn);
end.

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

P1nky

2008-11-06 21:17:28

too simple

your almost there but not quite yet.

too simple procs. and i dont see any RRW/TPA's
and only repeated proc just diffrent names/DTMS.

so no
gl next time.

markuska815

2008-11-06 22:17:04

No… I agree with Joker just too simple…. need to show us more.

Blumblebee

2008-11-06 22:50:45

Your've very close, just make some of your procedure complex, as you seem to have DDTMs, and DTM's, but like thats the whole script :/

I think if you keep working in two weeks (or a month, depends) you'll be accepted :)

Good Luck,

-Blumblebee

boberman

2008-11-06 23:55:14

No, lots of repeated code that doesn't need to be. For example, BankNormals, BankMaples, Bank…Whatever… Is all the exact same procedure The only variation is the name and the DTM used. Rather then doing that do a BankThing(DTM); procedure.

As well, your script has a memory leak. You load the different log DTMs but you never free them. Always free memory.

Some of your functions are worthless, like
procedure ToBank;
begin
If not (loggedin) then exit;
WalkToBank;
end;
So, you are calling ToBank to check if you are logged in and then run the WalkToBank procedure… How about you delete this function all together and just call the WalkToBank function.

As well you have some redundant loops like
  Repeat
LoginPlayer;
FireMakerByJoery;
until (not LoggedIn);

  repeat
Banking;
Walking;
BurnLogs;
ToBank;
until not (LoggedIn);

So, you are calling FireMakerByJoery, which loops until you aren't logged in, then you are repeating that loop to call FireMakerByJoery if you aren't logged it… Well since FireMakerByJoery only ends when you aren't logged in, why have that loop at all?

Failsafes, anti-bans, and antirandoms are pretty much non-existant in this script. Ultimately when you dissolve everything it turns into some DTMs, and DDTMS, and about 3 functions that need to be there.

It needs to do more then that (and by do more I don't mean that starting a fire need to be more complex, rather something like go cut down trees, bank them, and then after enough wood is collected start making fires, that would be a member-worthy script)

Magiic

2008-11-07 11:20:42

no, sorry, it's too simple, but your close :)

0wn 4 skill

2008-11-07 11:30:37

function WalkOutOfBank: Boolean;
var
WalkDTM: integer;
begin
WalkDTM := DTMWalks(1);
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Writeln('Walking out of bank.');
Wait(500);
FFlag(0);
Result := True;
Wait(500);
Writeln('Walked out of bank.');
end else
begin
Result := False;
FreeDTM(WalkDTM);
if not (Result) then
begin
Writeln('Walking has failed. Logging out');
Logout;
end;
end;
end;

I think this causes a memory leak. Correct me if im wrong but… You only free the DTM if it fails to walk out the bank so you need to sort that out :p

function WalkOutOfBank: Boolean;
var
WalkDTM: integer;
begin
WalkDTM := DTMWalks(1);
if DTMRotated(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
begin
Mouse(X, Y, 8, 8, True);
Writeln('Walking out of bank.');
Wait(500);
FFlag(0);
Result := True;
Wait(500);
Writeln('Walked out of bank.');
end else
begin
Result := False;
FreeDTM(WalkDTM);
if not (Result) then
begin
Writeln('Walking has failed. Logging out');
Logout;
end;
end;
FreeDTM(WalkDTM);
end;

Like this ^

I personnaly think its good but you have alot of pointless functions. You could easily condense the withdrawal of logs into one function :D

Add some more failsafes too :)
DDTMs are good though. I like that :D

Goodluck next time :D You will probably get it next time…

Thankyou for taking the time to apply though :)

joery

2008-11-07 14:38:43

Thanks…

I guess i'll just reaply in a few weeks with a bether script.

Iroki

2008-11-07 14:59:24

Insted using 100 lines logs taking procedure you can use this:
procedure TakeLogs(Log: string); //Log name must be the same as DTM name
begin
if FindDtm(IntToStr(Log), x, y, MSX1, MSY1, MSX2, MSY2) then
begin
Writeln('Found Logs, Taking them now!')
Mouse(X, Y, 3, 3, False);
wait(250 +random (250));
chooseoption('All');
closebank;
Bank := 0;
end else
begin
Writeln('Could not find any more logs.');
Wait(10);
Writeln('Closing Bank.');
closebank;
end;
FreeDTM(IntToStr(Log)); //IMPORTANT!!
end;

Nava2

2008-11-08 18:50:38

Nope, you need to look into functions. :)

function Walk : Boolean;
begin
if not walkingstuffs then Result := false;
end;

Laur€ns

2008-11-09 05:51:22

Nop. But close call.