SRL Archive - Help and Support

Never Dealt with a Acess Violation Oo


Claymore

2009-06-15 11:02:04

[Error]: Access violation at address 00529608 in module 'scar.exe'. Read of address 00000234

From the scripts: Mine Mine and other reflection based scripts.

any ideas?

Naum

2009-06-15 11:12:41

An access violation occurs when you are trying to access something which is not there, such as a bitmap.

Please post the whole script so people can aid you further.

Claymore

2009-06-15 11:49:15

hmm, maybe some reflection thingy?


program MineMine;
{.include SRL\SRL\Misc\Smart.scar}
{.include SRl/SRl.scar}
{.include srl/srl/reflection/reflection.scar}



var
frmDesign : TForm;
PageControl : TPageControl;
TabPages : array of TTabSheet;
PlayersZ : array of TGroupBox;
Label2,Label3,Label4,Label5,Label10: array of TLabel;
Label6,Label7,Label8,Label9 : array of TLabel;
Username,Edit2,Edit3 : array of TEdit;
Button2 : array of TButton;
Button1: array of TButton;
Edit4,Edit5: array of Tedit;
GroupBox2 : array of TGroupBox;
ComboBox1,ComboBox2 : array of TComboBox;
Clays,Cooks,Meh,Iz,LoadsLeft,I: integer;
Sleeps: Integer;
Sleepss: Integer;
F,S : Integer;
Id : TIntegerArray;
Rock: TPoint;

Const
SmartWorld = 8; // Change Please.
TakeShortBreaks = true; // 5 min every 50-70 mins great 2 avoid randoms
Members = False;



