SRL Archive - Archive

~alex~ - SRL Member Application Form


~alex~

2007-04-19 13:03:18

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

What is the meaning to life?


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


Programming Knowledge
VB

Other Communitys
Uberbroproductions Sythe

How Long have You Played Runescape
3 1/2 years

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

Hey guys,

I've been scripting for about 2 years but I stopped playing Runescape for quite a while, so i also stopped scriping. I know basically all the SRL functions I'd need to and how to use them such as Radial Walk, and I also understand forms, DTM's, and BMPs. I plan on learning canvasses(sp?) soon. I recently got back into scripting it and have made 2 nice scripts so far.
One of them is my Monster Guild Miner which has been successfull, some said its the best miner since Stupidooo's.
The other is my Air Crafter, also sucessfull.


I think I deserve to be a member because I will, and already have been of value to the community. Like I said above I have released two scripts and I've spent alot of my time on the forums in the Scripting Help section and SRL Help.

I've attached my latest, and even unreleased version of my guild miner, expescially for you guys :P If you want more details check my thread, there's a link in my siggy.

Well…. Looking forward to a response :) *crosses fingers*

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

Cant attach stuff so I'll post it here..


{=========================================================================]
[ Monster Guild Miner ]
[ ]
[ NAME : Monster Guild Miner ]
[ WRITER : ~alex~ ]
[ CATEGORY : Miner ]
[ DESCRIPTION : Mines from fally mining guild and banks coal ]
[ AUTOCOLOR : Yes ]
[ NOTES : Thanks to adamb_135 and spermis for testing :D ] ]
[ CONTACT : [email]gamesjunky1991@gmail.com[/email] ]
[ ]
[ ]
[=========================================================================]
[ ]
[=========================================================================]
[ Instructions. ]
[=========================================================================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color.
[ 3. Setup lines 38 - 40 ]
[ 4. Press run ]
[ 5. Fill out form ]
[ 6. Start in fally east bank ]
[=========================================================================}
program New;
{.include srl/srl.scar}
{.include SRL/SRL/Skill/Mining.scar}

var
coalrock1,coalrock2,coalrock3,bankbooth1,bankbooth2,bankbooth3,mmorangerock,mmGuildLadder,invCoal,pickaxehandle:integer;
runepickhead,addypickhead,mithpickhead,steelpickhead,ironpickhead,bronzepickhead:integer;
rockfound,clickedbank,lostpick:boolean;
rockColor,attempt,mininglvl,antibantime,lastloggedout:integer;

//******************** Set These Constants if Needed *******************//

const StartPlayer = 0; // Determines who will play first
useResponder = true; //Use the autoresponder? Can cause lag.
logouteveryores = 150; //log out every how many ores fpr 1 minute?

//************************************************************************//
const VersionNumber = '1.31'; // Compliant with Rev 568+
//************************************************************************//

procedure PlayerStats;


var Active: string;
var i: Integer;
begin
writeln('**********************************************');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+ inttostr(CurrentPlayer));
writeln('Mining Level : '+ inttostr(getskilllevel('Mining')))
writeln('Mined : ' + inttostr(players[currentplayer].integer2) + ' coal ores')
writeln('Select Skill : '+ Players[CurrentPlayer].Skill);
writeln('Script has been running for: ' + (timerunning))
writeln('Banked : '+ inttostr(Players[CurrentPlayer].Banked) + ' times.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : '+ Active);
writeln('**********************************************');

for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then Active:='True' else Active:='False';
writeln( (inttostr(i))+' : '+Players[i].name+ ' = '+Active+'. - Lvl : '+inttostr(Players[i].Level[15])+
'. - B :'+inttostr(Players[i].Banked)+' Times.'+
' - : '+IntToStr(Players[i].Worked)+' mins.'+' - Loc: '+Players[i].loc);
end
writeln('**********************************************');
end;

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

procedure ProgressReport;
begin
begin
WriteLn(' ');
WriteLn('<============== -'+VersionNumber+'- Progress Report ===============>');
SRLRandomsReport;
Writeln(' ');
end;
PlayerStats;
end;

//************************************************************************//
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ยป Player Array Forums --//
//-----------------------------------------------------------------//
// *
// * procedure SetupPlayers; // * By: Masquerader //

{ var frmDesign: TForm;
Description: Mainform Handle}
var
frmDesign: TForm;

{ var Names, Passes, Nicks, Location, Skill: array of TEdit;
Description: EditBox Handles}

var
Names, Passes, Nicks, Skill,Ores: array of TEdit;

{ var Active: array of TCheckBox;
Description: Checkbox Handle}

var
Active: array of TCheckBox;

{ var NewUserButton, Ok: TButton;
Description: ButtonClicks}

var
NewUserButton, Ok: TButton;

{ var cFile : String;
Description: Filedata Variable}

var
cFile: string;

{*******************************************************************************
function getNumber: Integer;
By: RsN
Description: Gets Number of Users Saved
*******************************************************************************}

function getNumber: Integer;
var
i: Integer;
begin
for i := 0 to i + 1 do
begin
if (Pos('name' + IntToStr(i) + '=', cFile) = 0) then
begin
Result := i;
Exit;
end;
end;
end;

{*******************************************************************************
function getData(aChar: Integer; dName : String): String;
By: RsN
Description: Gets data by dName from aChar number
*******************************************************************************}

function getData(aChar: Integer; dName: string): string;
var
tString: string;
begin
Result := '';
tString := dName + IntToStr(aChar) + '=';
if (Pos(tString, cFile) = 0) then
Exit;
Result := cFile;
Delete(Result, 1, Pos(tString, cFile));
Result := Copy(Result, Length(tString), Pos(Chr(13), Result) -
Length(tString));
end;

{*******************************************************************************
procedure AddUser;
By: Masquerader
Description: Adds a UserSlot to the Form
*******************************************************************************}

