SRL Archive - SRL Archives

One Stupid Function :P


Home

2006-09-18 10:59:37

Once again.. I got idea to post my dumb ass functions :P

Updated : To Use MaxWait As Back Up :P

{*******************************************************************************
Function Mined(OreColor, Tol, MaxWait : Integer ): Boolean;
By: Home
Description: Checks If Ore Is Mined And Uses MaxWait(In Seconds) And Results True.
*******************************************************************************}

Function Mined(OreColor, Tol, MaxWait : Integer ): Boolean;
Var
PX, PY: Integer;
Begin
MarkTime(Mark);
Repeat
Wait(100+random(100))
Until(Not (FindColorSpiralTolerance(PX, PY, OreColor, 210, 130, 300, 220, Tol))Or(TimeFromMark(Mark)>MaxWait*1000))
Result := True;
End;

He, he

:)

~Home

Yakman

2006-09-18 11:55:13

its a good effort, but are you sure it works all the time, it might think the ore is still mines if there are other rocks around giving the same color, also the co-ordinates that are in the findcolor may not always work because the runescape main screen shifts a little bit to put off clicking on co-ordinates

thats just my first impression, maybe you know something about it i dont

Home

2006-09-18 12:03:37

Lol i think you keep me as starting noob :P

And yes this will work atleast 90 % of time even if there is other rocks :)

Yakman

2006-09-18 12:16:54

well im sorry if i came out like that, i didnt mean to be

i just checked the co-ordinates and they seem fine, but i still think that the screen shifting is a big issue, once i had a cord seem to move about 50 pixels up

i know your not a "starting noob" i can see your tutorail writers award

Home

2006-09-18 12:20:07

Updated to use MaxWait as back up.. ( Just For sure :P )

Cheesehunk

2006-09-18 14:41:29

From: Home
Updated to use MaxWait as back up.. ( Just For sure :P )

Shove a FindNormalRandoms or something in there.. It might miss a random.

Daniel.Blaze

2006-09-19 09:15:15

Surely when you click the rock and then use this procedure, there is going to be a part of the screen where the ore color is NOT found, so it will result true constantly, no?

Home

2006-09-19 16:15:47

Like..

Repeat
Mine;
Until(Mined………)

Daniel.Blaze

2006-09-19 16:29:48

but isn't the point of the mined procedure to wait until you have actually mined a rock, not keep repeating the mining procedure until you have mined successfully?

And you say

repeat
mine
until(mined)

Its gonna do the procedure 'mine', then straight away think it has mined the rock because of the procedure 'mined' and so there wont be any point of the repeat. It will leave the loop staright away. so this procedure doesn't actually work.

Home

2006-09-19 18:06:41

Yeah sorry :P your must put that Mined…… function inside of your mining procedure :)