SRL Archive - RS3 Outdated / Broken Scripts

Requesting location detecter function


Negaal

2007-10-31 04:58:41

well, i'm making lumbridge cow killer, fighting and deathwalk is ok, but in some areas there are way too much peoples and only some cows, im planning it to fight north…
i'v tryed dectect location by using rocks, river, bridge, tree color with tol… hard to make tree or rock dtm, because evry time it rotate camera like 5 degress, it wont find it again… i'll be really thankful if someone make location detector or/and something what walks back to north field… i'll release my cow killer when i get 10h+ report…


thanks

nielsie95

2007-10-31 05:17:13

Isn't there wheat in the field above it? You could use that color to callibrate..
And have you tried looking at the music? :)

Negaal

2007-10-31 05:55:37

From: nielsie95
Isn't there wheat in the field above it? You could use that color to callibrate..
And have you tried looking at the music? :)


actually, i don't know anything about calibrating… i'll learn from wizzy and fawki scripts then…i dont know what calibrating means… english is not my primary language

could explain litle?

btw,i tryed using dtm to find big brown area from MM, thing is when the color changes it wont find it again, i tryed even with 255 tol…

EDIT: with music i cant detect am i in north or south side… but i can detect am i near field or not…case sandbitch lady teles me… just a question has music plugin done?

thx for ideas…:D

WT-Fakawi

2007-10-31 06:36:43

From: negaal
i dont know what calibrating means
Callibrating is simply checking once every minute or so, and determine where we are in an attempt not to get lost. You could do so with fixed colors like Water, Rock, Road or with Symbols or Music for instance.

King of Knives

2007-10-31 09:21:41

Using FindDTMRotated will easily solve the MM-degree problem.

I made a "sketch" you could try and perfect. It knows when it's north, but it has problems with south and middle and middle-south.

Function FDTMR(DTM: Integer): Boolean;
var
a,b: Integer;
E: Extended;
begin
Result:= FindDTMRotated(DTM,a,b,MMx1,MMy1,MMx2,MMy2,-30,30,0.1,E)
MMouse(a,b,0,0)
end;

Function GetCowPenPosition: String;
var
RockTree,TwoTrees,TreePalm: Integer; // DTMs
begin
RockTree := DTMFromString('78DA63EC646260D0654001CE1E1E0C22409A1' +
'1CA67AC00AA9143551361C885A94606558D41820AAA9A3222D454' +
'01D5C812505341A439D2F8D50000152809C5');
TwoTrees := DTMFromString('78DA63CC636660B06064400611865C0C1A401' +
'A26CA9805546348404D26508D1EAA1A8304155435D944A8C905AA' +
'3125A0A680B01A00CA6708C3');
TreePalm := DTMFromString('78DA635CCCC4C060CD8002A40258193480342' +
'394CF3811A8C61B558D41820AAA9AC940359E04D4F41361CE24C2' +
'6A0018C20869');
if FDTMR(RockTree) and FDTMR(TwoTrees) then Result:= 'Middle-South'
if Length(Result) = 0 then if FDTMR(TwoTrees) and FDTMR(TreePalm) then Result:= 'Middle-North'
if Length(Result) = 0 then
begin
if FDTMR(RockTree) then Result:= 'South'
else if FDTMR(TwoTrees) then Result:= 'Middle'
else if FDTMR(TreePalm) then Result:= 'North'
end;
FreeDTM(RockTree)
FreeDTM(TwoTrees)
FreeDTM(TreePalm)
end;
The DTMs need a bit of work.

-Knives

Negaal

2007-10-31 11:16:54

Thank you Fakawi for explanation and thank you king of knives for location detecter, ill try it out

hehe:

===============================
Worked: 1 Hours, 15 Minutes and 1 Seconds
Cows killed: 209 | 1 Hit K0's: 93
Monster not found: 522
Died: 0
===============================
Successfully executed
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| SRL 4 Randoms Report |
| www.srl-forums.com |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Talks : 2 |
| Ricks : 1 |
| Capn Hand : 1 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/


EDIT: killing rate was above 170 per hour(170-180)

Btw, lumby detecter, walking back to cow field(slightly modifed) and writestatus[from tarajunky chicken killer] are taken from tarajunky script, i made him big fat credits…you think he promise me to use them…? Is it allowed at all?

also

procedure setAttackmode;
begin
if not loggedin then exit;
gametab(1);
ffrt := 1+random(4);
if ffrt = 5 then ffrt := 3;
case lowercase(players[currentplayer].skill) of
'Attack': setfightmode(1);
'Strength': setfightmode(2);
'Defence': setfightmode(4);
'Random': setfightmode(ffrt);
'Controlled': setfightmode(3);
end;
Retaliate(True);
end;


i don't know why but doesnt seem working…

King of Knives - whats rocktree and treepalm, two trees are 2 palm trees near milk cows right? yes it got some problems… most of time it detects it's middle-north, also when it was most south it detected it's north… anyways big thanks:):):):)