SRL Archive - News and General

I Made my first DDTM that works


RudeBoiAlex

2007-11-07 17:07:03

well thanks YoHoJo it was your tut i got it from ignore all the RoadMp stuff i was just using it form yohojos tut. If you would like to test stand under falador east bank with the minimap visible it should click between the 3 trees (tested 3 times and it worked!

program New;

var YRoadDTM:Integer;
var RoadMP: TDTMPointDef;
var RoadSP: array[0..2] of TDTMPointDef;
var RoadDTMSkel: TDTM;
VAR x, y: Integer;
{.include SRL\SRL.scar}


Procedure Load;
Begin
RoadMP.x:=752;
RoadMP.y:=306;
RoadMP.areasize:=1;
RoadMP.areashape:=0;
RoadMP.color:=2195572;
RoadMP.tolerance:=30;

RoadSP[0].x:=760;
RoadSP[0].y:=303;
RoadSP[0].areasize:=1;
RoadSP[0].areashape:=0;
RoadSP[0].color:=2195572;
RoadSP[0].tolerance:=30;

RoadSP[1].x:=743;
RoadSP[1].y:=302;
RoadSP[1].areasize:=1;
RoadSP[1].areashape:=0;
RoadSP[1].color:=681518;
RoadSP[1].tolerance:=30;

RoadSP[2].x:=756;
RoadSP[2].y:=293;
RoadSP[2].areasize:=1;
RoadSP[2].areashape:=0;
RoadSP[2].color:=2195565;
RoadSP[2].tolerance:=30;


RoadDTMSkel.MainPoint:=RoadMP;
RoadDTMSkel.SubPoints:=RoadSP;
YRoadDTM:=AddDTM(RoadDTMSkel);
End;

Procedure FindIt;
Begin
if (FindDTM(YRoadDTM,x, y, MMX1, MMY1,MMX2, MMY2)) Then
Begin
Mouse(x, y, 0, 0, True);
Writeln('w0ot');
End;
End;

Begin
SetupSRL;
Load;
FindIt;
End.

Vap0ur

2007-11-07 17:15:30

really??? thats where i made mine….. i was gonna make a tree cutter that cut trees there lol, but the colours kept changing and it wouldnt work after awhile lol

RudeBoiAlex

2007-11-07 17:16:37

AHH MANN thats somethink i forgot lol gotta get people to pick the color o ell i still made one that will work until i change worlds :p

Vap0ur

2007-11-07 17:31:06

yea, i know its a pain in the ass

RudeBoiAlex

2007-11-07 17:38:45

Mehh its easily fixed just get a user to color pick the tree pixels :p