procedure AddUser;
var
I: Integer;
begin
I := GetArrayLength(Names);
SetArrayLength(Names, I + 1);
SetArrayLength(Passes, I + 1);
SetArrayLength(Nicks, I + 1);
SetArrayLength(Active, I + 1);
SetArrayLength(Skill, I + 1);
SetarrayLength(Ores, I + 1);

Names[I] := TEdit.Create(frmDesign);
Names[I].Parent := frmDesign;
Names[I].Left := 13;
if (I = 0) then
Names[I].Top := 54
else
Names[I].Top := Skill[i - 1].Top + 30;
Names[I].Width := 121;
Names[I].Height := 21;
Names[I].Text := 'Username ' + IntToStr(i);

Passes[I] := TEdit.Create(frmDesign);
Passes[I].Parent := frmDesign;
Passes[I].Left := 13;
Passes[I].Top := Names[I].Top + 21;
Passes[I].Width := 121;
Passes[I].Height := 21;
Passes[I].Text := 'Password ' + IntToStr(i);
//Passes[I].PasswordChar := '*';

Active[I] := TCheckBox.Create(frmDesign);
Active[I].Parent := frmDesign;
Active[I].Left := 155;
Active[I].Top := Passes[I].Top;
Active[I].Width := 79;
Active[I].Height := 17;
Active[I].Caption := 'Active?';

Nicks[I] := TEdit.Create(frmDesign);
Nicks[I].Parent := frmDesign;
Nicks[I].Left := 13;
Nicks[I].Top := Passes[I].Top + 21;
Nicks[I].Width := 121;
Nicks[I].Height := 21;
Nicks[I].Text := 'Nickname ' + IntToStr(i);

Ores[I] := TEdit.Create(frmDesign);
Ores[I].Parent := frmDesign;
Ores[I].Left := 13;
Ores[I].Top := Nicks[I].Top + 21;
Ores[I].Width := 121;
Ores[I].Height := 21;
Ores[I].Text := 'Ores to mine ' + IntToStr(i);

Skill[I] := TEdit.Create(frmDesign);
Skill[I].Parent := frmDesign;
Skill[I].Left := 13;
Skill[I].Top := Ores[I].Top + 21;
Skill[I].Width := 121;
Skill[I].Height := 21;
Skill[I].Text := 'Skill ' + IntToStr(i);

end;

{*******************************************************************************
procedure SaveSettings;
By: RSN and Masquerader
Description: Saves UserData to File
*******************************************************************************}

procedure SaveSettings; // taken from users.scar, by RSN
var // t = names written to file
afile, i, p, t: Integer; // p = players added to array
// temp : string;
begin
aFile := RewriteFile(AppPath + 'guildminer' + '.srl', False);
t := 0;
p := 0;
for i := 0 to GetArrayLength(Names) - 1 do
begin
//doesnt write unchanged or blank boxes :)
if (not (Names[I].text = 'Username ' + IntToStr(i)) and
(Length(Names[I].text) > 2)) then
begin
WriteFileString(aFile, 'name' + IntToStr(t) + '=' + Names[I].text +
Chr(13));
WriteFileString(aFile, 'pass' + IntToStr(t) + '=' + Passes[I].text +
Chr(13));
WriteFileString(aFile, 'nick' + IntToStr(t) + '=' + Nicks[I].text +
Chr(13));
WriteFileString(aFile, 'ores' + IntToStr(i) + '=' + ores[I].text +
Chr(13));
WriteFileString(aFile, 'skill' + IntToStr(i) + '=' + Skill[I].text +
Chr(13));

if (Active[I].state) then
begin
WriteFileString(aFile, 'active' + IntToStr(t) + '=true' + Chr(13));
SetArrayLength(players, p + 1);
Players[p].Name := Names[I].text;
Players[p].Pass := Passes[I].text;
Players[p].Nick := Nicks[I].text;
Players[p].integer1 := strtoint(Ores[I].text);
Players[p].Skill := Skill[I].text;
Players[p].Active := True;

p := p + 1;
end;
t := t + 1;
end;
end;
CloseFile(aFile);
WriteLn('Wrote ' + IntToStr(t) + ' users to ' + 'guildminer' + '.srl');
WriteLn('There is ' + IntToStr(p) + ' active users')
end;

{*******************************************************************************
procedure LoadSettings;
By: RSN and Masquerader
Description: Loads UserData from File
*******************************************************************************}

procedure LoadSettings; // taken from users.scar, by RSN
var
i, t, afile: Integer;
begin
afile := OpenFile(AppPath + 'guildminer' + '.srl', False);
if (aFile < 0) then
Exit;
ReadFileString(aFile, cFile, FileSize(aFile));
CloseFile(aFile);
t := getNumber;
for i := 0 to t - 1 do
AddUser;

for i := 0 to t - 1 do
begin
Names[I].Text := getData(i, 'name');
Passes[I].Text := getData(i, 'pass');
Nicks[I].Text := getData(i, 'nick');
ores[I].Text := getData(i, 'ores');
Skill[I].Text := getData(i, 'skill');
Active[I].state := (getData(i, 'active') = 'true');
end;
WriteLn('Loaded ' + IntToStr(t) + ' users from ' + 'guildminer' + '.srl');
end;

{*******************************************************************************
procedure buttonclick(sender: TObject);
By: Masquerader
Description: Handles Button Clicks
*******************************************************************************}

procedure buttonclick(sender: tobject);
var
v: TVariantArray;
begin
SetArrayLength(V, 0);
if (Sender is TButton) then
case (TButton(Sender).tag) of
-1: ThreadSafeCall('AddUser', v);
-2:
begin
frmDesign.ModalResult := mrOk;
ThreadSafeCall('SaveSettings', v);
end;
end;
end;

{*******************************************************************************
procedure InitForm;
By: Masquerader
Description: Creates Form
*******************************************************************************}

