SRL Archive - First Scripts

Stamp PowerMiner


stampede10343

2007-04-25 16:43:39

Stamp's PowerMiner
this is my first script… obviously! but anyways this is V2.1 but i'll probably update it a few times.
So far it includes:
  • AUTO COLOR(For u lazy noobs,including me…)
  • More Extensive AntiBan!
  • Uses FindColorSpiral(Need Suggestions!)
  • Inlcuded DTM's
  • AntiRandoms
  • MULTIPLAYER!!

Soon To Come:
  • Setup Form(Maybe)
  • And any Suggestions!!!!

I need Suggestions please!
Comments appreciated
Here's The New!!! Script(Still Avadible attached)!:

{ This Is Stamp's AutoMiner )
( This is my first Script! )
( The Only Setup is... )
( Players!! NEW!!!! }
// By Stampede10343 \\

program StampMinerV2;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Mining.scar}


/////////////////////////////////////
///////////////Setup/////////////////
/////////////////////////////////////

const
StartPlayer = 0;//Player Number To Start with in array(Should be fine)
RockTol = 8;// Rock Tolerance
TotalLoads = 5;// Loads You Want Dropped
WaitTime = 5300;//Mseconds + Random 1000 until click again
AntiBanness = 20;// How Much AntiBan You Want, 15-25ish Lower is More
RunDir = 'N';// Run if in fight where?
RockType = 'Copper';// Type of rock for autocolors
//^^(Copper, Tin, Addy, Mith, iron, coal, Gold, Clay, Silver)^^

// Dont Touch Below!!
Const
CopperColor = 4022406;
TinColor = 7829375;
ClayColor = 4553880;
IronColor = 2569045;
SilverColor = 12434885;
CoalColor = 2834753;
GoldColor = 1881051;
MithrilColor = 7359564;
AdamantColor = 6322272;

var
o, Loads, Ore1, XX, YY : Integer;
RockColor1, RockColor2, RockColor3: Integer;

procedure DeclarePlayers;
begin
HowManyPlayers := 2;//MAKE SURE THIS ONE IS CORRECT!

CurrentPlayer := StartPlayer;
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='warriorcc11';
Players[0].Pass :='srtbhjys';
Players[0].Active := True;
Players[0].Nick :='rio';//Set This for talking randoms, middle of name
Players[0].Banked := 0; // DONT TOUCH!!

Players[1].Name :='taco10343';
Players[1].Pass :='srtbhjys';
Players[1].Active := True;
Players[1].Nick :='aco';
Players[1].Banked := 0;
end;


Procedure AntiBann;
Begin
Case Random(AntiBanness) of
0 : FTWait(5);
2 : AlmostLogOut;
4 : GameTab(1 + random(4));
6 : HoverSkill('Smithing', false);
8 : RandomRClick;
10: SleepAndMoveMouse(1000);
end;
end;

procedure AntiRandoms;
Begin
FindNormalRandoms;
FindTalk;
MakeCompass('N');
end;

procedure UseAutoColors;
Begin
if(RockType= 'Copper')then
begin
RockColor1 := CopperColor
RockColor2 := CopperColor + 100
RockColor3 := CopperColor - 100
if(RockType= 'Tin')then
begin
RockColor1 := TinColor
RockColor2 := TinColor + 100
RockColor3 := TinColor - 100
if(RockType= 'Addy')then
begin
RockColor1 := AdamantColor
RockColor2 := AdamantColor + 100
RockColor3 := AdamantColor - 100
if(RockType= 'Iron')then
begin
RockColor1 := IronColor
RockColor2 := IronColor + 100
RockColor3 := IronColor - 100
if(RockType= 'Coal')then
begin
RockColor1 := CoalColor
RockColor2 := CoalColor + 100
RockColor3 := CoalColor - 100
if(RockType= 'Gold')then
begin
RockColor1 := GoldColor
RockColor2 := GoldColor + 100
RockColor3 := GoldColor - 100
if(RockType= 'Clay')then
begin
RockColor1 := ClayColor
RockColor2 := ClayColor + 100
RockColor3 := ClayColor - 100
if(RockType= 'Silver')then
begin
RockColor1 := SilverColor
RockColor2 := SilverColor + 100
RockColor3 := SilverColor - 100
end;
end;
end;
end;
end;
end;
end;
end;
end;

Procedure ChopDemRockz;
Begin
AntiRandoms;
AntiBann;
if(FindColorSpiralTolerance(xx, yy, RockColor1,0, 0, 700, 700,RockTol))or
(FindColorSpiralTolerance(xx, yy, RockColor2, 0, 0, 700, 700,RockTol))or
(FindColorSpiralTolerance(xx, yy, RockColor3, 0, 0, 700, 700,RockTol))then
begin
MMouse(xx, yy, 8, 8);
wait(200+random(300));
getmousepos(xx, yy);
if(IsUpText('ine'))then
begin
Mouse(xx, yy, 0, 0, true);
wait(WaitTime+random(1000));
If FindGas(xx, yy - 10) Then
Begin
RunAwayDirection(RunDir);
wait(10000 - random(1000));
RunBack;
end;
end;
end;
end;


procedure DropOres;
Begin
if(not(InvFull))then Exit;
if(InvFull)then
Begin
AntiRandoms;
x := 0;
y := 0;
AntiBann;
GameTab(4);
Ore1 := DTMFromString('78DA634C66626078CE800618914820DD08547' +
'38F809A5AA09A37B8D580712150CD274C352CC86A72816A6EE236' +
'87198801CA5906DE');
repeat
if(FindDTM(Ore1, x, y , MIX1, MIY1, MIX2, MIY2))then
begin
MMouse(x, y, 2, 2);
wait(100 + random(100));
Mouse(x + 2, y, 2, 2, false);
wait(120 + random(100));
ChooseOption(x, y, 'rop');
wait(655 + random(100));
o := o + 1;
end;
until not(FindDTM(Ore1, x, y, MIX1, MIY1, MIX2, MIY2));
Loads := Loads + 1;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
end;
end;

