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]
[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]