SRL Archive - Test corner

my new mining procedure: perfect ore boolean


elementalelf

2007-09-20 02:17:25

copied and pasted directly from my guildminer
no standards in this, so dont complain about it, i only standardize finished scripts… this is just a snippet of a half complete script, but it worked so well that i had to show you guys.
this is still a work in progress, but i will give you the basic rundown of what happens
first: it finds the coal colour, everyone knows how to make something like that in 2 lines or less… im sure there are prebuilt functions for colourfinding, but this one works fine for its purpose.
then the repeat, signifying the begin of the main loop of the function, that is, it will keep doing everything else until invent is full.
gets system time, this is like my own version of "timefrommark"
next bit is like findobj, except it actually works.
that repeats until it finds a coal rock.
then(and this is the bit where it gets really good)
it clicks the rock.
and it loops finding the colour of the rock within a box (x-10,y-10,x+10,y+10) and when it does, saving that color to var x,y(in this case hax and hay)

untill it doesnt find the colour anymore.

to see it working, delete the // from the line near the bottom
procedure minecl;
var box1,boy1,box2,tim,timm,boy2,coalcolour:integer;
begin
repeat
findcolortolerance(hax,hay,2570810,MSX1,MSY1,MSX2,MSY2,5);
coalcolour:=getcolor(hax,hay);
tim:=getsystemtime;
repeat
findcolorspiral(hax,hay,coalcolour,MSX1,MSX2,MSY1,MSY2);
mmouse(hax,hay,0,0);
timm:=getsystemtime;
until(isuptextmulti('Mine', 'ine', 'Coal')) or (timm-tim=10000);
if(getcolor(hax,hay)=coalcolour)then
mouse(hax,hay,0,0,true);
repeat
wait(50);
box1:=hax-10;
box2:=hax+10;
boy1:=hay-10;
boy2:=hay+10;
findcolor(hax,hay,coalcolour,box1,boy1,box2,boy2);
// mmouse(hax,hay,0,0);
timm:=getsystemtime;
until(not(findcolor(hax,hay,coalcolour,box1,boy1,box2,boy2))) or (timm-tim>20000);
until(invfull);
end;

edit: forgot to say, hax and hay are globals.
2nd edit: hmm, i screwed it up, so i copy/pasted this one into scar, and it turns out this one on the forums doesnt work for some reason, ill work on it and post a working one in a second.
3rd edit: got it working again!

ive tried several times, and it seems to be beyond me, although i have no idea why…
however if someone could help me so that it finds the closest coal rock to the player instead of the one closest to the top of the screen, that would be much appreciated.

nielsie95

2007-09-20 02:40:50

hax := MSCX;
hay := MSCY;
FindColorSpiralTolerance(hax, hay, COLOR, x1, y1, x2, y2, tol)

Should search center-out.

elementalelf

2007-09-20 03:11:54

may i ask why the tolerance? this automatically finds coal colour

nielsie95

2007-09-20 03:29:51

I'm sorry, that was to find the closest to the player..

findcolortolerance(hax,hay,2570810,MSX1,MSY1,MSX2,MSY2,5);
>>
hax := MSCX;
hay := MSCY;
FindColorSpiralTolerance(hax, hay, 2570810, MSX1, MSY1, MSX2, MSY2, 5);

Wizzup?

2007-09-20 03:30:25

From: elementalelf
may i ask why the tolerance? this automatically finds coal colour


Because the entire coal isn't just one color. :)

This is my FindRock, for old rocks only:

Function FindRock(Var x, y: Integer): Boolean;

Var
TP: TPoint;
TPA: TPointArray;
aTPA: Array Of TPointArray;
I, z: Integer;
Begin
FindTalk;
z := GetColorToleranceSpeed;
ColorToleranceSpeed(PlayerOres[CurrentOre].CTS);
FindColorsTolerance(TPA, PlayerOres[CurrentOre].Colors[CurrentColor], MSX1, MSY1, MSX2, MSY2, PlayerOres[CurrentOre].Tolerance);
aTPA := TPAtoATPA(TPA, 30);
SortATPAFrom(aTPA, Point(MSCX, MSCY));
For I := 0 To Length(aTPA) - 1 Do
Begin
If Length(aTPA[I]) < 80 Then
Continue;