{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Procedure StartButton(sender : Tobject);
By: Nicbaz
Description: Start
Status: yeahhh
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure MainLoop; Forward;
procedure LoadSettings(I: integer); forward;
procedure SaveSetting; forward;
Procedure StartButton(sender : Tobject);
begin
SaveSetting;
FrmDesign.modalresult := mrOk;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure Updatecode(Sender: TObject);
By: Nicbaz
Description: UpdateCode
Status: yeahhh
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure Updatecode(Sender: TObject);
var
t: integer;

begin
t := howmanyplayers - 1;
with ComboBox2[t].Items do
begin
Clear;
case lowercase(ComboBox1[t].Text) of
'draynor':
begin
Add('coal');
Add('mith');
Add('addy');
end;
'varrock east':
begin
Add('iron');
Add('tin');
Add('copper');
end;
'varrock west':
begin
Add('iron');
Add('tin');
Add('copper');
Add('clay');
Add('silver');
Add('gold');
end;
'edgeville':
begin
Add('coal');
end;
'al-karid':
begin
Add('addy');
Add('iron');
Add('copper');
Add('iron');
Add('silver');
Add('coal');
end;
'rimmington':
begin
Add('iron');
Add('tin');
Add('copper');
Add('clay');
Add('silver');
Add('gold');
end;
{ 'draynor':
begin
Add('iron');
Add('tin');
Add('copper');
Add('clay');
Add('silver');
Add('gold');
end; }

end;
end;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Procedure AddPlayer(sender : Tobject);
By: Nicbaz
Description: Add's Player
Status: yeahhh
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Procedure DeclarePlayers; forward;
Procedure AddPlayer(sender:Tobject);
var
t: integer;
begin
inc(howmanyPlayers);
SetArraylength(UserName, Howmanyplayers);
SetArraylength(Edit2, Howmanyplayers);
SetArraylength(Edit3, Howmanyplayers)
SetArraylength(TabPages, Howmanyplayers);
SetArraylength(Playersz, Howmanyplayers);
SetArraylength(Label2, Howmanyplayers);
SetArraylength(Label3, Howmanyplayers);
SetArraylength(Label4, Howmanyplayers);
SetArraylength(Label5, Howmanyplayers);
SetArraylength(Button2, Howmanyplayers);
SetArraylength(Label10, Howmanyplayers)
SetArraylength(Button1, Howmanyplayers);
SetArraylength(ComboBox2, Howmanyplayers);
SetArraylength(ComboBox1, Howmanyplayers);
SetArraylength(GroupBox2, Howmanyplayers);
SetArraylength(Edit4, Howmanyplayers);
SetArraylength(Edit5, Howmanyplayers);
SetArraylength(Label6, Howmanyplayers);
SetArraylength(Label7, Howmanyplayers);
SetArraylength(Label8, Howmanyplayers);
SetArraylength(Label9, Howmanyplayers);

t := howmanyplayers - 1;

TabPages[t] := TTabSheet.Create(frmDesign);
TabPages[t].PageControl := PageControl;
TabPages[t].Caption := 'Player ' + inttostr(howmanyplayers);

Playersz[t] := TGroupBox.Create(frmDesign);
Playersz[t] := TGroupBox.Create(FrmDesign);
with Playersz[t] do
begin
Parent := TabPages[t];
Left := 12;
Top := 40;
Width := 161;
Height := 161;
Caption := 'Players';
TabOrder := 0;
end;
Label10[t] := TLabel.Create(Playersz[t]);
with Label10[t] do
begin
Parent := Playersz[t];
Left := 12;
Top := 120;
Width := 70;
Height := 25;
Caption := 'Player :'+IntToStr(t)+'';
end;

Label2[t] := TLabel.Create(Playersz[t]);
with Label2[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 32;
Width := 22;
Height := 13;
Caption := 'User';
end;
Label3[t] := TLabel.Create(Playersz[t]);
with Label3[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 32;
Width := 22;
Height := 13;
Caption := 'User';
end;
Label4[t] := TLabel.Create(Playersz[t]);
with Label4[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 80;
Width := 22;
Height := 13;
Caption := 'Nick';
end;
Label5[t] := TLabel.Create(Playersz[t]);
with Label5[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 56;
Width := 23;
Height := 13;
Caption := 'Pass';
end;
Username[t] := TEdit.Create(Playersz[t]);
with Username[t] do
begin
Parent := Playersz[t];
Left := 48;
Top := 32;
Width := 105;
Height := 21;
TabOrder := 0;
Text := 'Username';
end;
Edit2[t] := TEdit.Create(Playersz[t]);
with Edit2[t] do
begin
Parent := Playersz[t];
Left := 48;
Top := 56;
Width := 105;
Height := 21;
TabOrder := 1;
Text := 'Password';
end;
Edit3[t] := TEdit.Create(Playersz[t]);
with Edit3[t] do
begin
Parent := Playersz[t];
Left := 48;
Top := 80;
Width := 49;
Height := 21;
TabOrder := 2;
Text := 'Nick';
end;
Button2[t] := TButton.Create(TabPages[t]);
with Button2[t] do
begin
Parent := TabPages[t];
Left := 12;
Top := 13;
Width := 70;
Height := 25;
Caption := 'Add Player';
TabOrder := 3;
Onclick:= @AddPlayer
end;
Button1[t] := TButton.Create(frmDesign);
with Button1[t] do
begin
Parent := frmDesign;
Left := 190;
Top := 184;
Width := 60;
Height := 41;
OnClick:= @StartButton;
Caption := 'Start Script';
TabOrder := 0;
end;
GroupBox2[t] := TGroupBox.Create(frmDesign);
with GroupBox2[t] do
begin
Parent := TabPages[t];
Left := 260;
Top := 40;
Width := 161;
Height := 161;
Caption := 'Setup';
TabOrder := 1;
end;
Label6[t] := TLabel.Create(GroupBox2[t]);
with Label6[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 24;
Width := 17;
Height := 13;
Caption := 'City';
end;
Label7[t] := TLabel.Create(GroupBox2[t]);
with Label7[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 64;
Width := 22;
Height := 13;
Caption := 'Rock';
end;
Label8[t] := TLabel.Create(GroupBox2[t]);
with Label8[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 104;
Width := 35;
Height := 13;
Caption := 'SRL ID';
end;
Label9[t] := TLabel.Create(GroupBox2[t]);
with Label9[t] do
begin
Parent := GroupBox2[t];
Left := 80;
Top := 104;
Width := 52;
Height := 13;
Caption := 'SRL PASS';
end;
ComboBox1[t] := TComboBox.Create(GroupBox2[t]);
with ComboBox1[t] do
begin
Parent := GroupBox2[t];
Left := 40;
Top := 24;
Width := 97;
Height := 21;
ItemHeight := 13;
TabOrder := 0;
Text := 'City';
with Items do
begin
Add('draynor');
Add('varrock east');
Add('varrock west');
Add('edgeville');
Add('al-karid');
{ Add('Draynor'); }
Add('rimmington');
end;
ComboBox1[t].OnChange:=@UpdateCode;
end;
ComboBox2[t] := TComboBox.Create(GroupBox2[t]);
with ComboBox2[t] do
begin
Parent := GroupBox2[t];
Left := 40;
Top := 64;
Width := 97;
Height := 21;
ItemHeight := 13;
TabOrder := 1;
Text := 'Rock';
end;
Edit4[t] := TEdit.Create(GroupBox2[t]);
with Edit4[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 120;
Width := 41;
Height := 21;
TabOrder := 2;
Text := 'ID';
end;
Edit5[t] := TEdit.Create(GroupBox2[t]);
with Edit5[t] do
begin
Parent := GroupBox2[t];
Left := 80;
Top := 120;
Width := 41;
Height := 21;
TabOrder := 3;
Text := 'Pass';
end;

PageControl.ActivePageIndex := t;
LoadSettings(T);
Iz:= Iz + 1;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure InitForm;
By: Nicbaz
Description: Form
Status: yeahhh
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure InitForm;
var
t : Integer;

begin

Inc(Howmanyplayers);
t := Howmanyplayers - 1;
SetArraylength(UserName, Howmanyplayers);
SetArraylength(Edit2, Howmanyplayers);
SetArraylength(Edit3, Howmanyplayers)
SetArraylength(TabPages, Howmanyplayers);
SetArraylength(Playersz, Howmanyplayers);
SetArraylength(Label2, Howmanyplayers);
SetArraylength(Label3, Howmanyplayers);
SetArraylength(Label4, Howmanyplayers);
SetArraylength(Label5, Howmanyplayers);
SetArraylength(Button2, Howmanyplayers);
SetArraylength(Label10, Howmanyplayers)
SetArraylength(Button1, Howmanyplayers);
SetArraylength(ComboBox2, Howmanyplayers);
SetArraylength(ComboBox1, Howmanyplayers);
SetArraylength(GroupBox2, Howmanyplayers);
SetArraylength(Edit4, Howmanyplayers);
SetArraylength(Edit5, Howmanyplayers);
SetArraylength(Label6, Howmanyplayers);
SetArraylength(Label7, Howmanyplayers);
SetArraylength(Label8, Howmanyplayers);
SetArraylength(Label9, Howmanyplayers);


frmDesign := CreateForm;
with frmDesign do
begin
BorderIcons := [biMinimize,biSystemMenu];
Left := 275;
Top := 114;
Width := 446;
Height := 275;
Caption := 'Mine Mine';
Color := $00f5faf9;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'MS Sans Serif';
Font.Style := [];
PixelsPerInch := 96;
end;
PageControl := TPageControl.Create(frmDesign);
PageControl.Parent := frmDesign;
PageControl.Align := alClient;

TabPages[t] := TTabSheet.Create(frmDesign);
TabPages[t].PageControl := PageControl;
TabPages[t].Caption := 'Player ' + inttostr(howmanyplayers);


Playersz[t] := TGroupBox.Create(FrmDesign);
with Playersz[t] do
begin
Parent := TabPages[t];
Left := 12;
Top := 40;
Width := 161;
Height := 161;
Caption := 'Players';
TabOrder := 0;
end;

Label10[t] := TLabel.Create(Playersz[t]);
with Label10[t] do
begin
Parent := Playersz[t];
Left := 12;
Top := 120;
Width := 70;
Height := 25;
Caption := 'Player :'+IntToStr(t)+'';
end;

Label2[t] := TLabel.Create(Playersz[t]);
with Label2[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 32;
Width := 22;
Height := 13;
Caption := 'User';
end;
Label3[t] := TLabel.Create(Playersz[t]);
with Label3[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 32;
Width := 22;
Height := 13;
Caption := 'User';
end;
Label4[t] := TLabel.Create(Playersz[t]);
with Label4[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 80;
Width := 22;
Height := 13;
Caption := 'Nick';
end;
Label5[t] := TLabel.Create(Playersz[t]);
with Label5[t] do
begin
Parent := Playersz[t];
Left := 16;
Top := 56;
Width := 23;
Height := 13;
Caption := 'Pass';
end;
Username[t] := TEdit.Create(Playersz[t]);
with Username[t] do
begin
Parent := Playersz[t];
Left := 48;
Top := 32;
Width := 105;
Height := 21;
TabOrder := 0;
Text := 'Username';
end;
Edit2[t] := TEdit.Create(Playersz[t]);
with Edit2[t] do
begin
Parent := Playersz[t];
Left := 48;
Top := 56;
Width := 105;
Height := 21;
TabOrder := 1;
Text := 'Password';
end;
Edit3[t] := TEdit.Create(Playersz[t]);
with Edit3[t] do
begin
Parent := Playersz[t];
Left := 48;
Top := 80;
Width := 49;
Height := 21;
TabOrder := 2;
Text := 'Nick';
end;
Button2[t] := TButton.Create(TabPages[t]);
with Button2[t] do
begin
Parent := TabPages[t];
Left := 12;
Top := 13;
Width := 70;
Height := 25;
Caption := 'Add Player';
TabOrder := 3;
Onclick:= @AddPlayer;
end;
Button1[t] := TButton.Create(frmDesign);
with Button1[t] do
begin
Parent := frmDesign;
Left := 190;
Top := 184;
Width := 60;
Height := 41;
OnClick:= @StartButton;
Caption := 'Start Script';
TabOrder := 0;
end;
GroupBox2[t] := TGroupBox.Create(frmDesign);
with GroupBox2[t] do
begin
Parent := TabPages[t];
Left := 260;
Top := 40;
Width := 161;
Height := 161;
Caption := 'Setup';
TabOrder := 1;
end;
Label6[t] := TLabel.Create(GroupBox2[t]);
with Label6[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 24;
Width := 17;
Height := 13;
Caption := 'City';
end;
Label7[t] := TLabel.Create(GroupBox2[t]);
with Label7[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 64;
Width := 22;
Height := 13;
Caption := 'Rock';
end;
Label8[t] := TLabel.Create(GroupBox2[t]);
with Label8[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 104;
Width := 35;
Height := 13;
Caption := 'SRL ID';
end;
Label9[t] := TLabel.Create(GroupBox2[t]);
with Label9[t] do
begin
Parent := GroupBox2[t];
Left := 80;
Top := 104;
Width := 52;
Height := 13;
Caption := 'SRL PASS';
end;
ComboBox1[t] := TComboBox.Create(GroupBox2[t]);
with ComboBox1[t] do
begin
Parent := GroupBox2[t];
Left := 40;
Top := 24;
Width := 97;
Height := 21;
ItemHeight := 13;
TabOrder := 0;
Text := 'City';
with Items do
begin
Add('draynor');
Add('varrock east');
Add('varrock west');
Add('edgeville');
Add('al-karid');
Add('rimmington');
{ Add('Draynor'); }
end;
ComboBox1[t].OnChange:=@UpdateCode;
end;
ComboBox2[t] := TComboBox.Create(GroupBox2[t]);
with ComboBox2[t] do
begin
Parent := GroupBox2[t];
Left := 40;
Top := 64;
Width := 97;
Height := 21;
ItemHeight := 13;
TabOrder := 1;
Text := 'Rock';
end;
Edit4[t] := TEdit.Create(GroupBox2[t]);
with Edit4[t] do
begin
Parent := GroupBox2[t];
Left := 8;
Top := 120;
Width := 41;
Height := 21;
TabOrder := 2;
Text := 'ID';
end;
Edit5[t] := TEdit.Create(GroupBox2[t]);
with Edit5[t] do
begin
Parent := GroupBox2[t];
Left := 80;
Top := 120;
Width := 41;
Height := 21;
TabOrder := 3;
Text := 'Pass';
end;
Pagecontrol.Activepageindex := 0;
LoadSettings(0);
end;

procedure SaveSetting;
var
path:string;
i:integer;
begin
Path := AppPath+'minemine.ini';
for i := 0 to (HowManyPlayers -1) do
begin
WriteINI('Player'+inttostr(i),'User',Username[i].Text,Path);
WriteINI('Player'+inttostr(i),'Pass',Edit2[i].Text,Path);
WriteINI('Player'+inttostr(i),'Nick',Edit3[i].Text,Path);
WriteINI('Settings'+inttostr(i),'Id',Edit4[i].Text,Path);
WriteINI('Settings'+inttostr(i),'IdPass',Edit5[i].Text,Path);
WriteINI('Player'+inttostr(i),'Loc',ComboBox1[i].Text,Path);
WriteINI('Player'+inttostr(i),'Tree',ComboBox2[i].Text,Path);

end;
end;

procedure LoadSettings(I: integer);
var
path:string;
begin
Path := AppPath+'minemine.ini';
if not FileExists(path) then Exit;

UserName[i].Text := ReadINI('Player'+inttostr(i),'User',path);
Edit2[i].Text := ReadINI('Player'+inttostr(i),'Pass',path);
Edit3[i].Text := ReadINI('Player'+inttostr(i),'Nick',path);
eDIT4[i].Text := ReadINI('Player'+inttostr(i),'id',Path);
Edit5[i].Text := ReadINI('Player'+inttostr(i),'IdPass',Path);
ComboBox1[i].Text := ReadINI('Player'+inttostr(i),'Loc',Path);
ComboBox2[i].Text := ReadINI('Player'+inttostr(i),'Tree',Path);
end;


{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure Setup
By: Nicbaz
Description: SetsUpForm
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure SafeInitForm;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('InitForm', V);
end;

procedure ShowInitFormModal;
begin
frmDesign.ShowModal;
end;

procedure SafeShowInitFormModal;
var
V : TVariantArray;
begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowInitFormModal', V);
end;

procedure MainInitForm;
begin
SafeInitForm;
SafeShowInitFormModal;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure DeclarePlayers;
By: Nicbaz
Description: Declare The Players for the login Array.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Procedure DeclarePlayers;
var
p : integer;
begin
NumberOfplayers(howmanyplayers);
Currentplayer := 0;

for p := 0 to Howmanyplayers - 1 do
begin
Players[p].Name := Username[p].text;
Players[p].Pass := Edit2[p].text;
Players[p].Nick := Edit3[p].text;
Players[p].Active := True;
Players[p].Strings[0] := Combobox1[p].text;
Players[p].Strings[1] := Combobox2[p].text;
end;

end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function AllPlayersInactive1: boolean;
By: Nicbaz
Description: Declare The Players for the login Array.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function AllPlayersInactive1: boolean;
var
p: integer;
begin
for p:= 0 to HowManyPlayers - 1 do
if Players[p].Active then exit;
result:= true;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure SwitchPlayers(Active:boolean);
By: Nicbaz
Description: Declare The Players for the login Array.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure SwitchPlayers(Active:boolean);
var
thenextplayer,thelastplayer:integer;
Start: boolean;
begin
Logout;
Players[CurrentPlayer].Active:= Active;
TheNextPlayer:= CurrentPlayer + 1;
TheLastPlayer:= HowManyPlayers - 1;

if (TheNextPlayer <= TheLastPlayer)then
begin
CurrentPlayer:= CurrentPlayer + 1;
end else
begin
CurrentPlayer:= 0;
end;

if not(Players[CurrentPlayer].Active)then
begin
repeat
CurrentPlayer:= random(HowManyPlayers);
until(Players[CurrentPlayer].Active)or(AllPlayersInactive1);
end;

if AllPlayersInactive1 then
begin
writeln('All Players False');
TerminateScript;
end;

start:= true;
LoginPlayer;
wait(random(500));
SetAngle(True);
wait(random(500));
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function IsBankTabOpen(WichTab:String) : Boolean
By: Nicbaz
Description: Returns True if your tab is open
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function IsBankTabOpen(WhichTab: Integer) : Boolean;
begin
Result := (GetColor(64 + (WhichTab - 1) * 49, 56) = 2896954 );
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function BankTab(NumberOfTab: Integer): Boolean;
By: Nicbaz
Description: Changes to the tab you select
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function BankTabz(NumberOfTab: Integer): Boolean;
begin

if (NumberOfTab <1) or (NumberOfTab > 9) then
begin
srl_Warn('BankTab',inttostr(NumberOfTab)+' BankTab does not exist',warn_AllVersions);
Result := False;
Exit;
end;

if (IsBankTabOpen(NumberOfTab)) then
Exit;
MouseBox(34 + (NumberOfTab - 1) * 50, 54, 34 + (NumberOfTab - 1) * 50, 75, 1);
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function HandlePlant: Boolean;
By: Nicbaz
Description: Finds Plant
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Function HandlePlant: Boolean;
var
xx: TNPC;
P: Tpoint;

begin
if FindNPC('Strange Plant',XX) then
begin
Wait(200+Random(100));
P:= TileToMS(xx.Tile, Round(xx.Height / 2));
if Xx.Infight or GetMe.InFight then
begin
Writeln(' Poisoned');
logout;
SwitchPlayers(False);
MainLoop;
end;
Mouse(p.X,p.Y,3,3,false);
Result:= ChooseOption('ick')
if result then
Writeln('Solved Plant');
end;
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function FindAxeHead : Boolean;
By: Nicbaz
Description: Finds the Axe Head
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function FindAxeHead : Boolean;
var
Items: array of TGroundItem;
I: Integer;
begin
FindGroundItems(Items,[508,509,5010,5011,5012,503,514,515,516,517,518,519,520,521,6743,6744],7);

for I := 0 to High(items) do
begin
Mouse(Items[I].Ms.x,Items[I].Ms.y, 0, 0, False);
Result:= ChooseOption('ick-up');
if Result then
begin
Flag;
Wait(400+random(200));
GameTab(4);
Writeln(' Axe head Found, will not re-atach until Vr 1.0 NextPlayer');
SwitchPlayers(True);
MainLoop;
end;
end;
Flag;
end;


Function FindDeads: boolean; forward;
procedure PlayerLoop; forward;
function Banking: Boolean; forward;
procedure HandleFight; forward;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function FNR: Boolean;
By: Nicbaz
Description: Finds Plant
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Function FNR: Boolean;
begin
R_findrandoms;
FindNorMalRandoms;
wait(60+random(100));
if Members then
HandlePlant;
wait(60+random(100));
HandleFight;
wait(60+random(100));
{ if not R_LoggedIn then
LoginPLayer; }
Result:= True;
if FindDeads then
begin
SwitchPlayers(false);
Mainloop;
Exit;
end;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function FindObjectEx(Var Tile: TPoint; objType: Integer): Boolean;
By: n3ss3s and Bobarkinator and nicbaz modded for my script
Description: Grabs Object Id's
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Function FindObjectExX(Var Tile: TPoint; objType: Integer): Boolean;
Var
Dir, tLength, f, X, Y: Integer;
TP: TPoint;
TileObject: UID;
Begin
TP := GetMyPos;
X := TP.X;
Y := TP.Y;
Dir := 0;
tLength := 1;
While (tLength < 30) Do
Begin
For F := 0 To tLength - 1 Do
Begin
Case Dir of
0: Y := Y - 1;
1: X := X + 1;
2: Y := Y + 1;
3: X := X - 1;
End;
TileObject := GetObjectAt(X, Y);
If TileObject.objType = objType Then
Begin
Result := True;
TP := GetObjectTile(TileObject.UID);
Tile.X := TP.X
Tile.Y := TP.Y;
Exit;
End Else
End;
Dir := Dir + 1;
dir := dir Mod 4;
If Dir Mod 2 = 0 Then
tLength := tLength + 1;
End;
End;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure BoredHuman1;
By: Wt-Fawki Modded By Nicbaz
Description: Changes to the tab you select
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure BoredHuman1;
var
i, x, y: Integer;
Deg: Variant;
begin
Deg := rs_GetCompassAngleDegrees;
for i := 1 to 2 do
begin
MMouse(Random(MSX2), Random(MSY2), 0, 0);
if IsUpText('opti') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption('Examine');
end;
FNR;
case Random(4) of
0: SendArrowSilentWait(((Random(2) * 2) + 1), 20 + Random(200));
1: SendArrowSilentWait(((Random(2) * 2)), 20 + Random(200));
2: SendArrowSilentWait(((Random(2) * 2) + 1), 200 + Random(200));
3: SendArrowSilentWait(((Random(2) * 2)), 20 + Random(200));
end;
FNR;
end;
if (Deg <> 0) then
MakeCompass(IntToStr(Round(Deg)))
else
MakeCompass('N');
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure NoBan;
By: Nicbaz
Description: Anti-Ban
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure NoBan;
begin
case random(5) of
0:
begin
RandomRClick;
Wait(2000+random(800));
end;
1:
begin
PickUpMouse;
BoredHuman1;
end;
2: BoredHuman1;
end;
FNR;
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function WalkToPath(Path: TPointArray; DoTile: Integer): Boolean;
By: Nicbaz
Description: Walks the path.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function WalkToPath(Path: TPointArray): Boolean;
var
I: integer;
Last, II, Dist: Integer;
P: TPoint;
DoTile: Integer;
begin
case random(3) of
1: SetRun(true);
end;
P := GetMyPos;
Last := 1 shl 20;
for II := 0 to High(Path) do
begin
Dist := Distance(P.x, P.y, Path[II].x, Path[II].y);
if (Dist > Last) then Continue;
Last := Dist;
DoTile := II;
end;
if (not(WalkToTile(Path[DoTile], 1, 10))) then
begin
FNR;
WriteLn('Too far from Path to start walking...');
Result:= False;
Exit;
end else
for I := DoTile + 1 to High(Path) do
begin
if not (WalkToTile(Path[I],1 , 10)) then
begin
Exit;
Result:= False;
end else
begin
Flag;
end;
end;
Result := True;
FNR;
End;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function Walk(where: string): boolean;
By: Nicbaz
Description: Loads the tiles and walks.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function Walk(where: string): boolean;
var
Tiles: TPointArray;

begin
SetAngle(True);
case where of
'ToMine':
begin
case Players[currentplayer].Strings[0] of
'lumbridge swamp':
begin
Tiles := [Point(3093, 3236), Point(3095, 3227), Point(3099, 3217),
Point(3105, 3209), Point(3114, 3208), Point(3122, 3207),
Point(3135, 3202), Point(3139, 3193), Point(3139, 3184),
Point(3141, 3175), Point(3144, 3166), Point(3145, 3157),
Point(3146, 3147)];
end;
'Draynor':
begin
Tiles := [Point(3090, 3246), Point(3081, 3249), Point(3081, 3258),
Point(3079, 3262), Point(3072, 3263), Point(3072, 3274),
Point(3058, 3275), Point(3043, 3274), Point(3030, 3277),
Point(3015, 3276), Point(3004, 3278), Point(2994, 3272),
Point(2988, 3263), Point(2980, 3254), Point(2979, 3241)];
end;

'edgeville':
begin
Tiles:= [Point(3094, 3484), Point(3099, 3474), Point(3099, 3467),
Point(3094, 3456), Point(3097, 3446), Point(3097, 3437),
Point(3090, 3429), Point(3084, 3421)];
end;

'varrock west':
begin
Tiles:= [Point(3186, 3430), Point(3176, 3427), Point(3172, 3417),
Point(3171, 3408), Point(3172, 3396), Point(3175, 3388),
Point(3180, 3380), Point(3182, 3371)];

end;

'varrock east':
begin
Tiles:= [Point(3258, 3428), Point(3270, 3428), Point(3282, 3427),
Point(3285, 3418), Point(3289, 3408), Point(3292, 3397),
Point(3294, 3386), Point(3293, 3375), Point(3287, 3367)];
end;

'al-karid':
begin
Tiles:= [Point(3274, 3170), Point(3281, 3180), Point(3282, 3193),
Point(3287, 3198), Point(3290, 3209), Point(3282, 3216),
Point(3281, 3227), Point(3290, 3234), Point(3294, 3245),
Point(3296, 3257), Point(3297, 3270), Point(3298, 3283),
Point(3298, 3296), Point(3300, 3304)];
end;

'rimmington':
begin
Tiles:= [Point(3006, 3349), Point(3007, 3339), Point(3006, 3327),
Point(3008, 3316), Point(3006, 3306), Point(3007, 3293),
Point(3006, 3281), Point(2998, 3272), Point(2990, 3267),
Point(2984, 3262), Point(2977, 3256), Point(2976, 3244),
Point(2977, 3236)];

end;

end;
end;

'ToBank':
begin
case Players[currentplayer].Strings[0] of
'lumbridge swamp':
begin
Tiles := [Point(3149, 3150), Point(3151, 3159), Point(3154, 3166),
Point(3155, 3176), Point(3150, 3184), Point(3144, 3193),
Point(3139, 3202), Point(3142, 3209), Point(3134, 3218),
Point(3125, 3218), Point(3114, 3219), Point(3110, 3226),
Point(3106, 3235), Point(3098, 3235), Point(3093, 3241)];

end;

'Draynor':
begin
Tiles := [Point(2978, 3241), Point(2976, 3250), Point(2982, 3261),
Point(2991, 3269), Point(3004, 3272), Point(3018, 3275),
Point(3030, 3276), Point(3046, 3274), Point(3059, 3276),
Point(3071, 3277), Point(3072, 3265), Point(3072, 3256),
Point(3075, 3247), Point(3084, 3247), Point(3092, 3241)];
end;

'edgeville':
begin
Tiles:= [Point(3086, 3423), Point(3092, 3431), Point(3095, 3443),
Point(3096, 3454), Point(3094, 3461), Point(3098, 3467),
Point(3100, 3478), Point(3093, 3483), Point(3093, 3490)];

end;

'varrock west':
begin
Tiles:= [Point(3183, 3375), Point(3177, 3384), Point(3174, 3394),
Point(3171, 3407), Point(3171, 3420), Point(3180, 3427),
Point(3184, 3436)];

end;

'varrock east':
begin
Tiles:= [Point(3289, 3371), Point(3296, 3381), Point(3293, 3391),
Point(3292, 3402), Point(3290, 3410), Point(3286, 3422),
Point(3277, 3428), Point(3265, 3428), Point(3254, 3427),
Point(3255, 3421)];
end;

'al-karid':
begin
Tiles:= [Point(3301, 3309), Point(3300, 3299), Point(3300, 3286),
Point(3297, 3276), Point(3296, 3263), Point(3296, 3252),
Point(3299, 3239), Point(3296, 3226), Point(3294, 3213),
Point(3301, 3202), Point(3295, 3192), Point(3283, 3190),
Point(3280, 3178), Point(3277, 3167), Point(3271, 3163)];
end;


'rimmington':
begin
Tiles:= [Point(2978, 3238), Point(2978, 3247), Point(2977, 3256),
Point(2978, 3265), Point(2982, 3273), Point(2992, 3279),
Point(3001, 3279), Point(3005, 3289), Point(3005, 3302),
Point(3007, 3315), Point(3007, 3327), Point(3007, 3340),
Point(3007, 3350), Point(3012, 3356)];
end;
end;
end;
end;
if WalkToPath(Tiles) then
Result:= True;
end;

procedure HandleFight;
var
Z :Tme;
begin
Z:= GetMe;
if z.infight then
begin
SetRun(true);
Walk('ToBank');
Banking;
Walk('ToMine');
end;
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function WhatAxe: String;
By: Nicbaz
Description: See's What Axe you have
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function WhatAxe: String;
var
i: integer;
z,x: TIntegerArray;
p: Integer;

begin
GameTab(4);
z:= [1265,1267,1269,1273,1271,1275];
for I:= 0 to High(z) - 1 do
begin
if InventoryContains(z[I],x) then
begin
p := I;
Break;
end;
end;
Case P of
0: Result:= 'bronze';
1: Result:= 'iron';
2: Result:= 'steel';
3: Result:= 'mith';
4: Result:= 'addy';
5: Result:= 'rune';
end;
if (not P = 0 or 1 or 2 or 3 or 4 or 5) then
Result:= '';
end;


{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function FindBank;
By: Nicbaz
Description: Find Obects with reflection.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function FindBankz: Boolean;
var
xx : TPoint;
P,id : integer;
begin
if not LoggedIn then
LoginPlayer;
case Players[currentplayer].Strings[0] of
'lumbridge swamp':Id:= 2213;
'edgevill':Id:= 26972;
'varrock east':Id:= 11402;
'varrock west':Id:= 11402;
'al-karid':Id:= 11758; //not
'rimmington': Id:= 11758;
end;
Result:= FindObjectExX(xX,Id);
if Result then
begin
TileToMM(xx);
if (DistanceFrom(xX) > 4) then
begin
WalkToTile(XX, 0, 0);
FFlag(0);
Wait(400);
end;
XX:= TileToMS(XX, 150);
repeat
Mouse(xX.X, xX.Y, 2, 2, False);
Wait(80 + Random(120));
Result:= ChooseOption('e-q');
Flag;
inc(p);
if p > 4 then
Exit;
if Result then
Exit;
until false;
FNR;
end;
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function FindRock: boolean;
By: Nicbaz
Description: Find Obects with reflection.
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function FindRock: boolean;
var
xx,TP: TPoint;
I : Integer;

begin
FNR;
if not R_LoggedIn then
LoginPLayer;
If InvFull then
Exit;
for I:= 0 to Length(iD) - 1 do
begin
FNR;
Result:= FindObjectExX(xX,Id[I]);
if Result then
begin
Rock:= XX;
TileToMM(xx);
wait(220+random(100));
if TileOnMs(xx,150) and (DistanceFrom(xX) > 5) or Not TileOnMs(xx,150) then
begin
Tp:= Point(XX.x + 1,XX.y);
wait(220+random(100));
WalkToTile(TP, 2, 0);
R_Flag;
Wait(100+random(50));
end;
Case random(1) of
0:
begin
XX:= TileToMS(XX, 150);
Mouse(XX.x + 2, XX.y + 18, 0, 0, True);
Flag;
Wait(100+random(50));
end;
1:
begin
XX:= TileToMS(XX, 150);
FNR;
Mouse(XX.x + 2, XX.y + 28, 0, 0, False);
Wait(100+ random(300));
if not ChooseOption('Mine') then
Continue;
Flag;
Wait(100+random(50));
end;
end;
Break;
end;
end;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function Banking: Boolean;
By: Nicbaz
Description: Banks
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
function Banking: Boolean;
var
z: integer;

begin
MakeCompass('n');
if FindBankz then
begin
wait(500+random(200));
z:= InvCount;
R_FindRandoms;
repeat
Deposit(2,28,true);
until not InvFull or (Z < 5);
Result:= True;
CloseBank;
Clays:= Clays + 28;
Cooks:= Cooks + 1;
Players[CurrentPlayer].Integers[1]:= Players[CurrentPlayer].Integers[1] + 28;
Players[CurrentPlayer].Integers[2]:= Players[CurrentPlayer].Integers[2] + 1;
end;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function MehBreakTorz: Boolean;
By: Nicbaz / Narlce
Description: Opens The Door
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Function MehBreakTorz: Boolean;
var
BreakFor,T,H,Oh,S : integer;
begin
Result:= False;
if not TakeShortBreaks then
Exit;
if TimeFromMark(meh) > Sleepss*60000 then
begin
Writeln(Players[CurrentPlayer].Name + (' : Sleeping '));
BreakFor:= Sleeps*60000;
Result:= True;
Logout;
ConvertTime(BreakFor, H, Oh, S);
MarkTime(T);
WriteLn(Players[CurrentPlayer].Name + ': Break for: '+inttostr(oh)+ 'm:' +inttostr(S)+ 's');

Repeat
ConvertTime(BreakFor - TimeFromMark(T), H, oh, S)
Disguise(inttostr(oh)+ 'm:' +inttostr(S)+ 's Break');
wait(1000);
until (BreakFor < TimeFromMark(T))

T:= 0;
Meh:= 0;
BreakFor:= 0;
MarkTime(Meh);

if R_loggedin then
LoginPlayer;
if R_loggedin then
LoginPlayer;
if not R_loggedin then
LoginPlayer;
end;
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function FindDead: boolean;
By: Nicbaz
Description: Finds The Npc
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Function FindDeads: boolean;
var
Tilesz: Tpoint;

begin
Tilesz:= Point(3219, 3217);
Result:= False;
Result:= (DistanceFrom(Tilesz) < 5);
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Procedure WieldAll;
By: Nicbaz
Description: Wileds All;
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Procedure WieldAll;
var
I: Integer;
X: Tbox;
begin
for i:= 1 to 28 do
begin
X := InvBox(I);
wait(500);
MMouse(X.X1, X.Y1, 8,2);
if IsUpText('ield') then
Mouse(X.X1, X.Y1, 8,8,true);
end;
end;


{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Function r_WaitForRock: Boolean;
By:nicbaz
Description: Waits for rock to go
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
Function r_WaitForRock: Boolean;
Var
T,Z: Integer;
Me : Tme;
begin
If Not LoggedIn Then
Exit;
T := GetSystemTime;
Me:= GetMe;
repeat
S:= InvCount;
wait(18);
SleepAndMoveMouse(200+random(500));
Z:= Random(10);
if z = 3 then
NoBan;
FNR;
if S > F then
Break;
if Me.Animation < 5 then
Exit;
Result:= S > F;
until Result or (GetSystemTime - T > 1*30000);
end;

{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure CutTree;
By: Nicbaz
Description: Mines Coal
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure MineRocks;
var
p: integer;
Safe : Integer;
Ok: Integer;

begin
MarkTime(Safe);
Players[CurrentPlayer].Loc := 'Mining';
FNR;
Marktime(ok);
If not R_LoggedIn Then
LoginPlayer;
repeat
if timefrommark(ok) > 5*60000 then
begin
setrun(true);
Marktime(safe);
end;
If not R_LoggedIn Then
LoginPlayer;
F:= InvCount;
if FindRock then
begin
r_WaitForRock;
if InvFull then
begin
WriteLn('Full');
Exit;
end;

if Inchat('you need a pickaxe') or (WhatAxe = '') then
begin
Writeln('We have No Axe');
Players[CurrentPlayer].Loc := 'No Axe';
Walk('ToBank');
SwitchPlayers(False);
MainLoop;
Exit;
end;
MehBreakTorz;
end;
if TimeFromMark(safe) > 40*60000 then
begin
SwitchPlayers(False);
Mainloop;
end;
P:= random(13);
if p = 1 then
Noban;
SleepAndMoveMouse(100+random(200));
until(InvFull);
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure SaveDebug;
By: Sandos.
Description: Loops the player
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure SaveDebug;
var
FileNum: integer;
begin
FileNum := RewriteFile(ScriptPath+'ChopChop.txt',True);
if( FileNum < 0 )then
WriteLn('error with saving file');
WriteFileString(FileNum, GetDebugText);
CloseFile(FileNum);
end;

{*******************************************************************************
function PostReport(ScriptName, Website, Proggy : String): Boolean;
By: Camo Kyle & Floor66
Description: Posts the Progress Report to my database which you can see
*******************************************************************************}
function PostReport(ScriptName, Website, Proggy : String): Boolean;
var
Dbase : String;
Client : Integer;
begin
Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
Wait(10);
AddPostVariable(Client, 'proggy', Proggy);
AddPostVariable(Client, 'scn', ScriptName);
Dbase := PostHTTPPageEx(Client, Website);
FreeHTTPClient(Client);
Result := true;
end;
{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
procedure PlayerLoop;
By: Nicbaz
Description: Loops the player
Status: Good
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-}
procedure PlayerLoop;
var
z : integer;
sec: integer;
Load: Integer;
begin
If not R_LoggedIn Then
LoginPlayer;
case Players[CurrentPlayer].Strings[1] of
'iron' : Load := 1+random(2);
'tin' : Load := 1+random(2);
'copper' : Load := 1+random(2);
'silver' : Load := 1+random(2);
'mith' : Load := 1+random(2);
'addy' : Load := 1+random(2);
'coal' : Load := 1+random(2);
'clay' : Load := 1+random(2);
end;
case Players[CurrentPlayer].Strings[1] of
'iron' : Sleeps := 1+random(1);
'tin' : Sleeps := 1+random(1);
'copper' : Sleeps := 1+random(1);
'silver' : Sleeps := 1+random(1);
'coal' : Sleeps := 1+random(2);
'mith' : Sleeps := 2+random(1);
'addy' : Sleeps := 3+random(1);
'clay' : sleeps := 1+random(1);
end;
case Players[CurrentPlayer].Strings[1] of
'iron' : Sleepss:= 14+random(3);
'tin' : Sleepss := 13+random(2);
'copper' : Sleepss := 13+random(1);
'silver' : Sleepss:= 12+random(3);
'coal' : Sleepss := 13+random(3);
'mith' : Sleepss := 16+random(4);
'addy' : Sleepss := 17+random(4);
'clay' : Sleepss := 11+random(2);
end;
case Players[currentplayer].Strings[0] of
'lumbridge swamp':
begin
case Players[currentplayer].Strings[1] of
'coal': Id:= [11931,11930,11932];
'mith': Id:= [11942,11943,11944];
'addy': Id:= [11941,11939];
end;
end;
'edgeville':
begin
case Players[currentplayer].Strings[1] of
'coal': Id:= [11931,11930,11932];
end;
end;
'varrock west':
begin
case Players[currentplayer].Strings[1] of
'iron': Id:= [11954, 11955];
'tin': Id:= [11957, 11958, 11959 ];
'copper': Id:= [9709,9710,9708]; //not
'gold': Id:= [15505,15503,15504];
'silver': Id:= [11949, 11950];
'clay': Id:= [15503, 15504, 15505];
end;
end;
'varrock east':
begin
case Players[currentplayer].Strings[1] of
'iron': Id:= [11954, 11955, 11956];
'tin': Id:= [11957, 11958, 11959];
'copper': Id:= [11960, 11961, 11962];
end;
end;
'al-karid':
begin
case Players[currentplayer].Strings[1] of
'iron': Id:= [37307,37307];
'coal': Id:= [11930, 11932];
'copper': Id:= [11936,11937,11938];
'mith': Id:= [11942, 11944];
'addy': Id:= [11939, 11941];
'gold': Id:= [37310, 37313];
'silver': Id:= [ 37304, 37305];
end;
end;
'draynor':
begin
case Players[currentplayer].Strings[1] of
'iron': Id:= [9719,9718,9717];
'tin': Id:= [9714,9716];
'copper': Id:= [9709,9710,9708];
'gold': Id:= [9722,9720];
'clay': Id:= [9713,9711];
end;
end;
end;
repeat
if WhatAxe = '' then
begin
Writeln('No Pickaxe');
NextPlayer(False);
Exit;
end;
WritelN(Players[CurrentPlayer].Name + (': Has a '+ WhatAxe+' Pickaxe'));
WritelN(Players[CurrentPlayer].Name + (': Walking To Mine''s'));
if not Walk('ToMine') then
if not Walk('ToMine') then
Exit;
FNR;
WritelN(Players[CurrentPlayer].Name + (': Arrived At Mine'));
WritelN(Players[CurrentPlayer].Name + (': Mining Rocks''s'));
MineRocks;
WritelN(Players[CurrentPlayer].Name + (': Full Load Finshed Mining Rock''s'));
WritelN(Players[CurrentPlayer].Name + (': Walking To Bank'));
if not Walk('ToBank') then
begin
if not Walk('ToBank') then
begin
if not Walk('ToBank') then
begin
Walk('ToBank');
end else
begin
SwitchPlayers(True);
Exit;
end;
end;
end;
WritelN(Players[CurrentPlayer].Name + (': Arrived At Bank'));
Inc(z)
Banking;
ClearDebug;
Sec := GetTimeRunning div 1000+1;
Writeln('[------------------------------------------------------------------------------]');
WriteLn('[ ]');
Writeln('[ Nicbaz Mine Mine ]');
Writeln('[------------------------------------------------------------------------------]')
Writeln('[ Worked For : ' + TimeRunning );
Writeln('[ Banked : ' + IntToStr( Cooks )+ ' Loads');
Writeln('[ Rocks''s per hour : ' + IntToStr(Round(3600*Clays/Sec)));
WriteLn('[ '+ Players[currentplayer].Strings[1]+' Rocks''s Mined : '+ Inttostr(Clays));
WriteLn('[');
Writeln('[=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]');
WriteLN('[ Single Player Report ]');
WriteLn('[ ]');
Writeln('[=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]');
Writeln('-------------------------------');
for i:= 0 to (HowManyPlayers) - 1 do
begin
Writeln('-------------------------------');
Writeln(Players[I].Name+' ');
Writeln('- Mining at : '+ Players[i].Strings[0]);
Writeln('- Mining : '+ Players[i].Strings[1]);
Writeln('- Mined : '+ IntToStr(Players[I].Integers[1])+' '+ Players[i].Strings[1]);
Writeln('- Banked : '+ IntToStr(Players[I].Integers[2])+' Loads');
Writeln('- Active : '+ BoolToStr(Players[I].Active));
Writeln('-------------------------------');
end;
Writeln('-------------------------------');
Writeln('[------------------------------------------------------------------------------]');
WriteLn('[ ]');
Writeln('[ Nicbaz Mine Mine ]');
Writeln('[------------------------------------------------------------------------------]');
SaveDebug;
Writeln(TheDate(1));
PostReport('Chop Chop', 'http://www.nicbaz.site90.net/add.php', GetDebugText);
LoadsLeft:= LoadsLeft + 1;
SendSrlReport;
R_RandomsReport;
until(LoadsLeft = Load) or(not LoggedIn);
SwitchPlayers(true);
LoadsLeft:= 0;
end;

Procedure GrabCurrentPos;
var
Pozs : TPoint;

begin
Pozs:= GetMyPos;
Writeln(IntToStr(Pozs.X)+' Hi '+ IntToStr(pozs.Y));
end;

procedure Setup;
begin
SMARTSetupEx(SMARTWORLD, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
SetupSRL;
SetupReflection;
ScriptID := '889';
ClearDebug;
GetSelf.WindowState := wsMinimized;
MainInitForm;
GetSelf.WindowState := wsNormal;
DeclarePlayers;
SRLID := '618';
SRLPassword := 'dragon';
CurrentPlayer := Random(HowManyPlayers);
LoginPlayer;
GrabCurrentPos;
MarkTime(Meh);
end;

procedure Mainloop;
begin
repeat
PlayerLoop;
until false;
end;

begin
Setup;
Mainloop;
end.

Thanks in advance

NiCbaZ

2009-06-15 11:53:58

Where are you trying 2 mine?

Claymore

2009-06-15 12:30:39

nah script hasnt even started and that thing pops up. i try to mine in anywerhre ^^

NiCbaZ

2009-06-15 13:16:21

Well i dunno Mine Mine works fine for me :/

Shuttleu

2009-06-15 13:23:16

make sure you have the latest revision of reflection
and srl dev rev 43

~shut

mixster

2009-06-15 13:25:03

Have you done the usual checks of latest SRL & Reflection versions and also what Scar version are you using? Possibly could need Smart plugin moved or updated.