SRL Archive - Research & Development Lounge

Need Ore Testers!


666d3v1l666

2008-10-07 05:57:09

Hi,

I've decided to add DTM's to my script, and I need people to please test some ores for me.
All i need you to do is play runescape, have all possible ore in your inventory and run this script.
Thanks

P.S Will give + rep to anyone that helps me!

Status
——————-
Clay Ore: Done
Tin Ore: Done
Copper Ore: Done
Iron Ore: Done
Silver Ore: Done
Coal Ore: Done
Gold Ore: Done
Mithril Ore: Done
Adamant Ore: Done
Rune Ore: Needs Testing…

Vampspiro

2008-10-07 06:08:39

iam testing mith ,adam,coal,iron…
ill have result in a min..

Vampspiro

2008-10-07 06:15:52

dude all it says is sucessfull to all when i dont even have then in my invetory and it doesnt seem to even highlight them :S

666d3v1l666

2008-10-07 06:22:33

Damn.
Ill try and fix…

666d3v1l666

2008-10-07 06:35:56

OK, Fixed it!

Vampspiro

2008-10-07 06:42:07

testing again lolz xD

Vampspiro

2008-10-07 06:48:14

1st time i ran it..:

Testing Clay...
Failed
Testing Tin ore...
Failed
Testing Copper ore...
Failed
Testing Iron ore...
Success!
Testing Silver ore...
Failed
Testing Coal...
Failed
Testing Gold ore...
Failed
Testing Mithril ore...
Success!
Testing Adamantite ore...
Success!
Testing Runite ore...
Failed
Successfully executed

remember i had coal but it failed…

second time…:

Testing Clay...
Failed
Testing Tin ore...
Failed
Testing Copper ore...
Failed
Testing Iron ore...
Failed
Testing Silver ore...
Failed
Testing Coal...
Success!
Testing Gold ore...
Failed
Testing Mithril ore...
Success!
Testing Adamantite ore...
Failed
Success!
Testing Runite ore...
Failed
Successfully executed


i had iron but that failed :S

i dunno third time was sloppy adman ,iron and coal failed :S ….
but its seems to be highlighting the object either way…

hope that helped dude…

Goobs

2008-10-07 08:38:06

I'm sorry man, but I had to clean it up.. It was annoying me..

I'll test when I get home, cuz Java's blocked here in school.

program New;
{.include SRL/SRL.scar}
var
i, x, y, DTM, Clay, Tin, Copper, Iron, Silver, Coal, Gold, Mithril, Adamant, Rune: integer;
Ore: string;

procedure DeclareDTMs;
begin
Clay := DTMFromString('78DA6364616160B8CAC8800C2654053170016' +
'990E87F20606405AA3987AA06220B2381342F50CD15026A18816A' +
'6E1350F39B19C33DE86A000D8A0AC2');
Tin := DTMFromString('78DA6334646160B8CAC8800C7A9A9B18B8803' +
'448F43F1030EA03D5DC47550391859140DA1AA8E6320135464035' +
'C709A891C7740FBA1A006BA50ACE');
Copper := DTMFromString('78DA638C666160B8CAC8800CEED45B3270016' +
'990E87F20604C07AAB980AA06220B2381742450CD03026A3C816A' +
'AE1050130154731CBF1A00C4420B9E');
Iron := DTMFromString('78DA636C616160B8C4C8800C3C759518B8803' +
'448F43F10303601D53C445503918591407A0250CD45026A4A30ED' +
'C25003B2EB047E35007C680B70');
Silver := DTMFromString('78DA6364656160F8CEC8800C66CF5ECEC005A' +
'441A2FF81809119A88695890115302291405A04A8E633237E355F' +
'9931ECC250C30E34E7357E350043290AF4');
Coal := DTMFromString('78DA6334646160F8CEC8800C2C2DD519B8803' +
'448F43F1030DA01D57C46550391859140DA08A8E6350135BA4035' +
'AC4CF8D5C803D5FCC46F0E00D26B0988');
Gold := DTMFromString('78DA638C626160F8C9C8800CAEAD9766E002D' +
'220D1FF40C0980154F319550D44164602E918A09AD704D47862DA' +
'85A12612A8869909AF1A00EF290B62');
Mithril:= DTMFromString('78DA636C616160F8CEC8800CBC7DF219B8803' +
'448F43F10304E04AAF982AA06220B2381743D50CD2B026A1A816A' +
'5899F0AB2901AAF986DF1C00C13E0B8E');
Adamant:= DTMFromString('78DA63646361609061624006FEC9FE0C5C409' +
'A1188FF0301A300A61A882C8C04D2EC4035FC04D47C65266C0E13' +
'D01C4DFC6A0087FC06D3');
Rune := DTMFromString('78DA6334646160906662400681D9E50C5C409' +
'A1188FF0301A30D508D14AA1A882C8C04D2464035FC04D4E802D5' +
'681250230F5423835F0D00BC5606DA');
for i:= 1 to 10 do
begin
case i of
1: Ore:= 'Clay';
2: Ore:= 'Tin ore';
3: Ore:= 'Copper ore';
4: Ore:= 'Iron ore';
5: Ore:= 'Silver ore';
6: Ore:= 'Coal';
7: Ore:= 'Gold ore';
8: Ore:= 'Mithril ore';
9: Ore:= 'Adamantite ore';
10: Ore:= 'Runite ore';
end;
case i of
1: DTM:= Clay;
2: DTM:= Tin;
3: DTM:= Copper;
4: DTM:= Iron;
5: DTM:= Silver;
6: DTM:= Coal;
7: DTM:= Gold;
8: DTM:= Mithril;
9: DTM:= Adamant;
10: DTM:= Rune;
end;
Writeln('Testing ' + Ore + '...');
If(FindDTM(DTM, x, y, 0, 0, 2000, 1000)) then
begin
MMouse(x, y, 3, 3);
If(not(IsUpTextMultiCustom([Ore, 'se']))) then
begin
WriteLN('Failed.');
end;
If(IsUpTextMultiCustom([Ore, 'se'])) then
begin
WriteLN('Success!');
Mouse(x, y, 3, 3, True);
Wait(randomrange(450, 800));
Mouse(x, y, 3, 3, True);
end;
Wait(randomrange(1000, 2000));
end;
If(not(FindDTM(DTM, x, y, MIX1, MIY1, MIX2, MIY2))) then
begin
WriteLN('Failed.');
end;
end;
end;