TP := MiddleTPA(aTPA[I]);
If GasCheck(TP.X, TP.Y - 20) Then
Continue;
MMouse(TP.X, TP.Y, 10, 10);
Wait(150);
If IsUpText('ine') Then
Begin
Result := True;
GetMousePos(x, y);
Exit;
End;
End;
ColorToleranceSpeed(z);
Result := False;
End;

You might not know some functions, but they will be in WizzyPlugin in SRL 4.

n3ss3s

2007-09-20 07:35:40

show off much? xD Jk/Jk

Elemental, it needs some improvement.

a) I suggest using if()then with finding the colors, other wise it will pick your coal color as the one in 0,0 which I think is black (0 or 65336 or wateva).

b) Use SRL's TimeFromMark / MarkTime

c) Coal does not appear in the uptext

d) The animation of mining is nowadays so huge that it might be risky to use that.

Anyways, good job.

Oopsie:

e) 5 Tolerance is a bit too low, the colors change a lot more than that.
f) DDTM for autocoloring maybe? :)

kthxbaii

elementalelf

2007-09-20 09:01:31

From: n3ss3s
show off much? xD Jk/Jk

Elemental, it needs some improvement.

a) I suggest using if()then with finding the colors, other wise it will pick your coal color as the one in 0,0 which I think is black (0 or 65336 or wateva).

b) Use SRL's TimeFromMark / MarkTime

c) Coal does not appear in the uptext

d) The animation of mining is nowadays so huge that it might be risky to use that.

Anyways, good job.

Oopsie:

e) 5 Tolerance is a bit too low, the colors change a lot more than that.
f) DDTM for autocoloring maybe? :)

kthxbaii

a. if()then else seems really wierd in scar3.11, i can use it in 2.01 and 1.12(old vers i have on my other computer) but whenever i try the same lines in 3.11 it screws up.

b. i dislike using timefrommark and mark, i try not to rely on includes too much, too much can go wrong when they get updated.

c. thanks, ill change that :)

d. ive tried it with every type of pick and it loads a full invent every time.
done about 12 runs now without a hitch(cept antirandoms, i have to add them in soon)

e.tolerance of 5 is fine, i want it to pick the lightest color of addy that it can, the darker shades are too close to the grey dark shades of a mined rock.

f. i am yet to learn DTM's, let alone DDTM's, thats my next project.

The Claw

2007-09-20 09:27:47

Looks alright, the following is kind of the way I do it :)

Instead of making the box1, box2 etc every time it repeats in the loop, you could use
 FindColorSpiralTolerance(x, y, OreColour, x - 20, y - 20, x + 20, y + 20, OreTol)

if it finds the colour it automatically stores it in x, y and then the next time it searces around a 20x20 box of the last place it found it, spiralling out from the exact co-ords that it was found at. make sure you have this before that in the repeat though:

if (x - 20) < 0 then x := MSCX + 20;
if (y - 20) < 0 then y := MSCY + 20;

that just ensures that if it doesnt find the colour, the co-ords dont get set to something that would be less than 0 when 20 is subtracted from it, which would give you an exception error the next time you try to search for the colour.

Also, for finding the rocks you could use FindColorsSpiralTolerance, which stores all of the rock points into a tpointarray, so that you can do
if Length(Array) > any number, say 10 then its a rock

that way, it will hopefully ignore things that have similar colours to the rock, but arent the rock (boots, pickaxes, etc). you dont want it to search the whole screen though, so do

if find color (x, y, rock color) then FindColorsSpiralTolerance(all that stuff that comes here, then co ords of a 20 x 20 box around the x, y that you found the rock color in).

hope i helped, feel free to check out some of my mining functions

JuKKa

2007-09-20 10:03:54

This is from my guild miner:

Function FindCoalMiddle: Boolean;
Var
Points: TPointArray;
Begin
If(Not Loggedin)Then Exit;
If(InvFull)Then Exit;

