SRL Archive - Outdated / Broken

OMG - Bego releasing a POWERMINER


Bego

2006-07-02 02:57:51

Yes, my lazyness has been overcome and I have worked my ass off for a long time, trying to learn player arrays and so on. Behold my masterpiece thats really probably not good. It mines, thats all I tested, leave feedback, I just might care that theres an error, cause I know their will be.

[php]{.Script Info:
# ScriptName = Powerminer
# Author = Bego
# Description = Powermines all ores
# Version = 2.5
# Date = July 02, 2006, 8:30 PM
# Comments = Do the setup!
/Script Info}{
__ _ _ _
/ _ ___ _ __(_)_ __ | |_ | |__ _ _ _
/ __| '__| | '_ | __| | '_ \| | | |(_)
_\ \ (__| | | | |_) | |_ | |_) | |_| | _
\__/\___|_| |_| .__/ \__| |_.__/ \__, |(_)
|_| |___/
}const{
____
/\ _`\
\ \ \ \ \ __ __ ___
\ \ _ <' /'__`\ /'_ `\ / __`
/ __//\ \ \ \/\ \ \ \
____/ ____ ____ ____/
/___/ /____//___ /___/
/____/
/___/
////////////////////////////////////
// Powerminer by Bego //
// COMPLIANT WITH SRL 2.4! //
// Instructions: //
// 1. Weild your pick! //
// 2. Do the setup! //
// 3. If there isn't a big enough //
// number of players, make them //
// yourself in the array! //
// 4. Run the script! //
////////////////////////////////////
// NOTE… //
//If you only have one character, //
// thats alright as it will not //
// switch characters! //
// //
// If your pickaxe isn't weilded, //
// the script will drop it! //
////////////////////////////////////
// CREDITS GO TO //
// WhiteShadow, Cheesehunk, //
// phantombmx, and Pyro //
////////////////////////////////////

{/////////////////////////////////////////////////////////////////////}
{/////////////////////////////////////////////////////////////////////}
{//////////////////////////////SETUP//////////////////////////////////}
{/////////////////////////////////////////////////////////////////////}
{/////////////////////////////////////////////////////////////////////}
{//} StartPlayer = 0; {0 is 1, 1 is 2, player to start with} {//}
{//} Users = 1; {How many users do you have in your army?} {//}
{//} RockColor = 0; {Color of the rock your mining} {//}
{//} TimesToDrop = 5; {Times to drop a load of ore until change} {//}
{//} RunAway = 'N'; {Way to run away from a fight} {//}
{//} WaitTo = 15; {Max time while mining a rock in seconds} {//}
{//} TimesTill = 3; {Times to drop a load of ore until user switch}{//}
{//} User1Username = ''; {Below is self explanatory!} {//}
{//} User1Password = ''; {//}
{//} User1Nickname = ''; {//}
{//} {//}
{//} User2Username = ''; {//}
{//} User2Password = ''; {//}
{//} User2Nickname = ''; {//}
{/////////////////////////////////////////////////////////////////////}
{/////////////////////////////////////////////////////////////////////}
{//////////////////////////////END OF SETUP///////////////////////////}
{/////////////////////////////////////////////////////////////////////}
{/////////////////////////////////////////////////////////////////////}
{*************************************************************************}
{**********************DO NOT EDIT BELOW THIS LINE************************}
{*************************************************************************}
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Mining.scar}
var
i, droptimes : integer;

procedure ProgReport;
var
RHours, Minutes, Seconds, RMinutes, RSeconds : LongInt;
Time : string;
begin
Seconds:=(GetSystemTime-ST) div 1000;
Minutes:=Seconds div 60;
RHours:=Minutes div 60;
Time:=inttostr(Seconds)+' Seconds';
if Minutes<>0 then
begin
RSeconds:=Seconds Mod (Minutes*60);
Time:=inttostr(Minutes)+' Minutes and '+inttostr(RSeconds)+' Seconds';
end;
if RHours<>0 then
begin
RMinutes:=Minutes Mod (RHours*60);
RSeconds:=Seconds Mod (Minutes*60);
Time:=inttostr(RHours)+' Hours, '+inttostr(RMinutes)+' Minutes and '
+inttostr(RSeconds)+' Seconds';
end;
begin
writeln ('');
writeln ('===============POWERMINER BY BEGO==============');
writeln ('');
writeln (' Worked for: '+Time);
writeln (' Dropped '+inttostr(droptimes)+' loads of ore');
writeln ('');
writeln ('===============POWERMINER BY BEGO===============');
writeln ('');
end;
end;

procedure DeclarePlayers;
begin
HowManyPlayers := Users;
CurrentPlayer := StartPlayer;
NumberOfPlayers(HowManyPlayers);

Players[0].Name := User1Username;
Players[0].Pass := User1Password;
Players[0].Nick := User1Nickname;
Players[0].Active := True;

Players[1].Name := User2Username;
Players[1].Pass := User2Password;
Players[1].Nick := User2Nickname;
Players[1].Active := True;
end;

procedure DeclareGlobals;
begin
BenMouse := false;
end;

procedure AntiRandoms;
var
x, y : integer;
begin
GasColors(x, y);
FindNormalRandoms;
FindPick;
if (Findfight = true) then
begin
SetRun(true);
RunAwayDirection(RunAway);
Wait(3000 + Random(1000));
RunBack;
end;
end;

procedure LetRockDie(RockX, RockY, RockColor, ColorTol, MaxSeconds: Integer); //By phantombmx
var rox, roy, rrtime: Integer;
begin
MarkTime(rrtime);
repeat
Wait(500 + random(50));
AntiRandoms;
FindNormalRandoms;
until(not(FindColorTolerance(rox, roy, RockColor, RockX - 1, RockY - 1, RockX + 1, RockY + 1, ColorTol)))or
(TimeFromMark(rrtime) >= MaxSeconds * 1000)
end;

procedure MineRocks;
var
x, y : integer;
begin
AntiRandoms;
repeat
MarkTime(Mark);
if (not(LoggedIn)) then break;
if(FindColorSpiralTolerance(x, y, RockColor, 9, 8, 510, 335, 4))then
begin
if (TimeFromMark(Mark)>60000) then
begin
Logout;
Exit;
end;
AntiRandoms;
Mouse(x, y, 3, 3, true);
Flag;
Wait(500);
GetMousePos(x, y);
AntiRandoms;
LetRockDie(x, y, RockColor, 4, WaitTo);
end else
begin
MineRocks;
end;
until(InvFull);
AntiRandoms;
end;

procedure DropOres;
begin
if (i = 0) then
begin
Writeln('I hope you equiped your pickaxe…');
Writeln('because its dropping everything in inventory…');
i := i + 1;
end;
AntiRandoms;
DropAll;
AntiRandoms;
end;

Procedure NoName;
begin
if (LoggedIn) then
begin
SetChat('off',3);
repeat
Wait(1000);
FindNormalRandoms;
AntiRandoms;
until(not(LoggedIn));
NextPlayer(True);
droptimes := 0;
end;
end;

begin
SetupSRL;
SetupSRLMining;
DeclarePlayers;
DeclareGlobals;
if(not(loggedin)) then
begin
loginplayer;
end;
FindPickHeadColor;
i := 0;
repeat
AntiRandoms;
MineRocks;
HoverSkill('mining', false);
GameTab(4);
PickUpMouse;
AntiRandoms;
DropOres;
droptimes := droptimes + 1;
ProgReport;
AntiRandoms;
if (not(users = 1)) and
(droptimes = timestodrop) then
begin
NoName;
end else
if (not(Loggedin)) and (users = 1) then loginplayer;
if (not(loggedin)) and (not(users = 1)) then nextplayer(true);
until(False);
Writeln('Script done… somehow :O!!');
end.[/php]

armanie14

2006-07-02 03:01:53

Lol try not to be so hard on yourself,

I'll test it out and get back to you. I'm sure its a dam fine script! :D

Dub

2006-07-02 03:29:59

Looks good man.. Don't take urself down :p

QQu

2006-07-02 03:40:40

Bego, everyone has to make a Script at some stage.

Well Done ;)

Bego

2006-07-02 03:51:13

I should try making a slightly easier script than a powerminer next time, tomorrow I know what, I'll try a buyer ;)

Mad Cow

2006-07-02 04:21:23

[PHP]
until(False);
Writeln('Script done… somehow :O!!');[/PHP]
Lol.. Interesting…

Great job Bego.. Perhaps make a better progress report?

Mad Cow

Wizzup?

2006-07-02 04:25:13

I think the code looks very clean and neat! Well done.

Bego

2006-07-02 13:08:15

:) Wizzup, that makes me feel good, because your you, and I expected to be critiqued as horrible, but yeah, I always do my coding professional like, clean coding is what i need.

Thanks everyone XD

Yeah my progress report isn't the best, but I don't understand why people want to see anything other than time - who cares how many boxes they got? :p

Cheesehunk

2006-07-02 14:31:39

Looks good, except the SetUp is commented out…:p
I might be just reading things wrong, but thats what it looks like to me. XD

Edit: It's just me, I read it wrong..:o

Good job Bego!

Bego

2006-07-02 15:08:30

Thanks cheesehunk :)

baby

2006-07-02 16:48:03

From: Bego

Yeah my progress report isn't the best, but I don't understand why people want to see anything other than time - who cares how many boxes they got? :p


your exactly right i dont know the meaning of progressreports i dont look at them they are nice for posting but thats all :)
nice coding

SubiN

2006-07-02 20:19:28

I have to say , this is a very nice coding = VERY clean

Bego

2006-07-02 20:38:52

Currently fixing the out of range error.

realrune

2006-07-02 21:19:34

Nice, but we already have a lot of powerminers…

Bego

2006-07-02 22:33:08

I tried them a couple of the most popular ones, they don't work ;)

HUGE UPDATE! FIXED THE ERROR, MADE IT WORK BETTER, DETECT RANDOMS BETTER, AND LESS TIME CONSUMING!

nitrexoxide

2006-07-03 03:06:38

Me too, none seem to work for me, Ill try yours and get back to you! ;)

Wizzup?

2006-07-03 03:17:14

From: nitrexoxide
Me too, none seem to work for me, Ill try yours and get back to you! ;)


I guess you will need to look into the script and see look how you need to setup the script. :p

Dark_Sniper

2006-07-03 04:08:36

hey i think you messed up your player arrays a bit here
[PHP]
Players[0].Name := User1Username;
Players[0].Pass := User1Password;
Players[0].Nick := User1Nickname;
Players[0].Active := True;

Players[1].Name := User1Username;
Players[1].Pass := User1Password;
Players[1].Nick := User1Nickname;
Players[1].Active := True; [/PHP]

you dont want the char to be the same char do you?
fix:

[PHP]
Players[0].Name := User1Username;
Players[0].Pass := User1Password;
Players[0].Nick := User1Nickname;
Players[0].Active := True;

Players[1].Name := User2Username;
Players[1].Pass := User2Password;
Players[1].Nick := User2Nickname;
Players[1].Active := True; [/PHP]

Bego

2006-07-04 13:27:33

Oh gee I forgot to do that because I constantly delete those, thanks :)

halodude1489

2006-08-14 00:00:31

Go go bego, last time I remeber seeing you , you would spit out like 300 script releases / updates daily lol.