SRL Archive - OSR Script Requests

An interesting mining script idea


superfonz

2015-06-03 22:55:20

I've seen alot of requests for mining scipts in certains locations so I thought if there was a script that allowed people to make their own using a base script.
I think this would really help people learn how walking works and how to use the object id's instead of just downloading a script and running it. The script would prompt the user for the rocks they want and would register their locations and ids. Then would prompt for the path to the bank, which could be done in a similar way that the "Reflection Path Maker" by falorion or "Reflection Degguer" by ineedbots would. Once you reach the end you choose the bank booths you want or bankers and your good to run the script. Obviously this would be annoying having to do it every time so the TPAs and id's would need to be saved in a file so that you can load them up later. Also doing it this way would make loading up different locations and ids easier.

I know this would be abit challenging, but with the amount of scripting experience I have, I know that it's possible to make.

I look forward to people's responses to this.

ry0240

2015-06-03 23:09:51

Krazy_Meerkat's edgeville village miner was scripted in that way where you could easily just change the mining/ore points and walking paths but I think it may be outdated now, I turned that script into an Ardougne and mining guild script before and worked pretty well.

superfonz

2015-06-03 23:15:07

From: ry0240
Krazy_Meerkat's edgeville village miner was scripted in that way where you could easily just change the mining/ore points and walking paths but I think it may be outdated now, I turned that script into an Ardougne and mining guild script before and worked pretty well.

Really? I never saw that one, I was kind of hoping one could be scripted using Lape and the walker. I want to use that script to learn about those.

ry0240

2015-06-03 23:23:23

From: superfonz
Really? I never saw that one, I was kind of hoping one could be scripted using Lape and the walker. I want to use that script to learn about those.


It wasn't right there in the player setup but if you look through the script you'll see the mining tiles which you can change and the type of ore to mine, as well as the banking booth tile and walking paths which all could be changed for different locations/uses.

superfonz

2015-06-03 23:38:09

This uses pascal, and also I would be able to edit it but the whole point of it is so that I wouldnt have to, i just set it up and load it up using a file so that way i can do mutliple locations.

Gu3st...

2015-06-04 04:31:44

Wait… are there really no updated AIO mining scripts?

superfonz

2015-06-04 09:40:45

yeah, i think that my way would be an interesting way to do it

King

2015-06-10 10:46:32

Well I need a script to train mining up on the regular, my old one is now outdated and I would like to learn reflection and get some experience with lape.. Request accepted.

So we have:

Inputting user rock choice
Inputting user path to the bank
Support for teleports?

DeniedHacker

2015-06-10 16:08:26

Don't worry guy, Once I am done leveling Crafting/Mining and Smithing with my personnal script, I will share it.

Here some codes from my personnal scripts that could help people for mining


My loop for mining

//Mine Silver until inventory full
repeat
//Looking for Silver rock
repeat
GeneralAntiban(150);
Wait(Randomrange(200,400));
until(FindTPAsOnScreen(10592942,12,100,TopLeftScreen,BotRightScreen,
NormalSizeTPA,SilverUpText, False));

//Wait for player to stop walking
Wait(Randomrange(3000, 3500));
while (isPlayerWalking()) do
Wait(Randomrange(250, 300));

//Detecting if we are mining
repeat
GeneralAntiban(1500);
Wait(Randomrange(20,40));
//Trying to find Mining pick on screen
if (FindDtmOnScreen(MiningPickDTMs,TopLeftScreen,BotRightScreen)) then
begin
failsCounter := 0;
end else
failsCounter := failsCounter + 1
until (failsCounter > failsLimit);
Wait(Randomrange(250, 300));
until (isInvFull());

General fonction I made for Detecting and clicking TPA on the screen