If(FindColorDistance(X, Y, CoalRock, MSX1, MSY1, MSX2, MSY2, CoalTolerance, MSCX, MSCY, Points, True))Then
Begin
If(FindColorDistance(X, Y, CoalRock, X-20, Y-20, X+20, Y+20, CoalTolerance, Points[GetArrayLength(Points)-1].X, Points[GetArrayLength(Points)-1].Y, Points, False))Then
Begin
MMouse(X, Y, 0, 0);
Wait(10);
If(IsUpText('Mine'))Then
Begin
Case Random(3) Of
0, 1:
Begin
Mouse(X, Y, 0, 0, True);
GetMousePos(Dx, Dy);
If(FollowColor(Dx, Dy, CoalRock, CoalTolerance))Then
Begin
Result:= True;
Wait(500+Random(500));
End;
End;
2: Begin
Mouse(X, Y, 0, 0, False);
GetMousePos(Dx, Dy);
Wait(10);
ChooseOption('Mine')
If(FollowColor(Dx, Dy, CoalRock, CoalTolerance))Then
Begin
Result:= True;
Wait(500+Random(500));
End;
End;
End;
End Else
If(IsUpText('Take'))Then
Begin
Mouse(X, Y, 0, 0, True);
Flag;
End;
End;
End;
End;

Pretty advanced!

n3ss3s

2007-09-20 11:22:01

This was not post your miners FindRock thread people -.-

