ape
2009-10-02 02:51:53
How Long have You Played Runescape?
4 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
What is your general programming knowledge?
I am quite knowledgeable in Java and I have made a multi-threaded socket server, 100% from scratch with this language.
I am extremely knowledgeable in Flash Actionscript 3.
I know PHP / MySQL, CSS, HTML and have made sites before utilizing both.
I also know a decent amount of Pascal :)
Are you a member of any other communities?
I am not affiliated in any other communities related to SCAR, or Runescape related.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
4 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
What is your general programming knowledge?
I am quite knowledgeable in Java and I have made a multi-threaded socket server, 100% from scratch with this language.
I am extremely knowledgeable in Flash Actionscript 3.
I know PHP / MySQL, CSS, HTML and have made sites before utilizing both.
I also know a decent amount of Pascal :)
Are you a member of any other communities?
I am not affiliated in any other communities related to SCAR, or Runescape related.
Tell us about yourself…
From: ape
I am 18 years old and I am currently in college. I am interested in programming, vector graphics, and game networking. I used to play Runescape quite a while ago but I only log in to test some of my scar scripts. I am extremely knowledgeable of the OOP structures and methods. I am currently working on a multiplayer game in flash/java as well. I am quite interested in automation and have made a few scripts in SCAR even before SRL had existed.
Please show us one (or multiple) of your scripts.
{==============================================================================]
[ ___ ______ _____ _____ ]
[ / _ \ | ___ \ ___/ ___| ]
[ / /_\ \| |_/ / |__ \ `--. ]
[ | _ || __/| __| `--. \ ]
[ | | | || | | |___/\__/ / ]
[ \_| |_/\_| \____/\____/ ]
[ ___ _ _ _____ ________ ________ _ _ ___________ ]
[ / _ \| | | |_ _| _ | \/ |_ _| \ | || ___| ___ \ ]
[ / /_\ \ | | | | | | | | | . . | | | | \| || |__ | |_/ / ]
[ | _ | | | | | | | | | | |\/| | | | | . ` || __|| / ]
[ | | | | |_| | | | \ \_/ / | | |_| |_| |\ || |___| |\ \ ]
[ \_| |_/\___/ \_/ \___/\_| |_/\___/\_| \_/\____/\_| \_| ]
[ ]
[==============================================================================]
[ Apes Auto Miner Version 1.11 ]
[==============================================================================]
[ ]
[ Written By: Ape ]
[ Description: Mines and drops ores of any type. ]
[ Contact: Private message me on Villavu.com ]
[ ]
[==============================================================================]
[ Instructions ]
[==============================================================================]
[ ]
[ 1) Keep a pickaxe equipped or in the inventory. ]
[ 2) Start near the rocks you are going to mine. ]
[ 3) Setup player(s). ]
[ 4) Fill out other settings at line 105 if necessary. ]
[ 5) Press run. ]
[ 6) Post progress report on forum. ^_^ ]
[ ]
[==============================================================================]
[ Features ]
[==============================================================================]
[ ]
[ ~ Multiplayer ~ Auto Responder ]
[ ~ S.M.A.R.T ~ Safe Dropping ]
[ ~ Anti Ban ~ Supports over 9 different rock types. ]
[ ~ Auto Color ~ Over 14 different dropping patterns. ]
[ ~ Pickaxe Checking ~ World Changer ]
[ ~ Crowd Avoider ~ Inventory Organizer ]
[ ~ Level up screenshots ~ Progress report. ]
[ ~ Anti Randoms ~ Fully customizable settings. ]
[ ]
[==============================================================================}
Program AutoMiner;
{.include SRL/SRL/Misc/Smart.scar}
{.include srl/srl.scar}
{.include SRL/SRL/Skill/Mining.scar}
{.include SRL/SRL/Misc/Debug.scar}
Const
Signed = True;
SDetail = False;
Version = '1.11';
Var
theOre, workTime, cantFind, pRadius, lvlCache, WorldNum: Integer;
isQuickChat, Members: Boolean;
MsgTimers: TIntegerArray;
OreRecord: TAutoColorInfo;
LastChat: String;
Procedure SetPlayers;
Begin
HowManyPlayers := 1; // How many players are you going To use?
CurrentPlayer := 0; // Which player should we start With?
NumberOfPlayers(HowManyPlayers); // Don't Touch.
With Players[0] Do
Begin
Name := 'Username';
Pass := 'Password';
Nick := 'nick'; //2 - 4 characters of username (lowercase)
Active := True; //Use this player?
Integers[0] := 500; //How many ores To mine? (0 = Infinite)
Integers[1] := 6; //Max number of players in area before changing worlds. Ex: 2 means, if 3 people are within the set area of you it will change worlds.
Strings[1] := 'Iron'; //Ore type here. Clay, Tin, Copper, Iron
Integers[3] := 3000; //Min wait time in Milliseconds for mining rock. random 500 milliseconds will be added to this.
Booleans[0] := True; //Take naps?
Booleans[1] := False; //Use member's worlds?
Booleans[3] := True; //Use the auto responder? Will take screenshots of each response.
Strings[0] := 'W'; //Direction to run incase of attack. (N)orth (E)ast (S)out (W)est
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
End;
{
With Players[1] Do
Begin
Name := 'Username';
Pass := 'Password';
Nick := 'nick'; //2 - 4 characters of username (lowercase)
Active := True; //Use this player?
Integers[0] := 500; //How many ores To mine? (0 = Infinite)
Integers[1] := 6; //Max number of players in area before changing worlds. Ex: 2 means, if 3 people are within the set area of you it will change worlds.
Strings[1] := 'Iron'; //Ore type here. Clay, Tin, Copper, Iron
Integers[3] := 3000; //Min wait time in Milliseconds for mining rock. random 500 milliseconds will be added to this.
Booleans[0] := True; //Take naps?
Booleans[1] := False; //Use member's worlds?
Booleans[3] := True; //Use the auto responder? Will take screenshots of each response.
Strings[0] := 'W'; //Direction to run incase of attack. (N)orth (E)ast (S)out (W)est
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
End;
With Players[2] Do
Begin
Name := 'Username';
Pass := 'Password';
Nick := 'nick'; //2 - 4 characters of username (lowercase)
Active := True; //Use this player?
Integers[0] := 500; //How many ores To mine? (0 = Infinite)
Integers[1] := 6; //Max number of players in area before changing worlds. Ex: 2 means, if 3 people are within the set area of you it will change worlds.
Strings[1] := 'Iron'; //Ore type here. Clay, Tin, Copper, Iron
Integers[3] := 3000; //Min wait time in Milliseconds for mining rock. random 500 milliseconds will be added to this.
Booleans[0] := True; //Take naps?
Booleans[1] := False; //Use member's worlds?
Booleans[3] := True; //Use the auto responder? Will take screenshots of each response.
Strings[0] := 'W'; //Direction to run incase of attack. (N)orth (E)ast (S)out (W)est
BoxRewards := ['amp', 'mote', 'ostume', 'oins', 'unes', 're', 'ems'];
End;
}
End;
Procedure OtherSettings;
Begin
WorldNum := 33; //What world should we load with SMART?
Members := False; //Load SMART members world?
MouseSpeed := 18; //Mouse speed. Keep between 15 - 30
workTime := 1200000; //Amount of time to work before each break / char swap. 10 Minutes.
End;
//Don't touch anything below here unless
//you know what you are doing.
Procedure LoadOreRecords;
Var
id: Integer;
Begin
Case LowerCase(Players[CurrentPlayer].Strings[1]) Of
'clay': id := 0;
'tin': id := 1;
'copper': id := 2;
'iron': id := 3;
Else
Begin
WriteLn(Players[CurrentPlayer].Strings[1]+'Is an invalid ore type! Going to reset to Copper.');
Wait(5000);
id := 2;
End;
End;
//WriteLn('MINING ORE: ' + IntToStr(id));
Case id Of
0: //Clay
with OreRecord do
begin
Color := 4494269;
HueMod := 0.03;
SatMod := 1.02;
LumTol := 9;
MinR := 148; MaxR := 211;
MinG := 118; MaxG := 169;
MinB := 64; MaxB := 92;
MinX := 19.93; MaxX := 42.49;
MinY := 19.95; MaxY := 42.48;
MinZ := 7.78; MaxZ := 15.87;
end;
1: //Tin
with OreRecord do
begin
Color := 7895424;
HueMod := 0.15;
SatMod := 0.08;
LumTol := 14;
MinR := 90; MaxR := 164;
MinG := 86; MaxG := 157;
MinB := 85; MaxB := 156;
MinX := 9.38; MaxX := 32.93;
MinY := 9.69; MaxY := 33.95;
MinZ := 10.16; MaxZ := 35.84;
end;
2: //Copper
with OreRecord do
begin
Color := 4286354;
HueMod := 0.03;
SatMod := 0.07;
LumTol := 7;
MinR := 121; MaxR := 171;
MinG := 85; MaxG := 121;
MinB := 53; MaxB := 77;
MinX := 12.00; MaxX := 24.62;
MinY := 11.04; MaxY := 22.52;
MinZ := 4.97; MaxZ := 9.90;
end;
3: //Iron
with OreRecord do
begin
Color := 2634057;
HueMod := 0.13;
SatMod := 0.20;
LumTol := 7;
MinR := 60; MaxR := 86;
MinG := 40; MaxG := 58;
MinB := 33; MaxB := 48;
MinX := 2.99; MaxX := 5.74;
MinY := 2.67; MaxY := 5.08;
MinZ := 1.85; MaxZ := 3.38;
end;
End;
End;
Procedure MakeSig;
Begin
WriteLn(' _ ');
Wait(50);
WriteLn('//\ ');
Wait(50);
WriteLn('V \ ');
Wait(50);
WriteLn(' \ \_ ');
Wait(50);
WriteLn(' \,`.`-. ');
Wait(50);
WriteLn(' |\ `. `. ');
Wait(50);
WriteLn(' ( \ `. `-. _,.-:\');
Wait(50);
WriteLn(' \ \ `. `-._ __..--` ,-`;/');
Wait(50);
WriteLn(' \ `. `-. `-..___..---` _.--` ,`/ ');
Wait(50);
WriteLn(' `. `. `-._ __..--` ,` / ');
Wait(50);
WriteLn(' `. `-_ ``--..'' _.-` ,` ');
Wait(50);
WriteLn(' `-_ `-.___ __,--` ,` ');
Wait(50);
WriteLn(' `-.__ `----""" __.-` ');
Wait(50);
WriteLn(' `--..____..--` ');
Wait(50);
WriteLn(' .:Ape''s Auto Miner:. ');
WriteLn(' .:Version '+Version+':. ');
Wait(1250);
End;
Procedure ProggyReport;
Var
I, oph: Integer;
Begin
Status('Progress Report');
ClearDebug;
SRLRandomsReport;
If(High(Players) <= 1) Then
Begin
Try
oph := Round((Players[CurrentPlayer].Integers[10] * 3600.0) /(GetTimeRunning / 1000.0));
Except
WriteLn('Failed To calculate ores per hour!');
End;
WriteLn('[===================================]');
WriteLn('[ Apes Auto Miner ]');
WriteLn('[===================================]');
WriteLn('[ '+Padr('Ran For:-> '+MsToTime(GetTimeRunning, Time_Short), 34)+']');
WriteLn('[ '+Padr('Ores:----> '+IntToStr(Players[CurrentPlayer].Integers[10])+' | '+IntToStr(oph)+'/Hour', 34)+']');
WriteLn('[ '+Padr('Naps:----> '+IntToStr(Players[CurrentPlayer].Integers[4]), 34)+']');
WriteLn('[ '+Padr('Worlds:--> '+IntToStr(Players[CurrentPlayer].Integers[5]), 34)+']');
WriteLn('[ '+Padr('Chats:---> '+IntToStr(Players[CurrentPlayer].Integers[8]), 34)+']');
WriteLn('[ '+Padr('A-Bans:--> '+IntToStr(Players[CurrentPlayer].Integers[7]), 34)+']');
WriteLn('[ '+Padr('Checks:--> '+IntToStr(Players[CurrentPlayer].Integers[6]), 34)+']');
WriteLn('[===================================]');
End Else
Begin
WriteLn('[======================================================================]');
WriteLn('| Apes Auto Miner |');
WriteLn('|======================================================================|');
WriteLn('| Username | Active | OreType | Ores | Ore/H | Chats | Worlds | A-Bans |');
WriteLn('|======================================================================|');
for I := 0 to High(Players) do
begin
Try
oph := Round((Players[I].Integers[10] * 3600.0) /(GetTimeRunning / 1000.0));
Except
End;
WriteLn('| ' + PadR(Players[I].Name, 11)+
Padr(BoolToStr(Players[I].Active), 9) +
Padr(Players[I].Strings[1], 10)+
Padr(IntToStr(Players[I].Integers[10]), 7) +
Padr(IntToStr(oph), 8) +
Padr(IntToStr(Players[I].Integers[8]), 8) +
Padr(IntToStr(Players[I].Integers[5]), 9) +
Padr(IntToStr(Players[I].Integers[7]), 7) + '|');
End;
WriteLn('[======================================================================]');
WriteLn(Padr('Ran For:-> '+MsToTime(GetTimeRunning, Time_Short), 34));
End;
End;
Procedure AutoRespond;
Var
I, Q, thePos: Integer;
PlayerName, Msg: String;
ArrayTrigger, ArrayResponse : TStringArray;
Begin
If (Not(Players[CurrentPlayer].Booleans[3])) or then Exit;
PlayerName := Lowercase(GetChatBoxText(8, clMessage));
Msg := Lowercase(GetChatBoxText(8, clChat));
If(LastChat = Msg) Then Exit;
If(Length(Msg) < 2) Then Exit;
LastChat := Msg;
WriteLn('Found Chat: '+Msg);
If(PlayerName = (Lowercase(Players[CurrentPlayer].Name + ':'))) Or (isQuickChat = True) Then
Begin
//WriteLn('Not talking to ourselves now, are we?');
Exit;
End;
For I:= 0 To 8 Do
Begin
Case I Of
0: Begin //Hellos
ArrayTrigger := ['hi', 'hello', 'hey', 'hai', 'sup', 'wats up', 'whats up', 'what''s up', 'wazzup', 'how are you', 'hola', 'holla', 'hay', 'hallo', LowerCase(Players[CurrentPlayer].Name)];
ArrayResponse := ['hi', 'hello', 'hey', 'hai', 'sup', 'wats up', 'whats up', 'watz up', 'wazzup', 'how are you', 'the name is ' + LowerCase(Players[CurrentPlayer].Name)];
End;
1: Begin //Byes
ArrayTrigger := ['bye', 'goodbye', 'good bye', 'cya', 'later', 'see ya', 'so long', 'adios'];
ArrayResponse := ['bye', 'goodbye', 'good bye', 'cya', 'later', 'see ya', 'byebye', 'get to da chopper'];
End;
2: Begin //Requests / leave
ArrayTrigger := ['can you', 'can i', 'may i', 'can we', 'may we', 'go away', 'get out', 'stop', 'trade', 'trd', 'leave', 'change w', 'switch w', 'change t', 'switch t', '2 each', 'two each', 'share', 'robot', 'macro', 'botter', 'cheater', '2each'];
ArrayResponse := ['sorry', 'sry', 'no can do', 'no', 'nah', 'nuh uh', 'nope'];
End;
2: Begin //Questions
ArrayTrigger := ['what', 'where', 'how', 'do you', 'do u', 'were', 'wat', 'are u', 'are you', 'u th', 'u kno', 'you kno', 'wanna', 'want to', 'want 2'];
ArrayResponse := ['i dunno', 'wat', 'what', 'uhh', 'sorry', 'sry', 'no can do', 'no', 'nah', 'nuh uh', 'nope', '?'];
End;
3: Begin //Question mark response
ArrayTrigger := ['?'];
ArrayResponse := ['wat', 'what', 'uhh', 'huh', '?'];
End;
4: Begin //lolz
ArrayTrigger := ['lol', 'l o l', 'l.o.l', 'lawl', 'lul', 'i wasn''t talk', 'i wasnt talk', 'i was not talk', 'i not talk', 'im not talk', 'i''m not talk', 'i aint talk', 'lmao', 'rofl'];
ArrayResponse := ['lol', 'l o l', 'lawl', 'lul', 'hehe', 'heh', 'ha', 'meh', 'lolol', 'lollercakes', 'uber lulz', 'lulz', 'lololol', '^^', '^_^', '=[)', ':D', ':)'];
End;
5: Begin //Insults
ArrayTrigger := ['f u', 'noob', 'choob', 'froob', 'dum', 'dumb', 'nub', 'chub', 'frick', 'fok', 'effing', 'f ing', 'f-ing', 'fing', 'freakin', 'fuggin', 'damn', 'ass', 'scrw', 'screw', 'jerk'];
ArrayResponse := ['leave me alone', 'go away', 'ur mean', 'im rubber ur glue', 'im rubber and you are glue', 'suuure', 'talk about calling the kettle black', 'u too', 'thanks, thanks alot', 'dont make me report you', 'yeah right', 'ya right', 'yeah yeah...', 'what eva', 'what ever'];
End;
6: Begin //Compliments
ArrayTrigger := ['ur good', 'nice', 'cool a', 'cool s', 'cool w', 'cool h', 'ur cool', 'u r cool', 'your cool', 'you''re cool'];
ArrayResponse := ['ty', 'thanks', 'ty :D', 'ty :)', 'thx', 'ty', 'omg ty'];
End;
7: Begin //Mining lvl
ArrayTrigger := ['mining lv', 'lvl', 'mining level', 'what is your level in mining', 'my mining level is'];
ArrayResponse := ['lvl '+IntToStr(lvlCache), IntToStr(lvlCache), 'mine is '+IntToStr(lvlCache)];
End;
End; //case end
For Q:= 0 To High(ArrayTrigger) Do
Begin
thePos := Pos(ArrayTrigger[Q], Msg);
If(thePos = 1) Then
Begin
If(TimeFromMark(MsgTimers[I]) > 35000) Then
Begin
MarkTime(MsgTimers[I]);
TypeSendEx(AddMistakes(ArrayResponse[RandomRange(0, High(ArrayResponse))], 20), True);
Players[CurrentPlayer].Integers[8] := Players[CurrentPlayer].Integers[8] + 1;
TakeScreenshot(ScriptPath + 'AAM - ' + Players[CurrentPlayer].Name + ' - Talked - '+MsToTime(GetTimeRunning, Time_FStop));
Exit;
End Else
Exit;
End
End;
End;
End;
Function HasPick: Boolean;
Var
tx, ty, thePick: Integer;
Begin
If Not (Loggedin) Then exit;
Status('Checking For Pick');
thePick := DTMFromString('78DA6364616160B8CEC8800C7A0AFC1824813' +
'448F43F10307E656660B889AA06240B5303E681D4DC22A0E62F50' +
'CD47026A185808AB6105AAB943400D1F50CD3D026AF8816AEE126' +
'1D70D026A1831C3105D0D0098D81252');
Result := False;
GameTab(tab_Inv);
If FindDTM(thePick, tx, ty, MIX1, MIY1, MIX2, MIY2) Then
Begin
Result := True;
End Else
Begin
GameTab(tab_Equip);
If FindDTM(thePick, tx, ty, MIX1, MIY1, MIX2, MIY2) Then
Begin
Result := True;
End;
GameTab(tab_Inv);
If(Result = True) Then
Status('Found Pick')
Else
Status('Pick Not Found');
End;
FreeDTM(thePick);
End;
Function LostPickText: Boolean;
Begin
If Not (Loggedin) Then exit;
Result := FindNPCChatText('ickaxe', Nothing);
If Not Result Then
Result := FindNPCChatText('kaxe', Nothing);
If Result Then
Status('Says we don''t have a pickaxe. Checking Pick...');
End;
Function QuickChatWorldText: Boolean;
Begin
If Not (Loggedin) Then exit;
If(FindBlackChatMessage('you want to chat freely') Or FindNPCChatText('particular', Nothing) Or FindNPCChatText('Quick Chat', Nothing)) Then
Result := True
Else
Result := False;
If Result Then
Status('We are in a Quick Chat world. Temporarily turning off chat.');
End;
Procedure LevelUpText;
Begin
If Not (Loggedin) Then exit;
If(FindNPCChatText('ngratulat', Nothing)) Then
Begin
TakeScreenshot(ScriptPath + 'AAM - ' + Players[CurrentPlayer].Name + ' - lvlUp - '+MsToTime(GetTimeRunning, Time_FStop));
WriteLn('Congratulations, you gained a mining level!');
Wait(RandomRange(2600, 3000));
End;
End;
Procedure PlayerSetup;
Begin
Status('Logging In');
LoadOreRecords;
LoginPlayer;
isQuickChat := QuickChatWorldText;
If (not(HasPick)) Then
Begin
WriteLn('Player Doesn''t have a pickaxe. Changing players...');
NextPlayer(False);
if LoggedIn then
Logout;
End;
SetRun(True);
SetAngle(True);
lvlCache := GetSkillInfo('mining', True);
if(lvlCache = 0) then
begin
lvlCache := RandomRange(10, 59);
WriteLn('WARNING!!!! Couldn''t read mining level! Making up a random one...');
end;
WriteLn('Mining Level: '+IntToStr(lvlCache));
MakeCompass('Random');
End;
Procedure CWRandom;
Var
gWorld: Boolean;
tries: Integer;
Begin
Status('Changing Worlds');
Logout;
If (Loggedin) Then Logout;
repeat
gWorld := SelectWorld(RandomWorld(Players[CurrentPlayer].Booleans[1], False));
tries := tries + 1;
until((gWorld) or (tries > 3));
tries := 0;
Players[CurrentPlayer].Integers[5] := Players[CurrentPlayer].Integers[5] + 1;
PlayerSetup;
End;
Procedure MapCountDotsArea;
Var DotNum: Integer;
Begin
DotNum := Length(GetMiniMapDotsIn('white', (MMCX - pRadius), (MMCY - pRadius), (MMCX + pRadius), (MMCY + pRadius)));
If(DotNum > Players[CurrentPlayer].Integers[1]) Then
CWRandom
Else
Status(IntToStr(DotNum)+' Players Nearby');
End;
Procedure GoToSleep;
Var
RestTime : Integer;
Begin
If Not LoggedIn Then Exit;
RestTime := 380000 + Random(240000);
If Players[CurrentPlayer].Booleans[0] Then
Begin
If (PlayersActive > 1) Then
Begin
WriteLn('Switching Players...');
Players[CurrentPlayer].Integers[4] := Players[CurrentPlayer].Integers[4] + 1;
NextPlayer(Players[CurrentPlayer].Active);
End Else
Begin
Status('Going To Sleep For '+ MsToTime(RestTime, Time_Short));
Logout;
Wait(RestTime);
Status('Nap Time Over!');
LoginPlayer;
SetRun(True);
Players[CurrentPlayer].Integers[4] := Players[CurrentPlayer].Integers[4] + 1;
End;
End;
End;
Procedure ArrangeInventory;
Var
i, a, b, c, OpenSpace, mSpeed: Integer;
coords1, coords2: TPoint;
InvSpotFull: array[1..28] of Boolean;
Begin
Status('Arranging Inventory');
mSpeed := MouseSpeed;
If (InvCount <= 0) or (InvCount > 5) Then Exit; //No point in sorting a half way full inventory.
For i := 1 To 28 Do
InvSpotFull[i] := ExistsItem(i);
For i := 1 To 28 Do
If InvSpotFull[i] Then
For c := 1 To 28 Do
If Not ExistsItem(c) Then
Begin
OpenSpace := c;
If (i > 1) and (c < i) Then
Begin
coords1 := ItemCoords(i); //Start
coords2 := ItemCoords(c); //End
MMouse(coords1.X, coords1.Y, 10, 10);
Wait(60 + Random(100));
GetMousePos(a, b);
HoldMouse(a, b, True);
Wait(RandomRange(50, 150));
MouseSpeed := 10;
MMouse(coords2.X, coords2.Y, 10, 10);
Wait(RandomRange(111, 450));
GetMousePos(a, b);
ReleaseMouse(a, b, True);
Wait(RandomRange(50, 150));
MouseSpeed := mSpeed;
Break;
End;
End;
End;
Function SafeDropItem(i: Integer): Boolean; //Drops an item in a human like manner.
Var
boxCoords: TBox;
rand, mx, my: Integer;
Begin
If Not (Loggedin) Then Exit;
GameTab(tab_Inv);
boxCoords := InvBox(i);
mx := (boxCoords.x1 + boxCoords.x2) / 2;
my := (boxCoords.y1 + boxCoords.y2) / 2;
If (FindBitmapSpiralTolerance(theOre, mx, my, boxCoords.x1, boxCoords.y1, boxCoords.x2, boxCoords.y2, 80)) Then
Begin
Status('Dropping Slot: '+IntToStr(i));
Mouse(boxCoords.x1, boxCoords.y1, 30, 30, False);
rand := RandomRange(1, 10);
If(rand > 1)Then
Begin
ChooseOption('Drop');
Players[CurrentPlayer].Integers[10] := Players[CurrentPlayer].Integers[10] + 1;
End Else
Begin
case RandomRange(1, 3) of
1: ChooseOption('Examine');
2: ChooseOption('Cancel');
End;
Result := True;
End;
Wait(RandomRange(50, 150));
End;
End;
Procedure FindRandoms;
Begin
If Not (Loggedin) Then exit;
FindNonInventoryRandoms;
If LostPickText Then
If (HasPick = false) Then
Begin
WriteLn('NO PICK!');
Players[CurrentPlayer].Active := False;
Logout;
End;
If FindFight Then RunAway(Players[CurrentPlayer].Strings[0], True, 1, 5000);
LevelUpText;
Players[CurrentPlayer].Integers[6] := Players[CurrentPlayer].Integers[6] + 1;
End;
Procedure Dropper;
Var
a, qq, which, x, y: Integer;
Arr: TIntegerArray;
b: Boolean;
Begin
If Not (Loggedin) Then exit;
Status('Dropping Ores');
SetLength(Arr, 28);
a := 0;
which := Random(7)+1;
Case which Of
{ -Patterns-
1 Snake columns
2 Snake rows
3 Box spiral
4 Columns
5 Rows
6 Every other row
7 Every other column
}
1: Arr := [1,5,9,13,17,21,25,26,22,18,14,10,6,2,3,7,11,15,19,23,27,28,24,20,16,12,8,4];
2: Arr := [1,2,3,4,8,7,6,5,9,10,11,12,16,15,14,13,17,18,19,20,24,23,22,21,25,26,27,28];
3: Arr := [1,2,3,4,8,12,16,20,24,28,27,26,25,21,17,13,9,5,6,7,11,15,19,23,22,18,14,10];
4: Arr := [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
5: Arr := [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28];
6: Arr := [1,2,3,4,9,10,11,12,17,18,19,20,25,26,27,28,5,6,7,8,13,14,15,16,21,22,23,24];
7: Arr := [1,5,9,13,17,21,25,4,8,12,16,20,24,28,2,6,10,14,18,22,26,3,7,11,15,19,23,27];
End;
If Random(2) = 1 Then
InvertTIA(Arr);
Gametab(tab_inv);
While(FindBitmapSpiralTolerance(theOre, x, y, MIx1, MIy1, MIx2, MIy2, 40)) Do
Begin
Status('Drop Loop');
For qq:= 0 To 27 Do
Begin
AutoRespond;
b:= SafeDropItem(Arr[qq]);
End;
End;
FindNormalRandoms;
Status('Done Dropping');
End;
Procedure AntiBan;
Var
ran: Integer;
Begin
If Not (Loggedin) Then exit;
Status('Antiban');
ran := Random(36);
Case ran Of
0..6: BoredHuman;
7..11: RandomAngle(1);
12..17: RandomMovement;
18..21: PickUpMouse;
22..27: MMouse(Random(MSX2), Random(MSY2), 0, 0);
28..29: HoverSkill('Mining', false);
30..35: MakeCompass('Random');
End;
Players[CurrentPlayer].Integers[7] := Players[CurrentPlayer].Integers[7] + 1;
Status('Antiban Complete');
End;
Function InvDiff(start: Integer): Boolean;
Begin
Result := False;
If Not(InvCount = start) Then
Result := True;
End;
Function FindThatRock(Var fx, fy: Integer): Boolean;
Var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
X, Y, Z: Extended;
Begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(OreRecord.HueMod, OreRecord.SatMod);
If Not(FindColorsTolerance(arP, OreRecord.Color, MSX1, MSY1, MSX2, MSY2, OreRecord.LumTol)) Then
Begin
Status('Failed to find ore!');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
For i := 0 To arL Do
Begin
ColorToXYZ(arC[i], X, Y, Z);
If (X >= OreRecord.MinX) And (X <= OreRecord.MaxX) And (Y >= OreRecord.MinY) And (Y <= OreRecord.MaxY) And (Z >= OreRecord.MinZ) And (Z <= OreRecord.MaxZ) Then
Begin
For j := 0 To arL2 Do
Begin
If (arUC[i] = arC[j]) Then
Begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
End;
End;
End;
End;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
For i := 0 To arL Do
Begin
If (Length(ararP[i]) < 10) Then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x - 5, P.y - 5, 15, 15);
Wait(100 + Random(100));
If (IsUpText('Mine')) Then
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
If (i = arL + 1) Then
Begin
Status('Failed to find ore!');
Exit;
End;
GetMousePos(fx, fy);
End;
Procedure MineRock;
Var
xx, yy, num, tMine: Integer;
Begin
If Not(LoggedIn) Or (InvFull) then Exit;
LevelUpText;
AutoRespond;
Status('Mining');
GameTab(tab_Inv);
num := InvCount;
If(FindThatRock(xx, yy)) Then
Begin
cantFind := 0;
AutoRespond;
GetMousePos(xx, yy);
Case Random(4) Of
0..2: Begin
Mouse(xx, yy, 0, 0, True);
If Not DidRedClick Then Exit;
End;
3: Begin
Mouse(xx, yy, 0, 0, False);
ChooseOption('ine');
If Not DidRedClick Then Exit;
End;
End;
End Else
Begin
cantFind := cantFind + 1;
AutoRespond;
If(Random(2) = 1) Then MakeCompass('Random');
If(cantFind > 10) Then
Begin
WriteLn('Unable To find the rocks specified. Logging out.');
Players[CurrentPlayer].Active := False;
Logout;
Exit;
End;
End;
FindRandoms;
While(FlagPresent) Do Wait(800);
MarkTime(tMine);
Repeat
Wait(100 + Random(100));
Until(InvDiff(num) Or FindBlackChatMessage('ore') Or (TimeFromMark(tMine) > (Players[CurrentPlayer].Integers[3] + Random(500))));
End;
Procedure LoadBitmaps;
Begin
theOre := BitmapFromString(8, 12, 'beNptkO0KgkAQRbfXKIqiJEsz2x' +
'YNkUQq6UuKiAgiInr/d+jAxLI/gsswHM/cBVVDqf+Zes007GRRl+R' +
'xr9D90gyI9lvMdeLtMv+Qj85FyKwWQzNuw1ng9TK4lBMmOyWufNvE' +
'ckKtla+r6LHVcsJbrvzczz+nlE+UA60MJOyUwxHu1QzyrhPCoW0W8' +
'joagiOyJfRLkF3y+w9fQ849eQ==');
End;
Procedure ScriptSetup;
Begin
OtherSettings;
LoadBitmaps;
setArrayLength(MsgTimers, 10);
ClearDebug;
Disguise('Google - Mozilla Firefox');
MakeSig;
Smart_Server := WorldNum;
Smart_Members := Members;
Smart_Signed := Signed;
Smart_SuperDetail := SDetail;
WriteLn('Please Stand By...');
SetupSRL;
SetupMining;
SetPlayers;
End;
Procedure MainLoop;
Var
Start: Integer;
Begin
ScriptSetup;
Repeat
PlayerSetup;
MarkTime(Start);
Repeat
MineRock;
If(RandomRange(1, 12) = 3)Then
Begin
AutoRespond;
AntiBan;
MapCountDotsArea;
End;
If InvFull Then
Begin
FindRandoms;
Dropper;
ArrangeInventory;
ProggyReport;
MapCountDotsArea;
End;
If (TimeFromMark(Start) > (workTime)) Or (Players[CurrentPlayer].Integers[10] >= Players[CurrentPlayer].Integers[0]) And Not (Players[CurrentPlayer].Integers[0] = 0) Then
Begin
GoToSleep;
MarkTime(Start);
End;
Until(((Players[CurrentPlayer].Integers[10] >= Players[CurrentPlayer].Integers[0]) And Not (Players[CurrentPlayer].Integers[0] = 0)) Or Not LoggedIn);
If AllPlayersInactive Then
Begin
WriteLn('All players are inactive. Shutting Down.');
ProggyReport;
FreeBitmap(theOre);
TerminateScript;
End;
NextPlayer(Players[CurrentPlayer].Active);
Until(AllPlayersInactive);
End;
Begin
MainLoop;
End.