procedure InitForm;
begin
frmDesign := CreateForm;
frmDesign.Left := 259;
frmDesign.Top := 132;
frmDesign.Width := 440;
frmDesign.Height := 540;
frmDesign.Caption := 'Character Manager';
frmDesign.Color := clInactiveCaption;
frmDesign.Font.Height := -11;
frmDesign.Font.Name := 'MS Sans Serif';
frmDesign.Font.Style := [];
frmDesign.Visible := False;
frmDesign.PixelsPerInch := 96;

NewUserButton := TButton.Create(frmDesign);
NewUserButton.Parent := frmDesign;
NewUserButton.Left := 116;
NewUserButton.Top := 21;
NewUserButton.Width := 75;
NewUserButton.Height := 25;
NewUserButton.Caption := 'New User';
NewUserButton.OnClick := @buttonclick;
NewUserButton.Tag := -1;

Ok := TButton.Create(frmDesign);
Ok.Parent := frmDesign;
Ok.Left := 258;
Ok.Top := 21;
Ok.Width := 75;
Ok.Height := 25;
Ok.Caption := 'Ok';
Ok.OnClick := @buttonclick;
Ok.Tag := -2;
end;

//-----------------------------------------------------------------//

procedure SafeInitForm;
var
v: TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('InitForm', v);
SetArrayLength(V, 0);
ThreadSafeCall('LoadSettings', v);
end;

//-----------------------------------------------------------------//

procedure ShowFormModal;
begin
frmDesign.ShowModal;
end;

//-----------------------------------------------------------------//

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

{*******************************************************************************
procedure SetupPlayers;
By: Masquerader
Description: Open Form, Loads and Saves Data only procedure you need to use
*******************************************************************************}

procedure SetupPlayers;
begin
if FileName = '' then FileName := 'chars';
SafeInitForm;
SafeShowFormModal;
FreeForm(FrmDesign);

frmDesign := nil;
ok := nil;
NewUserButton := nil;
SetArrayLength(Names, 0);
SetArrayLength(Passes, 0);
SetArrayLength(Nicks, 0);
SetArrayLength(ores, 0);
SetArrayLength(Skill, 0);
SetArrayLength(Active, 0); //should free ALL memory used

HowManyPlayers := GetArrayLength(players);
if (howmanyplayers = 0) then
begin
WriteLn('You cant run this script without active players');
TerminateScript;
end;
end;

function findpickhead:Boolean;
var
pick:integer;
begin
pick := DTMFromString('78DA6314656060E0674001264E260C2780342' +
'310FF07024641208397010D302291401A242F40400D17901024A0' +
'861D48081150C303248409A81121C21C4922D44800093E026AA48' +
'004370135D240828308F7B013502348847B407EE7C1AF0600102E' +
'0768');
result:= finddtm(pick,x,y,MIX1,MIY1,MIX2,MIY2)
end;

function AlexFindPick: Boolean;
var
c, XH, YH, BR: Integer;
ReequipPick: Boolean;
begin
GameTab(4);
Result := True;
if (FindBitmapSpiralTolerance(PickHandle, x, y, 550, 200, 745, 465, 30)) or
(GetColor(472, 380) = 0) and (GetColor(482, 383) = 0) then
// "you need a pickaxe to mine this rock"

begin
// PerfectNorth;
GameTab(5);
Wait(1000);
if (GetColor(604, 300) = 65536) and (GetColor(601, 298) = 65536) then
begin
NoPick := True;
WriteLn('Broken Pickaxe. NoPick:=True;');
GameTab(4);
Result := False;
BR := 1 + Random(5);
case BR of
1:
begin
TypeSend('arg');
end;
2:
begin
TypeSend('aarg');
end;
3:
begin
TypeSend('arghh');
end;
4:
begin
TypeSend('dam');
end;
5:
begin
TypeSend('sjee.');
end;
end;
Exit;
end;
GameTab(4);

Wait(2000 + Random(100));
if InvFull then
begin
if (FindBitmapSpiralTolerance(Ore, x, y, 559, 210, 735, 460, 25)) then
begin
Mouse(x, y, 5, 5, False);
ChooseOption(x, y, 'Drop');
end;
end;

repeat
if not (LoggedIn) then Exit;
c := c + 1;
x := Random(510) + 5;
y := Random(330) + 5;
if (FindColorSpiral(x, y, hc1, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc2, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc3, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc4, 3, 3, 515, 338)) or
(FindColorSpiral(x, y, hc5, 3, 3, 515, 338)) then
begin
MMouse(x, y, 2, 2);
if IsUpText('Take') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
end;
Flag;
Wait(1000 + Random(100));
end else
if (PickUpItems) then
ItemGrab;
until ((FindBitmapSpiralTolerance(PickHead, x, y, 550, 200, 745, 465, 50))
or (c >= 10));
if not (FindBitmapSpiralTolerance(PickHead, x, y, 550, 200, 745, 465, 50))
then
begin
NoPick := True;
Result := False;
Exit;
end;

WriteLn('Found Head');
GameTab(5);
Wait(250);
Mouse(XH, YH, 0, 0, True);
Wait(250);
GameTab(4);
Wait(250);

if (FindItemBmpTol(PickHandle, 50)) and (Findpickhead) then
begin
mouse(x,y,2,2,true)
Wait(1000);
ClickItemBmpTol(PickHandle, 50, True);
PickAxeAttached := PickAxeAttached + 1;
WriteLn('Attached Head & Handle');
NoPick := False;
Result := True;
Wait(3000);
ClickItemColor(hc1, True);
end;
end;
end;