And I dont even have one to post >:( Then I post my find fishing spot! Buahahahaa!

//--------- Finds the Luring/Baiting slot ----------\\
function FindLBingSpot(var Sx, Sy: Integer; xx1, yy1, xx2, yy2: Integer): Boolean;
var
I, Z, O, x1, y1, x2, y2, FO, Tot, Counter: Integer;
var
H, S: Extended;
var
SpotColorsP: TPointArray;
var
BrokeOutOfLoop: Boolean;
begin
ColorToleranceSpeed(2);
H := 0.15;
S := 0.15;
SetArrayLength(SpotColorsP, 8);
repeat
Wait(25);
H := H + 0.05;
S := S + 0.05;
SetColorSpeed2Modifiers(H, S);
repeat
Wait(20);
for I := 0 to GetArrayLength(SpotColors) - 1 do
begin
Wait(5);
FindColorsSpiralTolerance(MSCX, MSCY, SpotColorsP, SpotColors[i], xx1, yy1, xx2, yy2, 10);
if (not (Length(SpotColorsP) = 0)) and (not (Length(SpotColorsP) = -1)) then
begin
FO := I;
BrokeOutOfLoop := True;
Break;
end;
Z := Z + 1;
if (Z >= 25) then
begin
Exit;
end;
end;
if (BrokeOutOfLoop) then
begin
Break;
end;
until (False); // Dont worry, I've got it covered! There is 2 failsafes for it.
if (GetArrayLength(SpotColorsP) <= 0) then
begin
Exit;
end;
x1 := SpotColorsP[0].x - 20;
y1 := SpotColorsP[0].y - 20;
x2 := SpotColorsP[0].x + 20;
y2 := SpotColorsP[0].y + 20;
Writeln('Okay, possible spot box coming!');
Writeln('/ x1 '+IntToStr(x1)+'\');
Writeln('| y1 '+IntToStr(y1)+'|');
Writeln('| x2 '+IntToStr(x2)+'|');
Writeln('\ y2 '+IntToStr(y2)+'/');
repeat
Wait(20);
for I := 0 to GetArrayLength(SpotColors) - 1 do
begin
Wait(20);
repeat
FindColorsTolerance(SpotColorsP, SpotColors[i], x1, y1, x2, y2, 15);
if (Length(SpotColorsP) = 0) or (Length(SpotColorsP) = -1) then
begin
Counter := Counter + 1;
end else
Tot := Tot + GetArrayLength(SpotColorsP);
Counter := Counter + 1;
Wait(100 + Random(25)); // Colors
until(Counter >= 10) or (Tot >= 4);
if (Tot >= 4) then
begin
if(GetArrayLength(SpotColorsP) <= 0)then
begin
Writeln('Wtf this is not possible');
Exit;
end;
MMouse(SpotColorsP[0].x, SpotColorsP[0].y, 3, 3);
if (IsUpText('ure')) then
begin
GetMousePos(Sx, Sy);
if(FindEdgeWhirlPool(Sx - 15, Sy - 10, Sx + 15, Sy + 10))then
begin
Writeln('*** WHIRLPOOL DETECTED ***');
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2); // Default
Exit;
end;
Writeln('Found fishing spot!');
Result := True;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
end;
end;
O := O + 1;
Wait(20);
until (Result) or (O >= 10);
Wait(25);
until (Result) or (not (LoggedIn));
end;

t3h s3x.

EDIT: o, from my edgefisher.

I dont mind if this is turning to post your mining proc, but we need to get it moved into bbq I think.

EDIT EDIT: A side note for Drunkenoldma or whoever does teh php magic, the letter O shows as zero in the scar tags.

Tim0suprem0

2007-09-20 12:20:47

Lol, n3ss3s, you say this is not a place to post your own procs! And then post your own proc, which isn't even remotely related.

n3ss3s

2007-09-20 13:17:31

Its kinda hard to explain, the "And I dont even…" was ment to "link" to the above, so that it would be because I dont have own to post, and to make my post 0.00000001% more interesting I put my own ther.

EDIT: Yes, it is not remotely related, its CLOSELY related.

In "theory" or whatever is the word, the only thing between Fish finder and Rock finder, is the uptext, and content of the variables etc wether they are fish spot colors or coal.

R0b0t1

2007-09-20 22:01:08


program New;
{.Include SRL/SRL.scar}

Type TRock = record
Name: String;
Color: Integer;
end;

Var
Rock: Array [0..8] of TRock;
TinCol, CopperCol, IronCol, SilverCol, CoalCol: Array [0..5] of Integer;
MithrilCol, AdamantCol, RuniteCol: Array [0..5] of Integer;
TheBox: TBox;

Function BetterColor(Colors: TIntegerArray): Integer; //Wizzup?
Var
I: Integer;
H, S, L: Array Of Extended;
bH, bS, bL: Extended;
begin;
SetLength(H, Length(Colors);
SetLength(S, Length(Colors);
SetLength(L, Length(Colors);
For I := 0 To Length(Colors) - 1 Do
begin;
ColorToHSL(Colors[i], H[i], S[i], L[i]);
bH := bH + H[i];
bS := bS + S[i];
bL := bL + L[i];
End;
If Length(Colors) < 0 Then
Begin
bH := bH Div Length(Colors);
bS := bS Div Length(Colors);
bL := bL Div Length(Colors);
End;
Result := HSLToColor(bH, bS, bL);
End;

Procedure SetRockArrayColors;
begin
TinCol[0]:= 5855584;
TinCol[1]:= 6842479;
TinCol[2]:= 5921634;
TinCol[3]:= 7960963;
TinCol[4]:= 3890794;
TinCol[5]:= 4671566;
CopperCol[0]:= 4945799;
CopperCol[1]:= 5143210;
CopperCol[2]:= 4945314;
CopperCol[3]:= 5011624;
CopperCol[4]:= 3890818;
CopperCol[5]:= 4879492;
IronCol[0]:= 10042;
IronCol[1]:= 1977158;
IronCol[2]:= 2569302;
IronCol[3]:= 1844541;
IronCol[4]:= 537162;
IronCol[5]:= 1646903;
SilverCol[0]:= 11316664;
SilverCol[1]:= 11908799;
SilverCol[2]:= 12632264;
SilverCol[3]:= 12632264;
SilverCol[4]:= 11513785;
SilverCol[5]:= 11316664;
CoalCol[0]:= 1714730;
CoalCol[1]:= 1715249;
CoalCol[2]:= 2768960;
CoalCol[3]:= 2636603;
CoalCol[4]:= 1516323;
CoalCol[5]:= 2043181;
GoldCol[0]:= 1883881;
GoldCol[1]:= 1345703;
GoldCol[2]:= 1547455;
GoldCol[3]:= 1884396;
GoldCol[4]:= 1147809;
GoldCol[5]:= 1750751;
MithrilCol[0]:= 8016721;
MithrilCol[1]:= 5585209;
MithrilCol[2]:= 5782331;
MithrilCol[3]:= 5979709;
MithrilCol[4]:= 7491148;
MithrilCol[5]:= 4402477;
AdamantCol[0]:= 5861465;
AdamantCol[1]:= 6190428;
AdamantCol[2]:= 5202767;
AdamantCol[3]:= 6388321;
AdamantCol[4]:= 4017213;
AdamantCol[5]:= 6519906;
RuniteCol[0]:= 11643512;
RuniteCol[1]:= 8485975;
RuniteCol[2]:= 12103804;
RuniteCol[3]:= 12235388;
RuniteCol[4]:= 11577462;
RuniteCol[5]:= 11182706;
end;

Procedure SetRockColors;
begin;
Rock[0].Name:= 'tin';
Rock[0].Color:= BetterColor(TinCol);
Rock[1].Name:= 'copper';
Rock[1].Color:= BetterColor(CopperCol);
Rock[2].Name:= 'iron';
Rock[2].Color:= BetterColor(IronCol);
Rock[3].Name:= 'silver';
Rock[3].Color:= BetterColor(SilverCol);
Rock[4].Name:= 'coal';
Rock[4].Color:= BetterColor(CoalCol);
Rock[5].Name:= 'gold';
Rock[5].Color:= BetterColor(GoldCol);
Rock[6].Name:= 'mithril';
Rock[6].Color:= BetterColor(MithrilCol);
Rock[7].Name:= 'adamant';
Rock[7].Color:= BetterColor(AdamantCol);
Rock[8].Name:= 'runite';
Rock[8].Color:= BetterColor(RuniteCol);
end;

Procedure SetPlayerRockColor; //Call after switching players.
Var I:Integer;
begin;
RockColor:= 0;
For I:=0 to GetArrayLength(Rock) - 1 do
begin;
If (Players[CurrentPlayer].Strings[0] = Rock[i].Name) Then
RockColor:= Rock[i].Color;
end;
If (RockColor = 0) Then
RaiseException(erCustomError, 'Value stored in ''cmbRock.Text'' is in valid.');
end;

{_____________________________________________________________________________}
{---------------------------MINING PROCEDURES---------------------------------}
Function MineDropRock: Boolean;
Var I, B, C, D, x1, x2, y1, y2, OX, OY, r0bOre, OreCount, InvCount: Integer;
Var OX2, OY2, SlotX1, SlotX2, SlotY1, SlotY2: Integer;
Var BreakLoop, RockFound: Boolean;
begin;
If (InvCount < 1) Then
InvCount:= 1;
r0bOre := DTMFromString('78DA6314666460886340012D95D50CFF81345' +
'086E13F1030F20359010C188019AA0604183980AC704C35ACC86A' +
'9881AC34026A0481AC6C026A6481AC14026A1481AC48026A2481A' +
'C204C359C486A00B8F10A2B');
For B:=0 to 6 do
begin;
Case B of //Case by WT-Fakawi. I changed the letter :p
1: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSCx; y2:= MSCy; end;
2: begin x1:= MSCx; y1 := MSy1 + 20; x2 := MSx2; y2:= MSCy; end;
3: begin x1:= MSx1; y1 := MSCy; x2 := MSCx; y2:= MSy2; end;
4: begin x1:= MSCx; y1 := MSCy; x2 := MSx2; y2:= MSy2; end;
5: begin x1:= MSCx - 50; y1 := MSCy - 50; x2 := MSCx + 50; y2:= MSCy + 50; end;
6: begin x1:= MSx1; y1 := MSy1 + 20; x2 := MSx2; y2:= MSy2; end;
end;
For C:=0 to 15 do
begin;
BreakLoop:=FindColorSpiralTolerance(OX, OY, RockColor, x1, y1, x2, y2, C);
If (BreakLoop) Then
Break;
end;
If not (BreakLoop) Then
Continue;
If (BreakLoop) Then
begin;
Mouse(OX, OY, 2, 2, False);
If (ChooseOption(x, y, 'ine')) Then
begin;
RockFound:= True;
end else
begin;
WriteLn('Trouble finding rock')
RockFound:= False;
end;
end;
If not (RockFound) Then
begin;
For D:=0 to 5 do
begin;
Case lowercase(Players[CurrentPlayer].Strings[0]) of
'tin': RockColor:= TinCol[D];
'copper': RockColor:= CopperCol[D];
'iron': RockColor:= IronCol[D];
'silver': RockColor:= SilverCol[D];
'coal': RockColor:= CoalCol[D];
'gold': RockColor:= GoldCol[D];
'mithril': RockColor:= MithrilCol[D];
'adamant': RockColor:= AdamantCol[D];
'runite': RockColor:= RuniteCol[D];
end;
For C:= 0 to 15 do
begin;
BreakLoop:=FindColorSpiralTolerance(OX, OY, RockColor, x1, y1, x2, y2, E)
If (BreakLoop) Then
Break;
end;
If (BreakLoop) Then
begin;
Mouse(OX, OY, 2, 2, False);
If (ChooseOption(x, y, 'ine')) Then
begin;
RockFound:= True;
end else
begin;
WriteLn('Trouble finding rock')
RockFound:= False;
end;
end;
If not (RockFound) Then
begin;
WriteLn('Could not find rock')
Result:= False;
Exit;
end;
If (RockFound) Then
Break;
end;
If (RockFound) Then
Break;
end;
If (RockFound) Then
Break;
end;
If (Players[CurrentPlayer].Booleans[0]) And (InvCount < 1) Then //first slot
inc(InvCount);
TheBox:= InvBox(InvCount);
If (FindDTM(r0bOre, OX2, OY2, TheBox.x1, TheBox.y1, TheBox.x2, TheBox.y2)) Then
inc(InvCount);
If (InvCount = 28) Then
begin;
If not (Players[CurrentPlayer].Booleans[0]) Then //Banking, if false
begin;
If (Players[CurrentPlayer].Booleans[1]) Then //Wielded pick?
DropTo(2, 28);
else
DropTo(1, 28);
end;
end;
end;

begin;
end.

elementalelf

2007-09-21 01:36:38

after seeing robots, i think im gunna hang my head in shame…

The Claw

2007-09-21 01:55:01

His isnt that great to tell the truth :p lol

but yer, why is everyone all of a sudden posting their own functions? everything posted before was jeedback/advice, all of a sudden theres heaps of functions

Santa_Clause

2007-09-21 05:30:50

All showoffs.

n3ss3s

2007-09-21 07:21:41

Oke, all blame wizzy! He started and everybody folloed xD jk jk (he did :p)

Btw, should I make a "post your findX function" thread in bbq?

R0b0t1

2007-09-21 19:39:12

From: The Claw
His isnt that great to tell the truth :p lol


Want me to prove that wrong :p?


Elf, your's is still good. Its just that I use a different technique :).

Town

2007-09-21 21:16:18

If (Players[CurrentPlayer].Booleans[0]) And (InvCount < 1) Then                                  //first slot
inc(InvCount);
Case InvCount of
1: TheBox:= InvBox(InvCount);
2: TheBox:= InvBox(InvCount);
3: TheBox:= InvBox(InvCount);
4: TheBox:= InvBox(InvCount);
5: TheBox:= InvBox(InvCount);
6: TheBox:= InvBox(InvCount);
7: TheBox:= InvBox(InvCount);
8: TheBox:= InvBox(InvCount);
9: TheBox:= InvBox(InvCount);
10: TheBox:= InvBox(InvCount);
11: TheBox:= InvBox(InvCount);
12: TheBox:= InvBox(InvCount);
13: TheBox:= InvBox(InvCount);
14: TheBox:= InvBox(InvCount);
15: TheBox:= InvBox(InvCount);
16: TheBox:= InvBox(InvCount);
17: TheBox:= InvBox(InvCount);
18: TheBox:= InvBox(InvCount);
19: TheBox:= InvBox(InvCount);
20: TheBox:= InvBox(InvCount);
21: TheBox:= InvBox(InvCount);
22: TheBox:= InvBox(InvCount);
23: TheBox:= InvBox(InvCount);
24: TheBox:= InvBox(InvCount);
25: TheBox:= InvBox(InvCount);
26: TheBox:= InvBox(InvCount);
27: TheBox:= InvBox(InvCount);
28: TheBox:= InvBox(InvCount);
end;

—>

TheBox := InvBox(InvCount);

Shorter much? I may be wrong, I didn't read the rest of the procedure.

Actually, that's pretty much all of this thread that I read but that caught my eye. Oh well ;)

R0b0t1

2007-09-21 23:03:48

GOD! BrainFuck.


I hate it when I'm stupid.

pwnaz0r

2007-09-23 20:43:53

From: The Claw
His isnt that great to tell the truth :p lol


Agreed. anyways back on topic, needs some work but its alright. also needs standardizing.

The Claw

2007-09-24 01:42:02

From: r0b0t1
Want me to prove that wrong :p?


Elf, your's is still good. Its just that I use a different technique :).


yes, please do. to me yours just looks like 98% just setting the rock colour and place to search, and then just a simple FindColorSpiralTolerance and mouse move.

n3ss3s

2007-09-24 10:31:41

Lol claw, you dont know how professional posts look when it comes to

" OpinionThatFucksUpSomeonesFuntionAndGoodReason + Einstein shaking head like 'no skill m8' = friken pr0 "

But robot, sorry but it is quite true what claw said xD

Most of it is loading/setting rock color, one cool function by wizzup and then FindRockDrop is just a FindColorSpiralTolerance with an UpText check =0

Umm a little improvement robot maybe would be to make it look a lil better for the eye, instead of that evil case in there (please dont make me tell you how to use begin and end :D na its personal but still..) maybe make a loop with

X := X + 5;

and so you would make the box around MSCX, and then in the begin of loop right after X := X + 5, "if(MSCX - X < 0)then FailSafe;"

pl0xD t3h m4st4?

R0b0t1

2007-09-24 22:42:50

Meh, uptext + color finding is what all of them are. Can you just *poof* and click it :p?

elementalelf

2007-09-25 01:08:23

sooo…. ermm… does anyone like my one??

n3ss3s

2007-09-25 10:19:27

But r0b0t, you just check for one single color, no HSL, no checking other colors around or any other extra shit..

But I have nothing to complain if it works..

And sorry for us hijacking your thread elemental =/

EDIT: and anyways color master, you still made 3 good tuts :p

R0b0t1

2007-09-25 16:48:25

God damnit N3ss3s, STOP FUCKING OWNING ME! :rolleyes:


I never said it was bad elementalelf, but it just uses different techniques. (Yes! spelt it right.)



I'll make you eat you're words…. Mark my soul…. (I'm out to get you N3ss3s :p)



EDIT: FUCKING HOLY SHIT! 3.12 PROBLEMS! I LOST ALL MY SCRIPTS!

n3ss3s

2007-09-26 08:00:51

Haha, owning is just plain fun :D

Especially ppl who get owned xD (owned! :p)

I LOST ALL MY SCRIPTS!
Meh backup to teh 3.11 scripts folder? pwnt ++ naa its not nice when you lose code…

(I'm out to get you N3ss3s


Seek for the land of


repeat
Wait(25);
H := H + 0.05;
S := S + 0.05;
SetColorSpeed2Modifiers(H, S);
repeat
Wait(20);
for I := 0 to GetArrayLength(SpotColors) - 1 do

( yes its my own country :p )

you're just gettin hurt - kiddo'

Uhm, so let me see -

First of all, you should make the dropping procedure separate, so you dont have to break out of tree loops, you could get off by a simple "Exit;".

Also, you should make a param for the dropping, and put the R0b0re := DTM… Inside the if()then begin… so you wouldnt load it even if not needed, and HOLY PRIEST SMOKING INSIDE THE FENCES OF CHURCH IN HIS PRIEST CLOTHE THINGS (I've seen that happen.) you dont have FreeDTM?

I hoped I wouldnt have to tell you this, but now you constantly fuck memory with the DTM and soon your comp slows down so that you cannot type 'color master' - and you have to :O RESTART :O :O :O

Its a shame Quake Sounds dont include "Owned!".

Im propably being extremely annoying.

EDIT: o wait - they have dominating and humiliation :p

EDIT EDIT: Im sure you will also some time have an opportunity to
I'll make you eat you're words


EDIT EDIT EDIT: Hold on - you dont actually have to make it in separate proc. Still make a param for it, and after doing the resulting, do if(result)then if(ParamTrue)then dropstuff and after that shit the exit. Saves you lines breaking out of the loops.

the scar noob

2007-09-28 12:36:51

The only thing I wanne say, is that n3ss3s stays the same dude.
He just want's to raise his post count..
From: n3ss3s
This was not post your miners FindRock thread people -.-

And I dont even have one to post >:( Then I post my find fishing spot! Buahahahaa!

//--------- Finds the Luring/Baiting slot ----------\\
function FindLBingSpot(var Sx, Sy: Integer; xx1, yy1, xx2, yy2: Integer): Boolean;
var
I, Z, O, x1, y1, x2, y2, FO, Tot, Counter: Integer;
var
H, S: Extended;
var
SpotColorsP: TPointArray;
var
BrokeOutOfLoop: Boolean;
begin
ColorToleranceSpeed(2);
H := 0.15;
S := 0.15;
SetArrayLength(SpotColorsP, 8);
repeat
Wait(25);
H := H + 0.05;
S := S + 0.05;
SetColorSpeed2Modifiers(H, S);
repeat
Wait(20);
for I := 0 to GetArrayLength(SpotColors) - 1 do
begin
Wait(5);
FindColorsSpiralTolerance(MSCX, MSCY, SpotColorsP, SpotColors[i], xx1, yy1, xx2, yy2, 10);
if (not (Length(SpotColorsP) = 0)) and (not (Length(SpotColorsP) = -1)) then
begin
FO := I;
BrokeOutOfLoop := True;
Break;
end;
Z := Z + 1;
if (Z >= 25) then
begin
Exit;
end;
end;
if (BrokeOutOfLoop) then
begin
Break;
end;
until (False); // Dont worry, I've got it covered! There is 2 failsafes for it.
if (GetArrayLength(SpotColorsP) <= 0) then
begin
Exit;
end;
x1 := SpotColorsP[0].x - 20;
y1 := SpotColorsP[0].y - 20;
x2 := SpotColorsP[0].x + 20;
y2 := SpotColorsP[0].y + 20;
Writeln('Okay, possible spot box coming!');
Writeln('/ x1 '+IntToStr(x1)+'\');
Writeln('| y1 '+IntToStr(y1)+'|');
Writeln('| x2 '+IntToStr(x2)+'|');
Writeln('\ y2 '+IntToStr(y2)+'/');
repeat
Wait(20);
for I := 0 to GetArrayLength(SpotColors) - 1 do
begin
Wait(20);
repeat
FindColorsTolerance(SpotColorsP, SpotColors[i], x1, y1, x2, y2, 15);
if (Length(SpotColorsP) = 0) or (Length(SpotColorsP) = -1) then
begin
Counter := Counter + 1;
end else
Tot := Tot + GetArrayLength(SpotColorsP);
Counter := Counter + 1;
Wait(100 + Random(25)); // Colors
until(Counter >= 10) or (Tot >= 4);
if (Tot >= 4) then
begin
if(GetArrayLength(SpotColorsP) <= 0)then
begin
Writeln('Wtf this is not possible');
Exit;
end;
MMouse(SpotColorsP[0].x, SpotColorsP[0].y, 3, 3);
if (IsUpText('ure')) then
begin
GetMousePos(Sx, Sy);
if(FindEdgeWhirlPool(Sx - 15, Sy - 10, Sx + 15, Sy + 10))then
begin
Writeln('*** WHIRLPOOL DETECTED ***');
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2); // Default
Exit;
end;
Writeln('Found fishing spot!');
Result := True;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
end;
end;
O := O + 1;
Wait(20);
until (Result) or (O >= 10);
Wait(25);
until (Result) or (not (LoggedIn));
end;

t3h s3x.

EDIT: o, from my edgefisher.

I dont mind if this is turning to post your mining proc, but we need to get it moved into bbq I think.

EDIT EDIT: A side note for Drunkenoldma or whoever does teh php magic, the letter O shows as zero in the scar tags.


:rolleyes:

I also want to say that elemental is rather new, I mean, he has been gone for a pretty long time now?
He has to learn all the new things, should you guys could do what he's doing atm after a half year (or even more)??

-Tsn.

n3ss3s

2007-09-28 13:08:47

I dont want to raise my post count.

And if I'd want to - I cannot and want not to spam.

I announced at BBQ that its end of my spam plawkx.

EDIT:
-Tsn.
what happened to -Stijn?

EDIT EDIT: so, no spam, my only intention was to pwn robot.

EDIT EDIT EDIT:
God damnit N3ss3s, STOP FUCKING OWNING ME!
Thats just enough, a tad more than enough, motivation for me to start / continue owning someone.

Lorax

2007-09-29 07:18:04

Elemental ;)
Well your errors have been pointed out..
do not use MMouse if you are not certain if you will hit a color..
if FindColorTolerance(ax, ay, color, MSX1, MSY1, MSX2, MSY2, Tol) then
MMouse(ax, ay, 4, 4);

next you cannot be certain that the counter will be exactly 10000 usually people do


if ( GetSystemtime - t > 10000 ) then

or what I do


t := GetSystemTime + 10000 + Random(2000);

repeat
FTWait(1);
until ( not LoggedIn ) or
( GetSystemTime > t );