Jump to content
BryceTheCoder

2007Bot's xMiner

Recommended Posts

xMiner

All information about the scripts is here: xMiner - 2007Bot

 

 

 

Currently only has dropping for power-mining with multiple ores to pick from. But I will add banking later:)

 

 

 

 

 

Source:

{www.2007Bot.weebly.com}
{$DEFINE RS07}
{$DEFINE OSI_RS07_Color_Anti_Randoms}
{$I OSI\OSI.scar}
{$I MSSL\MSSL.scar}

































var
 Top_Left_X, Top_Left_Y, Bottom_Right_X, Bottom_Right_Y: Integer; 
 delVar: Integer;
 oreType: String;
 xxColor: Integer;
 xxTol: Integer;
 xxHue: Extended;
 xxSat: Extended;
 Form1: TForm;
 CheckBox1: TCheckBox;
 Button1: TButton;
 ComboBox1: TComboBox;
 RadioButton1: TRadioButton;
 RadioButton2: TRadioButton;

procedure ScriptTerminate;
begin
 FreeOSI;
 MSSL_Unsetup;
end;

procedure StartButton(sender: TObject);
begin
 oreType := ComboBox1.Text;
 Form1.Modalresult := mrOK;
end;

function isAnimating(): Boolean;
begin
 Result := MSSL_AnimationPercentEx(239, 162, 254, 176, 250, 1000, 42.0);
end;

procedure ClosedForm;
begin
 ShowMessage('Dont close the GUI! Use the "Start" button to start the bot.');
 TerminateScript;
 ClearDebug;
end;

function ConfigureSettings(Brightness, Music, Sound, Surroundings: Integer): boolean;
begin
 MouseBox(663,471,687,497,ClickLeft);
 waitRR(500,600);
 case Brightness of
   1: Mouse(611,229,5,5,true);
   2: Mouse(642,229,5,5,true);
   3: Mouse(673,229,5,5,true);
   4: Mouse(707,229,5,5,true);
   else writeln('ERROR! Brightness can only be 1-4');
 end;
 waitRR(300,500);
 case Music of
   0: Mouse(608,266,5,5,true);
   1: Mouse(632,266,5,5,true);
   2: Mouse(659,266,5,5,true);
   3: Mouse(685,266,5,5,true);
   4: Mouse(711,266,5,5,true);
   else writeln('ERROR! Music can only be 0-4');
 end;
 waitRR(300,500);
 case Sound of
   0: Mouse(608,302,5,5,true);
   1: Mouse(632,302,5,5,true);
   2: Mouse(659,302,5,5,true);
   3: Mouse(685,302,5,5,true);
   4: Mouse(711,302,5,5,true);
   else writeln('ERROR! Sound can only be 0-4');
 end;
 waitRR(300,500);
 case Surroundings of
   0: Mouse(608,339,5,5,true);
   1: Mouse(632,339,5,5,true);
   2: Mouse(659,339,5,5,true);
   3: Mouse(685,339,5,5,true);
   4: Mouse(711,339,5,5,true);
   else writeln('ERROR! Surroundings can only be 0-4');
 end;
 Result := true;
end;

procedure Form1_Init;
begin
 Form1 := CreateForm;
 CheckBox1 := TCheckBox.Create(Form1);
 Button1 := TButton.Create(Form1);
 ComboBox1 := TComboBox.Create(Form1);
 RadioButton1 := TRadioButton.Create(Form1);
 RadioButton2 := TRadioButton.Create(Form1);
 with Form1 do
 begin
   Left := 339;
   Top := 129;
   BorderIcons := [biSystemMenu];
   BorderStyle := bsSingle;
   Caption := 'xMiner - www.2007Bot.weebly.com';
   ClientHeight := 92;
   ClientWidth := 322;
   Color := clMaroon;
   Font.Charset := DEFAULT_CHARSET;
   Font.Color := clBlack;
   Font.Height := -13;
   Font.Name := 'Tahoma';
   Font.Style := [];
   FormStyle := fsStayOnTop;
   OldCreateOrder := False;
   PixelsPerInch := 96;
 end;
 with CheckBox1 do
 begin
   Parent := Form1;
   Left := 213;
   Top := 27;
   Width := 97;
   Height := 17;
   Caption := 'Antibans';
   Checked := True;
   State := cbChecked;
   TabOrder := 0;
 end;
 with Button1 do
 begin
   Parent := Form1;
   Left := 210;
   Top := 46;
   Width := 103;
   Height := 41;
   Caption := 'Start';
   TabOrder := 1;
   OnClick := @StartButton;
 end;
 with ComboBox1 do
 begin
   Parent := Form1;
   Left := 8;
   Top := 8;
   Width := 141;
   Height := 24;
   Font.Charset := DEFAULT_CHARSET;
   Font.Color := clBlack;
   Font.Height := -13;
   Font.Name := 'Tahoma';
   Font.Style := [];
   ParentFont := False;
   TabOrder := 2;
   Text := 'Ore Type';
   Items.Add('TIN');
   Items.Add('COPPER');
   Items.Add('IRON');
 end;
 with RadioButton1 do
 begin
   Parent := Form1;
   Left := 160;
   Top := 46;
   Width := 49;
   Height := 17;
   Caption := 'Drop';
   Checked := True;
   TabOrder := 3;
   TabStop := True;
 end;
 with RadioButton2 do
 begin
   Parent := Form1;
   Left := 160;
   Top := 66;
   Width := 49;
   Height := 17;
   Caption := 'Bank';
   Enabled := False;
   TabOrder := 4;
 end;