//Originally by Stipidooo, edited alot by ~alex~
function FindPickHeadColor2: Boolean;
var
fx,fy:integer;
begin
pickaxehandle := DTMFromString('78DA6314616060106540017A0A0C0C2780342' +
'310FF0702465E208393010D302291405A0C48B01350234B841A25' +
'20C14D408D3A901020A0461848481350C307241408A811041262F' +
'8D50000C6310694');
GameTab(4);
Wait(2000);
if findDtm(pickaxehandle,x,y,566,191,605,252) or
(FindBitmapSpiralTolerance(PickAxeSteel, fx, fy, 546, 198, 745, 468, 100))
then
begin
hc1 := GetColor(575, 218);
hc2 := GetColor(587,217);
hc3 := GetColor(581,219);
hc4 := GetColor(594, 222);
hc5 := GetColor(579,219);
WriteLn('Pick head colors... ' + IntToStr(hc1) + ' ' + IntToStr(hc2) + ' ' +
IntToStr(hc3) + ' ' + IntToStr(hc4) + ' ' + IntToStr(hc5));
EquipPick := False;
Result := True;
end;
if (Result = False) then
begin
GameTab(5);
Wait(200 + Random(200));
if findDtm(pickaxehandle,x,y,567,285,615,330) or
(FindBitmapSpiralTolerance(PickAxeSteel, fx, fy, 546, 198, 745, 468, 100))
then
begin
hc1 := GetColor(586,294);
hc2 := GetColor(581,295);
hc3 := GetColor(600,298);
hc4 := GetColor(594, 293);
hc5 := GetColor(604,300);
WriteLn('Pick head colors... ' + IntToStr(hc1) + ' ' + IntToStr(hc2) + ' ' +
IntToStr(hc3) + ' ' + IntToStr(hc4) + ' ' + IntToStr(hc5));
EquipPick := true;
Result := True;
EquipPick := True;
Result := True;
end;
end;
if (Result = False) then
begin
WriteLn('');
WriteLn('ERROR! cannot find pick in screen, please put pick in inventory or your equip page and restart the script!');
WriteLn('');
Result := False;
end;
end;

function FindChatText2(txt: string): Boolean; //Chat(1)
var
x, y: Integer;
begin
Result := FindText(x, y, txt, SmallChars, 16,412, 479, 433);
end;

procedure look;
var
chatter:string;
begin
lastchatter(chatter)
if chatter = players[currentplayer].name then
begin
exit;
end;
if(FindChatText2('Lol'))or
(FindChatText2('Rofl'))or
(FindChatText2('Lmao'))or
(FindChatText2('Roflmao'))then
begin
wait(500)
case random(5) of
0:TypeSend('haha');
1:TypeSend('lol');
2:TypeSend('lool');
3:TypeSend('rofl');
4:TypeSend('lmao');

end;
end;

if(findchattext2('Mining lvl'))or
findchattext2('Minin lvl')or
findchattext2('mining lvls')or
findchattext2('minin lvls')then
begin
typesend(inttostr(getskilllevel('mining')))
gametab(4)
wait(500)
end;

if(findchattext2('Smithing lvl')) or
(findchattext2('Smithing level')) or
(findchattext2('Smithin lvl')) then
begin
typesend(inttostr(getskilllevel('smithing')))
gametab(4)
wait(500)
end;

if(findchattext2('Hey')) or
(findchattext2('hello')) or
(findchattext2('hi')) then
begin
wait(500)
case random(3) of
0:typesend('Hey')
1:typesend('Hi')
2:typesend('Hello')
end;
end;
end;

//************************************************************************//
// thanks Wt-Fakawi - Edited by ~Alex~

function FindFastRandoms: Boolean;
var
i: Integer;
begin
for I := 1 to 11 do
begin
case I of
1: if FindDead then
Result := True;

2: if FindMod then
Result := True;

3: if FindMime then
Result := True;

4: if FindMaze then
Result := True;

5: if FindQuiz then
Result := True;

6: if FindDemon then
Result := True;

7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;

8 : if RC then
Result := True;

9 : if FindFight then
begin
Result := True;
Runawaydirection('W')
runback;
end;

10: if FindTalk then
Result := True;

11: if not alexfindpick then
begin
if players[currentplayer].loc = 'mining' then
begin
players[currentplayer].loc := 'leaving guild'
end;
lostpick:=true
end;
12: if useresponder then
begin
look;
end;
end;
Wait(1);
end;
end;


function bankOpener : boolean;

var
tolerance:integer;
found:boolean;
begin
bankBooth1 := BitmapFromString(13, 9, 'z78DAADCD490E8340104' +
'3D12BF550D8AE65D3C3FD8F14225004A291B260F356D6379D010B' +
'770B2370D687BB1B2B3338B1D1A0B3320AA598575FB455B14E245' +
'7D4896245BBD839302E0E0586BB1E9518272665A64308CC17B93D' +
'DB446DFFCB4497FFECAAC4839C38D4A8BB256AD045288FD72CA8F' +
'6ED063376C0F4E4BE99D8D02D1D3A86F5478166F52FF77284ACBC' +
'E50733879C1F');

bankBooth2 := BitmapFromString(11, 1, 'z78DAB33034B33071B4A' +
'0800400DD030E45');

bankBooth3 := BitmapFromString(14, 1, 'z78DA3335333132B2302' +
'582347204626CA4AB913310229100E65111DD');

makecompass('N')
tolerance:=10
repeat
repeat
if (findbitmaptolerancein(bankBooth1,x,y,msx1,msy1,msx2,msy2,tolerance)) or
(findbitmaptolerancein(bankBooth2,x,y,msx1,msy1,msx2,msy2,tolerance)) or
(findbitmaptolerancein(bankBooth3,x,y,msx1,msy1,msx2,msy2,tolerance)) then
begin
mmouse(x,y,3,3)
wait(500+random(500))
tolerance := tolerance + 1
if (isuptextmulti('booth','ank','nk bo')) then
begin
found := true
end;
end;
if tolerance >=250 then
begin
writeln('Could not find booth')
result:=false
exit;
end;
until((found = true) or not(loggedin))



if (not (loggedin)) then
begin
loginplayer
end;