{**********************************************************************
* - This function will try to find TPAs on specific location and click it
* - Col -> Color we are searching
* - Tol -> Tolerance
* - Filter -> Minimum length TPA (This will be used, so we can filter bad TPA)
* - LocTopLeft, LocBotRight -> Where we will search on the screen
* - SizeTPA -> Desired size for our TPAs(width,height)
* - textUpText -> UpText we are looking for
* - Furnace -> Determine if we need to move mouse further on the x axis(Special need for this script)
***********************************************************************}
Function FindTPAsOnScreen(Col, Tol, Filter : Integer; LocTopLeft, LocBotRight,
SizeTPA : TPoint; textUpText : TStringArray; Furnace : Boolean) : Boolean
var
tPointGang: TPointArray;
ATPA : T2DPointArray;
i : Integer;
begin
SetColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.12, 0.54);

//Try to find the color at the location
if FindColorsTolerance(tPointGang, Col, LocTopLeft.x, LocTopLeft.y,
LocBotRight.x, LocBotRight.y, Tol) then
begin
//Forming TPAs with the points we found
ATPA := TPAtoATPAEx(tPointGang, SizeTPA.x, SizeTPA.y);
for i:= 0 to high(ATPA) do
begin
//Filter bad TPAs
if (GetArrayLength(ATPA[i]) > Filter) then
begin
//Move our mouse on the TPA
if (Furnace) then
begin
customMouse(Point(MiddleTPA(ATPA[i]).x - 45 - random(10), MiddleTPA(ATPA[i]).y));
end else
customMouse(Point(MiddleTPA(ATPA[i]).x, MiddleTPA(ATPA[i]).y));
//Look if UpText match
if (waitUpTextMulti(textUpText, 150 + random(100))) then
begin
//Click
fastClick(MOUSE_LEFT);
Wait(Randomrange(30,120));

//Detect if we miss clicked
if (didYellowClick()) then
begin
while (isLoggedIn() and isPlayerWalking()) do
sleep(random(250, 300));
FindTPAsOnScreen(Col,Tol,Filter,LocTopLeft,LocBotRight,SizeTPA,
textUpText, Furnace);
end;

//Return true and quit if we didn't miss click
Result := True;
Exit;
end;
end;
end;
end;
end;


Function I use to detect if I am mining. You will need to look at my mining loop to understand what it does

{**********************************************************************
* Try to find DTMs at mentionned location.
* - YourDTMs -> Container containing all the DTM we want to search
* - LocTopLeft, LocBotRight -> Where we will search on the screen
* - Return true if DTM was found
* - Position of the DTM saved in variables -> mouseX,mouseY
******************************************************************}
Function FindDtmOnScreen(YourDTMs : TIntegerArray; LocTopLeft, LocBotRight :
TPoint) : Boolean;
var
I : Integer;
begin
for I := 0 to high(YourDTMs) do
if (FindDTM (YourDTMs[I], mouseX, mouseY, LocTopLeft.x, LocTopLeft.y,
LocBotRight.x, LocBotRight.y)) then
begin
Result := True;
Exit;
end;
end;

Some variables to help you

DTM_MiningPickHori, DTM_MiningPickVerti : Integer
MiningPickDTMs : TIntegerArray

DTM_MiningPickHori := DTMFromString('mWAAAAHicY2FgYLBnZGCwAmI3IPYGYl00LMqHwEYORgysQD3ImAkNgwAAr24C9A==');
DTM_MiningPickVerti := DTMFromString('mWAAAAHicY2FgYIhiRMV6QKwOxCZAbAHEIrwMDEpiEFrNWJ2BFagHGTOhYRAAAMzvA0w=');
MiningPickDTMs := [DTM_MiningPickHori, DTM_MiningPickVerti];


You are good to go with these 2 function and my Mining Loop.

ineedbot

2015-06-13 18:39:04

I've been working on a AIO Miner a bit… Just havent gotten around to completing it (its pretty complete however, just need to finish up some things)
http://pastebin.com/CLfaDEFG
http://stats.grats.pw/script.php?sid=20

Maligkno

2015-06-16 00:10:28

From: King
Well I need a script to train mining up on the regular, my old one is now outdated and I would like to learn reflection and get some experience with lape.. Request accepted.

So we have:

Inputting user rock choice
Inputting user path to the bank
Support for teleports?

Are you releasing it under the Mining Scripts section or will it only be available to SRL Members?