Procedure Proggy;
Begin
ClearDebug;
Wait(300);
WriteLn('<==================================> ');
wait(300);
WriteLn(' Mined '+inttostr(o)+' Ores ');
wait(300);
WriteLn(' Mined '+inttostr(Loads)+' Loads ');
wait(300);
WriteLn(' By Stampede10343! ');
wait(300);
Writeln('Worked For: '+ ScriptTime2(2) );
WriteLn('<==================================> ');
wait(100+random(100));
end;

begin
SetUpSRL;
DeclarePlayers;
UseAutoColors;
Loads := 0
o := 0
MouseSpeed := 7;
ActivateClient;
SetupSRLMining;
repeat;
if(not(LoggedIn))then
begin
LoginPlayer;
MakeCompass('N');
HighestAngle;
NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
Begin
repeat;
ChopDemRockz;
if(not(LoggedIn))then break;
until(InvFull);
DropOres;
Proggy;
if(LoggedIn)and
(Players[CurrentPlayer].Banked = 0)then
Begin
SetChat('off', 1);
repeat
Wait(1000);
AntiRandoms;
until(not(LoggedIn));
NextPlayer(true);
end;
end;

if(not(Loggedin)) then NextPlayer(false);
until(false);
end.


stampede10343

2007-04-25 21:15:43

<=============================>
Mined 48 Ores
Mined 2 Loads
By Stampede10343!
Worked For: 8 Minutes and 37 Seconds
<=============================>

That^^ was just a little test run.

3Garrett3

2007-04-26 06:30:37

I noticed that you dont have begin and end with your if and thens. Like this

if something then
BEGIN
Do things
END;

Other than that, it looks like a good script

Deni_mulic

2007-04-26 06:34:53

I also noticed a lack of anti random? :s
+ Look up DTMs, use them to drop instead of full inv, u might drop useful stuff like gems or stuff people trade you.
+ Look up a tut for making a powerminer, instead of a Woodcutter, lol
+ look up FindObj

stampede10343

2007-04-26 16:06:58

3garrett3 , does that matter?

3Garrett3

2007-04-26 18:52:52

Yes because When you use if and then it is a BOOLEAN. If you dont know what this is. It means if it found the color or whatever you wanted it to do, then it is TRUE and if it didnt, it is FALSE. If you dont have Begin and End; with your if then statements, It will always think that it is TRUE, which might make the mouse spaz. Im not sure about the always TRUE thing, but that is what I was told. You should always have begin and end anyway though.

EDIT: After looking through again.. why do you have a weird wait time?

wait(5301+random(699));

???

Add antirandoms, Golem, FindNormalRandoms;, FindGas, stuff like that…

stampede10343

2007-04-26 20:49:10

From: 3garrett3
Yes because When you use if and then it is a BOOLEAN. If you dont know what this is. It means if it found the color or whatever you wanted it to do, then it is TRUE and if it didnt, it is FALSE. If you dont have Begin and End; with your if then statements, It will always think that it is TRUE, which might make the mouse spaz. Im not sure about the always TRUE thing, but that is what I was told. You should always have begin and end anyway though.

EDIT: After looking through again.. why do you have a weird wait time?

wait(5301+random(699));

???

Add antirandoms, Golem, FindNormalRandoms;, FindGas, stuff like that…


I'm working on the anti randoms
i changed that time in V1.1

3Garrett3

2007-04-27 06:30:59

For your antirandoms, you should do that before it waits and after it waits, because if you get one, it will wait 5 seconds to solve it and if its gas, it might blow up

stampede10343

2007-04-27 07:01:17

i need help with antirandoms, and pickaxe stuff

stampede10343

2007-04-28 16:30:48

V1.5 is now out!!

stampede10343

2007-05-10 20:59:50

I did make a 1.7 but i redid some things added MultiPlayer, got rid of axe head finding though… it wasn't working out! But 2.0 is now out and i want some people to test if you please…

3Garrett3

2007-05-13 10:34:09

i might test it later, but i dont think :p i will look it over on my other comp though.

stampede10343

2007-05-13 11:12:32

I fixed V2.0 i (luckily) Looked at the SRL manual thing on here and ended up changing some things in the script and re-wrote the Main Line…
So 2.1 is out now its still weird though..>!:duh:

3Garrett3

2007-05-13 16:33:58

ok, is the script on the first post your script? it has no standards really :P

dark evil

2007-05-14 10:21:22

hi, it looks cool i will try it and give u a prugress
best wishes

jamesshaw

2007-05-26 04:45:12

Failed when compiling
Line 27: [Error] (27:1): Duplicate identifier 'UpChars' in script C:\Program Files\SCAR 3.06\includes\srl\srl\core\Globals.scar

Pwnt by Pwnt

2007-05-28 04:59:51

hey, looks pretty good for a first script :D just some things.. in ur drop proc u did a whole bunch of stuff that u didnt need.. u could just done
If(FindDTM(blahblahblah)) then
begin
repeat;
MMouse(x,y,8,8);
ChooseOption(x,y,'rop');
until not(FindDTM(blahblahblah));

and also, REALLY NICE JOB WITH THE AUTOCOLORING! :D