if found then
begin
mouse(x,y,4,4,false)
if clickoption('Use-quickly',1) then
begin
result:=true
clickedbank:=true
flag;
end else
begin
clickoption('Cancel',1)
clickedbank:=false
found:=false
end;
end else
begin
writeln('Could not find bank')
result:=false
end;
until(clickedbank=true)
freebitmap(bankbooth1)
freebitmap(bankbooth2)
freebitmap(bankbooth3)
end;


procedure walkToGuild;
Var inGuild:boolean;
begin //1
makecompass('N')
setrun(true)
gametab(4)
RadialWalkEx(x,y,MMCX,MMCY,findfallyroadcolor,40,120,175,70)
mouse(x,y,0,0,true)
findfastrandoms;
findnormalrandoms;
wait(10000+random(500))
flag;
if FindColorSpiralTolerance(x,y,0,MMX1,MMY1,MMX2,MMY2,0) then
begin //2
mouse(x,y,0,0,true)
flag;
repeat
if FindObj3(x,y,'Ladder',3565696,20) then
begin //3
mouse(x,y,0,0,false)
if clickoption('Climb-down',1) then
begin
flag;
inguild:=true
writeln('In guild')
players[currentplayer].loc :='mining'
wait(500+random(100))
mouse(697,89,8,8,true)
flag;
break;
end else
begin
clickoption('Cancel',1)
end;
end else
begin
writeln('Could not find ladder.')
nextplayer(false)
lastloggedout:=0
exit;
end;
until(inGuild)

end; //2
end;//1
procedure loadpickheads;

begin
runepickhead := BitmapFromString(5, 7, 'z78DA75CE410E803008' +
'04C02F15D85DE3B1B6F2FF27A9C1432FE54008038100841917920' +
'79C5DC029D76C5F98672414C2498B41E35533A536ECAD9CD65BAB' +
'AD55ABEFD3F255F1562F8D2439ABFF2B39A4ADD6571BAD5B6B7E0' +
'05A0A2C5F');

addypickhead := BitmapFromString(13, 6, 'z78DA9DD0410A43210' +
'C04D02B259949D165B5E4FE47AAFFC7851FA1481567233E268A8C' +
'A57290500480424741B820E85EF99AB762D70E348BF30469202AE' +
'B38EA46FD4FD3AE1431D7B748B65AB5CCC7AB86626DCFD5B18FC6' +
'D00647A686CE8E9E6D4F7E6C6AB733B5DBD9B59C77CF87B3B4FAA' +
'D7D01D2FC61AB');

mithpickhead := BitmapFromString(5, 7, 'z78DA7D8C510E80300C' +
'42AF5428DBBF5BEDFD8FE462FD983191267CF00A664B6032D57D5' +
'D834F3FDB10A52E06432C77B86BEC3F956342666C38CCAA5574CF' +
'19C8452174BCE89D977B7AB67896B7D697E6AF2E9D232F02');


steelpickhead := BitmapFromString(5, 6, '0000015C5656686161' +
'766E6D8379795A5454575151625B5A6B6363766E6D5751511C140' +
'0251A00837979766E6D1C1400251A002D1F007E7575766E6D1C14' +
'002D1F002D1F007A7171766E6D251A002D1F002D1F007C7373766' +
'E6D');

Ironpickhead := BitmapFromString(6, 7, 'z78DA75CE310EC03008' +
'03C02F1930A93236B4F9FF931A850C2C05C98B4F08608DD86BDD3' +
'A1B95EA6067F7CBC505D90E6B6B77522C2CAAAC464208A8CB0DE4' +
'856A6AAB8FCC659C93330D079D7ECC6E8F5106A39A7AE1D794363' +
'37FA8F901C2CC3452');


Bronzepickhead := BitmapFromString(6, 7, 'z78DA758E3112C430' +
'0803BF84241C5FCAD877FCFF49C70C2E68A242CDEE08CC32E0176' +
'1562DA7B217A75550AD0F179E84C2F6A59B1854701C2A4ECCD33F' +
'463ACDEC0E363C6F0D3C66B5D09D4EEB1F0F6DAA1CBF74218ED37' +
'E3EB4397DE1CDF903A4103465');

end;

procedure freepickheads;
begin
freebitmap(bronzepickhead);
freebitmap(ironpickhead);
freebitmap(steelpickhead)
freebitmap(mithpickhead)
freebitmap(addypickhead)
freebitmap(runepickhead)
end;

procedure findbestpick;
var
newpick:boolean;
begin
loadpickheads;
if lostpick then
begin
depositall;
if (FindBitmapTolerancein(runepickhead,x,y,MSX1,MSY1,MSX2,MSY2,10)) and (mininglvl >40) then
begin
mouse(x,y,2,2,true)
lostpick:=false
closebank;
wait(500+random(300))
mouse(586, 218,0,0,true)
newpick:=true
end;
if FindBitmapTolerancein(addypickhead,x,y,MSX1,MSY1,MSX2,MSY2,10) and (mininglvl >=31) then
begin
mouse(x,y,2,2,true)
lostpick:=false
closebank;
wait(500+random(300))
mouse(586, 218,0,0,true)
newpick:=true
end;
if findbitmaptolerancein(mithpickhead,x,y,MSX1,MSY1,MSX2,MSY2,10) and (mininglvl >=21) then
begin
mouse(x,y,2,2,true)
lostpick:=false
closebank;
wait(500+random(300))
mouse(586, 218,0,0,true)
newpick:=true
end;
if findbitmaptolerancein(steelpickhead,x,y,MSX1,MSY1,MSX2,MSY2,10) and (mininglvl >=6) then
begin
mouse(x,y,2,2,true)
lostpick:=false
closebank;
wait(500+random(300))
mouse(586, 218,0,0,true)

