- program SteveAutoAlcher;
- {.include srl/srl.scar}
- {
- -Consts
- -*Player username
- -*Player password
- -*Breaks
- -*Do you want the script to auto-bank when done?
- -**Bank pin
- -*Make DTM (DONE)
- -
- }
- var
- x, y, NumberOfAlchs, SinceBreak: Integer;
- const
- /////////////////////////////Setup Starts Here\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //Alchemizing? xD
- HowManyAlchs = 500; //How much are we alchemizing?
- TakeBreaks = True; //Do You Want to take breaks
- BreakAfter = 60; //How Long you want to work for before you take a 15 min break (In Minutes (0 = Do not break))
- BreakFor = 10; //How long would you like to break for? (0 = Do not break)
- BreakForRandom = 5; //Add this many random minutes into BreakFor
- ChanceOfNotBreaking = 60; //Out of 100, chance of not breaking at all
- { I'm confused with the chance of not breaking part.. I don't see the point. :p
- I really like the readability of a line of constants. To me it just more
- organized, especially with the spacing. Yes, it's also simpler (for me).}
- Procedure DeclarePlayers;
- begin
- HowManyPlayers := 1 ;
- NumberOfPlayers(HowManyPlayers);
- CurrentPlayer := 0;
- with players[0] do
- begin
- Name := 'iaannnn';
- Pass := 'lolipop90';
- Nick := '';
- Active := True;
- Pin := '';
- end;
- end;
- {I don't know of many alchers (none, in fact) that need multipayer support.}
- //////////////////////////////Setup Ends Here\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- Procedure DragItems;
- var
- BankNote :Integer;
- begin
- BankNote := DTMFromString('78DA637CC0C2C0D0C9C8800CB62FAB02D3305' +
- '1C6874035ADA86A18189850D53C06AAE921A0E60450CD3CFC6A00' +
- 'DAB8079E');
- if (GameTab(tab_Inv)) then
- begin
- if FindDTM(BankNote, x, y, MIX1, MIY1, MIX2, MIY2) then
- begin
- WriteLn('Dragging Item');
- DragMouse(x, y, 3, 3, 704, 339, 3, 0);
- end;
- WriteLn('Item Dragged')
- end;
- end;
- Procedure ClickNote;
- var
- BankNote :Integer;
- begin
- BankNote := DTMFromString('78DA637CC0C2C0D0C9C8800CB62FAB02D3305' +
- '1C6874035ADA86A18189850D53C06AAE921A0E60450CD3CFC6A00' +
- 'DAB8079E');
- if (GameTab(tab_inv)) then
- begin
- WriteLn('Finding DTM BankNote');
- if FindDTM(BankNote, x, y, MIX1, MIY1, MIX2, MIY2) then
- begin
- WriteLn('Clicking DTM, BankNote');
- Mouse(x, y, 10, 10, true); {I'm not acquainted with offset; this good enough?}
- end else //I'd do smaller randoms. Maybe 5, 5.
- begin
- Logout;
- FreeDTM(BankNote);
- TerminateScript;
- end;
- end;
- // FreeDTM(BankNote); {Any better way to free this?} You don't want to free it every time.
- end;
- Procedure ClickAlch;
- var
- HighAlch :Integer;
- begin
- HighAlch := DTMFromString('78DA639464606010614001871608806946289' +
- 'F51064870A2AA6144A741F2A2A86AA4189950D50801094902E680' +
- 'DC2288AA469319CD1C79202186DF1C00AB2E02C2');
- WriteLn('Switching to magic gametab');
- GameTab(tab_Magic);
- if FindDTM(HighAlch, x, y, MIX1, MIY1, MIX2, MIY2) then
- begin
- WriteLn('Found High Alch, clicking');
- Mouse(x, y, 7, 3, true); {One again, with offsets} //I might even move items during runtime to make it so that no movement is necessary. :)
- WriteLn('Clicked on HighAlch'); //I can show you how to do that if you want. x] It'd be suhweet.
- FreeDTM(HighAlch);
- WriteLn('HighAlch DTM freed');
- end else //I might have more failsafes to make sure there's not just lag or something..
- begin
- LogOut;
- WriteLn('Could not find highalch, logging out');
- FreeDTM(HighAlch);
- TerminateScript;
- end;
- end;
- Procedure DoBreak; {Thanks. I had to look over like, 10 scripts that had break to get it all down though.}
- var
- Breaktime, LastBreak, BreakForRandom2, BreakFor2:Integer;
- Begin
- BreakTime := BreakAfter * 60 * 1000;
- LastBreak := TimeFromMark(SinceBreak);
- If(BreakTime <= LastBreak) then
- begin
- Logout;
- if(BreakForRandom = 0) then
- begin
- Wait(BreakFor * (1000 * 60));
- LoginPlayer;
- SetAngle(True);
- MarkTime(SinceBreak);
- end else
- begin
- BreakForRandom2 := BreakForRandom * 1000 * 60 ;
- BreakFor2 := BreakFor * (1000 * 60)+(RandomRange(0, BreakForRandom2));
- Wait(BreakFor2);
- LoginPlayer;
- SetAngle(True);
- MarkTime(SinceBreak);
- end;
- end;
- end;
- begin
- //NumberOfAlchs := HowManyAlchs; You'll see below. :)
- ClearDebug;
- SetUpSRL;
- MarkTime(SinceBreak);
- DragItems;
- repeat
- MouseSpeed := 12 + Random(5);
- ClickAlch;
- ClickNote;
- Inc(NumberOfAlchs); //Dec(NumberOfAlchs); Look below.
- wait(3000);
- if TakeBreaks then
- DoBreak;
- until(NumberOfAlchs >= HowManyAlchs);//until(HowManyAlchs = 0);Because I said so.
- end.