end;

procedure Form1_SafeInit;
var
 v: TVariantArray;
begin
 SetLength(v, 0);
 ThreadSafeCall('Form1_Init', v);
end;

function Form1_ShowModal: Boolean;
begin
 Result := Form1.ShowModal = mrOk;
end;

function Form1_SafeShowModal: Boolean;
var
 v: TVariantArray;
begin
 SetLength(v, 0);
 Result := ThreadSafeCall('Form1_ShowModal', v);
end;

procedure StartForm;
begin
 Form1_SafeInit;
 if Form1_SafeShowModal then
 begin
   WriteLn('Form returned modalresult ok');
   FreeForm(Form1);
 end else
 begin
   ClosedForm;
   FreeForm(Form1);
 end;
end;

procedure AntiBan;
begin
 MouseSpeed := RR(11,17);
end;

procedure PickBox;
begin
 wait(500);
 ClearDebug;
 writeln('');
 writeln('================================================');
 writeln('     Please select the top-left search box.');
 writeln('================================================');
 writeln('');
 PickColor(delVar,Top_Left_X,Top_Left_Y);
 ClearDebug; 
 writeln('');
 writeln('================================================');
 writeln('                  Please wait...');
 writeln('================================================');
 writeln('');
 wait(1000);
 ClearDebug;
 writeln('');
 writeln('================================================');
 writeln('  Please select the bottom-right search box.');
 writeln('================================================');
 writeln('');
 PickColor(delVar,Bottom_Right_X,Bottom_Right_Y);
 ClearDebug; 
 writeln('');
 writeln('================================================');
 writeln('                  Please wait...');
 writeln('================================================');
 writeln('');
 wait(1000);
end;

procedure FixVar;
begin
 Top_Left_X := Top_Left_X;
 Top_Left_Y := Top_Left_Y;
 Bottom_Right_X := Bottom_Right_X;
 Bottom_Right_Y := Bottom_Right_Y;
 ClearDebug;
end;

procedure Startup;
begin
 ClearDebug;
 RS07_SetCompassDir('N');
 PickBox;
 FixVar;
 MouseSpeed := RR(11,17);
 MouseBox(567,174,586,196,ClickLeft);
 waitRR(900,1500);
 MouseBox(631,174,654,198,ClickLeft);
 waitRR(30,300);      
 waitRR(30,300);
 ConfigureSettings(4,3,3,3);
 MouseBox(630,173,655,200,ClickLeft);
end;

procedure goDown;
var
 x,y:Integer;
begin
 GetMousePos(x,y);
 MMouse(x-random(70),y+random(200),10,10);
end;

procedure AfterAffect;
var
 x,y: Integer;
begin
 if random(13) = 1 then
 begin
   GetMousePos(x,y);
   waitRR(1,100);
   Mouse(x,y,0,0,true);  
 end;
 case random(4) of
   0: MouseBox(35,35,506,332,MoveTo);
   1: MouseBox(35,35,506,332,MoveTo);
   2: MouseBox(552,170,743,486,MoveTo);
   3: goDown;
 end;
end;

procedure color_TIN;
begin
 xxColor := 7566205;
 xxTol := 11;
 xxHue := 0.19;
 xxSat := 0.14;  
end;

procedure color_COPPER;
begin
 xxColor := 4220299;
 xxTol := 10;
 xxHue := 0.04;
 xxSat := 0.09;
end;

procedure color_IRON;
begin
 xxColor := 2240076;
 xxTol := 8;
 xxHue := 0.05;
 xxSat := 0.29;
end;

procedure FindOre;
var
 x,y: Integer;
