SCAR Code:
{-------------------------- Arr0w's Powerminer --------------------------]
[ To start this scipt fill the colors of the rock in the setup ]
[ Then start the script stand next to the rock you want to mine ]
[ Put your pick in first inv slot. ]
[ ]
[ /\ |===\ |===\ /===\ | | /==\ ]
[ / \ | © | | © | | | | | / ]
[ | © | |___/ |___/ | © | | | \===\ ]
[ |====| | \ | \ | | \ /\ / / ]
[ | | | \ | \ \===/ \/ \/ \==/ ]
[ ]
[ /==\ /===\ | | |=== |===\ | | ===== | | |=== |===\ ]
[ | ©| | | | | | | © | |\ /| | |\ | | | © | ]
[ |__/ | © | | | |== |___/ | \/ | | | \ | |== |___/ ]
[ | | | \ /\ / | | \ | | | | \| | | \ ]
[ | \===/ \/ \/ |=== | \ | | ===== | | |=== | \ ]
[ ]
[------------------------------------------------------------------------]
# ScriptName = Anyore Powerminer!
# Author = Arr0w
# Description = Mines any ore then drops them.
# Authors Email = [email]Scott-_-bradford@hotmail.com[/email]
# Date = Published on the 10 october 2006
# Comments = Please post all Bugs/Corrections in this script's thread.
}
program PowerMiner;
{.include SRL/SRL.Scar}
{.include SRL/SRL/Skill/Mining.Scar}
{.include SRL/SRL/Extended/xMapWalk.Scar}
{.include SRL/SRL/Misc/Trade.Scar}
//-=-=-=-=-=-=-=-=-=-=-=Setup=-=-=-=-=-=-=-=-=-=-=\\
const
RockColor = 7829376; // The color of the rock.
RockColor1 = 7829376; // If the rock has 2 kind of colors find a different color from the top one.
RunDirection = 'N'; // What direction to run if fight found?
GenieSkill = 'Mining'; // What skill to use if genie is found?
LoadsToDo = 50; // How many loads do you want to do?
DisguiseScarAs = 'Google - FireFox'; // What do you want to disguise scar as?
RandomTalking = True; // Do you want to random talk?
TurnOffChats = False; // Do you want to turn off the chat?
UserName = 'Pur3min3r44'; // This is required if you choose to keep chats on.
//=-=-=-=-=-=-=-=-=-=-=End Of Setup=-=-=-=-=-=-=-=-=-=\\
//NOTE: PUT A CAPiTAL AT THE BEGINING OF YOUR USERNAME.
//NOTE: IF YOU HAVE RANDOMTALKING = TRUE THEN
// YOU CANT HAVE CHATS OFF OTHERWISE THE SCRIPT WILL JUST GET CONFUSED.
var
gx, gy, Tradess, OresMined,
Clay, OreMask, Loads: Integer;
procedure Miner;
begin
Wait(100 + random(10));
if (findcolorspiral(x, y, rockcolor, 3, 3, 515, 336)) or
(findcolorspiral(x, y, rockcolor1, 3, 3, 515, 336)) then
begin
repeat
Mmouse(x, y, 3, 3)
Wait(200 + random(50));
if (istextat2(x, y, 'ine', 5) = true) then
wait(500 + random(50));
Mouse(x, y, 2, 2, true)
wait(1000)
until (invfull)
if (Invfull) = True then
Loads := Loads + 1;
OresMined := OresMined + 27
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure CantFindRocks;
var
WX, WY: integer;
begin
if (not (findcolorspiral(x, y, rockcolor, 3, 3, 515, 336))) or
(not (findcolorspiral(x, y, rockcolor1, 3, 3, 515, 336))) then
begin
if FindSymbol(Wx, WY, 'mining site') then
begin
Mmouse(x, y, 3, 3)
Mouse(x, y, 2, 2, true)
end;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure Randoms;
begin
TalkToRand;
FindNormalRandoms;
if (FindFight) then
begin
RunWhere(rundirection, false);
Wait(10000 + random(200))
RunBack;
end;
if (GasFound(gx, gy)) then
begin
RunWhere(rundirection, false);
Wait(2000 + random(1000));
RunBack;
WriteLn('Waiting For Gas to Stop ..');
Wait(10000 + random(2000));
end;
if (FindNewBox) then
begin
writeln('Found Strange Box Trying To Solve..')
OpenBox;
SolveBox;
wait(1000);
end;
if (FindNewBox) then
begin
GambleNewBox;
end;
if (FindNewBox) then
begin
LogOut;
Writeln('Unable To Solve Box....Terminating');
TerminateScript;
end;
begin
ItemGrab;
FindPick;
LoadSandArray;
LoadSWBitMaps;
SetupSandwich;
ReleasesandWich;
GetSandQuestion;
SolveSandwich;
SolveFrog;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure WeAtMine;
var
WX, WY: Integer;
begin
if (not (FindSymbol(Wx, WY, 'mining site'))) then
begin
RunWhere('N', false)
if (not (FindSymbol(Wx, WY, 'mining site'))) then
begin
RunBack;
Flag;
RunWhere('E', False)
if (not (FindSymbol(Wx, WY, 'mining site'))) then
begin
RunBack;
Flag;
RunWhere('S', False)
if (not (FindSymbol(Wx, WY, 'mining site'))) then
begin
RunBack;
Flag;
Runwhere('W', False)
if (not (FindSymbol(Wx, WY, 'mining site'))) then
WriteLn('We are defantly lost termInating script')
TerminateScript;
end;
end;
end;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure LoadBitmaps;
begin
Clay := BitmapFromString(4, 4, '86714C89734D8B7650907A52978' +
'1569781569A8357957E55A1895CA38B5D9F875B9C8559AC9262A8' +
'8F60A58D5FA1895C');
OreMask := BitmapFromString(11, 11, 'z78DA73730301033070436' +
'2238B60024C35B84CC0A5923C13F0BB937813F0EB22DE04CC5022' +
'CF04CADD404CC890EA0BFCE2F85D4E4C6A212FF470998FCC0600F' +
'B599CC1');
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure DropOres;
begin
DwarfItem;
ClickAllItemsBmpMaskTolWait('rop', OreMask, 20, 25, 30 + Random(30));
ClickAllItemsBmpTolWait('rop', Clay, 10, 30 + Random(30));
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure ModSetRun(Run: Boolean);
var
WX, WY: Integer;
begin
GameTab(11);
if Run then
begin
if (not (FindColorTolerance(WX, WY, 1711220, 663, 431, 665, 433, 5))) then
begin
Mouse(648, 431, 20, 20, true);
Wait(100 + Random(100));
end;
end else
begin
if FindColorTolerance(WX, WY, 1711220, 663, 431, 665, 433, 5) then
begin
Mouse(648, 431, 20, 20, true);
Wait(100 + Random(100));
end;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure ModRunTo(dir: string; runfar: Boolean);
begin
MakeCompass('N');
ModSetRun(true);
if (runfar) then
case UpperCase(dir) of
'N': MouseFlag(648, 83 - 63, 0, 0)
'S': MouseFlag(648, 83 + 63, 0, 0)
'E': MouseFlag(648 + 63, 83, 0, 0)
'W': MouseFlag(648 - 63, 83, 0, 0)
end;
if (not runfar) then
case UpperCase(dir) of
'N': MouseFlag(648, 83 - 30, 0, 0)
'S': MouseFlag(648, 83 + 30, 0, 0)
'E': MouseFlag(648 + 30, 83, 0, 0)
'W': MouseFlag(648 - 30, 83, 0, 0)
end;
Wait(6500);
IdleTime(6000, 500, 1.0);
if (runfar) then
case Uppercase(dir) of
'N': MouseFlag(648, 83 + 63, 0, 0)
'S': MouseFlag(648, 83 - 63, 0, 0)
'E': MouseFlag(648 - 63, 83, 0, 0)
'W': MouseFlag(648 + 63, 83, 0, 0)
end;
if (not runfar) then
case UpperCase(dir) of
'N': MouseFlag(648, 83 + 30, 0, 0)
'S': MouseFlag(648, 83 - 30, 0, 0)
'E': MouseFlag(648 - 30, 83, 0, 0)
'W': MouseFlag(648 + 30, 83, 0, 0)
end;
ModSetRun(False);
GameTab(4);
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure ProgressReport;
begin
ChangeReportWidth(1);
WriteLn('/===========================================\');
WriteLn('| Thank You For Using Arr0w''s PowerMiner! |');
WriteLn('|===========================================|');
WriteLn('Total Loads Done : ' + IntToStr(Loads) + '! ');
writeLn('Total Ores Mined : ' + IntToStr(OresMined) + '!');
writeLn('Total People Tryied To Trade With You : ' + IntToStr(trades) + '!');
WriteLn('Made by Arr0w from moparisthebest.com ');
WriteLn('To see for a new version check moparisthebest');
writeLn('<><><><><><><><><><><><><><><><><><><><><><><');
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure Trading;
begin
AcceptTrade;
Wait(3000 + Random(100))
Decline;
Wait(100 + Random(101))
SendText('No ty')
SendKeysSilent(Chr(13));
ChatsOff;
Tradess := Trades + 1
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure ifchat;
begin
if FindChatText(UserName + '?') then
begin
SendText2('sorry i am a bit busy atm')
SendText2(' Ill speak with you later')
SendKeysSilent(Chr(13));
Chatsoff;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure Chats;
begin
if TurnOffChats = True then
begin
ChatsOff;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
procedure Randomchats;
begin
if TurnOffChats = False then
if RandomTalking = True then
begin
RandomChatEvery(10000 + random(10));
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-Main Loop-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\\
begin
DisguiseScar(DisguiseScarAs);
ClearDebug;
SRLRandomsReport;
ActivateClient;
SetupSRL;
SetupSrlMining;
LoadMiningBitmaps;
Chats;
ModSetRun(true);
FindPickHeadColor;
repeat
WeAtMine;
CantFindRocks;
Miner;
Wait(500 + random(56));
Randoms;
DropOres;
Ifchat;
Trading;
Randoms;
Randomchats;
ProgressReport;
until (loads = LoadsToDo)
if loads = loadstodo then
openwebpage('http://www.moparisthebest.org/smf/index.php/topic,27040.0.html')
end.