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
——————————————————
<!– END 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 –>