begin
 if not(isAnimating()) then
 begin
   Antiban;
   ColorToleranceSpeed(2);
   SetColorspeed2Modifiers(xxHue, xxSat);  
   if FindColorTol(x, y, xxColor, Top_Left_X, Top_Left_Y, Bottom_Right_X, Bottom_Right_Y, xxTol) then
   begin
     MMouse(x, y, 0, 0);
     waitRR(30,100);
     if RS07_IsUpText('Mine') then
     begin
       GetMousePos(x,y);
       Mouse(x,y,0,0,true);
       AfterAffect;
       waitRR(1200, 3200);  
     end else
     begin
       FindOre;
     end;

   end;

 end else
 begin
   if random(15) = 1 then
     AntiBan;
   if random(30) = 5 then
     begin
       GetMousePos(x,y);
       MMouse(x,y,150,150);
     end;
 end; 
 SetColorspeed2Modifiers(0.02, 0.02); 
 ColorToleranceSpeed(1);
 Antiban;
end;

procedure wrongOre;
begin
 TerminateScript;
 ClearDebug;
 writeln('');
 writeln('The OreType you have selected is invalid.');
end;

procedure GrabOreSelected;
begin
 case oreType of
   'TIN': color_TIN;
   'COPPER': color_COPPER;
   'IRON': color_IRON;
   else wrongOre;
 end;
end;

procedure Init;
begin
 RS07_DisableGetClientActiveFromSetup := True;
 SetupOSI;
 MSSL_Setup;
 StartForm;
 wait(1000);
 Startup;
 GrabOreSelected;
end;

procedure Process;
begin
 repeat
   FindOre;
 until (RS07_InventoryFull);
 GetDropPattern(random(6));
 DropAllExclude([0],true);
end;

begin
 Init;
 repeat
 Process;
 until false;
 ScriptTerminate;
end.

Link to comment
Share on other sites

Does this respond to random events? -thanks for scripts by the way :)

If by that, you mean solving randoms then:

Nope, I'm sorry mate. Random solving has yet to be programmed. It wont take to long (I guess), as it's _mostly_ porting from older versions (and then some).

 

Bryce, why do you always padd down the script like 30 lines? It's frustrating! :P

I've looked over parts of the code, and it seems to be nice :-)

Edited by slacky
Link to comment
Share on other sites

オンライン カジノは、プレイヤーが自宅にいながらにしてポーカー、ルーレット、ブラックジャック、スロットなどのギャンブル ゲームを楽しむ機会を提供する仮想プラットフォームです。 オンラインカジノは、アクセスのしやすさ、ゲームの種類の多さ、そして大金を獲得する機会があるため、年々人気が高まっています。

オンラインカジノの主な利点は、利便性とアクセスしやすさです。 プレイヤーは、通常のカジノの営業時間に制限されず、いつでもゲームを楽しむことができます。 必要なのは、インターネットにアクセスできるデバイスと、カジノのウェブサイトにアクセスできることだけです。 これにより、プレイヤーは従来のカジノによくありがちなストレスや緊張を感じることなく、快適な環境でプレイすることができます。

オンラインカジノのもう1つの利点は、ゲームの選択肢が豊富なことです。 ユーザーは、それぞれ独自のルールと勝利の機会を提供する何百もの異なるゲームから選択できます。 技術革新のおかげで、オンライン ゲームのグラフィックとサウンドは高品質になり、プレイヤーは興奮と情熱の雰囲気に浸ることができます。

さまざまなゲームに加えて、オンライン カジノはプレーヤーにさまざまなボーナスやプロモーションも提供します。 これらは、スロットのフリースピン、プレイのための追加のお金、または貴重な賞品が得られる特別なトーナメントなどです。 このようなボーナスにより、勝利の可能性が高まり、ゲームがさらに楽しくなります。

もちろん、オンラインカジノでのプレイにはリスクがあります。 ギャンブルには依存性がある可能性があるため、自分の感情を監視し、支出をコントロールすることが重要であることを覚えておくことが重要です。 カジノはまた、責任あるゲーミングをサポートし、自己排除や賭け金制限の機会を提供します ポルノハブ 消された動画

全体として、オンライン カジノはギャンブル愛好家にとって便利でエキサイティングなエンターテイメントを提供します。 幅広いゲーム、ボーナスの選択肢があり、いつでもプレイできるため、世界中のプレイヤーの間で人気が高まっています。 ただし、責任あるゲームと、ゲームが単なる楽しみと娯楽の源であるように自分の行動を制御する能力について覚えておくことが重要です。
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...