newpick:=true
end;
if findbitmaptolerancein(ironpickhead,x,y,MSX1,MSY1,MSX2,MSY2,10) and (mininglvl >=0)then
begin
mouse(x,y,2,2,true)
lostpick:=false
closebank;
wait(500+random(300))
mouse(586, 218,0,0,true)

newpick:=true
end;
if findbitmaptolerancein(bronzepickhead,x,y,MSX1,MSY1,MSX2,MSY2,10) and (mininglvl >=0) then
begin
mouse(x,y,2,2,true)
lostpick:=false
closebank;
wait(500+random(300))
mouse(586, 218,0,0,true)

newpick:=true
end;
if newpick then
begin
players[currentplayer].loc := 'going to guild'
exit;
end else
begin
writeln('Could not find any more picks in bank')
closebank;
nextplayer(false)
lastloggedout:=0
end;
end;
freepickheads;
end;

procedure depositOres;
var
tempores:integer;
begin
invCoal := BitmapFromString(8, 7, 'z78DA8D8D410E80300804BF5' +
'4966DC523B6FEFF4B9AE2A18D361192098101A449930C878BE3BC' +
'33299540D43D2417362293AE07088ABDFD91CFD6CADF75439958B' +
'5C262EBE3F2E04CECFD30FFFBF16532177E9823479389091E8CA9' +
'98586A17A065467A');

pickaxehandle := DTMFromString('78DA6314616060106540017A0A0C0C2780342' +
'310FF0702465E208393010D302291405A0C48B01350234B841A25' +
'20C14D408D3A901020A0461848481350C307241408A811041262F' +
'8D50000C6310694');
mininglvl:= GetSkillLevel('Mining')
tempores := countitembmptol(invCoal,20)

if findDtm(pickaxehandle,x,y,566,191,605,252) then
begin
writeln('Pickfound in inv.')
players[currentplayer].boolean1 := false
freedtm(pickaxehandle)
end else
begin
gametab(5)
if findDtm(pickaxehandle,x,y,567,285,615,330) then
begin
writeln('Found pickaxe equiped.')
players[currentplayer].boolean1 :=true
freedtm(pickaxehandle)
lostpick:=false
end else
begin
writeln('Cannot find pickaxe on character. Looking in bank.')
lostpick:=true
end;
end;
if lostpick then
begin
mouse(592,304,3,3,true)
gametab(4)
end;
if bankopener then
begin
if pinscreen then
begin
writeln('Found pinscreen, remove pin')
nextplayer(false)
lastloggedout:=0
end else
begin
wait(2000)
fixbank;
if lostpick then findbestpick;

if players[currentplayer].boolean1 = true then
begin
depositall;
closebank;
players[currentplayer].banked:= players[currentplayer].banked + 1
players[currentplayer].integer2:= players[currentplayer].integer2+tempores
if players[currentplayer].integer2 > players[currentplayer].integer1 then
begin
writeln('w00t all ores mined.')
tempores:=0
progressreport;
players[currentplayer].loc := 'going to guild'
nextplayer(true)
lastloggedout:=0
exit;
end;
tempores:=0
progressreport;
players[currentplayer].loc := 'going to guild'
end else
begin
deposit(2,28,2)
closebank;
players[currentplayer].banked:= players[currentplayer].banked + 1
players[currentplayer].integer2:= players[currentplayer].integer2+tempores
if players[currentplayer].integer2 >= players[currentplayer].integer1 then
begin
writeln('w00t all ores mined.')
tempores:=0
progressreport;
players[currentplayer].loc := 'going to guild'
nextplayer(true)
lastloggedout:=0
exit;
end;
tempores:=0
progressreport;
players[currentplayer].loc := 'going to guild'
end;
end;
end;
if lastloggedout + logouteveryores+random(30) <= players[currentplayer].integer2 then
begin
lastloggedout := players[currentplayer].integer2 + 1
logout;
wait(60000+random(20000))
LoginPlayer;
end;
end;


procedure walkToBank;
var
banksymbol:integer;
bankfound:boolean;
walkingattempts:integer;
begin
if findcolortolerance(x,y,6082797,mmx1,mmy1,mmx2,mmy2,80) then
begin
mouse(x,y+10,0,0,true)
bankfound:=true
wait(20000+random(500))
flag;
wait(1000);
players[currentplayer].loc := 'in bank'
exit;
end else
begin
mouse(663,24,4,4,true)
wait(10000+random(1500))
flag;
wait(300)
walktobank;
end;
end;

procedure leaveMiningGuild;
var
wentUp:boolean;
mmrockcolor,mmrock,orangerock,i:integer;
acc:extended;
begin
attempt:=0

mmGuildladder := BitmapFromString(4, 3, 'z78DA3376353436303' +
'0C6419A3A9BB818A190B854020027610F13');


mmRock := BitmapFromString(5, 5, 'z78DA33363632357235B1347' +
'63231839066C6A6A6A62E101297387E59647164596411630C7B91' +
'490089AA205D');
mmorangerock := BitmapFromString(4, 1, '433C2159442E7850348' +
'F644F');
orangerock := DTMFromString('78DA6364676060606540010556420C72409A1' +
'188FF0301230B90C18CAAC65A8D01AE06041841E630A1AA69F7D3' +
'4555C385690E861A90391C04EC02B9971D554DA01E0FAA1A664C7' +
'FA1AB0100517209C1');