begin
ActivateClient;
SetupSRL;
Wait(2000);
DeclareDTMs;
end.

Naum

2008-10-07 12:35:14

says it much faster:

It find all the ores for me - confirmed!

program New;
{.include SRL/SRL.scar}
var
i, x, y : integer;
Ore: string;
Orex : array [0..9] Of Integer;
begin
SetUpSRL;
Orex[0] := DTMFromString('78DA6364616160B8CAC8800C2654053170016' +
'990E87F20606405AA3987AA06220B2381342F50CD15026A18816A' +
'6E1350F39B19C33DE86A000D8A0AC2');
Orex[1] := DTMFromString('78DA6334646160B8CAC8800C7A9A9B18B8803' +
'448F43F1030EA03D5DC47550391859140DA1AA8E6320135464035' +
'C709A891C7740FBA1A006BA50ACE');
Orex[2] := DTMFromString('78DA638C666160B8CAC8800CEED45B3270016' +
'990E87F20604C07AAB980AA06220B2381742450CD03026A3C816A' +
'AE1050130154731CBF1A00C4420B9E');
Orex[3] := DTMFromString('78DA636C616160B8C4C8800C3C759518B8803' +
'448F43F10303601D53C445503918591407A0250CD45026A4A30ED' +
'C25003B2EB047E35007C680B70');
Orex[4] := DTMFromString('78DA6364656160F8CEC8800C66CF5ECEC005A' +
'441A2FF81809119A88695890115302291405A04A8E633237E355F' +
'9931ECC250C30E34E7357E350043290AF4');
Orex[5] := DTMFromString('78DA6334646160F8CEC8800C2C2DD519B8803' +
'448F43F1030DA01D57C46550391859140DA08A8E6350135BA4035' +
'AC4CF8D5C803D5FCC46F0E00D26B0988');
Orex[6] := DTMFromString('78DA638C626160F8C9C8800CAEAD9766E002D' +
'220D1FF40C0980154F319550D44164602E918A09AD704D47862DA' +
'85A12612A8869909AF1A00EF290B62');
Orex[7] := DTMFromString('78DA636C616160F8CEC8800CBC7DF219B8803' +
'448F43F10304E04AAF982AA06220B2381743D50CD2B026A1A816A' +
'5899F0AB2901AAF986DF1C00C13E0B8E');
Orex[8] := DTMFromString('78DA63646361609061624006FEC9FE0C5C409' +
'A1188FF0301A300A61A882C8C04D2EC4035FC04D47C65266C0E13' +
'D01C4DFC6A0087FC06D3');
Orex[9] := DTMFromString('78DA6334646160906662400681D9E50C5C409' +
'A1188FF0301A30D508D14AA1A882C8C04D2464035FC04D4E802D5' +
'681250230F5423835F0D00BC5606DA');
for i:= 0 to 9 do
If FindDTM(Orex[i], x, y, 0, 0, 961, 700) Then
WriteLn('Found ' +IntToStr(OreX[i])+' Ore!')
else
WriteLn('not found!');
end.

Dont specify the RS Client if you want it to work!

out put:

Found 0 Ore!
Found 1 Ore!
Found 2 Ore!
Found 3 Ore!
Found 4 Ore!
Found 5 Ore!
Found 6 Ore!
Found 7 Ore!
Found 8 Ore!
not found! // dont have rune?


0 is clay
1 is copper e.t.c

Goobs

2008-10-07 13:09:15

Sensible ^.^

I just threw it together with standards. It was annoying to meh ^.^

But yeh, methinks your DTMs are fine, 666.

noidea

2008-10-07 14:06:24

Why not just make a DTM with tolerance of 255? Then make a separate CLAY DTm?

TViYH

2008-10-07 22:34:08

Yes, use 1 DTM with a mainpoint having a tolerance of 255.

666d3v1l666

2008-10-08 00:51:08

But if i had a tolerance that high wouldn't it just click all ores, no matter what it is?

TViYH

2008-10-08 01:02:12


if FindDTM(OreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 3, 3);
Wait(150 + Random(550));
if IsUpText(OreName) then
Mouse(x, y, 0, 0, True);
end;

=]

666d3v1l666

2008-10-08 01:42:44

From: TheVoiceInYourHead

if FindDTM(OreDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 3, 3);
Wait(150 + Random(550));
if IsUpText(OreName) then
Mouse(x, y, 0, 0, True);
end;

=]


Ha, LOL.
I forgot that you could use FindDTM as a boolean.
That wouldve been easyier.

Iroki

2008-10-13 11:58:04

Try my function:
function LoadOreDTM(OreName: string): integer;
begin
case OreName of
'tin' :
begin
Result := DTMFromString('78DA6354656060B06040015D0DF50C92409A1' +
'188FF0301A32E9061CF8006189148202D02246C08A8910112B604' +
'D468000933FC6A00107C077D');
end;
'copper':
begin
Result := DTMFromString('78DA635463606090644001B76BCCC0428C40F' +
'C1F08181531D54064612490D60412E204D468000939026AC48084' +
'027E3500D3AA06E6');
end;
'iron':
begin
Result := DTMFromString('78DA635465606098C18002BC7495182481342' +
'310FF070246454C3510591809A4B581C414026A4488304705482C' +
'C0AF060035B00862');
end;
'silver':
begin
Result := DTMFromString('78DA6354636060B8C9800296AFD8CC2009A41' +
'981F83F10302A0219D719D000231209A43580C435026A4480C45D' +
'026A5480C443FC6A0098540B11');
end;
'coal':
begin
Result := DTMFromString('78DA63BCCCC8C0F0098891809DAD160317900' +
'689FE0702C64340D657543510591809A4CF629A83A1E63C90F591' +
'809A8B40D67F026AEE12B60B0077C90F63');
end;
'gold':
begin
Result := DTMFromString('78DA63D46460602866400157D74A314802694' +
'620FE0F048C4A404611031A60442281B43E902824A0461C4894E3' +
'56C304A20D09AB0100957F08CA');
end;
'mithril':
begin
Result := DTMFromString('78DA63D4646060B8CC8002BCBCF3192481342' +
'310FF070246154C3510591809A4F58950230E24AE13506304246E' +
'E0570300F9B80A15');
end;
'adamantite':
begin
Result := DTMFromString('78DA63D4636060B06640013E09BE0C5C409A1' +
'188FF0301A30C9061C3800618914820AD08241C09A8D10412E604' +
'D4E8000927FC6A00B68006FF');
end;
'runite':
begin
Result := DTMFromString('78DA63D46360608866400101D9E50C92409A1' +
'188FF0301A30CA61A882C8C04D2A644A85127428D2E9048C1AF06' +
'00299A07F9');
end;
end;
end;

and finding procedure


procedure FindDTM;
var
DTM: integer;
begin
DTM := LoadOreDTM('tin');
if FindDTM(DTM, x, .......) then .....
.......................
DTM := LoadOreDTM('copper');
...................
...................
.................
FreeDTM(DTM);
end;
:)

TViYH

2008-10-13 15:12:54

Even better:


// Returns true if it finds an ore, also
// returns the ore count in var OreCount
function FindOre(OreCount: integer): boolean;
var
GlobalOreDTM: Integer;
begin
if not LoggedIn then Exit;
GlobalOreDTM := DTMFromString('78DA63CC67666068606440061E3A8A0CFF813' +
'448F43F10302602D554A3AA81C8C248201D0F54D34A404D06504D' +
'37116ADA09A82906AA6923A0A68A08F7D400D5D41050530954534' +
'A404D21504D110135994035C5F8D50000A902100B');
for i := 0 to 28 do
begin
MMouse(ItemCoords(i).x, ItemCoords(i).y, 0, 0);
Wait(75 + Random(25));
if IsUpText('ore') then
begin
Result := True;
Inc(OreCount);
end;
end;
end;