skilld u
04-11-2008, 03:16 PM
DTM's =]
In This Tut I Will Teach You:
Uses of DTM's
Making DTM's
Using DTM's
Finding DTM's In Your Inventory
Finding DTM's On the Mini-Map
Uses of DTM's:
Dtm's are very useful in scripting. You can use them to find items in your inventory and walking.
Making DTM's:
Making a DTM is extremely easy. The first thing you have to do is open the DTM editor in SCAR.
http://i27.tinypic.com/2zyaf0p.jpg
Next you need to paste an image into the DTM editor. Open up RuneScape and press the PrtScn button on you keyboard and go back to the DTM editor. Paste the image in by clicking the paste image button:
http://i32.tinypic.com/25sn0k3.jpg
Next you need to pick the center of the item that you are making the DTM of and set the tolerance, I usually use 10:
http://i26.tinypic.com/2wck9af.jpg
Here are the places that you should put the main and sub-points at:
http://i27.tinypic.com/2exrnky.jpg
After setting the tolerance you need to pick around 5 - 10 sub-points around the outside of the object. Make sure that they are the black color. The color is 65536. Once you have selected the sub-points you need to press DTM to text button:
http://i30.tinypic.com/2uijgwo.jpg
Exit out of the DTM editor and you will see your DTM in the debug box.
http://i29.tinypic.com/35b8qrd.jpg
Now that you have your DTM you are ready to use it :D
Using DTMs:
You have to declare your DTM as an integer at the beginning of your script.
program New;
{.include SRL/SRL.scar} //srl
var //variable
Log: integer; //DTMs are declared as integers
procedure DTMs; //declare all of your dtms in a
begin //procedure and call it in your main loop
Log := DTMFromString('78DA6364666660B8C8C8800C72438C18B88 03' +
'448F43F10300A01D55C405503918591409A13A8E6080135FF 9918' +
'188E1350F30DA8E61C01353F806A6E1050C30674CF4D026AF 8816' +
'AAEE3570300D5120ED0');
end;
begin
SetupSRL; //don't forget srl
DTMs; //your DTM procedure
FreeDTM(Log); // don't forget to free your dtm at the end of your script
end.
Now you have to make it search for your DTM:
program New;
{.include SRL/SRL.scar}
var
Log: integer;
x, y: integer; //don't forget to declare x and y
procedure DTMs;
begin
Log := DTMFromString('78DA6364666660B8C8C8800C72438C18B88 03' +
'448F43F10300A01D55C405503918591409A13A8E6080135FF 9918' +
'188E1350F30DA8E61C01353F806A6E1050C30674CF4D026AF 8816' +
'AAEE3570300D5120ED0');
end;
procedure DropTheLog;
begin
if FindDTM(Log, x, y, MIX1, MIY1, MIX2, MIY2) then // MIX and MIY are the
begin //Inventory coords
Mouse(x, y, 5, 5, false); //right clicks the log in the center.
ChooseOption('rop'); //chooses the drop option
end;
end;
begin
SetupSRL;
DTMs;
DropTheLog;
FreeDTM(Log);
end.
Making DTM's for Walking:
For this I am going to use the bankers in Draynor to show you. Make the main-point the white dot where you want to be and the sub-points each of the bankers.
http://i30.tinypic.com/w88faa.jpg
Finding DTM's on the Mini-Map:
First make a DTM of something on the mini-map. If you don't know how to make a DTM than re-read the beginning of the tutorial. Now that you have your DTM you need to make it search the minimap for it.
This will search the Mini-Map for the bankers DTM and if it finds it then it clicks. It is made for the bankers in Draynor.
program New;
{.include SRL/SRL.scar}
var
Bankers: integer;
x, y: integer;
procedure DTMs;
begin
Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C5 03' +
'EA31090904455F3E70F13A61A41026A8481841C7E3500E041 09A4' +
'');
end;
procedure EnterBank;
begin
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then // MMX and MMY are the
begin //mini-map coords, use DTMRotated when searching the mini-map
Mouse(x, y, 5, 5, true); //clicks
FFlag(0); //waits until the flag is gone
end;
end;
begin
SetupSRL;
DTMs;
EnterBank;
FreeDTM(bankers);
end.
rep++ =]
In This Tut I Will Teach You:
Uses of DTM's
Making DTM's
Using DTM's
Finding DTM's In Your Inventory
Finding DTM's On the Mini-Map
Uses of DTM's:
Dtm's are very useful in scripting. You can use them to find items in your inventory and walking.
Making DTM's:
Making a DTM is extremely easy. The first thing you have to do is open the DTM editor in SCAR.
http://i27.tinypic.com/2zyaf0p.jpg
Next you need to paste an image into the DTM editor. Open up RuneScape and press the PrtScn button on you keyboard and go back to the DTM editor. Paste the image in by clicking the paste image button:
http://i32.tinypic.com/25sn0k3.jpg
Next you need to pick the center of the item that you are making the DTM of and set the tolerance, I usually use 10:
http://i26.tinypic.com/2wck9af.jpg
Here are the places that you should put the main and sub-points at:
http://i27.tinypic.com/2exrnky.jpg
After setting the tolerance you need to pick around 5 - 10 sub-points around the outside of the object. Make sure that they are the black color. The color is 65536. Once you have selected the sub-points you need to press DTM to text button:
http://i30.tinypic.com/2uijgwo.jpg
Exit out of the DTM editor and you will see your DTM in the debug box.
http://i29.tinypic.com/35b8qrd.jpg
Now that you have your DTM you are ready to use it :D
Using DTMs:
You have to declare your DTM as an integer at the beginning of your script.
program New;
{.include SRL/SRL.scar} //srl
var //variable
Log: integer; //DTMs are declared as integers
procedure DTMs; //declare all of your dtms in a
begin //procedure and call it in your main loop
Log := DTMFromString('78DA6364666660B8C8C8800C72438C18B88 03' +
'448F43F10300A01D55C405503918591409A13A8E6080135FF 9918' +
'188E1350F30DA8E61C01353F806A6E1050C30674CF4D026AF 8816' +
'AAEE3570300D5120ED0');
end;
begin
SetupSRL; //don't forget srl
DTMs; //your DTM procedure
FreeDTM(Log); // don't forget to free your dtm at the end of your script
end.
Now you have to make it search for your DTM:
program New;
{.include SRL/SRL.scar}
var
Log: integer;
x, y: integer; //don't forget to declare x and y
procedure DTMs;
begin
Log := DTMFromString('78DA6364666660B8C8C8800C72438C18B88 03' +
'448F43F10300A01D55C405503918591409A13A8E6080135FF 9918' +
'188E1350F30DA8E61C01353F806A6E1050C30674CF4D026AF 8816' +
'AAEE3570300D5120ED0');
end;
procedure DropTheLog;
begin
if FindDTM(Log, x, y, MIX1, MIY1, MIX2, MIY2) then // MIX and MIY are the
begin //Inventory coords
Mouse(x, y, 5, 5, false); //right clicks the log in the center.
ChooseOption('rop'); //chooses the drop option
end;
end;
begin
SetupSRL;
DTMs;
DropTheLog;
FreeDTM(Log);
end.
Making DTM's for Walking:
For this I am going to use the bankers in Draynor to show you. Make the main-point the white dot where you want to be and the sub-points each of the bankers.
http://i30.tinypic.com/w88faa.jpg
Finding DTM's on the Mini-Map:
First make a DTM of something on the mini-map. If you don't know how to make a DTM than re-read the beginning of the tutorial. Now that you have your DTM you need to make it search the minimap for it.
This will search the Mini-Map for the bankers DTM and if it finds it then it clicks. It is made for the bankers in Draynor.
program New;
{.include SRL/SRL.scar}
var
Bankers: integer;
x, y: integer;
procedure DTMs;
begin
Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C5 03' +
'EA31090904455F3E70F13A61A41026A8481841C7E3500E041 09A4' +
'');
end;
procedure EnterBank;
begin
if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then // MMX and MMY are the
begin //mini-map coords, use DTMRotated when searching the mini-map
Mouse(x, y, 5, 5, true); //clicks
FFlag(0); //waits until the flag is gone
end;
end;
begin
SetupSRL;
DTMs;
EnterBank;
FreeDTM(bankers);
end.
rep++ =]