MattL191
2012-01-26 21:07:56
My First Script Ever.
Info:
This script ether powermines tin, or banks it.
Works at Varrock East Mine.
Setup
Download newest version of the script.
Open in simba.
Ether True or False in the powermine constent. True for powermine, False for [INDENT]Banking it.[/INDENT]
Fill in Name, Pass.
Start at Varrock east mine. Near Tin
Things To Improve
Better rock finding method
Clean up code
Add AntiRandoms
Add Failsafes
Improve Walking Path
Improve Rock Finding And Mining
Add Breaks
Add Player Switching
Add Copper and possibly iron options
Version Log
V2.0: Added Banking
V1.0 Beta, Just Powermine.
V1.1 Fixed log in problem
Info:
This script ether powermines tin, or banks it.
Works at Varrock East Mine.
Setup
Download newest version of the script.
Open in simba.
Ether True or False in the powermine constent. True for powermine, False for [INDENT]Banking it.[/INDENT]
Fill in Name, Pass.
Start at Varrock east mine. Near Tin
Things To Improve
Better rock finding method
Clean up code
Add AntiRandoms
Add Failsafes
Improve Walking Path
Improve Rock Finding And Mining
Add Breaks
Add Player Switching
Add Copper and possibly iron options
Version Log
V2.0: Added Banking
V1.0 Beta, Just Powermine.
V1.1 Fixed log in problem
program Tin;
//{$DEFINE SMART}
{$i SRL\SRL.simba}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Debug.simba}
Const
SRLStats_Username = '';// Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
NumbOfPlayers = 1; //How many players are you using
StartPlayer = 0; //Player to start auoting with! (0 means first char)
BreakEvery = 120; //How many loads to take a break after.
BreakFor = 10; //How many minutes to break for
Powermine = False; //True for Powermine. False for Banking
Version = '2.0'; //Leave Alone
Var
BreakOften, BreakLength, BreakTimes: Integer;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := ''; //Player username.
Pass := ''; //Player password.
Pin := '' //Pin for Bank
Active := True;
end;
end;
Procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
procedure Load_Antiban;
begin
case Random(150) of
1: BoredHuman;
2: HoverSkill('random', False);
3: HoverSkill('mining', False);
4: PickUpMouse;
5: RandomMovement;
6: RandomRClick;
7: ExamineInv;
end;
end;
function TinColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.31);
if not (FindColorsTolerance(arP, 10790064, MSX1, MSY1, MSX2, MSY2, 18)) then
begin
Writeln('Failed to find the color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
Procedure Tin;
var
ax,ay, PlusOne, MiningCounter: integer;
Begin
PlusOne:= InvCount + 1;
ax:=MSCX;
ay:=MSCY;
FindObjCustom(ax, ay, ['Min'], [TinColor], 10);
Begin
StatsGuise ('Found Rock');
GetMousePos(ax, ay);
Case Random(2) of
0: Mouse(ax,ay,5,5,true);
1: Begin
Mouse(ax,ay,5,5,false);
WaitOption('Mi', 500);
End;
End;
Flag;
Marktime(MiningCounter)
Repeat
Load_Antiban;
Wait(2000);
Until (InvCount=PlusOne) or (TimeFromMark(MiningCounter) > 8000)
End;
End;
Procedure OreDrop;
Var
bx, by, TinDTM, I: integer;
SlotBox:Tbox;
MiningPattern:TIntegerArray;
Begin
TinDTM:= DTMFromString('mggAAAHicY2NgYMhnYmAoBuI8IM4E4hwgLgTip0C5J0B8H0q/AOKXQJydlgYkmbBgTMAPxIw4MAQAAITfCVw=');
MiningPattern:=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,6,3,7,11,15,19,23,27,4,8,12,16,20,24,28]
For I:=0 To 27 Do
Begin
SlotBox:=InvBox(MiningPattern[I]);
If FindDTm(TinDTM, bx, by, SlotBox.X1, SlotBox.Y1, SlotBox.x2, SlotBox.Y2) Then
Begin
MouseItem(MiningPattern[I],Mouse_right);
ChooseOption('Dro')
End;
End;
End;
Procedure Setup;
Begin
Smart_Server:=89;
Smart_Members:=False;
Smart_Signed:=True;
Smart_SuperDetail:=False;
SetupSRL;
Declareplayers;
LogInPlayer;
Setangle(SRL_ANGLE_HIGH);
End;
Procedure WalkToBank;
Var
myPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE,['12_7']);
myPath := [Point(4981, 3186), Point(4985, 3180), Point(4990, 3173), Point(4995, 3164), Point(4997, 3154), Point(4998, 3142), Point(4998, 3122), Point(4998, 3106), Point(5002, 3096), Point(5004, 3078), Point(5002, 3063), Point(5001, 3056), Point(5000, 3044), Point(4999, 3034), Point(4997, 3023), Point(4993, 3014), Point(4985, 3006), Point(4978, 2989), Point(4970, 2971), Point(4968, 2960), Point(4962, 2950), Point(4955, 2943), Point(4945, 2937), Point(4935, 2937), Point(4924, 2936), Point(4911, 2937), Point(4894, 2942), Point(4883, 2942), Point(4872, 2938), Point(4865, 2937), Point(4857, 2938), Point(4855, 2942), Point(4854, 2948), Point(4854, 2955), Point(4852, 2964), Point(4852, 2972), Point(4852, 2976)];
SPS_WalkPath(myPath);
end;
Procedure Bank;
begin
OpenBankQuiet('veb');
Wait(500+random(200));
DepositAll;
Wait(500+random(200));
CloseBank;
Wait(200+random(200));
end;
Procedure WalkToMine;
Var
myPath:TPointArray;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
myPath := [Point(4851, 2957), Point(4852, 2951), Point(4854, 2947), Point(4857, 2942), Point(4866, 2940), Point(4877, 2938), Point(4890, 2939), Point(4905, 2940), Point(4912, 2940), Point(4920, 2939), Point(4937, 2940), Point(4943, 2940), Point(4948, 2946), Point(4955, 2952), Point(4960, 2957), Point(4971, 2969), Point(4975, 2976), Point(4983, 2987), Point(4991, 3000), Point(4991, 3009), Point(4991, 3018), Point(4993, 3027), Point(4996, 3037), Point(4997, 3057), Point(4997, 3066), Point(4997, 3071), Point(4997, 3077), Point(4997, 3090), Point(4997, 3098), Point(4999, 3105), Point(4999, 3117), Point(5001, 3124), Point(5001, 3129), Point(4999, 3138), Point(4996, 3143), Point(4988, 3153), Point(4982, 3159), Point(4975, 3173), Point(4972, 3189), Point(4970, 3196)];
SPS_WalkPath(myPath);
end;
begin;
Setup;
repeat
Tin;
If InvFull Then
If Powermine Then
begin
OreDrop;
end;
If InvFull Then
If not Powermine Then
begin
WalkToBank;
Bank;
WalkToMine;
end;
until(false)
end.