attempt:=0
i:=0
if FindBitmapToleranceIn(mmrock,x,y,mmx1,mmy1,mmx2,mmy2,50) then
begin
mmrockcolor:=getcolor(x,y)
writeln('Rock color:' +inttostr(mmrockcolor))
freebitmap(mmrock)
repeat
attempt:=attempt+1;
RadialWalkEx(x,y,MMCX,MMCY,MMROCKCOLOR,30,210,295,50)
mouse(x,y,0,0,true)
flag;
wait(2000)
RadialWalkEx(x,y,MMCX,MMCY,MMROCKCOLOR,30,210,295,50)
mouse(x,y,1,1,true)
wait(2000+random(500))
flag;
wait(100+random(500))
mouse(590,66,5,5,true)
flag;
break;
if attempt=10 then begin Logout; exit; end;
until( FindColor(x,y,669784,MMX1,MMY1,648,123) or(attempt>10) )
makecompass('W')
end else
writeln('Cannot autocolor minimap rocks')
repeat
if attempt > 15 then
begin
writeln('Could not find ladder inside guild')
nextplayer(false)
lastloggedout:=0
exit;
end;
lowestangle
wait(2500)
if FindObj3(x,y,'Ladder',669784,15) then
begin
mouse(x,y,0,0,false)
if clickoption('Climb-up',1) then
begin
wentup:=true
attempts:=0
writeln('Left the guild')
flag;
wait(3000+random(200))
highestangle;
makecompass('N')
players[currentplayer].loc := 'walking to bank'
exit;
end else
begin
clickoption('Cancel',1)
attempts:=attempts +1
end;
end else
begin
i:=i+1
if i = 1 then
begin
makecompass('S')
end;
if i = 2 then
begin
makecompass('E')
end;
if i = 3 then
begin
makecompass('N')
if i > 3 then
begin
writeln('Cant find the ladder inside guild.')
Nextplayer(false)
lastloggedout:=0
exit;
end;
end;
end;
until(wentup = true)
end;



procedure antiBannage;
begin
case random(6) of
0: randomchat;
1: begin
randomrclick;
clickoption('ancel',1);
end;
2: pickupmouse
3: hoverskill('Mining',false)
4: antiban;
5: boredhuman
end;
antibantime:=0
end;

procedure loadCoalBmps;
begin
coalRock1 := BitmapFromString(1, 8, '2F2F203938273C3C294444' +
'2F44442F44442F44442F484831');

coalRock2 := BitmapFromString(1, 6, 'z78DA3376367636B234C64' +
'B020094EC080B');

coalRock3 := BitmapFromString(1, 8, '44442F48483144442F4444' +
'2F41412B41412B3C3C293C3C29');
end;

procedure freeCoalBmps;
begin
freebitmap(coalRock1)
freebitmap(coalRock2)
freebitmap(coalrock3)
end;

// By Sumilion and Lorax -- Edited by startblaster
Function UpdateCoords(Var cx, cy: Integer; ax, ay, TheColor, Tol: Integer): Boolean;
var
Counter: Integer;
Begin
If (ax < 20) then ax := 20; If (ay < 20) then ay := 20;
While (FlagPresent) and (FindColorSpiralTolerance(cx, cy, TheColor, ax-20, ay-20, ax+20, ay+20, Tol)) do
begin
ax := cx; ay := cy;
Wait(15);
end;
If (ax < 10) then ax := 10; If (ay < 10) then ay := 10;
While (FindColorSpiralTolerance(cx, cy, TheColor, ax-10, ay-10, ax+10, ay+10, Tol)) and (Counter < 60) do
begin
ax := cx; ay := cy;
Counter := Counter + 1;
Wait(15);
end;
Result := FindColorSpiralTolerance(cx, cy, TheColor, ax-10, ay-10, ax+10, ay+10, Tol);
if (not Result) then
else
end;


function findrocks:boolean;
var
Attempts:integer;
begin
if invcount=28 then
begin
players[currentplayer].loc := 'leaving guild'
exit;
end;
makecompass('N')
highestangle;
rockfound:=false
repeat
attempts:=attempts+1
if attempts >= 10 then
begin
writeln('Could Not Find A rock')
result:=false
break;
end;
if not loggedin then
begin
loginplayer;
findrocks;
end;
x:=MSCX
y:=MSCY
if (FindBitmapspiralTolerance(coalRock2,x,y,MSX1,MSY1,MSX2,MSY2,10)) or (FindBitmapspiralTolerance(coalRock1,x,y,MSX1,MSY1,MSX2,MSY2,10)) or (FindBitmapspiralTolerance(coalRock3,x,y,MSX1,MSY1,MSX2,MSY2,10)) then
begin
MMouse(x,y,2,2)
if IsUpText('Mine') then
begin
rockcolor:=getcolor(x,y)
rockfound:=true
result:=true
end else
begin
rockfound:=false
end;
end;
until(rockfound = true)
end;



procedure mineIt;
var cx,cy,rockcolor2,timer,leftorright:integer;

begin
leftorright:=0
leftorright:= 1+random(9)
if invcount=28 then
begin
players[currentplayer].loc := 'leaving guild'
exit;
end;
if rockfound then
begin
if leftorright >=8 then
begin
mouse(x,y,3,3,false)
clickoption('Mine',1)
end else
begin
mouse(x,y,0,0,true)
end;
if UpdateCoords(cx,cy,x,y,rockcolor,10) then
begin
findfastrandoms
findnormalrandoms
rockcolor2:=getcolor(cx,cy)
marktime(timer)
repeat
findfastrandoms
wait(50)
if findnormalrandoms then
begin
players[currentplayer].loc:= 'mining'
end;
if findchattext2('ge to') then break;
if gascheck(cx,cy) then
begin
findrocks;
exit;
end;
if timefrommark(timer) > 12000 then
begin
exit;
end;
until(not(getcolor(cx,cy) = rockcolor2))
end;
end else
begin
mouse(79+random(320),72+random(250),0,0,false)
clickoption('Walk here',1)
findfastrandoms;
findnormalrandoms
flag;
exit;
players[currentplayer].loc :='mining'
end;
players[currentplayer].loc :='mining'
end;

