SRL Archive - Archive

Gillbz - SRL Member Application Form


Gillbz

2007-04-23 16:04:03

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

What is the meaning to life?


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


Programming Knowledge
Visual Basic

Other Communitys
Dingo-forums - recently changed to programming though

How Long have You Played Runescape
since rsc, i think about 3 years alough i forgot my user for it

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

I've only stated macroing with SCAR a year ago and with SRL about 3 months. I've only started to script with SRL about a month ago but have been scripting with scar for half a year. I have been a member of www.dingo-forums.com and promoted to an admin from a regular user, alough in the lase week / two weeks it has changed to a programming forum, the topic off RS2 cheating. The script I am posting a sample of is my powerminer, one of my first SRL scripts (about my third). I got the idea on how to find out the inv spot from Boreas and rewrote it so 5% credit to him. My script has anti-randoms and a form.

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

{=========================================================================]
[ Gillbz's Power Miner ]
[ ]
[ NAME : PMG ]
[ WRITER : Gillbz ]
[ CATEGORY : Mining ]
[ DESCRIPTION : Power miner ]
[ USAGE : Mining ore then dropping it ]
[ AUTOCOLOR : No ]
[ NOTES : Click the play button ]
[ CONTACT : [email]gilbz_jr@hotmail.co.uk[/email] ]
[ ]
[ ]
[=========================================================================]
[ Gillbz's power miner ]
[=========================================================================]
[ Instructions. ]
[=========================================================================]
[ 1. Set Playernames and Passwords in DeclarePlayers. ]
[ 2. Change the ore colours if necessary ]
[ 3. Click the run button! ]
[ Or for one player only ]
[ 1. Click the run button ]
[ 2. Fill in the form that appears ]
[=========================================================================}

program PMG;

{.include SRL/SRL.scar}
{.include srl\srl\skill\Mining.scar}
{.include SRL\SRL\Misc\Trade.scar}

const
UseForm = 1; //If you want to use a form, form only for 1 player
//1 is yes, 0 is no
//If you use don't fill in anything below

const
VersionNumber = '1.2'; //Leave this
LoadInv = 3; //Number of loads before switching Player.
StartPlayer = 0; //The starting player
WaitTime = 4000; //The time between clicks, 1000 = 1 sec

//Ore colours
const
CopperColor = 3824769;
TinColor = 8684686;
ClayColor = 4553880;
IronColor = 2569557;
SilverColor = 12434885;
CoalColor = 2834753;
GoldColor = 1881051;
MithrilColor = 7359564;
AdamantColor = 6322272;
RuniteColor = 0; //I couldn't find this out

var
frmDesign : TForm;
Label1 : TLabel;
Label2 : TLabel;
Label3 : TLabel;
Bevel1 : TBevel;
Label4 : TLabel;
Label5 : TLabel;
Label6 : TLabel;
StartTheScript : TButton;
Username1 : TEdit;
OreToMine : TComboBox;
LoadsToDo : TEdit;
Password1 : TEdit;
TimeBetweenClicks : TEdit;
OreColorEnter : TEdit;

var
OreMined, OreMine, Timer, OreDTM, Loadz, WaitTime2, LoadInv2:integer;
STS:boolean;

Procedure DeclarePlayers;
begin
HowManyPlayers := 6 //The number of Players
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=StartPlayer; // CurrentPlayer = Array Index

Players[0].Name :=''; //Username
Players[0].Pass :=''; //Password
Players[0].String1:=''; //What ore to mine
Players[0].Active:=True; //Active?

Players[1].Name :=''; //Username
Players[1].Pass :=''; //Password
Players[1].String1:=''; //What ore to mine
Players[1].Active:=False; //Active?

Players[2].Name :=''; //Username
Players[2].Pass :=''; //Password
Players[2].String1:=''; //What ore to mine
Players[2].Active:=False; //Active?

Players[3].Name :=''; //Username
Players[3].Pass :=''; //Password
Players[3].String1:=''; //What ore to mine
Players[3].Active:=False; //Active?

Players[4].Name :=''; //Username
Players[4].Pass :=''; //Password
Players[4].String1:=''; //What ore to mine
Players[4].Active:=False; //Active?

Players[5].Name :=''; //Username
Players[5].Pass :=''; //Password
Players[5].String1:=''; //What ore to mine
Players[5].Active:=False; //Active?

end;

//************************************************************************//

procedure OreToMineSetColor;
begin
if Players[CurrentPlayer].string1 = 'copper' then OreMine := CopperColor
if Players[CurrentPlayer].string1 = 'tin' then OreMine := TinColor
if Players[CurrentPlayer].string1 = 'clay' then OreMine := ClayColor
if Players[CurrentPlayer].string1 = 'iron' then OreMine := IronColor
if Players[CurrentPlayer].string1 = 'silver' then OreMine := SilverColor
if Players[CurrentPlayer].string1 = 'coal' then OreMine := CoalColor
if Players[CurrentPlayer].string1 = 'gold' then OreMine := GoldColor
if Players[CurrentPlayer].string1 = 'mithril' then OreMine := MithrilColor
if Players[CurrentPlayer].string1 = 'adamant' then OreMine := AdamantColor
if Players[CurrentPlayer].string1 = 'runite' then OreMine := RuniteColor
end;

//************************************************************************//

procedure buttonclickstartscript(sender: TObject);
begin
frmDesign.ModalResult:= mrOk;
Players[0].Name := Username1.Text; //Username
Players[0].Pass := Password1.Text; //Password
Players[0].String1 := OreToMine.Text; //What ore to mine
Players[0].Active := True; //Active?
OreMine := StrToInt(OreColorEnter.Text);
WaitTime2 := StrToInt(TimeBetweenClicks.Text);
LoadInv2 := StrToInt(LoadsToDo.Text);
STS := True
end;

procedure FormSetup;
begin
frmDesign := CreateForm;
frmDesign.Left := 313;
frmDesign.Top := 183;
frmDesign.Width := 250;
frmDesign.Height := 254;
frmDesign.Caption := 'frmDesign';
frmDesign.Color := clBtnFace;
frmDesign.Font.Color := clWindowText;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;
Label1 := TLabel.Create(frmDesign);
Label1.Parent := frmDesign;
Label1.Left := 5;
Label1.Top := 16;
Label1.Width := 51;
Label1.Height := 13;
Label1.Caption := 'Username:';
Label2 := TLabel.Create(frmDesign);
Label2.Parent := frmDesign;
Label2.Left := 5;
Label2.Top := 41;
Label2.Width := 49;
Label2.Height := 13;
Label2.Caption := 'Password:';
Label3 := TLabel.Create(frmDesign);
Label3.Parent := frmDesign;
Label3.Left := 33;
Label3.Top := 65;
Label3.Width := 20;
Label3.Height := 13;
Label3.Caption := 'Ore:';
Bevel1 := TBevel.Create(frmDesign);
Bevel1.Parent := frmDesign;
Bevel1.Left := 6;
Bevel1.Top := 87;
Bevel1.Width := 218;
Bevel1.Height := 2;
Label4 := TLabel.Create(frmDesign);
Label4.Parent := frmDesign;
Label4.Left := 24;
Label4.Top := 97;
Label4.Width := 32;
Label4.Height := 13;
Label4.Caption := 'Loads:';
Label5 := TLabel.Create(frmDesign);
Label5.Parent := frmDesign;
Label5.Left := 69;
Label5.Top := 117;
Label5.Width := 97;
Label5.Height := 13;
Label5.Caption := 'Time between clicks';
Label6 := TLabel.Create(frmDesign);
Label6.Parent := frmDesign;
Label6.Left := 12;
Label6.Top := 160;
Label6.Width := 46;
Label6.Height := 13;
Label6.Caption := 'Ore color:';
StartTheScript := TButton.Create(frmDesign);
StartTheScript.Onclick := @buttonclickstartscript;
StartTheScript.Parent := frmDesign;
StartTheScript.Left := 78;
StartTheScript.Top := 185;
StartTheScript.Width := 75;
StartTheScript.Height := 25;
StartTheScript.Caption := 'Start script';
StartTheScript.TabOrder := 8;
Username1 := TEdit.Create(frmDesign);
Username1.Parent := frmDesign;
Username1.Left := 59;
Username1.Top := 13;
Username1.Width := 121;
Username1.Height := 21;
Username1.TabOrder := 9;
OreToMine := TComboBox.Create(frmDesign);
OreToMine.Parent := frmDesign;
OreToMine.Left := 60;
OreToMine.Top := 61;
OreToMine.Width := 121;
OreToMine.Height := 21;
OreToMine.ItemHeight := 13;
OreToMine.TabOrder := 11;
OreToMine.Items.Add('copper');
OreToMine.Items.Add('tin');
OreToMine.Items.Add('clay');
OreToMine.Items.Add('iron');
OreToMine.Items.Add('silver');
OreToMine.Items.Add('coal');
OreToMine.Items.Add('gold');
OreToMine.Items.Add('mithril');
OreToMine.Items.Add('adamant');
OreToMine.Items.Add('runite');
LoadsToDo := TEdit.Create(frmDesign);
LoadsToDo.Parent := frmDesign;
LoadsToDo.Left := 60;
LoadsToDo.Top := 93;
LoadsToDo.Width := 121;
LoadsToDo.Height := 21;
LoadsToDo.TabOrder := 12;
Password1 := TEdit.Create(frmDesign);
Password1.Parent := frmDesign;
Password1.Left := 60;
Password1.Top := 37;
Password1.Width := 121;
Password1.Height := 21;
Password1.TabOrder := 10;
TimeBetweenClicks := TEdit.Create(frmDesign);
TimeBetweenClicks.Parent := frmDesign;
TimeBetweenClicks.Left := 60;
TimeBetweenClicks.Top := 130;
TimeBetweenClicks.Width := 121;
TimeBetweenClicks.Height := 21;
TimeBetweenClicks.TabOrder := 13;
OreColorEnter := TEdit.Create(frmDesign);
OreColorEnter.Parent := frmDesign;
OreColorEnter.Left := 60;
OreColorEnter.Top := 156;
OreColorEnter.Width := 121;
OreColorEnter.Height := 21;
OreColorEnter.TabOrder := 14;
end;

procedure SafeInitForm;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('FormSetup', v);
end;

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowFormModal;
var
v: TVariantArray;
begin
setarraylength(V, 0);
ThreadSafeCall('ShowFormModal', v);
end;

//************************************************************************//

procedure PR;
begin
begin
WriteLn('/============== - PMG '+VersionNumber+' - ===============\');
WriteLn('|Mining level at start: '+IntToStr(Players[CurrentPlayer].Level[15])+' |');
WriteLn('|Current mining level: '+IntToStr(GetSkillLevel('mining'))+' |');
WriteLn('|Ore mined: '+IntToStr(OreMined)+' |');
WriteLn('|Loads: '+IntToStr(Loadz)+' |');
WriteLn('|Ran for: '+ScriptTime2(2)+' |');
WriteLn('/========================================\');
SRLRandomsReport;
Gametab(4);
end;
end;

//************************************************************************//
//****************************Anti-Randoms etc****************************//
//************************************************************************//

procedure AntiRandoms;
begin
FindNormalRandoms;

FindPick;

if (FindFight) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;

if Findname Then FindTalk;

if FindGas(x, y) then
begin
RunAwayDirection('N');
Wait(10000 + random(2000));
RunBack;
end;
end;

//************************************************************************//
//***************************Mining and Dropping**************************//
//************************************************************************//

procedure MineStuff;
begin
repeat
if FindObj(x, y, 'Mine', OreMine, 1) then
begin
wait(10 + random(10))
Mouse(x,y,0,0,true)
break;
end;
until(false)

marktime(Timer);

repeat
wait(10 + random(20))
AntiRandoms;
if UseForm = 0 then if timefrommark(Timer) > WaitTime then break;
if UseForm = 1 then if timefrommark(Timer) > WaitTime2 then break;
if FindText(x, y, 'o ore cur', smallchars, 18, 415, 477, 433) then break;
if UseForm = 0 then if timefrommark(Timer) > WaitTime then break;
if UseForm = 1 then if timefrommark(Timer) > WaitTime2 then break;
until FindText(x, y, 'You swing your', smallchars, 18, 415, 477, 433)

if FindText(x, y, 'You swing your', smallchars, 18, 415, 477, 433) then
begin
marktime(Timer);
repeat
Status('Mining')
wait(700 + random(900));
AntiRandoms;
if LoggedIn = false then
begin
LoginPlayer;
OreMined := OreMined - 1;
break;
end;
if UseForm = 0 then if timefrommark(Timer) > WaitTime then OreMined := OreMined - 1;
if UseForm = 1 then if timefrommark(Timer) > WaitTime2 then OreMined := OreMined - 1;
until FindText(x, y, 'anage', smallchars, 20, 410, 477, 433);
Status('Mined rock')
OreMined := OreMined + 1;
end;
end;

function CoordsToInvSpot(gx, gy: integer): integer;
var col, row: integer;
begin

if (gx > 211) and (gx < 248) then row := 1
if (gx > 248) and (gx < 282) then row := 2
if (gx > 282) and (gx < 319) then row := 3
if (gx > 319) and (gx < 355) then row := 4
if (gx > 355) and (gx < 391) then row := 5
if (gx > 391) and (gx < 426) then row := 6
if (gx > 426) and (gx < 462) then row := 7

if (gy > 564) and (gy < 605) then col := 1
if (gy > 605) and (gy < 648) then col := 2
if (gy > 648) and (gy < 690) then col := 3
if (gy > 690) and (gy < 730) then col := 4

result := ((row - 1) * 4) + col;

end;

procedure drop;
begin
if (invfull) then
begin
GameTab(4);
OreDTM := DTMFromString('78DA634C636060706740038C48249006A9F12' +
'3A0261F487813A12688809A1C201141847BA209A84902123104D4' +
'C4028944026AA2893007E4DE28026A828930071436A104D484128' +
'E0B0047CA0967');
Status('Dropping');
repeat
Status('Looking for DTM')
if FindDTM(OreDTM, x, y, MIx1, MIY1, MIx2, MIY2) then
Status('Found DTM')
DropItem(coordstoinvspot(x, y));
AntiRandoms;
wait(200 + random(200));
until not (FindDTM(OreDTM, x, y, MIx1, MIY1, MIx2, MIY2));
freedtm(OreDTM);
Status('Dropped')
Loadz := Loadz + 1;
end;
end;
//*************************************************************************//
//
// Main EventLoop
//
//*************************************************************************//
begin
ClearDebug;
SetupSRL;
SetupSRLMining;
DeclarePlayers;
STS := false
if UseForm = 1 then
begin
SafeInitForm;
SafeShowFormModal;
repeat
Wait(500)
if STS = true then break;
until(false)
end;
if LoggedIn = false then LoginPlayer;
MakeCompass('N');
HighestAngle;
SetRun(true);
FindPickHeadColor;
Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
PR;
if USeForm = 0 then OreToMineSetColor;
Loadz := 0
repeat
MineStuff;
drop;
if UseForm = 0 then if Loadz = LoadInv then break;
if UseForm = 1 then if Loadz = LoadInv2 then break;
until(false)
logout;
end.

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

JAD

2007-04-23 18:00:52

Check this out:

http://www.villavu.com/forum/showthread.php?t=7875

And check the constants for the rock colors. Peculiar isn't it? I'm doing farther searching now, will edit this if I bust him :)

YoHoJo

2007-04-23 21:19:45

Hmm some things are similar like DTM and rock color const.
But everything else seems ok..
Ima investigate futher, can someone from dingo forums vouch that this guy is legit?

Johura

2007-04-23 22:58:10

I will vote yes once i get news from Jad and yohojo. BTW you have a extra begin and end in procedure PR; and your standards could be fixed a bit.

Gillbz

2007-04-24 02:41:40

Sorry i suppose i should give credit to him i couln't make the dtm's myself because they never worked. When i tested it in the dtm editor it found it but not when acully dropping it. Feel free to pm me on dingo - username gillbz. I'll post back when i finished my tut island runner too :).

GoF

2007-04-24 09:08:27

Part from that mining procedure seems kinda familiar.. Edited from a part in powerskills (the start of it is so simple and after that.. Not so simple.)

Gillbz

2007-04-24 12:21:42

Power Skills? Not tryin to sound like a noob but i've never heard of it.

YoHoJo

2007-04-24 15:59:16

Its a script made by startbalster.
Well as far as i can see, i guess most of this was made by you and it looks fine to me.
Ill just check you up at Dingo Froums and see how you are over there too =).

Smartzkid

2007-04-24 16:10:31

His profile

PS: Try hitting the BUY button on your website…it doesn't work…says you need some kind of php loader…

:( They's were niece prycez two!

Gillbz

2007-04-24 16:17:34

I know i need to fix that. If you want hosting PM me and ill set your account up.

If you want to add my msn to email and vertify its on dingo in my profile.

Heres the start of my tut island script. I wrote this entire script, alough i got the idea of searching on the window and mm for the arrow from someone else. I did not read how they did it and i decided to use a DTM and it worked for once :). I didn't propally read their script because my memorys quite good and ill end up copying it by accident:
program TutIsland;
{.include SRL/SRL.scar}
var
RandNumb,RandNumb2,Repeated,xf,yf:integer;
WinArrow,MMArrow:integer;
PleaseWaitBmp:integer;
ChatTo:string;

procedure CreateChar;
begin
//*\\
//M/F\\
//*****\\

RandNumb := random(1);
if RandNumb = 1 then Mouse(457,293,3,3, true)

//****\\
//Cloths\\
//********\\

//Head

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,90,3,3, true)
if RandNumb2 = 1 then Mouse(165,90,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Jaw

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,126,3,3, true)
if RandNumb2 = 1 then Mouse(165,126,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Torso

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,160,3,3, true)
if RandNumb2 = 1 then Mouse(165,160,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Arms

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,195,3,3, true)
if RandNumb2 = 1 then Mouse(165,195,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Hands

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,299,3,3, true)
if RandNumb2 = 1 then Mouse(165,299,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Legs

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,266,3,3, true)
if RandNumb2 = 1 then Mouse(165,266,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Feet

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,300,3,3, true)
if RandNumb2 = 1 then Mouse(165,300,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//****\\
//Colors\\
//********\\

//Hair

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,96,3,3, true)
if RandNumb2 = 1 then Mouse(465,96,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Torso

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,132,3,3, true)
if RandNumb2 = 1 then Mouse(465,132,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Legs

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,167,3,3, true)
if RandNumb2 = 1 then Mouse(465,167,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Feet

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,201,3,3, true)
if RandNumb2 = 1 then Mouse(465,201,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Skin

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,237,3,3, true)
if RandNumb2 = 1 then Mouse(465,237,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

Mouse(258,286,3,3, true)

end;

procedure Walk(WalkTo:integer);
begin
MMArrow := DTMFromString('78DA63E462606010604001BFBE4B816946289' +
'F11A44698010D30A2AA610312FC04D4F062DA85550D0F0135EC44' +
'A801B99915BF1A00447702C4');
If (WalkTo = 1) then
begin
repeat
wait(50)
until(FindDTM(MMArrow,xf,yf,564,3,723,162))
mouse(xf,yf,0,0,true)
end;
end;

function PleaseWaitCheck:boolean;
begin
PleaseWaitBmp := BitmapFromString(40, 5, 'z78DA737303010324E08601682' +
'78B0B20ABC7D48B4B8478956E831EE00F01F2CCA1851A6A85277E' +
'736867CB50490FA3000200D8263B4C');
if findbitmaptolerancein(PleaseWaitBmp,x,y,227,435,381,456,5) then
Result := true
end;

function InChatCheck:boolean;
begin
if findcolortolerance(x,y,128,243,358,365,373,5) then
Result := true
end;

procedure DoTalk;
begin
repeat
If PleaseWaitCheck = true then
begin
repeat
wait(50+random(100))
until PleaseWaitCheck = false
end;
clicktocontinue;
wait(300 + random(500))
until(clicktocontinue = false)
end;

procedure FindWinArrow(ReturnX,ReturnY:integer);
begin
WinArrow := DTMFromString('78DA631461606090634001BFBE2B81694620F' +
'E0F048C7C408618031A60442281B434116A40767112A14691801A' +
'0122EC9220420DC85F3204D44811560300199607B7');
repeat
wait(50)
until(FindDTM(WinArrow,xf,yf,0,0,515,338))
ReturnX := xf
ReturnY := yf + 10
end;

procedure TalkToGuide(ChatTo:string);
begin
repeat
FindWinArrow(xf,yf);
mmouse(xf,yf + 10,0,0)
if IsUpTextMulti('Talk-to','to ' + ChatTo,ChatTo) then
begin
mouse(xf,yf + 10,0,0,false)
Wait(100 + random(200))

if ChatTo = 'Door' then
begin
ChooseOption(x, y, 'Open');
break;
end;

if ChatTo = 'Tree' then
begin
ChooseOption(x, y, 'Chop down');
break;
end;

if ChatTo = 'Fishing spot' then
begin
ChooseOption(x, y, 'Net');
break;
end;

if not(ChatTo = 'Door') and not(ChatTo = 'Tree') and not(ChatTo = 'Fishing spot') then
begin
ChooseOption(x, y, 'Talk-to');
end;
end;
wait(100 + random(100))
If InChatCheck then break;
until(false)
end;

procedure RSGuide;
begin
TalkToGuide('RuneScape Guide');
DoTalk;
wait(100+random(200))
GameTab(10)
wait(100+random(200))
setrun(True)
wait(500+random(200))
TalkToGuide('RuneScape Guide');
DoTalk;
TalkToGuide('Door');
end;

procedure SurGuide;
begin
TalkToGuide('Survival Expert')
DoTalk;
wait(100+random(200))
GameTab(3)
wait(100+random(200))
TalkToGuide('Tree')
repeat
wait(50)
until(clicktocontinue)
DoTalk;
wait(100 + random(200))
useitem(2)
wait(50 + random(70))
useitem(3)
wait(5000 + random(3000))
GameTab(2)
wait(100 + random(200))
TalkToGuide('Survival Expert')
wait(100 + random(200))
DoTalk;
wait(100 + random(200))
TalkToGuide('Fishing spot')
end;

begin
ClearDebug;
SetupSRL;
CreateChar;
RSGuide;
Walk(1);
SurGuide;
end.

Smartzkid

2007-04-24 17:51:55

Looks like a nice start, once it's finished (and working somewhat well) I might give you rights to use my playercreator, if you like…

Gillbz

2007-04-25 02:41:12

Thanks :). I need to make a TalkToGuideColor function because the arrow dissapears once you have clicked them once.

Updated! Should do the master chef but i havn't tested yet. Does anyone have a program that i can enter what user i want made and what password to set because it takes so long. After i've finished ill include failsafes, don't worry :) Here it is:
program TutIsland;
{.include SRL/SRL.scar}
var
RandNumb,RandNumb2,Repeated,xf,yf:integer;
WinArrow,MMArrow:integer;
PleaseWaitBmp:integer;
ChatTo:string;

procedure CreateChar;
begin
//*\\
//M/F\\
//*****\\

RandNumb := random(1);
if RandNumb = 1 then Mouse(457,293,3,3, true)

//****\\
//Cloths\\
//********\\

//Head

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,90,3,3, true)
if RandNumb2 = 1 then Mouse(165,90,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Jaw

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,126,3,3, true)
if RandNumb2 = 1 then Mouse(165,126,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Torso

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,160,3,3, true)
if RandNumb2 = 1 then Mouse(165,160,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Arms

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,195,3,3, true)
if RandNumb2 = 1 then Mouse(165,195,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Hands

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,299,3,3, true)
if RandNumb2 = 1 then Mouse(165,299,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Legs

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,266,3,3, true)
if RandNumb2 = 1 then Mouse(165,266,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Feet

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(52,300,3,3, true)
if RandNumb2 = 1 then Mouse(165,300,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//****\\
//Colors\\
//********\\

//Hair

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,96,3,3, true)
if RandNumb2 = 1 then Mouse(465,96,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Torso

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,132,3,3, true)
if RandNumb2 = 1 then Mouse(465,132,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Legs

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,167,3,3, true)
if RandNumb2 = 1 then Mouse(465,167,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Feet

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,201,3,3, true)
if RandNumb2 = 1 then Mouse(465,201,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

//Skin

RandNumb := random(5);
if RandNumb > 0 then
begin
Repeated := 0;
RandNumb2 := random(2);
writeln(IntToStr(RandNumb2))
repeat
if RandNumb2 = 0 then Mouse(353,237,3,3, true)
if RandNumb2 = 1 then Mouse(465,237,3,3, true)
wait(200 + random(400))
Repeated := Repeated + 1;
until(Repeated > RandNumb - 1)
end;

Mouse(258,286,3,3, true)

end;

procedure Walk(WalkTo:integer);
begin
MMArrow := DTMFromString('78DA63E462606010604001BFBE4B816946289' +
'F11A44698010D30A2AA610312FC04D4F062DA85550D0F0135EC44' +
'A801B99915BF1A00447702C4');
If (WalkTo = 1) then
begin
repeat
wait(50)
until(FindDTM(MMArrow,xf,yf,564,3,723,162))
mouse(xf,yf,0,0,true)
end;
If (WalkTo = 2) then
begin
repeat
wait(50)
until(FindDTM(MMArrow,xf,yf,564,3,723,162))
mouse(xf,yf,0,0,true)
end;
If (WalkTo = 3) then
begin
repeat
wait(50)
until(FindDTM(MMArrow,xf,yf,564,3,723,162))
mouse(xf,yf,0,0,true)
end;
If (WalkTo = 4) then
begin
repeat
wait(50)
until(FindDTM(MMArrow,xf,yf,564,3,723,162))
mouse(xf,yf + 20,0,0,true)
end;
end;

function PleaseWaitCheck:boolean;
begin
PleaseWaitBmp := BitmapFromString(40, 5, 'z78DA737303010324E08601682' +
'78B0B20ABC7D48B4B8478956E831EE00F01F2CCA1851A6A85277E' +
'736867CB50490FA3000200D8263B4C');
if findbitmaptolerancein(PleaseWaitBmp,x,y,227,435,381,456,5) then
Result := true
end;

function PleaseWaitSkill:boolean;
begin
PleaseWaitBmp := BitmapFromString(40, 5, 'z78DA737303010324E08601682' +
'78B0B20ABC7D48B4B8478956E831EE00F01F2CCA1851A6A85277E' +
'736867CB50490FA3000200D8263B4C');
if findbitmaptolerancein(PleaseWaitBmp,x,y,150,340,360,400,10) then
Result := true
end;

function InChatCheck:boolean;
begin
if findcolortolerance(x,y,128,243,358,365,373,5) then
Result := true
end;

procedure WaitForSkill;
begin
repeat
wait(50+random(100))
until PleaseWaitSkill = false
end;

procedure DoTalk;
begin
repeat
If PleaseWaitCheck = true then
begin
repeat
wait(50+random(100))
until PleaseWaitCheck = false
end;
clicktocontinue;
wait(300 + random(500))
until(clicktocontinue = false)
end;

procedure FindWinArrow(ReturnX,ReturnY:integer);
begin
WinArrow := DTMFromString('78DA631461606090634001BFBE2B81694620F' +
'E0F048C7C408618031A60442281B434116A40767112A14691801A' +
'0122EC9220420DC85F3204D44811560300199607B7');
repeat
wait(50)
until(FindDTM(WinArrow,xf,yf,0,0,515,338))
ReturnX := xf
ReturnY := yf + 10
end;

procedure TalkToGuide(ChatTo:string);
begin
repeat
FindWinArrow(xf,yf);
mmouse(xf,yf + 10,0,0)
if IsUpTextMulti('Talk-to','to ' + ChatTo,ChatTo) then
begin
mouse(xf,yf + 10,0,0,false)
Wait(100 + random(200))

if ChatTo = 'Door' then
begin
ChooseOption(x, y, 'Open');
break;
end;

if ChatTo = 'Tree' then
begin
ChooseOption(x, y, 'Chop down');
break;
end;

if ChatTo = 'Fishing spot' then
begin
ChooseOption(x, y, 'Net');
break;
end;

if ChatTo = 'Gate' then
begin
ChooseOption(x, y, 'Open');
break;
end;

if ChatTo = 'Range' then
begin
ChooseOption(x, y, 'Use');
break;
end;

if not(ChatTo = 'Door') and not(ChatTo = 'Tree') and not(ChatTo = 'Fishing spot') and not(ChatTo = 'Gate') and not (ChatTo = 'Range') then
begin
ChooseOption(x, y, 'Talk-to');
end;
end;
wait(500 + random(300))
If InChatCheck then break;
until(false)
end;

procedure TalkToGuideColor(ChatTo:string; ColorGuy,ToleranceUse:integer);
begin
repeat

repeat
wait(50 + random(50))
until(findcolortolerance(xf,yf,ColorGuy,0,0,515,338,ToleranceUse))

mmouse(xf,yf + 10,0,0)
wait(50+random(100))
if IsUpTextMulti('Talk-to','to ' + ChatTo,ChatTo) then
begin
mouse(xf,yf + 10,0,0,false)
Wait(100 + random(200))

if ChatTo = 'Door' then
begin
ChooseOption(x, y, 'Open');
break;
end;

if ChatTo = 'Tree' then
begin
ChooseOption(x, y, 'Chop down');
break;
end;

if ChatTo = 'Fishing spot' then
begin
ChooseOption(x, y, 'Net');
break;
end;

if ChatTo = 'Gate' then
begin
ChooseOption(x, y, 'Open');
break;
end;

if not(ChatTo = 'Door') and not(ChatTo = 'Tree') and not(ChatTo = 'Fishing spot') and not(ChatTo = 'Gate') then
begin
ChooseOption(x, y, 'Talk-to');
end;
end;
wait(500 + random(300))
If InChatCheck then break;
until(false)
end;

procedure RSGuide;
begin
writeln('Starting RS Guide')
TalkToGuide('RuneScape Guide');
DoTalk;
wait(100+random(200))
GameTab(10)
wait(100+random(200))
setrun(True)
wait(500+random(200))
TalkToGuideColor('RuneScape Guide',462980,10);
DoTalk;
writeln('Finished RS guide!')
TalkToGuide('Door');
end;

procedure DoFishCook;
begin
if not(findcolortolerance(xf,yf,2535139,0,0,515,338,10)) then
begin
TalkToGuideColor('Tree',3035208,10)
wait(2000 + random(3000))
WaitForSkill;
useitem(2)
useitem(6)
WaitForSkill;
repeat
wait(50 + random(100))
until(findcolortolerance(xf,yf,2535139,0,0,515,338,10))
useitem(5)
wait(1000 + random(1000))
mouse(xf,yf,0,0,false)
ChooseOption(x,y,'Fire')
end;
if (findcolortolerance(xf,yf,2535139,0,0,515,338,10)) then
begin
useitem(5)
wait(1000 + random(1000))
mouse(xf,yf,0,0,false)
ChooseOption(x,y,'Fire')
end;
end;

procedure SurGuide;
begin
writeln('Starting Survival Expert')
TalkToGuide('Survival Expert')
DoTalk;
wait(100+random(200))
GameTab(4)
wait(100+random(200))
TalkToGuide('Tree')
WaitForSkill;
wait(100 + random(200))
useitem(2)
wait(50 + random(70))
useitem(3)
WaitForSkill;
GameTab(2)
wait(100 + random(200))
TalkToGuide('Survival Expert')
wait(100 + random(200))
DoTalk;
wait(100 + random(200))
TalkToGuide('Fishing spot')
WaitForSkill;
wait(100 + random(200))
Mouse(xf,yf,0,0,true)
GameTab(4)
DoFishCook;
DoFishCook;
end;

procedure MasterChef;
begin
TalkToGuide('Master Chef')
wait(1000 + random(2000))
DoTalk;
useitem(5)
useitem(6)
useitem(7)
TalkToGuide('Range')
wait(5000 + random(3000))
GameTab(13)
end;

begin
ClearDebug;
SetupSRL;
CreateChar;
MakeCompass('N');
HighestAngle;
RSGuide;
Walk(1);
SurGuide;
Walk(2)
MakeCompass('W');
TalkToGuide('Gate');
Walk(3)
TalkToGuide('Door')
MasterChef;
Walk(4)
end.

WT-Fakawi

2007-05-05 17:48:51

Lucky you. After ten's of failed and generally speaking rather sad apps, I feel genereous.

So against all odds, welcome!


dont proove me wrong.