Let Me explain, DRSARed, Is a method, to bring back autocolors into scar scripts. It was first used in my powerminer. Let me explain what it does. It is designed to run after you perform a click on an object, Such as clicking on an iron vein, In a rock. It runs after that function that clicks the iron, And it detects the Small red 'X'(THE SMALL RED 'X's COLOR IS ALWAYS 255, To CALL THIS FUNCTION, YOU WOULD TYPE DRSARed(255);) That appears for short period of time. Look At the picture below.Code:function DRSARed(RedArrowcol:integer):boolean; var xm,ym:integer; begin if FindMSColor(x,y,RedArrowCol)then begin GetMousePos(x,y); xm:=x; ym:=y; curcolor:=GetColor(xm,ym); Result:=True; end; Writeln('Current color is:'+ IntToStr(curcolor) + '!') end;
It detects what the arrow is pointing at. Then once it detects that it gets the color of where the mouse is at, In this case it was on an iron vein, On a rock. Look below to see what color it clicks and reads into scar.
As you can see here it gets the color directly below where the red 'X' Was.
So now you are asking me, How do I get this to work for me? Here is my answer. There is a variable in my function called, Curcolor. alls you have to do is after you run DRSARed(255); You would have the variable color you want to change, In my example it will be called 'Orecolor'. Here is an example of how it is used.
Let me explain this code to you, For those begginner scripters, Or those who do not understand fully. If it finds the text 'Mine' and the orecolor(A global variable) and a certain preset tolerance then it will mouse the mouse to where the color/text is found. Then DRSA run and it gets the color of where you clicked. Then after that you set your variable(Orecolor in this case) :=Curcolor;Code:if(FindObj(x, y, 'Mine', orecolor, oretol1))then begin Mouse(x,y,0,0,true) DRSARed(255); OreColor := CurColor;
And that is how you use my function. I hope it will sooner or later be implemented into srl, So everyone can get back on the right track with autocolors. DO NOT USE THIS TO MAPWALK, IF YOU WANT TO MAPWALK, USE RADIALWALK. Dont know what RadialWalk is? It is a genius function made by Fakawi, You can read about it here http://82.92.130.193/forums/showthread.php?t=452
Hope this was insightful, into re-autocoloring scar scripts
~db_cheater~








Reply With Quote



(DRSAYellow)

.