procedure getChangeLog;
begin
writeln('')
writeln('//------------- Changelog --------------\')
writeln('')
writeln('///////////////////////////////////////////')
writeln('Version 1.00')
writeln('')
writeln('Original Release')
writeln('')
writeln('')
Writeln('Version 1.1')
Writeln('')
Writeln('Fixed randoms ... maybe')
Writeln('Axe can be in inv or equipped')
Writeln('Fixed bank symbol')
Writeln('Fixed walking before ladder')
Writeln('You no longer move your mouse over a rock while mining it')
writeln('')
Writeln('Version 1.2')
Writeln('')
writeln('Added findpick head.')
Writeln('Added small auto responder')
writeln('')
writeln('Version 1.22')
writeln('')
writeln('Removed stuff used in testing 1.2')
writeln('')
writeln('Version 1.3')
writeln('')
writeln('Now if you lose ure pick head it will automatically search')
writeln('the bank for the best one there, and attempt to equipt it!')
writeln('Antirandoms should be fixed')
writeln('Autoresponder is now optional, scripts goes alot fast without it')
writeln('You should now always click the closest rock to you')
writeln('///////////////////////////////////////////')
end;

procedure checkVersion;
var
versionString:string;
Version:extended;
begin
cleardebug;
writeln('//--------------------------------------\')
writeln('// Checking script version \')
writeln('//--------------------------------------\')

versionstring:=(getpage('http://www.freewebs.com/scaralex/ScriptVersions/GuildMiner.txt'))
version:= strtofloat(versionstring)
if version > strtofloat(versionnumber) then
begin
writeln('//There is an updated version of the script!\')
writeln('Go to [url]http://www.villavu.com/forum/showthread.php?t=8439[/url] to download update!')
writeln('//////////////////////////////////////////////')
terminatescript;
end else
writeln('//You have the most recent version \')
writeln('//////////////////////////////////////////')
end;

begin
checkversion;
getChangelog;
setupsrl;
MouseSpeed:=10;
setupplayers;
activateclient;
repeat
if antibantime >= 20 then
begin
antibannage;
end else
if not loggedin then
begin
loginplayer;
findpickheadcolor2;
end;
begin
antibantime:= antibantime + 1
end;
if players[currentplayer].loc = '' then
begin
players[currentplayer].loc := 'in bank'
end;

if players[currentplayer].loc = 'in bank' then
begin
depositores;
end;

if players[currentplayer].loc ='mining' then
begin
loadcoalbmps;
findrocks;
freecoalbmps;
end;

if players[currentplayer].loc ='mining' then
begin
mineIt;
end;

if players[currentplayer].loc = 'leaving guild' then
begin
leaveminingguild;
end;
if players[currentplayer].loc = 'going to guild' then
begin
findpickheadcolor2;
walktoguild;
end;
if players[currentplayer].loc = 'walking to bank' then
begin
walktobank;
end;
until(false)
end.

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

Rencuz

2007-04-19 13:44:54

Yea i vote yes because i have seen your scripts what are very good but i havent got chance to use them ;D Yes

~alex~

2007-04-19 13:48:53

Thanks :D

JAD

2007-04-19 14:49:07

I don't get why you have correct standards in most places, then you have some places like this:


procedure getChangeLog;
begin
writeln('')
writeln('//------------- Changelog --------------\\')
writeln('')
writeln('///////////////////////////////////////////')
writeln('Version 1.00')
writeln('')
writeln('Original Release')
writeln('')
writeln('')
Writeln('Version 1.1')
Writeln('')
Writeln('Fixed randoms ... maybe')
Writeln('Axe can be in inv or equipped')
Writeln('Fixed bank symbol')
Writeln('Fixed walking before ladder')
Writeln('You no longer move your mouse over a rock while mining it')
writeln('')
Writeln('Version 1.2')
Writeln('')
writeln('Added findpick head.')
Writeln('Added small auto responder')
writeln('')
writeln('Version 1.22')
writeln('')
writeln('Removed stuff used in testing 1.2')
writeln('')
writeln('Version 1.3')
writeln('')
writeln('Now if you lose ure pick head it will automatically search')
writeln('the bank for the best one there, and attempt to equipt it!')
writeln('Antirandoms should be fixed')
writeln('Autoresponder is now optional, scripts goes alot fast without it')
writeln('You should now always click the closest rock to you')
writeln('///////////////////////////////////////////')
end;
You should space out those writeln's and things like that, but other then that, looks great! I vote yes too :D

Smartzkid

2007-04-19 15:14:29

I like it, and I'll probably vote for you…

Just gonna wait for Yohojo's verification

~alex~

2007-04-19 15:22:39

From: Smartzkid

Just gonna wait for Yohojo's verification


Huh?

Wizzup?

2007-04-19 15:31:10

From: Smartzkid
I like it, and I'll probably vote for you…

Just gonna wait for Yohojo's verification


Look in his sig silly. :p

Bam Bam

2007-04-19 15:32:46

I voted for you :)

Smartzkid

2007-04-19 15:33:43

Ooo after what Wizzup said…Looks good!

I voted for you :p

GL

EDIT:

hah, I nearly voted no

~alex~

2007-04-19 15:34:40

Yay thanks for the votes people :D

JuKKa

2007-04-19 16:15:24

good looking script!
-Yes

YoHoJo

2007-04-19 16:44:30

Looks fine to me OMFG.
I just dont get why you have all of the SRL procedures at the top.
Also, id chop down some of your bitmaps, or just make DTMs they are a lot faster.
Try reading my tut about them in Intermediate Tutorial Section.

I can tell you worked hard on this and i think you will continue to do so.

w0ot.

Johura

2007-04-19 19:58:18

3 reasons i voted for you. Nice script. You have already contributed heaps to Srl forums. And you help alot of people in the scripting help section :)

Bobarkinator

2007-04-19 20:54:59

Good script, I've seen you around and you are a very helping person so it's a definite yes for you!

Rune Hacker

2007-04-19 23:03:53

Gotta say yes, great script. I was wondering when you would go for members lol.

~alex~

2007-04-20 02:35:29

Thanks guys

WT-Fakawi

2007-04-20 08:41:35

In. Welcome…